reversa-detective

Extracts implicit business rules, state machines, and retroactive ADRs from legacy codebases.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/Helcio-Nogueira/Painel_Inteligente_Hackaton_2026 --skill reversa-detective-helcio-nogueira
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-detective
Source: https://github.com/Helcio-Nogueira/Painel_Inteligente_Hackaton_2026/tree/main/.agents/skills/reversa-detective
Command: npx skills add https://github.com/Helcio-Nogueira/Painel_Inteligente_Hackaton_2026 --skill reversa-detective-helcio-nogueira

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Legacy systems rarely document why decisions were made, leaving business rules, state transitions, and permission logic buried in code and Git history. This Skill performs the interpretation phase of a reverse engineering analysis, recovering that implicit knowledge into structured documentation. ## Core Features & Use Cases - Git Archaeology: Analyzes commit history (fixes, refactors, reverts) to reconstruct retroactive Architecture Decision Records (ADRs). - Business Rule Extraction: Mines conditionals, validations, enums, constants, and TODOs to build a domain glossary and rule catalog. - State Machines & Permissions: Generates Mermaid state diagrams for entities with status fields and RBAC permission matrices. - Confidence Tagging: Marks every finding as confirmed, inferred, or a gap so downstream agents know what to trust. - Use Case: During a legacy modernization project, run this after the codebase inventory phase to produce domain.md, state-machines.md, permissions.md, and ADRs that feed the specification-writing phase. ## Quick Start Ask the agent to analyze the Git history and source code of the legacy project and generate the domain rules, state machines, permission matrix, and retroactive ADRs into the reversa 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 code comments for domain logic, then compile them into a domain glossary. This Skill automates that process and outputs a domain.md file with confidence-tagged rules.

How to generate ADRs from Git commit history?▼

Review commit messages for business or technical decisions, examine fix and hotfix commits for expected behaviors, and inspect large refactors and reverts for requirement changes. Each finding becomes a retroactive ADR documenting the decision and its context.

Can this Skill generate state machine diagrams?▼

Yes, it identifies entities with status or state fields, enumerates all possible values and allowed transitions with their triggers, and renders the result as Mermaid state diagrams in state-machines.md.

What documentation levels does the reverse engineering analysis support?▼

Three levels controlled by doc_level in state.json: essencial produces only the domain glossary, completo adds state machines, permissions, and ADRs, and detalhado adds Alternatives and Consequences sections to each ADR.

Does the Detective skill work without prior analysis artifacts?▼

No, it expects artifacts from the earlier Scout and Archaeologist phases in the output folder and .reversa/context directory. Running it standalone without those inputs limits the accuracy of inferred rules and ADRs.