
Doc Bridge
io.github.AgentsKit-io由 GitHub 帳號 AgentsKit-io 發布v2.4.0更新於 Oct 24, 2026
Resolve documentation ownership, edit roots, checks, and human handoffs before an agent edits code.
概覽
本機 MCP 伺服器,為編碼代理提供儲存庫文件交接資訊:從哪裡開始讀、可以修改哪些路徑、用哪些檢查驗證變更。
- 可以做什麼
- 解析某個套件或主題的交接資訊:起始文件、可編輯根目錄、檢查指令與對應的人類文件
- 搜尋並讀取已建立索引的儲存庫文件,查看閘門狀態
- 查詢已索引的決策、概念依據,以及某個路徑或符號為何變更
- 在專案的 .doc-bridge 目錄下儲存審查產物,並記錄補充資訊的核准或拒絕決定
- 索引 Fumadocs、Docusaurus、VitePress、Starlight、Nextra 或純 Markdown 文件,並支援 pnpm 與 Nx 單一儲存庫路由
- 適用情境
- 適用於代理在大型或單一儲存庫專案中工作、容易猜錯歸屬、改錯套件或跑錯測試的情況。它設計成在編輯前查詢,讓代理與團隊的人類文件從同一份帶證據的路由約定出發。
- 執行需求
- 以本機 stdio 程序執行,來自 npm 套件 @agentskit/doc-bridge,需要 Node.js 22 或更新版本。儲存庫需有 doc-bridge.config.json 定義可讀取的專案邊界,並用 ak-docs 命令列工具產生索引。核心功能不需要 API 金鑰或帳號。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Doc Bridge,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
doc-bridge
[npm] [CI] [Pages] [OpenSSF Best Practices] [License: MIT] [Node] [TypeScript]
npm: @agentskit/doc-bridge · CLI: ak-docs · Landing: agentskit-io.github.io/doc-bridge
Topics: ai-agents · documentation · developer-experience · mcp · llms-txt · typescript
Compatibility: node >=22 · TypeScript 5.8+ · pnpm, npm, or yarn consumers
Deterministic proof of documentation drift, with evidence-linked handoffs for coding agents.
Turn your docs into executable handoffs: doc-bridge reads your repo docs, ownership map, and human documentation site, then gives humans and agents the same evidence-linked starting point:
- where to start reading
- which files/packages it may edit
- which checks prove the change
- which human docs explain the feature
The core works without any LLM or API key; the documentation portal dogfoods AgentsKit Chat as an optional surface over that deterministic layer.
[doc-bridge maps human docs into structured agent handoffs]
Built for agent-scale repositories
Doc Bridge turns large repository structure and documentation into compact, evidence-linked context that humans and coding agents can query instead of repeatedly traversing the full repository.
Historical context-payload estimate
An earlier anonymized dogfooding cycle estimated up to 99% less serialized context payload. This is a historical payload estimate—not a guarantee of provider-token savings, answer quality, or semantic correctness. It is not the same measure as provider-token usage.
[Estimated context payload reduction]
Historical controlled A/B signal
The published controlled study with 96 anonymized executions reported a directional operational signal of:
- 18.46% fewer paired provider token-equivalent units across 46 token-complete pairs;
- 39.75 seconds lower P95 latency;
- 87.5% operationally completed executions vs. 75.0% with repository-only context.
These are historical, separately defined measures: the 99% figure is an estimated context-payload reduction, while the 18.46% figure uses provider-token-equivalent data from 46 paired observations. The bounded adjudicator recorded zero adjudicator-success outcomes in both arms; because that adjudicator is mechanical and does not independently judge semantic correctness, this result is directional and inconclusive. A newer local pilot is intentionally not promoted here while its semantic evaluation and publication review remain incomplete. See the full methodology and anonymized data. The separate Layer-1 benchmark results measure deterministic documentation findings with native and fixture scores reported separately.
Why teams use it
Agents are powerful, but most repo docs are written for humans. The result is familiar: the agent guesses ownership, edits the sibling package, runs the wrong test, or ignores the human guide that already explained the rule.
doc-bridge works in both directions:
[doc-bridge connects human docs to coding agents and agent memory back to draft docs]
The handoff is a routing contract:
Workflow runs may carry the same optional correlation envelope used by the
AgentsKit runtime and Chat protocol. operationId is the cross-repository
identity; runId, sessionId, turnId, actionId, and traceId retain local
meaning. It is bounded metadata only and must not contain prompts, secrets, or
document content.
That contract works from the terminal, MCP, CI, and optional RAG/chat.
Documentation quality and reconciliation
Discovery is only the first step. ak-docs audit documentation compares declared documentation and ownership with the observed project graph and reports evidence-backed findings for missing coverage, stale relations, structured contradictions, exact duplicates, missing examples, and incomplete maintenance metadata.
Natural-language correctness, unnecessary prose, and semantic redundancy remain explicitly not-analyzed until a configured agent or human review evaluates them. Proposed changes stay reviewable and human-approved.
Verify documentation divergence
Compare revision snapshots deterministically: inspect symbol, CLI, configuration
and signature changes, historical references and remaining head citations.
Broken references require removal evidence; ambiguity and unsupported extraction
stay explicit. Changed references require review. Default policy routes findings
separately from their evidence status; use --no-policy to inspect raw diagnostics.
From a built checkout, this runnable comparison snapshots a temporary copy of
the signature fixture before and after removing a cited export. Use an installed
ak-docs, or replace it with node /path/to/checkout/bin/ak-docs.js from a built
checkout. The Node step extracts the raw snapshot from the discovery response:
Capture each revision independently for a real delta. See diff and findings and Action advisory mode for bounded PR reports. Reports never approve documentation corrections.
2.0 workflows
- Vault: opt-in Obsidian discovery reads wikilinks, aliases and tags;
ak-docs vault exportgenerates ignored navigation notes andvault diffturns edited generated notes into pending proposals. Vault guide. - Rationale: enable
index.knowledgeEntities.enabled, index decisions/concepts/changes, then runak-docs why <path|symbol|concept>. MCP exposesknowledge.decision,knowledge.conceptandknowledge.whyChanged. Evidence is observed rationale, not inferred causality. Knowledge query contract. - Remediation: optional
ak-docs fix --llmuses scripted fake-provider responses in the key-free guide; real providers use explicit intelligence configuration. Proposals require deterministic rechecking and human review. - Advisory:
CHANGED_REFERENCEconcerns a claim about the changed aspect; bare mentions do not trigger it. Unknown syntax remains review-required uncertainty. Action advisory. - Upgrade: follow the 1.x → 2.0 migration guide. This package ships no Studio UI; use the deterministic StudioGraphV1 export to visualize the graph with other tools.
The latest Layer-1 benchmark and method report native findings at 100% precision (15 TP, 0 FP, 0 FN), historical changed-reference findings at 83.3% precision (10 TP, 2 FP, 0 FN), and 6.25% false-positive rate on historical negative cases (2/32). These purposive controls measure different denominators; they do not establish general semantic accuracy or release readiness.
60-second proof
This README owns the one-command proof; the Getting started guide owns the complete repository setup and first-index workflow.
No config, no docs to read first. Output shows before/after, a real handoff, gate red→green, and the MCP snippet:
Verify the real handoff path
This checked example runs the bundled demo through the public CLI. The
repository's scripts/check-readme-standard.mjs gate compares this block byte-for-byte
with the executable fixture; .github/workflows/ci.yml runs that gate and its
executable tests on every pull request.
The study figures below are not recomputed by the README gate; their protocol, privacy checks, and limitations are documented in the linked study artifacts.
For the complete repository setup, follow the Getting started guide.
Using Cline? Follow the deterministic llms-install.md setup. It runs the pinned MCP server through pnpm dlx without adding Doc Bridge to your repository dependencies.
What ships
See the surface map for a visual overview of the CLI, MCP, CI, and adapter surfaces.
See Getting started, MCP, Examples, and Why doc-bridge.
Cursor plugin
This repository also contains a Cursor plugin that pairs the Doc Bridge MCP server (read-only except for the explicit proposal tool) with a handoff skill. It resolves startHere, readBeforeEditing, editRoots, and checks before Cursor edits a routed repository. The plugin does not request credentials. Its MCP tools are read-only except docbridge.proposals, which can save a review artifact under .doc-bridge/ and record enrichment approve/reject decisions; no MCP tool edits documentation or source files or applies remediations.
GitHub Copilot plugin
The root Agent Plugins manifest exposes the same portable handoff skill and MCP server to GitHub Copilot CLI. Copilot discovers skills/ and .mcp.json from the standard plugin layout, so the integration stays source-owned instead of copying prompts into another repository.
Portable Agent Skill
skills/doc-bridge-handoff packages the same fail-closed routing contract in the open Agent Skills layout for OpenClaw-compatible clients, Hermes Agent, Pi, Cursor, and other runtimes that can execute a local skill script. The skill prefers the read-only MCP tool and falls back to a pinned, zero-credential CLI resolver. It never edits files, runs returned checks, or grants authority outside editRoots.
Install the published skill from ClawHub:
Pi users can install the same source-owned skill through the npm package:
Claude Desktop MCP Bundle
Doc Bridge can be packaged as a local MCP Bundle for Claude Desktop. The bundle advertises 14 MCP tools, exercises 8 of them in its smoke test, and marks every tool except docbridge.proposals read-only. It asks the user to select the repository's doc-bridge.config.json; that file defines the project boundary Doc Bridge may read.
From a clean checkout:
The command builds Doc Bridge, creates a production-only staging directory, validates the MCPB manifest, packs the extension, checks its file inventory, and writes the local artifact under .mcpb-output/. Generated bundles and staging directories are intentionally excluded from Git.
The current packaged compatibility declaration is macOS-only; this project does not claim bundle support for other operating systems until the exact artifact passes an independent installation test there.
Why this exists
doc-bridge ships AgentHandoff JSON:
When a human guide is missing, handoffs surface it as a feature:
Five loops (with real commands)
Coverage your team checks daily
The following is illustrative output from the command, not a measurement of this repository. Run the command locally or in CI for current values.
Agent uses it alone
- MCP auto-wire:
ak-docs mcp install --cursor - Skill/rule: paste docs/skills/doc-bridge.md into Cursor rules — agents call
handoff.resolvebefore editingpackages/* - Handoff is the next step:
startHere,checks, andbridgeare in the JSON/MCP response
CI as first-class citizen
Reuse the bundled GitHub Action on every PR:
Follow the canonical Gate and CI guide, which includes the complete workflow and pins the published Action release.
The Action installs the exact configured package (or the workspace package when dogfooding this repository), then verifies the committed index and configured gates without silently rebuilding them. It rejects non-exact package versions. See the Marketplace guide.
The guide is pinned to the published stable Action release v1.7.45; the
checked-in package version is 2.6.0.
Coverage is repository-specific. Run ak-docs doctor --badge locally to emit
current handoff and human-bridge badges, or pnpm coverage:badge in CI; this
README intentionally avoids publishing a stale static percentage.
For this repository, generate the ignored index before local checks:
Never commit this repository's .doc-bridge/index.json. CI builds it twice and
compares artifact bytes, then checks reproducibility and documentation conformance.
This verifies deterministic generation, not committed-index freshness. Consumer
repositories using the Action still verify their committed index before rebuilding.
Product surface
Core — always (no LLM)
Optional AgentsKit peers
See docs/chat-and-rag.md.
AgentsKit ecosystem
Who uses it (public)
Designed for and dogfooded on open AgentsKit surfaces:
Playbook pattern: docs/playbook/doc-bridge-pattern.md — export with ak-docs playbook pattern --text
Configuration examples
Contract: docs/spec/config-v1.md · CLI: docs/spec/cli.md · MCP: docs/mcp.md · Skill: docs/skills/doc-bridge.md · Pattern: docs/playbook/doc-bridge-pattern.md · Recipes: docs/recipes/index-pipeline.md
Learn loop — memory → draft PR
Status
Published npm package: v1.7.45 stable. The working-tree package version is
1.8.0 and is not published yet. The Action example below intentionally pins
the latest published stable release; the release workflow updates the package
and Action version together when a new release is published.
The published package provides portable, fail-closed handoffs through the CLI, MCP server, CI action, and packaged skill; deterministic Documentation Standard v1 conformance; verified release provenance; and documentation-quality audit tooling.
Landing: https://doc-bridge.agentskit.io/
Privacy Policy
The local MCP server reads only the project selected through doc-bridge.config.json. It does not require an API key, send project data to AgentsKit, or collect telemetry. Its MCP tools are read-only except docbridge.proposals, which can save a review artifact under .doc-bridge/ and record enrichment approve/reject decisions; no MCP tool edits documentation or source files or applies remediations. See the complete Privacy Policy for accessed paths, use, storage, sharing, retention, optional integrations, and contact information.
Contributing
Issues and PRs are welcome. Start here:
To improve the evidence base, reproduce the anonymized study, add a language or framework analyzer, contribute a documentation-quality rule, or add a fixture for a real contradiction or stale relation.
License
Upgrading to 2.0
See the 1.x to 2.0 migration guide for region remediation, explicit index regeneration and configurable memory paths.
來源:README.md,提交 bc83c40
工具
0版本歷史
3- v2.4.0最新Oct 23, 2026
- v2.0.0Oct 13, 2026
- v1.2.6Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分