universal-dev-standards 5.14.0 → 5.16.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.
Files changed (134) hide show
  1. package/bin/uds.js +2 -0
  2. package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +31 -0
  3. package/bundled/ai/standards/ai-instruction-standards.ai.yaml +190 -3
  4. package/bundled/ai/standards/forward-derivation-standards.ai.yaml +23 -0
  5. package/bundled/ai/standards/knowledge-graph-memory.ai.yaml +83 -0
  6. package/bundled/core/acceptance-criteria-traceability.md +46 -0
  7. package/bundled/core/ai-instruction-standards.md +136 -11
  8. package/bundled/core/forward-derivation-standards.md +19 -0
  9. package/bundled/core/knowledge-graph-memory.md +119 -0
  10. package/bundled/locales/COVERAGE.md +226 -0
  11. package/bundled/locales/zh-CN/CHANGELOG.md +42 -3
  12. package/bundled/locales/zh-CN/README.md +1 -1
  13. package/bundled/locales/zh-CN/SECURITY.md +1 -1
  14. package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +46 -0
  15. package/bundled/locales/zh-CN/core/ai-instruction-standards.md +111 -5
  16. package/bundled/locales/zh-CN/core/forward-derivation-standards.md +19 -0
  17. package/bundled/locales/zh-CN/skills/ac-coverage/SKILL.md +194 -0
  18. package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +135 -40
  19. package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +217 -63
  20. package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +599 -0
  21. package/bundled/locales/zh-CN/skills/commands/brainstorm.md +92 -25
  22. package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +78 -16
  23. package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +85 -26
  24. package/bundled/locales/zh-CN/skills/deploy-assistant/SKILL.md +189 -0
  25. package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +110 -0
  26. package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +255 -0
  27. package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +70 -11
  28. package/bundled/locales/zh-CN/skills/journey-test-assistant/SKILL.md +209 -0
  29. package/bundled/locales/zh-CN/skills/knowledge-graph/SKILL.md +58 -0
  30. package/bundled/locales/zh-CN/skills/knowledge-graph/guide.md +74 -0
  31. package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +125 -8
  32. package/bundled/locales/zh-CN/skills/observability-assistant/guide.md +188 -0
  33. package/bundled/locales/zh-CN/skills/orchestrate/SKILL.md +173 -0
  34. package/bundled/locales/zh-CN/skills/plan/SKILL.md +240 -0
  35. package/bundled/locales/zh-CN/skills/push/SKILL.md +242 -0
  36. package/bundled/locales/zh-CN/skills/retrospective-assistant/SKILL.md +104 -36
  37. package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +88 -32
  38. package/bundled/locales/zh-CN/skills/runbook-assistant/guide.md +216 -0
  39. package/bundled/locales/zh-CN/skills/skill-builder/SKILL.md +149 -0
  40. package/bundled/locales/zh-CN/skills/slo-assistant/guide.md +188 -0
  41. package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +86 -0
  42. package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +476 -0
  43. package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +155 -81
  44. package/bundled/locales/zh-CN/skills/sweep/SKILL.md +151 -0
  45. package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +207 -110
  46. package/bundled/locales/zh-TW/CHANGELOG.md +46 -3
  47. package/bundled/locales/zh-TW/README.md +1 -1
  48. package/bundled/locales/zh-TW/SECURITY.md +1 -1
  49. package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +46 -0
  50. package/bundled/locales/zh-TW/core/ai-instruction-standards.md +130 -5
  51. package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +222 -5
  52. package/bundled/locales/zh-TW/core/contract-testing-standards.md +184 -5
  53. package/bundled/locales/zh-TW/core/cross-flow-regression.md +192 -5
  54. package/bundled/locales/zh-TW/core/forward-derivation-standards.md +19 -0
  55. package/bundled/locales/zh-TW/core/knowledge-graph-memory.md +127 -0
  56. package/bundled/locales/zh-TW/core/release-readiness-gate.md +186 -5
  57. package/bundled/locales/zh-TW/core/self-review-protocol.md +9 -1
  58. package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +192 -0
  59. package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +21 -42
  60. package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +5 -1
  61. package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +212 -59
  62. package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +266 -579
  63. package/bundled/locales/zh-TW/skills/commands/brainstorm.md +91 -26
  64. package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +77 -15
  65. package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +75 -16
  66. package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +187 -0
  67. package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +108 -0
  68. package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +255 -0
  69. package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +125 -64
  70. package/bundled/locales/zh-TW/skills/journey-test-assistant/SKILL.md +222 -0
  71. package/bundled/locales/zh-TW/skills/knowledge-graph/SKILL.md +56 -0
  72. package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +74 -0
  73. package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +128 -11
  74. package/bundled/locales/zh-TW/skills/observability-assistant/guide.md +188 -0
  75. package/bundled/locales/zh-TW/skills/orchestrate/SKILL.md +173 -0
  76. package/bundled/locales/zh-TW/skills/plan/SKILL.md +240 -0
  77. package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +5 -1
  78. package/bundled/locales/zh-TW/skills/push/SKILL.md +242 -0
  79. package/bundled/locales/zh-TW/skills/retrospective-assistant/SKILL.md +94 -28
  80. package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +84 -28
  81. package/bundled/locales/zh-TW/skills/runbook-assistant/guide.md +216 -0
  82. package/bundled/locales/zh-TW/skills/skill-builder/SKILL.md +165 -0
  83. package/bundled/locales/zh-TW/skills/slo-assistant/guide.md +188 -0
  84. package/bundled/locales/zh-TW/skills/spec-derivation/SKILL.md +83 -0
  85. package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +476 -0
  86. package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +148 -77
  87. package/bundled/locales/zh-TW/skills/sweep/SKILL.md +149 -0
  88. package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +141 -44
  89. package/bundled/skills/adr-assistant/SKILL.md +1 -1
  90. package/bundled/skills/ai-collaboration-standards/SKILL.md +1 -1
  91. package/bundled/skills/ai-friendly-architecture/SKILL.md +1 -1
  92. package/bundled/skills/ai-instruction-standards/SKILL.md +1 -1
  93. package/bundled/skills/api-design-assistant/SKILL.md +1 -1
  94. package/bundled/skills/audit-assistant/SKILL.md +1 -1
  95. package/bundled/skills/brainstorm-assistant/SKILL.md +142 -106
  96. package/bundled/skills/brainstorm-assistant/guide.md +256 -661
  97. package/bundled/skills/ci-cd-assistant/SKILL.md +1 -1
  98. package/bundled/skills/commands/brainstorm.md +51 -30
  99. package/bundled/skills/contract-test-assistant/SKILL.md +1 -1
  100. package/bundled/skills/database-assistant/SKILL.md +1 -1
  101. package/bundled/skills/deploy-assistant/SKILL.md +1 -1
  102. package/bundled/skills/documentation-guide/SKILL.md +1 -1
  103. package/bundled/skills/error-code-guide/SKILL.md +1 -1
  104. package/bundled/skills/git-workflow-guide/SKILL.md +1 -1
  105. package/bundled/skills/incident-response-assistant/SKILL.md +1 -1
  106. package/bundled/skills/journey-test-assistant/SKILL.md +1 -1
  107. package/bundled/skills/knowledge-graph/SKILL.md +58 -0
  108. package/bundled/skills/knowledge-graph/guide.md +69 -0
  109. package/bundled/skills/logging-guide/SKILL.md +1 -1
  110. package/bundled/skills/observability-assistant/SKILL.md +1 -1
  111. package/bundled/skills/orchestrate/SKILL.md +1 -1
  112. package/bundled/skills/plan/SKILL.md +1 -1
  113. package/bundled/skills/pr-automation-assistant/SKILL.md +1 -1
  114. package/bundled/skills/project-structure-guide/SKILL.md +1 -1
  115. package/bundled/skills/push/SKILL.md +1 -1
  116. package/bundled/skills/retrospective-assistant/SKILL.md +1 -1
  117. package/bundled/skills/reverse-engineer/SKILL.md +1 -1
  118. package/bundled/skills/runbook-assistant/SKILL.md +1 -1
  119. package/bundled/skills/security-assistant/SKILL.md +1 -1
  120. package/bundled/skills/security-scan-assistant/SKILL.md +1 -1
  121. package/bundled/skills/slo-assistant/SKILL.md +1 -1
  122. package/bundled/skills/sweep/SKILL.md +1 -1
  123. package/bundled/skills/testing-guide/SKILL.md +1 -1
  124. package/package.json +2 -2
  125. package/src/commands/check.js +80 -0
  126. package/src/commands/init.js +8 -1
  127. package/src/commands/update.js +49 -14
  128. package/src/i18n/messages.js +32 -5
  129. package/src/installers/skills-installer.js +49 -0
  130. package/src/lint/i18n.js +424 -0
  131. package/src/utils/config-manager.js +39 -0
  132. package/src/utils/skills-installer.js +39 -7
  133. package/standards-registry.json +16 -4
  134. package/bundled/locales/zh-TW/docs/SKILL-FALLBACK-GUIDE.md +0 -407
