/universal-dev-standards:sdd [spec name or feature | 規格名稱或功能]from universal-dev-standards
Creates and reviews specification documents before writing code. Manages spec format, states, and delta operations for formal feature development with review cycles.
Ships in universal-dev-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create, review, and manage specification documents before writing code.
在撰寫程式碼前,建立、審查和管理規格文件。
/sdd vs uds spec | 何時使用| Scenario | /sdd | uds spec |
|---|---|---|
| Formal feature development with review cycle | ✅ | ❌ |
| Full spec lifecycle (Draft → Archived) | ✅ | ❌ |
| Quick prototyping / Vibe coding | ❌ | ✅ |
| Small incremental changes | ❌ | ✅ |
| Stakeholder sign-off required | ✅ | ❌ |
| Micro-spec from natural language intent | ❌ | ✅ |
/sdd= Full specification lifecycle for formal developmentuds spec= Lightweight micro-specs for rapid iteration
/sdd= 正式開發的完整規格生命週期uds spec= 快速迭代的輕量微規格
specs/, docs/specs/, or project spec directorySPEC-NNN or kebab-case change IDNew request? | 新需求?
├─ Bug fix restoring spec behavior? → Fix directly | 直接修復
├─ Typo/format/comment? → Fix directly | 直接修復
├─ Dependency update (non-breaking)? → Fix directly | 直接修復
├─ New feature/capability? → Create proposal | 建立提案
├─ Breaking change? → Create proposal | 建立提案
├─ Architecture change? → Create proposal | 建立提案
├─ Agent/role definition (spans multiple features)? → Use spec-type: agent | 使用 Agent SPEC template
└─ Unclear? → Create proposal (safer) | 建立提案(較安全)
DISCUSS ──► CREATE ──► REVIEW ──► APPROVE ──► IMPLEMENT ──► VERIFY ──► ARCHIVE
Capture gray areas, establish governing principles, resolve ambiguities before writing spec.
Define requirements, technical design, acceptance criteria, and test plan.
Check for completeness, consistency, and feasibility with stakeholders. Run as an isolated review, see Spec Review Loop.
Get stakeholder sign-off before implementation begins.
Develop following the approved spec, referencing requirements and AC.
Ensure implementation matches spec, all tests pass, AC satisfied.
Archive completed spec with links to commits/PRs.
The Review phase is not the drafter re-reading its own spec. The drafter remembers the whole conversation, so it cannot see what the spec never wrote down; a reader has no such conversation. The review step of flows/sdd.flow.yaml therefore requires an isolated reviewer context (DEC-138).
Review 階段不是起草者重讀自己的規格。起草者記得整段對話,所以看不到規格沒寫出來的東西;讀規格的人沒有那段對話。因此 flows/sdd.flow.yaml 的 review 步驟要求隔離的審查者上下文(DEC-138)。
[degraded]. A reviewer that did not run is reported as not executed, which is not the same as zero findings. Neither is ever reported as a pass. Same rule as BQS D4 in brainstorm-assistant (referenced, not restated).
降級,絕不算通過。 在起草上下文裡做的審查、或環境無法隔離審查者時,回報為 [degraded]。沒跑成的審查者回報為「未執行」,這不等於零發現。兩者都不得回報為通過。規則與 brainstorm-assistant 的 BQS D4 相同(引用,不複述)。Example of a degraded report | 降級報告範例:
Spec review: [degraded]
Reason: no isolated reviewer context was available; the review ran in the drafting context.
Not a pass. A human decides whether to proceed to Approve.
規格審查:[degraded]
原因:沒有可用的隔離審查者上下文;審查在起草上下文中執行。
不算通過。是否進入 Approve 由人決定。
| State | Description | 說明 |
|---|---|---|
| Draft | Work in progress | 草稿中 |
| Review | Under review | 審查中 |
| Approved | Ready for implementation | 已核准 |
| Implemented | Code complete | 已實作 |
| Archived | Completed or deprecated | 已歸檔 |
# [SPEC-ID] Feature: [Name]
## Overview
Brief description of the proposed change.
## Motivation
Why is this change needed? What problem does it solve?
## Requirements
### Requirement: [Name]
The system SHALL [behavior description].
#### Scenario: [Success case]
- **GIVEN** [initial context]
- **WHEN** [action performed]
- **THEN** [expected result]
## Acceptance Criteria
- AC-1: Given [context], when [action], then [result]
## Technical Design
[Architecture, API changes, database changes]
## Test Plan
- [ ] Unit tests for [component]
- [ ] Integration tests for [flow]
spec-type: agent)# [SPEC-ID] Agent: [Role Name]
<!-- spec-type: agent -->
<!-- agent-id auto-referenced by feature SPECs -->
## Role Definition
- **Role**: [Agent Name]
- **Responsibility**: [One sentence]
- **Autonomy Level**: L[1-5] (per DEC-065)
## Capability Scope
**Owns:**
- [Capability 1]
- [Capability 2]
**Does NOT own:**
- [Explicit exclusion]
## Interface Contract
### Input
| Message Type | Required Fields | Optional Fields |
|---|---|---|
| [Type] | [fields] | [fields] |
### Output
| Artifact Type | Success Condition | Failure Condition |
|---|---|---|
| [Type] | [condition] | [condition] |
## Agent Interactions
- **Upstream**: [Who calls this agent]
- **Downstream**: [Who this agent calls]
- **Parallel**: [Agents working alongside]
## Related Feature SPECs
- [SPEC-NNN] — [This agent's role in that spec]
#### Scenario: (h4 header) for each scenarioWhen modifying existing specs, use delta sections:
| Operation | Description | 說明 |
|---|---|---|
## ADDED Requirements | New capabilities | 新增功能 |
## MODIFIED Requirements | Changed behavior | 修改行為 |
## REMOVED Requirements | Deprecated features | 移除功能 |
## RENAMED Requirements | Name changes | 重新命名 |
/sdd analyze) | 跨 artifact 一致性檢查The executable face of the acceptance-criteria-traceability standard + forward-derivation single-spine principle (XSPEC-262). Validates that every test is a faithful projection of the AC spine across specs. 本命令是 acceptance-criteria-traceability + forward-derivation single-spine 的可執行面,驗證每個測試是否忠實投影 AC 主幹。
| Signal | Meaning | Gate |
|---|---|---|
| orphan test | @SPEC-NNN @AC-N references an AC no spec defines / 引用不存在的 AC | 🔴 BLOCKING |
| uncovered | an AC has no @SPEC-NNN @AC-N reference / AC 無測試引用 | report only / 僅報告 |
| not_implemented | AC marked so in its .ac.yaml / .ac.yaml 標記 | 🔴 BLOCKING before UAT |
| cross-spec conflict | same AC id defined in >1 spec / 同 AC id 跨多 spec | 🔴 BLOCKING |
| orphan .feature | Gherkin @AC-N tag referencing a non-existent AC / @AC-N 引用不存在 | 🔴 BLOCKING |
| AC w/o scenario | AC has no .feature scenario (when BDD in use) / AC 無 BDD scenario | report only / 僅報告 |
| user-guide drift | user-guide T-N with no matching journey/E2E test id / 手冊 T-N 無對應測試 | 🔴 BLOCKING |
Coverage % uses the acceptance-criteria-traceability formula (not_implemented excluded). --json for CI.
npm run sdd:analyze -- --specs specs --tests tests [--userguide docs] [--json]
--userguide <dir> enables user-guide↔E2E drift detection (T-NNN, XSPEC-260/257). / 啟用手冊↔E2E drift 偵測。
vs /ac-coverage: ac-coverage = per-spec detailed AC↔test matrix;/sdd analyze = cross-spec/batch consistency + orphan detection(互補、不取代)。
/converge 借鑑)vs /sdd analyze:/sdd analyze 問「測試有沒有正確引用 AC」(引用完整性,deterministic script);convergence check 問「程式碼的實際行為是否真的符合 spec 描述」(語意漂移,需要讀碼判斷,走 sdd.flow.yaml verify 階段的 spec-match-check ai-check step)——兩者互補、檢查的是不同層次的問題,不重疊。
雖然定義在 7-phase 狀態機的 verify 階段(一次性 gate),這個檢查可以在任何時間點對已歸檔的 spec 獨立重跑——用於偵測 spec 歸檔後、code 持續演進累積出的漂移(例如後續 commit 改了行為但沒回頭更新 spec)。重跑時:
missing(spec 要求但沒做)/partial(做一半)/contradicts(行為與描述不同)/unrequested(做了沒被要求的事)CRITICAL(違反 spec 明確 MUST)/HIGH/MEDIUM/LOW/sdd - Interactive spec creation wizard | 互動式規格建立精靈
/sdd auth-flow - Create spec for specific feature | 為特定功能建立規格
/sdd review - Review existing specs | 審查現有規格
/sdd analyze - Cross-artifact consistency check | 跨 artifact 一致性檢查
/sdd --sync-check - Check sync status | 檢查同步狀態
After /sdd completes, the AI assistant should suggest:
規格文件已建立。建議下一步 / Specification document created. Suggested next steps:
- 執行
/derive從規格推導測試工件 ⭐ Recommended / 推薦 — Derive test artifacts from spec- 執行
/derive bdd僅推導 BDD 場景 — Derive BDD scenarios only- 執行
/derive tdd僅推導 TDD 骨架 — Derive TDD skeletons only- 審查 AC 完整性,確保所有驗收條件可測試 — Review AC completeness
- 檢查 UDS 規範覆蓋率 → 執行
/audit --patterns— Check UDS standard coverage → Run/audit --patterns
完整的 AI 行為定義請參閱對應的命令文件:
/sddFor complete AI agent behavior definition, see the corresponding command file:
/sdd
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
asiaostrich-universal-dev-standards@cascade-code-general-misc-3 is listed by joshuarweaver/cascade-code-general-misc-3 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin asiaostrich-universal-dev-standards57 skills in this plugin
/ac-coverage[UDS] Analyze AC-to-test traceability and generate requirement-level coverage reports.
Use when: auditing which acceptance criteria have tests, building a traceability matrix from a SPEC file, finding uncovered AC before release.
Not for: code-level line/branch/function coverage — use /coverage; writing the missing tests — use /tdd or /spec-derive.
Keywords: AC coverage, traceability, acceptance criteria, SPEC, traceability matrix, 驗收條件, 需求追蹤, 覆蓋率矩陣.
/adr[UDS] Create, manage, and track Architecture Decision Records (ADR).
Use when: architecture decisions, technology choices, design trade-offs, pattern selection.
Not for: decisions that do not change architecture — record them in the spec or commit; ideas not yet formed enough to decide — use /brainstorm.
Keywords: ADR, architecture decision, decision record, trade-off.
/ai-collaboration-standardsOther plugins' skills for the same job