← All projects

Platform

·Built

Cairn

A zero-runtime continuity layer over git and files that stops long-horizon LLM work from forgetting or confabulating.

LLMTypeScriptCLIMCPGit
~80%context cut
30/30tests

Focus

LLM tooling

Cairn treats long-running AI work as a cache-coherence problem. It keeps a queryable index of entities, projects a small scoped “canon” into context, and tracks each fact’s status (live, superseded, undecided) as structural frontmatter, plus a semantic gate that runs an independent entailment check for the distortions structure alone can’t catch.

Highlights

  • Cut a real project’s resident context ~80% (≈16.6K → ≈3.3K tokens) while preserving recall
  • Supersession ledger so dead facts never resurface as live canon
  • Semantic gate validated on messy ~23K-token canon with an independent non-Claude judge
  • 30/30 test suite; ships as a library, CLI, and editor hook

The defect it fixes

Across a long session a model quietly forgets what it decided and confabulates over the gaps. Cairn makes memory structural: an INDEX you can query, a small CANON projection that fits in context, and explicit supersession so the model is shown what is still true rather than everything that was ever true.

Built with

TypeScriptGitCLIMCPSQLite
Source in a private repo