Skip to main content

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

All memory lives as markdown files inside your workspace:

The Flow

Episode logging is a simple file append — no LLM call, no latency cost. The expensive summarization work happens during the nightly compaction pass when you’re not waiting for a response.

How Memory Gets Read

Memory is not injected into the prompt. The system prompt carries exactly two ambient memory pieces:
  1. The reflection playbook — the distilled do/avoid/likes/dislikes/recipes lessons from the nightly self-review, capped at 6,000 characters. (Until the first playbook exists, this slot is filled by the bounded ~500-token learned-preferences digest from the feedback loop.)
  2. The <memory_map> coverage stub — a byte-stable-per-day map of what exists: per-source record counts, date ranges, knowledge-file topics, conversation and file counts. It is a map of what is recallable, never the content itself.
Everything else is retrieved on demand through the retrieval toolset (the introspect capability): The operating contract (agents.core.md) teaches Wolffish to recall from the intent of your message, unprompted: a definite reference (“send me the flight plan”, “that file”) triggers a search first; a repeat-task smell (“send an email to Sarah”) triggers a check for prior patterns; preference questions go digest-then-search; pure-present tasks (weather, math) just act. It must run two differently-worded searches before ever claiming it doesn’t remember something — a search miss is never evidence of absence.

The Cortex Index

Every memory file — and far more — is indexed by the cortex module (SQLite FTS5 with BM25 ranking). The hippocampus tiers are three of eleven indexed sources; conversations, tasks, feedback, usage, logs, and generated files are searchable through the same index. Startup is an incremental mtime/size diff (~22ms on a typical workspace); a full rebuild happens only when the index schema version changes (~1.3s for a 2GB workspace). The index is derived data — delete cortex.db and it rebuilds from the source files on the next launch.
You can manually edit any memory file at any time. Wolffish reads them as-is. The cortex will re-index changes automatically via the brainstem file watcher.

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.

Reflection

The nightly self-review, the playbook, and your 0–10 scores.