83%

Section composite gate + nesting + zero-as-reset

Goal

  • Model mission/criteria as work items under one section composite gate.
  • Refactor existing mission/criteria/parity/leak checks into those proofs.
  • Use generic invocation + subtree/return gates instead of run_sub_sm.
  • Make /zero reset proof/review state + generation while keeping deliverables.

Self-hosting constraint

Run off-path on the new engine before cutover. Keep verify_and_complete_v7 on the old path until retirement.

Implementation sketch

  • section.json: enter through fixed reconcile over the plan API; all_work_items_complete is the sole domain-proof leaf; section completion composes it with subtree quiescence and all child returns folded.
  • Author the mission/criteria-as-work_items: technical-mission (test_all + scope-aware L9/L10), non-technical/functional-mission (kind:functional end-state), success-criteria work_items — each proven by the work-item SM; fold the existing MISSION_FULFILLMENT/CRITERIA_SATISFIED/per-node checks into their proofs.
  • plan_workflow.json domain workflow: fixed plan-derived reconcile entry, plan/section/work-item composition, and generic invocation frames; plan gate includes domain proof + subtree/return gates, while any frame cursor is receipt-bound and non-authoritative. The distinct filename prevents confusion with the authoritative domain-artifact plan.json.
  • reset_zero action: clear status/proofs/criteria/reviewed+hash, keep deliverable; each selected section receives JIT /review-section through review_as_phase before work.
  • Carry plan/section/work-item identity through nested frame capabilities; child ContextAssembly cannot widen parent scope.
  • Keep Prompt/Rule/Reminder definitions intact across zero; re-evaluate selectors from reset state.

Spec references

  • plans/workflow-engine-rework/spec/workflow-state-machines.md sec 4 (section composite gate), sec 5 (nesting), sec 6 (zeroing). Research: verify_and_complete_v7 already enforces MISSION_FULFILLMENT + CRITERIA_SATISFIED.

Work items

  • section.json: fixed plan-derived reconcile entry; domain proof = all_work_items_complete; completion = domain proof + subtree_quiescent + all_child_results_folded
  • Author mission/criteria-as-work_items; fold existing MISSION_FULFILLMENT/CRITERIA/per-node checks into their proofs
  • plan_workflow.json domain workflow with fixed plan-derived reconcile entry + generic invocation composition; author the plan-wide functional-mission and plan-wide success-criteria work_items (parity with the section-level mission/criteria fold in w-6882a0f1) so plan domain completion is all sections plus these plan-wide work_items, per spec sec 5’s PLAN composition; plan-wide domain/subtree/return gate; no free-standing frame workflow state and no filename collision with the domain-artifact plan.json
  • reset_zero action: clear status/proofs/criteria/reviewed+hash, keep deliverable; require per-section JIT review_as_phase and prohibit plan-wide fan-out
  • Thread root/frame scope through plan, section, and work-item domain SMs; require subtree quiescence/return folding and stale-return rejection after zero

Test strategy / acceptance

Matrix: composite gate x nested frame scope x zero reset. Pins: every ordinary plan/section entry reconciles from plan state; unbound/stale cursors reject; incomplete mission blocks; child cannot target sibling/parent plan; zero clears evidence/review but preserves control definitions and reselects reminders from current state.

Intel dossier — pointer and tier disposition

Dossier: section-gate-nesting-zero--s-4575d22d.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 tierTitleLinesDispositionWhere / why
00. Bottom line up front43pending
11. The target, verbatim41pending
22. The terrain — symbols in the objective area (with files)76pending
33. Code-graph recon164pending
3D3D. Diagnostic / observability surface30pending
3H3H. Hygiene constraints the downstream work inherits26pending
44. Cluster / family — the sections that consume this terrain30pending
55. Conformance audit — graph-dark, source-confirmed duplication37pending
66. Plan ownership — the plan-symbol bridge does not reach this terrain31pending
77. Prior art — LOW SIGNAL, and that is the finding17pending
88. Sentiment — LOW SIGNAL20pending
99. Declared coverage gaps — what is dark, and why28pending
1010. Recommended recon entry points (ordered)24pending