@agentskit/doc-bridge 1.7.45 → 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 (213) hide show
  1. package/CHANGELOG.md +465 -0
  2. package/CONTRIBUTING.md +23 -0
  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 +15861 -6223
  10. package/dist/cli/program.js.map +1 -1
  11. package/dist/config/index.d.ts +1 -1
  12. package/dist/config/index.js +86 -6
  13. package/dist/config/index.js.map +1 -1
  14. package/dist/{index-BUL0q7s8.d.ts → index-Beor6Yhi.d.ts} +133 -1
  15. package/dist/index.d.ts +9871 -1062
  16. package/dist/index.js +16126 -6125
  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/adr/0002-documentation-audit-boundary.md +22 -0
  22. package/docs/adr/0003-study-protocol-and-historical-evidence.md +40 -0
  23. package/docs/adr/0004-controlled-study-runner.md +25 -0
  24. package/docs/adr/0005-documentation-quality-and-criticality.md +20 -0
  25. package/docs/adr/0006-registry-semantic-grounding.md +20 -0
  26. package/docs/adr/0007-longitudinal-study-metrics.md +21 -0
  27. package/docs/adr/0008-study-verification-boundary.md +21 -0
  28. package/docs/adr/0009-study-provider-cli-adapter.md +25 -0
  29. package/docs/agent-corpus/INDEX.md +12 -1
  30. package/docs/agent-corpus/OVERVIEW.md +25 -0
  31. package/docs/agent-corpus/chat.md +5 -1
  32. package/docs/agent-corpus/cli.md +16 -0
  33. package/docs/agent-corpus/conformance.md +12 -0
  34. package/docs/agent-corpus/doc-bridge.md +47 -0
  35. package/docs/agent-corpus/doctor.md +8 -0
  36. package/docs/agent-corpus/gates.md +4 -0
  37. package/docs/agent-corpus/mcp.md +13 -0
  38. package/docs/agent-corpus/memory.md +4 -0
  39. package/docs/agent-corpus/query.md +33 -0
  40. package/docs/bench/README.md +122 -0
  41. package/docs/bench/retrieval-baseline-v1.json +28 -0
  42. package/docs/bench/retrieval-suite-v1.json +1033 -0
  43. package/docs/chat-and-rag.md +3 -2
  44. package/docs/for-agents.md +9 -1
  45. package/docs/getting-started.md +4 -11
  46. package/docs/guides/gate-ci.md +11 -1
  47. package/docs/guides/install-and-run.md +9 -65
  48. package/docs/index.md +22 -1
  49. package/docs/knowledge-engine-runbook.md +38 -3
  50. package/docs/landing/assets/context-payload-reduction.svg +21 -0
  51. package/docs/landing/assets/controlled-ab-comparison.svg +30 -0
  52. package/docs/landing/index.html +119 -5
  53. package/docs/loop-workflow.md +117 -0
  54. package/docs/mcp.md +6 -1
  55. package/docs/parity/public-claims-v1.json +145 -0
  56. package/docs/playbook/doc-bridge-pattern.md +1 -1
  57. package/docs/query.md +90 -2
  58. package/docs/recipes/index-pipeline.md +1 -1
  59. package/docs/schemas/agent-handoff-v1.md +15 -0
  60. package/docs/schemas/doc-bridge-index-v1.md +65 -0
  61. package/docs/spec/benchmark-v1.md +33 -1
  62. package/docs/spec/cli.md +30 -10
  63. package/docs/spec/config-v1.md +147 -8
  64. package/docs/spec/documentation-audit-v1.md +61 -0
  65. package/docs/spec/enrichment-overlay-v1.md +241 -0
  66. package/docs/spec/graph-signals-v1.md +92 -0
  67. package/docs/spec/incremental-scan-v1.md +102 -0
  68. package/docs/spec/markdown-analyzer-v1.md +73 -0
  69. package/docs/spec/mcp-knowledge-tools-v1.md +147 -0
  70. package/docs/spec/measured-enrichment-v1.md +229 -0
  71. package/docs/spec/public-parity-v1.md +119 -0
  72. package/docs/spec/registry-agents.md +6 -0
  73. package/docs/spec/render-v1.md +122 -0
  74. package/docs/spec/retrieval-index-v1.md +164 -0
  75. package/docs/spec/study-metrics-v1.md +58 -0
  76. package/docs/spec/study-protocol-v1.md +46 -0
  77. package/docs/spec/study-provider-cli-v1.md +116 -0
  78. package/docs/spec/study-runner-v1.md +35 -0
  79. package/docs/spec/study-task-suite-v1.md +41 -0
  80. package/docs/spec/study-verification-v1.md +40 -0
  81. package/docs/study/README.md +84 -0
  82. package/docs/study/ab-adjudicated-cost-analysis-v1.md +29 -0
  83. package/docs/study/ab-adjudicated-cost-plan-v1.json +33 -0
  84. package/docs/study/ab-adjudicated-cost-plan-v2-v1.json +33 -0
  85. package/docs/study/ab-adjudicated-cost-result-v1.json +80 -0
  86. package/docs/study/ab-baseline-analysis-v1.md +21 -0
  87. package/docs/study/ab-baseline-plan-v1.json +33 -0
  88. package/docs/study/ab-baseline-recovery-plan-v1.json +33 -0
  89. package/docs/study/ab-baseline-result-v1.json +79 -0
  90. package/docs/study/documentation-audit-round-2026-08-31.json +183 -0
  91. package/docs/study/historical-evidence-v1.json +252 -0
  92. package/docs/study/observation-ledger-v1.json +30632 -0
  93. package/docs/study/phase3-task-coverage-v1.json +34 -0
  94. package/docs/study/phase4-public-pilot-ledger-v1.json +1344 -0
  95. package/docs/study/phase4-public-pilot-result-v1.json +52 -0
  96. package/docs/study/phase4-public-pilot-run-plan-v1.json +26 -0
  97. package/docs/study/phase4-public-pilot-task-suite-v1.json +71 -0
  98. package/docs/study/pilot-round-2026-08-31.json +46 -0
  99. package/docs/study/protocol-v1.json +90 -0
  100. package/docs/study/publication-gate-v1.md +45 -0
  101. package/docs/study/quality-scorecard-cycle-plan.md +545 -0
  102. package/docs/study/quality-scorecard-v1.json +38 -0
  103. package/docs/study/round-1-adjudicated-smoke-v1.json +30642 -0
  104. package/docs/study/round-1-instrumentation-plan-v1.md +39 -0
  105. package/docs/study/round-2-expanded-adjudication-v1.json +91 -0
  106. package/docs/study/round-2-expanded-validation-v1.md +58 -0
  107. package/docs/study/round-3-evidence-contract-v1.json +75 -0
  108. package/docs/study/round-3-evidence-contract-v1.md +57 -0
  109. package/docs/study/round-4-confirmation-v1.json +75 -0
  110. package/docs/study/round-4-confirmation-v1.md +55 -0
  111. package/docs/study/run-plan-v1.json +33 -0
  112. package/docs/study/semantic-adjudication-cycle-8.md +20 -0
  113. package/docs/study/task-suite-v1.json +96 -0
  114. package/docs/study/token-efficiency-plan-v1.md +337 -0
  115. package/docs/study/token-efficiency-protocol-v2.json +62 -0
  116. package/docs/study/verification-binding-v1.json +27 -0
  117. package/docs/validation-cycle-plan.md +14 -0
  118. package/docs/verification-harness.md +11 -6
  119. package/ecosystem-claims.json +2 -2
  120. package/ecosystem-upstream.json +2 -2
  121. package/ecosystem.json +4 -4
  122. package/mcpb/manifest.json +9 -1
  123. package/package.json +25 -6
  124. package/scripts/check-ecosystem-upstream.mjs +34 -6
  125. package/skills/doc-bridge-handoff/fixtures/synthetic-repo/docs/for-agents/packages/payments.md +7 -0
  126. package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
  127. package/src/agents/registry-adapter.ts +192 -24
  128. package/src/audit/documentation.ts +513 -0
  129. package/src/bench/baseline.ts +198 -0
  130. package/src/bench/overlay-delta.ts +139 -0
  131. package/src/bench/retrieval.ts +319 -0
  132. package/src/budget/compile.ts +91 -0
  133. package/src/budget/sections.ts +70 -0
  134. package/src/cli/program.ts +684 -74
  135. package/src/cli/usage.ts +71 -0
  136. package/src/config/defaults.ts +1 -0
  137. package/src/config/index.ts +4 -0
  138. package/src/config/schema.ts +117 -2
  139. package/src/conformance/documentation-standard-v1.ts +8 -6
  140. package/src/discovery/areas.ts +182 -0
  141. package/src/discovery/documentation.ts +211 -5
  142. package/src/discovery/identity.ts +24 -0
  143. package/src/discovery/incremental.ts +314 -0
  144. package/src/discovery/inputs.ts +110 -0
  145. package/src/discovery/markdown.ts +481 -0
  146. package/src/discovery/repository.ts +484 -101
  147. package/src/doctor/run-doctor.ts +244 -12
  148. package/src/enrich/approvals.ts +190 -0
  149. package/src/enrich/cache.ts +93 -0
  150. package/src/enrich/context-pack.ts +272 -0
  151. package/src/enrich/overlay.ts +255 -0
  152. package/src/enrich/review.ts +106 -0
  153. package/src/enrich/stage.ts +374 -0
  154. package/src/enrich/stats.ts +100 -0
  155. package/src/enrich/validate.ts +410 -0
  156. package/src/federation/llms.ts +2 -4
  157. package/src/findings/report.ts +103 -0
  158. package/src/graph/build.ts +356 -0
  159. package/src/graph/memory.ts +208 -0
  160. package/src/index-builder/build-handoffs.ts +22 -11
  161. package/src/index-builder/build-index.ts +132 -3
  162. package/src/index-builder/llms-txt.ts +48 -8
  163. package/src/index-builder/project-corpus.ts +111 -0
  164. package/src/index.ts +630 -2
  165. package/src/lib/fuzzy-match.ts +235 -0
  166. package/src/mcp/knowledge.ts +554 -0
  167. package/src/mcp/server.ts +113 -18
  168. package/src/metrics/benchmark.ts +21 -0
  169. package/src/parity/check.ts +309 -0
  170. package/src/parity/claims.ts +259 -0
  171. package/src/parity/resolve.ts +160 -0
  172. package/src/query/handoff.ts +326 -0
  173. package/src/query/load-index.ts +53 -1
  174. package/src/query/query.ts +92 -59
  175. package/src/query/search.ts +289 -92
  176. package/src/query/text.ts +155 -0
  177. package/src/reconciliation/reconcile.ts +101 -10
  178. package/src/render/data.ts +356 -0
  179. package/src/render/engine.ts +398 -0
  180. package/src/render/generated.ts +77 -0
  181. package/src/render/render.ts +209 -0
  182. package/src/render/template-source.ts +52 -0
  183. package/src/render/templates.ts +289 -0
  184. package/src/report/html.ts +2 -2
  185. package/src/retrieval/bm25.ts +161 -0
  186. package/src/retrieval/project.ts +495 -0
  187. package/src/retrieval/rank.ts +383 -0
  188. package/src/retrieval/weights.ts +39 -0
  189. package/src/retriever/doc-bridge-retriever.ts +100 -15
  190. package/src/rules/engine.ts +30 -10
  191. package/src/schemas/agent-handoff.ts +56 -0
  192. package/src/schemas/budget.ts +37 -0
  193. package/src/schemas/doc-bridge-index.ts +53 -2
  194. package/src/schemas/enrichment.ts +369 -0
  195. package/src/schemas/json-schemas.ts +39 -2
  196. package/src/schemas/knowledge.ts +14 -1
  197. package/src/schemas/retrieval-index.ts +152 -0
  198. package/src/shims/graphology.d.ts +91 -0
  199. package/src/study/adjudication.ts +196 -0
  200. package/src/study/execution.ts +350 -0
  201. package/src/study/expectations.ts +219 -0
  202. package/src/study/metrics.ts +467 -0
  203. package/src/study/protocol.ts +271 -0
  204. package/src/study/provider-cli.ts +115 -0
  205. package/src/study/provider-telemetry.ts +47 -0
  206. package/src/study/quality-scorecard.ts +164 -0
  207. package/src/study/runner.ts +461 -0
  208. package/src/study/task-suite.ts +321 -0
  209. package/src/study/verification.ts +134 -0
  210. package/src/validate.ts +1 -4
  211. package/src/version.ts +1 -1
  212. package/src/workflow/engine.ts +36 -11
  213. package/scripts/verification-harness.mjs +0 -482
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: Controlled study runner v1
3
+ description: Isolated, bounded, provenance-preserving execution for the controlled study baseline.
4
+ ---
5
+
6
+ # Controlled study runner v1
7
+
8
+ `ControlledStudyRunPlanV1` binds a task suite to one source revision, protocol hash, configuration hash, Doc Bridge version, two pinned model configurations, the three study scenarios, and a deterministic sampling policy. A plan is content-addressed and cannot be treated as a baseline merely because it parses.
9
+
10
+ The default `balanced-task-strata` strategy preserves the original study sample. The `pairwise-task-strata` strategy selects exactly two declared scenarios for every selected task/model combination. It is intended for A/B comparisons such as `repository-only` versus `deterministic-doc-bridge`; the task, model, repository, and replicate remain constant across both arms.
11
+
12
+ `runControlledCommand` starts a fresh child process for each attempt with `shell: false`, a unique session identifier, bounded runtime, bounded output, and an explicit retry limit. It records only status, exit metadata, timing, byte counts, hashes, labeled token counts, context-token attribution, first-evidence latency when observed, and tool-call counts. Raw stdout, stderr, prompts, repository content, and credentials are never persisted in an observation.
13
+
14
+ The standard provider process contract is documented in [Study provider CLI contract v1](./study-provider-cli-v1.md). Provider selection is intentionally external to the core runner, so a hosted model CLI or an AgentsKit Registry agent can be used without bundling a local model runtime.
15
+
16
+ The runner recognizes `completed`, `failed`, `timed-out`, `unavailable`, `invalid-output`, and `budget-exceeded` outcomes. An unavailable or invalid Registry agent is evidence of a failed/blocked scenario, never a successful task result. Provider token counts are labeled `provider`; calculated counts must be labeled `estimate`.
17
+
18
+ When a provider reports labeled input and output usage and its configuration contains `pricing`, the runner also records `agentCostUsd` using the configured USD rates. Missing pricing or missing usage remains missing data. Independent adjudication is a separate `study adjudicate` command and records its own actor, method, token usage, and optional `adjudicatorCostUsd`; provider output is never used as its own approval.
19
+
20
+ The current Codex plan uses a calibrated ceiling of `400000` tokens per task. This ceiling was raised only after a real pilot measured `331325` input tokens for a repository-only discovery task; the pilot remains a budget finding and is not counted as a successful observation. The ceiling is a safety bound, not a target, and the study still reports the measured token distribution. The current run selects 24 tasks, one per task, balanced across the six model×scenario strata (four tasks per stratum), and permits one attempt per task to avoid duplicate spend after the pilot showed the cost of retries.
21
+
22
+ `ControlledStudyObservationV1` keeps model, scenario, task, variant, replicate, source, plan, and run provenance together with an automated deterministic or human adjudication state. The runner does not approve semantic results. `upsertControlledStudyObservation` is idempotent for the same run/task and rejects conflicting replacements; ledger hashes make changes detectable. Provider token usage also produces the explicit `providerTokenCostUnits` measurement: one unit is one provider-reported input or output token, not a currency claim. `contextTokens` is paired with `contextTokenMethod`; the default runner value is a byte-based estimate (`ceil(contextBytes / 4)`) and is never presented as provider usage. `firstEvidenceLatencyMs` is optional because a provider must not invent it.
23
+
24
+ An observation may also record `round`, `taskOutcome`, `evidenceQuality`, `safetyOutcome`, `clarificationRequests`, `reworkCount`, and bounded numeric `measurements`. The measurement envelope is extensible; the v1 metrics calculator reserves names for search hit rate, acceptance checks, errors, documentation findings/examples/freshness/quality, and analysis or Registry-agent cost. Unknown measurements are preserved for future metric versions but are not interpreted automatically.
25
+
26
+ Validate and inspect the committed plan and ledger with:
27
+
28
+ ```bash
29
+ ak-docs study plan docs/study/run-plan-v1.json --text
30
+ ak-docs study ledger docs/study/observation-ledger-v1.json --text
31
+ ```
32
+
33
+ Use `ak-docs study run ... --dry-run` with a provider CLI configuration and one local repository root per declared population identifier to validate the planned sample before execution. A real run requires those explicit operational inputs and persists the ledger after each observation for recovery. For a pairwise run, set `sampling.strategy` to `pairwise-task-strata`, list two `sampling.scenarioIds`, and set `sampling.sampleSize` to a multiple of the model/scenario stratum count. The canonical pairwise matrix for 24 tasks and two models is 96 observations; a reduced pilot must use a separately hashed run plan and run ID and must be reported as pilot evidence.
34
+
35
+ The committed ledger contains pilot, reduced-sample, and failed structured-provider observations. Failed observations remain immutable evidence; a recovered provider run must use a new run identifier and must not overwrite them. Use a new round identifier when the recovery is a separate experimental round; same-round recovery is valid only when the report explicitly selects the run IDs.
@@ -0,0 +1,41 @@
1
+ ---
2
+ title: Study task suite v1
3
+ description: A fixed, anonymization-safe task and adjudication contract for controlled study baselines.
4
+ ---
5
+
6
+ # Study task suite v1
7
+
8
+ `docs/study/task-suite-v1.json` is the canonical Phase 1 controlled task contract. It contains exactly four bounded tasks (discovery, architecture, documentation, and implementation) for each population identifier. The checked-in canonical artifact uses six stable anonymized consumer identifiers and therefore contains 24 tasks; reduced public pilots may declare a smaller population without changing the canonical artifact.
9
+
10
+ The suite is a definition, not evidence that a task was executed. Execution records belong to a later observation ledger and must retain the suite hash, protocol hash, source revision, model, scenario, replicate, and verification run ID.
11
+
12
+ ## Required task fields
13
+
14
+ Every task declares:
15
+
16
+ - objective and initial context;
17
+ - allowed tools and forbidden actions;
18
+ - expected outcome, evidence requirements, and acceptance commands;
19
+ - task-specific token/runtime budget;
20
+ - every logical, endpoint, database, CLI, MCP, UI, and documentation surface, with a reason for each non-applicable surface;
21
+ - separate `success`, `partial`, `incorrect`, `incomplete`, and `blocked` rubric criteria;
22
+ - two distinguishable equivalent variants in its own variant group.
23
+
24
+ The schema rejects unknown repositories, missing categories, budget overruns, duplicate identifiers, unsafe public text, and tasks without a complete rubric. It also rejects suites whose planned execution count exceeds `maxRuns`.
25
+
26
+ ## Execution plan
27
+
28
+ The canonical plan is 24 tasks × 3 scenarios × 2 model slots × 2 replicates = 288 planned executions. `selectTaskExecutions` produces a deterministic ordering from the declared seed and assigns executions of each variant to every task. Scenario order, model identity, and replicate remain explicit in each selected execution. A pilot must publish its population, task count, replicate count, and sampling plan; it must not be presented as six-repository evidence.
29
+
30
+ Run the contract through the packaged CLI:
31
+
32
+ ```bash
33
+ ak-docs study tasks docs/study/task-suite-v1.json --text
34
+ ak-docs study select docs/study/task-suite-v1.json --json
35
+ ```
36
+
37
+ ## Adjudication
38
+
39
+ Agent output is never the adjudication result. During a real run, the deterministic evaluator receives the execution status, the bounded acceptance-check measurements (`acceptanceChecksPassed`, `acceptanceChecksTotal`, and `acceptanceChecksExecuted`), and the number of evidence items, then records an `automated` adjudication with method `deterministic-rubric-v1`. A success requires every declared check to be observed as executed and passed; missing execution telemetry is blocked rather than inferred. The evaluator returns one of the five rubric statuses without reading the provider's self-reported `taskOutcome`. Human adjudication remains required for semantic correctness, documentation quality, and any claim that cannot be proven by the declared artifact checks.
40
+
41
+ No baseline is approved by creating or selecting the suite. Baseline execution, comparison, and immutable approval are separate phases.
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: Study verification binding v1
3
+ description: Provenance, privacy, budget, recovery, and audit rules for controlled study evidence.
4
+ ---
5
+
6
+ # Study verification binding v1
7
+
8
+ `ControlledStudyVerifiedResultV1` is the publication-safe boundary for a controlled study result. It wraps a result with the exact verification run, source revision, protocol/configuration hashes, immutable baseline hash, artifact hashes, privacy scan outcome, and consumed budget.
9
+
10
+ The binding is content-addressed with `sha256-normalized-v1`. It is not a baseline and cannot replace one. Baseline replacement is a separate, explicit, human-authorized study operation; the `@agentskit/harness@0.9.0` verification CLI does not replace baselines during a normal run. The replacement must record the new artifact hash, actor, intent, and timestamp in the study evidence ledger.
11
+
12
+ Validate a binding through the real CLI:
13
+
14
+ ```bash
15
+ ak-docs study verification docs/study/verification-binding-v1.json --text
16
+ ```
17
+
18
+ ## Required evidence
19
+
20
+ Every controlled result must bind:
21
+
22
+ - `verificationRunId` and `sourceRevisionHash`;
23
+ - `protocolHash`, `configurationHash`, and `baselineHash`;
24
+ - hashes for every included artifact, never raw repository content;
25
+ - anonymized privacy status, artifact count, zero forbidden matches, and publication-review state;
26
+ - maximum and consumed token/runtime budget.
27
+
28
+ The binding rejects budget exhaustion and tampered content. A result without this envelope may be useful for local exploration, but is not a verified study result.
29
+
30
+ ## Privacy boundary
31
+
32
+ `scanStudyPublicationArtifact` recursively checks machine-readable artifacts and logs for private paths, URLs, credentials, prompts, raw agent output, snippets, and repository-content fields. `scripts/study-privacy-gate.mjs` applies the same scan to a file or directory. It reports only field paths, never the matched secret value. Publication requires human review even when the deterministic scan has zero matches.
33
+
34
+ Study artifacts use anonymized consumer identifiers and bounded hashes. Do not place repository names, internal paths, document contents, prompts, credentials, or raw responses in a ledger, report, log, or publication export.
35
+
36
+ ## Recovery and idempotency
37
+
38
+ Observation ledgers are updated with `upsertControlledStudyObservation`; the same run/task is reused when its content hash matches and rejected when it conflicts. Workflow stage artifacts are atomic and hash-verified. A failed, cancelled, stale, corrupted, or interrupted workflow can resume from the last valid completed stage; invalid artifacts are not silently reused. Changed source, configuration, protocol, task definition, model, tool version, or evidence produces a new run.
39
+
40
+ The harness records `CLARIFYING`, `PLANNED`, `VERIFYING`, `AWAITING_HUMAN_APPROVAL`, `AWAITING_AUTHORIZATION`, `BLOCKED`, and `COMPLETE` distinctly. Missing checks, stale evidence, privacy matches, budget exhaustion, or regressions cannot be reported as complete.
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: Documentation efficiency study
3
+ description: Anonymized measurements for Doc Bridge context efficiency, evidence quality, and agent workflows.
4
+ ---
5
+
6
+ # Documentation efficiency study
7
+
8
+ The next improvement series is governed by the [Token efficiency improvement
9
+ plan](./token-efficiency-plan-v1.md). It separates context-payload reduction,
10
+ provider-token reduction, and tokens-to-correct-action so that a smaller
11
+ payload cannot be presented as a correctness or token-saving result by itself.
12
+
13
+ This directory contains the anonymized, versioned evidence behind the Doc Bridge performance narrative. It is designed to let contributors inspect the numbers without exposing repository contents, private paths, prompts, credentials, or raw agent responses.
14
+
15
+ ## Executive summary
16
+
17
+ An earlier anonymized dogfooding cycle estimated up to **99% context-payload reduction** between the scanned repository corpus and the P95 payload returned to an agent. This is a historical context-payload measurement, not a guaranteed token reduction or correctness result, and it must not be read as a provider-token result.
18
+
19
+ The published controlled A/B study with 96 executions showed a directional operational signal of 18.46% fewer paired provider token-equivalent units across 46 token-complete pairs and 39.75 seconds lower P95 latency than repository-only context. Operational completion was 87.5% versus 75.0%. The sample is not a causal or enterprise-readiness claim.
20
+
21
+ The independent bounded adjudicator recorded **0 adjudicator-success outcomes in both arms**. Because this adjudicator is mechanical and does not independently judge semantic correctness, this round does not demonstrate improved task correctness; it remains `inconclusive` and should be used only as an auditable historical directional measurement. A newer local pilot is not included in the public narrative until its semantic evaluation and publication review are complete.
22
+
23
+ Acceptance telemetry is now checked separately from task correctness: every pilot observation records passed, total, and executed acceptance-check counts, while the deterministic adjudicator blocks a success when any declared check was not observed as executed. This prevents a missing execution measurement from being mistaken for a passing task.
24
+
25
+ Semantic correctness and natural-language contradiction detection are explicit
26
+ limitations of this study, not missing evidence hidden by the publication
27
+ artifacts. They remain open validation work for a future adjudicated corpus.
28
+
29
+ ![Estimated context payload reduction](../landing/assets/context-payload-reduction.svg)
30
+
31
+ ![Controlled A/B comparison](../landing/assets/controlled-ab-comparison.svg)
32
+
33
+ ## Evidence classification
34
+
35
+ | Label | Meaning |
36
+ | --- | --- |
37
+ | `controlled` | Fixed task, model, scenario, and measurement contract. |
38
+ | `estimated` | Derived from bounded measurements where direct provider data was unavailable. |
39
+ | `observational` | Real-world dogfooding evidence without a controlled counterfactual. |
40
+ | `inconclusive` | Useful signal, but insufficient evidence for a causal claim. |
41
+
42
+ ## Published artifacts
43
+
44
+ | Artifact | Purpose |
45
+ | --- | --- |
46
+ | [Protocol](./protocol-v1.json) | Metric definitions, scenarios, privacy boundary, and stopping rules. |
47
+ | [Token efficiency protocol v2](./token-efficiency-protocol-v2.json) | Correct-action token metric, evidence gates, and non-regression targets. |
48
+ | [Task suite](./task-suite-v1.json) | Fixed anonymized discovery, architecture, documentation, and implementation tasks. |
49
+ | [Phase 4 public pilot suite](./phase4-public-pilot-task-suite-v1.json) | One public fixture, four tasks, and explicit pilot-only scope for validating the real runner without duplicating a repository. |
50
+ | [Phase 4 public pilot plan](./phase4-public-pilot-run-plan-v1.json) | Hashed 16-observation pairwise pilot using the two configured Codex model slots. |
51
+ | [Phase 4 public pilot ledger](./phase4-public-pilot-ledger-v1.json) | Bounded structured observations with hashes, statuses, provider usage, evidence IDs, and automated adjudication. |
52
+ | [Phase 4 public pilot result](./phase4-public-pilot-result-v1.json) | Anonymized execution counts, paired token/latency measurements, failed preparation runs, and limitations. |
53
+ | [Publication gate v1](./publication-gate-v1.md) | Evidence and claim-boundary checks required before publishing study results. |
54
+ | [A/B baseline result](./ab-baseline-result-v1.json) | Controlled repository-only versus deterministic Doc Bridge measurements. |
55
+ | [A/B baseline analysis](./ab-baseline-analysis-v1.md) | Human-readable interpretation of the controlled baseline. |
56
+ | [Adjudicated A/B result](./ab-adjudicated-cost-result-v1.json) | Cost-attributed execution and independent bounded adjudication. |
57
+ | [Round 2](./round-2-expanded-validation-v1.md) | Expanded adjudication and operational measurements. |
58
+ | [Round 3](./round-3-evidence-contract-v1.md) | Evidence-coverage contract validation. |
59
+ | [Round 4](./round-4-confirmation-v1.md) | Fresh-sample confirmation and final limitations. |
60
+ | [Historical evidence](./historical-evidence-v1.json) | Earlier anonymized dogfooding and validation-cycle measurements. |
61
+
62
+ All publication-bound artifacts pass the deterministic privacy gate. The values are intentionally anonymized and should be interpreted together with their provenance and limitations.
63
+
64
+ The Phase 4 public pilot is intentionally separate from the six-population canonical suite. It is an execution-path and measurement smoke study, not evidence of enterprise-wide documentation quality or generalization. Its local provider and repository configuration stay outside the publication artifacts; only hashes, bounded observations, and the run identifier belong in published evidence.
65
+
66
+ ## Reproduce the charts
67
+
68
+ From the repository root:
69
+
70
+ ```bash
71
+ node scripts/generate-study-charts.mjs
72
+ node scripts/generate-study-charts.mjs --check
73
+ ```
74
+
75
+ The generator uses only the checked-in JSON artifacts and Node.js APIs. It does not call an LLM or access a consumer repository.
76
+
77
+ ## What the study does not prove
78
+
79
+ - It does not prove that Doc Bridge makes every agent answer correctly.
80
+ - It does not prove a universal 99% token reduction.
81
+ - It does not establish causality across all repositories, languages, or models.
82
+ - It does not replace semantic human review of documentation/code contradictions.
83
+
84
+ The study is a transparent measurement baseline and a contribution surface for better analyzers, adapters, acceptance checks, and future replicates.
@@ -0,0 +1,29 @@
1
+ # Controlled A/B study — adjudicated cost round
2
+
3
+ This round compares `repository-only` with `deterministic-doc-bridge` using 24 anonymized task definitions, two configured CLI models, one replicate, and 48 observations per arm. The run completed all 96 planned observations and records execution failures rather than dropping them.
4
+
5
+ ## Result
6
+
7
+ The deterministic Doc Bridge arm completed 42/48 executions (87.5%) versus 36/48 (75.0%) for repository-only. Its latency p95 was 84,440 ms versus 124,193 ms. Across 46 paired observations with token data, the deterministic arm used 53,325 fewer provider token-equivalent units on average (−18.459%). Provider token-equivalent units are input plus output tokens; they are not currency.
8
+
9
+ Evidence citation was unchanged at 93.75%. The high-quality evidence rate was 20.833% for deterministic Doc Bridge versus 22.917% for repository-only. The independent bounded adjudicator recorded zero successful outcomes in both arms. That means this run does not demonstrate improved semantic correctness, even though it shows directional operational improvement.
10
+
11
+ The result is `inconclusive`. It is useful as an auditable directional measurement, not as a causal, enterprise-readiness, or USD-cost claim.
12
+
13
+ ## Provenance
14
+
15
+ - Plan: `ab-adjudicated-cost-plan-v2-v1.json`, hash `f61bf70063fcceb9dfe823ac9d0707f0f004a075143cae6e9518523c64ba1b4f`
16
+ - Run: `phase-9-ab-adjudicated-cost-03`
17
+ - Ledger hash: `cc3eb8a816f961b4a4d8fdefd96365e6b89f3fd7d5aad287c3c5cc79a80ed0f5`
18
+ - Metrics report hash: `d2849c3515da91385af91e9a80b70fa25b5f2ad6f248255229aba6ce73b3fd22`
19
+ - Structured result: [ab-adjudicated-cost-result-v1.json](./ab-adjudicated-cost-result-v1.json)
20
+
21
+ ## What changed from the previous round
22
+
23
+ - Provider token totals are now derived and labeled as token-equivalent units when both input and output counts exist.
24
+ - Provider-reported outcomes are no longer treated as the final outcome; the runner records a deterministic bounded adjudication.
25
+ - Child process groups are terminated on timeout or output limits, preventing nested CLI processes from surviving a failed observation.
26
+
27
+ ## Remaining measurement gap
28
+
29
+ The adjudicator is mechanical and bounded. It does not independently judge whether the answer is semantically correct, whether documentation claims are true, or whether a repository change is safe. A future round needs a blinded human or separately configured review agent with an explicit rubric before correctness or quality claims can be strengthened.
@@ -0,0 +1,33 @@
1
+ {
2
+ "type": "controlled-study-run-plan",
3
+ "schemaVersion": 1,
4
+ "planVersion": "v1-ab-adjudicated-cost",
5
+ "protocolVersion": "v1",
6
+ "protocolHash": "7a56ae4da91ae56fb8b4b7e506adce525ab6fcb637d635cafb7091c2bd437adf",
7
+ "taskSuiteHash": "d7810828bce3c6616f00897fd7c92dfa4ecdf12e549923795cd95cc81a2b0029",
8
+ "sourceRevisionHash": "0dfd7a83cfdfaecd78055642f74ce6552bfd83cf14f7bc6ed308ec978eda0ef6",
9
+ "configurationHash": "0a7dede28ccf1e672044c7b429a67d64d34e68c133dd21ffc07d763ff50642fe",
10
+ "docBridgeVersion": "1.7.45",
11
+ "models": [
12
+ { "id": "low-cost-model", "role": "low-cost", "provider": "codex", "model": "gpt-5.6-sol", "version": "codex-cli-0.149.0", "parametersHash": "6dc5481139cc4fc6960a38ffd4c7e68605108d0d3eac9ac3c269c92703200273", "contextLimit": 272000, "toolConfigurationHash": "a08b38a4fa7e559811713cabc2e2f62cb05ef266d406dcb38cf46be627417e20", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" },
13
+ { "id": "reference-model", "role": "reference", "provider": "codex", "model": "gpt-5.6-luna", "version": "codex-cli-0.149.0", "parametersHash": "785593a535c713ae8015defb031047fb9ae55926ec4ac0cb0cafcdaa5cba1e30", "contextLimit": 272000, "toolConfigurationHash": "d2fe8bbf1fa6add2b357c4a199a37224c03bbe4edf29901ff45ae0ef8ee99366", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" }
14
+ ],
15
+ "scenarios": [
16
+ { "id": "repository-only", "network": false },
17
+ { "id": "deterministic-doc-bridge", "network": false },
18
+ { "id": "registry-assisted", "agentId": "ecosystem-doc-bridge-corpus-scanner", "agentVersion": "v1.0.0", "network": false }
19
+ ],
20
+ "taskIds": [
21
+ "consumer-01-discovery", "consumer-01-architecture", "consumer-01-documentation", "consumer-01-implementation",
22
+ "consumer-02-discovery", "consumer-02-architecture", "consumer-02-documentation", "consumer-02-implementation",
23
+ "consumer-03-discovery", "consumer-03-architecture", "consumer-03-documentation", "consumer-03-implementation",
24
+ "consumer-04-discovery", "consumer-04-architecture", "consumer-04-documentation", "consumer-04-implementation",
25
+ "consumer-05-discovery", "consumer-05-architecture", "consumer-05-documentation", "consumer-05-implementation",
26
+ "consumer-06-discovery", "consumer-06-architecture", "consumer-06-documentation", "consumer-06-implementation"
27
+ ],
28
+ "sampling": { "strategy": "pairwise-task-strata", "sampleSize": 96, "scenarioIds": ["repository-only", "deterministic-doc-bridge"] },
29
+ "budget": { "maxTokens": 400000, "maxRuntimeMs": 180000, "maxOutputBytes": 256000, "maxAttempts": 1 },
30
+ "runId": "phase-9-ab-adjudicated-cost-01",
31
+ "contentHashAlgo": "sha256-normalized-v1",
32
+ "contentHash": "7d03ca649d4d4d23cc9c7cb7237aba6e51697d04d2d8ac1912101ccb439b08b8"
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "type": "controlled-study-run-plan",
3
+ "schemaVersion": 1,
4
+ "planVersion": "v1-ab-adjudicated-cost",
5
+ "protocolVersion": "v1",
6
+ "protocolHash": "7a56ae4da91ae56fb8b4b7e506adce525ab6fcb637d635cafb7091c2bd437adf",
7
+ "taskSuiteHash": "d7810828bce3c6616f00897fd7c92dfa4ecdf12e549923795cd95cc81a2b0029",
8
+ "sourceRevisionHash": "c4a2decdccfd7262f64c78b6d8bb1c1101094d0afed519750b8ebfbfde1c1019",
9
+ "configurationHash": "0a7dede28ccf1e672044c7b429a67d64d34e68c133dd21ffc07d763ff50642fe",
10
+ "docBridgeVersion": "1.7.45",
11
+ "models": [
12
+ { "id": "low-cost-model", "role": "low-cost", "provider": "codex", "model": "gpt-5.6-sol", "version": "codex-cli-0.149.0", "parametersHash": "6dc5481139cc4fc6960a38ffd4c7e68605108d0d3eac9ac3c269c92703200273", "contextLimit": 272000, "toolConfigurationHash": "a08b38a4fa7e559811713cabc2e2f62cb05ef266d406dcb38cf46be627417e20", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" },
13
+ { "id": "reference-model", "role": "reference", "provider": "codex", "model": "gpt-5.6-luna", "version": "codex-cli-0.149.0", "parametersHash": "785593a535c713ae8015defb031047fb9ae55926ec4ac0cb0cafcdaa5cba1e30", "contextLimit": 272000, "toolConfigurationHash": "d2fe8bbf1fa6add2b357c4a199a37224c03bbe4edf29901ff45ae0ef8ee99366", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" }
14
+ ],
15
+ "scenarios": [
16
+ { "id": "repository-only", "network": false },
17
+ { "id": "deterministic-doc-bridge", "network": false },
18
+ { "id": "registry-assisted", "agentId": "ecosystem-doc-bridge-corpus-scanner", "agentVersion": "v1.0.0", "network": false }
19
+ ],
20
+ "taskIds": [
21
+ "consumer-01-discovery", "consumer-01-architecture", "consumer-01-documentation", "consumer-01-implementation",
22
+ "consumer-02-discovery", "consumer-02-architecture", "consumer-02-documentation", "consumer-02-implementation",
23
+ "consumer-03-discovery", "consumer-03-architecture", "consumer-03-documentation", "consumer-03-implementation",
24
+ "consumer-04-discovery", "consumer-04-architecture", "consumer-04-documentation", "consumer-04-implementation",
25
+ "consumer-05-discovery", "consumer-05-architecture", "consumer-05-documentation", "consumer-05-implementation",
26
+ "consumer-06-discovery", "consumer-06-architecture", "consumer-06-documentation", "consumer-06-implementation"
27
+ ],
28
+ "sampling": { "strategy": "pairwise-task-strata", "sampleSize": 96, "scenarioIds": ["repository-only", "deterministic-doc-bridge"] },
29
+ "budget": { "maxTokens": 400000, "maxRuntimeMs": 180000, "maxOutputBytes": 256000, "maxAttempts": 1 },
30
+ "runId": "phase-9-ab-adjudicated-cost-03",
31
+ "contentHashAlgo": "sha256-normalized-v1",
32
+ "contentHash": "f61bf70063fcceb9dfe823ac9d0707f0f004a075143cae6e9518523c64ba1b4f"
33
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "type": "controlled-study-ab-result",
3
+ "schemaVersion": 1,
4
+ "resultVersion": "v1",
5
+ "round": "ab-adjudicated-cost-2026-08-31",
6
+ "runId": "phase-9-ab-adjudicated-cost-03",
7
+ "planHash": "f61bf70063fcceb9dfe823ac9d0707f0f004a075143cae6e9518523c64ba1b4f",
8
+ "ledgerHash": "cc3eb8a816f961b4a4d8fdefd96365e6b89f3fd7d5aad287c3c5cc79a80ed0f5",
9
+ "metricsReportHash": "d2849c3515da91385af91e9a80b70fa25b5f2ad6f248255229aba6ce73b3fd22",
10
+ "sample": {
11
+ "taskCount": 24,
12
+ "modelCount": 2,
13
+ "scenarioCount": 2,
14
+ "observationsPerArm": 48,
15
+ "pairedComparisons": 48
16
+ },
17
+ "arms": [
18
+ {
19
+ "scenarioId": "repository-only",
20
+ "observationCount": 48,
21
+ "executionStatus": { "completed": 36, "budget-exceeded": 11, "timed-out": 1 },
22
+ "completedRate": 0.75,
23
+ "taskOutcome": { "success": 3, "partial": 34, "blocked": 10, "missing": 1 },
24
+ "adjudicationOutcome": { "success": 0, "partial": 33, "blocked": 13, "incomplete": 2 },
25
+ "adjudicatedSuccessRate": 0,
26
+ "evidenceCitationRate": 0.9375,
27
+ "evidenceQualityRate": 0.229167,
28
+ "providerTokens": 13416254,
29
+ "providerTokenObservations": 47,
30
+ "providerTokenCostUnits": 13416254,
31
+ "latencyMeanMs": 68064.75,
32
+ "latencyP95Ms": 124193,
33
+ "totalCostUsd": null
34
+ },
35
+ {
36
+ "scenarioId": "deterministic-doc-bridge",
37
+ "observationCount": 48,
38
+ "executionStatus": { "completed": 42, "budget-exceeded": 5, "timed-out": 1 },
39
+ "completedRate": 0.875,
40
+ "taskOutcome": { "success": 1, "partial": 29, "blocked": 17, "missing": 1 },
41
+ "adjudicationOutcome": { "success": 0, "partial": 40, "blocked": 6, "incomplete": 2 },
42
+ "adjudicatedSuccessRate": 0,
43
+ "evidenceCitationRate": 0.9375,
44
+ "evidenceQualityRate": 0.208333,
45
+ "providerTokens": 11048857,
46
+ "providerTokenObservations": 47,
47
+ "providerTokenCostUnits": 11048857,
48
+ "latencyMeanMs": 58335.292,
49
+ "latencyP95Ms": 84440,
50
+ "totalCostUsd": null
51
+ }
52
+ ],
53
+ "pairedDeltas": {
54
+ "comparisonDirection": "deterministic-doc-bridge minus repository-only",
55
+ "providerTokenCostUnitsAverage": -53325.065,
56
+ "providerTokenCostUnitsRelative": -0.18459,
57
+ "providerTokenPairCount": 46,
58
+ "latencyAverageMs": -9729.458,
59
+ "latencyRelative": -0.142944,
60
+ "latencyP95Ms": -39753,
61
+ "completedRate": 0.125,
62
+ "evidenceCitationRate": 0,
63
+ "evidenceQualityRate": -0.020834,
64
+ "adjudicatedSuccessRate": 0
65
+ },
66
+ "interpretation": {
67
+ "classification": "inconclusive",
68
+ "summary": "The deterministic Doc Bridge arm completed more executions and used fewer provider token-equivalent units with lower latency p95 in this controlled sample. Evidence citation was unchanged and high-quality evidence was slightly lower. The independent adjudicator found no successful outcome in either arm, so the study does not establish improved task correctness.",
69
+ "decision": "Do not use this run as a causal, enterprise-readiness, or currency-cost claim. Use it as an auditable directional measurement and as input to the next study design."
70
+ },
71
+ "limitations": [
72
+ "The cost metric is provider token-equivalent units, not USD; the CLI provider emitted no currency cost.",
73
+ "Two observations lacked provider token counts, so paired token comparison uses 46 of 48 pairs.",
74
+ "Adjudication is deterministic and bounded by execution status, acceptance metrics, and evidence count; it is not independent semantic review by a human or second model.",
75
+ "The sample has 24 task definitions, two models, one replicate, and two scenarios; it does not establish causality or generalize to other repositories.",
76
+ "The study task acceptance instrumentation produced no adjudicated successes; semantic correctness remains not analyzed."
77
+ ],
78
+ "contentHashAlgo": "sha256-normalized-v1",
79
+ "contentHash": "9589b4e36283c36face82acdacbd756b3b96e001c59f2fb0574f9b5be4ef034c"
80
+ }
@@ -0,0 +1,21 @@
1
+ # A/B baseline analysis — 2026-08-31
2
+
3
+ This is the first paired baseline for `repository-only` versus `deterministic-doc-bridge`. It uses 24 anonymized task definitions, two pinned Codex CLI models, and 48 observations per arm. The result is directional and intentionally not an enterprise or causal claim.
4
+
5
+ ## Result
6
+
7
+ The deterministic Doc Bridge arm completed 40/48 executions (83.3%) versus 38/48 (79.2%) for repository-only. Its completion p95 interval is 70.4–91.3%, while repository-only is 65.7–88.3%. Task success was 5/48 (10.4%) versus 4/47 (8.5%) where an outcome was recorded; this difference is inconclusive at this sample size.
8
+
9
+ On paired observations, deterministic Doc Bridge used 5,762 fewer provider tokens on average (−2.29%, 47 pairs with token data). Its latency p95 was 3,150 ms lower (94,339 ms versus 97,489 ms). Evidence quality was higher (27.1% versus 23.4%), while evidence citation rate was slightly lower (91.7% versus 93.8%).
10
+
11
+ The result is `inconclusive`: the signal is encouraging but small, one repository-only observation lacks provider token data, one repository-only observation timed out, and provider cost was not emitted. The next round must add cost attribution and independent outcome adjudication before using the study as a market claim.
12
+
13
+ ## Provenance
14
+
15
+ - Plan: `ab-baseline-recovery-plan-v1.json`, hash `42d96e1152014318eadd2e0790259efc0ea96b138a1dcc4ac60c182ec357215f`
16
+ - Run: `phase-8-ab-baseline-recovery-01`
17
+ - Ledger hash: `9bf49dcee8071a4b5bfc7c515d2ee3d53c5f02344ffcf8bdeb7a412ad3f4e678`
18
+ - Metrics report hash: `a04b7b1a3081d1011bcd99548d9929ebb96de75fd217823f498112a586533428`
19
+ - Structured result: [ab-baseline-result-v1.json](./ab-baseline-result-v1.json)
20
+
21
+ The failed first attempt remains in the immutable ledger as a failed run. The recovery result excludes it; no observation was overwritten.
@@ -0,0 +1,33 @@
1
+ {
2
+ "type": "controlled-study-run-plan",
3
+ "schemaVersion": 1,
4
+ "planVersion": "v1-ab",
5
+ "protocolVersion": "v1",
6
+ "protocolHash": "7a56ae4da91ae56fb8b4b7e506adce525ab6fcb637d635cafb7091c2bd437adf",
7
+ "taskSuiteHash": "d7810828bce3c6616f00897fd7c92dfa4ecdf12e549923795cd95cc81a2b0029",
8
+ "sourceRevisionHash": "1dc24c4e810bfdc49d0964c21e05b425252d99528dd488010653ebd3fd41dd49",
9
+ "configurationHash": "c56fb5612317decb45f65a5047481663e3a9df9e23c22efde8a78e1f8b5dc544",
10
+ "docBridgeVersion": "1.7.45",
11
+ "models": [
12
+ { "id": "low-cost-model", "role": "low-cost", "provider": "codex", "model": "gpt-5.6-sol", "version": "codex-cli-0.149.0", "parametersHash": "6dc5481139cc4fc6960a38ffd4c7e68605108d0d3eac9ac3c269c92703200273", "contextLimit": 272000, "toolConfigurationHash": "a08b38a4fa7e559811713cabc2e2f62cb05ef266d406dcb38cf46be627417e20", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" },
13
+ { "id": "reference-model", "role": "reference", "provider": "codex", "model": "gpt-5.6-luna", "version": "codex-cli-0.149.0", "parametersHash": "785593a535c713ae8015defb031047fb9ae55926ec4ac0cb0cafcdaa5cba1e30", "contextLimit": 272000, "toolConfigurationHash": "d2fe8bbf1fa6add2b357c4a199a37224c03bbe4edf29901ff45ae0ef8ee99366", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" }
14
+ ],
15
+ "scenarios": [
16
+ { "id": "repository-only", "network": false },
17
+ { "id": "deterministic-doc-bridge", "network": false },
18
+ { "id": "registry-assisted", "agentId": "ecosystem-doc-bridge-corpus-scanner", "agentVersion": "v1.0.0", "network": false }
19
+ ],
20
+ "taskIds": [
21
+ "consumer-01-discovery", "consumer-01-architecture", "consumer-01-documentation", "consumer-01-implementation",
22
+ "consumer-02-discovery", "consumer-02-architecture", "consumer-02-documentation", "consumer-02-implementation",
23
+ "consumer-03-discovery", "consumer-03-architecture", "consumer-03-documentation", "consumer-03-implementation",
24
+ "consumer-04-discovery", "consumer-04-architecture", "consumer-04-documentation", "consumer-04-implementation",
25
+ "consumer-05-discovery", "consumer-05-architecture", "consumer-05-documentation", "consumer-05-implementation",
26
+ "consumer-06-discovery", "consumer-06-architecture", "consumer-06-documentation", "consumer-06-implementation"
27
+ ],
28
+ "sampling": { "strategy": "pairwise-task-strata", "sampleSize": 96, "scenarioIds": ["repository-only", "deterministic-doc-bridge"] },
29
+ "budget": { "maxTokens": 400000, "maxRuntimeMs": 180000, "maxOutputBytes": 256000, "maxAttempts": 1 },
30
+ "runId": "phase-8-ab-baseline-01",
31
+ "contentHashAlgo": "sha256-normalized-v1",
32
+ "contentHash": "ab735034299c9c44f464d31f2e95e637dc436416d1eb156b5e75f743b4c4ecc5"
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "type": "controlled-study-run-plan",
3
+ "schemaVersion": 1,
4
+ "planVersion": "v1-ab-recovery",
5
+ "protocolVersion": "v1",
6
+ "protocolHash": "7a56ae4da91ae56fb8b4b7e506adce525ab6fcb637d635cafb7091c2bd437adf",
7
+ "taskSuiteHash": "d7810828bce3c6616f00897fd7c92dfa4ecdf12e549923795cd95cc81a2b0029",
8
+ "sourceRevisionHash": "1dc24c4e810bfdc49d0964c21e05b425252d99528dd488010653ebd3fd41dd49",
9
+ "configurationHash": "b1e6373e423f20f24e991d9c9d5f1170a1230057c11d2462311c8244ec6df3b1",
10
+ "docBridgeVersion": "1.7.45",
11
+ "models": [
12
+ { "id": "low-cost-model", "role": "low-cost", "provider": "codex", "model": "gpt-5.6-sol", "version": "codex-cli-0.149.0", "parametersHash": "6dc5481139cc4fc6960a38ffd4c7e68605108d0d3eac9ac3c269c92703200273", "contextLimit": 272000, "toolConfigurationHash": "a08b38a4fa7e559811713cabc2e2f62cb05ef266d406dcb38cf46be627417e20", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" },
13
+ { "id": "reference-model", "role": "reference", "provider": "codex", "model": "gpt-5.6-luna", "version": "codex-cli-0.149.0", "parametersHash": "785593a535c713ae8015defb031047fb9ae55926ec4ac0cb0cafcdaa5cba1e30", "contextLimit": 272000, "toolConfigurationHash": "d2fe8bbf1fa6add2b357c4a199a37224c03bbe4edf29901ff45ae0ef8ee99366", "promptContractHash": "5ba19f0e4ea57c4206d2965a55fc1bbd081348a8ccf89c86ff64a81df93bf98b" }
14
+ ],
15
+ "scenarios": [
16
+ { "id": "repository-only", "network": false },
17
+ { "id": "deterministic-doc-bridge", "network": false },
18
+ { "id": "registry-assisted", "agentId": "ecosystem-doc-bridge-corpus-scanner", "agentVersion": "v1.0.0", "network": false }
19
+ ],
20
+ "taskIds": [
21
+ "consumer-01-discovery", "consumer-01-architecture", "consumer-01-documentation", "consumer-01-implementation",
22
+ "consumer-02-discovery", "consumer-02-architecture", "consumer-02-documentation", "consumer-02-implementation",
23
+ "consumer-03-discovery", "consumer-03-architecture", "consumer-03-documentation", "consumer-03-implementation",
24
+ "consumer-04-discovery", "consumer-04-architecture", "consumer-04-documentation", "consumer-04-implementation",
25
+ "consumer-05-discovery", "consumer-05-architecture", "consumer-05-documentation", "consumer-05-implementation",
26
+ "consumer-06-discovery", "consumer-06-architecture", "consumer-06-documentation", "consumer-06-implementation"
27
+ ],
28
+ "sampling": { "strategy": "pairwise-task-strata", "sampleSize": 96, "scenarioIds": ["repository-only", "deterministic-doc-bridge"] },
29
+ "budget": { "maxTokens": 400000, "maxRuntimeMs": 180000, "maxOutputBytes": 256000, "maxAttempts": 1 },
30
+ "runId": "phase-8-ab-baseline-recovery-01",
31
+ "contentHashAlgo": "sha256-normalized-v1",
32
+ "contentHash": "42d96e1152014318eadd2e0790259efc0ea96b138a1dcc4ac60c182ec357215f"
33
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "type": "controlled-study-ab-result",
3
+ "schemaVersion": 1,
4
+ "resultVersion": "v1",
5
+ "round": "ab-baseline-2026-08-31",
6
+ "runId": "phase-8-ab-baseline-recovery-01",
7
+ "planHash": "42d96e1152014318eadd2e0790259efc0ea96b138a1dcc4ac60c182ec357215f",
8
+ "ledgerHash": "9bf49dcee8071a4b5bfc7c515d2ee3d53c5f02344ffcf8bdeb7a412ad3f4e678",
9
+ "metricsReportHash": "a04b7b1a3081d1011bcd99548d9929ebb96de75fd217823f498112a586533428",
10
+ "sample": {
11
+ "taskCount": 24,
12
+ "modelCount": 2,
13
+ "scenarioCount": 2,
14
+ "observationsPerArm": 48,
15
+ "pairedComparisons": 48
16
+ },
17
+ "arms": [
18
+ {
19
+ "scenarioId": "repository-only",
20
+ "observationCount": 48,
21
+ "executionStatus": { "completed": 38, "budget-exceeded": 9, "timed-out": 1 },
22
+ "completedRate": 0.7916666667,
23
+ "completedConfidence95": { "low": 0.6574, "high": 0.8827 },
24
+ "taskOutcome": { "success": 4, "partial": 29, "blocked": 12, "incomplete": 2, "missing": 1 },
25
+ "successRate": 0.085106383,
26
+ "successOutcomeCoverage": 47,
27
+ "evidenceCitationRate": 0.9375,
28
+ "evidenceQualityRate": 0.2340425532,
29
+ "providerTokens": 11841294,
30
+ "providerTokenObservations": 47,
31
+ "latencyP95Ms": 97489,
32
+ "contextBytesP95": 2085,
33
+ "responseBytesP95": 1084,
34
+ "totalCostUsd": null
35
+ },
36
+ {
37
+ "scenarioId": "deterministic-doc-bridge",
38
+ "observationCount": 48,
39
+ "executionStatus": { "completed": 40, "budget-exceeded": 8, "timed-out": 0 },
40
+ "completedRate": 0.8333333333,
41
+ "completedConfidence95": { "low": 0.7042, "high": 0.913 },
42
+ "taskOutcome": { "success": 5, "partial": 22, "blocked": 19, "incomplete": 2 },
43
+ "successRate": 0.1041666667,
44
+ "successOutcomeCoverage": 48,
45
+ "evidenceCitationRate": 0.9166666667,
46
+ "evidenceQualityRate": 0.2708333333,
47
+ "providerTokens": 12142335,
48
+ "providerTokenObservations": 48,
49
+ "latencyP95Ms": 94339,
50
+ "contextBytesP95": 2094,
51
+ "responseBytesP95": 1120,
52
+ "totalCostUsd": null
53
+ }
54
+ ],
55
+ "pairedDeltas": {
56
+ "providerTokensAverage": -5761.7021277,
57
+ "providerTokensRelative": -0.022868,
58
+ "latencyAverageMs": 609.5625,
59
+ "latencyP95Ms": -3150,
60
+ "contextP95Bytes": 9,
61
+ "responseP95Bytes": 22,
62
+ "completedRate": 0.0416666666,
63
+ "successRate": 0.0190602837,
64
+ "evidenceCitationRate": -0.0208333333,
65
+ "evidenceQualityRate": 0.0359297801
66
+ },
67
+ "interpretation": {
68
+ "classification": "inconclusive",
69
+ "summary": "The deterministic Doc Bridge arm shows higher completion and evidence-quality rates and lower latency p95 in this sample, but the paired token reduction is small and citation rate is slightly lower. The sample is too small and outcome coverage is incomplete for an enterprise or causal claim."
70
+ },
71
+ "limitations": [
72
+ "Provider cost was not emitted by the CLI adapter; cost comparison is not analyzed.",
73
+ "Repository-only has one observation without provider token counts and one timed-out execution; token comparison uses 47 paired token observations.",
74
+ "Task outcomes were not adjudicated by an independent reviewer; success rates are directional study measurements.",
75
+ "This is one controlled run with 24 tasks and two models; it does not establish causality or generalize to other repositories."
76
+ ],
77
+ "contentHashAlgo": "sha256-normalized-v1",
78
+ "contentHash": "94ac03bcb9f1d600ded42084503ca27d6a3a8e730a338b05fdd3c365d5e5ed7a"
79
+ }