A project is coherent to the degree that it can furnish any actor, human or model, with the minimal context sufficient to act in line with intent, and can mechanically detect when it has drifted.
Models are intelligent but context-starved, and the failure mode of context starvation is incoherence: sessions rediscover the same facts expensively, and codebases drift as hundreds of locally-reasonable changes accumulate with no shared frame. Cohere makes coherence a measurable property of the project instead of a hoped-for behavior of the agent.
No LLM calls. Zero runtime dependencies. Everything is deterministic and CI-runnable; models consume the outputs but are never required to produce them.
Three documents, checked as hard as their nature allows
- The map. The actual shape of your system, derived from the compiled application. Regenerated on demand so it cannot lie.
- Intent cards. One small authored file per context holding only what cannot be derived: purpose, invariants, decisions with their rejected alternatives. Each card is hash-bound to the code's public surface, so drift fails the build.
- Design docs. One authored file per design. Drafts are work in flight; accepted designs are immutable, dated history whose promises were mechanically verified.
The rule underneath all three: derived or checked, nothing else. Unbound prose is future lies.
Quickstart
# mix.exs: dev/test only; consumers inherit nothing
{:cohere, "~> 0.1", only: [:dev, :test]}
$ mix cohere.init # scaffold cohere/, derive the first map,
# land the loop's instructions in AGENTS.md
$ mix cohere # where does this project stand?
The loop
Three verbs run the loop. The other tasks are plumbing, and check points to them when they're needed. Walk it end to end.
$ mix cohere.design deal-reversals --contexts deals # START
... design in the doc, against its ground ...
$ mix cohere.check # CHECK: anytime; fix, repeat
... build ...
$ mix cohere.complete deal-reversals # COMPLETE: when check is quiet
mix cohere.check runs identically in CI and exits 1 on hard drift:
a stale map, a drifted card, a dead reference. The failure mode this
tool exists to kill is the silent kind.
Reading on
The coherence ladder places all of this on five incremental levels, each useful alone. Work packets are the payoff: context delivered to an agent, not discovered by one. And cohere on cohere shows the tool run on this very repository, live.