@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.
Files changed (42) hide show
  1. package/CHANGELOG.md +33 -32
  2. package/CONTRIBUTING.md +60 -12
  3. package/MANIFESTO.md +23 -0
  4. package/README.md +276 -144
  5. package/capabilities/public-surface.json +668 -0
  6. package/compatibility/manifest.json +17 -0
  7. package/compatibility/migration.md +10 -0
  8. package/compatibility/report.json +23 -0
  9. package/compatibility/report.md +22 -0
  10. package/compatibility/rollback.md +8 -0
  11. package/dist/cli.js +958 -239
  12. package/dist/cli.js.map +1 -1
  13. package/dist/index.d.ts +1338 -122
  14. package/dist/index.js +2273 -353
  15. package/dist/index.js.map +1 -1
  16. package/docs/ADR-0025-portable-orchestration-controls.md +27 -0
  17. package/docs/ADR-0026-kernel-adapters-boundary.md +82 -0
  18. package/docs/GETTING-STARTED.md +18 -0
  19. package/docs/MODULE-BOUNDARIES.md +143 -0
  20. package/docs/ORGANIZATION.md +46 -0
  21. package/docs/TROUBLESHOOTING.md +24 -0
  22. package/examples/minimum-profile.mjs +27 -0
  23. package/package.json +52 -34
  24. package/release/manifest.json +14 -0
  25. package/release/notes.md +10 -0
  26. package/release/qualification.json +14 -0
  27. package/docs/ADR-0025-ci-dogfood.md +0 -22
  28. package/docs/ADR-0026-ci-evidence-artifact.md +0 -22
  29. package/docs/ADR-0027-portable-evidence.md +0 -19
  30. package/docs/ADR-0028-effective-metrics.md +0 -20
  31. package/docs/ADR-0029-honest-ci-preparation.md +0 -20
  32. package/docs/ADR-0030-agentskit-os-benchmark-bridge.md +0 -20
  33. package/docs/ADR-0031-real-provider-baseline.md +0 -18
  34. package/docs/ADR-0032-harness-equivalent-benchmark.md +0 -25
  35. package/docs/ADR-0033-portable-agent-gate.md +0 -25
  36. package/docs/ADR-0034-measurement-quality-gates.md +0 -25
  37. package/docs/ADR-0035-reproducible-benchmark-samples.md +0 -20
  38. package/docs/ADR-0036-comparable-baseline-samples.md +0 -20
  39. package/docs/ADR-0037-replicated-baseline-collection.md +0 -27
  40. package/docs/ADR-0038-end-to-end-benchmark-boundary.md +0 -28
  41. package/docs/ADR-0039-artifact-and-protocol-metrics.md +0 -39
  42. package/docs/ADR-0040-benchmark-corpus-surfaces.md +0 -32
package/CHANGELOG.md CHANGED
@@ -1,44 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.0] - 2026-09-10
4
+
5
+ - Added phase quality matrices, watchdog classification, and resource telemetry.
6
+ - Added versioned eval and ecosystem compatibility manifests with fail-closed
7
+ evidence handling.
8
+ - Added runnable consumer onboarding, adapter examples, and troubleshooting.
9
+
10
+ ## [0.3.0] - 2026-09-10
11
+
12
+ - Added portable issue/worktree claims and idempotent dispatch ledger.
13
+ - Added failure classification, bounded retry/backoff, and abortable watchdog.
14
+ - Added file-scoped preflight planning and shell-composition rejection.
15
+ - Added block manifests, status snapshots, retro learning promotion, model
16
+ policies, and provider-neutral Orca/tracking adapters.
17
+ - Added configurable machine pressure thresholds and adaptive workflow limits.
18
+
19
+ ## [Unreleased]
20
+
21
+ - Add bounded agent eval, safe context/read-only LLM cache, deterministic workflow fan-out/fan-in, and validated optimization observation contracts for token, memory, cache, and parallelism measurements.
22
+
3
23
  All notable changes to `@agentskit/harness` are documented here.
4
24
 
5
25
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the package follows Semantic Versioning.
6
26
 
7
- ## [0.1.0] - 2026-08-31
27
+ ## [0.2.0] - 2026-09-09
8
28
 
9
29
  ### Added
10
30
 
