@agentskit/doc-bridge 1.7.44 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/CHANGELOG.md +471 -0
  2. package/CONTRIBUTING.md +29 -4
  3. package/README.md +87 -40
  4. package/SECURITY.md +7 -0
  5. package/action.yml +1 -1
  6. package/bin/ak-docs.js +2 -2
  7. package/bin/ak-verify.js +13 -7
  8. package/dist/cli/program.d.ts +3 -1
  9. package/dist/cli/program.js +15888 -6061
  10. package/dist/cli/program.js.map +1 -1
  11. package/dist/config/index.d.ts +1 -1
  12. package/dist/config/index.js +91 -9
  13. package/dist/config/index.js.map +1 -1
  14. package/dist/index-Beor6Yhi.d.ts +792 -0
  15. package/dist/index.d.ts +9979 -3257
  16. package/dist/index.js +15954 -5774
  17. package/dist/index.js.map +1 -1
  18. package/docs/MARKETPLACE.md +1 -1
  19. package/docs/PRD-documentation-efficiency-study.md +406 -0
  20. package/docs/PRD-knowledge-retrieval-and-enrichment.md +466 -0
  21. package/docs/RELEASE.md +22 -8
  22. package/docs/adr/0002-documentation-audit-boundary.md +22 -0
  23. package/docs/adr/0003-study-protocol-and-historical-evidence.md +40 -0
  24. package/docs/adr/0004-controlled-study-runner.md +25 -0
  25. package/docs/adr/0005-documentation-quality-and-criticality.md +20 -0
  26. package/docs/adr/0006-registry-semantic-grounding.md +20 -0
  27. package/docs/adr/0007-longitudinal-study-metrics.md +21 -0
  28. package/docs/adr/0008-study-verification-boundary.md +21 -0
  29. package/docs/adr/0009-study-provider-cli-adapter.md +25 -0
  30. package/docs/agent-corpus/INDEX.md +14 -3
  31. package/docs/agent-corpus/OVERVIEW.md +25 -0
  32. package/docs/agent-corpus/chat.md +7 -3
  33. package/docs/agent-corpus/cli.md +18 -2
  34. package/docs/agent-corpus/conformance.md +14 -2
  35. package/docs/agent-corpus/doc-bridge.md +48 -1
  36. package/docs/agent-corpus/doctor.md +10 -2
  37. package/docs/agent-corpus/gates.md +6 -2
  38. package/docs/agent-corpus/mcp.md +15 -2
  39. package/docs/agent-corpus/memory.md +6 -2
  40. package/docs/agent-corpus/query.md +35 -2
  41. package/docs/bench/README.md +122 -0
  42. package/docs/bench/retrieval-baseline-v1.json +28 -0
  43. package/docs/bench/retrieval-suite-v1.json +1033 -0
  44. package/docs/chat-and-rag.md +3 -2
  45. package/docs/for-agents.md +9 -1
  46. package/docs/getting-started.md +4 -11
  47. package/docs/guides/gate-ci.md +11 -1
  48. package/docs/guides/install-and-run.md +9 -65
  49. package/docs/index.md +22 -1
  50. package/docs/knowledge-engine-runbook.md +51 -4
  51. package/docs/landing/assets/context-payload-reduction.svg +21 -0
  52. package/docs/landing/assets/controlled-ab-comparison.svg +30 -0
  53. package/docs/landing/index.html +119 -5
  54. package/docs/loop-workflow.md +117 -0
  55. package/docs/mcp.md +6 -1
  56. package/docs/parity/public-claims-v1.json +145 -0
  57. package/docs/playbook/doc-bridge-pattern.md +1 -1
  58. package/docs/query.md +90 -2
  59. package/docs/recipes/index-pipeline.md +1 -1
  60. package/docs/schemas/agent-handoff-v1.md +15 -0
  61. package/docs/schemas/doc-bridge-index-v1.md +65 -0
  62. package/docs/spec/benchmark-v1.md +39 -1
  63. package/docs/spec/cli.md +30 -10
  64. package/docs/spec/config-v1.md +192 -8
  65. package/docs/spec/documentation-audit-v1.md +61 -0
  66. package/docs/spec/enrichment-overlay-v1.md +241 -0
  67. package/docs/spec/graph-signals-v1.md +92 -0
  68. package/docs/spec/incremental-scan-v1.md +102 -0
  69. package/docs/spec/markdown-analyzer-v1.md +73 -0
  70. package/docs/spec/mcp-knowledge-tools-v1.md +147 -0
  71. package/docs/spec/measured-enrichment-v1.md +229 -0
  72. package/docs/spec/public-parity-v1.md +119 -0
  73. package/docs/spec/registry-agents.md +6 -0
  74. package/docs/spec/render-v1.md +122 -0
  75. package/docs/spec/retrieval-index-v1.md +164 -0
  76. package/docs/spec/study-metrics-v1.md +58 -0
  77. package/docs/spec/study-protocol-v1.md +46 -0
  78. package/docs/spec/study-provider-cli-v1.md +116 -0
  79. package/docs/spec/study-runner-v1.md +35 -0
  80. package/docs/spec/study-task-suite-v1.md +41 -0
  81. package/docs/spec/study-verification-v1.md +40 -0
  82. package/docs/study/README.md +84 -0
  83. package/docs/study/ab-adjudicated-cost-analysis-v1.md +29 -0
  84. package/docs/study/ab-adjudicated-cost-plan-v1.json +33 -0
  85. package/docs/study/ab-adjudicated-cost-plan-v2-v1.json +33 -0
  86. package/docs/study/ab-adjudicated-cost-result-v1.json +80 -0
  87. package/docs/study/ab-baseline-analysis-v1.md +21 -0
  88. package/docs/study/ab-baseline-plan-v1.json +33 -0
  89. package/docs/study/ab-baseline-recovery-plan-v1.json +33 -0
  90. package/docs/study/ab-baseline-result-v1.json +79 -0
  91. package/docs/study/documentation-audit-round-2026-08-31.json +183 -0
  92. package/docs/study/historical-evidence-v1.json +252 -0
  93. package/docs/study/observation-ledger-v1.json +30632 -0
  94. package/docs/study/phase3-task-coverage-v1.json +34 -0
  95. package/docs/study/phase4-public-pilot-ledger-v1.json +1344 -0
  96. package/docs/study/phase4-public-pilot-result-v1.json +52 -0
  97. package/docs/study/phase4-public-pilot-run-plan-v1.json +26 -0
  98. package/docs/study/phase4-public-pilot-task-suite-v1.json +71 -0
  99. package/docs/study/pilot-round-2026-08-31.json +46 -0
  100. package/docs/study/protocol-v1.json +90 -0
  101. package/docs/study/publication-gate-v1.md +45 -0
  102. package/docs/study/quality-scorecard-cycle-plan.md +545 -0
  103. package/docs/study/quality-scorecard-v1.json +38 -0
  104. package/docs/study/round-1-adjudicated-smoke-v1.json +30642 -0
  105. package/docs/study/round-1-instrumentation-plan-v1.md +39 -0
  106. package/docs/study/round-2-expanded-adjudication-v1.json +91 -0
  107. package/docs/study/round-2-expanded-validation-v1.md +58 -0
  108. package/docs/study/round-3-evidence-contract-v1.json +75 -0
  109. package/docs/study/round-3-evidence-contract-v1.md +57 -0
  110. package/docs/study/round-4-confirmation-v1.json +75 -0
  111. package/docs/study/round-4-confirmation-v1.md +55 -0
  112. package/docs/study/run-plan-v1.json +33 -0
  113. package/docs/study/semantic-adjudication-cycle-8.md +20 -0
  114. package/docs/study/task-suite-v1.json +96 -0
  115. package/docs/study/token-efficiency-plan-v1.md +337 -0
  116. package/docs/study/token-efficiency-protocol-v2.json +62 -0
  117. package/docs/study/verification-binding-v1.json +27 -0
  118. package/docs/validation-cycle-plan.md +33 -0
  119. package/docs/verification-harness.md +15 -6
  120. package/ecosystem-claims.json +2 -2
  121. package/ecosystem-upstream.json +2 -2
  122. package/ecosystem.json +4 -4
  123. package/mcpb/manifest.json +9 -1
  124. package/package.json +89 -72
  125. package/scripts/check-ecosystem-upstream.mjs +36 -7
  126. package/scripts/report-visual-check.mjs +20 -3
  127. package/skills/doc-bridge-handoff/fixtures/synthetic-repo/docs/for-agents/packages/payments.md +7 -0
  128. package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
  129. package/src/agents/registry-adapter.ts +192 -24
  130. package/src/audit/documentation.ts +513 -0
  131. package/src/bench/baseline.ts +198 -0
  132. package/src/bench/overlay-delta.ts +139 -0
  133. package/src/bench/retrieval.ts +319 -0
  134. package/src/budget/compile.ts +91 -0
  135. package/src/budget/sections.ts +70 -0
  136. package/src/cli/demo.ts +2 -2
  137. package/src/cli/program.ts +699 -79
  138. package/src/cli/usage.ts +71 -0
  139. package/src/config/defaults.ts +1 -0
  140. package/src/config/index.ts +4 -0
  141. package/src/config/load-config.ts +7 -1
  142. package/src/config/schema.ts +121 -4
  143. package/src/conformance/documentation-standard-v1.ts +22 -14
  144. package/src/discovery/areas.ts +182 -0
  145. package/src/discovery/documentation.ts +255 -23
  146. package/src/discovery/identity.ts +24 -0
  147. package/src/discovery/incremental.ts +314 -0
  148. package/src/discovery/inputs.ts +110 -0
  149. package/src/discovery/markdown.ts +481 -0
  150. package/src/discovery/repository.ts +557 -125
  151. package/src/doctor/run-doctor.ts +246 -27
  152. package/src/enrich/approvals.ts +190 -0
  153. package/src/enrich/cache.ts +93 -0
  154. package/src/enrich/context-pack.ts +272 -0
  155. package/src/enrich/overlay.ts +255 -0
  156. package/src/enrich/review.ts +106 -0
  157. package/src/enrich/stage.ts +374 -0
  158. package/src/enrich/stats.ts +100 -0
  159. package/src/enrich/validate.ts +410 -0
  160. package/src/federation/llms.ts +74 -24
  161. package/src/findings/report.ts +103 -0
  162. package/src/fixes/proposals.ts +4 -3
  163. package/src/graph/build.ts +356 -0
  164. package/src/graph/memory.ts +208 -0
  165. package/src/index-builder/build-handoffs.ts +22 -11
  166. package/src/index-builder/build-index.ts +132 -3
  167. package/src/index-builder/human-adapters/fumadocs.ts +1 -1
  168. package/src/index-builder/llms-txt.ts +48 -8
  169. package/src/index-builder/project-corpus.ts +111 -0
  170. package/src/index-builder/watch-index.ts +1 -1
  171. package/src/index.ts +630 -2
  172. package/src/lib/bounded-text.ts +15 -10
  173. package/src/lib/fuzzy-match.ts +235 -0
  174. package/src/mcp/knowledge.ts +554 -0
  175. package/src/mcp/server.ts +113 -18
  176. package/src/metrics/benchmark.ts +21 -0
  177. package/src/parity/check.ts +309 -0
  178. package/src/parity/claims.ts +259 -0
  179. package/src/parity/resolve.ts +160 -0
  180. package/src/query/handoff.ts +326 -0
  181. package/src/query/load-index.ts +53 -1
  182. package/src/query/query.ts +92 -59
  183. package/src/query/search.ts +289 -92
  184. package/src/query/text.ts +155 -0
  185. package/src/reconciliation/reconcile.ts +148 -15
  186. package/src/render/data.ts +356 -0
  187. package/src/render/engine.ts +398 -0
  188. package/src/render/generated.ts +77 -0
  189. package/src/render/render.ts +209 -0
  190. package/src/render/template-source.ts +52 -0
  191. package/src/render/templates.ts +289 -0
  192. package/src/report/html.ts +23 -17
  193. package/src/retrieval/bm25.ts +161 -0
  194. package/src/retrieval/project.ts +495 -0
  195. package/src/retrieval/rank.ts +383 -0
  196. package/src/retrieval/weights.ts +39 -0
  197. package/src/retriever/doc-bridge-retriever.ts +100 -15
  198. package/src/rules/engine.ts +45 -12
  199. package/src/safety/repository.ts +1 -1
  200. package/src/schemas/agent-handoff.ts +56 -0
  201. package/src/schemas/budget.ts +37 -0
  202. package/src/schemas/doc-bridge-index.ts +53 -2
  203. package/src/schemas/enrichment.ts +369 -0
  204. package/src/schemas/json-schemas.ts +39 -2
  205. package/src/schemas/knowledge.ts +19 -3
  206. package/src/schemas/retrieval-index.ts +152 -0
  207. package/src/shims/graphology.d.ts +91 -0
  208. package/src/study/adjudication.ts +196 -0
  209. package/src/study/execution.ts +350 -0
  210. package/src/study/expectations.ts +219 -0
  211. package/src/study/metrics.ts +467 -0
  212. package/src/study/protocol.ts +271 -0
  213. package/src/study/provider-cli.ts +115 -0
  214. package/src/study/provider-telemetry.ts +47 -0
  215. package/src/study/quality-scorecard.ts +164 -0
  216. package/src/study/runner.ts +461 -0
  217. package/src/study/task-suite.ts +321 -0
  218. package/src/study/verification.ts +134 -0
  219. package/src/validate.ts +8 -5
  220. package/src/version.ts +1 -1
  221. package/src/workflow/engine.ts +36 -11
  222. package/dist/index-C2PCQSrB.d.ts +0 -2251
  223. package/scripts/verification-harness.mjs +0 -483
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  **Turn your docs into executable handoffs for coding agents.**
18
18
 
