Retire legacy workflow/control paths
Goal
Retire every parallel workflow/context/queue/closeout path after durability, shadow parity, self-hosting, and new-root cutover pass. Keep one engine, invocation protocol, selector, ContextAssembler, queue selector, and root closeout coordinator.
Self-hosting constraint
- Remove the old path ONLY after the engine has driven this plan’s post-cutover work and every ported scenario is green.
- Delete the legacy-escape branch LAST. The surviving old-path gate is
WORKFLOW_ENGINE_LEGACY=1(scripts/workflow_engine/drive_hook.py), NEVER aWORKFLOW_ENGINE_DRIVEopt-in. - Retiring that branch removes the last non-engine serve/completion route; git revert is the durable reversal until then.
Implementation sketch
- Re-run root durability, invocation, return-fold, Reminder lifecycle, selector, virtual-batch, and client parity acceptance suites.
- Retire copied prompt strings, path-only canonical rule ownership, per-runtime selectors, legacy
attach_*guidance, and client-side route inference. - Retire every model/client-authored workflow prompt, goal/loop operation other than the exact continue-runtime read and unchanged current/next delivery, goal/loop state inference, transcript-completion heuristic, and client-authored keep/stop branch. Keep only script-rendered prompt catalogs, plan/tracker domain state, root execution mechanics, ContinueRuntimeView delivery, and engine-issued TerminalReceipt observation.
- Require a machine-readable migration manifest mapping every harvested workflow/decision/resume/loop/control surface to its engine workflow/component and removed legacy owner.
- Reconcile that manifest against every live skill and command in
spec/migration-targets.md; require its classified shape, public-entrypoint cutover, applicable scenario/client/context/replay/fault/performance gates, sealed migration receipt, and old-owner removal. A wrapper contract alone is not migration. - Retire independent child closeout/review/version/commit/status branches and
skip/deferredownership aliases; only root obligations remain. - Retire live/compose-only
/fix-next-bugselector duplicates and historical cluster-promotion execution paths; preserve explicit domain ownership declarations and advisory graph relatedness. - Generate Claude compatibility projections from
workflow_control/; require Claude Code + OpenCode semantic parity before retiring Claude ownership. - Retire the old path: remove the old completion/serve code + the
WORKFLOW_ENGINE_LEGACYescape branch ONLY after full-scenario-green + the self-hosting completion; full./test-all.shgreen. - Retire the old changelog home (enforces the engine-core
s-e585be74“no third changelog home” SRP split): migrate the existingimprove-tooling/*-design.md §6 Improvement Logentries for each migrated component into that component’sComponentMetadata.changelog(append-only), THEN delete the§6 Improvement Logsection from the migrated design-logs — design-log§4 Lessons(deep rationale) stays. Gated bysc-6106109e.
Spec references
- plans/workflow-engine-rework/spec/workflow-state-machines.md sec 11 (researched hardening: 11.1 concepts, 11.2 net-new, 11.3 guard rails); sec 10 (strangler migration — never big-bang).
Test strategy / acceptance
Retirement pins:
- ONE engine/store/selector/assembler/batch/closeout/adapter pump/reminder scheduler.
- NO child closeouts, client-authored stops/timers/prompts, client or transcript domain state, arbitrary yields, prose-driven routing, or copied guidance.
- Exhaustive skill/command inventory closure.
- Full scenario/property/fault/client/context suite + spec-sec-11.4 bounded liveness and performance comparators +
./test-all.shgreen. - Every validated regression or required comparator miss is Critical.
- Acceptance depends on fixed workloads and fault windows, NEVER elapsed-time waiting.
Work Items
- Re-run 3-channel error, root/frame idempotency, and cross-session durability gates before deletion
- Re-run invocation reconcile-resume and root engine-bundle inheritance gates before deletion
- Re-run sec-11.3 root/invocation/batch guard-rail suite before deletion
- Verify Reminder lifecycle persistence at invocation/subtree/root scope and zero credit for violated mandatory reminders
- Retire duplicate, hand-authored, and model/client-authored prompt/directive strings plus legacy attach paths after reminder migration; enforce script-producer/source-reference pins, catalog coverage, exact rendered digests, and no parallel assembly path
- Prove contextual selectors eliminate harvested path-based miss and over-hit scenarios while preserving required rule coverage and bounded context
- Retire Claude-only canonical rule ownership after generated projections and the concrete Claude Code, Codex, and OpenCode adapters pass the same context-assembly, script-prompt provenance, and transport-observer scenarios
- Verify root/frame/subtree tombstones, active ownership, and stale-return rejection before legacy removal
- Verify every root/frame mismatch, rejected override, clarification halt, child push/pop, and root pivot is traced before legacy removal
- Verify the migration manifest reconciles in both directions with every live skill/command inventory row and has exactly one classified target shape, public engine owner, applicable scenario/client/context/replay/fault/performance evidence, sealed receipt, and legacy-removal receipt; reject missing, duplicate, dead, wrapper-only, or unbounded owners
- Retire client-prompted reminder refresh, client-authored stop/next-action state, goal/loop operations beyond ContinueRuntimeAPI.read plus unchanged current/next delivery, goal/loop-as-workflow-state, transcript completion heuristics, and prose-driven blocker detours after proactive guidance, script-owned transport directives, matching TerminalReceipt observation, timer scheduler, and typed routing prove authoritative
- Terminally dispose every folded tooling-cli bug before retirement: close absorbed (SUBSUMED-BY-stamped) bugs whose cure shipped via the tracker flip API with a resolution citing the owning section, re-verify obe closes, and prove zero folded bugs lack a terminal disposition (verify_bug_fold_manifest green over the final tracker state)
- Retire the old scattered path after full-scenario-green + self-hosting completion (test-all green) AND retire the old changelog home: migrate each migrated component’s
improve-tooling/*-design.md §6 Improvement Logentries into itsComponentMetadata.changelog, then delete the§6 Improvement Logsection (design-log§4 Lessonsstays). Gated bysc-6106109e.
Intel dossier — pointer and tier disposition
Dossier: hardening-retire--s-6738975c.intel.md (this section’s content/intel/ sidecar)
Read that dossier from line 1 through EOF before acting on this section. This block is a pointer and an audit record, never a substitute: not the BLUF, not a summary, not selected tiers.
| Dossier tier | Title | Lines | Disposition | Where / why |
|---|---|---|---|---|
| 0 | 0. Bottom line up front | 36 | pending | |
| 1 | 1. The target, verbatim | 30 | pending | |
| 2 | 2. Terrain — the deletion + proof surface | 66 | pending | |
| 3 | 3. Code-graph recon | 162 | pending | |
| 3D | 3D. Diagnostic / observability surface — the engine’s own verifier suite | 34 | pending | |
| 3H | 3H. Hygiene constraints the downstream work inherits | 30 | pending | |
| 4 | 4. Cluster / family — what must land first, and what is still open | 52 | pending | |
| 5 | 5. Conformance audit — one-owner proof, and where it currently stands | 25 | pending | |
| 6 | 6. Plan ownership | 24 | pending | |
| 7 | 7. Prior art — legacy-path removal in mature compilers | 42 | pending | |
| 8 | 8. Sentiment — community heat around legacy-path retirement | 13 | pending | |
| 9 | 9. Declared coverage gaps — what this dossier could NOT see | 34 | pending | |
| 10 | 10. Recommended recon entry points | 27 | pending |