Source
ChatGPT architecture review feedback
Problem
Multiple memory-like implementations with overlapping responsibilities:
src/cognitive/episodic.rs — episodic memory (past sessions, learnings)
src/memory/ — vector memory, RAG
src/session/cache.rs — tool result caching with TTL
src/session/local_first.rs — response caching, offline support
src/analysis/vector_store.rs — vector store for code search
This matters because the "local-first, durable, self-improving workshop" story depends on memory being coherent, not fragmented across 5 subsystems.
Proposal
-
Define one MemoryStore trait with clear semantics:
store(key, value, metadata)
retrieve(query, top_k) (semantic search)
get(key) (exact lookup)
invalidate(key) / expire()
-
Provide multiple backends behind the trait:
JsonMemory — simple JSON file store (current episodic)
VectorMemory — HNSW-backed semantic search (current vector_store)
CacheMemory — TTL-based with LRU eviction (current cache.rs)
-
Document retention and deletion policies clearly
-
Single entry point: agent.memory.store() / agent.memory.search()
Relevant Code
src/cognitive/episodic.rs
src/memory/
src/session/cache.rs
src/session/local_first.rs
src/analysis/vector_store.rs
Priority
P1 — architectural clarity
Source
ChatGPT architecture review feedback
Problem
Multiple memory-like implementations with overlapping responsibilities:
src/cognitive/episodic.rs— episodic memory (past sessions, learnings)src/memory/— vector memory, RAGsrc/session/cache.rs— tool result caching with TTLsrc/session/local_first.rs— response caching, offline supportsrc/analysis/vector_store.rs— vector store for code searchThis matters because the "local-first, durable, self-improving workshop" story depends on memory being coherent, not fragmented across 5 subsystems.
Proposal
Define one
MemoryStoretrait with clear semantics:store(key, value, metadata)retrieve(query, top_k)(semantic search)get(key)(exact lookup)invalidate(key)/expire()Provide multiple backends behind the trait:
JsonMemory— simple JSON file store (current episodic)VectorMemory— HNSW-backed semantic search (current vector_store)CacheMemory— TTL-based with LRU eviction (current cache.rs)Document retention and deletion policies clearly
Single entry point:
agent.memory.store()/agent.memory.search()Relevant Code
src/cognitive/episodic.rssrc/memory/src/session/cache.rssrc/session/local_first.rssrc/analysis/vector_store.rsPriority
P1 — architectural clarity