Memory
Preamble
Memory is the gate before the answer. It decides which old context can speak, what authority it carries, and what evidence has to be checked before a model uses it.
The Gate Before The Answer
Memory imports reviewed artifacts, doctrine, structured rows, temporal facts, and project state into memory_spine.sqlite. It turns them into ranked packs before an LLM is asked to synthesize.
A query should return fewer things and make each thing carry more burden. Every retrieved item has to show source role, privacy scope, evidence stage, freshness, and review state.
That is the trade: less context, more discipline.
A Smaller Pack With More Burden
Underneath this gate is hybrid retrieval: graph edges, lexical search, and vector search across SQLite and Obsidian. Modal and Ollama generate embeddings where semantic recall helps, especially for conversation recall.
The vector index is a candidate finder. Authority comes from source role, provenance, freshness, contradiction handling, review status, and whether the retrieved lesson improves a future surface.
When Retrieval Gives Orders
Broad folder reads create one kind of failure: the agent drowns in context and guesses anyway. Memory creates another: a ranked pack can feel like a verdict.
The same machinery that prevents guessing can trap stale labels, over-trust reviewed doctrine, and launder an old decision into present authority. The machine becomes a bouncer for my own context. It decides which note gets to speak, then has to show why that note was allowed into the room.
The Loop Back Into Runtime
Memory earns its keep only when accepted lessons change future work. A strong result should be able to move into a prompt, skill, gate, script, evaluator, PRD/spec template, or planning rubric.
Spark Researcher is the pattern here: run, score, log, learn, propose the next bounded experiment. Memory adapts that into a slower governance loop: retrieve, synthesize, gate, record the failure or improvement, review the lesson, then patch the surface that future agents will touch.
Proof So Far
This branch has launched locally. The tracker records working memory spine surfaces, ranked retrieval packs, output gates, token logging, evals, and governed query/compile use.
The broader claim waits for repeated proof: doctrine deltas changing real operational surfaces across multiple projects, with smaller context packs, fewer broad reads, and less rework.
The Path Through The Spine
reviewed sources -> memory_spine.sqlite -> ranked packs -> grounded synthesis
^ | | |
| v v v
human review evidence/output gates repair queues execution surfaces
| |
+-------------------------------------------------------+
accepted lessons feed future runs