@@ -2,49 +2,73 @@
2
2
  source: ../../../../skills/testing-guide/SKILL.md
3
3
  source_version: 1.2.0
4
4
  translation_version: 1.2.0
5
- last_synced: 2026-02-10
5
+ last_synced: 2026-06-02
6
+ source_hash: 49b6f9e0c6a4
6
7
  status: current
7
8
  name: testing
8
9
  description: |
9
- Testing pyramid and test writing standards for UT/IT/ST/E2E.
10
- Supports ISTQB and Industry Pyramid frameworks.
11
- Use when: writing tests, discussing test coverage, test strategy, or test naming.
12
- Keywords: test, unit, integration, e2e, coverage, mock, ISTQB, SIT, 测试, 单元, 集成, 端对端.
10
+ 面向 UT/IT/ST/E2E 的测试金字塔与测试编写标准。
11
+ 支持 ISTQB 与业界通行金字塔两种框架。
12
+ 使用时机:编写测试、讨论测试覆盖率、测试策略或测试命名时。
13
+ 关键词:test, unit, integration, e2e, coverage, mock, ISTQB, SIT, 测试, 单元, 集成, 端对端。
13
14
  ---
14
15
 
15
16
  # 测试指南
16
17
 
17
18
  > **语言**: [English](../../../../skills/testing-guide/SKILL.md) | 简体中文
18
19
 
19
- **版本**: 1.1.0
20
- **最後更新**: 2025-12-29
21
- **適用範圍**: Claude Code Skills
20
+ **版本**: 1.2.0
21
+ **最后更新**: 2026-01-29
22
+ **适用范围**: Claude Code Skills
22
23
 
23
24
  ---
24
25
 
25
26
  ## 目的
26
27
 
