type: meta

slug: run-plan-harness-gaps

topic: close 4 gaps between run-plan's new harness-engine path and the Workflow controller: real web-UI/validation crash (D), preflight decision gate (A), --isolate clone-run (B), risk-routed review escalation (C)

exec_mode: ship

scheduler: dag-parallel

land_mode: merge-to-main

base_branch: main

status_enum: BLOCKED PENDING WORKING WRITTEN REVIEWED COMMITTED

truth_rule: this file is ground truth for INTENT (goals/directions/task list); git is ground truth for DONE-NESS — reconcile statuses against git, never trust a COMMITTED line with no commit

refresh_how: native Read of THIS file — NEVER ctx_execute/ctx_search (the point is re-injecting intent into the main thread; a context-mode call keeps bytes OUT and silently kills the feature)

refresh_what: meta + every goal/methodology/intent/direction record + all WORKING and BLOCKED tasks (skip COMMITTED lines)

refresh_when:
wave/phase boundary
any task status change
after a compaction system-reminder
before calling advisor

update_rule: on status change, rewrite that task's single line in place; append new tasks/session_memory as new lines

report_rule: at session end emit brief: done / blocked / deferred / canceled — NO 'next action' (if you know it, do it)

t1: north

t2: cursor

t3: cursor

t4: cursor

t5: north


type: goal

text: make the harness engine (bin/runplan/src/runner.js) fully parity with the Workflow controller on decision gates, isolate, and risk escalation, and fix the D2 web-UI/validation crash — WITHOUT touching brainstorm/handoff emission (that's a separate, gated follow-on spec)


type: methodology

text: execute on the Workflow controller (this file's schema is session-state/v1) — this plan itself must NOT run on the harness engine it is fixing, since D2b (resume-path bug) would crash the very run fixing it


type: intent

text: the harness engine was just wired as an alternate execution path for no-schema plans; this spec closes the gaps found while testing that wiring, so the harness path is safe to rely on before any producer defaults to emitting for it


type: direction

verbatim: we are just migrating to mega-plan-harness


verbatim: split into 2 plans (Recommended)


type: checkpoint

text: exit criterion for this plan, gating the harness-migration follow-on: a deliberate hand-authored harness-native plan runs end-to-end through bin/runplan to completion (all waves done, no D2-class crash on any resume)


type: anchor

what: follow-on spec (Gap E/F), gated on this plan's exit criterion


type: task

desc: bin/ensure-web.sh dual-stack port probe (Gap D1)

status: COMMITTED


desc: src/runner.js fail-closed plan validation + resume-safe binding recovery (Gap D2a/D2b)


desc: run-plan SKILL.md decision-gate step + isolate clause (Gap A doc half + Gap B)

seat: main-loop-inline

note: applied inline (cross-repo target: ~/.claude/skills/run-plan/SKILL.md) — not worktree-dispatchable


desc: src/runner.js preflight decision gate honored at dispatch (Gap A)

blocker: depends on Task 2 (same file, src/runner.js)


desc: src/runner.js risk-routed review escalation (Gap C)

blocker: depends on Task 3 (same file, src/runner.js)