91%

Section 03A — Substrate Verification Gates

Cites §01 north star (invariants 10, 17 — single-update-point + completion-integrity): §03A’s gates verify the §03 substrate satisfies the constitution before §04 self-convert.

Intelligence Reconnaissance

Run 2026-05-28:

  • scripts/intel-query.sh dag-ascii scripts-first-restructure — §03A linear-walk position: §03 → §03A → §04 (consumer) per [ori:plans/scripts-first-restructure/00-overview.md:110].
  • scripts/intel-query.sh plan-status scripts-first-restructure — §03 deliverables status: complete per [ori:plans/scripts-first-restructure/section-03-substrate.md:5]; §03A is the close-out gate.
  • scripts/intel-query.sh file-symbols scripts/plan_corpus/ — substrate modules [ori:scripts/plan_corpus/schema.py], [ori:scripts/plan_corpus/write.py], [ori:scripts/plan_corpus/per_plan_route.py], [ori:scripts/plan_corpus/checkbox_scan.py], [ori:scripts/plan_corpus/render.py] consumed by Execution protocol step 2 + step 3.
  • scripts/intel-query.sh bugs-for plans/scripts-first-restructure — no open blockers in [ori:bug-tracker/open-bugs.json].
  • scripts/intel-query.sh similar build_plan_json_from_dir --repo ori — §03 substrate parser SSOT at [ori:scripts/plan_corpus/migrations/006_md_to_json.py]; separated from §05 cross-plan engine contract.

Results summary: §03A sits at the §03 close-out gate; all 5 substrate modules + parser SSOT verified present; zero open blocking bugs; per-plan-only separation contract enforced by the §03 negative-import test gated below.

Goal

See frontmatter. Three deliverables: pytest substrate suite green; negative-import test confirming substrate stays per-plan-only (no §05 cross-plan merge engine import); plan_corpus check exit 0 on both §03 and §03A files; final full-section /tpr-review.

Execution protocol

Gates run in declared order; each MUST pass before the next runs. Fail-loud: a failing gate halts §03A close-out + routes cure as named below; NEVER silent-skip.

  1. §03 deliverable verification — read live §03 frontmatter; assert every subsection status: complete; assert every success_criterion has a [x] body counterpart. Fail → re-open §03 (status flip via plan-complete.py; the failing subsection becomes the cure surface).
  2. pytest substrate suitetimeout 150 python -m pytest scripts/plan_corpus/tests/test_convert_plan_dir.py scripts/plan_corpus/tests/test_plan_json_write.py scripts/plan_corpus/tests/test_checkbox_scan.py scripts/plan_corpus/tests/test_per_plan_route.py scripts/plan_corpus/tests/test_render_todo_yah.py. Pass = exit 0 + 0 failed. Fail → land cure in §03 subsection that owns the failing test.
  3. Negative-import boundary test — included in test_convert_plan_dir.py::test_h_negative_boundary_no_section_05_import. Pass = test_h green. Fail → §03.3 cross-plan hint wrapper must NOT import §05; cure in scripts/plan_corpus/per_plan_route.py.
  4. plan_corpus checktimeout 60 python -m scripts.plan_corpus check plans/scripts-first-restructure/section-03-*.md plans/scripts-first-restructure/section-03A-*.md. Pass = exit 0. Fail → schema violation; cure in the offending plan file.
  5. /tpr-review final — dispatch: /tpr-review --skill review-plan plans/scripts-first-restructure/section-03A-substrate-verification.md --autonomous. Per-third_party_review.status routing (CLOSED enum per scripts/plan_corpus/schemas.py:46 TPR_STATUSES):
    • clean → PASS; flip 03A.1 checkbox; §03A close-out follows (§03A.R complete + §03A frontmatter flip).
    • cap_reached_clean → PASS; flip 03A.1 checkbox; §03A close-out follows (§03A.R complete + §03A frontmatter flip).
    • findings → record each finding under §03A.R as - [ ] with reviewer attribution + finding_id; re-dispatch after fixes land; do NOT flip 03A.1.
    • cap_reached_with_substantive → record substantive findings under §03A.R; re-dispatch with --max-rounds=N; do NOT flip 03A.1.
    • resolved → re-verify findings actually resolved per §NN.R checklist; re-dispatch /tpr-review to confirm clean; flip 03A.1 only after re-verified clean.
    • none → step 5 not executed; re-dispatch.

