refactoring-legacy-code
Installation
SKILL.md
Refactoring Legacy Code
Overview
Big-bang rewrites fail. Refactoring without tests creates new bugs. Scope creep turns a "quick cleanup" into a six-month project.
Core principle: ALWAYS write characterization tests before changing legacy code. Understand current behavior before changing it.
Violating the letter of this process is violating the spirit of refactoring.
The Iron Law
NO REFACTORING WITHOUT CHARACTERIZATION TESTS FIRST
If you haven't captured existing behavior in tests, you cannot change the code.