27
- 本 Skill 提供测试金字塔标准和系统化测试的最佳实踐,支援 ISTQB 和业界通行金字塔框架。
28
+ 本 Skill 提供测试金字塔标准和系统化测试的最佳实践,同时支持 ISTQB 与业界通行金字塔两种框架。
29
+
30
+ ## 测试技能导航 | Testing Skills Navigator
31
+
32
+ UDS 提供 6 个与测试相关的 Skill。使用以下决策树找到合适的那一个:
33
+
34
+ ```
35
+ 你想做什么? | What do you want to do?
36
+ ├── 测量代码覆盖率(行/分支/函数) → /coverage
37
+ ├── 追踪哪些需求已有测试(AC 可追溯性) → /ac-coverage
38
+ ├── 以测试驱动开发进行(红-绿-重构) → /tdd
39
+ ├── 编写 BDD 场景(Given-When-Then) → /bdd
40
+ ├── 与利益相关者定义验收测试 → /atdd
41
+ └── 学习测试标准与最佳实践 → /testing(本 Skill)
42
+ ```
43
+
44
+ | Skill | 焦点 | Focus |
45
+ |-------|------|-------|
46
+ | `/testing` | 测试标准与最佳实践参考 | Standards and best practices reference |
47
+ | `/coverage` | 代码层级覆盖率分析 | Code-level coverage analysis |
48
+ | `/ac-coverage` | 需求层级 AC 可追溯性 | Requirement-level AC traceability |
49
+ | `/tdd` | 红-绿-重构开发循环 | Red-Green-Refactor development cycle |
50
+ | `/bdd` | Given-When-Then 行为场景 | Behavior scenarios with Given-When-Then |
51
+ | `/atdd` | 与利益相关者定义验收条件 | Acceptance criteria with stakeholders |
28
52
 
29
53
  ## 框架选择
30
54
 
31
- | 框架 | 层级 | 適用場景 |
55
+ | 框架 | 层级 | 适用场景 |
32
56
  |-----------|--------|----------|
33
- | **ISTQB** | UT → IT/SIT → ST → AT/UAT | 企业级、合規性、正式 QA |
57
+ | **ISTQB** | UT → IT/SIT → ST → AT/UAT | 企业级、合规性、正式 QA |
34
58
  | **业界通行金字塔** | UT (70%) → IT (20%) → E2E (10%) | 敏捷、DevOps、CI/CD |
35
59
 
36
- **集成测试縮写说明:**
37
- - **IT** (Integration Testing):敏捷/DevOps 社群常用
38
- - **SIT** (System Integration Testing):企业/ISTQB 環境常用
39
- - 兩者指的是相同的测试层级
60
+ **集成测试缩写说明:**
61
+ - **IT** (Integration Testing):敏捷/DevOps 社区常用
62
+ - **SIT** (System Integration Testing):企业/ISTQB 环境常用
63
+ - 两者指的是相同的测试层级
40
64
 
41
- ## 快速參考
65
+ ## 快速参考
42
66
 
43
67
  ### 测试金字塔(业界标准)
44
68
 
45
69
  ```
46
70
  ┌─────────┐
47
- │ E2E │ ← 10%(較少、較慢)
71
+ │ E2E │ ← 10%(较少、较慢)
48
72
  ─┴─────────┴─
49
73
  ┌─────────────┐
50
74
  │ IT/SIT │ ← 20%(集成测试)
@@ -54,33 +78,36 @@ description: |
54
78
  └─────────────────┘
55
79
  ```
56
80
 
57
- ### 测试层级概覽
81
+ ### 测试层级概览
58
82
 
59
- | 层级 | 範圍 | 速度 | 相依性 |
83
+ | 层级 | 范围 | 速度 | 依赖 |
60
84
  |-------|-------|-------|-------------|
61
- | **UT** | 单一函式/类别 | < 100ms | Mock |
62
- | **IT/SIT** | 元件互动 | 1-10秒 | 真实数据庫(容器化) |
63
- | **ST** | 完整系统(ISTQB) | 分鐘级 | 类生产環境 |
64
- | **E2E** | 使用者旅程 | 30秒+ | 所有真实環境 |
65
- | **AT/UAT** | 业务验证(ISTQB) | 视情况 | 所有真实環境 |
85
+ | **UT** | 单一函数/类 | < 100ms | Mock |
86
+ | **IT/SIT** | 组件交互 | 1-10秒 | 真实数据库(容器化) |
87
+ | **ST** | 完整系统(ISTQB) | 分钟级 | 类生产环境 |
88
+ | **E2E** | 用户旅程 | 30秒+ | 一切均为真实 |
89
+ | **AT/UAT** | 业务验证(ISTQB) | 视情况 | 一切均为真实 |
66
90
 
67
- ### 覆蓋率目標
91
+ ### 覆盖率目标
68
92
 
69
- | 指標 | 最低要求 | 建议值 |
93
+ | 指标 | 最低要求 | 建议值 |
70
94
  |--------|---------|-------------|
71
- | 行覆蓋率 | 70% | 85% |
72
- | 分支覆蓋率 | 60% | 80% |
73
- | 函式覆蓋率 | 80% | 90% |
95
+ | 行覆盖率 | 70% | 85% |
96
+ | 分支覆盖率 | 60% | 80% |
97
+ | 函数覆盖率 | 80% | 90% |
74
98
 
75
99
  ## 详细指南
76
100
 
77
- 完整标准請參考:
78
- - [测试金字塔](./testing-pyramid.md)
101
+ 完整标准请参考:
102
+ - [测试标准](../../core/testing-standards.md) - 可执行的规则
103
+ - [测试理论](./testing-theory.md) - 教学型知识库
104
+ - [测试金字塔](./testing-pyramid.md) - 详细的金字塔比例
105
+ - [测试骨架模板](./test-skeleton-templates.md) - 面向 UT/IT/ST/Perf/Contract 的多语言骨架
79
106
 
