Agents that know your codebase, and when to stop.
That takes documentation that knows what it knows. AgentDoc compiles your docs into typed, evidence-backed Knowledge Objects that your agent queries over MCP. When it proposes an edit your docs disallow, it stops and cites the rule. A single Rust binary, MIT licensed, and everything stays on your machine.
$cargo install --path crates/adoc-cli --lockedYour agent read the wiki.
The wiki was wrong.
Coding agents rediscover your architecture every session. The real constraints live in senior engineers' heads and in a CLAUDE.md nobody has verified since spring. Prose can't tell an agent whether a claim is still true or who to ask before a risky change, so the agent guesses. Guesses ship.
Credits are deducted after generation completes.
- The agent can't tell whether this is still current, so it assumes it is.
- Nobody owns the paragraph, so a risky change has no reviewer to route to.
- A meeting note carries the same weight as the test suite.
- Without source references, the agent greps and hopes.
- Guidance that expired last quarter reads exactly like guidance written yesterday.
- Retrieval means scraping prose into the context window.
“Credits are decremented after generation completes successfully.”
- status: verified · expires_at enforced by adoc check
- owner: @platform-billing, so review routes itself
- evidence: source_code + test, typed and cited
- impacted objects known before the edit
- retrieved by Object ID over MCP
- patches machine-checked before apply
Write prose.
Fence the facts.
An .adoc file is ordinary readable prose, plus fenced, typed Knowledge Objects where the facts live. Fifteen kinds cover what teams actually know: decisions, constraints, warnings, procedures, open questions. adoc build compiles them into HTML for humans and graph and search artifacts for agents.
Agents do not follow prose.
They follow objects with owners,
evidence, and a lifecycle.
— AgentDoc thesis · local-first
Watch it cite.
Then watch it refuse.
Three live demos, all local, one binary: Claude Code citing and halting over MCP, plain-English search over your graph, and the versioned JSON artifacts behind both.
The edit your docs
disallow.
The local MCP gateway gives any agent the same typed answers the CLI gets. When a proposal breaks a documented rule, the agent finds out before the write, and it can cite the object that stopped it.
- Works with any MCP client that can launch a binary; 14 versioned tools over local stdio
- Every answer carries the object ID, its owner, and the evidence behind it
adoc_patch_checkproves a proposal before anything is written- Writes are off by default;
adoc_patch_applyrequires explicit project opt-in
Ask in plain English,
get typed answers.
adoc search retrieves typed Knowledge Objects from local artifacts using lexical, semantic, hybrid, filtered, or graph-scoped queries.
- Hybrid BM25 and local embeddings out of the box; it never needs an API key or a network connection
- Filter by kind, status, or owner, then narrow along graph relations
- Every hit carries its lifecycle, ownership, and evidence
adoc why <id>takes you from a claim to its source in one command
Agents read artifacts,
not scraped prose.
The graph artifact is the canonical local read model. Retrieval commands load it directly, with an optional search sidecar for local lexical, semantic, and hybrid search.
adoc buildemits docs.html, docs.graph.json, and docs.search.json- Envelopes are versioned, so scripts can depend on them safely
stale,contradictions, andimpacted-byrun as CI gates--format markdowndrops reports straight into PR comments
Silent drift becomes
a failing check.
Nothing below is roadmap. This is what the compiler, the MCP gateway, and the GitHub Action enforce today.
.adoc is plaintext.Local-first today.
Governed knowledge, eventually.
Everything above this line ships today and stays open source; the standalone tools will never be degraded to push an upgrade. What follows is where AgentDoc is heading. It is a design, not a commitment, and none of it is implemented yet.
Teach it once.
Every agent remembers.
Install the CLI, run adoc init, and compile your first Knowledge Object in minutes. Then point any MCP agent at the gateway and watch it start citing. Everything runs locally, and your docs never leave the repo.