/universal-dev-standards:reverse [spec|bdd|tdd] <input> [--output <file>]from universal-dev-standards
Reverse engineers code into specification documents, converts specs to Gherkin BDD scenarios, or analyzes BDD feature coverage against unit tests. Supports spec, bdd, and tdd subcommands.
Ships in universal-dev-standards. Installing the plugin adds it to Claude Code.
Reverse engineer existing code or tests into specifications and scenarios.
將現有代碼或測試反向工程為規格和場景。
/reverse [subcommand] <input> [options]
| Subcommand | Input | Output | Description |
|---|---|---|---|
spec | Code files/dirs | SPEC-XXX.md | Create SDD Spec from code |
bdd | SPEC-XXX.md | .feature | Convert Spec ACs to Gherkin |
tdd | .feature | Coverage Report | Analyze TDD coverage of features |
| Option | Description |
|---|---|
--output | Output file path |
--include-tests | Include test files in analysis (for spec) |
--review | Trigger review after generation |
/reverse spec src/auth/ --output specs/SPEC-AUTH.md
Analyzes code logic to create a functional specification.
/reverse bdd specs/SPEC-AUTH.md --output features/auth.feature
Converts Acceptance Criteria from the spec into Gherkin scenarios.
/reverse tdd features/auth.feature
Checks if the scenarios in the feature file have corresponding unit tests.
[Confirmed], [Inferred], [Unknown] tags in output.file:line for all reversed logic.Follows AI Command Behavior Standards
| Input | AI Action |
|---|---|
/reverse | 詢問使用者要執行哪個子命令(spec/bdd/tdd)和目標 |
/reverse <subcommand> <input> | 直接對指定目標執行指定子命令 |
/reverse <subcommand> | 執行子命令,詢問目標檔案/目錄 |
/reverse-sdd、/reverse-bdd、/reverse-tddDecision: 子命令選擇
spec → 分派到 /reverse-sddbdd → 分派到 /reverse-bddtdd → 分派到 /reverse-tdd🛑 STOP: 結果展示後等待使用者確認
| Stop Point | 等待內容 |
|---|---|
| 反向工程結果展示後 | 確認結果正確並寫入 |
| Error Condition | AI Action |
|---|---|
| 目標檔案/目錄不存在 | 告知並詢問正確路徑 |
| 子命令無效 | 列出可用子命令(spec/bdd/tdd) |
| 目標為空目錄或空檔案 | 告知無內容可分析 |
What the command file sets; muted values are Claude Code's defaults
reverse-engineering, specification-generation, bdd, tdd, gherkin
7-day visitors to each command page
npx claudepluginhub asiaostrich/universal-dev-standards --plugin universal-dev-standards51 commands in this plugin
/ac-coverageAC Coverage | AC 覆蓋率[UDS] Generate AC-to-test traceability matrix and coverage report/api-designAPI Design Assistant | API 設計助手[UDS] Guide API design following REST, GraphQL and gRPC best practices/atddATDD Assistant | ATDD 助手[UDS] Guide through Acceptance Test-Driven Development workflow/auditAudit Assistant | 審計助手[UDS] UDS health check and feedback system, diagnose installation integrity and detect development patterns/bddBDD Assistant | BDD 助手[UDS] Guide through Behavior-Driven Development workflow/brainstorm[UDS] Structured AI-assisted brainstorming before spec creationOther plugins' commands for the same job