I made stale coding-agent context fail CI instead of failing silently
A coding agent with no context usually hesitates, searches, or asks a question. A coding agent with stale context can be much more confident. That is the dangerous case. The file still exists. The instructions look deliberate. The generated JSON is valid. The agent follows it exactly — into a package that stopped owning the feature two weeks ago. Nothing looks broken until the edit is already in the wrong place. I wanted repository context to have an expiration signal that CI could verify, not a date someone had to remember to check. The failure is not missing documentation Imagine a monorepo where packages/auth owns token validation. The repository publishes a machine-readable handoff: { "startHere" : "docs/for-agents/packages/auth.md" , "editRoots" : [ "packages/auth" ], "checks" : [ "pnpm --filter @example/auth test" ] } Later, token validation moves to packages/security . A maintainer updates the source documentation but forgets to regenerate the handoff index. There are now two internally consistent answers in the same repository: the source documentation says packages/security ; the generated agent context still says packages/auth . The old answer is not malformed. That is precisely why it is risky. I reproduced the drift with one edit I tested this against the public fixture in Doc Bridge , using version 1.2.6. The first index and freshness check passed: Index is fresh expected: 359355e5... actual: 359355e5... Then I changed one agent-facing source document: - Package: packages/os-core - Layer: L1 + +Token validation now belongs to packages/security. I did not touch the generated index. The next check returned exit code 1: ak-docs gate run index-freshness Index is stale. Run: ak-docs index expected: b099695d... actual: 359355e5... After I ran ak-docs index , reviewed the generated change, and ran the gate again, both hashes matched and the check passed. The hashes are not trying to prove that the documentation is true. No checksum can do that. They prove a na