@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,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "study-task-suite",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"suiteVersion": "v1",
|
|
5
|
+
"protocolVersion": "v1",
|
|
6
|
+
"title": "Controlled documentation and knowledge discovery task suite",
|
|
7
|
+
"population": ["consumer-01", "consumer-02", "consumer-03", "consumer-04", "consumer-05", "consumer-06"],
|
|
8
|
+
"modelIds": ["low-cost-model", "reference-model"],
|
|
9
|
+
"scenarioIds": ["repository-only", "deterministic-doc-bridge", "registry-assisted"],
|
|
10
|
+
"maxTokensPerTask": 400000,
|
|
11
|
+
"maxRuntimeMsPerTask": 180000,
|
|
12
|
+
"maxRuns": 288,
|
|
13
|
+
"replicatesPerTask": 2,
|
|
14
|
+
"ordering": { "strategy": "balanced-counter-order", "seed": "phase-1-baseline" },
|
|
15
|
+
"tasks": [
|
|
16
|
+
{
|
|
17
|
+
"id": "consumer-01-discovery", "repositoryId": "consumer-01", "category": "discovery", "difficulty": "easy",
|
|
18
|
+
"objective": "Locate the primary entrypoints, ownership boundaries, and canonical documentation for the consumer project.",
|
|
19
|
+
"initialContext": ["Start with the repository root and declared documentation."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Use private identifiers in the result"],
|
|
20
|
+
"expectedOutcome": "A concise map names the entrypoints, owners, and evidence paths without unsupported claims.", "evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Paths and declarations supporting the discovered entrypoints and ownership.", "source": "artifact" }], "acceptanceChecks": [{ "id": "discovery-check", "command": "ak-docs discover --json", "expected": "The command exits successfully and emits structured discovery evidence." }], "budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 },
|
|
21
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is required to discover repository structure." }, "database": { "required": false, "reason": "No database is required to discover repository structure." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the discovery task." }, "ui": { "required": false, "reason": "UI behavior is not part of the discovery task." }, "docs": { "required": true } },
|
|
22
|
+
"rubric": { "success": ["All required entrypoints and owners are correct and evidenced."], "partial": ["The main entrypoint is correct but one non-critical boundary or citation is missing."], "incorrect": ["The answer identifies a wrong entrypoint or owner."], "incomplete": ["The answer does not cover the requested repository scope."], "blocked": ["Required repository evidence cannot be accessed or validated."] }, "variantGroup": "consumer-01-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin at package and application entrypoints." }, { "id": "variant-b", "label": "Ownership-first wording", "context": "Begin at ownership and documentation routing declarations." }]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "consumer-01-architecture", "repositoryId": "consumer-01", "category": "architecture", "difficulty": "medium",
|
|
26
|
+
"objective": "Describe the project architecture as connected components and identify one boundary that deserves review.",
|
|
27
|
+
"initialContext": ["Use observed imports, workspace metadata, and documentation claims."], "allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"],
|
|
28
|
+
"expectedOutcome": "A bounded architecture view identifies components, directional relationships, and one evidence-backed attention point.", "evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed entities and relations supporting the architecture view.", "source": "artifact" }], "acceptanceChecks": [{ "id": "architecture-check", "command": "ak-docs map --json", "expected": "The command emits a bounded architecture map with evidence references." }], "budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 },
|
|
29
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint execution is needed for static architecture mapping." }, "database": { "required": false, "reason": "No database execution is needed for static architecture mapping." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the architecture task." }, "ui": { "required": false, "reason": "The task evaluates architecture evidence, not UI behavior." }, "docs": { "required": true } },
|
|
30
|
+
"rubric": { "success": ["The map is bounded, directional, and every attention point 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 architecture evidence."], "blocked": ["The architecture artifact cannot be generated or inspected."] }, "variantGroup": "consumer-01-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connections." }]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "consumer-01-documentation", "repositoryId": "consumer-01", "category": "documentation", "difficulty": "hard",
|
|
34
|
+
"objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim and classify it with evidence.",
|
|
35
|
+
"initialContext": ["Compare documentation claims with current source and generated indexes."], "allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"],
|
|
36
|
+
"expectedOutcome": "The review reports a precise documentation issue, its evidence, confidence, limitation, and recommended next action.", "evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and source evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for semantic judgment.", "source": "human" }], "acceptanceChecks": [{ "id": "documentation-check", "command": "ak-docs audit documentation --json", "expected": "The audit emits measurable documentation findings and limitations." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 },
|
|
37
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The documentation classification does not require endpoint execution." }, "database": { "required": false, "reason": "The documentation classification does not require database execution." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the bounded audit task." }, "ui": { "required": false, "reason": "UI behavior is outside the documentation classification task." }, "docs": { "required": true } },
|
|
38
|
+
"rubric": { "success": ["The issue category, evidence, confidence, and limitation are all correct."], "partial": ["The issue is real but the category, confidence, or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence to classify it."], "blocked": ["The required source or documentation corpus is unavailable."] }, "variantGroup": "consumer-01-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to source." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed source and find its documentation coverage." }]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "consumer-01-implementation", "repositoryId": "consumer-01", "category": "implementation", "difficulty": "hard",
|
|
42
|
+
"objective": "Propose a minimal documentation-only correction for a verified knowledge gap without changing source code.",
|
|
43
|
+
"initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence", "Expose private identifiers"],
|
|
44
|
+
"expectedOutcome": "A proposed patch is bounded to the correct documentation location, preserves existing conventions, and states how it would be verified.", "evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and the knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal after approval.", "source": "runner" }], "acceptanceChecks": [{ "id": "proposal-check", "command": "ak-docs check --json", "expected": "The check command exits successfully for the declared repository contract." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 },
|
|
45
|
+
"surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is changed by a documentation-only proposal." }, "database": { "required": false, "reason": "No database is changed by a documentation-only proposal." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for proposal validation." }, "ui": { "required": false, "reason": "No UI is changed by a documentation-only proposal." }, "docs": { "required": true } },
|
|
46
|
+
"rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location, convention, 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."] }, "variantGroup": "consumer-01-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." }]
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
{
|
|
50
|
+
"id": "consumer-02-discovery", "repositoryId": "consumer-02", "category": "discovery", "difficulty": "easy", "objective": "Locate the primary entrypoints, ownership boundaries, and canonical documentation for the consumer project.", "initialContext": ["Start with the repository root and declared documentation."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Use private identifiers in the result"], "expectedOutcome": "A concise map names the entrypoints, owners, and evidence paths without unsupported claims.", "evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Paths and declarations supporting the discovered entrypoints and ownership.", "source": "artifact" }], "acceptanceChecks": [{ "id": "discovery-check", "command": "ak-docs discover --json", "expected": "The command exits successfully and emits structured discovery evidence." }], "budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is required to discover repository structure." }, "database": { "required": false, "reason": "No database is required to discover repository structure." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the discovery task." }, "ui": { "required": false, "reason": "UI behavior is not part of the discovery task." }, "docs": { "required": true } }, "rubric": { "success": ["All required entrypoints and owners are correct and evidenced."], "partial": ["The main entrypoint is correct but one non-critical boundary or citation is missing."], "incorrect": ["The answer identifies a wrong entrypoint or owner."], "incomplete": ["The answer does not cover the requested repository scope."], "blocked": ["Required repository evidence cannot be accessed or validated."] }, "variantGroup": "consumer-02-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin at package and application entrypoints." }, { "id": "variant-b", "label": "Ownership-first wording", "context": "Begin at ownership and documentation routing declarations." }] },
|
|
51
|
+
{
|
|
52
|
+
"id": "consumer-02-architecture", "repositoryId": "consumer-02", "category": "architecture", "difficulty": "medium", "objective": "Describe the project architecture as connected components and identify one boundary that deserves review.", "initialContext": ["Use observed imports, workspace metadata, and documentation claims."], "allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"], "expectedOutcome": "A bounded architecture view identifies components, directional relationships, and one evidence-backed attention point.", "evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed entities and relations supporting the architecture view.", "source": "artifact" }], "acceptanceChecks": [{ "id": "architecture-check", "command": "ak-docs map --json", "expected": "The command emits a bounded architecture map with evidence references." }], "budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint execution is needed for static architecture mapping." }, "database": { "required": false, "reason": "No database execution is needed for static architecture mapping." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the architecture task." }, "ui": { "required": false, "reason": "The task evaluates architecture evidence, not UI behavior." }, "docs": { "required": true } }, "rubric": { "success": ["The map is bounded, directional, and every attention point 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 architecture evidence."], "blocked": ["The architecture artifact cannot be generated or inspected."] }, "variantGroup": "consumer-02-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connections." }] },
|
|
53
|
+
{
|
|
54
|
+
"id": "consumer-02-documentation", "repositoryId": "consumer-02", "category": "documentation", "difficulty": "hard", "objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim and classify it with evidence.", "initialContext": ["Compare documentation claims with current source and generated indexes."], "allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"], "expectedOutcome": "The review reports a precise documentation issue, its evidence, confidence, limitation, and recommended next action.", "evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and source evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for semantic judgment.", "source": "human" }], "acceptanceChecks": [{ "id": "documentation-check", "command": "ak-docs audit documentation --json", "expected": "The audit emits measurable documentation findings and limitations." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The documentation classification does not require endpoint execution." }, "database": { "required": false, "reason": "The documentation classification does not require database execution." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the bounded audit task." }, "ui": { "required": false, "reason": "UI behavior is outside the documentation classification task." }, "docs": { "required": true } }, "rubric": { "success": ["The issue category, evidence, confidence, and limitation are all correct."], "partial": ["The issue is real but the category, confidence, or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence to classify it."], "blocked": ["The required source or documentation corpus is unavailable."] }, "variantGroup": "consumer-02-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to source." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed source and find its documentation coverage." }] },
|
|
55
|
+
{
|
|
56
|
+
"id": "consumer-02-implementation", "repositoryId": "consumer-02", "category": "implementation", "difficulty": "hard", "objective": "Propose a minimal documentation-only correction for a verified knowledge gap without changing source code.", "initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence", "Expose private identifiers"], "expectedOutcome": "A proposed patch is bounded to the correct documentation location, preserves existing conventions, and states how it would be verified.", "evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and the knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal after approval.", "source": "runner" }], "acceptanceChecks": [{ "id": "proposal-check", "command": "ak-docs check --json", "expected": "The check command exits successfully for the declared repository contract." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is changed by a documentation-only proposal." }, "database": { "required": false, "reason": "No database is changed by a documentation-only proposal." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for proposal validation." }, "ui": { "required": false, "reason": "No UI is changed by a documentation-only proposal." }, "docs": { "required": true } }, "rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location, convention, 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."] }, "variantGroup": "consumer-02-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." }] },
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
"id": "consumer-03-discovery", "repositoryId": "consumer-03", "category": "discovery", "difficulty": "easy", "objective": "Locate the primary entrypoints, ownership boundaries, and canonical documentation for the consumer project.", "initialContext": ["Start with the repository root and declared documentation."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Use private identifiers in the result"], "expectedOutcome": "A concise map names the entrypoints, owners, and evidence paths without unsupported claims.", "evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Paths and declarations supporting the discovered entrypoints and ownership.", "source": "artifact" }], "acceptanceChecks": [{ "id": "discovery-check", "command": "ak-docs discover --json", "expected": "The command exits successfully and emits structured discovery evidence." }], "budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is required to discover repository structure." }, "database": { "required": false, "reason": "No database is required to discover repository structure." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the discovery task." }, "ui": { "required": false, "reason": "UI behavior is not part of the discovery task." }, "docs": { "required": true } }, "rubric": { "success": ["All required entrypoints and owners are correct and evidenced."], "partial": ["The main entrypoint is correct but one non-critical boundary or citation is missing."], "incorrect": ["The answer identifies a wrong entrypoint or owner."], "incomplete": ["The answer does not cover the requested repository scope."], "blocked": ["Required repository evidence cannot be accessed or validated."] }, "variantGroup": "consumer-03-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin at package and application entrypoints." }, { "id": "variant-b", "label": "Ownership-first wording", "context": "Begin at ownership and documentation routing declarations." }] },
|
|
60
|
+
{
|
|
61
|
+
"id": "consumer-03-architecture", "repositoryId": "consumer-03", "category": "architecture", "difficulty": "medium", "objective": "Describe the project architecture as connected components and identify one boundary that deserves review.", "initialContext": ["Use observed imports, workspace metadata, and documentation claims."], "allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"], "expectedOutcome": "A bounded architecture view identifies components, directional relationships, and one evidence-backed attention point.", "evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed entities and relations supporting the architecture view.", "source": "artifact" }], "acceptanceChecks": [{ "id": "architecture-check", "command": "ak-docs map --json", "expected": "The command emits a bounded architecture map with evidence references." }], "budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint execution is needed for static architecture mapping." }, "database": { "required": false, "reason": "No database execution is needed for static architecture mapping." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the architecture task." }, "ui": { "required": false, "reason": "The task evaluates architecture evidence, not UI behavior." }, "docs": { "required": true } }, "rubric": { "success": ["The map is bounded, directional, and every attention point 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 architecture evidence."], "blocked": ["The architecture artifact cannot be generated or inspected."] }, "variantGroup": "consumer-03-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connections." }] },
|
|
62
|
+
{
|
|
63
|
+
"id": "consumer-03-documentation", "repositoryId": "consumer-03", "category": "documentation", "difficulty": "hard", "objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim and classify it with evidence.", "initialContext": ["Compare documentation claims with current source and generated indexes."], "allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"], "expectedOutcome": "The review reports a precise documentation issue, its evidence, confidence, limitation, and recommended next action.", "evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and source evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for semantic judgment.", "source": "human" }], "acceptanceChecks": [{ "id": "documentation-check", "command": "ak-docs audit documentation --json", "expected": "The audit emits measurable documentation findings and limitations." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The documentation classification does not require endpoint execution." }, "database": { "required": false, "reason": "The documentation classification does not require database execution." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the bounded audit task." }, "ui": { "required": false, "reason": "UI behavior is outside the documentation classification task." }, "docs": { "required": true } }, "rubric": { "success": ["The issue category, evidence, confidence, and limitation are all correct."], "partial": ["The issue is real but the category, confidence, or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence to classify it."], "blocked": ["The required source or documentation corpus is unavailable."] }, "variantGroup": "consumer-03-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to source." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed source and find its documentation coverage." }] },
|
|
64
|
+
{
|
|
65
|
+
"id": "consumer-03-implementation", "repositoryId": "consumer-03", "category": "implementation", "difficulty": "hard", "objective": "Propose a minimal documentation-only correction for a verified knowledge gap without changing source code.", "initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence", "Expose private identifiers"], "expectedOutcome": "A proposed patch is bounded to the correct documentation location, preserves existing conventions, and states how it would be verified.", "evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and the knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal after approval.", "source": "runner" }], "acceptanceChecks": [{ "id": "proposal-check", "command": "ak-docs check --json", "expected": "The check command exits successfully for the declared repository contract." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is changed by a documentation-only proposal." }, "database": { "required": false, "reason": "No database is changed by a documentation-only proposal." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for proposal validation." }, "ui": { "required": false, "reason": "No UI is changed by a documentation-only proposal." }, "docs": { "required": true } }, "rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location, convention, 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."] }, "variantGroup": "consumer-03-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." }] },
|
|
66
|
+
|
|
67
|
+
{
|
|
68
|
+
"id": "consumer-04-discovery", "repositoryId": "consumer-04", "category": "discovery", "difficulty": "easy", "objective": "Locate the primary entrypoints, ownership boundaries, and canonical documentation for the consumer project.", "initialContext": ["Start with the repository root and declared documentation."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Use private identifiers in the result"], "expectedOutcome": "A concise map names the entrypoints, owners, and evidence paths without unsupported claims.", "evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Paths and declarations supporting the discovered entrypoints and ownership.", "source": "artifact" }], "acceptanceChecks": [{ "id": "discovery-check", "command": "ak-docs discover --json", "expected": "The command exits successfully and emits structured discovery evidence." }], "budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is required to discover repository structure." }, "database": { "required": false, "reason": "No database is required to discover repository structure." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the discovery task." }, "ui": { "required": false, "reason": "UI behavior is not part of the discovery task." }, "docs": { "required": true } }, "rubric": { "success": ["All required entrypoints and owners are correct and evidenced."], "partial": ["The main entrypoint is correct but one non-critical boundary or citation is missing."], "incorrect": ["The answer identifies a wrong entrypoint or owner."], "incomplete": ["The answer does not cover the requested repository scope."], "blocked": ["Required repository evidence cannot be accessed or validated."] }, "variantGroup": "consumer-04-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin at package and application entrypoints." }, { "id": "variant-b", "label": "Ownership-first wording", "context": "Begin at ownership and documentation routing declarations." }] },
|
|
69
|
+
{
|
|
70
|
+
"id": "consumer-04-architecture", "repositoryId": "consumer-04", "category": "architecture", "difficulty": "medium", "objective": "Describe the project architecture as connected components and identify one boundary that deserves review.", "initialContext": ["Use observed imports, workspace metadata, and documentation claims."], "allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"], "expectedOutcome": "A bounded architecture view identifies components, directional relationships, and one evidence-backed attention point.", "evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed entities and relations supporting the architecture view.", "source": "artifact" }], "acceptanceChecks": [{ "id": "architecture-check", "command": "ak-docs map --json", "expected": "The command emits a bounded architecture map with evidence references." }], "budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint execution is needed for static architecture mapping." }, "database": { "required": false, "reason": "No database execution is needed for static architecture mapping." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the architecture task." }, "ui": { "required": false, "reason": "The task evaluates architecture evidence, not UI behavior." }, "docs": { "required": true } }, "rubric": { "success": ["The map is bounded, directional, and every attention point 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 architecture evidence."], "blocked": ["The architecture artifact cannot be generated or inspected."] }, "variantGroup": "consumer-04-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connections." }] },
|
|
71
|
+
{
|
|
72
|
+
"id": "consumer-04-documentation", "repositoryId": "consumer-04", "category": "documentation", "difficulty": "hard", "objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim and classify it with evidence.", "initialContext": ["Compare documentation claims with current source and generated indexes."], "allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"], "expectedOutcome": "The review reports a precise documentation issue, its evidence, confidence, limitation, and recommended next action.", "evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and source evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for semantic judgment.", "source": "human" }], "acceptanceChecks": [{ "id": "documentation-check", "command": "ak-docs audit documentation --json", "expected": "The audit emits measurable documentation findings and limitations." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The documentation classification does not require endpoint execution." }, "database": { "required": false, "reason": "The documentation classification does not require database execution." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the bounded audit task." }, "ui": { "required": false, "reason": "UI behavior is outside the documentation classification task." }, "docs": { "required": true } }, "rubric": { "success": ["The issue category, evidence, confidence, and limitation are all correct."], "partial": ["The issue is real but the category, confidence, or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence to classify it."], "blocked": ["The required source or documentation corpus is unavailable."] }, "variantGroup": "consumer-04-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to source." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed source and find its documentation coverage." }] },
|
|
73
|
+
{
|
|
74
|
+
"id": "consumer-04-implementation", "repositoryId": "consumer-04", "category": "implementation", "difficulty": "hard", "objective": "Propose a minimal documentation-only correction for a verified knowledge gap without changing source code.", "initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence", "Expose private identifiers"], "expectedOutcome": "A proposed patch is bounded to the correct documentation location, preserves existing conventions, and states how it would be verified.", "evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and the knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal after approval.", "source": "runner" }], "acceptanceChecks": [{ "id": "proposal-check", "command": "ak-docs check --json", "expected": "The check command exits successfully for the declared repository contract." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is changed by a documentation-only proposal." }, "database": { "required": false, "reason": "No database is changed by a documentation-only proposal." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for proposal validation." }, "ui": { "required": false, "reason": "No UI is changed by a documentation-only proposal." }, "docs": { "required": true } }, "rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location, convention, 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."] }, "variantGroup": "consumer-04-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." }] },
|
|
75
|
+
|
|
76
|
+
{
|
|
77
|
+
"id": "consumer-05-discovery", "repositoryId": "consumer-05", "category": "discovery", "difficulty": "easy", "objective": "Locate the primary entrypoints, ownership boundaries, and canonical documentation for the consumer project.", "initialContext": ["Start with the repository root and declared documentation."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Use private identifiers in the result"], "expectedOutcome": "A concise map names the entrypoints, owners, and evidence paths without unsupported claims.", "evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Paths and declarations supporting the discovered entrypoints and ownership.", "source": "artifact" }], "acceptanceChecks": [{ "id": "discovery-check", "command": "ak-docs discover --json", "expected": "The command exits successfully and emits structured discovery evidence." }], "budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is required to discover repository structure." }, "database": { "required": false, "reason": "No database is required to discover repository structure." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the discovery task." }, "ui": { "required": false, "reason": "UI behavior is not part of the discovery task." }, "docs": { "required": true } }, "rubric": { "success": ["All required entrypoints and owners are correct and evidenced."], "partial": ["The main entrypoint is correct but one non-critical boundary or citation is missing."], "incorrect": ["The answer identifies a wrong entrypoint or owner."], "incomplete": ["The answer does not cover the requested repository scope."], "blocked": ["Required repository evidence cannot be accessed or validated."] }, "variantGroup": "consumer-05-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin at package and application entrypoints." }, { "id": "variant-b", "label": "Ownership-first wording", "context": "Begin at ownership and documentation routing declarations." }] },
|
|
78
|
+
{
|
|
79
|
+
"id": "consumer-05-architecture", "repositoryId": "consumer-05", "category": "architecture", "difficulty": "medium", "objective": "Describe the project architecture as connected components and identify one boundary that deserves review.", "initialContext": ["Use observed imports, workspace metadata, and documentation claims."], "allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"], "expectedOutcome": "A bounded architecture view identifies components, directional relationships, and one evidence-backed attention point.", "evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed entities and relations supporting the architecture view.", "source": "artifact" }], "acceptanceChecks": [{ "id": "architecture-check", "command": "ak-docs map --json", "expected": "The command emits a bounded architecture map with evidence references." }], "budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint execution is needed for static architecture mapping." }, "database": { "required": false, "reason": "No database execution is needed for static architecture mapping." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the architecture task." }, "ui": { "required": false, "reason": "The task evaluates architecture evidence, not UI behavior." }, "docs": { "required": true } }, "rubric": { "success": ["The map is bounded, directional, and every attention point 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 architecture evidence."], "blocked": ["The architecture artifact cannot be generated or inspected."] }, "variantGroup": "consumer-05-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connections." }] },
|
|
80
|
+
{
|
|
81
|
+
"id": "consumer-05-documentation", "repositoryId": "consumer-05", "category": "documentation", "difficulty": "hard", "objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim and classify it with evidence.", "initialContext": ["Compare documentation claims with current source and generated indexes."], "allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"], "expectedOutcome": "The review reports a precise documentation issue, its evidence, confidence, limitation, and recommended next action.", "evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and source evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for semantic judgment.", "source": "human" }], "acceptanceChecks": [{ "id": "documentation-check", "command": "ak-docs audit documentation --json", "expected": "The audit emits measurable documentation findings and limitations." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The documentation classification does not require endpoint execution." }, "database": { "required": false, "reason": "The documentation classification does not require database execution." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the bounded audit task." }, "ui": { "required": false, "reason": "UI behavior is outside the documentation classification task." }, "docs": { "required": true } }, "rubric": { "success": ["The issue category, evidence, confidence, and limitation are all correct."], "partial": ["The issue is real but the category, confidence, or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence to classify it."], "blocked": ["The required source or documentation corpus is unavailable."] }, "variantGroup": "consumer-05-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to source." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed source and find its documentation coverage." }] },
|
|
82
|
+
{
|
|
83
|
+
"id": "consumer-05-implementation", "repositoryId": "consumer-05", "category": "implementation", "difficulty": "hard", "objective": "Propose a minimal documentation-only correction for a verified knowledge gap without changing source code.", "initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence", "Expose private identifiers"], "expectedOutcome": "A proposed patch is bounded to the correct documentation location, preserves existing conventions, and states how it would be verified.", "evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and the knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal after approval.", "source": "runner" }], "acceptanceChecks": [{ "id": "proposal-check", "command": "ak-docs check --json", "expected": "The check command exits successfully for the declared repository contract." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is changed by a documentation-only proposal." }, "database": { "required": false, "reason": "No database is changed by a documentation-only proposal." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for proposal validation." }, "ui": { "required": false, "reason": "No UI is changed by a documentation-only proposal." }, "docs": { "required": true } }, "rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location, convention, 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."] }, "variantGroup": "consumer-05-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." }] },
|
|
84
|
+
|
|
85
|
+
{
|
|
86
|
+
"id": "consumer-06-discovery", "repositoryId": "consumer-06", "category": "discovery", "difficulty": "easy", "objective": "Locate the primary entrypoints, ownership boundaries, and canonical documentation for the consumer project.", "initialContext": ["Start with the repository root and declared documentation."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Use private identifiers in the result"], "expectedOutcome": "A concise map names the entrypoints, owners, and evidence paths without unsupported claims.", "evidenceRequirements": [{ "id": "entrypoint-evidence", "description": "Paths and declarations supporting the discovered entrypoints and ownership.", "source": "artifact" }], "acceptanceChecks": [{ "id": "discovery-check", "command": "ak-docs discover --json", "expected": "The command exits successfully and emits structured discovery evidence." }], "budget": { "maxTokens": 6000, "maxRuntimeMs": 60000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is required to discover repository structure." }, "database": { "required": false, "reason": "No database is required to discover repository structure." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the discovery task." }, "ui": { "required": false, "reason": "UI behavior is not part of the discovery task." }, "docs": { "required": true } }, "rubric": { "success": ["All required entrypoints and owners are correct and evidenced."], "partial": ["The main entrypoint is correct but one non-critical boundary or citation is missing."], "incorrect": ["The answer identifies a wrong entrypoint or owner."], "incomplete": ["The answer does not cover the requested repository scope."], "blocked": ["Required repository evidence cannot be accessed or validated."] }, "variantGroup": "consumer-06-discovery", "variants": [{ "id": "variant-a", "label": "Entrypoint-first wording", "context": "Begin at package and application entrypoints." }, { "id": "variant-b", "label": "Ownership-first wording", "context": "Begin at ownership and documentation routing declarations." }] },
|
|
87
|
+
{
|
|
88
|
+
"id": "consumer-06-architecture", "repositoryId": "consumer-06", "category": "architecture", "difficulty": "medium", "objective": "Describe the project architecture as connected components and identify one boundary that deserves review.", "initialContext": ["Use observed imports, workspace metadata, and documentation claims."], "allowedTools": ["repository-read", "doc-bridge-map", "shell-read"], "forbiddenActions": ["Modify files", "Infer runtime edges without evidence"], "expectedOutcome": "A bounded architecture view identifies components, directional relationships, and one evidence-backed attention point.", "evidenceRequirements": [{ "id": "architecture-evidence", "description": "Observed entities and relations supporting the architecture view.", "source": "artifact" }], "acceptanceChecks": [{ "id": "architecture-check", "command": "ak-docs map --json", "expected": "The command emits a bounded architecture map with evidence references." }], "budget": { "maxTokens": 8000, "maxRuntimeMs": 90000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint execution is needed for static architecture mapping." }, "database": { "required": false, "reason": "No database execution is needed for static architecture mapping." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the architecture task." }, "ui": { "required": false, "reason": "The task evaluates architecture evidence, not UI behavior." }, "docs": { "required": true } }, "rubric": { "success": ["The map is bounded, directional, and every attention point 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 architecture evidence."], "blocked": ["The architecture artifact cannot be generated or inspected."] }, "variantGroup": "consumer-06-architecture", "variants": [{ "id": "variant-a", "label": "Component-first wording", "context": "Start by grouping the observed components." }, { "id": "variant-b", "label": "Relation-first wording", "context": "Start by tracing the strongest observed connections." }] },
|
|
89
|
+
{
|
|
90
|
+
"id": "consumer-06-documentation", "repositoryId": "consumer-06", "category": "documentation", "difficulty": "hard", "objective": "Find one stale, missing, unclear, redundant, or contradictory documentation claim and classify it with evidence.", "initialContext": ["Compare documentation claims with current source and generated indexes."], "allowedTools": ["repository-read", "doc-bridge-audit", "shell-read"], "forbiddenActions": ["Edit documentation", "Treat an unverified semantic inference as fact"], "expectedOutcome": "The review reports a precise documentation issue, its evidence, confidence, limitation, and recommended next action.", "evidenceRequirements": [{ "id": "documentation-evidence", "description": "Document and source evidence for the classified documentation issue.", "source": "artifact" }, { "id": "review-limitation", "description": "A limitation or confidence statement for semantic judgment.", "source": "human" }], "acceptanceChecks": [{ "id": "documentation-check", "command": "ak-docs audit documentation --json", "expected": "The audit emits measurable documentation findings and limitations." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "The documentation classification does not require endpoint execution." }, "database": { "required": false, "reason": "The documentation classification does not require database execution." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for the bounded audit task." }, "ui": { "required": false, "reason": "UI behavior is outside the documentation classification task." }, "docs": { "required": true } }, "rubric": { "success": ["The issue category, evidence, confidence, and limitation are all correct."], "partial": ["The issue is real but the category, confidence, or limitation needs correction."], "incorrect": ["The claimed issue is contradicted by current evidence."], "incomplete": ["The answer names a concern without enough evidence to classify it."], "blocked": ["The required source or documentation corpus is unavailable."] }, "variantGroup": "consumer-06-documentation", "variants": [{ "id": "variant-a", "label": "Claim-first wording", "context": "Begin with a documentation claim and trace it to source." }, { "id": "variant-b", "label": "Evidence-first wording", "context": "Begin with observed source and find its documentation coverage." }] },
|
|
91
|
+
{
|
|
92
|
+
"id": "consumer-06-implementation", "repositoryId": "consumer-06", "category": "implementation", "difficulty": "hard", "objective": "Propose a minimal documentation-only correction for a verified knowledge gap without changing source code.", "initialContext": ["Use the preceding discovery, architecture, and documentation evidence as context."], "allowedTools": ["repository-read", "doc-bridge-query", "shell-read"], "forbiddenActions": ["Modify files", "Invent behavior not present in evidence", "Expose private identifiers"], "expectedOutcome": "A proposed patch is bounded to the correct documentation location, preserves existing conventions, and states how it would be verified.", "evidenceRequirements": [{ "id": "patch-evidence", "description": "Evidence identifying the target document and the knowledge gap.", "source": "artifact" }, { "id": "verification-plan", "description": "A real command or review step that would validate the proposal after approval.", "source": "runner" }], "acceptanceChecks": [{ "id": "proposal-check", "command": "ak-docs check --json", "expected": "The check command exits successfully for the declared repository contract." }], "budget": { "maxTokens": 10000, "maxRuntimeMs": 120000 }, "surfaces": { "logic": { "required": true }, "endpoint": { "required": false, "reason": "No endpoint is changed by a documentation-only proposal." }, "database": { "required": false, "reason": "No database is changed by a documentation-only proposal." }, "cli": { "required": true }, "mcp": { "required": false, "reason": "MCP is not required for proposal validation." }, "ui": { "required": false, "reason": "No UI is changed by a documentation-only proposal." }, "docs": { "required": true } }, "rubric": { "success": ["The proposal is minimal, correctly scoped, evidence-backed, and verifiable."], "partial": ["The proposal is safe but needs a location, convention, 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."] }, "variantGroup": "consumer-06-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." }] }
|
|
93
|
+
],
|
|
94
|
+
"contentHashAlgo": "sha256-normalized-v1",
|
|
95
|
+
"contentHash": "d7810828bce3c6616f00897fd7c92dfa4ecdf12e549923795cd95cc81a2b0029"
|
|
96
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Token efficiency improvement plan
|
|
3
|
+
description: A versioned, evidence-driven plan for reducing agent token consumption without reducing correctness.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Token efficiency improvement plan
|
|
7
|
+
|
|
8
|
+
Status: `complete-with-bounded-publication-claims`
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Reduce the amount of agent context and provider usage required to complete a
|
|
13
|
+
correct, evidence-backed repository task. The study must distinguish payload
|
|
14
|
+
reduction from useful token reduction and must never trade correctness, safety,
|
|
15
|
+
or evidence quality for a smaller response.
|
|
16
|
+
|
|
17
|
+
The primary product metric is:
|
|
18
|
+
|
|
19
|
+
> **Tokens to correct action** — provider input and output tokens consumed from
|
|
20
|
+
> the start of a controlled task until the agent produces a correct,
|
|
21
|
+
> evidence-backed result and passes the task's applicable acceptance checks.
|
|
22
|
+
|
|
23
|
+
If a task does not reach a correct action, this metric is `null`. It must not be
|
|
24
|
+
estimated from an unsuccessful or merely plausible response.
|
|
25
|
+
|
|
26
|
+
## What existing evidence means
|
|
27
|
+
|
|
28
|
+
The existing study remains immutable historical evidence. It currently shows a
|
|
29
|
+
directional reduction in provider-token-equivalent units for one controlled
|
|
30
|
+
comparison, and a much larger reduction in serialized context payload for a
|
|
31
|
+
bounded retrieval fixture. These are different measurements.
|
|
32
|
+
|
|
33
|
+
The existing evidence does **not** yet prove a reduction in tokens to a correct
|
|
34
|
+
action because the independent adjudication sample recorded no semantic
|
|
35
|
+
successes in either comparison arm. A new protocol and a fresh baseline are
|
|
36
|
+
required before making a stronger claim.
|
|
37
|
+
|
|
38
|
+
## Scope
|
|
39
|
+
|
|
40
|
+
In scope:
|
|
41
|
+
|
|
42
|
+
- deterministic CLI, MCP, and retriever context delivery;
|
|
43
|
+
- provider token and latency attribution;
|
|
44
|
+
- tool calls, clarification requests, and rework;
|
|
45
|
+
- evidence retrieval and task acceptance;
|
|
46
|
+
- optional Registry-agent assistance as a separate scenario;
|
|
47
|
+
- anonymized, reproducible study artifacts;
|
|
48
|
+
- regression gates for context size, correctness, safety, and total cost.
|
|
49
|
+
|
|
50
|
+
Out of scope for this plan:
|
|
51
|
+
|
|
52
|
+
- a universal token-saving guarantee for every model or repository;
|
|
53
|
+
- replacing deterministic evidence with an LLM-generated summary;
|
|
54
|
+
- publishing raw prompts, repository content, private paths, or raw responses;
|
|
55
|
+
- optimizing a single model at the expense of portability;
|
|
56
|
+
- changing historical results to make them comparable with the new protocol.
|
|
57
|
+
|
|
58
|
+
## North-star and supporting metrics
|
|
59
|
+
|
|
60
|
+
| Metric | Definition | Direction | Evidence class |
|
|
61
|
+
| --- | --- | --- | --- |
|
|
62
|
+
| `tokens-to-correct-action` | Provider input + output tokens until a correct action passes acceptance checks | lower | controlled |
|
|
63
|
+
| `correct-action-rate` | Tasks with correct evidence and passing acceptance checks / eligible tasks | higher | controlled |
|
|
64
|
+
| `context-tokens-p95` | P95 tokens in the context supplied by Doc Bridge before task execution | lower | deterministic/provider |
|
|
65
|
+
| `time-to-first-evidence` | Time until the first required evidence item is found | lower | runner |
|
|
66
|
+
| `time-to-correct-action-p95` | P95 time among tasks reaching a correct action | lower | runner |
|
|
67
|
+
| `tool-calls-per-correct-action` | Tool calls used by successful tasks | lower | provider/runner |
|
|
68
|
+
| `clarification-rate` | Tasks requiring human clarification | lower, unless ambiguity is real | runner |
|
|
69
|
+
| `rework-rate` | Tasks requiring a corrective second attempt | lower | runner |
|
|
70
|
+
| `evidence-precision` | Returned evidence that is relevant to the declared task | higher | adjudicator |
|
|
71
|
+
| `evidence-recall` | Required evidence found by the workflow | higher | adjudicator |
|
|
72
|
+
| `safety-rate` | Tasks with no unsafe or unauthorized action | higher | acceptance |
|
|
73
|
+
| `total-cost-per-correct-action` | Doc Bridge + agent + adjudicator cost for successful tasks | lower | controlled |
|
|
74
|
+
|
|
75
|
+
Provider token counts and estimates are separate dimensions. A report must
|
|
76
|
+
label the token method for every observation and must not combine provider and
|
|
77
|
+
estimated values in one aggregate.
|
|
78
|
+
|
|
79
|
+
## Controlled scenarios
|
|
80
|
+
|
|
81
|
+
Every comparison uses the same task, repository snapshot, model, prompt
|
|
82
|
+
contract, tool configuration, and acceptance contract where applicable.
|
|
83
|
+
|
|
84
|
+
1. `repository-only`: the agent receives the repository through the declared
|
|
85
|
+
baseline workflow.
|
|
86
|
+
2. `deterministic-doc-bridge`: the agent receives the deterministic Doc Bridge
|
|
87
|
+
handoff and progressive evidence retrieval.
|
|
88
|
+
3. `registry-assisted`: the deterministic workflow may receive a separately
|
|
89
|
+
attributed proposal from the configured Registry agent.
|
|
90
|
+
|
|
91
|
+
The Registry-assisted scenario is never merged into the deterministic result.
|
|
92
|
+
Its tokens, latency, cost, and failures remain separately attributable.
|
|
93
|
+
|
|
94
|
+
## Phase plan
|
|
95
|
+
|
|
96
|
+
### Phase 0 — Measurement contract and baseline hygiene
|
|
97
|
+
|
|
98
|
+
Purpose: make the study able to reject attractive but invalid token claims.
|
|
99
|
+
|
|
100
|
+
Deliverables:
|
|
101
|
+
|
|
102
|
+
- this plan, versioned and linked from the study index;
|
|
103
|
+
- a machine-readable `token-efficiency-v2` protocol derived from the existing
|
|
104
|
+
study contract without changing historical artifacts;
|
|
105
|
+
- a frozen baseline manifest with source revision, protocol hash, task-suite
|
|
106
|
+
hash, model configuration hashes, and run budget;
|
|
107
|
+
- an acceptance matrix mapping every metric to a real executable check;
|
|
108
|
+
- explicit rules for missing data, retries, timeouts, estimates, and baseline
|
|
109
|
+
replacement;
|
|
110
|
+
- an anonymization review record for publication-bound artifacts.
|
|
111
|
+
|
|
112
|
+
Phase 0 acceptance criteria:
|
|
113
|
+
|
|
114
|
+
- every required metric has one collection method and one evidence location;
|
|
115
|
+
- `tokens-to-correct-action` is unavailable when correctness or acceptance is
|
|
116
|
+
unavailable;
|
|
117
|
+
- provider and estimated tokens cannot be aggregated together;
|
|
118
|
+
- a failed, timed-out, or retried task remains visible and cannot be silently
|
|
119
|
+
replaced;
|
|
120
|
+
- the baseline cannot be replaced by an ordinary study run;
|
|
121
|
+
- all public artifacts contain identifiers, hashes, counts, and classifications
|
|
122
|
+
only;
|
|
123
|
+
- the protocol, task suite, and baseline are content-addressed;
|
|
124
|
+
- all criteria are executable through the repository verification contract.
|
|
125
|
+
|
|
126
|
+
### Phase 1 — End-to-end instrumentation
|
|
127
|
+
|
|
128
|
+
Add bounded telemetry at CLI, MCP, retriever, provider, and adjudicator
|
|
129
|
+
boundaries. Capture context bytes/tokens by layer, provider usage, cache usage,
|
|
130
|
+
tool calls, first useful evidence, clarification, rework, latency, and cost.
|
|
131
|
+
|
|
132
|
+
Do not optimize the retrieval algorithm until this phase can explain where
|
|
133
|
+
tokens are spent.
|
|
134
|
+
|
|
135
|
+
The runner now persists `contextBytes` together with `contextTokens` and an
|
|
136
|
+
explicit `contextTokenMethod` (`provider` or `estimate`). When the provider can
|
|
137
|
+
measure it, `firstEvidenceLatencyMs` is retained beside execution latency.
|
|
138
|
+
Provider and adjudicator token methods remain separate from byte-based context
|
|
139
|
+
estimates and configured USD cost. Missing fields remain missing data; they are
|
|
140
|
+
never reconstructed from an unsuccessful response.
|
|
141
|
+
|
|
142
|
+
### Phase 2 — Deterministic context reduction
|
|
143
|
+
|
|
144
|
+
Optimize the smallest useful context path:
|
|
145
|
+
|
|
146
|
+
- package/module routing before broad search;
|
|
147
|
+
- progressive disclosure from route to evidence to full source;
|
|
148
|
+
- explicit per-query context budgets;
|
|
149
|
+
- deduplicated summaries and stable evidence identifiers;
|
|
150
|
+
- task-specific retrieval modes for discovery, editing, debugging, and
|
|
151
|
+
documentation review;
|
|
152
|
+
- fail-closed behavior when confidence or evidence coverage is insufficient;
|
|
153
|
+
- precomputed search structures where full-body scans affect latency;
|
|
154
|
+
- measured expansion only when the previous layer is insufficient.
|
|
155
|
+
|
|
156
|
+
Every optimization must be compared against the Phase 0 baseline and must
|
|
157
|
+
preserve correctness and safety.
|
|
158
|
+
|
|
159
|
+
The deterministic agent-search path now accepts a task mode and an explicit
|
|
160
|
+
context-token budget. It removes summaries and follow-up commands before
|
|
161
|
+
dropping grounded matches, reports whether truncation occurred, and fails
|
|
162
|
+
closed when the minimum grounded result cannot fit. The fixture benchmark keeps
|
|
163
|
+
the same four expected matches while reducing estimated context from 51 to 28
|
|
164
|
+
tokens at a 32-token budget (45.1% on that fixture only). This is a bounded
|
|
165
|
+
engineering signal, not a repository-wide or provider-token claim.
|
|
166
|
+
|
|
167
|
+
### Phase 3 — Correctness-valid task suite
|
|
168
|
+
|
|
169
|
+
Expand the fixed task suite so each task has:
|
|
170
|
+
|
|
171
|
+
- an expected evidence set;
|
|
172
|
+
- a real acceptance command or endpoint/CLI/MCP check;
|
|
173
|
+
- a defined safe outcome;
|
|
174
|
+
- success, partial, blocked, and incorrect classifications;
|
|
175
|
+
- a bounded recovery path.
|
|
176
|
+
|
|
177
|
+
The suite must cover discovery, architecture, documentation freshness,
|
|
178
|
+
documentation/code contradiction, missing documentation, and implementation.
|
|
179
|
+
|
|
180
|
+
### Phase 4 — Controlled improvement rounds
|
|
181
|
+
|
|
182
|
+
Run paired, clean-session comparisons with the low-cost and reference models.
|
|
183
|
+
Use fresh samples, randomized arm order, at least two replicates in the pilot,
|
|
184
|
+
and three replicates for confirmation when the pilot has valid semantic
|
|
185
|
+
successes. Report paired medians, P95 values, confidence intervals, subgroup
|
|
186
|
+
results, missing data, and total cost.
|
|
187
|
+
|
|
188
|
+
The first bounded public pilot is complete as an execution study: 16/16
|
|
189
|
+
provider calls completed across four tasks, two models, and two paired
|
|
190
|
+
scenarios. It measured a 3.15% aggregate reduction in provider-token-equivalent
|
|
191
|
+
units and a 7.53% reduction in duration P95 for the deterministic Doc Bridge
|
|
192
|
+
arm. The result is mixed at the task level, has one replicate, and records no
|
|
193
|
+
currency or semantic-correctness claim. See the [pilot result](./phase4-public-pilot-result-v1.json).
|
|
194
|
+
|
|
195
|
+
Pilot checklist:
|
|
196
|
+
|
|
197
|
+
- [x] Remove the fixed six-population/24-task assumption from the reusable
|
|
198
|
+
runner while preserving the canonical suite.
|
|
199
|
+
- [x] Create a public one-population pilot suite and hashed pairwise plan.
|
|
200
|
+
- [x] Validate the provider and repository inputs with a real dry-run.
|
|
201
|
+
- [x] Execute the bounded 16-observation pilot with both configured models.
|
|
202
|
+
- [x] Record failed preparation runs and the final ledger/configuration hashes.
|
|
203
|
+
- [x] Run the complete repository verification contract against the pilot source
|
|
204
|
+
revision.
|
|
205
|
+
|
|
206
|
+
Phase 4 evidence: run `1789261738722-98752-ulzlls`, source revision
|
|
207
|
+
`f3c91b0bf81fac526dae57987f5851ed8ee94a6e`, and verification digest
|
|
208
|
+
`6a0baa2576dda2f4f3b19adebf430f9bfab1b9ba26a0ee8d3c1071f1ce2d0d3d`.
|
|
209
|
+
|
|
210
|
+
### Phase 5 — Product and publication gate
|
|
211
|
+
|
|
212
|
+
Expose the useful efficiency measurements through the CLI/report without
|
|
213
|
+
exposing private data. Publish only claims supported by the controlled results.
|
|
214
|
+
The report must separate payload reduction, provider-token reduction, and
|
|
215
|
+
tokens-to-correct-action.
|
|
216
|
+
|
|
217
|
+
The publication gate is defined in [Publication gate v1](./publication-gate-v1.md).
|
|
218
|
+
The current implementation was approved for publication with bounded claims;
|
|
219
|
+
it must not be described as a general or enterprise result.
|
|
220
|
+
|
|
221
|
+
Phase 5 checklist:
|
|
222
|
+
|
|
223
|
+
- [x] Expose versioned study metrics through `ak-docs study metrics` with JSON
|
|
224
|
+
and text output.
|
|
225
|
+
- [x] Publish the bounded pilot ledger and result as anonymized, hashed
|
|
226
|
+
artifacts.
|
|
227
|
+
- [x] Keep the landing narrative separate for estimated context payload,
|
|
228
|
+
provider-token measurements, and correctness evidence.
|
|
229
|
+
- [x] Validate the publication artifact set with the privacy gate and the
|
|
230
|
+
current verification harness.
|
|
231
|
+
- [x] Record the human publication decision for the public narrative through
|
|
232
|
+
the approved verification run `1789262169080-5193-98iuxg`.
|
|
233
|
+
|
|
234
|
+
Phase 5 evidence: verification digest
|
|
235
|
+
`f29172127a08a425ab0c22730f34e76b11ad6cddf427d109cf5a1d9ad1cda3cd`.
|
|
236
|
+
Publication is approved only for the anonymized, bounded claims described in
|
|
237
|
+
the publication gate; the study does not claim enterprise-wide generalization.
|
|
238
|
+
|
|
239
|
+
## Initial success thresholds
|
|
240
|
+
|
|
241
|
+
These are guardrails, not promises:
|
|
242
|
+
|
|
243
|
+
- 100% of included observations have a valid token method or an explicit
|
|
244
|
+
missing-data classification;
|
|
245
|
+
- no provider/estimate mixing;
|
|
246
|
+
- at least 90% evidence precision and recall on the fixed task suite;
|
|
247
|
+
- no regression in correctness, safety, or acceptance rate;
|
|
248
|
+
- at least 25% lower median `tokens-to-correct-action` after semantic success
|
|
249
|
+
is measurable;
|
|
250
|
+
- at least 20% lower P95 context tokens without a quality regression;
|
|
251
|
+
- lower or equal total cost per correct action;
|
|
252
|
+
- three consecutive controlled rounds without a material regression.
|
|
253
|
+
|
|
254
|
+
If the baseline has zero correct actions, the next milestone is to repair the
|
|
255
|
+
task acceptance contract and evidence completeness. A token reduction claim is
|
|
256
|
+
not valid until successful tasks exist in both comparison arms.
|
|
257
|
+
|
|
258
|
+
## Evidence and privacy rules
|
|
259
|
+
|
|
260
|
+
Each run records source revision, protocol hash, task-suite hash, model and tool
|
|
261
|
+
configuration hashes, run ID, artifact hashes, budget, and validation state.
|
|
262
|
+
|
|
263
|
+
Publication-bound artifacts may contain only anonymized identifiers, metric
|
|
264
|
+
values, hashes, counts, timings, classifications, and limitations. They must
|
|
265
|
+
not contain repository contents, private paths, prompts, credentials, or raw
|
|
266
|
+
agent responses. Human approval remains required before publication.
|
|
267
|
+
|
|
268
|
+
## Phase 0 execution checklist
|
|
269
|
+
|
|
270
|
+
- [x] Register this plan in the study documentation.
|
|
271
|
+
- [x] Create and validate `token-efficiency-v2` without modifying historical
|
|
272
|
+
protocol or result artifacts.
|
|
273
|
+
- [x] Define and hash the fresh baseline manifest.
|
|
274
|
+
- [x] Map each Phase 0 criterion to the verification contract.
|
|
275
|
+
- [x] Run deterministic protocol, privacy, documentation, and repository
|
|
276
|
+
verification checks.
|
|
277
|
+
- [x] Record the Phase 0 run ID and unresolved limitations.
|
|
278
|
+
|
|
279
|
+
Phase 0 is complete only when every unchecked item has current evidence tied to
|
|
280
|
+
the same source revision and protocol hash.
|
|
281
|
+
|
|
282
|
+
Phase 0 evidence: run `1789248412380-77131-6xxoie`, source revision
|
|
283
|
+
`978642d64d18d39cafd920345bcb1b71b288c4f3`, and verification digest
|
|
284
|
+
`13a7c518d879dfdc8738df897e489a37b467aa7b4017bf52ebe458ffb9a67f0`.
|
|
285
|
+
|
|
286
|
+
## Phase 1 execution checklist
|
|
287
|
+
|
|
288
|
+
- [x] Persist a labeled context-token value without mixing it with provider
|
|
289
|
+
input/output tokens.
|
|
290
|
+
- [x] Preserve first-evidence latency when the provider reports it.
|
|
291
|
+
- [x] Preserve adjudicator token provenance independently from the candidate
|
|
292
|
+
provider.
|
|
293
|
+
- [x] Cover the new telemetry fields with executable runner tests.
|
|
294
|
+
- [x] Run the complete repository verification contract against the Phase 1
|
|
295
|
+
source revision.
|
|
296
|
+
|
|
297
|
+
Phase 1 evidence: run `1789254057078-3613-646ec3`, source revision
|
|
298
|
+
`9b30fc32737316fc09d7ced0fe9b9f0953f88bf7`, and verification digest
|
|
299
|
+
`1043fb367e857c54ec977b6172068bdfb9f374fb9b95c9829fe0c900d35eb02a`.
|
|
300
|
+
|
|
301
|
+
Phase 1 is complete only after the final unchecked item has current evidence.
|
|
302
|
+
|
|
303
|
+
## Phase 2 execution checklist
|
|
304
|
+
|
|
305
|
+
- [x] Add task-specific deterministic search modes.
|
|
306
|
+
- [x] Add an explicit per-query context budget for CLI and MCP agent search.
|
|
307
|
+
- [x] Preserve the best grounded match while truncating lower-value context.
|
|
308
|
+
- [x] Fail closed when the minimum grounded result cannot fit the budget.
|
|
309
|
+
- [x] Measure correctness and baseline-versus-budgeted context on the public
|
|
310
|
+
fixture.
|
|
311
|
+
- [x] Run the complete repository verification contract against the Phase 2
|
|
312
|
+
source revision.
|
|
313
|
+
|
|
314
|
+
Phase 2 evidence: run `1789254756700-26023-qpzity`, source revision
|
|
315
|
+
`a292c1877eefe370be46b48d7cb6fb2bae422be3`, and verification digest
|
|
316
|
+
`b2e7534a1d24535591f15c2ae0a4beadfbf9cc49748e8102bd30dfb89c6a2e88`.
|
|
317
|
+
|
|
318
|
+
Phase 2 is complete only after the final unchecked item has current evidence.
|
|
319
|
+
|
|
320
|
+
## Phase 3 execution checklist
|
|
321
|
+
|
|
322
|
+
- [x] Bind the fixed task suite to a content hash.
|
|
323
|
+
- [x] Require executable acceptance checks and evidence requirements for every
|
|
324
|
+
task.
|
|
325
|
+
- [x] Require explicit success, partial, incorrect, incomplete, and blocked
|
|
326
|
+
classifications.
|
|
327
|
+
- [x] Define bounded recovery and safe outcomes for every task category.
|
|
328
|
+
- [x] Explicitly cover discovery, architecture, documentation freshness,
|
|
329
|
+
documentation/code contradiction, missing documentation, and implementation.
|
|
330
|
+
- [x] Run the complete repository verification contract against the Phase 3
|
|
331
|
+
source revision.
|
|
332
|
+
|
|
333
|
+
Phase 3 is complete only after the final unchecked item has current evidence.
|
|
334
|
+
|
|
335
|
+
Phase 3 evidence: run `1789256493577-54099-pxyb0i`, source revision
|
|
336
|
+
`5d70fb0083ffc991233347c6617b8dc37e453518`, and verification digest
|
|
337
|
+
`0cec5cfb673316c7648b4279e30c4f5ec5e1b2194cd1da755775a65da41ea29f`.
|