Refactor safely
Drive the code-review-graph MCP to size the blast radius before editing.
- Establish current behavior with tests.
get_impact_radius_tool+get_affected_flows_toolfor the dependency and
flow blast radius; find_large_functions_tool to spot split targets.
refactor_toolto preview a rename/structural edit,apply_refactor_toolto
apply it.
- Preserve protocol, reconciliation, review, and security invariants.
- Make the smallest coherent change.
- Run focused tests, then repository verification.
Never mix unrelated cleanup into a refactor. Fall back to rg when graph data
is missing or stale (incremental, can lag HEAD).