@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.
- package/CHANGELOG.md +465 -0
- package/CONTRIBUTING.md +23 -0
- package/README.md +87 -40
- package/SECURITY.md +7 -0
- package/action.yml +1 -1
- package/bin/ak-docs.js +2 -2
- package/bin/ak-verify.js +13 -7
- package/dist/cli/program.d.ts +3 -1
- package/dist/cli/program.js +15861 -6223
- package/dist/cli/program.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +86 -6
- package/dist/config/index.js.map +1 -1
- package/dist/{index-BUL0q7s8.d.ts → index-Beor6Yhi.d.ts} +133 -1
- package/dist/index.d.ts +9871 -1062
- package/dist/index.js +16126 -6125
- package/dist/index.js.map +1 -1
- package/docs/MARKETPLACE.md +1 -1
- package/docs/PRD-documentation-efficiency-study.md +406 -0
- package/docs/PRD-knowledge-retrieval-and-enrichment.md +466 -0
- package/docs/adr/0002-documentation-audit-boundary.md +22 -0
- package/docs/adr/0003-study-protocol-and-historical-evidence.md +40 -0
- package/docs/adr/0004-controlled-study-runner.md +25 -0
- package/docs/adr/0005-documentation-quality-and-criticality.md +20 -0
- package/docs/adr/0006-registry-semantic-grounding.md +20 -0
- package/docs/adr/0007-longitudinal-study-metrics.md +21 -0
- package/docs/adr/0008-study-verification-boundary.md +21 -0
- package/docs/adr/0009-study-provider-cli-adapter.md +25 -0
- package/docs/agent-corpus/INDEX.md +12 -1
- package/docs/agent-corpus/OVERVIEW.md +25 -0
- package/docs/agent-corpus/chat.md +5 -1
- package/docs/agent-corpus/cli.md +16 -0
- package/docs/agent-corpus/conformance.md +12 -0
- package/docs/agent-corpus/doc-bridge.md +47 -0
- package/docs/agent-corpus/doctor.md +8 -0
- package/docs/agent-corpus/gates.md +4 -0
- package/docs/agent-corpus/mcp.md +13 -0
- package/docs/agent-corpus/memory.md +4 -0
- package/docs/agent-corpus/query.md +33 -0
- package/docs/bench/README.md +122 -0
- package/docs/bench/retrieval-baseline-v1.json +28 -0
- package/docs/bench/retrieval-suite-v1.json +1033 -0
- package/docs/chat-and-rag.md +3 -2
- package/docs/for-agents.md +9 -1
- package/docs/getting-started.md +4 -11
- package/docs/guides/gate-ci.md +11 -1
- package/docs/guides/install-and-run.md +9 -65
- package/docs/index.md +22 -1
- package/docs/knowledge-engine-runbook.md +38 -3
- package/docs/landing/assets/context-payload-reduction.svg +21 -0
- package/docs/landing/assets/controlled-ab-comparison.svg +30 -0
- package/docs/landing/index.html +119 -5
- package/docs/loop-workflow.md +117 -0
- package/docs/mcp.md +6 -1
- package/docs/parity/public-claims-v1.json +145 -0
- package/docs/playbook/doc-bridge-pattern.md +1 -1
- package/docs/query.md +90 -2
- package/docs/recipes/index-pipeline.md +1 -1
- package/docs/schemas/agent-handoff-v1.md +15 -0
- package/docs/schemas/doc-bridge-index-v1.md +65 -0
- package/docs/spec/benchmark-v1.md +33 -1
- package/docs/spec/cli.md +30 -10
- package/docs/spec/config-v1.md +147 -8
- package/docs/spec/documentation-audit-v1.md +61 -0
- package/docs/spec/enrichment-overlay-v1.md +241 -0
- package/docs/spec/graph-signals-v1.md +92 -0
- package/docs/spec/incremental-scan-v1.md +102 -0
- package/docs/spec/markdown-analyzer-v1.md +73 -0
- package/docs/spec/mcp-knowledge-tools-v1.md +147 -0
- package/docs/spec/measured-enrichment-v1.md +229 -0
- package/docs/spec/public-parity-v1.md +119 -0
- package/docs/spec/registry-agents.md +6 -0
- package/docs/spec/render-v1.md +122 -0
- package/docs/spec/retrieval-index-v1.md +164 -0
- package/docs/spec/study-metrics-v1.md +58 -0
- package/docs/spec/study-protocol-v1.md +46 -0
- package/docs/spec/study-provider-cli-v1.md +116 -0
- package/docs/spec/study-runner-v1.md +35 -0
- package/docs/spec/study-task-suite-v1.md +41 -0
- package/docs/spec/study-verification-v1.md +40 -0
- package/docs/study/README.md +84 -0
- package/docs/study/ab-adjudicated-cost-analysis-v1.md +29 -0
- package/docs/study/ab-adjudicated-cost-plan-v1.json +33 -0
- package/docs/study/ab-adjudicated-cost-plan-v2-v1.json +33 -0
- package/docs/study/ab-adjudicated-cost-result-v1.json +80 -0
- package/docs/study/ab-baseline-analysis-v1.md +21 -0
- package/docs/study/ab-baseline-plan-v1.json +33 -0
- package/docs/study/ab-baseline-recovery-plan-v1.json +33 -0
- package/docs/study/ab-baseline-result-v1.json +79 -0
- package/docs/study/documentation-audit-round-2026-08-31.json +183 -0
- package/docs/study/historical-evidence-v1.json +252 -0
- package/docs/study/observation-ledger-v1.json +30632 -0
- package/docs/study/phase3-task-coverage-v1.json +34 -0
- package/docs/study/phase4-public-pilot-ledger-v1.json +1344 -0
- package/docs/study/phase4-public-pilot-result-v1.json +52 -0
- package/docs/study/phase4-public-pilot-run-plan-v1.json +26 -0
- package/docs/study/phase4-public-pilot-task-suite-v1.json +71 -0
- package/docs/study/pilot-round-2026-08-31.json +46 -0
- package/docs/study/protocol-v1.json +90 -0
- package/docs/study/publication-gate-v1.md +45 -0
- package/docs/study/quality-scorecard-cycle-plan.md +545 -0
- package/docs/study/quality-scorecard-v1.json +38 -0
- package/docs/study/round-1-adjudicated-smoke-v1.json +30642 -0
- package/docs/study/round-1-instrumentation-plan-v1.md +39 -0
- package/docs/study/round-2-expanded-adjudication-v1.json +91 -0
- package/docs/study/round-2-expanded-validation-v1.md +58 -0
- package/docs/study/round-3-evidence-contract-v1.json +75 -0
- package/docs/study/round-3-evidence-contract-v1.md +57 -0
- package/docs/study/round-4-confirmation-v1.json +75 -0
- package/docs/study/round-4-confirmation-v1.md +55 -0
- package/docs/study/run-plan-v1.json +33 -0
- package/docs/study/semantic-adjudication-cycle-8.md +20 -0
- package/docs/study/task-suite-v1.json +96 -0
- package/docs/study/token-efficiency-plan-v1.md +337 -0
- package/docs/study/token-efficiency-protocol-v2.json +62 -0
- package/docs/study/verification-binding-v1.json +27 -0
- package/docs/validation-cycle-plan.md +14 -0
- package/docs/verification-harness.md +11 -6
- package/ecosystem-claims.json +2 -2
- package/ecosystem-upstream.json +2 -2
- package/ecosystem.json +4 -4
- package/mcpb/manifest.json +9 -1
- package/package.json +25 -6
- package/scripts/check-ecosystem-upstream.mjs +34 -6
- package/skills/doc-bridge-handoff/fixtures/synthetic-repo/docs/for-agents/packages/payments.md +7 -0
- package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
- package/src/agents/registry-adapter.ts +192 -24
- package/src/audit/documentation.ts +513 -0
- package/src/bench/baseline.ts +198 -0
- package/src/bench/overlay-delta.ts +139 -0
- package/src/bench/retrieval.ts +319 -0
- package/src/budget/compile.ts +91 -0
- package/src/budget/sections.ts +70 -0
- package/src/cli/program.ts +684 -74
- package/src/cli/usage.ts +71 -0
- package/src/config/defaults.ts +1 -0
- package/src/config/index.ts +4 -0
- package/src/config/schema.ts +117 -2
- package/src/conformance/documentation-standard-v1.ts +8 -6
- package/src/discovery/areas.ts +182 -0
- package/src/discovery/documentation.ts +211 -5
- package/src/discovery/identity.ts +24 -0
- package/src/discovery/incremental.ts +314 -0
- package/src/discovery/inputs.ts +110 -0
- package/src/discovery/markdown.ts +481 -0
- package/src/discovery/repository.ts +484 -101
- package/src/doctor/run-doctor.ts +244 -12
- package/src/enrich/approvals.ts +190 -0
- package/src/enrich/cache.ts +93 -0
- package/src/enrich/context-pack.ts +272 -0
- package/src/enrich/overlay.ts +255 -0
- package/src/enrich/review.ts +106 -0
- package/src/enrich/stage.ts +374 -0
- package/src/enrich/stats.ts +100 -0
- package/src/enrich/validate.ts +410 -0
- package/src/federation/llms.ts +2 -4
- package/src/findings/report.ts +103 -0
- package/src/graph/build.ts +356 -0
- package/src/graph/memory.ts +208 -0
- package/src/index-builder/build-handoffs.ts +22 -11
- package/src/index-builder/build-index.ts +132 -3
- package/src/index-builder/llms-txt.ts +48 -8
- package/src/index-builder/project-corpus.ts +111 -0
- package/src/index.ts +630 -2
- package/src/lib/fuzzy-match.ts +235 -0
- package/src/mcp/knowledge.ts +554 -0
- package/src/mcp/server.ts +113 -18
- package/src/metrics/benchmark.ts +21 -0
- package/src/parity/check.ts +309 -0
- package/src/parity/claims.ts +259 -0
- package/src/parity/resolve.ts +160 -0
- package/src/query/handoff.ts +326 -0
- package/src/query/load-index.ts +53 -1
- package/src/query/query.ts +92 -59
- package/src/query/search.ts +289 -92
- package/src/query/text.ts +155 -0
- package/src/reconciliation/reconcile.ts +101 -10
- package/src/render/data.ts +356 -0
- package/src/render/engine.ts +398 -0
- package/src/render/generated.ts +77 -0
- package/src/render/render.ts +209 -0
- package/src/render/template-source.ts +52 -0
- package/src/render/templates.ts +289 -0
- package/src/report/html.ts +2 -2
- package/src/retrieval/bm25.ts +161 -0
- package/src/retrieval/project.ts +495 -0
- package/src/retrieval/rank.ts +383 -0
- package/src/retrieval/weights.ts +39 -0
- package/src/retriever/doc-bridge-retriever.ts +100 -15
- package/src/rules/engine.ts +30 -10
- package/src/schemas/agent-handoff.ts +56 -0
- package/src/schemas/budget.ts +37 -0
- package/src/schemas/doc-bridge-index.ts +53 -2
- package/src/schemas/enrichment.ts +369 -0
- package/src/schemas/json-schemas.ts +39 -2
- package/src/schemas/knowledge.ts +14 -1
- package/src/schemas/retrieval-index.ts +152 -0
- package/src/shims/graphology.d.ts +91 -0
- package/src/study/adjudication.ts +196 -0
- package/src/study/execution.ts +350 -0
- package/src/study/expectations.ts +219 -0
- package/src/study/metrics.ts +467 -0
- package/src/study/protocol.ts +271 -0
- package/src/study/provider-cli.ts +115 -0
- package/src/study/provider-telemetry.ts +47 -0
- package/src/study/quality-scorecard.ts +164 -0
- package/src/study/runner.ts +461 -0
- package/src/study/task-suite.ts +321 -0
- package/src/study/verification.ts +134 -0
- package/src/validate.ts +1 -4
- package/src/version.ts +1 -1
- package/src/workflow/engine.ts +36 -11
- package/scripts/verification-harness.mjs +0 -482
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "phase4-public-pilot-result",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"resultVersion": "phase4-public-pilot-result-v1",
|
|
5
|
+
"status": "pilot-complete",
|
|
6
|
+
"scope": {
|
|
7
|
+
"populationCount": 1,
|
|
8
|
+
"taskCount": 4,
|
|
9
|
+
"replicatesPerTask": 1,
|
|
10
|
+
"models": ["low-cost-model", "reference-model"],
|
|
11
|
+
"scenarios": ["repository-only", "deterministic-doc-bridge"],
|
|
12
|
+
"plannedObservations": 16,
|
|
13
|
+
"pilotOnly": true
|
|
14
|
+
},
|
|
15
|
+
"run": {
|
|
16
|
+
"runId": "phase4-public-pilot-04",
|
|
17
|
+
"planHash": "fdc33d417de30a1aa48cc0711c89d87096bb2ad628b5d43f32046e9d0c16ef6a",
|
|
18
|
+
"ledgerHash": "1cde4be16c44f15ad28fa9f3d7089aef8f2c9f98d7ba847287f125678718b659",
|
|
19
|
+
"providerConfigHash": "8b2dfc9ba3456dbbd18689009a72402295addc1b3645ae6aef2ba927778d1b6c",
|
|
20
|
+
"repositoryConfigHash": "1db7dd10c89e0fb664ad50f3e00544529f682b9828327a9d03684f9528bfea6a"
|
|
21
|
+
},
|
|
22
|
+
"execution": {
|
|
23
|
+
"observations": 16,
|
|
24
|
+
"completed": 16,
|
|
25
|
+
"failed": 0,
|
|
26
|
+
"budgetExceeded": 0,
|
|
27
|
+
"providerReportedOutcome": { "success": 13, "partial": 2, "incomplete": 1 },
|
|
28
|
+
"automatedAdjudication": { "success": 7, "partial": 8, "incomplete": 1, "incorrect": 0, "blocked": 0 }
|
|
29
|
+
},
|
|
30
|
+
"pairedMetrics": {
|
|
31
|
+
"pairs": 8,
|
|
32
|
+
"repositoryOnly": { "providerTokenEquivalentUnits": 648461, "durationP95Ms": 45430 },
|
|
33
|
+
"deterministicDocBridge": { "providerTokenEquivalentUnits": 628018, "durationP95Ms": 42007 },
|
|
34
|
+
"providerTokenEquivalentReductionPct": 3.1525,
|
|
35
|
+
"durationP95ReductionPct": 7.5347,
|
|
36
|
+
"providerTokenEquivalentDefinition": "Provider-reported input plus output tokens; not currency."
|
|
37
|
+
},
|
|
38
|
+
"failedPreparationRuns": [
|
|
39
|
+
{ "runId": "phase4-public-pilot-01", "observations": 6, "reason": "Provider output schema rejected by current Codex CLI because an optional property was not listed as required." },
|
|
40
|
+
{ "runId": "phase4-public-pilot-02", "observations": 1, "reason": "The 40000-token execution budget was below observed provider usage." },
|
|
41
|
+
{ "runId": "phase4-public-pilot-03", "observations": 2, "reason": "The 120000-token execution budget was below observed provider usage for one model/task combination." }
|
|
42
|
+
],
|
|
43
|
+
"limitations": [
|
|
44
|
+
"This is a one-population public fixture pilot and is not enterprise evidence.",
|
|
45
|
+
"The comparison has one replicate per task and eight paired observations.",
|
|
46
|
+
"Automated rubric outcomes are not independent semantic approval of documentation correctness.",
|
|
47
|
+
"The aggregate reduction is not uniform: individual paired tasks moved in both directions.",
|
|
48
|
+
"No currency claim is made because provider pricing was intentionally not configured."
|
|
49
|
+
],
|
|
50
|
+
"contentHashAlgo": "sha256-normalized-v1",
|
|
51
|
+
"contentHash": "f736c7f1fb83a1e4bde8c47aad2838af6f6f6d61f5ed7b5e0dad3ab463084cdd"
|
|
52
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "controlled-study-run-plan",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"planVersion": "phase4-public-pilot-v1",
|
|
5
|
+
"protocolVersion": "v2",
|
|
6
|
+
"protocolHash": "97202235c4dbd556f41fe1aa08663d35b16d516de827aebae73b136bb6a538f6",
|
|
7
|
+
"taskSuiteHash": "226cd26a07fd0bd811fcc8ccf0eee8ef0f9813f68aa9c53d465f98dad44f62a7",
|
|
8
|
+
"sourceRevisionHash": "b58455ffc94e25c95d1dbf359565643afd343774a4c0d5d0ae2942e6b019d6db",
|
|
9
|
+
"configurationHash": "80e4ca1d574159b3cc09292d8df65156f5a8d6ab3d13fbf8f2f7ddbabd76e455",
|
|
10
|
+
"docBridgeVersion": "1.8.0",
|
|
11
|
+
"models": [
|
|
12
|
+
{ "id": "low-cost-model", "role": "low-cost", "provider": "codex", "model": "gpt-5.6-sol", "version": "codex-cli-0.154.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.154.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": ["public-fixture-discovery", "public-fixture-architecture", "public-fixture-documentation", "public-fixture-implementation"],
|
|
21
|
+
"sampling": { "strategy": "pairwise-task-strata", "sampleSize": 16, "scenarioIds": ["repository-only", "deterministic-doc-bridge"] },
|
|
22
|
+
"budget": { "maxTokens": 200000, "maxRuntimeMs": 180000, "maxOutputBytes": 256000, "maxAttempts": 1 },
|
|
23
|
+
"runId": "phase4-public-pilot-04",
|
|
24
|
+
"contentHashAlgo": "sha256-normalized-v1",
|
|
25
|
+
"contentHash": "fdc33d417de30a1aa48cc0711c89d87096bb2ad628b5d43f32046e9d0c16ef6a"
|
|
26
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "study-task-suite",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"suiteVersion": "phase4-public-pilot-v1",
|
|
5
|
+
"protocolVersion": "v2",
|
|
6
|
+
"title": "Bounded public pilot for documentation and knowledge discovery",
|
|
7
|
+
"population": ["public-fixture"],
|
|
8
|
+
"modelIds": ["low-cost-model", "reference-model"],
|
|
9
|
+
"scenarioIds": ["repository-only", "deterministic-doc-bridge", "registry-assisted"],
|
|
10
|
+
"maxTokensPerTask": 12000,
|
|
11
|
+
"maxRuntimeMsPerTask": 120000,
|
|
12
|
+
"maxRuns": 48,
|
|
13
|
+
"replicatesPerTask": 1,
|
|
14
|
+
"ordering": { "strategy": "balanced-counter-order", "seed": "phase4-public-pilot-v1" },
|
|
15
|
+
"tasks": [
|
|
16
|
+
{
|
|
17
|
+
"id": "public-fixture-discovery", "repositoryId": "public-fixture", "category": "discovery", "difficulty": "easy",
|
|
18
|
+
"objective": "Locate the public fixture entrypoints, ownership boundary, and canonical agent documentation.",
|
|
19
|
+
"initialContext": ["Start with the repository root and declared documentation."],
|
|
20
|
+
"allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent undocumented ownership"],
|
|
21
|
+
"expectedOutcome": "A concise map names the fixture entrypoints, owner, and evidence without unsupported claims.",
|
|
22
|
+
"evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Observed declarations supporting the fixture entrypoint and ownership.", "source": "artifact" }],
|
|
23
|
+
"acceptanceChecks": [{ "id": "fixture-discovery-check", "command": "node -e \"const fs=require('node:fs'); if(!fs.existsSync('doc-bridge.config.json')||!fs.existsSync('llms.txt')) process.exit(1)\"", "expected": "The public fixture declares its Doc Bridge configuration and agent-readable index." }],
|
|
24
|
+
"budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 },
|
|
25
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The public fixture has no endpoint." }, "database": { "required": false, "reason": "The public fixture has no database." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for this bounded discovery task." }, "ui": { "required": false, "reason": "The public fixture has no UI." }, "docs": { "required": true } },
|
|
26
|
+
"rubric": { "success": ["The entrypoint and owner are correct and evidenced."], "partial": ["The primary entrypoint is correct but one non-critical citation is missing."], "incorrect": ["The answer identifies an unsupported entrypoint or owner."], "incomplete": ["The answer does not cover the fixture scope."], "blocked": ["Required fixture evidence cannot be accessed."] },
|
|
27
|
+
"variantGroup": "public-fixture-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin with the declared configuration and package entrypoint." }, { "id": "variant-b", "label": "Documentation-first wording", "context": "Begin with the agent-readable index and trace ownership." }]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "public-fixture-architecture", "repositoryId": "public-fixture", "category": "architecture", "difficulty": "medium",
|
|
31
|
+
"objective": "Describe the public fixture architecture as connected components and identify one evidence-backed boundary.",
|
|
32
|
+
"initialContext": ["Use workspace metadata, routing configuration, and agent documentation."],
|
|
33
|
+
"allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"],
|
|
34
|
+
"expectedOutcome": "A bounded architecture view identifies the package, documentation corpus, and routing relationship.",
|
|
35
|
+
"evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed configuration and documentation supporting the architecture view.", "source": "artifact" }],
|
|
36
|
+
"acceptanceChecks": [{ "id": "fixture-architecture-check", "command": "node -e \"const fs=require('node:fs'); const c=JSON.parse(fs.readFileSync('doc-bridge.config.json')); if(c.routing?.plugin!=='pnpm-monorepo'||!c.corpus?.agent?.index) process.exit(1)\"", "expected": "The fixture declares a routing plugin and an agent documentation index." }],
|
|
37
|
+
"budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 },
|
|
38
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The architecture task is static." }, "database": { "required": false, "reason": "The public fixture has no database." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for this bounded architecture task." }, "ui": { "required": false, "reason": "The public fixture has no UI." }, "docs": { "required": true } },
|
|
39
|
+
"rubric": { "success": ["The map is bounded, directional, and every relation has evidence."], "partial": ["The main components are correct but one relation or limitation is missing."], "incorrect": ["The map asserts an unsupported component or relation."], "incomplete": ["The answer is a list without connected evidence."], "blocked": ["The architecture evidence cannot be inspected."] },
|
|
40
|
+
"variantGroup": "public-fixture-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed fixture components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connection." }]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "public-fixture-documentation", "repositoryId": "public-fixture", "category": "documentation", "difficulty": "hard",
|
|
44
|
+
"objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim in the public fixture and classify it with evidence.",
|
|
45
|
+
"initialContext": ["Compare the agent-readable index, human documentation metadata, and routing configuration."],
|
|
46
|
+
"allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"],
|
|
47
|
+
"expectedOutcome": "The review reports a precise documentation issue, evidence, confidence, limitation, and next action.",
|
|
48
|
+
"evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and configuration evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for the semantic judgment.", "source": "human" }],
|
|
49
|
+
"acceptanceChecks": [{ "id": "fixture-documentation-check", "command": "node -e \"const fs=require('node:fs'); if(!fs.existsSync('docs/for-agents/INDEX.md')||!fs.existsSync('llms.txt')||!fs.existsSync('doc-bridge.config.json')) process.exit(1)\"", "expected": "The fixture exposes the documentation surfaces required for a bounded comparison." }],
|
|
50
|
+
"budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 },
|
|
51
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "Documentation classification does not require an endpoint." }, "database": { "required": false, "reason": "Documentation classification does not require a database." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for this bounded audit task." }, "ui": { "required": false, "reason": "Documentation classification is not a UI task." }, "docs": { "required": true } },
|
|
52
|
+
"rubric": { "success": ["The issue category, evidence, confidence, and limitation are correct."], "partial": ["The issue is real but its category or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence."], "blocked": ["The documentation corpus cannot be compared."] },
|
|
53
|
+
"variantGroup": "public-fixture-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to configuration." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed configuration and find its documentation coverage." }]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "public-fixture-implementation", "repositoryId": "public-fixture", "category": "implementation", "difficulty": "hard",
|
|
57
|
+
"objective": "Propose a minimal documentation-only correction for a verified public fixture knowledge gap without changing source code.",
|
|
58
|
+
"initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."],
|
|
59
|
+
"allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence"],
|
|
60
|
+
"expectedOutcome": "A minimal proposal identifies the documentation location, preserves conventions, and states how it would be verified.",
|
|
61
|
+
"evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and verified knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal.", "source": "runner" }],
|
|
62
|
+
"acceptanceChecks": [{ "id": "fixture-proposal-check", "command": "node -e \"const fs=require('node:fs'); if(!fs.existsSync('.doc-bridge/index.json')||!fs.existsSync('docs/for-agents/INDEX.md')) process.exit(1)\"", "expected": "The fixture has a generated index and canonical agent documentation for proposal verification." }],
|
|
63
|
+
"budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 },
|
|
64
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The proposal is documentation-only." }, "database": { "required": false, "reason": "The proposal is documentation-only." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for a bounded proposal." }, "ui": { "required": false, "reason": "The proposal does not change UI." }, "docs": { "required": true } },
|
|
65
|
+
"rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location or verification correction."], "incorrect": ["The proposal targets the wrong document or asserts unsupported behavior."], "incomplete": ["The proposal lacks a usable change or verification plan."], "blocked": ["The target documentation cannot be safely identified."] },
|
|
66
|
+
"variantGroup": "public-fixture-implementation", "variants": [{ "id": "variant-a", "label": "Gap-to-patch wording", "context": "Start from the verified gap and derive the smallest correction." }, { "id": "variant-b", "label": "Patch-to-proof wording", "context": "Start from the expected proof and identify the smallest documentation change." }]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"contentHashAlgo": "sha256-normalized-v1",
|
|
70
|
+
"contentHash": "226cd26a07fd0bd811fcc8ccf0eee8ef0f9813f68aa9c53d465f98dad44f62a7"
|
|
71
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "controlled-study-pilot-report",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"studyRound": "baseline-codex-2026-08-31",
|
|
5
|
+
"planHash": "949e7642f85ac2f598e006a0c47ccdcf7c0a4c44f8f2697a0e5c7993bfc0add4",
|
|
6
|
+
"ledgerHash": "675b343552fabde2bb13dee441b6154949a85b302a88517b214334977cc61111",
|
|
7
|
+
"providerConfigHash": "c321593deefd52b8c1e5d7d096052989535959e6affe4a8b36714798bd51f517",
|
|
8
|
+
"repositoryConfigHash": "d85352921b5d18aa1d480d02ffdc5247755833e9f717c734b965023c6cec5c28",
|
|
9
|
+
"observations": [
|
|
10
|
+
{
|
|
11
|
+
"taskId": "consumer-02-documentation",
|
|
12
|
+
"modelId": "low-cost-model",
|
|
13
|
+
"scenarioId": "deterministic-doc-bridge",
|
|
14
|
+
"status": "completed",
|
|
15
|
+
"providerTokens": 209704,
|
|
16
|
+
"durationMs": 79451,
|
|
17
|
+
"toolCalls": 6,
|
|
18
|
+
"taskOutcome": "partial",
|
|
19
|
+
"evidenceQuality": "medium",
|
|
20
|
+
"safetyOutcome": "safe"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"taskId": "consumer-01-architecture",
|
|
24
|
+
"modelId": "reference-model",
|
|
25
|
+
"scenarioId": "registry-assisted",
|
|
26
|
+
"status": "budget-exceeded",
|
|
27
|
+
"providerTokens": 400078,
|
|
28
|
+
"durationMs": 82142,
|
|
29
|
+
"toolCalls": 12
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"aggregate": {
|
|
33
|
+
"observationCount": 2,
|
|
34
|
+
"completedRate": 0.5,
|
|
35
|
+
"providerTokens": 609782,
|
|
36
|
+
"latencyP95Ms": 82142,
|
|
37
|
+
"averageToolCalls": 9
|
|
38
|
+
},
|
|
39
|
+
"limitations": [
|
|
40
|
+
"Pilot sample is not a controlled baseline and cannot establish improvement.",
|
|
41
|
+
"Semantic task success remains pending human adjudication.",
|
|
42
|
+
"The reference task exceeded the configured token ceiling."
|
|
43
|
+
],
|
|
44
|
+
"contentHashAlgo": "sha256-normalized-v1",
|
|
45
|
+
"contentHash": "3d3e99aca88de44ca4fa2688b7453f75da500bda858c3f9f63d65c34aa50da6e"
|
|
46
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "study-protocol",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"protocolVersion": "v1",
|
|
5
|
+
"title": "Documentation quality and agent efficiency study",
|
|
6
|
+
"evidenceClasses": ["historical", "controlled"],
|
|
7
|
+
"repositories": [
|
|
8
|
+
{ "id": "consumer-01", "visibility": "anonymized", "role": "consumer" },
|
|
9
|
+
{ "id": "consumer-02", "visibility": "anonymized", "role": "consumer" },
|
|
10
|
+
{ "id": "consumer-03", "visibility": "anonymized", "role": "consumer" },
|
|
11
|
+
{ "id": "consumer-04", "visibility": "anonymized", "role": "consumer" },
|
|
12
|
+
{ "id": "consumer-05", "visibility": "anonymized", "role": "consumer" },
|
|
13
|
+
{ "id": "consumer-06", "visibility": "anonymized", "role": "consumer" }
|
|
14
|
+
],
|
|
15
|
+
"taskCategories": ["discovery", "architecture", "documentation", "implementation"],
|
|
16
|
+
"models": [
|
|
17
|
+
{ "id": "low-cost-model", "role": "low-cost", "status": "pinned", "provider": "codex", "model": "gpt-5.6-sol", "version": "codex-cli-0.149.0", "promptContractHash": "20897bddf03704d26f975003bf3ba0d4d8cb38559b382603d7a03cb17b487a7c" },
|
|
18
|
+
{ "id": "reference-model", "role": "reference", "status": "pinned", "provider": "codex", "model": "gpt-5.6-luna", "version": "codex-cli-0.149.0", "promptContractHash": "a0a90a4141327fef23e2d7ef99da79cd44cfe66fa65d7757484e95629b3fe7bd" }
|
|
19
|
+
],
|
|
20
|
+
"scenarios": [
|
|
21
|
+
{
|
|
22
|
+
"id": "repository-only",
|
|
23
|
+
"label": "Repository only",
|
|
24
|
+
"source": "repository-only",
|
|
25
|
+
"modelIds": ["low-cost-model", "reference-model"],
|
|
26
|
+
"requiresHumanApproval": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "deterministic-doc-bridge",
|
|
30
|
+
"label": "Deterministic Doc Bridge",
|
|
31
|
+
"source": "deterministic-doc-bridge",
|
|
32
|
+
"modelIds": ["low-cost-model", "reference-model"],
|
|
33
|
+
"requiresHumanApproval": true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "registry-assisted",
|
|
37
|
+
"label": "Doc Bridge plus Registry agent",
|
|
38
|
+
"source": "doc-bridge-registry-agent",
|
|
39
|
+
"modelIds": ["low-cost-model", "reference-model"],
|
|
40
|
+
"registryAgent": "configured",
|
|
41
|
+
"requiresHumanApproval": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"metrics": [
|
|
45
|
+
{ "id": "task-success", "family": "task", "unit": "ratio", "source": "adjudicator", "required": true, "description": "Proportion of task acceptance criteria satisfied." },
|
|
46
|
+
{ "id": "tokens-to-answer", "family": "discovery", "unit": "tokens", "source": "provider", "required": true, "description": "Tokens consumed before a correct evidence-backed answer." },
|
|
47
|
+
{ "id": "time-to-answer", "family": "discovery", "unit": "milliseconds", "source": "runner", "required": true, "description": "Elapsed time before a correct evidence-backed answer." },
|
|
48
|
+
{ "id": "evidence-citation-rate", "family": "discovery", "unit": "ratio", "source": "adjudicator", "required": true, "description": "Proportion of answer claims supported by required evidence." },
|
|
49
|
+
{ "id": "documentation-correctness", "family": "documentation", "unit": "ratio", "source": "adjudicator", "required": true, "description": "Proportion of reviewed claims agreeing with observed evidence." },
|
|
50
|
+
{ "id": "documentation-completeness", "family": "documentation", "unit": "ratio", "source": "adjudicator", "required": true, "description": "Proportion of required knowledge present for the declared scope." },
|
|
51
|
+
{ "id": "documentation-clarity", "family": "documentation", "unit": "ratio", "source": "human", "required": true, "description": "Proportion of reviewed documents understandable to the declared audience." },
|
|
52
|
+
{ "id": "documentation-maintainability", "family": "documentation", "unit": "ratio", "source": "human", "required": true, "description": "Proportion of critical documents with maintainable ownership and validation metadata." },
|
|
53
|
+
{ "id": "docbridge-runtime", "family": "operations", "unit": "milliseconds", "source": "doc-bridge", "required": true, "description": "Doc Bridge analysis and report runtime." },
|
|
54
|
+
{ "id": "study-cost", "family": "cost", "unit": "currency", "source": "runner", "required": true, "description": "Measured cost of analysis and controlled task execution." }
|
|
55
|
+
],
|
|
56
|
+
"outcomes": [
|
|
57
|
+
{ "id": "protocol-integrity", "statement": "The study protocol is valid, versioned, and reproducible.", "checks": [{ "id": "protocol-validation", "command": "ak-docs study protocol docs/study/protocol-v1.json --json" }] },
|
|
58
|
+
{ "id": "historical-evidence", "statement": "Historical observations preserve provenance, missing measurements, and limitations.", "checks": [{ "id": "history-validation", "command": "ak-docs study history docs/study/historical-evidence-v1.json --protocol docs/study/protocol-v1.json --json" }] },
|
|
59
|
+
{ "id": "controlled-comparison", "statement": "Controlled task results can be compared only under a fixed protocol and source revision.", "checks": [{ "id": "controlled-run-validation", "command": "ak-verify plan approved --allow-dirty --config .codex/verification.json && ak-verify start --config .codex/verification.json && ak-verify verify --config .codex/verification.json --json" }] },
|
|
60
|
+
{ "id": "documentation-quality", "statement": "Documentation quality is measured for correctness, completeness, clarity, and maintainability.", "checks": [{ "id": "documentation-quality-review", "command": "pnpm docs:typecheck" }] },
|
|
61
|
+
{ "id": "semantic-consistency", "statement": "Documentation claims can be compared with observed repository evidence.", "checks": [{ "id": "semantic-evidence-review", "command": "ak-docs study history docs/study/historical-evidence-v1.json --protocol docs/study/protocol-v1.json --json" }] },
|
|
62
|
+
{ "id": "agent-efficiency", "statement": "Agent task efficiency is measured with tokens, time, evidence, and task success.", "checks": [{ "id": "efficiency-metric-contract", "command": "pnpm exec vitest run tests/study-protocol.test.ts" }] },
|
|
63
|
+
{ "id": "privacy", "statement": "Published study artifacts contain no private repository names, paths, prompts, or raw responses.", "checks": [{ "id": "privacy-scan", "command": "rg -qi \"forbidden-pattern\" docs/study docs/spec/study-protocol-v1.md" }] },
|
|
64
|
+
{ "id": "recovery", "statement": "Invalid or incomplete evidence is rejected or preserved as explicit missing data.", "checks": [{ "id": "recovery-contract-tests", "command": "pnpm exec vitest run tests/study-protocol.test.ts" }] },
|
|
65
|
+
{ "id": "longitudinal-reporting", "statement": "Study runs are versioned and auditable over time.", "checks": [{ "id": "content-hash-validation", "command": "pnpm exec vitest run tests/study-protocol.test.ts" }] },
|
|
66
|
+
{ "id": "stopping-rules", "statement": "The study defines measurable stopping targets before controlled rounds begin.", "checks": [{ "id": "stopping-target-validation", "command": "ak-docs study protocol docs/study/protocol-v1.json --json" }] }
|
|
67
|
+
],
|
|
68
|
+
"budget": {
|
|
69
|
+
"maxTokensPerTask": 400000,
|
|
70
|
+
"maxRuntimeMsPerTask": 180000,
|
|
71
|
+
"maxRuns": 288,
|
|
72
|
+
"maxNetworkRequests": 0
|
|
73
|
+
},
|
|
74
|
+
"privacy": {
|
|
75
|
+
"mode": "anonymized",
|
|
76
|
+
"forbiddenFields": ["repository-content", "paths", "prompts", "credentials", "private-identifiers", "raw-agent-responses"],
|
|
77
|
+
"publicationRequiresHumanReview": true
|
|
78
|
+
},
|
|
79
|
+
"stopping": {
|
|
80
|
+
"minControlledRounds": 3,
|
|
81
|
+
"consecutiveNoMaterialImprovementRounds": 3,
|
|
82
|
+
"targets": [
|
|
83
|
+
{ "metricId": "tokens-to-answer", "direction": "decrease", "threshold": 0.25 },
|
|
84
|
+
{ "metricId": "time-to-answer", "direction": "decrease", "threshold": 0.2 },
|
|
85
|
+
{ "metricId": "task-success", "direction": "no-regression", "threshold": 0 }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"contentHashAlgo": "sha256-normalized-v1",
|
|
89
|
+
"contentHash": "fe26951579d9003f1cd616f12fb6d6007a60ec69db5efbb9acd5d80c817002d1"
|
|
90
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Study publication gate v1
|
|
3
|
+
description: Reviewable gates for publishing anonymized Doc Bridge efficiency measurements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Study publication gate v1
|
|
7
|
+
|
|
8
|
+
This gate prevents a smaller context payload, a provider-token measurement,
|
|
9
|
+
and a correct task result from being presented as the same claim.
|
|
10
|
+
|
|
11
|
+
## Required evidence
|
|
12
|
+
|
|
13
|
+
Before publishing a study result, all of the following must be present:
|
|
14
|
+
|
|
15
|
+
1. A versioned protocol, task suite, run plan, ledger, and result with content
|
|
16
|
+
hashes.
|
|
17
|
+
2. A current `ak-verify` run whose source revision and configuration match the
|
|
18
|
+
artifacts.
|
|
19
|
+
3. A privacy scan with zero forbidden matches.
|
|
20
|
+
4. Explicit classification of completed, partial, failed, blocked, and missing
|
|
21
|
+
observations.
|
|
22
|
+
5. Separate values for context payload, provider-token usage, latency, and
|
|
23
|
+
tokens-to-correct-action. Missing correctness evidence remains missing.
|
|
24
|
+
6. A human publication decision recorded by the tracking workflow.
|
|
25
|
+
|
|
26
|
+
## Reproduction
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
node bin/ak-docs.js study metrics docs/study/phase4-public-pilot-ledger-v1.json --json
|
|
30
|
+
node scripts/phase4-public-pilot-check.mjs
|
|
31
|
+
node scripts/study-privacy-gate.mjs docs/study
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The first command exposes the machine-readable metric contract. The second
|
|
35
|
+
checks the pilot's hashes, bindings, scope, and arithmetic. The third scans
|
|
36
|
+
publication-bound artifacts without printing matched secret values.
|
|
37
|
+
|
|
38
|
+
## Claim boundaries
|
|
39
|
+
|
|
40
|
+
- `context payload reduction` is not provider-token reduction.
|
|
41
|
+
- `provider-token reduction` is not a currency saving unless configured pricing
|
|
42
|
+
and provider usage are both available.
|
|
43
|
+
- `tokens-to-correct-action` is `null` when semantic success is not established.
|
|
44
|
+
- A bounded pilot is not evidence of enterprise-wide generalization.
|
|
45
|
+
- Publication requires human review even when every deterministic check passes.
|