A docs tree collects three kinds of files: things you built, things youpromised, and things you merely collected — competitor notes, vendor docs, old ideas. To an agent grepping the tree, all three look identical.
Three files. Same name, same confident prose. Nothing on any of them says which one is real.
The repo this was built for had 301 files. 208 were competitor notes. Nothing marked them. That is not messy — that is a machine for building the wrong thing.
---kind:mechanismmove:1 of 3---
Move 1 — shelve files by trust, not by topic
Folders answer one question: how much weight should a reader give this file? Moving a file up a shelf is one git mv.
---kind:mechanismmove:2 of 3---
Move 2 — every file wears a badge
Like the label on a medicine bottle: the pills all look alike — the label is what keeps you safe. Five statuses, machine-readable, checked on every push.
---kind:mechanismmove:3 of 3---
Move 3 — one map instead of a blind grep
“Is feature X built?” stops being a treasure hunt. One generated map, cheap enough to read whole, with every file's badge in it.
---kind:gatestatus:active---
And a gate that keeps it true
Structure nobody checks is a suggestion. The gate blocks the push until the tree tells the truth again — and it only ever fires on a real defect.
What it looks like from the terminal:
$ npx ai-doc-system check
docs/reference/crm/pipelines.md:status — is "active" but everything
under docs/reference/ is status: referencecheck-docs FAILED — 1 violation(s).$ npx ai-doc-system check # after the fixcheck-docs: OK
Deliberately not checked: document age, prose style, dates versus git. Those go to a non-blocking advisory report — a gate that cries wolf gets bypassed.
---kind:lifecycle---
Ideas earn their way to shipped
Borrowed ideas stay quarantined until someone promotes them on purpose — and rewrites them to describe your product, not the place they came from.
---kind:proofverified_on:2026-08-27---
It eats its own cooking
The gate runs on its own repository, in CI, on every push. On its first self-hosted run it caught a dead pointer in one of its own comments.
301 docs migrated, history intact
92 tests on real git fixtures
3 operating systems in CI
1 dependency
---kind:installstatus:shipped---
Install it, then stop thinking about it
As an agent skill — the full treatment
Your agent surveys the tree, proposes the moves, stamps every badge, and wires the gate in. The skill encodes the judgement calls, not just the mechanics.
# in Claude Code:> /plugin marketplace add magnifito/ai-doc-system
> /plugin install ai-doc-system@magnifito
# then, in your repository:> set up the documentation system in this repo