Review a Refactor
Review workflow for refactoring changes that shouldn't alter behavior
CLAUDE.md
When reviewing a refactoring PR:
- Verify the PR does not change behavior — refactors should be purely structural.
- Check that the test suite passes without any test changes. If tests changed, scrutinize why.
- Verify the refactor actually improves something measurable: readability, modularity, performance, or testability.
- Check that the refactor doesn’t mix behavior changes with structural changes. These should be separate PRs.
- Look for regressions at module boundaries: are public interfaces preserved? Do exports still match?
- Verify no dead code was accidentally introduced or left behind.
Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.