19
- doc-bridge reads your repo docs, ownership map, and human documentation site, then gives every agent the same answer:
19
+ doc-bridge reads your repo docs, ownership map, and human documentation site, then gives humans and agents the same evidence-linked starting point:
20
20
 
21
21
  - where to start reading
22
22
  - which files/packages it may edit
@@ -27,6 +27,26 @@ It is not a wiki or hosted RAG. The core works **without any LLM or API key**; t
27
27
 
28
28
  ![doc-bridge maps human docs into structured agent handoffs](docs/landing/assets/doc-bridge-hero.webp)
29
29
 
30
+ ## Built for agent-scale repositories
31
+
32
+ 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.
33
+
34
+ ### Historical context-payload estimate
35
+
36
+ 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.
37
+
38
+ ![Estimated context payload reduction](docs/landing/assets/context-payload-reduction.svg)
39
+
40
+ ### Historical controlled A/B signal
41
+
42
+ The published controlled study with 96 anonymized executions reported a directional operational signal of:
43
+
44
+ - **18.46% fewer paired provider token-equivalent units** across 46 token-complete pairs;
45
+ - **39.75 seconds lower P95 latency**;
46
+ - **87.5% operationally completed executions vs. 75.0%** with repository-only context.
47
+
48
+ 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](docs/study/README.md).
49
+
30
50
  ## Why teams use it
