reversa-detective

Extract implicit business knowledge from legacy codebases via Git history and domain logic.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/afsjr/secretaria_escola_csm --skill reversa-detective-afsjr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reversa-detective
Source: https://github.com/afsjr/secretaria_escola_csm/tree/main/.agents/skills/reversa-detective
Command: npx skills add https://github.com/afsjr/secretaria_escola_csm --skill reversa-detective-afsjr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps uncover the implicit “why” behind a legacy system by extracting business rules, retroactive ADRs from Git history, state machines, and an inferred permissions model.

Core Features & Use Cases

  • Git Archaeology for ADRs: analyzes commit history (including reverts, hotfixes, and refactors) to reconstruct decision records.
  • Implicit Business Rule Extraction: identifies domain constraints through conditionals, enums/constants, comments, TODO/FIXME signals, and validation logic.
  • State Machine & RBAC Reconstruction: produces state transition documentation (when status-driven entities exist) and a permissions matrix (when RBAC is central).

Quick Start

Run the reversa-detective skill after placing your repository artifacts so it reads .reversa/state.json and generates domain.md plus state-machines.md, permissions.md, and ADRs under the configured 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 with no documentation?

Extracting business rules from a legacy codebase involves mining conditionals, enums, constants, and validation logic to identify implicit domain constraints and produce a comprehensive domain glossary.

Can I reconstruct architecture decision records from Git history?

Reconstructing ADRs from Git history involves analyzing commits, reverts, hotfixes, and refactors to retroactively document the implicit decision-making process behind legacy codebase changes.

What is the best way to reverse engineer state machines and RBAC matrices from legacy code?

The best way involves analyzing status-driven entities and domain logic to infer state transitions and produce an RBAC/ACL permissions matrix, reconstructing the operational behavior of legacy systems.

Do I need a specific configuration file to start reverse engineering a repository?

Yes, reverse engineering requires reading `.reversa/state.json` to retrieve output folder and `doc_level` configurations, ensuring generated artifacts are placed in the expected `_reversa_sdd` directory structure.

How does Git archaeology help with legacy system reverse engineering?

Git archaeology mines commit history, reverts, and refactors to reconstruct retroactive ADRs, revealing the historical business context and implicit decision rationale hidden within legacy system codebases.