reverse-adr
Reverse-engineer Architecture Decision Records (ADRs) from an existing codebase.
Skill by superMLdev
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/supermldev-reverse-adr
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/reverse-adr
What's inside
- Skill name
reverse-adr- Description
- Reverse-engineer Architecture Decision Records (ADRs) from an existing codebase. Use when a project has no ADRs but you want to document WHY architectural decisions were made based on the code evidence.
- License
- MIT
- Instructions
- 189 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Reverse ADR — Architecture Decision Records from Code
Detect architectural decisions that have already been made in this codebase and produce documented ADRs explaining what was chosen and why (inferred from code patterns, library choices, and structure).
## When to Use
- Project has no ADRs or DECISIONS.md
- New team members need to understand *why* things are the way they are
- Preparing to evaluate changing an architectural decision
- Creating a brownfield knowledge transfer document
## What Makes a Good Reverse ADR
An ADR is worth writing when:
- A technology, library, or pattern was chosen over a notable alternative
- A structural decision affects how the whole system is organized
- The choice has trade-offs worth understanding
- Understanding it helps prevent someone from accidentally reversing it
## Step 1: Identify Decision Points
Scan the codebase for these high-signal decision indicators:
**Dependency choices** (read `package.json`, `pyproject.toml`, etc.):
- ORM selection (Prisma vs TypeORM vs raw SQL vs Mongoose)
- Auth library (Passport vs JWT-only vs Auth0 vs NextAuth)
- Validation library (Zod vs Joi vs class-validator vs Pydantic)
- HTTP client (axios vs fetch vs got)
- Testing framework (Jest vs Vitest vs Mocha)
- State management (Redux vs Zustand vs MobX vs Jotai)
**Structural decisions** (read directory layout + imports):
- Layered architecture vs feature folders vs domain-driven structure
- Monorepo vs single package
- REST vs GraphQL vs gRPC choice
- Synchronous vs async/event-driven design
- Database per service vs shared database (if microservices)
**Configuration decisions**:
- TypeScript strict mode (read `tsconfig.json`)
- Environment management approach (.env vs vault vs cloud config)
- Docker vs bare metal vs serverless deployment
**Pattern decisions**:
- Dependency injection vs direct imports
- Repository pattern vs active record
- DTO pattern vs direct entity exposure
- Error handling strategy (exceptions vs Result types vs error codes)
---
## Step 2: For Each Decision, Gather Evidence
For each decision identified, collect:
```
Decision: {Name}
Evidence files: [{file1}, {file2}]
What was chosen: {the actual choice made}
What was NOT chosen: {notable alternatives not present}
Signals suggesting why: {code comments, config settings, patterns}
Confidence: High (explicit) | Medium (inferred) | Low (speculative)
```
**High confidence** = explicit config, comment, or highly specific library version
**Medium confidence** = consistent pattern across files without explicit statement
**Low confidence** = only guessable from indirect signals
---
## Step 3: Write ADRs
Write to: `{project-root}/docs/decisions/`
Create one file per decision: `ADR-001-{kebab-case-title}.md`
Also create an index: `{project-root}/docs/DECISIONS.md`
**ADR Template:**
```markdown
# ADR-{nnn}: {Decision Title}
**Status:** Active (reverse-engineered — not verified with original authors)
**Date:** {approximate — use earliest relevant commit or "unknown"}
**Confidence:** {High | Medium | Low}
**Evidence:** `{primary source file(s)}`
---
## Context
{What situation prompted this decision? Inferred from the codebase context — e.g., "This is a REST API serving a React frontend. An ORM was needed to manage a PostgreSQL database."}
## Decision
**Chosen:** {Prisma as the ORM}
{1–2 sentences describing what was chosen and how it's used}
## Observed Evidence
- `{prisma/schema.prisma}` — primary schema definition in Prisma SDL format
- `{src/repositories/}` — all database queries written using Prisma Client
- `{package.json}` — `@prisma/client` is a production dependency, `prisma` is a dev dependency
- {No TypeORM, Sequelize, or raw SQL found anywhere in the codebase}
## Likely Reasoning
{Based on the code patterns, the likely reason for this choice was:}
1. {Type-safe database queries — Prisma generates typed client from schema}
2. {Schema-first development — migrations managed by Prisma Migrate}
3. {Good TypeScript ergonomics — common choice in the TypeScript ecosystem circa 2022–present}
**Alternatives not chosen:** TypeORM (no `typeorm` in dependencies), Sequelize (no `sequelize`), raw `pg` queries.
## Trade-offsFrom superMLdev/smart-sdlc, MIT.
More from superMLdev/smart-sdlc
- 0.536score
agent-scout
superMLdev
Code archaeologist agent for reading and documenting existing codebases.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
generate-api-docs
superMLdev
Generate API reference documentation from existing route definitions, controllers, and schemas.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
generate-readme
superMLdev
Generate a complete, accurate README.md for an existing project by reading the actual code — not guessing.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
technical-research
superMLdev
Research a technology, library, API, or approach to inform an architecture or implementation decision.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
edit-prd
superMLdev
Edit and refine an existing PRD section by section.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
validate-prd
superMLdev
Validate a PRD for completeness, consistency, and implementation readiness.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
agent-architect
superMLdev
System architect for technical design, architecture decisions, and implementation planning.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
check-readiness
superMLdev
Verify that all prerequisite artifacts exist and are complete before starting the next phase.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
generate-context
superMLdev
Generate a project-context.md file optimized for AI context loading.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
agent-developer
superMLdev
Senior software engineer for story execution, TDD, and code implementation.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
agent-analyst
superMLdev
Business analyst for requirements elicitation, codebase analysis, and competitive research.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
market-research
superMLdev
Research market context, competitive landscape, and user needs to inform product decisions.
SkillCFreshness: C★ 8Claude Code +9
Signals
- Stars
- 8
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Apr 20, 2026 (6 months ago)
- Last release
- Apr 28, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/superMLdev/smart-sdlc
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from superMLdev
- 0.536score
agent-scout
superMLdev
Code archaeologist agent for reading and documenting existing codebases.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
market-research
superMLdev
Research market context, competitive landscape, and user needs to inform product decisions.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
generate-api-docs
superMLdev
Generate API reference documentation from existing route definitions, controllers, and schemas.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
agent-analyst
superMLdev
Business analyst for requirements elicitation, codebase analysis, and competitive research.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
generate-readme
superMLdev
Generate a complete, accurate README.md for an existing project by reading the actual code — not guessing.
SkillCFreshness: C★ 8Claude Code +9 - 0.536score
technical-research
superMLdev
Research a technology, library, API, or approach to inform an architecture or implementation decision.
SkillCFreshness: C★ 8Claude Code +9
Cite this page
reverse-adr skill. Agent Mart. https://agentmart.dev/skills/supermldev-reverse-adr (last updated 2026-10-24)