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
@@ -0,0 +1,242 @@
1
+ ---
2
+ name: push
3
+ source: ../../../../skills/push/SKILL.md
4
+ source_version: 2.0.0
5
+ translation_version: 2.0.0
6
+ last_synced: 2026-06-02
7
+ source_hash: b7812535483c
8
+ scope: universal
9
+ description: |
10
+ [UDS] AI 輔助 git push 安全層:品質閘門 + 協作護欄。
11
+ Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches.
12
+ Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保護分支, 品質閘門.
13
+ allowed-tools: Read, Bash(git:*), Bash(npm:*), Bash(pnpm:*), Bash(yarn:*), Bash(bun:*)
14
+ argument-hint: "[--force] [--target <branch>] [--skip-gates] [--no-pr]"
15
+ ---
16
+
17
+ # 推送助手
18
+
19
+ > **語言**: [English](../../../../skills/push/SKILL.md) | 繁體中文
20
+
21
+ **版本**:2.0.0
22
+ **建立日期**:2026-04-23
23
+ **適用範圍**:Claude Code Skills
24
+
25
+ ---
26
+
27
+ `git push` 的 AI 輔助安全層。偵測保護分支、強制 force-push 護欄、執行 pre-push 品質閘門、輸出結構化推送收據,並整合 PR 自動化。
28
+
29
+ ## 核心標準
30
+
31
+ 本 Skill 實作 [`.standards/push-standards.ai.yaml`](../../../../.standards/push-standards.ai.yaml)。
32
+
33
+ ---
34
+
35
+ ## 執行工作流程
36
+
37
+ 呼叫 `/push` 後,Claude 原生依序執行以下步驟:
38
+
39
+ ### Step 1:偵測保護分支
40
+ 執行 `git rev-parse --abbrev-ref HEAD` 取得目前分支。
41
+ 比對 `protected_branches` 清單(預設:main、master、release/*、hotfix/*)。
42
+ 若為保護分支:顯示警告 + 待推送的 commit 列表,需使用者明確確認才能繼續。
43
+
44
+ ### Step 2:偵測 Force Push
45
+ 若偵測到 `--force` 或 `--force-with-lease`:
46
+ 執行 `git log origin/<branch>..HEAD --oneline` 找出將被覆蓋的 commits。
47
+ 顯示數量與作者列表。需要使用者輸入 `yes, force push` 才能繼續。
48
+
49
+ ### Step 3:執行 Pre-Push 品質閘門
50
+ 依序使用 Bash tool 執行每個已設定的閘門:
51
+ - `lint`:偵測並執行專案 lint 指令
52
+ - `test`:偵測並執行專案測試指令
53
+ - `type-check`(選用):TypeScript 型別檢查
54
+ - `ac-coverage`(選用):驗收條件覆蓋率
55
+ - `security-scan`(選用):安全漏洞掃描
56
+
57
+ 若任何必要閘門失敗:中止並顯示錯誤訊息。
58
+
59
+ ### Step 4:執行推送
60
+ 執行 `git push <remote> <branch> [--force]`。
61
+ 若推送失敗:顯示 git 錯誤並建議修正方式。
62
+
63
+ ### Step 5:發出推送收據
64
+ 將結構化收據輸出到 console(可選擇寫入 `~/.uds/push-history.jsonl`):
65
+ ```json
66
+ {
67
+ "branch": "<branch>",
68
+ "commit_sha": "<sha>",
69
+ "gates_passed": ["lint", "test"],
70
+ "force_push": false,
71
+ "timestamp": "<ISO8601>",
72
+ "target_remote": "origin"
73
+ }
74
+ ```
75
+
76
+ ### Step 6:PR 整合
77
+ 若 `auto_pr=true` **且** `repo_mode=team` **且**該分支無 open PR:
78
+ 建議使用者執行 `/pr-automation-assistant` 建立 Pull Request。
79
+
80
+ ---
81
+
82
+ ## 功能說明
83
+
84
+ ### 1. 推送目標風險偵測
85
+
86
+ 推送前偵測目標分支是否為保護分支(例如 `main`、`master`、`release/*`、`hotfix/*`)。
87
+
88
+ - 顯示**警告**,列出分支名稱與 commit 清單
89
+ - 需要使用者明確確認才能繼續
90
+ - 使用者未確認則中止推送
91
+
92
+ ### 2. Force-Push 護欄
93
+
94
+ 偵測到 `--force` 時,推送前顯示影響範圍。
95
+
96
+ - 計算遠端將被覆蓋的 commits
97
+ - 顯示被覆蓋 commits 的數量與作者
98
+ - 要求使用者輸入確認字串(`yes, force push`)
99
+ - 在推送收據中記錄 `force_push: true`
100
+
101
+ ### 3. Pre-Push 品質閘門
102
+
103
+ 推送前依序執行已設定的品質閘門。
104
+
105
+ | 閘門 | 說明 |
106
+ |------|------|
107
+ | `lint` | 執行 lint 檢查 |
108
+ | `test` | 執行測試 |
109
+ | `type-check` | TypeScript 型別檢查(選用) |
110
+ | `ac-coverage` | AC 覆蓋率檢查(選用) |
111
+ | `security-scan` | 安全掃描(選用) |
112
+
113
+ ### 4. 推送收據
114
+
115
+ 推送成功後輸出結構化收據,供稽核追蹤使用。
116
+
117
+ ```json
118
+ {
119
+ "branch": "feature/my-feature",
120
+ "commit_sha": "a1b2c3d",
121
+ "gates_passed": ["lint", "test"],
122
+ "gates_skipped": false,
123
+ "force_push": false,
124
+ "timestamp": "2026-04-23T10:00:00Z",
125
+ "target_remote": "origin"
126
+ }
127
+ ```
128
+
129
+ 可選擇附加到 `~/.uds/push-history.jsonl` 以持久化稽核追蹤。
130
+
131
+ ### 5. PR 自動化整合入口
132
+
133
+ 推送 feature branch 後,若尚無 PR,提示使用者建立 Pull Request。
134
+
135
+ - 檢查該分支是否已有 open PR
136
+ - 提示使用者執行 `pr-automation-assistant`
137
+ - 在 `single-owner` repo 模式或使用 `--no-pr` 旗標時跳過
138
+
139
+ ---
140
+
141
+ ## 使用方式
142
+
143
+ ```bash
144
+ # 標準推送(自動執行品質閘門)
145
+ /push
146
+
147
+ # Force push(顯示被覆蓋 commits,需要確認)
148
+ /push --force
149
+
150
+ # 推送到指定的遠端分支
151
+ /push --target main
152
+
153
+ # 跳過品質閘門(緊急情況)
154
+ /push --skip-gates
155
+
156
+ # 推送但不提示建立 PR
157
+ /push --no-pr
158
+
159
+ # Force push 且不提示建立 PR(例如更新個人分支)
160
+ /push --force --no-pr
161
+ ```
162
+
163
+ ## 參數說明
164
+
165
+ | 參數 | 說明 |
166
+ |------|------|
167
+ | `--force` | 啟用 force push,含護欄確認 |
168
+ | `--target <branch>` | 明確指定目標遠端分支 |
169
+ | `--skip-gates` | 跳過品質閘門(僅緊急情況) |
170
+ | `--no-pr` | 推送後不提示建立 PR |
171
+
172
+ ---
173
+
174
+ ## 設定
175
+
176
+ 透過 `uds.project.yaml` 設定:
177
+
178
+ ```yaml
179
+ push:
180
+ repo_mode: team # "team" | "single-owner"
181
+ protected_branches:
182
+ - main
183
+ - master
184
+ - "release/*"
185
+ - "hotfix/*"
186
+ push_gates:
187
+ default:
188
+ - lint
189
+ - test
190
+ optional:
191
+ - type-check
192
+ - ac-coverage
193
+ - security-scan
194
+ receipt:
195
+ output: console # "console" | "file" | "both"
196
+ file_path: "~/.uds/push-history.jsonl"
197
+ auto_pr: true # 推送到非保護分支後是否提示建立 PR
198
+ ```
199
+
200
+ ### 選項模式
201
+
202
+ | Option 檔案 | 模式 | 說明 |
203
+ |-------------|------|------|
204
+ | [`options/push/team-mode.md`](../../../../options/push/team-mode.md) | `team` | 完整協作護欄(預設) |
205
+ | [`options/push/single-owner-mode.md`](../../../../options/push/single-owner-mode.md) | `single-owner` | 個人 repo 低摩擦模式 |
206
+
207
+ ---
208
+
209
+ ## 下一步引導
210
+
211
+ `/push` 完成後,AI 助手應建議:
212
+
213
+ > **推送完成。建議下一步:**
214
+ > - 執行 `/pr-automation-assistant` 建立或更新 Pull Request ⭐ **推薦** — 確保協作流程完整
215
+ > - 執行 `/checkin` 確認程式碼簽入品質 — 下次提交前的品質確認
216
+ > - 查看 `~/.uds/push-history.jsonl` 確認推送紀錄 — 稽核追蹤
217
+
218
+ ---
219
+
220
+ ## 相關標準
221
+
222
+ - [Push Standards](../../../../.standards/push-standards.ai.yaml) — 核心推送安全規則
223
+ - [Git Workflow](../../../../.standards/git-workflow.ai.yaml) — 分支策略
224
+ - [Commit Message](../../../../.standards/commit-message.ai.yaml) — Commit 慣例
225
+ - [PR Automation](../pr-automation-assistant/SKILL.md) — Pull Request 自動化
226
+
227
+ ---
228
+
229
+ ## 版本歷程
230
+
231
+ | 版本 | 日期 | 變更 |
232
+ |------|------|------|
233
+ | 2.0.0 | 2026-04-28 | 還原 workflow 執行步驟(XSPEC-097 採用層解耦);移除棄用通知 |
234
+ | 1.0.0 | 2026-04-23 | 初始版本 — XSPEC-081 Phase 1 |
235
+
236
+ ---
237
+
238
+ ## 授權
239
+
240
+ 本 Skill 採用 [MIT License](https://opensource.org/licenses/MIT) 與 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) 雙重授權發布。
241
+
242
+ **來源**:[universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards)
@@ -2,17 +2,61 @@
2
2
  name: retrospective-assistant
3
3
  source: ../../../../skills/retrospective-assistant/SKILL.md
4
4
  source_version: 1.0.0
5
+ source_hash: 9c883f05ad7b
5
6
  translation_version: 1.0.0
6
- last_synced: 2026-03-26
7
+ last_synced: 2026-06-01
7
8
  status: current
8
- description: "[UDS] 引導結構化的團隊回顧,支援 Sprint Release 回顧"
9
+ description: "[UDS] 引導 Sprint Release 週期的結構化團隊回顧"
9
10
  ---
10
11
 
11
12
  # 回顧助手
12
13
 
13
14
  > **語言**: [English](../../../../skills/retrospective-assistant/SKILL.md) | 繁體中文
14
15
 
15
- 引導結構化的團隊回顧,識別改善機會並追蹤行動項目。
16
+ 引導結構化的團隊回顧,識別改善機會並追蹤行動項目。支援 Sprint 和 Release 回顧類型,提供多種引導技法。
17
+
18
+ ## 工作流程
19
+
20
+ ```
21
+ PREPARE ──► GATHER ──► ANALYZE ──► DECIDE ──► TRACK
22
+ 準備資料 蒐集意見 分析歸納 決定行動 追蹤落實
23
+ ```
24
+
25
+ ### 階段 1:PREPARE(準備)
26
+
27
+ 從 git log、指標和 issue tracker 蒐集數據作為討論基礎。
28
+
29
+ ### 階段 2:GATHER(蒐集)
30
+
31
+ 使用結構化技法蒐集團隊觀點。
32
+
33
+ ### 階段 3:ANALYZE(分析)
34
+
35
+ 分組歸納並識別模式。
36
+
37
+ ### 階段 4:DECIDE(決定)
38
+
39
+ 選出前 1-3 項改善作為行動項目。
40
+
41
+ ### 階段 5:TRACK(追蹤)
42
+
43
+ 檢視過去的行動項目並追蹤新項目。
44
+
45
+ ## 回顧類型
46
+
47
+ | 類型 | 時機 | 時長 | 焦點 |
48
+ |------|------|------|------|
49
+ | **Sprint** | 迭代結束 | 30-60 分鐘 | 流程、協作、工具 |
50
+ | **Release** | 發布之後 | 60-90 分鐘 | 品質、指標、跨團隊 |
51
+
52
+ ## 引導技法
53
+
54
+ | 技法 | 適用場景 | 結構 |
55
+ |------|---------|------|
56
+ | **Start-Stop-Continue** | 快速、預設 | 開始 / 停止 / 繼續 |
57
+ | **Starfish** | 細緻分析 | 更多 / 保持 / 減少 / 開始 / 停止 |
58
+ | **4Ls** | 團隊建立 | 喜歡 / 學到 / 缺少 / 渴望 |
59
+ | **Sailboat** | 視覺化、創意 | 風 / 錨 / 礁石 / 島嶼 |
16
60
 
17
61
  ## 指令
18
62
 
@@ -24,21 +68,43 @@ description: "[UDS] 引導結構化的團隊回顧,支援 Sprint 和 Release
24
68
  | `/retrospective actions` | 列出未完成行動項目 |
25
69
  | `/retrospective --technique starfish` | 使用指定技法 |
26
70
 
27
- ## 參考
71
+ ## 行動項目格式
28
72
 
29
- - 核心規範:[retrospective-standards.md](../../../../core/retrospective-standards.md)
30
- - 詳細指南:[guide.md](./guide.md)
73
+ | 欄位 | 說明 |
74
+ |------|------|
75
+ | **Action** | 具體描述 |
76
+ | **Owner** | 單一負責人 |
77
+ | **Due Date** | 預計完成日 |
78
+ | **Status** | Open → In Progress → Done |
31
79
 
80
+ ### 追蹤規則
32
81
 
33
- ## Next Steps Guidance | 下一步引導
82
+ 1. 每次回顧**開始**先檢視未完成項目
83
+ 2. 每次回顧最多 **3 項**行動項目
84
+ 3. 陳舊項目(超過 2 個循環未完成)須重新評估
85
+ 4. 每項須有**單一負責人**
34
86
 
35
- After `/retrospective` completes:
87
+ ## 存放
36
88
 
37
- > **Retrospective complete. Suggested next steps:**
38
- > - Commit the retrospective report: `/commit`
39
- > - Create ADRs for architectural decisions identified: `/adr`
40
- > - Track action items in your issue tracker
41
- > - Schedule next retrospective
89
+ ```
90
+ docs/retrospectives/
91
+ ├── RETRO-2026-03-15-sprint-12.md
92
+ ├── RETRO-2026-03-26-release-v5.1.0.md
93
+ └── README.md # 索引(選用)
94
+ ```
95
+
96
+ ## 與其他技能的整合
97
+
98
+ | 技能 | 整合方式 |
99
+ |------|---------|
100
+ | `/metrics` | 將指標數據引入 Release 回顧 |
101
+ | `/incident` | 事故後建議進行團隊回顧 |
102
+ | `/adr` | 識別架構問題時建議建立 ADR |
103
+ | `/commit` | 以 `docs(retro):` 提交回顧報告 |
104
+
105
+ ## 下一步引導
106
+
107
+ `/retrospective` 完成後:
42
108
 
43
109
  > **回顧完成。建議下一步:**
44
110
  > - 提交回顧報告:`/commit`
@@ -46,23 +112,23 @@ After `/retrospective` completes:
46
112
  > - 在 issue tracker 中追蹤行動項目
47
113
  > - 排定下次回顧
48
114
 
49
- ## AI Agent Behavior | AI 代理行為
115
+ ## AI 代理行為
50
116
 
51
- When `/retrospective` is invoked:
117
+ 當呼叫 `/retrospective` 時:
52
118
 
53
- 1. **Check type** — Sprint (default) or Release
54
- 2. **Gather data** Scan git log, check `docs/retrospectives/` for previous actions
55
- 3. **Guide technique** Use Start-Stop-Continue by default, or specified technique
56
- 4. **Generate report** Write to `docs/retrospectives/RETRO-YYYY-MM-DD-[type].md`
57
- 5. **Review past actions** Check previous retro for open action items
58
- 6. **Offer next steps** Show guidance above
119
+ 1. **確認類型** — Sprint(預設)或 Release
120
+ 2. **蒐集數據**掃描 git log,檢查 `docs/retrospectives/` 中過去的行動項目
121
+ 3. **引導技法**預設使用 Start-Stop-Continue,或使用指定技法
122
+ 4. **產生報告**寫入 `docs/retrospectives/RETRO-YYYY-MM-DD-[type].md`
123
+ 5. **檢視過去項目**檢查先前回顧中未完成的行動項目
124
+ 6. **提供下一步**顯示上方引導
59
125
 
60
- When `/retrospective actions` is invoked:
61
- 1. Scan `docs/retrospectives/` for all retro files
62
- 2. Parse action items from each
63
- 3. Display open/in-progress items as table
126
+ 當呼叫 `/retrospective actions` 時:
127
+ 1. 掃描 `docs/retrospectives/` 中所有回顧檔案
128
+ 2. 解析各檔案中的行動項目
129
+ 3. 以表格顯示未完成/進行中的項目
64
130
 
65
- ## Reference | 參考
131
+ ## 參考
66
132
 
67
- - Core Standard: [retrospective-standards.md](../../core/retrospective-standards.md)
68
- - Detailed Guide: [guide.md](./guide.md)
133
+ - 核心規範:[retrospective-standards.md](../../core/retrospective-standards.md)
134
+ - 詳細指南:[guide.md](./guide.md)
@@ -2,48 +2,94 @@
2
2
  name: reverse-engineer
3
3
  source: ../../../../skills/reverse-engineer/SKILL.md
4
4
  source_version: 1.2.0
5
+ source_hash: d543b24b2422
5
6
  translation_version: 1.2.0
6
- last_synced: 2026-02-10
7
+ last_synced: 2026-06-01
7
8
  status: current
8
- description: "[UDS] 將現有程式碼反向工程為規格文件、BDD 場景或 TDD 覆蓋率報告"
9
+ description: "[UDS] 系統考古——跨邏輯、資料、執行環境三維度反向工程程式碼"
9
10
  ---
10
11
 
11
12
  # 反向工程助手
12
13
 
13
14
  > **語言**: [English](../../../../skills/reverse-engineer/SKILL.md) | 繁體中文
14
15
 
15
- 將現有程式碼反向工程為規格文件、BDD 場景或 TDD 覆蓋率報告。
16
+ 系統考古框架:從三個維度反向工程既有系統——**邏輯**、**資料**、**執行環境**。
17
+
18
+ ## 三大維度
19
+
20
+ ```
21
+ ┌─────────────────────────────────────────────────────────┐
22
+ │ System Archeology Framework │
23
+ ├──────────┬──────────────┬────────────────────────────────┤
24
+ │ Logic │ Data │ Runtime │
25
+ │ (spec) │ (data) │ (runtime) │
26
+ ├──────────┼──────────────┼────────────────────────────────┤
27
+ │ APIs │ DB Schemas │ Logs & Error Patterns │
28
+ │ Modules │ ORMs/Models │ Config & Environment │
29
+ │ Flows │ Migrations │ Metrics & Performance │
30
+ │ Tests │ Seed Data │ Infra & Deployment │
31
+ └──────────┴──────────────┴────────────────────────────────┘
32
+ ```
16
33
 
17
34
  ## 子命令
18
35
 
19
- | 子命令 | 輸入 | 輸出 | 說明 |
20
- |--------|------|------|------|
21
- | `spec` | 程式碼檔案/目錄 | `SPEC-XXX.md` | 從程式碼提取規格 |
22
- | `bdd` | `SPEC-XXX.md` | `.feature` | 將 AC 轉為 Gherkin |
23
- | `tdd` | `.feature` | 覆蓋率報告 | 分析測試覆蓋率 |
36
+ | 子命令 | 維度 | 輸入 | 輸出 | 說明 |
37
+ |--------|------|------|------|------|
38
+ | *(無)* | 全部 | 專案根目錄 | 完整考古報告 | 三維度全面分析 |
39
+ | `spec` | 邏輯 | 程式碼檔案/目錄 | `SPEC-XXX.md` | 從程式碼提取規格 |
40
+ | `data` | 資料 | DB 結構、ORM、遷移檔 | 資料模型規格 | 分析資料模型與結構 |
41
+ | `runtime` | 執行環境 | 日誌、設定、指標 | 執行環境基準 | 分析執行環境基準 |
42
+ | `bdd` | — | `SPEC-XXX.md` | `.feature` | 將 AC 轉為 Gherkin |
43
+ | `tdd` | — | `.feature` | 覆蓋率報告 | 分析測試覆蓋率 |
44
+
45
+ ## 全面分析模式
46
+
47
+ 當 `/reverse` 在未帶子命令的情況下被呼叫時,依序執行全部三個維度:
48
+
49
+ 1. **資料(Data)** → 掃描結構、ORM、遷移檔
50
+ 2. **執行環境(Runtime)** → 分析日誌、設定、部署
51
+ 3. **邏輯(Logic / spec)** → 提取 API、流程、測試 → 產生 SPEC
52
+
53
+ 輸出:整合三個維度的 **系統考古報告(System Archeology Report)**。
24
54
 
25
- ## 工作流程
55
+ ## 維度詳情
26
56
 
27
- ### spec:程式碼轉規格
57
+ ### spec:邏輯維度(既有)
28
58
 
29
- 1. **掃描** - 讀取原始碼檔案,識別公開 API、資料流和業務邏輯
59
+ 1. **掃描** - 讀取原始碼檔案,識別公開 API、資料流與業務邏輯
30
60
  2. **分類** - 將每個發現標記為 `[Confirmed]`、`[Inferred]` 或 `[Unknown]`
31
61
  3. **結構化** - 整理為 SDD 規格格式,包含驗收條件
32
- 4. **引用來源** - 每個反向結果皆引用 `file:line` 來源參考
62
+ 4. **引用來源** - 每項反向結果皆以 `file:line` 引用來源
33
63
 
34
- ### bdd:規格轉 Gherkin
64
+ ### data:資料維度(新增)
35
65
 
36
- 1. **解析** - 讀取 SPEC-XXX.md 並提取驗收條件
37
- 2. **轉換** - 將每個 AC 對應為一個 Gherkin Scenario(1:1 對應)
38
- 3. **標記** - 加入 `@SPEC-XXX` `@AC-N` 標籤以確保可追溯性
39
- 4. **輸出** - 產生 `.feature` 檔案,包含 `# [Source: path:AC-N]` 註解
66
+ 1. **探索** - 找出資料庫結構、ORM 模型、遷移檔、種子資料
67
+ 2. **對應** - 從程式碼證據建立實體關聯模型
68
+ 3. **分類** - 將關聯標記為 `[Confirmed]`(FK 約束)或 `[Inferred]`(程式碼模式)
69
+ 4. **報告** - 輸出資料模型規格,包含:
70
+ - 含欄位與型別的實體清單
71
+ - 關聯對應(1:1、1:N、M:N)
72
+ - 索引與約束清單
73
+ - 遷移歷史摘要
74
+ - 資料流路徑(寫入 → 讀取)
40
75
 
41
- ### tdd:Feature 轉覆蓋率報告
76
+ **證據來源**:`schema.prisma`、`*.migration.*`、`models/`、`entities/`、`knexfile.*`、`sequelize`、`typeorm`、SQL 檔案、`docker-compose.yml`(DB 服務)
42
77
 
43
- 1. **解析** - 讀取 `.feature` 檔案中的場景
44
- 2. **搜尋** - 使用 Grep/Glob 尋找對應的測試檔案
45
- 3. **對應** - 將場景與現有單元測試進行配對
46
- 4. **報告** - 輸出覆蓋率矩陣(已覆蓋 / 缺失 / 部分覆蓋)
78
+ ### runtime:執行環境維度(新增)
79
+
80
+ 1. **掃描設定** - 環境變數、設定檔、功能旗標
81
+ 2. **分析日誌** - 日誌模式、錯誤頻率、日誌層級
82
+ 3. **檢查基礎設施** - Docker 設定、CI/CD 管線、部署清單
83
+ 4. **建立基準** - 輸出執行環境基準,包含:
84
+ - 環境變數清單(僅名稱,**絕不含值/密鑰**)
85
+ - 設定檔對應與階層
86
+ - 外部服務依賴(API、佇列、快取)
87
+ - 部署拓撲(容器、服務)
88
+ - 健康檢查與監控端點
89
+
90
+ **證據來源**:`.env.example`、`docker-compose.yml`、`Dockerfile`、`*.config.*`、CI/CD 檔案、`k8s/`、日誌檔案(僅模式)
91
+
92
+ **安全性**:絕不輸出實際密鑰值。僅列出變數名稱並描述其用途。
47
93
 
48
94
  ## 防幻覺規則
49
95
 
@@ -52,23 +98,33 @@ description: "[UDS] 將現有程式碼反向工程為規格文件、BDD 場景
52
98
  | **確定性標籤** | 所有發現須使用 `[Confirmed]`、`[Inferred]`、`[Unknown]` 標注 |
53
99
  | **來源引用** | 每項反向結果須引用 `file:line` 來源 |
54
100
  | **禁止捏造** | 不得捏造程式碼中不存在的 API 或行為 |
101
+ | **禁止密鑰** | 不得輸出設定檔或環境變數的密鑰值 |
55
102
 
56
103
  ## 使用方式
57
104
 
58
- - `/reverse spec src/auth/` - 從 auth 模組提取規格
59
- - `/reverse bdd specs/SPEC-AUTH.md` - 將規格 AC 轉為 Gherkin 場景
60
- - `/reverse tdd features/auth.feature` - 分析 feature 檔案的測試覆蓋率
105
+ ```
106
+ /reverse - 三維度全面分析
107
+ /reverse spec src/auth/ - 邏輯:提取規格
108
+ /reverse data - 資料:分析結構與模型
109
+ /reverse runtime - 執行環境:分析設定與基礎設施
110
+ /reverse bdd specs/SPEC-AUTH.md - 將規格 AC 轉為 Gherkin
111
+ /reverse tdd features/auth.feature - 分析測試覆蓋率
112
+ ```
61
113
 
62
114
  ## 下一步引導
63
115
 
64
116
  `/reverse`(完整或 `spec`)完成後,AI 助手應建議:
65
117
 
66
118
  > **系統考古完成。建議下一步:**
67
- > - 執行 `/sdd` 審查並核准此規格
68
- > - 執行 `/derive` 從規格推導測試
69
- > - 審查規格中的 `[Inferred]` 和 `[Unknown]` 標記
119
+ > - 執行 `/sdd` 審查並核准此規格 ⭐ **推薦** — 審查並核准產生的規格
120
+ > - 執行 `/derive` 從規格推導測試 — 從規格推導測試(須先核准)
121
+ > - 審查規格中的 `[Inferred]` 和 `[Unknown]` 標記 — 手動審查不確定性標籤
70
122
 
71
123
  ## 參考
72
124
 
73
125
  - 詳細指南:[guide.md](./guide.md)
74
126
  - 核心規範:[reverse-engineering-standards.md](../../../../core/reverse-engineering-standards.md)
127
+
128
+ ## AI 代理行為
129
+
130
+ > 完整的 AI 行為定義請參閱對應的命令文件:[`/reverse`](../commands/reverse.md#ai-agent-behavior--ai-代理行為)