31
51
 
32
52
  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.
@@ -51,10 +71,33 @@ The handoff is a routing contract:
51
71
  }
52
72
  ```
53
73
 
74
+ Workflow runs may carry the same optional `correlation` envelope used by the
75
+ AgentsKit runtime and Chat protocol. `operationId` is the cross-repository
76
+ identity; `runId`, `sessionId`, `turnId`, `actionId`, and `traceId` retain local
77
+ meaning. It is bounded metadata only and must not contain prompts, secrets, or
78
+ document content.
79
+
54
80
  That contract works from the terminal, MCP, CI, and optional RAG/chat.
55
81
 
82
+ ## Documentation quality and reconciliation
83
+
84
+ 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.
85
+
86
+ 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.
87
+
88
+ ```text
89
+ Example finding (anonymized)
90
+ CONTRADICTION · high confidence
91
+ Documentation declaration differs from the observed project relation
92
+ Evidence: 4 source files + 1 documentation declaration
93
+ Action: review ownership and update the canonical document
94
+ ```
95
+
56
96
  ## 60-second proof
57
97
 
98
+ This README owns the one-command proof; the [Getting started guide](docs/getting-started.md)
99
+ owns the complete repository setup and first-index workflow.
100
+
58
101
  ```bash
59
102
  npm i -D @agentskit/doc-bridge
