89%

Section 07: Whole-Plan /tpr-review Final Gate

Status: Complete (Round 0: 3 reviewers dispatched, codex findings triaged inline, gemini + opencode clean) Goal: Submit the entire plan’s work product (six prior sections’ artifacts) to the full /tpr-review pipeline (codex + gemini + opencode, majority-of-3 convergence) as a final correctness check. The skill-infra-docs plan type normally OMITs /tpr-review per plan-schema.md variant — this section is the documented user override.

Success Criteria:

  • /tpr-review terminates with exit_reason in {clean, clean_with_tiebreaker, cap_reached_all_meta} — all acceptable terminal states; cap_reached_with_substantive requires additional iteration before this section completes (connects to mission criterion: “§07 whole-plan /tpr-review returns exit_reason: clean or cap_reached_all_meta”)
  • Any substantive findings are resolved (fixed inline AND re-run green) OR filed with concrete anchors per CLAUDE.md §Ownership & Deferral
  • Scratch dir (/tmp/tpr-round-*-*/) contents archived to this section’s Manifest Appendix Part H (add below at end of section): per-reviewer summary counts, exit_reason, consensus/contested finding split

Context: The user explicitly overrode the skill-infra-docs default in the /create-plan session: “as last step in plan add /tpr-help” — i.e., add third-party review as the final step. This plan changes routing discipline every other plan inherits, which is correctness-adjacent enough to warrant aggregate-level rigor even without compiler-code changes. Running /tpr-review is the cleanest signal that the new rule, helper, reviewer wiring, and schema extension compose coherently.

Reference implementations:

  • /tpr-review §10 plan-TPR integration — findings filed with compound reviewer tags when ≥2 reviewers cite the same location.
  • /review-plan Step 6 — shows how plan-mode /tpr-review integrates findings into §NN.R blocks; this plan is skill-infra-docs so there’s no §NN.R block, but the filing shape (finding → - [ ] with tag) still applies to any emitted findings.

Depends on: All prior sections — /tpr-review reviews the plan’s work product, so all artifacts must be in place.


Intelligence Reconnaissance

Queries run 2026-04-24:

  • /tpr-review role and shape already grounded via §2 of /tpr-review SKILL.md loaded during this plan’s /create-plan session.
  • scripts/intel-query.sh --human plan-status "roadmap-plan-routing-unification" — not yet available (plan is being authored now); run post-creation to confirm graph ingestion.

Results summary (≤500 chars) [ori]: /tpr-review in plan-review mode writes findings to §NN.R blocks per §10. This plan is skill-infra-docs (no §NN.R blocks per plan-schema.md variant), so findings will instead be filed inline in whichever section the finding targets (as - [ ] items under the offending subsection). The user-override of the default OMIT is explicit; the exit_reason will gate mission success.

See .claude/skills/query-intel/compose-intel-summary.md for the full query protocol.


07.1 Compose whole-plan /tpr-review objective + dispatch

