type: goal

text: Rebuild harness v2 Phase 1 trust core: independent review, bounded gate repair, ordered seat fallback, durable retry stop-loss, rate-limit parking, and flat remaining presets.


type: methodology

text: Implement contract-first in dependency waves; persist authority in append-only journal state; use TDD; preserve strict gates; fail closed; commit only each task's declared files.


type: intent

text: Make unattended v2 execution trustworthy before adding supervision, queueing, control, maintenance, or landing automation.


type: direction

verbatim: no daemons as monoliths — systemd units/timers + short idempotent scripts + state on disk


verbatim: v1 code bodies are NEVER ported, only behavior re-specced


verbatim: Owner approved the scope; do not add approval gates.


type: task

seat: coder

tier: medium

desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 1 (Durable Retry Ledger) for the full contract. Persist quality attempts, parking counts, monotonic journal sequence, and repeated-failure stop-loss state across restarts. Acceptance: node --test modules/harness/v2/test/journal-quality.test.js. Commit only: modules/harness/v2/journal.js, modules/harness/spec/events.schema.json, modules/harness/v2/test/journal-quality.test.js.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 2 (Ordered Seat Fallback and Independent Reviewer) for the full contract. Resolve bounded eligible fallback chains and require an independent healthy reviewer binding. Acceptance: node --test modules/harness/v2/test/seats-quality.test.js. Commit only: modules/harness/v2/seats.js, modules/harness/spec/presets.schema.json, modules/harness/spec/PRESETS.md, modules/harness/v2/test/seats-quality.test.js.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 3 (Rate-Limit Parking) for the full contract. Park exit-75 dispatches with reset/wake handling, heartbeats, and an eight-park cap without consuming normal retry attempts. Acceptance: node --test modules/harness/v2/test/dispatch-parking.test.js. Commit only: modules/harness/v2/dispatch.js, modules/harness/v2/test/dispatch-parking.test.js.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 4 (Flatten Anthropic-Less Preset) for the full contract. Replace anthropic-less tiered coder routing with its approved flat medium binding. Acceptance: node modules/harness/presets/_validate.mjs. Commit only: modules/harness/presets/anthropic-less.json.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 5 (Flatten Canary Preset) for the full contract. Replace duplicate canary coder and reviewer tier maps with flat deterministic bindings. Acceptance: node modules/harness/presets/_validate.mjs. Commit only: modules/harness/presets/canary.json.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 6 (Flatten Grok Preset) for the full contract. Replace grok tiered coder routing with its approved flat medium binding. Acceptance: node modules/harness/presets/_validate.mjs. Commit only: modules/harness/presets/grok.json.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 7 (Review and Gate-Fix State Machine) for the full contract. Enforce read-only independent review and deterministic dependency-repair→fixer→stronger-fixer gate recovery. Acceptance: node --test modules/harness/v2/test/quality.test.js modules/harness/v2/test/child.test.js. Commit only: modules/harness/v2/quality.js, modules/harness/v2/child.js, modules/harness/v2/test/quality.test.js, modules/harness/v2/test/child.test.js.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 8 (Integrate Trust Core into Run Lifecycle) for the full contract. Wire fallback, parking, review, repair, retry ledger, and stop-loss into the v2 task lifecycle before checkpoint. Acceptance: node --test modules/harness/v2/test/run-quality.test.js. Commit only: modules/harness/v2/run.js, modules/harness/v2/test/run-quality.test.js.


desc: Read docs/plans/2026-07-29-harness-v2-phase1.md Task 9 (Register and Run Full v2 Regression Suite) for the full contract. Register every new Phase 1 suite and verify syntax, preset validation, and all v2 regressions without warnings. Acceptance: node --check modules/harness/v2/journal.js && node --check modules/harness/v2/seats.js && node --check modules/harness/v2/dispatch.js && node --check modules/harness/v2/quality.js && node --check modules/harness/v2/run.js && node modules/harness/presets/_validate.mjs && node modules/harness/v2/test/index.js. Commit only: modules/harness/v2/test/index.js.