// 01 > CONTEXT
Coherence runs as Claude Code hooks and slash commands. It watches for code changing without its docs and proposes patches, with every team-distributable surface living as committed files and no backend, ever.
// 02 > THE_PROBLEM
Documentation drifts silently: code changes, the docs that describe it do not, and the gap is only found when someone is misled by it.
Naively asking an LLM to fix the docs is unsafe: it hallucinates, rewrites too much, and can be steered by injected text. There was no trustworthy way to let an agent touch documentation unsupervised.
Before
Docs drift unnoticed · risky blind LLM edits · no safe auto-apply
// 03 > APPROACH
I split the work into a two-stage pipeline with deterministic validation between the model and the filesystem, and gated auto-apply behind a per-developer trust ledger.
Two-stage pipeline
Stage 1 selects the canonical source; Stage 2 writes a patch that must pass format, apply, change-class, line-ratio, injection, hallucination, and asserts checks.
Graduated trust gate
Auto-applies only above a 0.85 trust score, decayed on a 30-day half-life, and never for destructive or frontmatter changes.
// 04 > THE_RESULT
An agent can keep docs in sync safely, with eight validation engines and cosign-signed releases standing between the model and your repo.
Before
- Drift caught by humans, late
- Blind LLM edits, no guardrails
- No verifiable releases
After
- Drift detected automatically
- 8-engine deterministic validation
- Keyless cosign-signed, Rekor-verifiable
“I won't let a model write to a repo on trust alone. Every patch has to survive deterministic checks before it ever lands.”