skills/engineering/tdd/refactoring.md

11 lines
387 B
Markdown
Raw Permalink Normal View History

2026-03-21 10:16:09 +00:00
# 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