Workflow Code Review

Review a Refactor

Review workflow for refactoring changes that shouldn't alter behavior

reviewrefactoringsafety
CLAUDE.md

When reviewing a refactoring PR:

  1. Verify the PR does not change behavior — refactors should be purely structural.
  2. Check that the test suite passes without any test changes. If tests changed, scrutinize why.
  3. Verify the refactor actually improves something measurable: readability, modularity, performance, or testability.
  4. Check that the refactor doesn’t mix behavior changes with structural changes. These should be separate PRs.
  5. Look for regressions at module boundaries: are public interfaces preserved? Do exports still match?
  6. 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.

get crystl