80
- ### AI 優化格式(Token 高效)
107
+ ### AI 优化格式(Token 高效)
81
108
 
82
- 供 AI 助理使用,請採用 YAML 格式文件以減少 Token 使用量:
83
- - 基礎标准:`ai/standards/testing.ai.yaml`
109
+ 供 AI 助理使用,请采用 YAML 格式文件以减少 Token 用量:
110
+ - 基础标准:`ai/standards/testing.ai.yaml`
84
111
  - 框架选项:
85
112
  - ISTQB 框架:`ai/options/testing/istqb-framework.ai.yaml`
86
113
  - 业界通行金字塔:`ai/options/testing/industry-pyramid.ai.yaml`
@@ -89,8 +116,12 @@ description: |
89
116
  - 集成测试:`ai/options/testing/integration-testing.ai.yaml`
90
117
  - 系统测试:`ai/options/testing/system-testing.ai.yaml`
91
118
  - E2E 测试:`ai/options/testing/e2e-testing.ai.yaml`
119
+ - 安全测试:`ai/options/testing/security-testing.ai.yaml`
120
+ - 性能测试:`ai/options/testing/performance-testing.ai.yaml`
121
+ - 契约测试:`ai/options/testing/contract-testing.ai.yaml`
122
+ - 骨架模板(涵盖所有层级、多语言):[test-skeleton-templates.md](./test-skeleton-templates.md)
92
123
 
93
- ## 命名慣例
124
+ ## 命名惯例
94
125
 
95
126
  ### 文件命名
96
127
 
@@ -113,70 +144,159 @@ test_[method]_[scenario]_[expected]()
113
144
 
114
145
  | 类型 | 用途 | 使用时机 |
115
146
  |------|---------|-------------|
116
- | **Stub** | 回传预定義值 | 固定 API 响应 |
117
- | **Mock** | 验证互动 | 检查方法是否被呼叫 |
118
- | **Fake** | 簡化实作 | 记忆体数据庫 |
119
- | **Spy** | 记录呼叫、委派 | 部分 Mock |
147
+ | **Stub** | 返回预定义值 | 固定的 API 响应 |
148
+ | **Mock** | 验证交互 | 检查方法是否被调用 |
149
+ | **Fake** | 简化实现 | 内存数据库 |
150
+ | **Spy** | 记录调用、委派 | 部分 Mock |
120
151
 
121
- ### 何时使用
152
+ ### 何时使用何种
122
153
 
123
- - **UT**: 对所有外部相依使用 mock/stub
124
- - **IT**: 数据庫使用 fake,外部 API 使用 stub
125
- - **ST**: 真实元件,僅对外部服务使用 fake
126
- - **E2E**: 全部使用真实環境
154
+ - **UT**:对所有外部依赖使用 mock/stub
155
+ - **IT**:数据库使用 fake,外部 API 使用 stub
156
+ - **ST**:真实组件,仅对外部服务使用 fake
157
+ - **E2E**:一切均为真实
127
158
 
128
159
  ## AAA 模式
129
160
 
130
161
  ```typescript
131
162
  test('method_scenario_expected', () => {
132
- // Arrange - 设置测试数据
163
+ // Arrange - Setup test data
133
164
  const input = createTestInput();
134
165
  const sut = new SystemUnderTest();
135
166
 
136
- // Act - 执行行为
167
+ // Act - Execute behavior
137
168
  const result = sut.execute(input);
138
169
 
139
- // Assert - 验证結果
170
+ // Assert - Verify result
140
171
  expect(result).toBe(expected);
141
172
  });
142
173
  ```
143
174
 
144
- ## FIRST 原則
175
+ ## FIRST 原则
145
176
 
146
- - **F**ast(快速) - 测试执行快速
147
- - **I**ndependent(獨立) - 测试之间不互相影響
148
- - **R**epeatable(可重複) - 每次执行結果相同
149
- - **S**elf-validating(自我验证) - 明确的通過/失败
150
- - **T**imely(及时) - 与产品代码一起撰写
177
+ - **F**ast(快速) - 测试执行迅速
178
+ - **I**ndependent(独立) - 测试之间互不影响
179
+ - **R**epeatable(可重复) - 每次执行结果相同
180
+ - **S**elf-validating(自我验证) - 明确的通过/失败
181
+ - **T**imely(及时) - 与生产代码一起编写
151
182
 
152
183
  ## 应避免的反模式
153
184
 
