reversa-simplify

Replaces complex code logic with simpler equivalents proven by output-equivalence tests.

Updated Aug 14, 2026
One-click install
npx skills add https://github.com/Ruggery/OCR_Cartorio --skill reversa-simplify-ruggery
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-simplify
Source: https://github.com/Ruggery/OCR_Cartorio/tree/main/.agents/skills/reversa-simplify
Command: npx skills add https://github.com/Ruggery/OCR_Cartorio --skill reversa-simplify-ruggery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Complex, convoluted code logic accumulates over time and becomes hard to read and maintain, but rewriting it risks silently changing behavior. This Skill replaces complex 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, covering edge cases like empty, null, boundary, and concurrency scenarios. - Safety-Net Enforcement: Requires characterization tests that pin current behavior before any code change; without coverage, it creates green characterization tests first. - Gated Changes with Diffs: Every code modification goes through an approval gate showing before/after diffs, with automatic revert if the safety net turns red. - Essential vs Accidental Complexity: Distinguishes complexity required by confirmed business rules (documented, not removed) from accidental complexity (safe to simplify). - Use Case: You find a deeply nested function with redundant branches. Invoke the Skill on it; it documents why the logic is complex, proposes a simpler version with a case table proving equivalence, and applies the change only after your approval. ## Quick Start Ask the agent to run /reversa-simplify on a specific function or opportunity ID to get a simplification plan with an equivalence proof before any code is touched.

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 first requires tests that pin the current output, then proposes a simpler implementation with a case table proving equivalent outputs for the same inputs, including 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 of logic, treating resource savings as a side effect. reversa-optimize targets measured performance gains. If the real goal is measured speed, the skill redirects you to /reversa-optimize.

Can I use reversa-simplify without running reversa-refactor first?▼

No. The skill reads control_mode and safety_net_policy from _reversa_refactor/README.md and aborts if that directory does not exist, instructing you to run /reversa-refactor first.

What happens if the simplified code fails the tests?▼

If the safety net turns red after applying the change, the skill reverts the modification using the recorded diff. No failing simplification is kept in the codebase.

Does simplification remove special-case business logic?▼

No. The skill checks confirmed specs and soul.md to determine whether complexity is accidental or essential. Complexity required by a confirmed business rule is documented rather than removed.