reversa-detective

Extract domain rules, ADR rationale, and constraints from legacy Git history.

1.5k|383|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/sandeco/reversa --skill reversa-detective-sandeco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reversa-detective
Source: https://github.com/sandeco/reversa/tree/main/agents/reversa-detective
Command: npx skills add https://github.com/sandeco/reversa --skill reversa-detective-sandeco

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It turns implicit, buried business knowledge in legacy systems into clear, operational specifications that AI agents can follow safely.

Core Features & Use Cases

  • Git-driven rationale mining: reconstructs retroactive ADRs by analyzing commit history, fixes, refactors, and reverts to surface the real decision “why”.
  • Implied rules and domain constraints: extracts domain rules from complex conditionals, validations, enums/constants, comments, and TODO/FIXME signals.
  • State machines and RBAC outputs: generates state machine documentation and permission matrices based on the system’s observed statuses and access model.

Quick Start

Use reversa-detective to analyze a legacy project by running it through the Reversa workflow and generating the interpreted domain artifacts in 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 and domain logic from a legacy codebase?

To extract business rules from a legacy codebase, this skill analyzes complex conditionals, validations, enums, and comments to surface implied domain constraints. It generates a domain.md file mapping these buried rules into clear, operational specifications.

What is the best way to reverse engineer retroactive ADRs from Git history?

Reverse engineering retroactive ADRs from Git history involves analyzing commits, fixes, refactors, and reverts to reconstruct the real decision rationale. This skill outputs an adrs/ directory containing evidence-backed architectural decision records with confidence labeling.

Can I generate state machines and RBAC permission matrices from legacy code?

Yes, you can generate state machines and RBAC permission matrices by analyzing observed statuses and access models within legacy code. This skill produces state-machines.md and permissions.md files documenting the operational constraints and entity structures.

How do I document operational constraints for AI agents in legacy systems?

Documenting operational constraints for AI agents requires transforming implicit buried knowledge into safe specifications. This skill reads the Reversa state.json output_folder and doc_level to produce traceable artifacts like domain.md and permissions.md with evidence-backed confidence labeling.

Does reversa-detective require any specific dependencies or components to run?

Reversa-detective requires no external dependencies or components to run. It functions by reading the Reversa state.json configuration to identify the output folder and documentation level before generating the interpreted domain artifacts.

What are the limitations of reconstructing domain logic from inferred entity states?

A limitation of reconstructing domain logic from inferred entity states is that confidence levels vary based on available evidence. The skill addresses this by applying evidence-backed confidence labeling to all generated outputs, ensuring traceability for AI agent specifications.