Docs your agents can act on

Turn repo docs into executable handoffs.

doc-bridge gives every coding agent the same contract: startHere, editRoots, checks, and humanDoc. Then it turns agent memory back into reviewable documentation drafts. Use it from CLI, MCP, and CI. No LLM or API key required.

doc-bridge maps human docs into structured agent handoffs for CLI, MCP, and CI
# Before — agent guesses
✗ edits packages/billing when task says "auth"
✗ runs repo-wide test instead of package checks

$ npx ak-docs demo --text

# After — handoff.resolve
✓ target: auth (packages/auth)
✓ edit: packages/auth
✓ checks: pnpm --filter @demo/auth test
✓ human guide: /docs/guides/auth
Gate: red → green
$ npm i -D @agentskit/doc-bridge
$ npx ak-docs init && npx ak-docs index
$ ak-docs mcp install --cursor
$ ak-docs doctor --text

Score: 82/100 (B)
Agent docs: 8/10 (80% handoff-ready)
Human guides: 6/10 (60% bridged)
Gates: 3/3 passing

→ ak-docs query package auth --agent

Measured context efficiency

Estimated · historical benchmark

Anonymized dogfooding estimated up to 99% less context payload between the scanned repository corpus and the P95 agent payload. This is not a provider-token measurement.

Estimated context payload reduction from 100 percent of the repository corpus to 1 percent of the agent context payload
99%less context payload
1%estimated P95 payload

Doc Bridge 1.7.20 · estimated payload reduction, not a guaranteed token reduction or correctness result.

Controlled A/B signal

Operational · 46 token-complete pairs

Across 96 anonymized executions, the deterministic workflow showed fewer paired provider token-equivalent units, lower P95 latency, and higher operational completion. A bounded adjudicator found no semantic successes in either arm, so this remains an inconclusive directional signal.

Controlled A/B comparison showing 18.46 percent fewer paired provider token-equivalent units, 39.75 seconds lower P95 latency, and 12.5 percentage points more operationally completed executions
−18.46%token-equivalent units
−39.75 sP95 latency

Read the methodology and anonymized data.

Find the gap between docs and reality.

Doc Bridge compares declared documentation and ownership with the observed project graph, then keeps every finding tied to evidence and a reviewable action.

Anonymized finding
CONTRADICTION · high confidence
Documentation declaration differs from the observed project relation
Evidence: 4 source files + 1 documentation declaration
Action: review ownership and update the canonical document

What the deterministic audit can show

CoverageMissing package or ownership documentation
FreshnessStale declared relations and generated-document boundaries
QualityTitles, examples, required sections, metadata, and exact duplicates
LimitsNatural-language correctness and semantic redundancy remain review work

Use it where agents already work

One index, multiple surfaces. Start with the CLI; wire MCP and CI when the first handoff is useful.

doc-bridge index used through CLI, MCP, CI, and documentation adapters
SurfaceWhat it doesHow you use it
CLIQuery ownership, inspect handoffs, run doctor, search docs.ak-docs query package auth --agent
MCPLets Cursor, Claude Code, and Codex-style agents resolve before editing.ak-docs mcp install --cursor
CIBlocks stale indexes and broken human-doc bridges.ak-docs index && ak-docs gate run
AdaptersConnect Fumadocs, Docusaurus, VitePress, Starlight, Nextra, plain markdown, and pnpm workspaces.fumadocs · docusaurus · vitepress · starlight · nextra · plain-markdown
Memory pipelineClassifies local agent memory and drafts documentation updates.ak-docs memory promote --pr
Optional RAG/chatAdds handoff-first chat when you install AgentsKit peers.ak-docs rag ingest && ak-docs chat

Four loops, one bridge

Act, bridge, learn, explain — each loop has a CLI command and real output, not a concept table.

doc-bridge connects human docs to coding agents and agent memory back to draft docs
Act

Handoff routing

query --agent · MCP handoff.resolve

Bridge

Human ↔ agent

bootstrap agent-docs · bridge.humanDoc

Learn

Agent memory → docs

memory classify · promote --pr

Explain

Local consult

ask · optional provider-backed review

Public dogfood surfaces

Open AgentsKit surfaces used for validation — not independent customer or private-monorepo claims.

npm version no api key handoff coverage CI

Help make repository knowledge verifiable.

Reproduce the anonymized study, add an analyzer, contribute a documentation rule, or create a fixture for a stale relation or structured contradiction.

Reproduce the study Contribute

CI on every PR

Stale handoffs fail the build — same gate locally and in GitHub Actions.

# .github/workflows/pr.yml
- uses: AgentsKit-io/doc-bridge@ee756a13c006c597445c31e2643c1e8cece715d7 # v1.7.45
  with:
    config-path: doc-bridge.config.json