@agentskit/harness 0.1.0 → 0.3.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.
@@ -0,0 +1,27 @@
1
+ # ADR-0025: Portable orchestration controls
2
+
3
+ ## Status
4
+
5
+ Accepted
6
+
7
+ ## Context
8
+
9
+ The SDLC reference project contained useful dispatch, machine, recovery, and
10
+ retro mechanisms, but also hard-coded repositories, people, branches, provider
11
+ CLIs, and dashboard infrastructure. The Harness must remain reusable and
12
+ provider-neutral.
13
+
14
+ ## Decision
15
+
16
+ Add only deterministic kernel seams: issue/worktree claims, an idempotent
17
+ dispatch ledger, failure classification with bounded recovery, file-scoped
18
+ preflight planning, portable block/status/learning records, model bindings,
19
+ machine thresholds, and provider-neutral Orca/tracking adapters. External
20
+ adapters own network effects and credentials. Human decisions remain required
21
+ for material ambiguity, recovery, and learning promotion.
22
+
23
+ ## Consequences
24
+
25
+ The same controls can be used with Orca, another orchestrator, Linear, GitHub,
26
+ or a local process. A dashboard, watcher, provider SDK, or repository-specific
27
+ shell workflow can be added later without weakening the kernel gates.
@@ -0,0 +1,37 @@
1
+ # Repository organization
2
+
3
+ This is a TypeScript library and CLI, not an Angular application. We adopt the
4
+ Angular team's Conventional Commits standard and a capability-first layout so
5
+ the repository stays navigable without speculative layers.
6
+
7
+ ```text
8
+ .
9
+ ├── src/
10
+ │ ├── index.ts # supported package API
11
+ │ ├── cli.ts # ak-harness / ak-verify commands
12
+ │ ├── adapters/ # optional integrations
13
+ │ └── <capability>.ts # contract, evidence, delivery, runtime, metrics...
14
+ ├── test/ # deterministic tests and fixtures
15
+ ├── scripts/ # real CLI, packaging, and repository checks
16
+ ├── docs/ # ADRs and this organization contract
17
+ ├── .codex/ # verification contract and local run state
18
+ └── .github/ # CI and release workflows
19
+ ```
20
+
21
+ ## Boundaries
22
+
23
+ - Import internal modules with explicit relative paths; only `src/index.ts`
24
+ is supported for consumers.
25
+ - Add a directory when a capability has multiple cohesive modules. Do not add
26
+ a layer for one file.
27
+ - Adapters may depend on the kernel; the kernel must not depend on adapters or
28
+ external providers.
29
+ - Tests may use internal modules when exercising a boundary, but consumer
30
+ checks must import the package entry point.
31
+ - Generated output belongs in `dist/` and is ignored by Git; npm generates it
32
+ during the release gate.
33
+
34
+ ## Naming
35
+
36
+ Use kebab-case filenames, PascalCase exported types/classes, camelCase
37
+ functions, and descriptive test names that state behavior and condition.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskit/harness",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Portable, evidence-backed development harness for coding agents.",
5
5
  "type": "module",
6
6
  "bin": { "ak-harness": "dist/cli.js", "ak-verify": "dist/cli.js" },
@@ -12,38 +12,44 @@
12
12
  "import": "./dist/index.js"
13
13
  }
14
14
  },
