universal-dev-standards 5.16.0 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  # Spec-Driven Development (SDD) Standards
2
2
 
3
- **Version**: 2.2.0
4
- **Last Updated**: 2026-03-30
3
+ **Version**: 2.3.0
4
+ **Last Updated**: 2026-06-08
5
5
  **Applicability**: All projects adopting Spec-Driven Development
6
6
  **Scope**: universal
7
7
  **Industry Standards**: None (Emerging 2025+ methodology)
@@ -27,7 +27,7 @@ SDD operates at different maturity levels: Spec-first (discard after completion)
27
27
  |--------|-------------|
28
28
  | **Core Workflow** | Discuss → Proposal → Review → Implementation → Verification → Archive |
29
29
  | **Key Principle** | Spec First, Code Second |
30
- | **AC Format** | Given/When/Then (GWT) — enables structured BDD derivation |
30
+ | **AC Format** | Given/When/Then (GWT, default — enables BDD derivation) **or** EARS notation (optional, XSPEC-263) |
31
31
  | **Test Generation** | Forward Derivation (/derive-bdd, /derive-tdd, /derive-all) |
32
32
  | **Maturity Levels** | Spec-first, Spec-anchored, Spec-as-source |
33
33
  | **Tools** | OpenSpec, Spec Kit, Manual (file-based) |
@@ -36,6 +36,24 @@ SDD operates at different maturity levels: Spec-first (discard after completion)
36
36
  | **AC YAML Sidecar** | Recommended .ac.yaml for machine-readable AC (when >3 ACs) |
37
37
  | **AI Agent Behavior** | Optional section defining agent roles, rules, quality checks, constraints |
38
38
 
39
+ ## Acceptance Criteria Formats | AC 格式
40
+
41
+ UDS supports two AC notations. **GWT is the default and preferred** (Forward Derivation / BDD scenario generation depends on it). **EARS** (Easy Approach to Requirements Syntax, IBM Rational) is an optional supplement that expresses event/state/ubiquitous/unwanted requirements more precisely.
42
+
43
+ | EARS type | Template | Use for |
44
+ |-----------|----------|---------|
45
+ | Ubiquitous | `THE SYSTEM SHALL <response>` | always-active requirement (no trigger) |
46
+ | Event-driven | `WHEN <trigger> THE SYSTEM SHALL <response>` | triggered by an event |
47
+ | State-driven | `WHILE <state> THE SYSTEM SHALL <response>` | active during a state |
48
+ | Unwanted | `IF <condition>, THEN THE SYSTEM SHALL <response>` | error / exception handling |
49
+ | Optional | `WHERE <feature included> THE SYSTEM SHALL <response>` | optional feature |
50
+
51
+ Provide **GWT or EARS** per AC (`.ac.yaml`: `given/when/then` **or** `ears`). Prefer GWT for BDD-derivable behaviour; reach for EARS when GWT feels forced. Do not require both; do not remove GWT.
52
+
53
+ ## What's New in v2.3.0
54
+
55
+ - **EARS notation** as an optional AC format (XSPEC-263): 5 EARS templates + `.ac.yaml` `ears` field. GWT remains default & preferred; `given/when/then` relaxed from `required` (backward compatible).
56
+
39
57
  ## What's New in v2.2.0
40
58
 
41
59
  - **AC YAML Sidecar**: Machine-readable acceptance criteria via `.ac.yaml` files (schema: `specs/schemas/acceptance-criteria.schema.yaml`)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 5.16.0
4
- translation_version: 5.16.0
3
+ source_version: 5.17.0
4
+ translation_version: 5.17.0
5
5
  last_synced: 2026-06-08
6
6
  status: current
7
7
  ---