11
- - Replicated baseline collection with independent disposable samples, median
12
- duration recording, and atomic complete-manifest replacement.
13
- - Baseline samples use the same end-to-end measurement boundary as the harness
14
- check while retaining provider-only duration for diagnosis.
15
- - Incomplete baselines no longer qualify for duration or resource comparisons;
16
- escape reduction remains visible as a separate outcome metric.
17
- - Baseline reports expose artifact acceptance separately from protocol
18
- completion, preserving useful outcome data without weakening fail-closed
19
- comparison gates.
20
- - Benchmark execution supports collision-safe task-specific replacement
21
- samples, preserving blocked and timed-out evidence.
22
- - Benchmark comparisons expose artifact acceptance rates and protocol
23
- completion rates separately from performance comparability.
24
- - Protocol and artifact acceptance comparisons expose absolute deltas when
25
- relative improvement is undefined because the baseline was zero.
26
- - Benchmark tasks declare typed surface coverage; the AgentsKit OS corpus
27
- includes executable CLI and documentation tasks with real acceptance
28
- validation.
29
- - Fail-closed baseline sample policy and median baseline duration support for fair replicated comparisons.
30
- - Independent benchmark samples with median-duration comparisons and retry metrics that do not confuse replication with retries.
31
- - Configurable benchmark quality gates, confidence labels, and explicit retry metrics.
32
- - Portable `ak-verify` fixture gate for real coding-agent benchmark runs; provider delivery remains blocked until its result is complete and human approval is recorded.
33
- - Harness-equivalent benchmark preparation and collection for paired real-provider runs, with explicit human approval and honest non-comparability.
34
- - Source snapshots now ignore untracked directories while retaining hashes for untracked files.
35
- - Reproducible disposable-fixture runner and validator for the first real-provider AgentsKit OS baseline; improvement remains unavailable until equivalent harness runs exist.
36
- - Provenance-bearing benchmark tasks and a portable validator for AgentsKit OS coding benchmark reports; missing controlled observations remain explicitly non-comparable.
37
- - Playbook CI dogfooding for the package test suite, built CLI, and clean packed consumer.
38
- - Playbook CI now preserves the official harness run as an auditable artifact for human review.
39
- - Signed evidence flow now verifies a copied bundle from an isolated directory.
40
- - Benchmark reports now separate effective non-superseded delivery metrics from attempt history.
41
- - CI evidence now records automated preparation separately from human contract approval.
31
+ - Pilot-cohort validation that freezes a policy/baseline pair and rejects non-normal, partial, or silently substituted ten-issue cohorts.
32
+ - Bounded five-step improvement-cycle assessment with explicit adjustments, repeat decisions, and a deterministic quality matrix.
33
+
34
+ - Deterministic G2–G5 assessment helpers and CLI commands for independent preflight review, structured idempotent PR handoff, current integration evidence, safe production exposure, and acceptance.
35
+
36
+ - Current-source evidence now requires a committed Git `HEAD`; directories outside Git fail closed instead of receiving a synthetic revision.
37
+
38
+ - Discovery gate API and CLI that emit `ready` or an auditable human decision packet from structured ambiguities, approved assumptions and source/contract/context bindings.
39
+ - Deterministic WIP admission API and CLI that count blocked and awaiting-human deliveries, reserve resumed work, and reject duplicate ledger entries.
40
+ - Controlled runtime-selection API and CLI that reject incomparable Orca/Emdash samples and exclude failed hard gates.
41
+ - Configurable `runtime.kind` contract field plus a factory for bounded process or Docker-sandbox execution.
42
+ - Real Git snapshot coverage for committed, dirty, untracked, and task-state-excluded evidence.
42
43
  - Strict TypeScript modular core with generated declarations and source maps.
43
44
  - Contract-frozen lifecycle, structured evidence, stale detection, human approval, retry, and cleanup.
44
45
  - Explicit human cancellation and superseded retry history.
package/CONTRIBUTING.md CHANGED
@@ -1,25 +1,73 @@
1
1
  # Contributing to `@agentskit/harness`
2
2
 
3
- ## Before opening a change
3
+ The Harness is an enforcement engine, not a suggestion library. Changes must
4
+ preserve fail-closed behavior and produce criterion-level evidence.
4
5
 
5
- 1. State the behavior and failure mode the change addresses.
6
- 2. Keep the public API in `src/index.ts` intentionally small.
7
- 3. Add or update a typed test for every behavior change.
8
- 4. Update the README, changelog, and contract when the user-facing protocol changes.
6
+ ## Repository layout
9
7
 
