universal-dev-standards 5.3.2 → 5.5.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.
- package/bundled/ai/standards/adversarial-test.ai.yaml +277 -0
- package/bundled/ai/standards/agent-communication-protocol.ai.yaml +32 -166
- package/bundled/ai/standards/agent-dispatch.ai.yaml +32 -58
- package/bundled/ai/standards/audit-trail.ai.yaml +113 -0
- package/bundled/ai/standards/branch-completion.ai.yaml +34 -70
- package/bundled/ai/standards/change-batching-standards.ai.yaml +31 -180
- package/bundled/ai/standards/chaos-injection-tests.ai.yaml +91 -0
- package/bundled/ai/standards/container-image-standards.ai.yaml +88 -0
- package/bundled/ai/standards/container-security.ai.yaml +331 -0
- package/bundled/ai/standards/cost-budget-test.ai.yaml +96 -0
- package/bundled/ai/standards/data-contract.ai.yaml +110 -0
- package/bundled/ai/standards/data-migration-testing.ai.yaml +96 -0
- package/bundled/ai/standards/data-pipeline.ai.yaml +113 -0
- package/bundled/ai/standards/disaster-recovery-drill.ai.yaml +89 -0
- package/bundled/ai/standards/execution-history.ai.yaml +30 -288
- package/bundled/ai/standards/flaky-test-management.ai.yaml +89 -0
- package/bundled/ai/standards/flow-based-testing.ai.yaml +240 -0
- package/bundled/ai/standards/iac-design-principles.ai.yaml +83 -0
- package/bundled/ai/standards/incident-response.ai.yaml +107 -0
- package/bundled/ai/standards/license-compliance.ai.yaml +106 -0
- package/bundled/ai/standards/llm-output-validation.ai.yaml +269 -0
- package/bundled/ai/standards/mock-boundary.ai.yaml +250 -0
- package/bundled/ai/standards/mutation-testing.ai.yaml +192 -0
- package/bundled/ai/standards/pii-classification.ai.yaml +109 -0
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +28 -169
- package/bundled/ai/standards/policy-as-code-testing.ai.yaml +227 -0
- package/bundled/ai/standards/prd-standards.ai.yaml +88 -0
- package/bundled/ai/standards/product-metrics-standards.ai.yaml +111 -0
- package/bundled/ai/standards/prompt-regression.ai.yaml +94 -0
- package/bundled/ai/standards/property-based-testing.ai.yaml +105 -0
- package/bundled/ai/standards/release-quality-manifest.ai.yaml +135 -0
- package/bundled/ai/standards/replay-test.ai.yaml +111 -0
- package/bundled/ai/standards/runbook.ai.yaml +104 -0
- package/bundled/ai/standards/sast-advanced.ai.yaml +135 -0
- package/bundled/ai/standards/schema-evolution.ai.yaml +111 -0
- package/bundled/ai/standards/secret-management-standards.ai.yaml +105 -0
- package/bundled/ai/standards/secure-op.ai.yaml +365 -0
- package/bundled/ai/standards/security-testing.ai.yaml +171 -0
- package/bundled/ai/standards/server-ops-security.ai.yaml +274 -0
- package/bundled/ai/standards/slo-sli.ai.yaml +97 -0
- package/bundled/ai/standards/smoke-test.ai.yaml +87 -0
- package/bundled/ai/standards/supply-chain-attestation.ai.yaml +109 -0
- package/bundled/ai/standards/test-completeness-dimensions.ai.yaml +52 -5
- package/bundled/ai/standards/user-story-mapping.ai.yaml +108 -0
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +34 -240
- package/bundled/ai/standards/workflow-state-protocol.ai.yaml +31 -107
- package/bundled/core/adversarial-test.md +212 -0
- package/bundled/core/chaos-injection-tests.md +116 -0
- package/bundled/core/container-security.md +521 -0
- package/bundled/core/cost-budget-test.md +69 -0
- package/bundled/core/data-migration-testing.md +110 -0
- package/bundled/core/disaster-recovery-drill.md +73 -0
- package/bundled/core/flaky-test-management.md +73 -0
- package/bundled/core/flow-based-testing.md +142 -0
- package/bundled/core/llm-output-validation.md +178 -0
- package/bundled/core/mock-boundary.md +100 -0
- package/bundled/core/mutation-testing.md +97 -0
- package/bundled/core/policy-as-code-testing.md +188 -0
- package/bundled/core/prompt-regression.md +72 -0
- package/bundled/core/property-based-testing.md +73 -0
- package/bundled/core/release-quality-manifest.md +147 -0
- package/bundled/core/replay-test.md +86 -0
- package/bundled/core/sast-advanced.md +300 -0
- package/bundled/core/secure-op.md +314 -0
- package/bundled/core/security-testing.md +87 -0
- package/bundled/core/server-ops-security.md +493 -0
- package/bundled/core/smoke-test.md +65 -0
- package/bundled/core/supply-chain-attestation.md +117 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +3 -3
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +5 -5
- package/bundled/locales/zh-TW/CHANGELOG.md +3 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +183 -79
- package/bundled/skills/README.md +4 -3
- package/bundled/skills/SKILL_NAMING.md +94 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +181 -88
- package/bundled/skills/atdd-assistant/SKILL.md +8 -0
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/checkin-assistant/SKILL.md +8 -0
- package/bundled/skills/code-review-assistant/SKILL.md +7 -0
- package/bundled/skills/journey-test-assistant/SKILL.md +203 -0
- package/bundled/skills/orchestrate/SKILL.md +167 -0
- package/bundled/skills/plan/SKILL.md +234 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +8 -0
- package/bundled/skills/push/SKILL.md +49 -2
- package/bundled/skills/{process-automation → skill-builder}/SKILL.md +1 -1
- package/bundled/skills/{forward-derivation → spec-derivation}/SKILL.md +1 -1
- package/bundled/skills/spec-driven-dev/SKILL.md +7 -0
- package/bundled/skills/sweep/SKILL.md +145 -0
- package/bundled/skills/tdd-assistant/SKILL.md +7 -0
- package/package.json +1 -1
- package/src/commands/flow.js +8 -0
- package/src/commands/start.js +14 -0
- package/src/commands/sweep.js +8 -0
- package/src/commands/workflow.js +8 -0
- package/standards-registry.json +474 -12
- package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +0 -190
- package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +0 -71
- package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +0 -130
- package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +0 -88
- package/bundled/locales/zh-CN/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-CN/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-CN/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-CN/skills/process-automation/SKILL.md +0 -143
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +0 -195
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +0 -178
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +0 -69
- package/bundled/locales/zh-TW/skills/forward-derivation/guide.md +0 -415
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +0 -86
- package/bundled/locales/zh-TW/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-TW/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-TW/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-TW/skills/process-automation/SKILL.md +0 -144
- /package/bundled/skills/{ac-coverage-assistant → ac-coverage}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/create-methodology.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/guide.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/integrated-flow.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/prerequisite-check.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/runtime.md +0 -0
- /package/bundled/skills/{forward-derivation → spec-derivation}/guide.md +0 -0
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
source: ../../../../skills/methodology-system/runtime.md
|
|
3
|
-
source_version: 1.0.0
|
|
4
|
-
translation_version: 1.0.0
|
|
5
|
-
last_synced: 2026-01-12
|
|
6
|
-
status: experimental
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# 方法論執行時引導
|
|
10
|
-
|
|
11
|
-
> **Language**: [English](../../../../skills/methodology-system/runtime.md) | 繁體中文
|
|
12
|
-
|
|
13
|
-
> [!WARNING]
|
|
14
|
-
> **實驗性功能 / Experimental Feature**
|
|
15
|
-
>
|
|
16
|
-
> 此功能正在積極開發中,可能在 v4.0 中有重大變更。
|
|
17
|
-
> This feature is under active development and may change significantly in v4.0.
|
|
18
|
-
|
|
19
|
-
**版本**: 1.0.0
|
|
20
|
-
**最後更新**: 2026-01-12
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## 概述
|
|
25
|
-
|
|
26
|
-
本文件定義當開發方法論啟用時,AI 助手應如何行為。提供階段追蹤、檢查點處理和用戶互動的引導。
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## AI 行為規格
|
|
31
|
-
|
|
32
|
-
### 1. 上下文感知
|
|
33
|
-
|
|
34
|
-
當方法論啟用時,AI 應該:
|
|
35
|
-
|
|
36
|
-
- **始終知道當前階段**
|
|
37
|
-
- **在回應中顯示階段指示器**
|
|
38
|
-
- **建議階段適當的行動**
|
|
39
|
-
|
|
40
|
-
#### 階段狀態顯示
|
|
41
|
-
|
|
42
|
-
在相關回應開頭包含方法論狀態:
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
┌────────────────────────────────────────────────┐
|
|
46
|
-
│ 📋 方法論: TDD │
|
|
47
|
-
│ 📍 階段: 🔴 紅燈(撰寫失敗的測試) │
|
|
48
|
-
│ ⏱️ 持續時間: 3 分鐘 │
|
|
49
|
-
└────────────────────────────────────────────────┘
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### 2. 主動引導
|
|
53
|
-
|
|
54
|
-
根據當前階段提供上下文適當的建議:
|
|
55
|
-
|
|
56
|
-
```markdown
|
|
57
|
-
**當前階段: 🔴 紅燈 (TDD)**
|
|
58
|
-
|
|
59
|
-
您正在為以下功能撰寫失敗的測試:用戶登入驗證
|
|
60
|
-
|
|
61
|
-
**下一步**:撰寫描述預期行為的測試。
|
|
62
|
-
|
|
63
|
-
您希望我:
|
|
64
|
-
1. 產生測試骨架
|
|
65
|
-
2. 展示此場景的 TDD 最佳實踐
|
|
66
|
-
3. 繼續您的手動方式
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### 3. 階段轉換偵測
|
|
70
|
-
|
|
71
|
-
監控表示階段轉換的條件:
|
|
72
|
-
|
|
73
|
-
| 訊號 | 轉換 |
|
|
74
|
-
|------|------|
|
|
75
|
-
| 測試執行失敗 | 紅燈 → 準備進入綠燈 |
|
|
76
|
-
| 所有測試通過 | 綠燈 → 準備重構 |
|
|
77
|
-
| 用戶確認重構完成 | 重構 → 下一個週期或完成 |
|
|
78
|
-
| 經過時間超過階段持續時間 | 顯示提醒 |
|
|
79
|
-
| 偵測到 Git 提交 | 重置階段計時器 |
|
|
80
|
-
|
|
81
|
-
### 4. 檢查點行為
|
|
82
|
-
|
|
83
|
-
當檢查點條件觸發時,顯示檢查點通知:
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
┌────────────────────────────────────────────────┐
|
|
87
|
-
│ 🔔 方法論檢查點 │
|
|
88
|
-
├────────────────────────────────────────────────┤
|
|
89
|
-
│ 綠燈階段完成 │
|
|
90
|
-
│ │
|
|
91
|
-
│ 檢查清單狀態: │
|
|
92
|
-
│ ✅ 撰寫最少程式碼 │
|
|
93
|
-
│ ✅ 測試通過 │
|
|
94
|
-
│ ✅ 所有其他測試通過 │
|
|
95
|
-
│ ⬜ (選填)考慮邊界情況 │
|
|
96
|
-
│ │
|
|
97
|
-
│ 變更統計: │
|
|
98
|
-
│ - 檔案: 3 │
|
|
99
|
-
│ - 新增: 45 行 │
|
|
100
|
-
│ - 刪除: 2 行 │
|
|
101
|
-
│ │
|
|
102
|
-
│ 建議提交: │
|
|
103
|
-
│ test(auth): 新增郵箱驗證測試 │
|
|
104
|
-
│ feat(auth): 實作郵箱驗證 │
|
|
105
|
-
│ │
|
|
106
|
-
│ 選項: │
|
|
107
|
-
│ [1] 立即提交(顯示 git 命令) │
|
|
108
|
-
│ [2] 繼續到重構階段 │
|
|
109
|
-
│ [3] 檢視詳細變更 │
|
|
110
|
-
└────────────────────────────────────────────────┘
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### 5. 跳過追蹤
|
|
114
|
-
|
|
115
|
-
追蹤連續跳過並適當警告:
|
|
116
|
-
|
|
117
|
-
| 跳過次數 | 行動 |
|
|
118
|
-
|----------|------|
|
|
119
|
-
| 1-2 | 無行動,記錄跳過 |
|
|
120
|
-
| 3 | 警告通知 |
|
|
121
|
-
| 4+ | 強烈警告,建議提交 |
|
|
122
|
-
|
|
123
|
-
#### 跳過警告顯示
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
┌────────────────────────────────────────────────┐
|
|
127
|
-
│ ⚠️ 跳過警告 │
|
|
128
|
-
├────────────────────────────────────────────────┤
|
|
129
|
-
│ 您已連續跳過簽入 3 次 │
|
|
130
|
-
│ │
|
|
131
|
-
│ 當前累積變更: │
|
|
132
|
-
│ - 檔案: 8 │
|
|
133
|
-
│ - 新增: 320 行 │
|
|
134
|
-
│ - 刪除: 45 行 │
|
|
135
|
-
│ │
|
|
136
|
-
│ 建議:立即提交您的變更以避免遺失工作並維持 │
|
|
137
|
-
│ 原子化提交。 │
|
|
138
|
-
│ │
|
|
139
|
-
│ [1] 立即提交 [2] 仍然跳過 [3] 檢視差異 │
|
|
140
|
-
└────────────────────────────────────────────────┘
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## 方法論偵測
|
|
146
|
-
|
|
147
|
-
### 自動偵測
|
|
148
|
-
|
|
149
|
-
AI 應從以下來源偵測方法論上下文:
|
|
150
|
-
|
|
151
|
-
1. **Manifest 配置**
|
|
152
|
-
```json
|
|
153
|
-
// .standards/manifest.json
|
|
154
|
-
{ "methodology": { "active": "tdd" } }
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
2. **關鍵字偵測**
|
|
158
|
-
- 「讓我們用 TDD 來做這個」
|
|
159
|
-
- 「先寫一個失敗的測試」
|
|
160
|
-
- 「Given-When-Then」
|
|
161
|
-
- 「為這個變更建立規格」
|
|
162
|
-
|
|
163
|
-
3. **命令調用**
|
|
164
|
-
- `/tdd`、`/bdd`、`/sdd`、`/atdd`
|
|
165
|
-
- `/methodology switch <id>`
|
|
166
|
-
|
|
167
|
-
### 載入方法論定義
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
方法論載入優先順序:
|
|
171
|
-
1. 自訂: .standards/methodologies/{id}.methodology.yaml
|
|
172
|
-
2. 內建: methodologies/{id}.methodology.yaml
|
|
173
|
-
3. 備用: 通用無階段工作流
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## 檢查清單管理
|
|
179
|
-
|
|
180
|
-
### 顯示格式
|
|
181
|
-
|
|
182
|
-
```markdown
|
|
183
|
-
### 階段檢查清單
|
|
184
|
-
|
|
185
|
-
**必須:**
|
|
186
|
-
- [ ] 測試描述預期行為
|
|
187
|
-
- [x] 測試名稱清晰
|
|
188
|
-
- [ ] 測試遵循 AAA 模式
|
|
189
|
-
|
|
190
|
-
**選填:**
|
|
191
|
-
- [ ] 考慮邊界情況
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### 追蹤
|
|
195
|
-
|
|
196
|
-
- 根據用戶行動和程式碼分析更新檢查清單項目
|
|
197
|
-
- 嚴格模式下,必填項目未完成則阻止階段轉換
|
|
198
|
-
- 記錄完成情況以供審計追蹤
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## 整合點
|
|
203
|
-
|
|
204
|
-
### 與 Git
|
|
205
|
-
|
|
206
|
-
- 偵測提交以重置階段計時器
|
|
207
|
-
- 根據方法論建議提交訊息
|
|
208
|
-
- 自動包含規格/故事參考
|
|
209
|
-
|
|
210
|
-
### 與測試執行器
|
|
211
|
-
|
|
212
|
-
- 偵測測試通過/失敗以觸發階段轉換
|
|
213
|
-
- 報告與當前階段相關的測試覆蓋率
|
|
214
|
-
|
|
215
|
-
### 與程式碼審查
|
|
216
|
-
|
|
217
|
-
- 添加方法論特定的審查檢查
|
|
218
|
-
- 在 PR 描述中參考啟用的方法論
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## 錯誤處理
|
|
223
|
-
|
|
224
|
-
### 找不到方法論
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
⚠️ 找不到方法論 'custom-workflow'。
|
|
228
|
-
|
|
229
|
-
可用的方法論:
|
|
230
|
-
- tdd(內建)
|
|
231
|
-
- bdd(內建)
|
|
232
|
-
- sdd(內建)
|
|
233
|
-
- atdd(內建)
|
|
234
|
-
|
|
235
|
-
使用 `/methodology list` 查看所有選項。
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### 無效的階段轉換
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
⚠️ 無法從紅燈轉換到重構。
|
|
242
|
-
|
|
243
|
-
TDD 要求:紅燈 → 綠燈 → 重構
|
|
244
|
-
|
|
245
|
-
當前階段:紅燈
|
|
246
|
-
有效的下一個階段:綠燈
|
|
247
|
-
|
|
248
|
-
請先完成紅燈階段的檢查清單。
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
## 效能考量
|
|
254
|
-
|
|
255
|
-
- 首次載入後快取方法論定義
|
|
256
|
-
- 僅在 manifest 變更時重新載入
|
|
257
|
-
- 最小化檢查點頻率以避免中斷
|
|
258
|
-
- 批次處理 git 狀態檢查
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## 本地化
|
|
263
|
-
|
|
264
|
-
所有面向用戶的文字應使用適當的語言欄位:
|
|
265
|
-
|
|
266
|
-
```yaml
|
|
267
|
-
# 如果用戶的地區設定是 zh-TW
|
|
268
|
-
name: nameZh || name
|
|
269
|
-
description: descriptionZh || description
|
|
270
|
-
prompt: promptZh || prompt
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
---
|
|
274
|
-
|
|
275
|
-
## 版本歷史
|
|
276
|
-
|
|
277
|
-
| 版本 | 日期 | 變更 |
|
|
278
|
-
|------|------|------|
|
|
279
|
-
| 1.0.0 | 2026-01-12 | 初始執行時規格 |
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: process-automation
|
|
3
|
-
source: ../../../../skills/process-automation/SKILL.md
|
|
4
|
-
source_version: 1.0.0
|
|
5
|
-
translation_version: 1.0.0
|
|
6
|
-
last_synced: 2026-04-10
|
|
7
|
-
status: current
|
|
8
|
-
description: "[UDS] 識別重複流程並以正確開發深度建立 Skill"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# 流程轉化 Skill 助手
|
|
12
|
-
|
|
13
|
-
> **語言**: [English](../../../../skills/process-automation/SKILL.md) | 繁體中文
|
|
14
|
-
|
|
15
|
-
從「我一直在手動做這件事」引導你建立一個合適的 Skill,並在過程中採用恰當深度的開發流程。
|
|
16
|
-
|
|
17
|
-
## 使用時機
|
|
18
|
-
|
|
19
|
-
- 你已手動執行同一組多步驟流程 ≥ 3 次
|
|
20
|
-
- 隊友第 3 次問「我們怎麼做 X?」
|
|
21
|
-
- 你臨時建了一個 Skill,想要正式化它
|
|
22
|
-
|
|
23
|
-
## 核心原則
|
|
24
|
-
|
|
25
|
-
> **Skill 記錄流程知識。Memory 記錄歷史事實。**
|
|
26
|
-
> 當你發現自己在重複執行相同步驟時,那就是 Skill 候選。
|
|
27
|
-
|
|
28
|
-
## 決策樹
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
需要新 Skill?
|
|
32
|
-
├── 修改現有 Skill?
|
|
33
|
-
│ → Delta 路徑:在現有 SKILL.md 末尾附加 ## MODIFIED / ## ADDED
|
|
34
|
-
│ 更新 version 欄位 → 完成
|
|
35
|
-
│
|
|
36
|
-
├── 回答這 4 個問題(任何一個「是」→ Complex):
|
|
37
|
-
│ 1. 超過 7 個步驟?
|
|
38
|
-
│ 2. 步驟之間有分支邏輯(if/else)?
|
|
39
|
-
│ 3. 需要來自 3 個以上獨立標準/決策的知識?
|
|
40
|
-
│ 4. 輸出直接影響子專案的原始碼?
|
|
41
|
-
│
|
|
42
|
-
├── 全部「否」→ Simple 路徑
|
|
43
|
-
│ → 填寫 Skill Brief(templates/SKILL-BRIEF-TEMPLATE.md)
|
|
44
|
-
│ → 直接建立 SKILL.md(不需要 XSPEC)
|
|
45
|
-
│
|
|
46
|
-
└── 任何「是」→ Complex 路徑
|
|
47
|
-
→ 先建立 XSPEC → 執行 /sdd
|
|
48
|
-
→ XSPEC 核准後回到這裡
|
|
49
|
-
|
|
50
|
-
廢棄 Skill?
|
|
51
|
-
→ 在 SKILL.md frontmatter 加入:
|
|
52
|
-
status: deprecated
|
|
53
|
-
deprecated_at: YYYY-MM-DD
|
|
54
|
-
deprecated_reason: "..."
|
|
55
|
-
superseded_by: "/new-skill" (如有適用)
|
|
56
|
-
→ 在 SKILL-CANDIDATES.md 中標記為已歸檔
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## 放置位置決策
|
|
60
|
-
|
|
61
|
-
建立 SKILL.md 前,先決定它應放在哪裡:
|
|
62
|
-
|
|
63
|
-
| 條件 | 放置位置 |
|
|
64
|
-
|------|----------|
|
|
65
|
-
| 步驟引用專案特定路徑(如 TECH-RADAR.md、DEC-*.md) | 專案:`{project}/.claude/skills/` |
|
|
66
|
-
| 步驟通用(無專案特定路徑) | UDS:`skills/{name}/` + zh-TW 語系 |
|
|
67
|
-
|
|
68
|
-
## 工作流程
|
|
69
|
-
|
|
70
|
-
### 步驟 1 — 描述流程
|
|
71
|
-
|
|
72
|
-
記錄重複的步驟序列:
|
|
73
|
-
- 哪些步驟?按什麼順序?
|
|
74
|
-
- 目前已手動執行幾次?
|
|
75
|
-
- 會觸碰哪些工具或檔案?
|
|
76
|
-
|
|
77
|
-
### 步驟 2 — 更新 SKILL-CANDIDATES.md
|
|
78
|
-
|
|
79
|
-
開啟你專案的 `SKILL-CANDIDATES.md`(第一次使用時從 `templates/SKILL-CANDIDATES.md` 複製):
|
|
80
|
-
- 尚未記錄 → 新增一行,填入目前次數
|
|
81
|
-
- 已記錄 → 更新次數
|
|
82
|
-
- 次數達 3 → 標記觸發 ✅,繼續進行
|
|
83
|
-
|
|
84
|
-
### 步驟 3 — 選擇路徑(Simple / Complex / Delta)
|
|
85
|
-
|
|
86
|
-
回答 4 個判斷問題,決定:Simple、Complex 或 Delta。
|
|
87
|
-
|
|
88
|
-
### 步驟 4a — Simple:填寫 Skill Brief
|
|
89
|
-
|
|
90
|
-
使用 `templates/SKILL-BRIEF-TEMPLATE.md`:
|
|
91
|
-
- 觸發情境(什麼時候會用這個?)
|
|
92
|
-
- 核心步驟(3~7 個,有序)
|
|
93
|
-
- 驗收條件(2~3 條)
|
|
94
|
-
- 不涵蓋的部分(明確邊界)
|
|
95
|
-
|
|
96
|
-
### 步驟 4b — Complex:建立 XSPEC
|
|
97
|
-
|
|
98
|
-
執行 `/sdd` 建立 XSPEC。XSPEC 核准後回到步驟 5。
|
|
99
|
-
|
|
100
|
-
### 步驟 4c — Delta:識別變更範圍
|
|
101
|
-
|
|
102
|
-
識別現有 SKILL.md 中哪些區段需要變更。
|
|
103
|
-
在末尾加入 `## MODIFIED Requirements` 或 `## ADDED Requirements`。
|
|
104
|
-
|
|
105
|
-
### 步驟 5 — 建立 / 更新 SKILL.md
|
|
106
|
-
|
|
107
|
-
從 Brief 或 XSPEC 產生 SKILL.md:
|
|
108
|
-
- 驗證 frontmatter:`name`、`scope`、`description`、`allowed-tools`
|
|
109
|
-
- UDS Skill:同時建立 zh-TW 語系版本
|
|
110
|
-
- 專案 Skill:放置於 `{project}/.claude/skills/{name}/SKILL.md`
|
|
111
|
-
|
|
112
|
-
### 步驟 6 — 更新 SKILL-CANDIDATES.md
|
|
113
|
-
|
|
114
|
-
標記候選行:觸發 ✅,Skill 欄位填入名稱。
|
|
115
|
-
|
|
116
|
-
### 步驟 7 — Commit
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
feat(skills): Add /{skill-name} skill. 新增 /{skill-name} Skill。
|
|
120
|
-
|
|
121
|
-
{English description, 1-2 lines}
|
|
122
|
-
|
|
123
|
-
{Chinese description, 1-2 lines}
|
|
124
|
-
|
|
125
|
-
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## 輸出檢查清單
|
|
129
|
-
|
|
130
|
-
完成所有步驟後,驗證:
|
|
131
|
-
|
|
132
|
-
- [ ] `SKILL-CANDIDATES.md` 已更新(觸發 ✅,Skill 名稱已填入)
|
|
133
|
-
- [ ] `SKILL.md` 已建立,含完整 frontmatter(`name`/`scope`/`description`/`allowed-tools`)
|
|
134
|
-
- [ ] Simple 路徑:Skill Brief 已被引用或保存
|
|
135
|
-
- [ ] Complex 路徑:XSPEC ID 已在 SKILL.md 標頭注釋中標註
|
|
136
|
-
- [ ] UDS Skill:zh-TW 語系檔案已建立
|
|
137
|
-
- [ ] 廢棄:frontmatter 中含 `status: deprecated`
|
|
138
|
-
- [ ] git commit 已完成
|
|
139
|
-
|
|
140
|
-
## 參考
|
|
141
|
-
|
|
142
|
-
- Skill Brief 模板:[templates/SKILL-BRIEF-TEMPLATE.md](../../../../templates/SKILL-BRIEF-TEMPLATE.md)
|
|
143
|
-
- 候選追蹤:[templates/SKILL-CANDIDATES.md](../../../../templates/SKILL-CANDIDATES.md)(複製到你的專案)
|
|
144
|
-
- ADR 標準:[core/adr-standards.md](../../../../core/adr-standards.md)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|