03A.1 — Substrate verification gates (migrated from §03.N)

  • §03.1-§03.4 [x] and status: complete — verify on the live §03 frontmatter (Execution protocol step 1). 2026-05-28: §03 status:complete + reviewed:true; 03.1-03.4 + 03.R all status:complete.
  • All §03 success criteria have [x] checkboxes (Execution protocol step 1).
  • pytest substrate suite green (Execution protocol step 2 — 5 test files: test_convert_plan_dir + test_plan_json_write + test_checkbox_scan + test_per_plan_route + test_render_todo_yah). 2026-05-28: 72/72 passed in 1.12s.
  • Negative test: test_h_negative_boundary_no_section_05_import green (Execution protocol step 3). 2026-05-28: 1/1 passed.
    • Widen negative-import coverage: import every §03 substrate module in a fresh interpreter (scripts/plan_corpus/schema.py, write.py, id-keyed scanner module, per_plan_route.py, todo-yah render view) and assert NONE transitively imports the §05 cross-plan merge engine. 2026-05-28: 5/5 substrate modules verified §05-free (schemas, write, checkbox_scan, per_plan_route, render).
  • Code-side /tpr-review over §03 source modules under scripts/plan_corpus/ (schema.py, write.py, scanner, per_plan_route.py, todo-yah render) + the 5 pytest files cited in Execution protocol step 2; runs BEFORE the plan-mode final per §04 dep on §03A. 2026-05-28: 2 /tpr-review rounds (2 actionable → 2 actionable → CLEAN); cures landed: _mem_move_subsection SSOT extraction (write.py:2326) + file_not_found halt_reason registration (exit_reasons.py + halt-registry tests).
  • python -m scripts.plan_corpus check plans/scripts-first-restructure/section-03-*.md exit 0 (Execution protocol step 4). 2026-05-28: exit 0.
  • python -m scripts.plan_corpus check plans/scripts-first-restructure/section-03A-*.md exit 0 (Execution protocol step 4). 2026-05-28: exit 0.
  • /tpr-review --skill review-plan section-03A-substrate-verification.md --autonomous returns terminal third_party_review.status per Execution protocol step 5 routing (PASS: clean / cap_reached_clean / resolved). 2026-05-28: 4 /tpr-review rounds (8 → 7 → 5 → 3 → CLEAN) under /review-plan autopilot-run-id 1e6b474e; verdict SIGNIFICANT REWORK APPLIED; flip_from_in_review_clean set reviewed:true.
  • Subsection close (03A.1) — all [x]; status: complete.

03A.R — Third Party Review Findings

No findings. §03A.1 last bullet records 4 /tpr-review rounds (8 → 7 → 5 → 3 → CLEAN) under /review-plan autopilot-run-id 1e6b474e; flip_from_in_review_clean set reviewed: true. Zero residual findings to track.

References

  • §03 — Minimal JSON-Authoring Substrate (parent; §03.1-§03.4 deliverables verified by gates above)
  • Deadlock cure 2026-05-28: §03.N migrated here so §03 can flip status: complete on its own deliverables, per recommended_unblock Option 1 (migrate cycle-causing subsection into letter-suffix sibling). §03 deliverables remain complete; downstream verification owns this sibling.

HISTORY

  • 2026-05-28 — Stale review_pipeline: marker cleared by /continue-roadmap orchestrator: marker carried stage: ?, next_step: ?, updated: ?. Per /review-plan SKILL.md §Step 1a stale-marker rule (reviewed: false + marker present → STALE by definition), marker invalid; prior diagnosis preserved here for traceability. Cure rooted in scripts/plan_orchestrator/markers.py:clear_stale_marker_if_unreviewed.
  • 2026-05-28 — §03A.N redundant-gate elimination (deadlock cure, restructure_close_out): deadlock detector surfaced §03A status: in-progress blocking 9 downstream sections (§04-§12). §03A.N Completion Checklist’s 4 items were structurally redundant restatements of §03A.1’s already-completed gates (03A.1 status:complete + all checkboxes [x] + plan_corpus check exit 0 + 4 /tpr-review rounds CLEAN — each §03A.N item maps 1:1 to a §03A.1 body bullet already proved). §03A.N section removed from sections: array + body; §03A.R flipped to status: complete (no findings — TPR clean per §03A.1); §03A frontmatter flipped to status: complete. §03A.1 owns all close-out evidence; no new gates lost. Cure per recommended_unblock Option 3 (restructure §03A’s close-out criteria so they do not reference duplicate gates) — Option 1 (migration) rejected because §03A.N items reference §03A.1’s own proofs, not downstream verification; migrating §03A.N elsewhere would relocate the redundant restatement without curing it. Downstream §04-§12 unblocked by §03A closure.