60
103
  npx ak-docs demo --text
@@ -73,15 +116,15 @@ After (handoff.resolve / query --agent)
73
116
  Gate: red → green
74
117
  ```
75
118
 
76
- Monorepo fixture with auth + billing:
77
-
78
- ```bash
79
- npx ak-docs demo --fixture monorepo --text
80
- ```
81
-
82
119
  ### Verify the real handoff path
83
120
 
84
- This checked example runs the bundled demo through the public CLI. The README gate compares this block byte-for-byte with the executable fixture and runs it on every PR.
121
+ This checked example runs the bundled demo through the public CLI. The
122
+ repository's `scripts/check-readme-standard.mjs` gate compares this block byte-for-byte
123
+ with the executable fixture; `.github/workflows/ci.yml` runs that gate and its
124
+ executable tests on every pull request.
125
+
126
+ The study figures below are not recomputed by the README gate; their protocol,
127
+ privacy checks, and limitations are documented in the linked study artifacts.
85
128
 
86
129
  <!-- readme-command:verify-handoff -->
87
130
  <!-- readme-example:verify-handoff -->
@@ -97,27 +140,21 @@ execFileSync(process.execPath, ['bin/ak-docs.js', 'demo', '--text'], {
97
140
  node examples/verify-handoff.mjs
98
141
  ```