154
- - ❌ 测试相依(测试必須按順序执行)
155
- - ❌ 不穩定测试(有时通過、有时失败)
156
- - ❌ 测试实作細节
157
- - ❌ 過度 Mock
158
- - ❌ 缺少斷言
159
- - ❌ 魔術數字/字串
185
+ - ❌ 测试相互依赖(测试必须按顺序执行)
186
+ - ❌ 不稳定测试(有时通过、有时失败)
187
+ - ❌ 测试实现细节
188
+ - ❌ 过度 Mock
189
+ - ❌ 缺少断言
190
+ - ❌ 魔术数字/字符串
191
+
192
+ ---
193
+
194
+ ## 测试理论要点(YAML 压缩)
195
+
196
+ ```yaml
197
+ # === ISTQB FUNDAMENTALS ===
198
+ terminology:
199
+ error: "Human mistake in thinking"
200
+ defect: "Bug in code (caused by error)"
201
+ failure: "System behaves incorrectly (caused by defect)"
202
+ chain: "Error → Defect → Failure"
203
+
204
+ oracle_problem:
205
+ definition: "How do we know the expected result is correct?"
206
+ approaches:
207
+ - specification_oracle: "Compare against spec"
208
+ - reference_oracle: "Compare against reference impl"
209
+ - consistency_oracle: "Same input → same output"
210
+ - heuristic_oracle: "Reasonable approximation"
211
+
212
+ # === STATIC vs DYNAMIC ===
213
+ static_testing:
214
+ definition: "Examine without executing"
215
+ techniques: [reviews, walkthroughs, inspections, static_analysis]
216
+ finds: "Defects before runtime"
217
+ examples: [ESLint, SonarQube, code_review]
218
+
219
+ dynamic_testing:
220
+ definition: "Execute and observe behavior"
221
+ techniques: [unit, integration, system, acceptance]
222
+ finds: "Failures during execution"
223
+
224
+ # === TEST DESIGN TECHNIQUES ===
225
+ black_box:
226
+ equivalence_partitioning:
227
+ principle: "Divide inputs into equivalent classes"
228
+ example: "Age: [<0 invalid], [0-17 minor], [18-64 adult], [65+ senior]"
229
+ boundary_value:
230
+ principle: "Test at boundaries of partitions"
231
+ example: "Age: test -1, 0, 17, 18, 64, 65"
232
+ decision_table:
233
+ principle: "Combinations of conditions → actions"
234
+ use: "Complex business rules"
235
+ state_transition:
236
+ principle: "Valid sequences of states"
237
+ use: "Workflow, state machines"
238
+
239
+ white_box:
240
+ statement_coverage: "Every statement executed once"
241
+ branch_coverage: "Every decision branch taken"
242
+ condition_coverage: "Every condition T/F"
243
+ path_coverage: "Every possible path (often impractical)"
244
+
245
+ # === RISK-BASED TESTING ===
246
+ risk_assessment:
247
+ likelihood: "How likely to fail?"
248
+ impact: "How bad if fails?"
249
+ priority: "likelihood × impact"
250
+
251
+ risk_matrix:
252
+ high_high: "Test extensively, first priority"
253
+ high_low: "Good coverage"
254
+ low_high: "Good coverage"
255
+ low_low: "Basic coverage"
256
+
257
+ # === DEFECT MANAGEMENT ===
258
+ defect_lifecycle:
259
+ states: [new, assigned, in_progress, fixed, verified, closed]
260
+ reopen_trigger: "Verification fails"
261
+
262
+ severity_vs_priority:
263
+ severity: "Technical impact (critical/major/minor/trivial)"
264
+ priority: "Business urgency (high/medium/low)"
265
+ example: "Typo on login page: low severity, high priority (brand)"
266
+
267
+ # === TEST ENVIRONMENT ===
268
+ isolation_levels:
269
+ unit: "In-memory, mocked deps"
270
+ integration: "Containerized DB (Docker)"
271
+ staging: "Production-like, isolated"
272
+ production: "Real, feature flags for testing"
273
+
274
+ test_data_strategies:
275
+ fixtures: "Static predefined data"
276
+ factories: "Dynamic generation (faker)"
277
+ snapshots: "Sanitized production copy"
278
+ synthetic: "Algorithm-generated edge cases"
279
+ ```
160
280
 
161
281
  ---
162
282
 
163
- ## 设置偵测
283
+ ## 设置侦测
164
284
 
165
- 本 Skill 支援项目特定设置。
285
+ 本 Skill 支持项目特定的设置。
166
286
 
167
- ### 偵测順序
287
+ ### 侦测顺序
168
288
 
169
- 1. 检查 `CONTRIBUTING.md` 的「停用 Skills」區段
170
- - 如果列出此 Skill,則为該项目停用
171
- 2. 检查 `CONTRIBUTING.md` 的「测试标准」區段
172
- 3. 若未找到,**预设使用标准覆蓋率目標**
289
+ 1. 检查 `CONTRIBUTING.md` 的「Disabled Skills」(停用 Skills)区段
290
+ - 如果列出此 Skill,则其在该项目被停用
291
+ 2. 检查 `CONTRIBUTING.md` 的「Testing Standards」(测试标准)区段
292
+ 3. 若未找到,**默认使用标准覆盖率目标**
173
293
 
174
294
  ### 首次设置
175
295
 
176
296
  若未找到设置且上下文不清楚时:
177
297
 
178
- 1. 詢問使用者:「此项目尚未设置测试标准。您想要自订覆蓋率目標嗎?」
179
- 2. 使用者选择後,建议在 `CONTRIBUTING.md` 中记录:
298
+ 1. 询问用户:「此项目尚未配置测试标准。您想要自定义覆盖率目标吗?」
299
+ 2. 用户选择后,建议在 `CONTRIBUTING.md` 中记录:
180
300
 
181
301
  ```markdown
182
302
  ## Testing Standards
@@ -189,7 +309,7 @@ test('method_scenario_expected', () => {
189
309
  | Function | 85% |
190
310
  ```
191
311
 
192
- ### 设置範例
312
+ ### 设置示例
193
313
 
194
314
  在项目的 `CONTRIBUTING.md` 中:
195
315
 
