What problem does it solve?
Legacy codebases accumulate tight coupling between components: concrete dependencies where abstractions belong, dependency cycles, and internal knowledge leaking across modules. This makes code hard to change, test, and reuse, and risky for AI agents to modify safely.
Core Features & Use Cases
- Coupling Measurement: Counts incoming and outgoing dependencies before and after each change, requiring numeric proof of reduction rather than subjective claims.
- Decoupling Techniques: Applies Feathers seams, interface extraction, dependency injection, and cycle breaking without altering observable behavior.
- Gated Safety Workflow: Requires characterization tests as a safety net before touching code, shows diffs for approval at each gate, and reverts automatically if tests fail.
- Use Case: A legacy module directly instantiates a database client, making it untestable. The skill proposes injecting the dependency behind an interface, measures coupling dropping from 8 to 3 outgoing dependencies, and proves behavior is preserved with green tests.
Quick Start
Run /reversa-decouple on a tightly coupled component to propose a seam, review the diff, and verify the measured coupling reduction.