What problem does it solve?
Legacy codebases accumulate unused code that nobody dares to delete because it might be reached through dynamic entry points like reflection, routes, events, or feature flags. This Skill removes dead code safely by requiring formal proof of death before any deletion, and by distinguishing truly dead code from suspicious orphans that should be kept.
Core Features & Use Cases
- Death-proof verification: A candidate is only classified as dead when it has zero static references across a full usage scan AND no known dynamic entry point (routes, events, reflection, meta-programming, string loading, config, cron, feature flags).
- Soul cross-check: Before marking anything as dead, it checks the code against the project's confirmed business rules in
soul.md; code implementing a confirmed rule is never removed, even if it appears unused.
- Mandatory approval gate: Every removal requires an approved diff with per-snippet proof attached, works in any control mode including autonomous, and stays reversible through
CHG-NNN.diff files.
- Use Case: While refactoring a legacy module, you run the prune agent on an opportunity; it produces a self-contained HTML plan listing candidates classified as dead versus suspicious orphans, waits for your approval, removes only the proven-dead code, and runs the test suite to confirm green.
Quick Start
Ask the agent to run /reversa-prune on a specific opportunity or target after the reversa-refactor context has been initialized.