Skip to main content

reverse

[UDS] System archeology โ€” reverse engineer an existing system across the Logic, Data, and Runtime dimensions. Use when: documenting an undocumented system, recovering specifications from existing code, mapping an unknown data model or runtime topology. Not for: assessing health and risk before a feature โ€” use /discover; deriving tests forward from an approved spec โ€” use /spec-derive. Keywords: reverse engineering, system archeology, legacy code, spec extraction, data model, runtime, ๅๅ‘ๅทฅ็จ‹, ็ณป็ตฑ่€ƒๅค, ่ฆๆ ผๆๅ–.

Jump to install

Source facts

Repository
AsiaOstrich/universal-dev-standards
Last source activity
September 8, 2026 at 05:07
Detected SKILL.md language
English
Stars
75
Forks
13

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
5 files

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
reverse
scope
partial
description
[UDS] System archeology โ€” reverse engineer an existing system across the Logic, Data, and Runtime dimensions. Use when: documenting an undocumented system, recovering specifications from existing code, mapping an unknown data model or runtime topology. Not for: assessing health and risk before a feature โ€” use /discover; deriving tests forward from an approved spec โ€” use /spec-derive. Keywords: reverse engineering, system archeology, legacy code, spec extraction, data model, runtime, ๅๅ‘ๅทฅ็จ‹, ็ณป็ตฑ่€ƒๅค, ่ฆๆ ผๆๅ–.
allowed-tools
Read, Grep, Glob, Bash(pg_dump:*), Bash(mysql:*), Bash(sqlite3:*), Bash(npm run:*), Bash(cat:*), Bash(docker:*)
argument-hint
[spec|data|runtime|bdd|tdd] <input>
status
stable
# Reverse Engineering Assistant | ๅๅ‘ๅทฅ็จ‹ๅŠฉๆ‰‹ System archeology framework: reverse engineer existing systems across three dimensions โ€” **Logic**, **Data**, and **Runtime**. ็ณป็ตฑ่€ƒๅคๆก†ๆžถ๏ผšๅพžไธ‰ๅ€‹็ถญๅบฆๅๅ‘ๅทฅ็จ‹ๆ—ขๆœ‰็ณป็ตฑโ€”โ€”**้‚่ผฏ**ใ€**่ณ‡ๆ–™**ใ€**ๅŸท่กŒ็’ฐๅขƒ**ใ€‚ ## Three Dimensions | ไธ‰ๅคง็ถญๅบฆ ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ System Archeology Framework โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Logic โ”‚ Data โ”‚ Runtime โ”‚ โ”‚ (spec) โ”‚ (data) โ”‚ (runtime) โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ APIs โ”‚ DB Schemas โ”‚ Logs & Error Patterns โ”‚ โ”‚ Modules โ”‚ ORMs/Models โ”‚ Config & Environment โ”‚ โ”‚ Flows โ”‚ Migrations โ”‚ Metrics & Performance โ”‚ โ”‚ Tests โ”‚ Seed Data โ”‚ Infra & Deployment โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## Subcommands | ๅญๅ‘ฝไปค | Subcommand | Dimension | Input | Output | ่ชชๆ˜Ž | |------------|-----------|-------|--------|------| | *(none)* | All | Project root | Full Archeology Report | ไธ‰็ถญๅบฆๅ…จ้ขๅˆ†ๆž | | `spec` | Logic | Code files/dirs | `SPEC-XXX.md` | ๅพž็จ‹ๅผ็ขผๆๅ–่ฆๆ ผ | | `data` | Data | DB schemas, ORMs, migrations | Data Model Spec | ๅˆ†ๆž่ณ‡ๆ–™ๆจกๅž‹่ˆ‡็ตๆง‹ | | `runtime` | Runtime | Logs, configs, metrics | Runtime Baseline | ๅˆ†ๆžๅŸท่กŒ็’ฐๅขƒๅŸบๆบ– | | `bdd` | โ€” | `SPEC-XXX.md` | `.feature` | ๅฐ‡ AC ่ฝ‰็‚บ Gherkin | | `tdd` | โ€” | `.feature` | Coverage Report | ๅˆ†ๆžๆธฌ่ฉฆ่ฆ†่“‹็އ | ## Full Analysis Mode | ๅ…จ้ขๅˆ†ๆžๆจกๅผ When `/reverse` is invoked without a subcommand, execute all three dimensions sequentially: 1. **Data** โ†’ Scan schemas, ORMs, migrations 2. **Runtime** โ†’ Analyze logs, configs, deployment 3. **Logic (spec)** โ†’ Extract APIs, flows, tests โ†’ Generate SPEC Output: Integrated **System Archeology Report** combining all three dimensions. ## Dimension Details | ็ถญๅบฆ่ฉณๆƒ… ### spec: Logic Dimension (ๆ—ขๆœ‰) 1. **Scan** - Read source files and identify public APIs, data flows, and business logic 2. **Classify** - Tag each finding as `[Confirmed]`, `[Inferred]`, or `[Unknown]` 3. **Structure** - Organize into SDD spec format with Acceptance Criteria 4. **Attribute** - Cite every reversed item with `file:line` source reference ### data: Data Dimension (ๆ–ฐๅขž) 1. **Discover** - Find database schemas, ORM models, migration files, seed data 2. **Map** - Build entity-relationship model from code evidence 3. **Classify** - Tag relationships as `[Confirmed]` (FK constraints) or `[Inferred]` (code patterns) 4. **Report** - Output data model spec with: - Entity list with fields and types - Relationship map (1:1, 1:N, M:N) - Index and constraint inventory - Migration history summary - Data flow paths (write โ†’ read) **Evidence sources**: `schema.prisma`, `*.migration.*`, `models/`, `entities/`, `knexfile.*`, `sequelize`, `typeorm`, SQL files, `docker-compose.yml` (DB services) ### runtime: Runtime Dimension (ๆ–ฐๅขž) 1. **Scan configs** - Environment variables, config files, feature flags 2. **Analyze logs** - Log patterns, error frequency, log levels 3. **Check infra** - Docker configs, CI/CD pipelines, deployment manifests 4. **Baseline** - Output runtime baseline with: - Environment variable inventory (names only, **never values/secrets**) - Config file map and hierarchy - External service dependencies (APIs, queues, caches) - Deployment topology (containers, services) - Health check and monitoring endpoints **Evidence sources**: `.env.example`, `docker-compose.yml`, `Dockerfile`, `*.config.*`, CI/CD files, `k8s/`, log files (patterns only) **Security**: NEVER output actual secret values. Only list variable names and describe their purpose. ## Anti-Hallucination Rules | ้˜ฒๅนป่ฆบ่ฆๅ‰‡ | Rule | Requirement | ่ฆๆฑ‚ | |------|-------------|------| | **Certainty Tags** | Use `[Confirmed]`, `[Inferred]`, `[Unknown]` for all findings | ๆ‰€ๆœ‰็™ผ็พ้ ˆๆจ™ๆณจ็ขบๅฎšๆ€ง | | **Source Attribution** | Cite `file:line` for every reversed item | ๆฏ้ …ๅๅ‘็ตๆžœ้ ˆๅผ•็”จไพ†ๆบ | | **No Fabrication** | Never invent APIs or behaviors not found in code | ไธๅพ—ๆ้€ ็จ‹ๅผ็ขผไธญไธๅญ˜ๅœจ็š„ API ๆˆ–่กŒ็‚บ | | **No Secrets** | Never output secret values from configs or env files | ไธๅพ—่ผธๅ‡บ่จญๅฎšๆช”ๆˆ–็’ฐๅขƒ่ฎŠๆ•ธ็š„ๅฏ†้‘ฐๅ€ผ | ## Usage | ไฝฟ็”จๆ–นๅผ ``` /reverse - Full 3-dimension analysis | ไธ‰็ถญๅบฆๅ…จ้ขๅˆ†ๆž /reverse spec src/auth/ - Logic: extract spec | ้‚่ผฏ๏ผšๆๅ–่ฆๆ ผ /reverse data - Data: analyze schemas & models | ่ณ‡ๆ–™๏ผšๅˆ†ๆž็ตๆง‹ /reverse runtime - Runtime: analyze configs & infra | ๅŸท่กŒ็’ฐๅขƒ๏ผšๅˆ†ๆž้…็ฝฎ /reverse bdd specs/SPEC-AUTH.md - Convert spec ACs to Gherkin /reverse tdd features/auth.feature - Analyze test coverage ``` ## Next Steps Guidance | ไธ‹ไธ€ๆญฅๅผ•ๅฐŽ After `/reverse` (full or `spec`) completes, the AI assistant should suggest: > **็ณป็ตฑ่€ƒๅคๅฎŒๆˆใ€‚ๅปบ่ญฐไธ‹ไธ€ๆญฅ / System archeology complete. Suggested next steps:** > - ๅŸท่กŒ `/sdd` ๅฏฉๆŸฅไธฆๆ ธๅ‡†ๆญค่ฆๆ ผ โญ **Recommended / ๆŽจ่–ฆ** โ€” Review and approve the generated spec > - ๅŸท่กŒ `/derive` ๅพž่ฆๆ ผๆŽจๅฐŽๆธฌ่ฉฆ โ€” Derive tests from spec (requires approval first) > - ๅฏฉๆŸฅ่ฆๆ ผไธญ็š„ `[Inferred]` ๅ’Œ `[Unknown]` ๆจ™่จ˜ โ€” Review uncertainty tags manually ## Reference | ๅƒ่€ƒ - [BDD Extraction Workflow Guide](./bdd-extraction.md) โ€” Read it when extracting BDD scenarios out of an existing spec. - [TDD Analysis Workflow Guide](./tdd-analysis.md) โ€” Read it when analysing test coverage against scenarios and finding the gaps. - Step-by-step workflow: [workflow.md](./workflow.md) โ€” the reverse-engineering phases in order (code scanning, data models, configuration, test analysis, coverage). Read it when actually running the process rather than deciding whether to. - Detailed guide: [guide.md](./guide.md) - Core standard: [reverse-engineering-standards.md](../../core/reverse-engineering-standards.md) ## AI Agent Behavior | AI ไปฃ็†่กŒ็‚บ > ๅฎŒๆ•ด็š„ AI ่กŒ็‚บๅฎš็พฉ่ซ‹ๅƒ้–ฑๅฐๆ‡‰็š„ๅ‘ฝไปคๆ–‡ไปถ๏ผš[`/reverse`](../commands/reverse.md#ai-agent-behavior--ai-ไปฃ็†่กŒ็‚บ) > > For complete AI agent behavior definition, see the corresponding command file: [`/reverse`](../commands/reverse.md#ai-agent-behavior--ai-ไปฃ็†่กŒ็‚บ)
View on GitHub