A flat file grows organically. Critical knowledge gets buried. Contradictions accumulate without resolution. We tested whether this produces measurably worse outcomes compared to tiered, indexed knowledge.
memory.md files degrade in quality over time because:
We created a realistic 202-line memory.md simulating 6 months of organic growth. Key properties:
The distill condition had the same knowledge organized in 5 files with SPINE index, [UPDATED] tags, and relevance hooks.
accounts table shared-DB mistake, mentioned dedicated consumer groups, compaction semantics, and idempotency. Richer cross-references.Distill's retrieval rule only triggered on questions and requests. Declarative action statements ("I'm deploying") didn't activate knowledge lookup. Memory.md won because it has everything in context at once — no retrieval needed.
One sentence added to rules/distill.md:
"Trigger on actions, not just questions. If the user says 'I'm deploying X' or 'pushing to staging' — that IS a domain match. Check knowledge BEFORE acknowledging."
The entire behavior change came from one sentence in an 18-line file. This proves the architecture: the rules file IS the product. Improvements to distill are improvements to prompting, not infrastructure.
rules/distill.md: "Trigger on actions, not just questions. If the user says 'I'm deploying X' or 'pushing to staging' — that IS a domain match." One sentence. Entire failure class eliminated.Credit where due. The flat file has real advantages:
The weakness only manifests past ~150 lines, when noise drowns signal and the 200-line cap starts hiding critical knowledge.