Add a cross_reference_todos step to discuss-phase that surfaces relevant backlog items before scope-setting decisions are made. Implementation: - New 'todo match-phase <N>' CLI command (commands.cjs) that scores pending todos against a phase's ROADMAP goal using three heuristics: keyword overlap, area match, and file path overlap - New cross_reference_todos step in discuss-phase.md between load_prior_context and scout_codebase - CONTEXT.md template gains 'Folded Todos' subsection in <decisions> and 'Reviewed Todos (not folded)' subsection in <deferred> Design: - No AI call for matching — pure keyword/area/file heuristics for speed - Silent skip when todo_count is 0 or no matches (no workflow slowdown) - Auto mode folds all todos with score >= 0.4 automatically - Scoring: keywords (up to 0.6), area match (0.3), file overlap (0.4) Tests: 5 new tests covering empty state, keyword matching, unrelated todo exclusion, area matching, and score sorting. Closes #1111
56 KiB
56 KiB