100%

review-section detects mission drift + emits proposed rewrites (tool)

Goal

/review-section (tool, no AskUserQuestion) detects a section’s content/criteria drift from the current functional mission and emits proposed rewrites as structured exit state for the caller to decide.

Implementation Sketch

Register a mission_content_drift detector in plan_orchestrator/drift_classes.py (auto-invoked by drift_scanner.py). Enrich review_section_runtime/dispatch.py:prepare_review payload with drift_findings[] + proposed_rewrites[] keyed to the existing restructure ops (move/abandon/split/append/section-create). Extend review_section_runtime/next_action.schema.json with the new payload fields + a mission_drift_detected exit reason. Tool contract preserved: zero AskUserQuestion.

Spec References

scripts/review_section_runtime/dispatch.py; scripts/plan_orchestrator/drift_classes.py registry; scripts/review_section_runtime/next_action.schema.json.

Work Items

  • Register mission_content_drift detector in drift_classes.py (detector + classify; cure routes via materiality/LLM, not script-auto).
  • Enrich review_section_runtime/dispatch.py payload with drift_findings[] + proposed_rewrites[]; extend next_action.schema.json.
  • pytest: drift detected emits proposed rewrites in structured exit state; zero AskUserQuestion in any path.