15
- "files": ["dist", "README.md", "CHANGELOG.md", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", "SECURITY.md", "LICENSE", "docs"],
15
+ "files": ["dist", "README.md", "CHANGELOG.md", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", "SECURITY.md", "MANIFESTO.md", "LICENSE", "docs"],
16
16
  "engines": { "node": ">=22" },
17
17
  "scripts": {
18
18
  "build": "tsup && node -e \"console.log(JSON.stringify({status:'passed',criteria:['package']}))\"",
19
19
  "typecheck": "tsc -p tsconfig.json --noEmit",
20
- "test": "pnpm typecheck && vitest run --config ../../vitest.config.ts test && node -e \"console.log(JSON.stringify({status:'passed',criteria:['package']}))\"",
21
- "test:contract": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/contract.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['protocol']}))\"",
22
- "test:extensibility": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/extensibility.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['extensibility']}))\"",
23
- "test:event-log": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/extensibility.test.ts test/harness.test.ts -t \"ordered append-only lifecycle log|complete typed task through human approval|authorization only when tracking|human rejection\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['event-log','verification-attestation','approval-attestation']}))\"",
24
- "test:reconciliation": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/harness.test.ts -t \"reconciles terminal decisions\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['terminal-reconciliation']}))\"",
25
- "test:lock-recovery": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/lock.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['lock-recovery']}))\"",
26
- "test:signed-bundle": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/bundle.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['signed-evidence']}))\"",
27
- "test:key-trust": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/bundle.test.ts -t \"trust store|revoked|rotation\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['key-trust']}))\"",
28
- "test:human-tool-approval": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/agent.test.ts -t \"human approval|approval\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['human-tool-approval']}))\"",
29
- "test:session-recovery": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/agent.test.ts -t \"resume|recovery\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['session-recovery']}))\"",
30
- "test:safe-action-recovery": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/agent.test.ts -t \"possibly started action\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['safe-action-recovery']}))\"",
31
- "test:profiles": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/profiles.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['profiles']}))\"",
32
- "test:context": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/context.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context']}))\"",
33
- "test:doc-bridge": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/doc-bridge.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['doc-bridge-adapter']}))\"",
34
- "test:context-binding": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/context.test.ts -t \"binds context\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context-binding']}))\"",
35
- "test:context-cli": "pnpm typecheck && node ../../scripts/verify-harness-context-cli.mjs && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context-cli']}))\"",
36
- "test:context-integrity": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/context.test.ts -t \"rejects\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context-integrity']}))\"",
37
- "test:metrics": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/metrics.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['metrics']}))\"",
38
- "test:ci-approval": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/harness.test.ts -t \"CI prepare|CI attempts|CI preparation across\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['ci-approval']}))\"",
39
- "test:benchmark-record": "pnpm typecheck && node ../../scripts/verify-harness-benchmark-record.mjs",
40
- "test:benchmark-bridge": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/coding-benchmark.test.ts test/metrics.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['benchmark-integrity','benchmark-bridge']}))\"",
41
- "test:agent-protocol": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/agent.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['agent-protocol']}))\"",
42
- "test:policy-gate": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/policy.test.ts test/agent.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['policy-gate','agent-protocol']}))\"",
43
- "test:runtime": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/runtime.test.ts test/agent.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['runtime','agent-protocol']}))\"",
44
- "test:process-runtime": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/runtime.test.ts test/agent.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['process-runtime','runtime']}))\"",
45
- "test:docker-runtime": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/runtime.test.ts -t \"Docker sandbox\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['docker-runtime']}))\"",
46
- "test:runtime-attestation": "pnpm typecheck && vitest run --config ../../vitest.config.ts test/runtime.test.ts test/agent.test.ts -t \"attestation|Docker sandbox\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['runtime-attestation']}))\"",
20
+ "test": "pnpm typecheck && vitest run --config vitest.config.ts test && node -e \"console.log(JSON.stringify({status:'passed',criteria:['package']}))\"",
21
+ "test:contract": "pnpm typecheck && vitest run --config vitest.config.ts test/contract.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['protocol']}))\"",
22
+ "test:extensibility": "pnpm typecheck && vitest run --config vitest.config.ts test/extensibility.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['extensibility']}))\"",
23
+ "test:event-log": "pnpm typecheck && vitest run --config vitest.config.ts test/extensibility.test.ts test/harness.test.ts -t \"ordered append-only lifecycle log|complete typed task through human approval|authorization only when tracking|human rejection\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['event-log','verification-attestation','approval-attestation']}))\"",
24
+ "test:reconciliation": "pnpm typecheck && vitest run --config vitest.config.ts test/harness.test.ts -t \"reconciles terminal decisions\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['terminal-reconciliation']}))\"",
25
+ "test:lock-recovery": "pnpm typecheck && vitest run --config vitest.config.ts test/lock.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['lock-recovery']}))\"",
26
+ "test:signed-bundle": "pnpm typecheck && vitest run --config vitest.config.ts test/bundle.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['signed-evidence']}))\"",
27
+ "test:key-trust": "pnpm typecheck && vitest run --config vitest.config.ts test/bundle.test.ts -t \"trust store|revoked|rotation\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['key-trust']}))\"",
28
+ "test:human-tool-approval": "pnpm typecheck && vitest run --config vitest.config.ts test/agent.test.ts -t \"human approval|approval\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['human-tool-approval']}))\"",
29
+ "test:session-recovery": "pnpm typecheck && vitest run --config vitest.config.ts test/agent.test.ts -t \"resume|recovery\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['session-recovery']}))\"",
30
+ "test:safe-action-recovery": "pnpm typecheck && vitest run --config vitest.config.ts test/agent.test.ts -t \"possibly started action\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['safe-action-recovery']}))\"",
31
+ "test:profiles": "pnpm typecheck && vitest run --config vitest.config.ts test/profiles.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['profiles']}))\"",
32
+ "test:context": "pnpm typecheck && vitest run --config vitest.config.ts test/context.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context']}))\"",
33
+ "test:doc-bridge": "pnpm typecheck && vitest run --config vitest.config.ts test/doc-bridge.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['doc-bridge-adapter']}))\"",
34
+ "test:context-binding": "pnpm typecheck && vitest run --config vitest.config.ts test/context.test.ts -t \"binds context\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context-binding']}))\"",
35
+ "test:context-cli": "pnpm typecheck && node scripts/verify-harness-context-cli.mjs && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context-cli']}))\"",
36
+ "test:context-integrity": "pnpm typecheck && vitest run --config vitest.config.ts test/context.test.ts -t \"rejects\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['context-integrity']}))\"",
37
+ "test:discovery": "pnpm typecheck && vitest run --config vitest.config.ts test/discovery.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['discovery']}))\"",
38
+ "test:wip": "pnpm typecheck && vitest run --config vitest.config.ts test/wip.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['wip']}))\"",
39
+ "test:experiment": "pnpm typecheck && vitest run --config vitest.config.ts test/experiment.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['runtime-experiment']}))\"",
40
+ "test:delivery": "pnpm typecheck && vitest run --config vitest.config.ts test/delivery.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['delivery-gates']}))\"",
41
+ "test:pilot": "pnpm typecheck && vitest run --config vitest.config.ts test/pilot.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['pilot']}))\"",
42
+ "test:cycle": "pnpm typecheck && vitest run --config vitest.config.ts test/cycle.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['cycle']}))\"",
43
+ "test:optimization": "pnpm typecheck && vitest run --config vitest.config.ts test/optimization.test.ts test/issues-010-014.eval.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['optimization-contracts','eval','cache','parallelism']}))\"",
44
+ "test:source": "pnpm typecheck && vitest run --config vitest.config.ts test/source.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['source-current']}))\"",
45
+ "test:metrics": "pnpm typecheck && vitest run --config vitest.config.ts test/metrics.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['metrics']}))\"",
46
+ "test:benchmark-record": "pnpm typecheck && node scripts/verify-harness-benchmark-record.mjs",
47
+ "test:agent-protocol": "pnpm typecheck && vitest run --config vitest.config.ts test/agent.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['agent-protocol']}))\"",
48
+ "test:policy-gate": "pnpm typecheck && vitest run --config vitest.config.ts test/policy.test.ts test/agent.test.ts && node -e \"console.log(JSON.stringify({status:'passed',criteria:['policy-gate','agent-protocol']}))\"",
49
+ "test:runtime": "pnpm typecheck && vitest run --config vitest.config.ts test/runtime.test.ts test/agent.test.ts -t \"registered tool|missing and timed-out|invalid runtime\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['runtime']}))\"",
50
+ "test:process-runtime": "pnpm typecheck && vitest run --config vitest.config.ts test/runtime.test.ts -t \"child process|configured process runtime|timed-out and oversized|non-zero child\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['process-runtime']}))\"",
51
+ "test:docker-runtime": "pnpm typecheck && HARNESS_REQUIRE_DOCKER=1 vitest run --config vitest.config.ts test/runtime.test.ts -t \"Docker sandbox\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['docker-runtime']}))\"",
52
+ "test:runtime-attestation": "pnpm typecheck && vitest run --config vitest.config.ts test/runtime.test.ts test/agent.test.ts -t \"attestation|Docker sandbox\" && node -e \"console.log(JSON.stringify({status:'passed',criteria:['runtime-attestation']}))\"",
47
53
  "prepublishOnly": "pnpm typecheck && pnpm build && pnpm test"
