reversa-detective

Extract domain rules and decision rationale from legacy Git history.

1|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/Rdinda/FMA_Pontos --skill reversa-detective-rdinda
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reversa-detective
Source: https://github.com/Rdinda/FMA_Pontos/tree/main/.agents/skills/reversa-detective
Command: npx skills add https://github.com/Rdinda/FMA_Pontos --skill reversa-detective-rdinda

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the challenge of uncovering the implicit business rationale inside a legacy system when requirements and decisions are missing or only partially documented.

Core Features & Use Cases

  • Git archaeology for retroactive ADRs: Analyze commit history (including reverts and refactors) to reconstruct decision records and rationale.
  • Domain rules extraction: Identify business constraints from conditionals, model validations, enums/constants, comments, and TODO/FIXME intent clues.
  • State machine and permissions inference: Derive valid entity status transitions and RBAC/ACL matrices when those concepts exist in the codebase.

Quick Start

Run reversa-detective to generate domain rules and, based on doc_level, produce state machines, permissions, and retroactive ADRs from the legacy repository into 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 logic and domain rules from legacy code?

To extract business logic from legacy code, you analyze Git history and code artifacts to reconstruct domain rules, state transitions, and decision rationale. This process identifies implicit business constraints from conditionals, validations, and enums to produce retroactive ADRs and domain glossaries.

Can I generate retroactive ADRs from Git commit history?

Yes, you can generate retroactive ADRs from Git commit history by performing Git archaeology. This analyzes commit logs, reverts, and refactors to reconstruct past decision records and rationale, outputting traceable ADR markdown files with confidence levels.

How do I infer state machines and RBAC permissions from an existing codebase?

Inferring state machines and RBAC permissions from an existing codebase requires analyzing code conditionals and access controls. The process derives valid entity status transitions and RBAC/ACL matrices when those concepts exist, outputting state-machines.md and permissions.md files.

What is needed to start reverse engineering a legacy codebase for domain knowledge?

To start reverse engineering a legacy codebase for domain knowledge, you need to read the .reversa/state.json configuration file for output settings and consume existing Scout or Archaeologist artifacts from the output directory and .reversa/context before generating documentation.

How does doc_level control reverse engineering documentation outputs?

The doc_level parameter controls reverse engineering documentation outputs by determining the depth of generated files. It mandates a domain.md file while optionally triggering the generation of state-machines.md, permissions.md, and retroactive ADRs based on the desired documentation level.

Are there limitations when reconstructing decision rationale from missing requirements?

Reconstructing decision rationale from missing requirements has limitations because it relies on implicit clues like TODO comments and code intent. If domain concepts like state machines or RBAC matrices do not exist in the codebase, those specific inference outputs cannot be generated.