refactoring
Installation
SKILL.md
Refactoring
Refactoring is the third step of TDD. After GREEN, assess if refactoring adds value.
When to Refactor
- Always assess after green
- 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