@agentskit/harness 0.1.0 → 0.4.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 +33 -32
- package/CONTRIBUTING.md +60 -12
- package/MANIFESTO.md +23 -0
- package/README.md +276 -144
- package/capabilities/public-surface.json +668 -0
- package/compatibility/manifest.json +17 -0
- package/compatibility/migration.md +10 -0
- package/compatibility/report.json +23 -0
- package/compatibility/report.md +22 -0
- package/compatibility/rollback.md +8 -0
- package/dist/cli.js +958 -239
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1338 -122
- package/dist/index.js +2273 -353
- package/dist/index.js.map +1 -1
- package/docs/ADR-0025-portable-orchestration-controls.md +27 -0
- package/docs/ADR-0026-kernel-adapters-boundary.md +82 -0
- package/docs/GETTING-STARTED.md +18 -0
- package/docs/MODULE-BOUNDARIES.md +143 -0
- package/docs/ORGANIZATION.md +46 -0
- package/docs/TROUBLESHOOTING.md +24 -0
- package/examples/minimum-profile.mjs +27 -0
- package/package.json +52 -34
- package/release/manifest.json +14 -0
- package/release/notes.md +10 -0
- package/release/qualification.json +14 -0
- package/docs/ADR-0025-ci-dogfood.md +0 -22
- package/docs/ADR-0026-ci-evidence-artifact.md +0 -22
- package/docs/ADR-0027-portable-evidence.md +0 -19
- package/docs/ADR-0028-effective-metrics.md +0 -20
- package/docs/ADR-0029-honest-ci-preparation.md +0 -20
- package/docs/ADR-0030-agentskit-os-benchmark-bridge.md +0 -20
- package/docs/ADR-0031-real-provider-baseline.md +0 -18
- package/docs/ADR-0032-harness-equivalent-benchmark.md +0 -25
- package/docs/ADR-0033-portable-agent-gate.md +0 -25
- package/docs/ADR-0034-measurement-quality-gates.md +0 -25
- package/docs/ADR-0035-reproducible-benchmark-samples.md +0 -20
- package/docs/ADR-0036-comparable-baseline-samples.md +0 -20
- package/docs/ADR-0037-replicated-baseline-collection.md +0 -27
- package/docs/ADR-0038-end-to-end-benchmark-boundary.md +0 -28
- package/docs/ADR-0039-artifact-and-protocol-metrics.md +0 -39
- package/docs/ADR-0040-benchmark-corpus-surfaces.md +0 -32
|
@@ -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.
|