99
142
 
100
- Full setup in your repo:
101
-
102
- ```bash
103
- npx ak-docs init
104
- npx ak-docs index
105
- npx ak-docs query package example --agent
106
- ak-docs mcp install --cursor # wires MCP into .cursor/mcp.json
107
- ```
143
+ For the complete repository setup, follow the [Getting started guide](docs/getting-started.md).
108
144
 
109
145
  Using Cline? Follow the deterministic [`llms-install.md`](llms-install.md) setup. It runs the pinned MCP server through `pnpm dlx` without adding Doc Bridge to your repository dependencies.
110
146
 
111
147
  ## What ships
112
148
 
113
- ![doc-bridge index used through CLI, MCP, CI, and documentation adapters](docs/landing/assets/doc-bridge-surfaces.webp)
149
+ See the [surface map](docs/landing/assets/doc-bridge-surfaces.webp) for a visual overview of the CLI, MCP, CI, and adapter surfaces.
114
150
 
115
151
  | Surface | Use it for | Command / artifact |
116
152
  |---------|------------|--------------------|
117
153
  | **CLI** | Inspect ownership, search docs, run gates, ask local questions | `ak-docs query`, `search`, `ask`, `doctor`, `gate` |
118
154
  | **MCP server** | Let Cursor, Claude Code, Codex-style agents resolve handoffs before editing | `ak-docs mcp`, `handoff.resolve` |