@@ -17,6 +17,16 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [5.17.0] - 2026-06-08
21
+
22
+ ### 新增 — 可执行 SDD 一致性与 AC 格式扩充(XSPEC-262/263/264)
23
+
24
+ - **`/sdd analyze` 跨 artifact 一致性(XSPEC-262,`scripts/sdd-analyze.ts`)**:acceptance-criteria-traceability + forward-derivation single-spine 的可执行面。7 类信号——孤儿测试/未覆盖/not_implemented/跨 spec AC 冲突/孤儿 .feature/AC 无 scenario/手册↔E2E drift(`T-NNN`,实现 XSPEC-260 R5)。`npm run sdd:analyze`;12 bats 测试。
25
+ - **EARS 记法作为可选 AC 格式(XSPEC-263)**:spec-driven-development v2.3.0 加 5 种 EARS 模板;schema 加可选 `ears` 字段(given/when/then 由 required 放宽、向后兼容)。GWT 维持预设首选。
26
+ - **结构化 Bugfix 规格模板(XSPEC-264)**:sdd-guide 决策树细分 trivial vs regression-prone,新增轻量 `<BUG-ID>.bugfix.md` 模板(current/expected/**unchanged** + root-cause + regression-test 当 AC)。
27
+
28
+ > 注:Bugfix 模板的 sdd-guide locale(zh-TW/zh-CN)同步交 XSPEC-248 回路(既有 locale drift)。
29
+
20
30
  ## [5.16.0] - 2026-06-08
21
31
 
22
32
  ### 新增 — 测试推导链延伸至用户指南(XSPEC-260)
@@ -14,7 +14,7 @@ status: current
14
14
 
15
15
  > **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
16
16
 
17
- **版本**: 5.16.0 | **发布日期**: 2026-05-28 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
17
+ **版本**: 5.17.0 | **发布日期**: 2026-05-28 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
18
18
 
19
19
  语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
20
20
 
@@ -8,8 +8,8 @@ status: current
8
8
 
9
9
  # 规格驱动开发 (SDD) 标准
10
10
 
11
- **版本**: 2.2.0
12
- **最后更新**: 2026-03-30
11
+ **版本**: 2.3.0
12
+ **最后更新**: 2026-06-08
13
13
  **适用范围**: 所有采用规格驱动开发的项目
14
14
  **范围**: universal
15
15
 
@@ -119,6 +119,20 @@ SDD **不是** "ATDD → BDD → TDD" 序列的一部分。相反,它通过正
119
119
 
120
120
  ---
121
121
 
122
+ ## AC 格式
123
+
124
+ UDS 支持两种 AC 记法。**GWT 为预设与首选**(Forward Derivation/BDD 场景生成依赖它)。**EARS**(Easy Approach to Requirements Syntax,IBM Rational)为可选补充,对事件/状态/恒常/异常需求表达更精准(XSPEC-263)。
125
+
126
+ | EARS 型 | 模板 | 用于 |
127
+ |---------|------|------|
128
+ | 恒常 Ubiquitous | `THE SYSTEM SHALL <response>` | 恒常需求(无触发)|
129
+ | 事件驱动 Event-driven | `WHEN <trigger> THE SYSTEM SHALL <response>` | 事件触发 |
130
+ | 状态驱动 State-driven | `WHILE <state> THE SYSTEM SHALL <response>` | 状态持续期间 |
131
+ | 异常 Unwanted | `IF <condition>, THEN THE SYSTEM SHALL <response>` | 错误/异常处理 |
132
+ | 选配 Optional | `WHERE <feature included> THE SYSTEM SHALL <response>` | 选配功能 |
133
+
134
+ 每个 AC 提供 **GWT 或 EARS** 之一(`.ac.yaml` 的 `given/when/then` 或 `ears`)。BDD 可推导行为优先 GWT;GWT 表达牵强时改用 EARS。不强制两者并存、不移除 GWT。
135
+
122
136
  ## 常见陷阱
123
137
 
124
138
  采用 SDD 时避免这些常见陷阱:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 5.16.0
4
- translation_version: 5.16.0
3
+ source_version: 5.17.0
4
+ translation_version: 5.17.0
5
5
  last_synced: 2026-06-08
6
6
  status: current
7
7
  ---
@@ -17,6 +17,16 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [5.17.0] - 2026-06-08
21
+
22
+ ### 新增 — 可執行 SDD 一致性與 AC 格式擴充(XSPEC-262/263/264)
23
+
24
+ - **`/sdd analyze` 跨 artifact 一致性(XSPEC-262,`scripts/sdd-analyze.ts`)**:acceptance-criteria-traceability + forward-derivation single-spine 的可執行面。7 類信號——孤兒測試/未覆蓋/not_implemented/跨 spec AC 衝突/孤兒 .feature/AC 無 scenario/手冊↔E2E drift(`T-NNN`,實現 XSPEC-260 R5)。`npm run sdd:analyze`;12 bats 測試。
25
+ - **EARS 記法作為可選 AC 格式(XSPEC-263)**:spec-driven-development v2.3.0 加 5 種 EARS 模板;schema 加可選 `ears` 欄位(given/when/then 由 required 放寬、向後相容)。GWT 維持預設首選。
26
+ - **結構化 Bugfix 規格模板(XSPEC-264)**:sdd-guide 決策樹細分 trivial vs regression-prone,新增輕量 `<BUG-ID>.bugfix.md` 模板(current/expected/**unchanged** + root-cause + regression-test 當 AC)。
27
+
28
+ > 註:Bugfix 模板的 sdd-guide locale(zh-TW/zh-CN)同步交 XSPEC-248 迴路(既有 locale drift)。
29
+
20
30
  ## [5.16.0] - 2026-06-08
21
31
 
22
32
  ### 新增 — 測試推導鏈延伸至使用者指南(XSPEC-260)
@@ -14,7 +14,7 @@ status: current
14
14
 
15
15
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
16
16
 
17
- **版本**: 5.16.0 | **發布日期**: 2026-05-28 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
17
+ **版本**: 5.17.0 | **發布日期**: 2026-05-28 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
18
 
19
19
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
20
20
 
@@ -10,8 +10,8 @@ status: current
10
10
 
11
11
  > **語言**: [English](../../../core/spec-driven-development.md) | 繁體中文
12
12
 
13
- **版本**: 2.2.0
14
- **最後更新**: 2026-03-30
13
+ **版本**: 2.3.0
14
+ **最後更新**: 2026-06-08
15
15
  **適用性**: 所有採用規格驅動開發的專案
16
16
  **範圍**: 通用 (Universal)
17
17
 
@@ -38,6 +38,24 @@ SDD 的核心流程:**討論 → 規格提案 → 規格審查 → 實作 →
38
38
  | **參與者** | 架構師、開發者、AI 助手 |
39
39
  | **驗證方式** | 規格審查、正向推演 (Forward Derivation) |
40
40
 
41
+ ## AC 格式
42
+
43
+ UDS 支援兩種 AC 記法。**GWT 為預設與首選**(Forward Derivation/BDD 場景生成依賴它)。**EARS**(Easy Approach to Requirements Syntax,IBM Rational)為可選補充,對事件/狀態/恆常/異常需求表達更精準。
44
+
45
+ | EARS 型 | 模板 | 用於 |
46
+ |---------|------|------|
47
+ | 恆常 Ubiquitous | `THE SYSTEM SHALL <response>` | 恆常需求(無觸發)|
48
+ | 事件驅動 Event-driven | `WHEN <trigger> THE SYSTEM SHALL <response>` | 事件觸發 |
49
+ | 狀態驅動 State-driven | `WHILE <state> THE SYSTEM SHALL <response>` | 狀態持續期間 |
50
+ | 異常 Unwanted | `IF <condition>, THEN THE SYSTEM SHALL <response>` | 錯誤/異常處理 |
51
+ | 選配 Optional | `WHERE <feature included> THE SYSTEM SHALL <response>` | 選配功能 |
52
+
53
+ 每個 AC 提供 **GWT 或 EARS** 之一(`.ac.yaml` 的 `given/when/then` 或 `ears`)。BDD 可推導行為優先 GWT;GWT 表達牽強時改用 EARS。不強制兩者並存、不移除 GWT。
54
+
55
+ ## v2.3.0 新增內容
56
+
57
+ - **EARS 記法** 作為可選 AC 格式(XSPEC-263):5 種 EARS 模板 + `.ac.yaml` `ears` 欄位。GWT 維持預設與首選;`given/when/then` 由 required 放寬(向後相容)。
58
+
41
59
  ## v2.2.0 新增內容
42
60
 
43
61
  - **AC YAML Sidecar**:透過 `.ac.yaml` 檔案提供機器可讀的驗收標準(schema:`specs/schemas/acceptance-criteria.schema.yaml`)
@@ -185,12 +185,39 @@ When modifying existing specs, use delta sections:
185
185
  | `## REMOVED Requirements` | Deprecated features | 移除功能 |
186
186
  | `## RENAMED Requirements` | Name changes | 重新命名 |
187
187
 
188
+ ## Cross-Artifact Analysis (`/sdd analyze`) | 跨 artifact 一致性檢查
189
+
190
+ The **executable face** of the acceptance-criteria-traceability standard +
191
+ forward-derivation single-spine principle (XSPEC-262). Validates that every test
192
+ is a faithful projection of the AC spine across specs.
193
+ 本命令是 acceptance-criteria-traceability + forward-derivation single-spine 的**可執行面**,驗證每個測試是否忠實投影 AC 主幹。
194
+
195
+ | Signal | Meaning | Gate |
196
+ |--------|---------|------|
197
+ | **orphan test** | `@AC AC-NNN` references an AC no spec defines / 引用不存在的 AC | 🔴 BLOCKING |
198
+ | **uncovered** | an AC has no `@AC` reference / AC 無測試引用 | report only / 僅報告 |
199
+ | **not_implemented** | AC marked so in its `.ac.yaml` / `.ac.yaml` 標記 | 🔴 BLOCKING before UAT |
200
+ | **cross-spec conflict** | same AC id defined in >1 spec / 同 AC id 跨多 spec | 🔴 BLOCKING |
201
+ | **orphan .feature** | Gherkin `@AC-N` tag referencing a non-existent AC / @AC-N 引用不存在 | 🔴 BLOCKING |
202
+ | **AC w/o scenario** | AC has no `.feature` scenario (when BDD in use) / AC 無 BDD scenario | report only / 僅報告 |
203
+ | **user-guide drift** | user-guide `T-N` with no matching journey/E2E test id / 手冊 T-N 無對應測試 | 🔴 BLOCKING |
204
+
205
+ Coverage % uses the acceptance-criteria-traceability formula (not_implemented excluded). `--json` for CI.
206
+
207
+ ```
208
+ npm run sdd:analyze -- --specs specs --tests tests [--userguide docs] [--json]
209
+ ```
210
+ `--userguide <dir>` enables user-guide↔E2E drift detection (T-NNN, XSPEC-260/257). / 啟用手冊↔E2E drift 偵測。
211
+
212
+ **vs `/ac-coverage`**: ac-coverage = per-spec detailed AC↔test matrix;`/sdd analyze` = cross-spec/batch consistency + orphan detection(互補、不取代)。
213
+
188
214
  ## Usage | 使用方式
189
215
 
190
216
  ```
191
217
  /sdd - Interactive spec creation wizard | 互動式規格建立精靈
192
218
  /sdd auth-flow - Create spec for specific feature | 為特定功能建立規格
193
219
  /sdd review - Review existing specs | 審查現有規格
220
+ /sdd analyze - Cross-artifact consistency check | 跨 artifact 一致性檢查
194
221
  /sdd --sync-check - Check sync status | 檢查同步狀態
195
222
  ```
196
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "5.16.0",
3
+ "version": "5.17.0",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "5.16.0",
3
+ "version": "5.17.0",
4
4
  "lastUpdated": "2026-05-13",
5
5
  "description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
6
6
  "formats": {
@@ -58,14 +58,14 @@
58
58
  "standards": {
59
59
  "name": "universal-dev-standards",
60
60
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
61
- "version": "5.16.0"
61
+ "version": "5.17.0"
62
62
  },
63
63
  "skills": {
64
64
  "name": "universal-dev-standards",
65
65
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
66
66
  "localPath": "skills",
67
67
  "rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills",
68
- "version": "5.16.0",
68
+ "version": "5.17.0",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -2350,7 +2350,7 @@
2350
2350
  "id": "license-compliance",
2351
2351
  "name": "License Compliance Standards",
2352
2352
  "nameZh": "授權合規標準",
2353
- "version": "5.16.0",
2353
+ "version": "5.17.0",
2354
2354
  "source": {
2355
2355
  "human": "core/license-compliance.md",
2356
2356
  "ai": "ai/standards/license-compliance.ai.yaml"