What problem does it solve?
Legacy code often contains tangled methods and classes that are risky to clean up because there is no safety net proving behavior stays intact. This Skill applies named Fowler refactorings in small, reversible steps while mechanically proving the observable behavior never changes.
Core Features & Use Cases
- Named Fowler Refactorings: Identifies code smells and applies catalog refactorings such as Extract Method, Rename, Decompose Conditional, and Remove Duplication, one named step at a time.
- Mandatory Safety Net: Verifies existing test coverage before touching code, and offers to generate Feathers-style characterization tests that pin current behavior when coverage is missing.
- Gated Control Mode: Every code change passes through an approval gate showing the before/after diff, and any red test run triggers an automatic revert instead of silent persistence.
- Use Case: You inherit a legacy module with a 200-line method full of conditionals. The Skill plans a sequence of Extract Method and Decompose Conditional steps, generates an HTML plan for approval, applies each step behind a diff gate, and proves the test suite stays green before and after.
Quick Start
Ask the agent to run /reversa-restructure on a specific opportunity ID or describe a method you want cleaned up, then approve the plan and each diff as it is presented.