@@ -211,60 +331,37 @@ test('method_scenario_expected', () => {
211
331
 
212
332
  ---
213
333
 
214
- ## 相关标准
215
-
216
- - [测试标准](../../../../core/testing-standards.md)
217
- - [程序码审查检查清单](../../../../core/code-review-checklist.md)
334
+ ## 下一步引导 | Next Steps Guidance
218
335
 
219
- ---
336
+ `/testing` 完成后,AI 助理应建议:
220
337
 
221
- ## 版本历史
222
-
223
- | 版本 | 日期 | 变更内容 |
224
- |---------|------|---------|
225
- | 1.1.0 | 2025-12-29 | 新增:框架选择(ISTQB/业界通行金字塔)、IT/SIT 縮写说明 |
226
- | 1.0.0 | 2025-12-24 | 新增:标准區段(目的、相关标准、版本历史、授权) |
338
+ > **测试标准与最佳实践已掌握。建议下一步 / Testing standards and best practices understood. Suggested next steps:**
339
+ > - 执行 `/tdd` 开始测试驱动开发(红-绿-重构循环) ⭐ **推荐 / Recommended** — 将测试知识立即转化为实践 / Turn testing knowledge into practice immediately
340
+ > - 执行 `/coverage` 分析当前代码覆盖率 找出测试缺口 / Identify testing gaps
341
+ > - 执行 `/bdd` 编写行为驱动的 Given-When-Then 场景 — 从用户角度定义测试 / Define tests from user perspective
227
342
 
228
343
  ---
229
344
 
230
- ## 授权
231
-
232
- 本 Skill 以 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) 授权發布。
233
-
234
- **來源**: [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards)
235
-
236
-
237
- ## Next Steps Guidance | 下一步引導
238
-
239
- After `/testing` completes, the AI assistant should suggest:
240
-
241
- > **測試標準與最佳實踐已掌握。建議下一步 / Testing standards and best practices understood. Suggested next steps:**
242
- > - 執行 `/tdd` 開始測試驅動開發(紅-綠-重構循環) ⭐ **Recommended / 推薦** — 將測試知識立即轉化為實踐 / Turn testing knowledge into practice immediately
243
- > - 執行 `/coverage` 分析目前程式碼覆蓋率 — 找出測試缺口 / Identify testing gaps
244
- > - 執行 `/bdd` 撰寫行為驅動的 Given-When-Then 場景 — 從使用者角度定義測試 / Define tests from user perspective
245
-
246
- ---
247
-
248
- ## Related Standards
345
+ ## 相关标准
249
346
 
250
- - [Testing Standards](../../core/testing-standards.md) - Actionable rules
251
- - [Testing Theory](./testing-theory.md) - Educational knowledge base
252
- - [Code Review Checklist](../../core/code-review-checklist.md)
347
+ - [测试标准](../../core/testing-standards.md) - 可执行的规则
348
+ - [测试理论](./testing-theory.md) - 教学型知识库
349
+ - [代码审查检查清单](../../core/code-review-checklist.md)
253
350
 
254
351
  ---
255
352
 
256
- ## Version History
353
+ ## 版本历史
257
354
 
258
- | Version | Date | Changes |
355
+ | 版本 | 日期 | 变更内容 |
259
356
  |---------|------|---------|
260
- | 1.2.0 | 2026-01-29 | Added links to new testing-theory.md knowledge base |
261
- | 1.1.0 | 2025-12-29 | Added Testing Theory Essentials YAML section |
262
- | 1.0.0 | 2025-12-24 | Initial: Standard sections (Purpose, Related Standards, Version History, License) |
357
+ | 1.2.0 | 2026-01-29 | 新增指向新建 testing-theory.md 知识库的链接 |
358
+ | 1.1.0 | 2025-12-29 | 新增测试理论要点 YAML 区段 |
359
+ | 1.0.0 | 2025-12-24 | 初版:标准区段(目的、相关标准、版本历史、授权) |
263
360
 
264
361
  ---
265
362
 
266
- ## License
363
+ ## 授权
267
364
 
268
- This skill is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
365
+ Skill [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) 授权发布。
269
366
 
270
- **Source**: [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards)
367
+ **来源**: [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards)
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 5.14.0
4
- translation_version: 5.14.0
5
- last_synced: 2026-05-27
3
+ source_version: 5.16.0
4
+ translation_version: 5.16.0
5
+ last_synced: 2026-06-08
6
6
  status: current
7
7
  ---
8
8
 
@@ -17,6 +17,49 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [5.16.0] - 2026-06-08
21
+
22
+ ### 新增 — 測試推導鏈延伸至使用者指南(XSPEC-260)
23
+
24
+ - **`core/forward-derivation-standards.md`**:新增 `## Terminal Projection: User Guide`(終端投影:使用者指南)段 + `### Single-Spine Principle`(單一主幹原則)。把推導管道從測試延伸到使用者指南——使用者指南是 journey/E2E 測試以機器驗證的同一條 AC 主幹的終端投影。定義共用 `T-NNN` 編號(使用者指南步驟的 `T-NNN` 必須等於某個真實 journey/E2E 測試的 id)、user-facing AC 篩選與保守預設,以及單一主幹原則:測試/文件來源是同一 AC 主幹的 N×1 投影、非 N×N 平行對照;另立平行編號體系即為違規。
25
+ - **`ai/standards/forward-derivation-standards.ai.yaml`**:對應 `terminal_projection` 區塊 + 3 條 rules(`single-spine-no-parallel-numbering`、`user-guide-shared-tnnn`、`user-facing-ac-conservative-default`)。
26
+ - **`core/acceptance-criteria-traceability.md`**:新增 `## User-Documentation Coverage`(使用者文件覆蓋)維度——追蹤 user-facing AC 是否被使用者指南記載。含 user-facing AC 篩選(保守預設:判不準歸 user-facing)、沿用 ✅/⚠️/❌ 狀態,及排除非 user-facing 與 `not_implemented` AC 的覆蓋率公式。
27
+ - **`ai/standards/acceptance-criteria-traceability.ai.yaml`**:對應 `user_doc_coverage` 區塊 + 2 條 rules(`user-doc-user-facing-only`、`user-doc-shared-tnnn`)。
28
+ - **zh-TW / zh-CN 語言版**:兩標準的新段落均完整翻譯。
29
+
30
+ ## [5.15.0] - 2026-05-28
31
+
32
+ ### 新增 — i18n 分層語言策略(XSPEC-239)
33
+
34
+ - **`core/ai-instruction-standards.md` v1.0.0 → v1.1.0**:新增 `## 國際化(i18n)` 章節,定義 SKILL.md 與 root 級 AI 指令檔的 L1/L2/L3/L4 分層語言策略。**範圍延伸**自原本只規範 root 級(`CLAUDE.md`、`.cursorrules` 等)擴張至涵蓋 skill 級檔案(`SKILL.md`)。定義 canonical/locale 檔案結構、責任邊界、chimera 防範規則、採用者安裝模式。
35
+ - **`ai/standards/ai-instruction-standards.ai.yaml` v1.0.0 → v1.1.0**:對應的 `i18n:` 區塊 + 4 條新規則(`i18n-canonical-english-only`、`i18n-locale-must-match-language`、`i18n-l3-template-language-controls-output`、`i18n-no-manual-canonical-edits-by-adopters`)。
36
+ - **10 個缺漏 zh-TW locale skill 變體**:`ac-coverage`、`deploy-assistant`、`dev-methodology`、`journey-test-assistant`、`orchestrate`、`plan`、`push`、`skill-builder`、`spec-derivation`、`sweep`。zh-TW skill 覆蓋率達 54/54(100%)。
37
+ - **`cli/src/lint/i18n.js` + `uds check --i18n` 命令**:強制執行 5 條 chimera 防範規則(`canonical:description-must-be-ascii` 錯誤、`locale:description-must-match-language` 錯誤、`locale:must-have-source-frontmatter` 錯誤、`canonical:l3-language-consistency` 警告、`translation-drift-warn` 警告)。Error 退出碼 1。`--json` 模式給 CI 用。
38
+ - **`scripts/generate-locale-coverage.mjs` + 自動產生的 `locales/COVERAGE.md`**:依 skill/standard × locale 的覆蓋率矩陣 + drift 警告。npm script `docs:locale-coverage`。
39
+ - **`UDS_LOCALE` 環境變數支援**:在 `cli/src/i18n/messages.js detectLanguage()` 與 `cli/src/commands/update.js resolveLocale()` 讀取。接受 `zh-tw`、`zh_tw`、`zh-cn`、`zh_cn`、`en`(不分大小寫)。
40
+ - **`.uds/install.yaml` `locale:` 欄位支援**:`cli/src/utils/config-manager.js readInstallYaml()` 讀取可選 `locale:`,讓採用者宣告偏好 locale 一次,免去每次 `--locale`。
41
+ - **Locale fallback WARN**:當 `installSingleSkill` 從缺漏的 locale 變體 fallback 到英文時,安裝結束時統一以黃色 WARN 區塊列出受影響 skill。取代原本的 silent fallback。
42
+ - **i18n 訊息**:在 en/zh-tw/zh-cn locale 中新增 `localeFallbackTitle` / `localeFallbackHint` 鍵。
43
+
44
+ ### 變更
45
+
46
+ - **CLI locale 解析優先順序**(`cli/src/commands/update.js resolveLocale()`):現為 6 階層 — `--locale` CLI 旗標 > `.uds/install.yaml` `locale:` > `UDS_LOCALE` env > manifest > `.standards/` 偵測 > `'en'`。`init` 與 `update` 一致。
47
+ - **`core/ai-instruction-standards.md` 譯本**:zh-TW 與 zh-CN locale 同步至 v1.1.0 含完整在地化 i18n 章節。(zh-CN 章節標記 pending-review,依 XSPEC-239 O-2 — 簡中翻譯品質策略未定。)
48
+
49
+ ### 修正
50
+
51
+ - **29 個 canonical SKILL.md 描述 chimera 修正**(XSPEC-239 Phase 1B):自下列 skill 的 `description:` frontmatter 移除 CJK 內容:`adr-assistant`、`ai-collaboration-standards`、`ai-friendly-architecture`、`ai-instruction-standards`、`api-design-assistant`、`audit-assistant`、`ci-cd-assistant`、`contract-test-assistant`、`database-assistant`、`deploy-assistant`、`documentation-guide`、`error-code-guide`、`git-workflow-guide`、`incident-response-assistant`、`journey-test-assistant`、`logging-guide`、`observability-assistant`、`orchestrate`、`plan`、`pr-automation-assistant`、`project-structure-guide`、`push`、`retrospective-assistant`、`runbook-assistant`、`security-assistant`、`security-scan-assistant`、`slo-assistant`、`sweep`、`testing-guide`。譯本改放於 `locales/{lang}/skills/`。原本依賴 `.claude/skills/` 中繁中描述的採用者應重跑 `uds update --locale zh-TW`(或 `--locale zh-CN`)。
52
+ - **`skills/reverse-engineer/SKILL.md` description em dash(U+2014)** 改為 ASCII hyphen — canonical 描述必須純 ASCII(依新 lint 規則)。
53
+ - **`locales/zh-TW/core/self-review-protocol.md` 缺 YAML frontmatter** 已補(`source:`、`source_version:`、`translation_version:`、`last_synced:`、`status:`),與其他 zh-TW core 變體一致。
54
+
55
+ ### 採用者升級注意
56
+
57
+ 對於以 `--locale zh-TW` 或 `--locale zh-CN` 安裝 UDS(或被 `LANG=zh_*` 偵測)的專案,本次 release 可能造成使用者可見的變化:
58
+
59
+ - **升級後請執行 `uds update`**。原本描述含中文的 skill,canonical 中的 `description:` 會變英文,繁中 `description:` + body 在 locale 變體中。`.claude/skills/{name}/SKILL.md` 會從 locale 變體自動重新安裝。
60
+ - **手動編輯過 canonical** 檔案(在 `.claude/skills/` 加繁中描述)的採用者,請將客製化內容調整至 locale 變體或 overlay — 詳見 `core/ai-instruction-standards.md` 的 `XSPEC-239` 遷移章節。
61
+ - 新的 `uds check --i18n` lint 可驗證專案乾淨:errors 阻擋,warnings(例如 `translation-drift-warn`)只進 dashboard 不預設 fail CI。
62
+
20
63
  ## [5.14.0] - 2026-05-27
21
64
 
22
65
  ### 新增
@@ -14,7 +14,7 @@ status: current
14
14
 
15
15
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
16
16
 
17
- **版本**: 5.14.0 | **發布日期**: 2026-05-26 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
17
+ **版本**: 5.16.0 | **發布日期**: 2026-05-28 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
18
 
19
19
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
20
20
 
@@ -13,7 +13,7 @@ status: current
13
13
  <!-- UDS_SUPPORTED_VERSIONS_START -->
14
14
  | 版本 | 支援狀態 |
15
15
  |------|--------|
16
- | 5.13.2 | ✅ 最新正式版 |
16
+ | 5.15.0 | ✅ 最新正式版 |
17
17
  | < 5.0.0 | ❌ 已終止支援 |
18
18
  <!-- UDS_SUPPORTED_VERSIONS_END -->
19
19
 
@@ -116,6 +116,52 @@ Coverage = (5 + 2×0.5) / 8 = 6/8 = 75%
116
116
 
117
117
  ---
118
118
 
119
+ ## 使用者文件覆蓋
120
+
121
+ 上方的 AC↔測試矩陣驗證 AC 是否被*測試*。第二個維度則驗證 **user-facing AC 是否同時被使用者指南記載**。這把可追溯主幹從測試延伸到使用者指南——見正向推演標準 →《終端投影:使用者指南》。使用者指南與 journey/E2E 套件是同一作業流程的兩個投影,因此共用一把尺:`T-NNN`。
122
+
123
+ ### User-Facing AC 篩選
124
+
125
+ 此維度**只套用於 user-facing AC**——終端使用者可直接觀察或操作者。如此可避免此維度退化成對每個內部 AC 的全面文件義務。
126
+
127
+ | AC 類型 | user-facing? |
128
+ |---------|--------------|
129
+ | UI 流程、畫面、導覽 | 是 |
130
+ | 使用者執行的 CLI 指令/旗標 | 是 |
131
+ | 對外 API 的使用者語意(使用者呼叫的公開契約)| 是 |
132
+ | 內部重構/模組契約 | 否 |
133
+ | 效能門檻、容量 | 否 |
134
+ | 安全內控、內部護欄 | 否 |
135
+
136
+ **保守預設**:判不準時一律歸 user-facing。排除某個 AC 必須**明確標記**(如 `user_facing: false`),絕不靜默省略。
137
+
138
+ ### 使用者文件狀態
139
+
140
+ 沿用相同符號,改回答「此 user-facing AC 是否被某個使用者指南步驟覆蓋?」:
141
+
142
+ | 狀態 | 符號 | 定義 |
143
+ |------|------|------|
144
+ | **已記載** | ✅ | 有使用者指南步驟覆蓋此 AC,並標上該 AC 共用的 `T-NNN` |
145
+ | **部分** | ⚠️ | 有使用者指南步驟但不完整或標記模稜兩可 |
146
+ | **未記載** | ❌ | 無任何使用者指南步驟引用此 user-facing AC |
147
+
148
+ `not_implemented`(🚫)AC 排除於使用者文件分母之外,與測試覆蓋率計算一致。
149
+
150
+ ### 使用者文件覆蓋率計算
151
+
152
+ ```
153
+ 使用者文件覆蓋率 % = (已記載 + 部分 × 0.5) / (user_facing_ac_count - not_implemented_count) × 100
154
+
155
+ 其中:
156
+ user_facing_ac_count = 歸類為 user-facing 的 AC 數(套用保守預設)
157
+ 非 user-facing AC 不計入分子也不計入分母
158
+ 部分計為 0.5
159
+ ```
160
+
161
+ > **同一把尺**:使用者指南步驟的 `T-NNN` 必須等於某個真實 journey/E2E 測試的 id(正向推演標準)。這把同一 AC 的三個投影——測試、journey、使用者指南——綁到單一主幹。自造平行 id 卻無對應測試的使用者指南步驟,一律報為**未記載**,絕不算覆蓋。
162
+
163
+ ---
164
+
119
165
  ## 品質門檻
120
166
 
121
167
  ### 預設門檻