Case study - No. 02
Living State Machine
A local-first LLM memory system that asks whether a small set of biological memory dynamics can make long-horizon preference recall measurably better than naive retrieval.
The problem
Most "memory" in local assistants is prompt stuffing or naive RAG. They do not habituate repeated low-value input, associate co-occurring facts, gate what gets written, or treat memory as something with trust and decay. LSM makes those mechanisms explicit and ablatable.
Constraints
- Local-first; all user data stays on the machine.
- Every mechanism has a
Nullor baseline implementation so it can be ablated by YAML config. - A run without its YAML, metrics, and raw outputs is not a run.
- Negative results are kept, including the Stentor recurrence result.
- The verifier scores; it never authors or rewrites content.
Evidence
On matched-budget recall_pref_v1 across 3 seeds, LSM scored 1.000 vs 0.100 for naive RAG. The gated writer reached F1 0.98 on the rules path and proved critical under decoy load. The suite grew to 240+ tests, with pyright/ruff/pre-commit as gates.
What I own
Architecture, pipeline, benchmarks, training runs, verifier, and paper trail. The project is solo-built and deliberately documents what did not work: the Stentor-vs-minimal negative, the matched-budget v2 stress gap, and the encoder verifier collapse.
Limits
The headline recall result is a matched-budget benchmark, not a production memory guarantee. The research track is closed; the paper is in preprint. The v2 stress bench is a stress test, not the headline metric. The encryption-at-rest path exists but is not security-audited.