What problem does it solve?
Legacy codebases accumulate convoluted logic that is hard to read and risky to change. This Skill reduces cognitive complexity by replacing tangled implementations with simpler ones while proving the behavior stays identical, so refactoring never silently breaks business rules.
Core Features & Use Cases
- Equivalence-Proof Simplification: Proposes a simpler algorithm and proves it produces the same outputs for the same inputs, including edge cases like empty, null, boundary, and concurrency scenarios.
- Safety-Net Enforcement: Requires characterization tests covering the target before any code change; without coverage it creates green characterization tests first.
- Gated Changes with Diffs: Every code modification passes through an approval gate showing before/after diffs, with automatic revert if the safety net turns red.
- Use Case: A legacy pricing function has five nested conditionals. The Skill shows the complexity is accidental, proposes a lookup-table version, proves equivalence across all input cases, and applies the change only after your approval.
Quick Start
Run /reversa-simplify with an opportunity ID or a target function after setting up the reversa-refactor context, then approve the proposed diff at the gate.