reversa-simplify

Replaces complex code logic with simpler equivalent implementations verified by output-equivalence proofs.

Updated May 22, 2026
One-click install
npx skills add https://github.com/GleisonOliveira/dockerpilot-mcp --skill reversa-simplify-gleisonoliveira
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-simplify
Source: https://github.com/GleisonOliveira/dockerpilot-mcp/tree/main/.agents/skills/reversa-simplify
Command: npx skills add https://github.com/GleisonOliveira/dockerpilot-mcp --skill reversa-simplify-gleisonoliveira

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Complex, deeply nested logic makes code hard to read and maintain, but simplifying it by hand risks silently changing behavior. This Skill replaces convoluted logic with a simpler, clearer solution while proving the output stays identical, including edge cases. ## Core Features & Use Cases - Equivalence-Proof Simplification: Proposes a simpler algorithm and proves it produces the same output for the same inputs, including empty, null, boundary, and concurrency edge cases. - Safety-Net Enforcement: Requires characterization tests covering the target before any change; without coverage, it creates green characterization tests first. - Gated Changes with Diffs: Every code modification passes through an approval gate showing a before/after diff, and reverts automatically if tests go red. - Use Case: You have a function with five nested conditionals and redundant branches. The Skill documents why the complexity is accidental, proposes a flat equivalent version, proves equivalence with a case table, and applies the change only after your approval. ## Quick Start Ask the agent to run /reversa-simplify on the complex function you want simplified and approve the proposed diff after reviewing the equivalence proof.

Frequently Asked Questions about reversa-simplify

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simplify complex code without changing its behavior?▼

Run /reversa-simplify on the target logic. It requires tests that pin the current output, proposes a simpler implementation, and proves equivalence with a case table covering edge cases before applying any change through an approval gate.

What is the difference between reversa-simplify and reversa-optimize?▼

reversa-simplify targets cognitive complexity and readability, with performance gains as a side effect. reversa-optimize targets measured performance gains. If your real goal is speed, the Skill redirects you to /reversa-optimize.

Can I simplify code that has no test coverage?▼

Not directly. The Skill first offers to create green characterization tests that pin the current behavior. If you refuse the safety net, the risk is downgraded and the lack of proof is recorded before proceeding.

Does reversa-simplify work without reversa-refactor set up first?▼

No. It reads control_mode and safety_net_policy from the _reversa_refactor directory created by /reversa-refactor. If that directory does not exist, it aborts and tells you to run /reversa-refactor first.

What happens if the simplified code fails the tests?▼

The change is reverted using the recorded diff. The Skill only keeps changes that produce a green safety-net run, and it never modifies project code outside an approved gate.