Capture, Consolidate, Integrate
Wolffish’s memory system mirrors the human hippocampus. Information flows through three stages: capture, consolidate, integrate. Raw events get logged instantly, compressed into patterns over time, and eventually promoted into permanent understanding.The Three Tiers
| Tier | Location | Written By | LLM Required |
|---|---|---|---|
| Episodes | hippocampus/episodes/YYYY-MM-DD.md | Every turn (append) | No |
| Consolidated | hippocampus/consolidated/YYYY-WNN.md | Nightly compaction | Yes |
| Knowledge | hippocampus/knowledge/*.md | Promotion + direct writes | Yes |
The Flow
Episode logging is a simple file append — no LLM call, no latency cost. The expensive summarization work happens during nightly compaction when you’re not waiting for a response.
How Memory Gets Into Context
Theprefrontal module assembles context before every LLM call. It pulls memory candidates from all three tiers, passes them through the RAS (Reticular Activating System) for relevance scoring, and includes only what matters for the current message.
The RAS uses keyword-based scoring with a 0.25 minimum threshold. A memory fragment about “React performance” won’t appear in context when you’re asking about “grocery list ideas.”
Token Budget
Memory gets 30% of the total context window. Within that budget, the RAS allocates space based on relevance scores — not tier priority. A highly relevant episode from yesterday can outrank a less relevant knowledge file entry.The Cortex Index
All markdown files inhippocampus/ are indexed by the cortex module (SQLite FTS5 with BM25 ranking). This means memory is full-text searchable without scanning files on disk. The index is fully disposable — delete cortex.db and it rebuilds automatically from the source markdown.
No Black Boxes
Every memory operation produces a readable markdown file. You can open~/.wolffish/workspace/brain/hippocampus/ in any editor and see exactly what Wolffish remembers, why it consolidated certain themes, and what it considers permanent knowledge. Delete a file and it’s forgotten. Edit a file and the edit takes effect immediately.
Episodes
Daily conversation logs — the raw stream of what happened.
Consolidation
How episodes compress into weekly summaries.
Knowledge
Long-term facts about people, projects, and preferences.
Feedback Loop
How outcomes shape future behavior.