reversa-detective

Extracts implicit business knowledge from legacy codebases via Git archaeology and code analysis.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/lacsousa/mediclaw-system --skill reversa-detective-lacsousa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-detective
Source: https://github.com/lacsousa/mediclaw-system/tree/main/.agents/skills/reversa-detective
Command: npx skills add https://github.com/lacsousa/mediclaw-system --skill reversa-detective-lacsousa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Legacy systems often lack documentation explaining why the code works the way it does. This Skill recovers that implicit business knowledge — business rules, state machines, permission matrices, and retroactive Architecture Decision Records (ADRs) — during the interpretation phase of a reverse engineering analysis. ## Core Features & Use Cases - Git Archaeology: Analyzes commit history (fixes, hotfixes, refactors, reverts) to reconstruct past business and technical decisions as retroactive ADRs. - Business Rule Extraction: Mines conditionals, validations, enums, constants, comments, and TODOs to build a domain glossary and rule catalog. - State Machines & Permissions: Generates Mermaid state diagrams for entities with status fields and RBAC/ACL permission matrices. - Use Case: During a legacy modernization project, run this Skill after the Scout and Archaeologist phases to produce domain.md, state-machines.md, permissions.md, and ADR files with confidence levels (confirmed, inferred, gap). ## Quick Start Ask the agent to run the reversa-detective interpretation phase on this repository to extract business rules, state machines, permissions, and retroactive ADRs into the output folder.

Frequently Asked Questions about reversa-detective

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

FAQPage Schema
How do I extract business rules from a legacy codebase?▼

Analyze complex conditionals, model validations, enums, constants, and comments in the source code to identify domain logic. This Skill automates that extraction and writes the results to a domain.md file with a glossary and rule catalog.

How to generate retroactive ADRs from Git history?▼

Review git log for commits revealing business or technical decisions, including fixes, hotfixes, large refactors, and reverts. Each significant decision is documented as an ADR file with context, and in detailed mode with alternatives and consequences sections.

What artifacts does the reverse engineering interpretation phase produce?▼

It produces domain.md with a glossary and business rules, plus state-machines.md, permissions.md, and ADR files depending on the configured doc_level (essencial, completo, or detalhado) in the reversa state.json file.

Does this work with Claude Code, Cursor, and Gemini CLI?▼

Yes, the Skill declares compatibility with Claude Code, Codex, Cursor, Gemini CLI, and other agents supporting the Agent Skills format. It is invoked during the interpretation phase of the reversa reverse engineering framework.

What are the limitations of inferring business logic from code?▼

Inferred rules may not reflect actual business intent, so the Skill uses a confidence scale: confirmed, inferred, or gap. Much of the extracted knowledge is marked as inferred and should be validated with domain stakeholders.