review-plan re-grounds the functional mission + applies governed rewrites (hybrid)
Goal
/review-plan (hybrid) re-grounds the plan’s functional mission against progress and applies governed rewrites with provenance, never laundering ‘built the wrong thing’ into ‘mission was always this’.
Implementation Sketch
Add a re-grounding grill phase to the plan_orchestrator review-plan flow (between the §1.7 integrity audit and service-next): re-validate the functional mission against progress + the parent mission in missions.md (the gap test), emit ask_user with proposed rewrites (recommended-option), apply governed rewrites via write.py with a HISTORY provenance entry. Enforce the goal-displacement guard: a rewrite that weakens a criterion to match built work is INVERTED-TDD:goal-drift.
Spec References
scripts/plan_orchestrator/review_plan.py; scripts/plan_corpus/write.py; .claude/rules/missions.md mission-chain audit; .claude/rules/state-discipline.md §5.
Work Items
- Add the re-grounding grill phase to the review-plan flow (gap test vs parent mission in missions.md).
- Apply governed rewrites via
write.pywith HISTORY provenance; emit ask_user with recommended-option. - Enforce + test the goal-displacement guard (criterion-weakening-to-match-work rejected as goal-drift).
- pytest: re-ground proposes rewrites; provenance recorded; goal-drift rewrite refused.