| name | refactoring |
| description | Refactor candidates after TDD (duplication, long methods, shallow modules, etc.). Use during refactor phase of red-green-refactor or when reviewing code quality. |
Refactor Candidates
After TDD cycle, look for:
- Duplication → Extract function/class
- Long methods → Break into private helpers (keep tests on public interface)
- Shallow modules → Combine or deepen
- Feature envy → Move logic to where data lives
- Primitive obsession → Introduce value objects
- Existing code the new code reveals as problematic