| name | refactoring-safely |
| description | Use when refactoring code - tracks the refactor in task docs and preserves behavior through small verified changes |
Use task docs to capture:
- invariants that must not change
- risks
- target design
2. Refactor in tiny steps
Each step should be small enough to explain and verify on its own.
3. Verify every step
Run the smallest relevant tests after each change.
4. Keep docs current
Update discoveries, remaining risks, and next slices as the refactor unfolds.