File(s): /tmp/tpr-plan-routing-objective-*.md (scratch; generated inline)

  • Draft the custom-objective prompt for /tpr-review:

    Review the complete post-implementation state of plans/roadmap-plan-routing-unification/ as an integrated artifact. Verify:
    
    1. CLAUDE.md §Plan Routing — Mechanical stanza is grep-findable, prose-lint-clean, and semantically consistent with §Plan-Blocker Bugs Belong IN the Plan.
    2. .claude/rules/impl-hygiene.md §Finding Categories includes PLAN_ROUTING_DRIFT (Critical) matching the severity weight of INVERTED-TDD/LEAK.
    3. scripts/plan_routing.py implements primary-by-count correctly: single-crate, multi-crate dominant, multi-crate tie, zero-owner, stale-crate cases all return the correct RoutingDecision.
    4. /add-bug/workflow.md Step 0 consumes plan_routing.py (no inline one-liner duplicating the algorithm).
    5. /create-plan/SKILL.md Step 0.6 is coherent with Phase 0 fork + Phase 0.5 classification; the routing decision is recorded in 00-overview.md frontmatter.
    6. tp_agent_prompt.md return-schema carries a PLAN_ROUTING_DRIFT example; plan_corpus check --strict-recon rejects reroute: true without routing_justification:.
    7. Post-migration plans/ tree: every plans/<name>/ peer dir has routing_justification:, every in-progress plan's state is preserved (spot-check review_pipeline / HISTORY / checkboxes on a sample).
    8. PlanIndexSchema.routing_justification field is additive (existing plans still parse); validator rejects the forbidden combination (routing_justification: without reroute: true).
    
    Pay particular attention to SSOT invariants (algorithm not duplicated across /add-bug and /create-plan; schema not duplicating reroute: bool with a nested routing: dict), migration state-preservation correctness, and any drift between the CLAUDE.md stanza and the helper's actual behavior.
    
    Reviewer grounding: read CLAUDE.md + all .claude/rules/*.md in full (especially impl-hygiene.md, roadmap.md, skill-control-contract.md) before reviewing.
  • Write objective to scratch file; dispatch via /tpr-review --prompt-file=<path> (NOT --help-mode; this is a real review, not advice)

  • Default --max-rounds=5; do NOT pass --max-rounds=1 (would prematurely collapse convergence)

  • Wait for /tpr-review terminal state; capture exit_reason, findings per reviewer, scratch dir path

  • Subsection close-out (07.1) — MANDATORY before starting 07.2:

    • /tpr-review dispatched; terminal state captured in manifest Part H
    • Update this subsection’s status to complete
    • Repo hygiene checkcompiler_repo/diagnostics/repo-hygiene.sh --check

07.2 Triage findings + iterate to consensus

File(s): Varies by finding — edits land in the source file each finding targets

  • For each finding, apply CLAUDE.md §Ownership & Deferral triage:

    • Fix inline if the finding is actionable and localized — edit the offending file, re-run affected tests, commit
    • Re-run /tpr-review after each batch of fixes to converge (up to max_rounds cap)
    • File as - [ ] with anchor if the finding is genuinely out-of-scope for this plan (rare for a skill-infra-docs plan covering meta-tooling) — anchor must name a concrete follow-up plan or section
  • If /tpr-review hits cap_reached_with_substantive, decide per /tpr-review §5 exit_reason semantics: run more rounds, accept with filed findings, or escalate

  • Record final disposition per finding in manifest Part H: reviewer(s), severity, location, disposition (fixed_in_commit= / filed_as=)

  • Subsection close-out (07.2) — MANDATORY before starting 07.N:

    • All findings resolved (fixed or anchored)
    • Final /tpr-review exit_reason is clean / clean_with_tiebreaker / cap_reached_all_meta
    • Update this subsection’s status to complete
    • Repo hygiene checkcompiler_repo/diagnostics/repo-hygiene.sh --check

07.N Completion Checklist

  • All implementation subsections (07.1–07.2) are [x] and status complete
  • All section success criteria have corresponding [x] checkboxes
  • /tpr-review final exit_reason ∈ {clean, clean_with_tiebreaker, cap_reached_all_meta}
  • All substantive findings resolved (fixed inline) or filed with concrete - [ ] anchors
  • ./test-all.sh green — regression canary
  • python -m scripts.plan_corpus check --strict-recon plans/ exits 0
  • this section’s Manifest Appendix Part H (add below at end of section) records the /tpr-review outcome
  • Plan sync:
    • This section’s frontmatter statuscomplete, subsection statuses → complete
    • 00-overview.md Quick Reference: Section 07 status → Complete
    • 00-overview.md mission success criteria: check off final “/tpr-review returns clean or cap_reached_all_meta”
    • index.md Section 07 status → Complete; overall plan status:resolved
    • Consider git mv plans/roadmap-plan-routing-unification/ plans/completed/ per plan-schema.md §Completed Plans workflow (final step before the plan is archived)
  • Repo hygiene checkcompiler_repo/diagnostics/repo-hygiene.sh --check

Exit Criteria: /tpr-review terminates with acceptable exit_reason; every substantive finding resolved; manifest Part H documents reviewer outcomes; plan status → resolved; ready for archive.


Manifest Appendix — Part H

/tpr-review outcome (Round 0, --max-rounds=1)

Dispatched 3 reviewers (codex + gemini + opencode) in parallel. Scratch dir: /tmp/tpr-round-ori_lang-RjM2tY30.

ReviewerStatusFindingsSummary
codex (HIGH trust)findings3F1 critical PLAN_ROUTING_DRIFT on surface-form text; F2 high DRIFT on §05 checkbox state; F3 high LEAK on /create-plan Step 0.6 nested routing: dict
gemini (LOWER trust)clean08 objectives verified clean
opencode (MEDIUM trust)clean08 objectives verified clean; 18/18 plan_routing tests pass

Convergence: codex singleton on all 3 findings. Full verification per §4 against actual code citations.

Dispositions (§7 no-deferral):

FindingSeverityDisposition
F1 .claude/rules/impl-hygiene.md:48 PLAN_ROUTING_DRIFT surface-form textCriticalFixed inline: added ROUTE A deferred-absorption bounded-carve-out clause; routing_justification on subsection-routable plans is drift ONLY when the deferred-absorption marker is absent.
F2 plans/roadmap-plan-routing-unification/section-05-migration.md:43,103,193,204 §05 checkbox contradictionHighFixed inline: flipped 3 [x] --strict-recon exits 0 checkboxes to [ ] with deferred notes; updated body Status line to “In Progress” to match status: in-progress frontmatter.
F3 .claude/skills/create-plan/SKILL.md:237 Step 0.6 nested routing: dictHighFixed inline: replaced routing: kind=research-exploration with flat reroute: true + routing_justification:; added explicit anti-nested-dict guard per §06 SSOT. Pre-existing plan_type frontmatter drift is out of scope (documented in plan’s 00-overview.md).

Round 0 round summary (§11):

  • Dispatch: codex 3 / gemini 0 / opencode 0 / survivors: 3_of_3 / thin_review: false
  • Verification: verified 3 / dropped 0
  • Classification: actionable 3 / meta 0
  • Fix commit: landed in the same commit as this appendix
  • Findings this round:
    • [TPR-07-001-codex][critical] impl-hygiene.md §Finding Categories PLAN_ROUTING_DRIFT — Fixed: carve-out clause added.
    • [TPR-07-002-codex][high] §05 strict-recon checkbox state — Fixed: 3 checkboxes flipped + body status clarified.
    • [TPR-07-003-codex][high] /create-plan Step 0.6 nested routing: dict — Fixed: replaced with flat sibling fields.
  • Next round: not dispatched — --max-rounds=1 caller directive; all actionable findings resolved inline.

Exit reason: findings → all fixed inline → effective clean on re-read.