119
- | **GitHub Action / CI** | Fail stale indexes and broken human-doc links on PRs | `AgentsKit-io/doc-bridge@v1.4.0` |
155
+ | **GitHub Action / CI** | Fail stale indexes and configured documentation gates on PRs | `AgentsKit-io/doc-bridge@ee756a13c006c597445c31e2643c1e8cece715d7` |
120
156
  | **Documentation conformance** | Check the stable ecosystem standard with auditable evidence | `ak-docs conformance run documentation-standard-v1 --text` |
157
+ | **Documentation audit** | Measure documentation quality and compare docs with the observed project graph | `ak-docs audit documentation --json` |
121
158
  | **Doc adapters** | Link human docs to agent docs | `fumadocs`, `docusaurus`, `vitepress`, `starlight`, `nextra`, `plain-markdown` |
122
159
  | **Monorepo routing** | Discover workspaces and checks | `pnpm-monorepo`, `nx` |
123
160
  | **Memory pipeline** | Turn agent notes into reviewable documentation drafts | `memory ingest`, `classify`, `promote --pr` |
@@ -127,11 +164,11 @@ See [docs/getting-started.md](docs/getting-started.md), [docs/mcp.md](docs/mcp.m
127
164
 
128
165
  ### Cursor plugin
129
166
 
130
- This repository also contains a Cursor plugin that pairs the read-only Doc Bridge MCP server with a handoff skill. It resolves `startHere`, `readBeforeEditing`, `editRoots`, and `checks` before Cursor edits a routed repository. The plugin does not request credentials or write project files through MCP.
167
+ 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 or write project files through MCP.
131
168
 
132
169
  ### GitHub Copilot plugin
133
170
 
134
- The root Agent Plugins manifest exposes the same portable handoff skill and read-only 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.
171
+ 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.
135
172
 
136
173
  ```bash
137
174
  copilot plugin install AgentsKit-io/doc-bridge
@@ -155,7 +192,7 @@ pi install npm:@agentskit/doc-bridge
155
192
 
156
193
  ## Claude Desktop MCP Bundle
157
194
 
158
- Doc Bridge can be packaged as a local MCP Bundle for Claude Desktop. The bundle keeps the eight MCP tools read-only and asks the user to select the repository's `doc-bridge.config.json`; that file defines the project boundary Doc Bridge may read.
195
+ 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.
159
196
 
160
197
  From a clean checkout:
161
198
 
@@ -166,7 +203,7 @@ pnpm mcpb:pack
166
203
 
167
204
  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.
168
205
 
169
- Current packaged compatibility is macOS. Other operating systems will be declared only after the exact bundle passes an independent installation test there.
206
+ 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.
170
207
 
171
208
  ## Why this exists
172
209
 
@@ -221,6 +258,9 @@ ak-docs ask "who owns schemas"
221
258
 
222
259
  ## Coverage your team checks daily
223
260
 
261
+ The following is illustrative output from the command, not a measurement of
262
+ this repository. Run the command locally or in CI for current values.
263
+
224
264
  ```bash
225
265
  ak-docs doctor --text
226
266
  ak-docs doctor --badge # shields.io markdown for README
@@ -248,22 +288,20 @@ Next actions
248
288
 
249
289
  Reuse the bundled GitHub Action on every PR:
250
290
 
251
- ```yaml
252
- permissions:
253
- contents: read
291
+ Follow the [canonical Gate and CI guide](docs/guides/gate-ci.md), which includes
292
+ the complete workflow and pins the published Action release.
254
293
 
255
- steps:
256
- - uses: actions/checkout@v4
257
- - uses: AgentsKit-io/doc-bridge@v1.4.0
258
- with:
259
- config-path: doc-bridge.config.json
260
- ```
294
+ The Action installs the exact configured package (or the workspace package when
295
+ dogfooding this repository), then verifies the committed index and configured
296
+ gates without silently rebuilding them. It rejects non-exact package versions.
297
+ See the [Marketplace guide](docs/MARKETPLACE.md).
261
298
 
262
- The Action checks the committed index before changing anything, pins the matching npm package, and rejects non-exact package versions. See the [Marketplace guide](docs/MARKETPLACE.md).
299
+ The guide is pinned to the published stable Action release `v1.7.45`; the
300
+ checked-in package version is `1.8.0`.
263
301
 
264
- ![handoff coverage](https://img.shields.io/badge/handoff_coverage-100%25-2ea44f?style=flat-square) ![human bridge](https://img.shields.io/badge/human_bridge-0%25-cb2431?style=flat-square)
265
-
266
- Run `ak-docs doctor --badge` locally to refresh — or `pnpm coverage:badge` in CI.
302
+ Coverage is repository-specific. Run `ak-docs doctor --badge` locally to emit
303
+ current handoff and human-bridge badges, or `pnpm coverage:badge` in CI; this
304
+ README intentionally avoids publishing a stale static percentage.
267
305
 
268
306
  Or locally:
269
307
 
@@ -282,7 +320,7 @@ Gate fails with `Index is stale. Run: ak-docs index` — same check in CI annota
282
320
  | **Demo** | `ak-docs demo` — bundled fixture, no setup |
283
321
  | **Doctor** | Coverage score, missing humanDoc/agent doc, next actions |
284
322
  | **Index** | `DocBridgeIndex` + `contentHash` + `llms.txt` + capabilities |
285
- | **CLI** | `query` / `search` / `list` / `ask` / `gate` / `memory` / `bootstrap` |
323
+ | **CLI** | `query` / `search` / `list` / `ask` / `gate` / `bench` / `memory` / `bootstrap` |
286
324
  | **MCP** | `handoff.resolve`, `doc.search`, `doc.get`, `gate.status`, … |
287
325
  | **Gates** | Freshness, human-link validation, optional OKF style |
288
326
  | **Adapters** | `pnpm-monorepo`, `nx`, `fumadocs`, `docusaurus`, `vitepress`, `starlight`, `nextra`, `plain-markdown` |
@@ -308,8 +346,7 @@ Designed for and dogfooded on open AgentsKit surfaces:
308
346
  | **Registry** | [registry.agentskit.io](https://registry.agentskit.io/) |
309
347
  | **Playbook** | [playbook.agentskit.io](https://playbook.agentskit.io/llms.txt) |
310
348
  | **AgentsKit Chat** | [documentation](https://chat.agentskit.io) · [source](https://github.com/AgentsKit-io/agentskit-chat) |
311
- | **AgentsKit OS** | [akos.agentskit.io](https://akos.agentskit.io) |
312
- | **Code Review** | [repository-native CLI](https://github.com/AgentsKit-io/code-review-cli) |
349
+ | **Code Review** | [repository-native CLI](https://github.com/AgentsKit-io/code-review) |
313
350
  | **This repo** | CI green · `ak-docs gate run` on every PR |
314
351
 
315
352
  **Playbook pattern:** [`docs/playbook/doc-bridge-pattern.md`](docs/playbook/doc-bridge-pattern.md) — export with `ak-docs playbook pattern --text`
@@ -340,7 +377,15 @@ ak-docs memory promote --pr # opens draft PR via gh
340
377
 
341
378
  ## Status
342
379
 
343
- **v1.4.0 stable** — portable, fail-closed handoffs for Cursor, Pi, Hermes, and ClawHub-compatible clients; deterministic Documentation Standard v1 conformance; verified release provenance; Marketplace Action; doctor + CI + skill; and full Tier A/B/C.
380
+ **Published npm package: v1.7.45 stable.** The working-tree package version is
381
+ `1.8.0` and is not published yet. The Action example below intentionally pins
382
+ the latest published stable release; the release workflow updates the package
383
+ and Action version together when a new release is published.
384
+
385
+ The published package provides portable, fail-closed handoffs through the CLI,
386
+ MCP server, CI action, and packaged skill; deterministic Documentation Standard
387
+ v1 conformance; verified release provenance; and documentation-quality audit
388
+ tooling.
344
389
 
345
390
  ```bash
346
391
  pnpm install && pnpm build && pnpm test
@@ -351,12 +396,14 @@ pnpm smoke:ollama # optional — skips if Ollama/peers unavailable
351
396
 
352
397
  ## Privacy Policy
353
398
 
354
- 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, collect telemetry, or write project files through its eight MCP tools. See the complete [Privacy Policy](PRIVACY.md) for accessed paths, use, storage, sharing, retention, optional integrations, and contact information.
399
+ 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, collect telemetry, or write project files through its MCP tools. See the complete [Privacy Policy](PRIVACY.md) for accessed paths, use, storage, sharing, retention, optional integrations, and contact information.
355
400
 
356
401
  ## Contributing
357
402
 
358
403
  Issues and PRs are welcome. Start here:
359
404
 
405
+ To improve the evidence base, reproduce the [anonymized study](docs/study/README.md), add a language or framework analyzer, contribute a documentation-quality rule, or add a fixture for a real contradiction or stale relation.
406
+
360
407
  | Need | Doc |
361
408
  |------|-----|
362
409
  | Local setup, tests, release flow | [CONTRIBUTING.md](CONTRIBUTING.md) |
package/SECURITY.md CHANGED
@@ -1,3 +1,10 @@
1
+ ---
2
+ owner: security-maintainers
3
+ lifecycle: active
4
+ sourceOfTruth: package.json
5
+ validationPath: pnpm test && pnpm typecheck
6
+ ---
7
+
1
8
  # Security Policy
2
9
 
3
10
  ## Supported versions
package/action.yml CHANGED
@@ -20,7 +20,7 @@ inputs:
20
20
  package-version:
21
21
  description: Exact @agentskit/doc-bridge npm version (kept in sync with this Action release)
22
22
  required: false
23
- default: '1.7.44'
23
+ default: '1.9.0'
24
24
 
25
25
  runs:
26
26
  using: composite
package/bin/ak-docs.js CHANGED
@@ -2,5 +2,5 @@
2
2
  import { runCli } from '../dist/cli/program.js'
3
3
 
4
4
  const code = runCli(process.argv.slice(2))
5
- if (typeof code === 'number') process.exit(code)
6
- if (code) process.exit(await code)
5
+ if (typeof code === 'number') process.exitCode = code
6
+ if (code) process.exitCode = await code
package/bin/ak-verify.js CHANGED
@@ -1,9 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { main } from '../scripts/verification-harness.mjs'
2
+ import { spawn } from 'node:child_process'
3
+ import { dirname, join } from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
3
5
 
4
- try {
5
- process.exitCode = await main(process.argv.slice(2))
6
- } catch (error) {
7
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`)
8
- process.exitCode = 2
9
- }
6
+ const packageEntry = fileURLToPath(import.meta.resolve('@agentskit/harness'))
7
+ const cli = join(dirname(packageEntry), 'cli.js')
8
+ const child = spawn(process.execPath, [cli, ...process.argv.slice(2)], { stdio: 'inherit' })
9
+ child.once('error', (error) => {
10
+ process.stderr.write(`${error.message}\n`)
11
+ process.exitCode = 1
12
+ })
13
+ child.once('exit', (code, signal) => {
14
+ process.exitCode = code ?? (signal ? 1 : 0)
15
+ })
@@ -1,3 +1,5 @@
1
+ /** Where the claim registry lives unless a caller points somewhere else. */
2
+ declare const DEFAULT_PUBLIC_CLAIMS = "docs/parity/public-claims-v1.json";
1
3
  declare const runCli: (argv: readonly string[]) => number | undefined | Promise<number>;
2
4
 
3
- export { runCli };
5
+ export { DEFAULT_PUBLIC_CLAIMS, runCli };