{"type":"meta","schema":"session-state/v1","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)","created":"2026-07-01","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 \u2014 reconcile statuses against git, never trust a COMMITTED line with no commit","refresh_how":"native Read of THIS file \u2014 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 \u2014 NO 'next action' (if you know it, do it)","preflight":{"task_graph_hash":"df1ce2e217a2bbc18389b2313c0bcc8688f27f9ab0bb3885460584514b1fde94","route":{"t1":"north","t2":"cursor","t3":"cursor","t4":"cursor","t5":"north"},"route_hash":"df1ce2e217a2bbc18389b2313c0bcc8688f27f9ab0bb3885460584514b1fde94"}}
{"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 \u2014 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) \u2014 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"}
{"type":"direction","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","path":"docs/specs/2026-07-01-run-plan-harness-gaps-design.md","what":"spec"}
{"type":"anchor","path":"docs/specs/2026-07-01-harness-migration-design.md","what":"follow-on spec (Gap E/F), gated on this plan's exit criterion"}
{"type":"anchor","path":"docs/plans/2026-07-01-run-plan-harness-gaps.md","what":"plan"}
{"type":"task","id":"t1","wave":1,"phase":1,"desc":"bin/ensure-web.sh dual-stack port probe (Gap D1)","status":"COMMITTED","deps":[],"requires_decision":null,"files":["bin/ensure-web.sh","test/ensure-web-port.sh"],"blocker":null}
{"type":"task","id":"t2","wave":1,"phase":1,"desc":"src/runner.js fail-closed plan validation + resume-safe binding recovery (Gap D2a/D2b)","status":"COMMITTED","deps":[],"requires_decision":null,"files":["src/runner.js","test/runner-integration.sh"],"blocker":null}
{"type":"task","id":"t5","wave":1,"phase":1,"desc":"run-plan SKILL.md decision-gate step + isolate clause (Gap A doc half + Gap B)","status":"COMMITTED","deps":[],"requires_decision":null,"files":["~/.claude/skills/run-plan/SKILL.md"],"blocker":null,"seat":"main-loop-inline","note":"applied inline (cross-repo target: ~/.claude/skills/run-plan/SKILL.md) \u2014 not worktree-dispatchable"}
{"type":"task","id":"t3","wave":2,"phase":1,"desc":"src/runner.js preflight decision gate honored at dispatch (Gap A)","status":"COMMITTED","deps":["t2"],"requires_decision":null,"files":["src/runner.js","test/gated-decision.sh"],"blocker":"depends on Task 2 (same file, src/runner.js)"}
{"type":"task","id":"t4","wave":3,"phase":1,"desc":"src/runner.js risk-routed review escalation (Gap C)","status":"COMMITTED","deps":["t3"],"requires_decision":null,"files":["src/runner.js","test/runner-integration.sh"],"blocker":"depends on Task 3 (same file, src/runner.js)"}
