@agentskit/harness 0.3.0 → 0.5.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 +26 -3
- package/README.md +85 -2
- package/capabilities/public-surface.json +1085 -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 +3222 -168
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2126 -38
- package/dist/index.js +4244 -461
- package/dist/index.js.map +1 -1
- package/docs/ADR-0026-kernel-adapters-boundary.md +82 -0
- package/docs/ADR-0027-keep-pushing-loop.md +41 -0
- package/docs/GETTING-STARTED.md +18 -0
- package/docs/LOOP.md +195 -0
- package/docs/MODULE-BOUNDARIES.md +171 -0
- package/docs/ORGANIZATION.md +13 -4
- package/docs/PRD-0.4.0.md +639 -0
- package/docs/TROUBLESHOOTING.md +24 -0
- package/examples/minimum-profile.mjs +27 -0
- package/loop.config.example.yaml +121 -0
- package/package.json +49 -7
- package/release/manifest.json +36 -0
- package/release/notes.md +25 -0
- package/release/qualification.json +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0] - 2026-09-11
|
|
4
|
+
|
|
5
|
+
- Added the keep-pushing SDLC loop foundation (`ak-harness loop validate|doctor`): `loop.config.yaml` schema (zod), provider detection with Orca usage/rate-limit awareness and cooldowns, role-based tiered model routing, machine slot assessment, Orca CLI and Linear-via-Orca adapters, and the loop doctor report.
|
|
6
|
+
- Added loop phase 2 adapters: Orca worktree create/set/rm, terminal send/wait/read and automations argv; Linear issue detail, status/comment/label/attach writes and a Linear `TrackingAdapter`; GitHub PR snapshots, check assessment, self-edit path guard and optimistic squash-merge via `gh`.
|
|
7
|
+
- Added loop phase 3 (`ak-harness loop tick|precheck|contract`): orchestrator-frozen task contracts with untrusted issue text, candidate fallback and provider cooldown on auth/quota failures, dispatch ledger claims, Orca worktree dispatch with `--linear-issue`, worker briefs, Linear In Progress transition and `needs-info` escalation.
|
|
8
|
+
- Added loop phase 4 (`ak-harness loop deliver`, `precheck deliver`): per-issue delivery state, PR detection by branch, protected-path hold, conflict/CI/review fix rounds sent to the worker terminal with a bounded budget, `agentskit-review` at the current head, optimistic squash-merge, Linear attach/Done, worktree cleanup, stuck/abandoned escalation with slot release.
|
|
9
|
+
- Added loop phase 5 (`ak-harness loop install|uninstall|status|hook`): idempotent Orca automations with `--precheck`, existing-workspace mode and session reuse; status with latest runs; a status-only SessionStart hook line; a cross-platform CI job (ubuntu/macos/windows); ADR-0027.
|
|
10
|
+
- `loop install` is guided: doctor and environment checks (harness/review CLIs, `gh auth`, Orca repo registration), optional dry-run tick rehearsal, explicit confirmation; `--yes`, `--force`, `--skip-rehearsal`, `--dry-run`, `--plain`.
|
|
11
|
+
- `loop install` offers to create the per-machine `loop.config.local.yaml` (queue owner from the Linear team, RAM reserve, worker ceiling) when it is missing; the CLI renders checks and prompts with Ink on TTYs and falls back to plain lines elsewhere. Grok is treated as a CLI subscription (`grok login`), no API key.
|
|
12
|
+
- Orca automations now run the stage inside the `--precheck` command (`ak-harness loop stage tick|deliver`, always exit 1) so no agent session is opened per run; `schedule.runner: agent` keeps the previous behaviour. Fixes stuck bypass-permissions sessions leaking one terminal per run.
|
|
13
|
+
- Added `ak-harness loop retro [--since 7d] [--json|--learnings]`: escalations by reason, dispatches by provider, merged/blocked/stuck, review outcomes, fix rounds, median lead time, cooldowns, Orca run summary, and rule-based calibration suggestions with the config knob to turn; the Markdown follows the harness retro grammar so `parseRetro`/`promoteLearnings` apply. Suggestions are split by target — `project` (config, issues, process) versus `harness` (library defects seen in production) — with `--target` to filter; the tick records `contract.failed` events.
|
|
14
|
+
- Reviews run `agentskit-review --mode trusted-local` by default (`delivery.review.mode`); the isolated default gives claude/codex a temporary HOME without credentials and every lens fails with "Not logged in".
|
|
15
|
+
- Review defaults fit an Orca stage: `profile: fast`, `votes: 1`, `concurrency: 4`, and the deadline is capped to the stage budget under `runner: precheck`; `full` profile stays available for long deadlines.
|
|
16
|
+
- `delivery.review.transport` (`acp` \| `headless` \| `auto`) is passed through to `agentskit-review` so Grok can use headless when ACP is broken.
|
|
17
|
+
- Added `ak-harness loop debrief`: read-only human explanation of in-flight work, holds, escalations and cooldowns (Markdown or `--json`).
|
|
18
|
+
- Added `ak-harness loop watch`: TypeScript poller over `delivery.json` (+ optional live PR) emitting `DONE` / `FAILED` / `ACTION_REQUIRED` / `PROGRESS`.
|
|
19
|
+
- Workers are launched with the configured TUI command in their own terminal (`orca worktree create` without `--agent`, then `orca terminal create --command <tui>`, wait for idle, send the brief). Orca's `--agent claude` starts in bypass-permissions mode and blocks on a human prompt. The tick has a wall-clock budget under `runner: precheck`; a failed dispatch removes its half-created worktree.
|
|
20
|
+
- 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.
|
|
21
|
+
|
|
22
|
+
## [0.4.0] - 2026-09-10
|
|
23
|
+
|
|
24
|
+
- Added phase quality matrices, watchdog classification, and resource telemetry.
|
|
25
|
+
- Added versioned eval and ecosystem compatibility manifests with fail-closed
|
|
26
|
+
evidence handling.
|
|
27
|
+
- Added runnable consumer onboarding, adapter examples, and troubleshooting.
|
|
28
|
+
|
|
3
29
|
## [0.3.0] - 2026-09-10
|
|
4
30
|
|
|
5
31
|
- Added portable issue/worktree claims and idempotent dispatch ledger.
|
|
@@ -9,9 +35,6 @@
|
|
|
9
35
|
policies, and provider-neutral Orca/tracking adapters.
|
|
10
36
|
- Added configurable machine pressure thresholds and adaptive workflow limits.
|
|
11
37
|
|
|
12
|
-
## [Unreleased]
|
|
13
|
-
|
|
14
|
-
- 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.
|
|
15
38
|
|
|
16
39
|
All notable changes to `@agentskit/harness` are documented here.
|
|
17
40
|
|
package/README.md
CHANGED
|
@@ -6,7 +6,15 @@ docbridge:
|
|
|
6
6
|
|
|
7
7
|
# @agentskit/harness
|
|
8
8
|
|
|
9
|
-
Portable, evidence-backed development protocol for coding agents. The harness freezes a
|
|
9
|
+
Portable, evidence-backed development protocol for coding agents. The harness freezes a task contract, executes every configured check, binds evidence to the current source revision, detects stale results, and applies the configured controlled or YOLO approval policy.
|
|
10
|
+
|
|
11
|
+
## Keep-pushing loop (Orca)
|
|
12
|
+
|
|
13
|
+
`ak-harness loop …` drains one person's Linear queue through Orca worktrees 24/7 — tiered model routing with
|
|
14
|
+
usage-aware fallback, orchestrator-frozen contracts, adversarial review, squash-merge, and one deduplicated
|
|
15
|
+
escalation when a ticket cannot be verified. Everything project-specific lives in `loop.config.yaml`
|
|
16
|
+
(start from [`loop.config.example.yaml`](loop.config.example.yaml)). Guide: [`docs/LOOP.md`](docs/LOOP.md) ·
|
|
17
|
+
decision record: [`docs/ADR-0027-keep-pushing-loop.md`](docs/ADR-0027-keep-pushing-loop.md).
|
|
10
18
|
|
|
11
19
|
## Install
|
|
12
20
|
|
|
@@ -14,6 +22,10 @@ Portable, evidence-backed development protocol for coding agents. The harness fr
|
|
|
14
22
|
pnpm add -D @agentskit/harness
|
|
15
23
|
```
|
|
16
24
|
|
|
25
|
+
New consumers can run [`examples/minimum-profile.mjs`](examples/minimum-profile.mjs)
|
|
26
|
+
after `pnpm build`; the walkthrough is in [`docs/GETTING-STARTED.md`](docs/GETTING-STARTED.md).
|
|
27
|
+
Common gate and runtime failures are documented in [`docs/TROUBLESHOOTING.md`](docs/TROUBLESHOOTING.md).
|
|
28
|
+
|
|
17
29
|
The package requires Node.js 22 or newer and exposes both `ak-harness` and the common-protocol alias `ak-verify`.
|
|
18
30
|
|
|
19
31
|
## Workflow
|
|
@@ -44,7 +56,7 @@ Endpoint, database, CLI, MCP, and UI checks must declare `execution: "real"`. UI
|
|
|
44
56
|
|
|
45
57
|
## API
|
|
46
58
|
|
|
47
|
-
The public TypeScript API is exported from `src/index.ts` and includes configuration loading, lifecycle operations, state transitions, evidence verification, approvals, cancellation, retries,
|
|
59
|
+
The public TypeScript API is exported from `src/index.ts` and includes configuration loading, lifecycle operations, state transitions, evidence verification, approvals, cancellation, retries, task-owned cleanup, versioned capability manifests, event-envelope validation, deterministic phase execution, and stable error classification. Internal modules are not part of the supported API. The checked-in [capability manifest](./capabilities/public-surface.json) is generated from this entry point; run `pnpm test:capabilities` to detect drift.
|
|
48
60
|
|
|
49
61
|
## Extensibility
|
|
50
62
|
|
|
@@ -85,6 +97,29 @@ the current state, so a post-approval edit cannot appear as `COMPLETE`.
|
|
|
85
97
|
Concurrent event writers are serialized by an atomic per-run lock and fail
|
|
86
98
|
closed if the log is busy.
|
|
87
99
|
|
|
100
|
+
Structured plans, findings, decisions, repairs, blockers, approvals, and phase
|
|
101
|
+
results can be persisted as provenance-bound `ArtifactEnvelope` records. Each
|
|
102
|
+
artifact has a version, run/issue/source/contract/config/context hashes, a
|
|
103
|
+
content digest, and both JSON and Markdown representations. `FileArtifactStore`
|
|
104
|
+
is idempotent: retrying the same write does not duplicate the event-log record.
|
|
105
|
+
Use `resumeStateFromArtifacts` to rebuild completed phase outputs after an
|
|
106
|
+
interruption, and inspect records with `ak-harness artifacts inspect <path>` or
|
|
107
|
+
`ak-harness artifacts list [run-id]`.
|
|
108
|
+
|
|
109
|
+
The legacy event-log record remains schema version 1 for compatibility. New
|
|
110
|
+
provider-neutral integrations can exchange the schema-versioned v2
|
|
111
|
+
`HarnessEventEnvelope`, which requires event identity, correlation, source
|
|
112
|
+
revision, idempotency, and provenance metadata. `classifyHarnessError` maps
|
|
113
|
+
stable Harness error codes to `retry`, `block`, or `escalate` dispositions.
|
|
114
|
+
|
|
115
|
+
Replaceable integrations use the shared `AdapterMetadata` contract: every
|
|
116
|
+
adapter declares an assurance level (`unverified`, `contract-tested`, or
|
|
117
|
+
`runtime-attested`) and measured/unknown telemetry. Coding agents return
|
|
118
|
+
structured output, diff, usage, timeout/cancellation status, and failure
|
|
119
|
+
classification; Doc Bridge reports relevance and context cost; Orca exposes
|
|
120
|
+
lease/lock/worktree/SHA projections; and tracking adapters deduplicate effects
|
|
121
|
+
by idempotency key (with a dry-run mode).
|
|
122
|
+
|
|
88
123
|
Each harness event may also carry an optional `correlation` envelope. Its
|
|
89
124
|
`operationId` is the stable identity used when a lifecycle crosses into
|
|
90
125
|
AgentsKit, Chat, Doc Bridge, or Code Review; the optional `runId`, `sessionId`,
|
|
@@ -123,6 +158,40 @@ contract is frozen:
|
|
|
123
158
|
|
|
124
159
|
`autonomy: "yolo"` removes the generic final review only after every applicable check passes, tracking is disabled, and the frozen contract has no ambiguity. It never auto-approves a material decision, external tracking, or a tool rule that requires approval.
|
|
125
160
|
|
|
161
|
+
The phase executor applies the same rule to a declarative SDLC profile. A profile
|
|
162
|
+
declares dependencies, inputs/outputs, gates, bounded retries, budgets, and an
|
|
163
|
+
effect class (`read`, `write`, or `external`). `safe`, `yolo`, and `dry-run`
|
|
164
|
+
profiles share the engine; only the effect policy changes:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
const profile = createPhaseProfile({
|
|
168
|
+
id: 'feature', mode: 'yolo',
|
|
169
|
+
phases: [
|
|
170
|
+
{ id: 'discover', outputs: ['plan'], effect: 'read' },
|
|
171
|
+
{ id: 'implement', inputs: ['plan'], dependsOn: ['discover'], effect: 'write' },
|
|
172
|
+
],
|
|
173
|
+
})
|
|
174
|
+
const result = await executePhaseProfile(profile, {
|
|
175
|
+
preflight: grillMeAndPreflight,
|
|
176
|
+
handlers: { discover, implement },
|
|
177
|
+
})
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Preflight runs for all mutating phases before any effect. Material ambiguities
|
|
181
|
+
are returned as one structured decision packet; dry-run previews mutating phases
|
|
182
|
+
without invoking their handlers. `planPhaseProfile` exposes the deterministic
|
|
183
|
+
route without executing it.
|
|
184
|
+
|
|
185
|
+
`runAdversarialReview` executes independent review lenses with bounded
|
|
186
|
+
concurrency/retries and blocks empty or non-reproducible verdicts. Delivery
|
|
187
|
+
helpers hash-bind the approved PR body/metadata and only emit a QA transition
|
|
188
|
+
after feature validation and G5 acceptance; failed QA returns to verification.
|
|
189
|
+
|
|
190
|
+
`createQualityMatrix` aggregates phase evidence, outcomes, duration, token/cache,
|
|
191
|
+
machine, and concurrency signals into bounded 0–100 dimensions with baseline
|
|
192
|
+
deltas. Missing measurements remain `unknown`; `evaluateWatchdog` emits typed
|
|
193
|
+
budget/resource/contention blockers instead of treating absent data as success.
|
|
194
|
+
|
|
126
195
|
Use named profiles to make the operational choice explicit:
|
|
127
196
|
|
|
128
197
|
```json
|
|
@@ -242,6 +311,17 @@ in sorted, bounded fan-out/fan-in batches while serializing nodes that share a
|
|
|
242
311
|
optional token, memory, cache, and parallelism measurements and refuses
|
|
243
312
|
incomparable provider/model/configuration bindings.
|
|
244
313
|
|
|
314
|
+
`evals/manifest.json` is the versioned evaluation battery. `validateEvalManifest`
|
|
315
|
+
requires contract, deterministic, integration, quality, regression, and
|
|
316
|
+
resource layers plus coverage for every supported component. `runEvalBattery`
|
|
317
|
+
repeats each case and reports min/median/max scores; unknown, stale, critical,
|
|
318
|
+
subjective, or unapproved regression results block the gate.
|
|
319
|
+
|
|
320
|
+
`compatibility/manifest.json` pins the AgentsKit ecosystem revisions and the
|
|
321
|
+
upstream test/eval commands. `assessCompatibility` accepts only complete,
|
|
322
|
+
evidence-bound real-adapter observations and blocks unknown or failed upstream
|
|
323
|
+
results; migration and rollback procedures are kept beside the manifest.
|
|
324
|
+
|
|
245
325
|
These are seams, not replacements for AgentsKit packages. An integration may
|
|
246
326
|
adapt `@agentskit/memory` and `@agentskit/eval` into them while keeping the
|
|
247
327
|
Harness provider-neutral. Missing measurements remain missing; they are never
|
|
@@ -524,6 +604,9 @@ Releases are published by `.github/workflows/release-harness.yml` after a merge
|
|
|
524
604
|
or require an `NPM_TOKEN`. Configure the npm trusted publisher once for
|
|
525
605
|
`AgentsKit-io/harness`, workflow `release-harness.yml`, and package
|
|
526
606
|
`@agentskit/harness`; version changes remain the release trigger.
|
|
607
|
+
The 0.4.0 candidate checklist and explicit blockers live in
|
|
608
|
+
[`release/manifest.json`](release/manifest.json) and
|
|
609
|
+
[`release/notes.md`](release/notes.md).
|
|
527
610
|
|
|
528
611
|
## License
|
|
529
612
|
|