10
- ## Local checks
8
+ - `src/`: capability-oriented TypeScript modules and the public `index.ts`.
9
+ - `src/adapters/`: optional provider integrations.
10
+ - `test/`: deterministic unit and contract tests.
11
+ - `scripts/`: real CLI and packaging checks.
12
+ - `docs/`: ADRs and protocol decisions.
13
+ - `.github/`: CI and release automation.
11
14
 
12
- ```bash
13
- pnpm --filter @agentskit/harness typecheck
14
- pnpm --filter @agentskit/harness test
15
- pnpm --filter @agentskit/harness build
15
+ See [docs/ORGANIZATION.md](./docs/ORGANIZATION.md) for the complete boundary
16
+ and naming rules.
17
+
18
+ ## Change workflow
19
+
20
+ 1. Start from an issue or explicit task contract.
21
+ 2. Identify the outcome and executable validation it requires.
22
+ 3. Keep the public API change in `src/index.ts` intentional.
23
+ 4. Add or update criterion-level tests for behavior changes.
24
+ 5. Update README, changelog, ADRs, or the verification contract when the
25
+ protocol changes.
26
+ 6. Run the complete local gate:
27
+
28
+ ```bash
29
+ pnpm typecheck
30
+ pnpm test
31
+ pnpm build
32
+ pnpm pack --pack-destination /tmp/agentskit-harness-pack
33
+ ak-verify run --config .codex/verification.json --json
34
+ ```
35
+
36
+ Do not report completion while a required gate is unavailable, blocked, stale,
37
+ or awaiting approval.
38
+
39
+ ## Angular Conventional Commits
40
+
41
+ Commit messages follow the Angular Conventional Commits format:
42
+
43
+ ```text
44
+ <type>(<scope>): <imperative description>
16
45
  ```
17
46
 
18
- Do not claim completion when a required check is unavailable. Preserve criterion-level evidence and report blocked work honestly.
47
+ Allowed types are `feat`, `fix`, `docs`, `refactor`, `test`, `build`, `ci`,
48
+ `perf`, `chore`, and `revert`. Use a breaking-change footer when needed:
49
+
50
+ ```text
51
+ feat(cli)!: reject incomplete evidence
52
+
53
+ BREAKING CHANGE: `run` now exits non-zero when evidence is missing.
54
+ ```
55
+
56
+ Keep commits focused. Never commit secrets, generated `dist/`, verification
57
+ state, or residue from another task.
19
58
 
20
59
  ## Pull requests
21
60
 
22
- Use a focused branch and commit. Describe the contract change, affected states, evidence produced, and exact commands executed. Breaking public API or CLI changes require a changelog entry and a maintainer review.
61
+ PRs must state the contract change, affected states, evidence produced, exact
62
+ commands executed, and any unresolved blockers. A maintainer review is required
63
+ for public API, CLI, state-machine, security, or release changes.
64
+
65
+ ## Releases
66
+
67
+ Version changes merge to `main` through a PR. The release workflow runs tests,
68
+ build, and pack, then publishes through npm Trusted Publishing (GitHub OIDC);
69
+ no `NPM_TOKEN` is used. Configure the npm trusted publisher for
70
+ `AgentsKit-io/harness` once before the first release.
23
71
 
24
72
  ## License
25
73
 
package/MANIFESTO.md ADDED
@@ -0,0 +1,23 @@
1
+ # Harness Manifesto
2
+
3
+ ## The boundary
4
+
5
+ The Playbook explains good practice. The Harness makes the SDLC observable and
6
+ enforceable. Advice may be ignored; a required gate may not.
7
+
8
+ ## The guarantees
9
+
10
+ 1. A task starts from an explicit, frozen contract.
11
+ 2. Ambiguities are surfaced with options and a recommendation; the Harness
12
+ never invents product decisions.
13
+ 3. Every required check produces structured evidence bound to source, config,
14
+ and contract hashes.
15
+ 4. A failed or missing gate blocks progression and remains auditable.
16
+ 5. Recovery resumes from the journal without silently replaying uncertain work.
17
+ 6. Integrations are replaceable adapters, not hidden kernel dependencies.
18
+ 7. Measurements report what was observed, including unavailable data.
19
+
20
+ ## Operating principle
21
+
22
+ Automate everything deterministic. Escalate only decisions that require human
23
+ judgment. Keep the smallest mechanism that proves the claim.