What problem does it solve?
Refactoring guides behavior-preserving code reshaping so you can improve readability and structure without accidentally changing what the system does.
Core Features & Use Cases
- Behavior-preservation discipline: preserves observable behavior while treating any intentional behavioral change as a separate, explicitly approved step.
- Characterization-test safety net: helps you create Michael Feathers-style characterization tests before touching risky, poorly covered, or high-stakes code.
- Small, reviewable steps: enforces logically independent steps so each commit can be reviewed, reverted, and bisected confidently.
- Contract and boundary protection: treats public API contracts and persistence-visible boundaries (schemas, events, payload shapes) as non-negotiable constraints.
- Risk-aware guidance: escalates when authorization, financial calculations, or data integrity logic is involved without sufficient test coverage.
Quick Start
Use the refactoring skill to refactor a fragile, hard-to-read module while preserving its observable behavior by adding characterization tests first and then applying small, independently verifiable restructuring steps.