refactoring
Installation
SKILL.md
Refactoring
Refactoring is the final step of TDD. After mutation testing confirms test strength, assess if refactoring adds value.
When to Refactor
- Always assess after mutation testing confirms test strength
- Only refactor if it improves the code
- Commit working code BEFORE refactoring (critical safety net)
Commit Before Refactoring - WHY
Having a working baseline before refactoring:
- Allows reverting if refactoring breaks things
- Provides safety net for experimentation
- Makes refactoring less risky
- Shows clear separation in git history