48
54
  },
49
55
  "dependencies": {
@@ -56,13 +62,14 @@
56
62
  "vitest": "^4.1.10"
57
63
  },
58
64
  "license": "MIT",
65
+ "packageManager": "pnpm@10.34.4",
59
66
  "repository": {
60
67
  "type": "git",
61
- "url": "git+https://github.com/AgentsKit-io/agents-playbook.git",
62
- "directory": "packages/harness"
68
+ "url": "git+https://github.com/AgentsKit-io/harness.git"
63
69
  },
64
- "bugs": { "url": "https://github.com/AgentsKit-io/agents-playbook/issues" },
65
- "homepage": "https://github.com/AgentsKit-io/agents-playbook/tree/main/packages/harness",
70
+ "bugs": { "url": "https://github.com/AgentsKit-io/harness/issues" },
71
+ "homepage": "https://github.com/AgentsKit-io/harness",
66
72
  "author": "AgentsKit Contributors",
67
- "sideEffects": false
73
+ "sideEffects": false,
74
+ "publishConfig": { "access": "public", "provenance": true }
68
75
  }
@@ -1,22 +0,0 @@
1
- # ADR-0025: Dogfood the harness in Playbook CI
2
-
3
- ## Context
4
-
5
- The package can validate itself locally, but the Playbook CI previously ran
6
- repository checks without explicitly building, invoking, or installing the
7
- harness as a consumer. A release could therefore regress the harness path
8
- without failing the repository gate.
9
-
10
- ## Decision
11
-
12
- Run `harness:test`, `harness:cli`, and the clean packed-consumer probe in the
13
- quality job immediately after dependency installation. Keep the checks
14
- explicit and local; the harness lifecycle still owns human approval for
15
- task-level completion.
16
-
17
- ## Consequences
18
-
19
- The Playbook continuously exercises the package and both CLI entrypoints in
20
- the same Node 22 environment used by CI. The CI job does a small amount of
21
- duplicate work with package-level checks, which is intentional release-path
22
- coverage.
@@ -1,22 +0,0 @@
1
- # ADR-0026: Preserve CI harness evidence for human review
2
-
3
- ## Context
4
-
5
- Running checks in CI without retaining the harness run leaves reviewers with
6
- only a green job and no portable evidence bundle to inspect. The harness still
7
- requires human approval, so the CI result must remain reviewable rather than
8
- being treated as completion.
9
-
10
- ## Decision
11
-
12
- The Playbook quality job runs the current harness contract, keeps its
13
- `.codex/verification/harness-phase-24` directory, and uploads it as a
14
- short-lived artifact. The run must reach `AWAITING_HUMAN_APPROVAL`; approval is
15
- still a separate human action.
16
-
17
- ## Consequences
18
-
19
- Reviewers can inspect the run projection, event log, and check outputs from the
20
- same CI execution. Artifact retention is limited to 14 days; long-term audit
21
- retention belongs to the release or compliance system that consumes the
22
- artifact.
@@ -1,19 +0,0 @@
1
- # ADR-0027: Verify signed evidence outside the source workspace
2
-
3
- ## Context
4
-
5
- An evidence artifact is only useful to CI reviewers and release systems if it
6
- does not depend on the original checkout. Existing bundle tests verified
7
- signatures and trust, but did not prove path independence.
8
-
9
- ## Decision
10
-
11
- The CLI flow copies the signed bundle and trust store into a separate temporary
12
- directory and verifies them there. The bundle remains self-contained and the
13
- existing trusted-key model is unchanged.
14
-
15
- ## Consequences
16
-
17
- The portability guarantee is exercised without a new transport or dependency.
18
- The probe remains local and deterministic; CI or a release system can upload
19
- the same bundle as an artifact when its completed run is available.
@@ -1,20 +0,0 @@
1
- # ADR-0028: Separate effective delivery metrics from retry history
2
-
3
- ## Context
4
-
5
- Aggregate pass rates include blocked or stale attempts that were later
6
- superseded. Those facts are useful for measuring friction, but they can make a
7
- successful current delivery look like a failed one.
8
-
9
- ## Decision
10
-
11
- Keep historical attempt metrics unchanged and add `effective*` summary metrics
12
- computed from runs that are not superseded by another run in the same local
13
- history. Report effective run count, completion count/rate, and check,
14
- outcome, and evidence rates.
15
-
16
- ## Consequences
17
-
18
- Reviewers can distinguish process friction from the current delivery state
19
- without losing retry history. The lineage rule is local and deterministic; a
20
- future remote aggregation system must preserve `supersedes` relationships.
@@ -1,20 +0,0 @@
1
- # ADR-0029: Separate CI preparation from human approval
2
-
3
- ## Context
4
-
5
- The CI dogfood flow needs to create and verify a run, but CI cannot truthfully
6
- act as the human who approved the task contract. Recording `--by human` in CI
7
- would make the audit trail misleading.
8
-
9
- ## Decision
10
-
11
- `plan prepared --by ci` creates a planned run with a `contractPreparation`
12
- record. It may proceed through verification and produce evidence, but only the
13
- existing human approval path can transition the run to `COMPLETE`. Human
14
- planning continues to use `plan approved --by human`.
15
-
16
- ## Consequences
17
-
18
- CI evidence is honest and reviewable without weakening the completion gate.
19
- The run schema remains readable for older v1 records through the optional
20
- legacy `contractApproval` field.
@@ -1,20 +0,0 @@
1
- # ADR-0030: Provenance-bearing external coding benchmark bridge
2
-
3
- ## Decision
4
-
5
- Keep the harness benchmark schema portable and add optional task provenance:
6
- the source repository, immutable revision, prompt path and digest, and read /
7
- write scope. Validate the existing AgentsKit OS coding benchmark report through
8
- a small dependency-free adapter.
9
-
10
- The adapter validates report integrity only. Provider status, completeness
11
- heuristics, and `successPassed` are observations; they do not grant human
12
- acceptance or make a benchmark comparable without a controlled baseline,
13
- criterion evidence, and a `COMPLETE` harness run.
14
-
15
- ## Consequences
16
-
17
- The same manifest can be checked from another agent or repository, while the
18
- AgentsKit OS benchmark remains responsible for running providers. Phase 28
19
- ships the seed corpus and bridge. Real baseline collection across repeated,
20
- reviewed tasks is the next measurement step; no improvement claim is made here.
@@ -1,18 +0,0 @@
1
- # ADR-0031: Real-provider baseline before efficacy claims
2
-
3
- ## Decision
4
-
5
- Collect the baseline by running the existing AgentsKit OS coding benchmark on
6
- disposable, git-initialized copies of its fixture workspace. Record one report
7
- per manifest task with provider output, duration, validation command, criterion
8
- evidence, and the pinned source revision.
9
-
10
- The baseline runner is separate from verification. Verification validates
11
- recorded observations; it does not invoke a paid or nondeterministic provider on
12
- every harness run.
13
-
14
- ## Measurement rule
15
-
16
- Baseline data is not comparable by itself. A directional improvement requires
17
- the same task, scope, provider conditions, acceptance evidence, and a completed
18
- harness run. Missing harness-equivalent runs remain `comparableTaskCount: 0`.
@@ -1,25 +0,0 @@
1
- # ADR-0032: Harness-equivalent benchmark runs
2
-
3
- ## Status
4
-
5
- Accepted for the benchmark pilot.
6
-
7
- ## Decision
8
-
9
- Run the frozen benchmark corpus once per task with a task-specific harness
10
- contract and `benchmark: { suiteId, taskId, mode: "harness" }` binding. Keep each
11
- task's lifecycle state isolated so a blocked provider result cannot be mistaken
12
- for another task's approval. Collection delegates directional calculations to
13
- the existing `benchmarkRuns` implementation.
14
-
15
- The runner prepares and executes plans but never records human approval. A task
16
- is comparable only after the real checks pass and a human moves it to
17
- `COMPLETE`; pending and blocked runs remain visible and non-comparable.
18
-
19
- ## Consequences
20
-
21
- - Baseline and harness runs share task identity and provenance.
22
- - Human approval remains an auditable gate rather than an automation shortcut.
23
- - The first collection may report no improvement when the provider is blocked;
24
- that is a valid result, not missing data to be filled in.
25
- - Temporary untracked directories no longer crash source freshness checks.
@@ -1,25 +0,0 @@
1
- # ADR-0033: Portable agent-side verification gate
2
-
3
- ## Status
4
-
5
- Accepted for the benchmark pilot.
6
-
7
- ## Decision
8
-
9
- Disposable coding-agent fixtures expose the built `ak-verify` command through a
10
- fixture-local wrapper and PATH entry. The fixture contract is prepared with
11
- `plan prepared --by ci` before the provider starts. The provider can therefore
12
- run the same real verification command from inside its working directory.
13
-
14
- The wrapper is a convenience for provider-side feedback, not the final trust
15
- boundary. The outer harness still validates the provider report and acceptance
16
- evidence, and only a human can move an outer run to `COMPLETE`.
17
-
18
- ## Consequences
19
-
20
- - Missing `ak-verify` is observable as an environment/setup failure instead of
21
- an unexplained provider partial result.
22
- - No human decision is fabricated inside the benchmark fixture.
23
- - The wrapper executes the pinned local harness build; it does not install
24
- dependencies or grant network access.
25
- - Provider status and artifact validation remain separate signals.
@@ -1,25 +0,0 @@
1
- # ADR-0034: Make benchmark improvement claims fail closed
2
-
3
- ## Context
4
-
5
- A benchmark can complete every acceptance criterion while still costing more
6
- time or retries. Aggregate pass rates alone hide that trade-off, and a small
7
- sample cannot support a reliable general claim.
8
-
9
- ## Decision
10
-
11
- Benchmark manifests may declare a policy with `minComparableTasks`,
12
- `maxDurationRegressionRate`, `minCompletedRunsPerTask`, and
13
- `requireZeroEscapedIncomplete`.
14
-
15
- Reports expose `retryCount`, `completedRuns`, per-task confidence, and a
16
- `qualityGate`. The gate is `insufficient-data` when the task sample is too
17
- small, `failed` when policy detects a regression, and `passed` only when all
18
- configured quality conditions hold. Historical retries remain visible but do
19
- not make a superseded run the effective result.
20
-
21
- ## Consequences
22
-
23
- The harness shows quality/cost trade-offs instead of claiming that every
24
- improvement is positive. Directional results support iteration; reliable
25
- samples are required for release claims.
@@ -1,20 +0,0 @@
1
- # ADR-0035: Use independent samples for benchmark confidence
2
-
3
- ## Context
4
-
5
- A single provider run is too noisy to support a reliable performance claim.
6
- Counting repeated measurements as retries also exaggerates delivery cost.
7
-
8
- ## Decision
9
-
10
- The benchmark runner accepts `--repeats N` and creates an isolated contract and
11
- state directory for each sample. Reports count `COMPLETE` samples toward
12
- confidence, compare duration using their median, and count retries only from
13
- superseded run lineages.
14
-
15
- ## Consequences
16
-
17
- Three or more completed samples can reach reliable confidence when the manifest
18
- policy requires it. Human approval remains required for every sample. A median
19
- reduces the influence of one slow provider run but does not prove causality or
20
- productivity improvement.
@@ -1,20 +0,0 @@
1
- # ADR-0036: Require comparable baseline samples
2
-
3
- ## Context
4
-
5
- Comparing three harness samples with one baseline observation makes the
6
- performance result look more certain than it is. Provider latency can vary
7
- between runs, so the baseline needs the same replication discipline.
8
-
9
- ## Decision
10
-
11
- Benchmark policy includes `minBaselineSamplesPerTask`. Baseline observations
12
- can carry `durationSamplesMs`; reports use their median and keep a legacy
13
- single `durationMs` as one sample. A task is non-comparable until both the
14
- baseline and harness meet their configured sample minimums.
15
-
16
- ## Consequences
17
-
18
- The quality gate becomes `insufficient-data` until a fair baseline exists.
19
- This delays performance claims but prevents a replicated harness result from
20
- being presented as a reliable improvement against a one-off baseline.
@@ -1,27 +0,0 @@
1
- # ADR-0037: Replicated baseline collection
2
-
3
- ## Decision
4
-
5
- The AgentsKit OS baseline runner accepts `--repeats N` and executes every task
6
- in an independent disposable fixture. It records the measured durations as
7
- `durationSamplesMs`, keeps the task failed when any sample fails, and can
8
- replace the complete baseline observation set with `--record-manifest`.
9
-
10
- The replacement is staged through the existing typed
11
- `recordBenchmarkObservation` API and committed with one atomic rename. A
12
- partial task selection cannot update a complete manifest. The benchmark report
13
- then compares the median baseline duration with the median harness duration.
14
-
15
- ## Rationale
16
-
17
- A single baseline run is not a fair comparator for three harness replicas.
18
- Independent baseline samples reduce sensitivity to provider and machine
19
- variance without misclassifying replicas as retries. Atomic recording prevents
20
- an interrupted collection from leaving a partially refreshed manifest.
21
-
22
- ## Limits
23
-
24
- This controls sample count and provenance, not all sources of variance. The
25
- same provider, task corpus, pinned source revision, and comparable runtime
26
- should be used. Three samples are the current minimum policy, not a universal
27
- statistical guarantee; larger studies belong in a later benchmark program.
@@ -1,28 +0,0 @@
1
- # ADR-0038: Use an end-to-end benchmark boundary
2
-
3
- ## Decision
4
-
5
- Baseline samples measure elapsed time from disposable fixture setup through
6
- provider execution, artifact validation, and the end of the sample. Harness
7
- comparisons continue to use the elapsed duration of the configured real check.
8
- The provider-reported duration is retained as diagnostic data, not as the
9
- comparable duration.
10
-
11
- Baseline duration is comparable only when the baseline status is `passed` and
12
- every criterion evidence entry is `passed`. Escape reduction is reported
13
- independently, so an incomplete baseline cannot create a false duration or
14
- resource improvement while still exposing the observed delivery gap.
15
-
16
- ## Rationale
17
-
18
- Comparing provider-only baseline time with the harness check time mixes two
19
- different scopes and can manufacture a regression. A common boundary measures
20
- the delivery workflow the human actually waits for. It also exposes whether a
21
- slow result comes from the provider or from validation overhead.
22
-
23
- ## Limits
24
-
25
- The boundary does not remove provider, machine, network, or human-approval
26
- variance. Independent samples and median aggregation remain required; deeper
27
- latency decomposition is a later optimization if the comparable end-to-end
28
- measurement still regresses.
@@ -1,39 +0,0 @@
1
- # ADR-0039: Separate artifact acceptance from protocol completion
2
-
3
- ## Decision
4
-
5
- Repeated external benchmark samples record `artifactAcceptanceRate`: the
6
- fraction whose task-specific artifact validation passed. The observation
7
- `status` remains protocol-aware and only qualifies for comparable duration or
8
- resource metrics when the baseline delivery and criterion evidence are
9
- complete.
10
-
11
- Harness runs may expose the same metric through structured check evidence. The
12
- benchmark report aggregates the available run-level rates and reports their
13
- sample count; missing evidence is not converted to an acceptance failure.
14
-
15
- Baseline observations also record `protocolCompletionRate`: the fraction of
16
- samples whose provider completed the verification protocol. Harness reports
17
- expose the corresponding per-task rate and sample count. This makes protocol
18
- reliability measurable without treating an incomplete baseline as comparable.
19
-
20
- Relative improvement remains unavailable for a zero baseline. The comparison
21
- also records an absolute delta and derives its direction from that delta, so
22
- zero-to-positive outcomes remain visible without invalid division.
23
-
24
- ## Rationale
25
-
26
- An agent can produce a correct artifact while failing to provide the required
27
- verification protocol, for example because the verifier is unavailable. That
28
- is valuable evidence about task outcome and protocol reliability, but treating
29
- it as a complete baseline would make timing and resource comparisons unsafe.
30
- Keeping the dimensions separate makes the failure visible without converting
31
- partial evidence into a completion claim.
32
-
33
- ## Limits
34
-
35
- Artifact acceptance is only as strong as the real task validator supplied by
36
- the benchmark. It does not prove human approval, protocol compliance, or
37
- enterprise readiness. A future benchmark schema may add criterion-level sample
38
- rates when the corpus needs per-criterion variance rather than one aggregate
39
- rate.
@@ -1,32 +0,0 @@
1
- # ADR-0040: benchmark corpus surface coverage
2
-
3
- ## Status
4
-
5
- Accepted — 2026-08-31
6
-
7
- ## Context
8
-
9
- The AgentsKit OS bridge initially measured three real coding tasks, all backed
10
- by a small logic fixture. That was enough to prove the protocol binding, but it
11
- could not show that the harness preserved different delivery surfaces.
12
-
13
- ## Decision
14
-
15
- Benchmark tasks may declare a typed `surfaces` list using the same surface names
16
- as the verification contract. The phase-45 corpus remains anchored to the
17
- AgentsKit OS benchmark definition and adds executable CLI and documentation
18
- tasks. The runner validates the CLI through real child-process invocations and
19
- validates the documentation contract against the resulting README.
20
-
21
- The surface list is descriptive metadata. It does not make a task comparable,
22
- complete, or human-approved; those claims still require the normal lifecycle,
23
- criterion evidence, and current-source verification.
24
-
25
- ## Consequences
26
-
27
- - Corpus validators can require coverage of named surfaces without guessing
28
- from file paths.
29
- - The bridge now exercises logic, CLI, and documentation delivery shapes.
30
- - Endpoint, database, MCP, and UI tasks remain future corpus additions and must
31
- bring their real runtime checks when introduced.
32
- - No benchmark performance improvement is inferred from corpus expansion alone.