universal-dev-standards 5.0.0-rc.8 → 5.0.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 (355) hide show
  1. package/bin/uds.js +5 -3
  2. package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +178 -0
  3. package/bundled/ai/standards/agent-dispatch.ai.yaml +69 -0
  4. package/bundled/ai/standards/ai-command-behavior.ai.yaml +45 -0
  5. package/bundled/ai/standards/api-design-standards.ai.yaml +192 -0
  6. package/bundled/ai/standards/branch-completion.ai.yaml +82 -0
  7. package/bundled/ai/standards/change-batching-standards.ai.yaml +195 -0
  8. package/bundled/ai/standards/database-standards.ai.yaml +220 -0
  9. package/bundled/ai/standards/error-codes.ai.yaml +37 -2
  10. package/bundled/ai/standards/git-worktree.ai.yaml +77 -0
  11. package/bundled/ai/standards/logging.ai.yaml +21 -2
  12. package/bundled/ai/standards/model-selection.ai.yaml +81 -0
  13. package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +184 -0
  14. package/bundled/ai/standards/systematic-debugging.ai.yaml +73 -0
  15. package/bundled/ai/standards/verification-evidence.ai.yaml +84 -0
  16. package/bundled/ai/standards/workflow-enforcement.ai.yaml +253 -0
  17. package/bundled/core/acceptance-criteria-traceability.md +293 -0
  18. package/bundled/core/agent-dispatch.md +149 -0
  19. package/bundled/core/ai-command-behavior.md +239 -0
  20. package/bundled/core/api-design-standards.md +938 -0
  21. package/bundled/core/branch-completion.md +158 -0
  22. package/bundled/core/change-batching-standards.md +257 -0
  23. package/bundled/core/checkin-standards.md +43 -6
  24. package/bundled/core/database-standards.md +828 -0
  25. package/bundled/core/error-code-standards.md +228 -2
  26. package/bundled/core/forward-derivation-standards.md +54 -2
  27. package/bundled/core/git-worktree.md +131 -0
  28. package/bundled/core/model-selection.md +153 -0
  29. package/bundled/core/pipeline-integration-standards.md +230 -0
  30. package/bundled/core/systematic-debugging.md +156 -0
  31. package/bundled/core/testing-standards.md +49 -39
  32. package/bundled/core/verification-evidence.md +172 -0
  33. package/bundled/core/workflow-enforcement.md +132 -0
  34. package/bundled/locales/zh-CN/CLAUDE.md +2 -2
  35. package/bundled/locales/zh-CN/README.md +4 -4
  36. package/bundled/locales/zh-CN/SECURITY.md +92 -0
  37. package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +301 -0
  38. package/bundled/locales/zh-CN/core/acceptance-test-driven-development.md +47 -0
  39. package/bundled/locales/zh-CN/core/accessibility-standards.md +124 -0
  40. package/bundled/locales/zh-CN/core/agent-dispatch.md +113 -0
  41. package/bundled/locales/zh-CN/core/ai-agreement-standards.md +103 -0
  42. package/bundled/locales/zh-CN/core/ai-command-behavior.md +247 -0
  43. package/bundled/locales/zh-CN/core/api-design-standards.md +946 -0
  44. package/bundled/locales/zh-CN/core/behavior-driven-development.md +48 -0
  45. package/bundled/locales/zh-CN/core/branch-completion.md +112 -0
  46. package/bundled/locales/zh-CN/core/change-batching-standards.md +265 -0
  47. package/bundled/locales/zh-CN/core/checkin-standards.md +43 -5
  48. package/bundled/locales/zh-CN/core/context-aware-loading.md +106 -0
  49. package/bundled/locales/zh-CN/core/database-standards.md +836 -0
  50. package/bundled/locales/zh-CN/core/deployment-standards.md +80 -0
  51. package/bundled/locales/zh-CN/core/error-code-standards.md +2 -2
  52. package/bundled/locales/zh-CN/core/forward-derivation-standards.md +493 -0
  53. package/bundled/locales/zh-CN/core/git-worktree.md +101 -0
  54. package/bundled/locales/zh-CN/core/model-selection.md +112 -0
  55. package/bundled/locales/zh-CN/core/performance-standards.md +104 -0
  56. package/bundled/locales/zh-CN/core/pipeline-integration-standards.md +238 -0
  57. package/bundled/locales/zh-CN/core/project-context-memory.md +124 -0
  58. package/bundled/locales/zh-CN/core/requirement-engineering.md +49 -0
  59. package/bundled/locales/zh-CN/core/security-standards.md +100 -0
  60. package/bundled/locales/zh-CN/core/systematic-debugging.md +106 -0
  61. package/bundled/locales/zh-CN/core/test-governance.md +116 -0
  62. package/bundled/locales/zh-CN/core/testing-standards.md +392 -156
  63. package/bundled/locales/zh-CN/core/verification-evidence.md +118 -0
  64. package/bundled/locales/zh-CN/core/virtual-organization-standards.md +104 -0
  65. package/bundled/locales/zh-CN/core/workflow-enforcement.md +132 -0
  66. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +27 -1
  67. package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +9 -1
  68. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +37 -9
  69. package/bundled/locales/zh-CN/docs/USER-MANUAL.md +652 -0
  70. package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +1 -1
  71. package/bundled/locales/zh-CN/integrations/openspec/AGENTS.md +29 -4
  72. package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +143 -72
  73. package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +126 -0
  74. package/bundled/locales/zh-CN/skills/api-design-assistant/SKILL.md +100 -0
  75. package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +119 -0
  76. package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +82 -0
  77. package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +97 -0
  78. package/bundled/locales/zh-CN/skills/commands/api-design.md +94 -0
  79. package/bundled/locales/zh-CN/skills/commands/atdd.md +163 -0
  80. package/bundled/locales/zh-CN/skills/commands/audit.md +77 -0
  81. package/bundled/locales/zh-CN/skills/commands/bdd.md +1 -1
  82. package/bundled/locales/zh-CN/skills/commands/brainstorm.md +87 -0
  83. package/bundled/locales/zh-CN/skills/commands/changelog.md +63 -0
  84. package/bundled/locales/zh-CN/skills/commands/check.md +219 -0
  85. package/bundled/locales/zh-CN/skills/commands/checkin.md +61 -0
  86. package/bundled/locales/zh-CN/skills/commands/ci-cd.md +77 -0
  87. package/bundled/locales/zh-CN/skills/commands/commit.md +81 -0
  88. package/bundled/locales/zh-CN/skills/commands/config.md +207 -0
  89. package/bundled/locales/zh-CN/skills/commands/coverage.md +74 -0
  90. package/bundled/locales/zh-CN/skills/commands/database.md +78 -0
  91. package/bundled/locales/zh-CN/skills/commands/derive-all.md +58 -0
  92. package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +54 -0
  93. package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +53 -0
  94. package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +54 -0
  95. package/bundled/locales/zh-CN/skills/commands/derive.md +78 -0
  96. package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +119 -0
  97. package/bundled/locales/zh-CN/skills/commands/discover.md +86 -0
  98. package/bundled/locales/zh-CN/skills/commands/docgen.md +67 -0
  99. package/bundled/locales/zh-CN/skills/commands/docs.md +65 -0
  100. package/bundled/locales/zh-CN/skills/commands/durable.md +87 -0
  101. package/bundled/locales/zh-CN/skills/commands/guide.md +52 -0
  102. package/bundled/locales/zh-CN/skills/commands/incident.md +92 -0
  103. package/bundled/locales/zh-CN/skills/commands/init.md +272 -0
  104. package/bundled/locales/zh-CN/skills/commands/methodology.md +1 -1
  105. package/bundled/locales/zh-CN/skills/commands/metrics.md +73 -0
  106. package/bundled/locales/zh-CN/skills/commands/migrate.md +92 -0
  107. package/bundled/locales/zh-CN/skills/commands/pr.md +80 -0
  108. package/bundled/locales/zh-CN/skills/commands/refactor.md +1 -1
  109. package/bundled/locales/zh-CN/skills/commands/release.md +62 -0
  110. package/bundled/locales/zh-CN/skills/commands/requirement.md +54 -0
  111. package/bundled/locales/zh-CN/skills/commands/reverse-bdd.md +47 -0
  112. package/bundled/locales/zh-CN/skills/commands/reverse-sdd.md +51 -0
  113. package/bundled/locales/zh-CN/skills/commands/reverse-tdd.md +51 -0
  114. package/bundled/locales/zh-CN/skills/commands/reverse.md +63 -0
  115. package/bundled/locales/zh-CN/skills/commands/review.md +50 -0
  116. package/bundled/locales/zh-CN/skills/commands/scan.md +76 -0
  117. package/bundled/locales/zh-CN/skills/commands/sdd-retro.md +40 -0
  118. package/bundled/locales/zh-CN/skills/commands/sdd.md +379 -0
  119. package/bundled/locales/zh-CN/skills/commands/security.md +75 -0
  120. package/bundled/locales/zh-CN/skills/commands/tdd.md +111 -0
  121. package/bundled/locales/zh-CN/skills/commands/update.md +337 -0
  122. package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +1 -2
  123. package/bundled/locales/zh-CN/skills/database-assistant/SKILL.md +97 -0
  124. package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +145 -0
  125. package/bundled/locales/zh-CN/skills/durable-execution-assistant/SKILL.md +84 -0
  126. package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +107 -0
  127. package/bundled/locales/zh-CN/skills/metrics-dashboard-assistant/SKILL.md +67 -0
  128. package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +77 -0
  129. package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +90 -0
  130. package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +79 -0
  131. package/bundled/locales/zh-CN/skills/security-scan-assistant/SKILL.md +72 -0
  132. package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +73 -10
  133. package/bundled/locales/zh-CN/skills/spec-driven-dev/guide.md +267 -122
  134. package/bundled/locales/zh-TW/CLAUDE.md +2 -2
  135. package/bundled/locales/zh-TW/README.md +4 -4
  136. package/bundled/locales/zh-TW/SECURITY.md +92 -0
  137. package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +301 -0
  138. package/bundled/locales/zh-TW/core/acceptance-test-driven-development.md +47 -0
  139. package/bundled/locales/zh-TW/core/accessibility-standards.md +84 -0
  140. package/bundled/locales/zh-TW/core/agent-dispatch.md +89 -0
  141. package/bundled/locales/zh-TW/core/ai-agreement-standards.md +87 -0
  142. package/bundled/locales/zh-TW/core/ai-command-behavior.md +247 -0
  143. package/bundled/locales/zh-TW/core/api-design-standards.md +946 -0
  144. package/bundled/locales/zh-TW/core/behavior-driven-development.md +63 -0
  145. package/bundled/locales/zh-TW/core/branch-completion.md +76 -0
  146. package/bundled/locales/zh-TW/core/change-batching-standards.md +265 -0
  147. package/bundled/locales/zh-TW/core/checkin-standards.md +39 -5
  148. package/bundled/locales/zh-TW/core/context-aware-loading.md +86 -0
  149. package/bundled/locales/zh-TW/core/database-standards.md +836 -0
  150. package/bundled/locales/zh-TW/core/deployment-standards.md +66 -0
  151. package/bundled/locales/zh-TW/core/error-code-standards.md +230 -4
  152. package/bundled/locales/zh-TW/core/forward-derivation-standards.md +62 -2
  153. package/bundled/locales/zh-TW/core/git-worktree.md +104 -0
  154. package/bundled/locales/zh-TW/core/model-selection.md +83 -0
  155. package/bundled/locales/zh-TW/core/performance-standards.md +84 -0
  156. package/bundled/locales/zh-TW/core/pipeline-integration-standards.md +238 -0
  157. package/bundled/locales/zh-TW/core/project-context-memory.md +79 -0
  158. package/bundled/locales/zh-TW/core/requirement-engineering.md +79 -0
  159. package/bundled/locales/zh-TW/core/security-standards.md +74 -0
  160. package/bundled/locales/zh-TW/core/systematic-debugging.md +95 -0
  161. package/bundled/locales/zh-TW/core/test-governance.md +88 -0
  162. package/bundled/locales/zh-TW/core/testing-standards.md +309 -86
  163. package/bundled/locales/zh-TW/core/verification-evidence.md +94 -0
  164. package/bundled/locales/zh-TW/core/virtual-organization-standards.md +88 -0
  165. package/bundled/locales/zh-TW/core/workflow-enforcement.md +132 -0
  166. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +27 -1
  167. package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +9 -1
  168. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +37 -9
  169. package/bundled/locales/zh-TW/docs/USER-MANUAL.md +652 -0
  170. package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +1 -1
  171. package/bundled/locales/zh-TW/integrations/openspec/AGENTS.md +29 -4
  172. package/bundled/locales/zh-TW/integrations/spec-kit/AGENTS.md +142 -71
  173. package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +127 -0
  174. package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +1 -4
  175. package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -4
  176. package/bundled/locales/zh-TW/skills/api-design-assistant/SKILL.md +97 -0
  177. package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +1 -4
  178. package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +1 -4
  179. package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +1 -4
  180. package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +1 -4
  181. package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +1 -4
  182. package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +1 -4
  183. package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +79 -0
  184. package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -4
  185. package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +95 -0
  186. package/bundled/locales/zh-TW/skills/commands/api-design.md +92 -0
  187. package/bundled/locales/zh-TW/skills/commands/atdd.md +167 -0
  188. package/bundled/locales/zh-TW/skills/commands/audit.md +75 -0
  189. package/bundled/locales/zh-TW/skills/commands/bdd.md +1 -1
  190. package/bundled/locales/zh-TW/skills/commands/brainstorm.md +91 -0
  191. package/bundled/locales/zh-TW/skills/commands/changelog.md +67 -0
  192. package/bundled/locales/zh-TW/skills/commands/check.md +223 -0
  193. package/bundled/locales/zh-TW/skills/commands/checkin.md +65 -0
  194. package/bundled/locales/zh-TW/skills/commands/ci-cd.md +75 -0
  195. package/bundled/locales/zh-TW/skills/commands/commit.md +85 -0
  196. package/bundled/locales/zh-TW/skills/commands/config.md +211 -0
  197. package/bundled/locales/zh-TW/skills/commands/coverage.md +78 -0
  198. package/bundled/locales/zh-TW/skills/commands/database.md +76 -0
  199. package/bundled/locales/zh-TW/skills/commands/derive-all.md +62 -0
  200. package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +58 -0
  201. package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +54 -0
  202. package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +55 -0
  203. package/bundled/locales/zh-TW/skills/commands/derive.md +79 -0
  204. package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +120 -0
  205. package/bundled/locales/zh-TW/skills/commands/discover.md +87 -0
  206. package/bundled/locales/zh-TW/skills/commands/docgen.md +68 -0
  207. package/bundled/locales/zh-TW/skills/commands/docs.md +66 -0
  208. package/bundled/locales/zh-TW/skills/commands/durable.md +85 -0
  209. package/bundled/locales/zh-TW/skills/commands/guide.md +51 -0
  210. package/bundled/locales/zh-TW/skills/commands/incident.md +90 -0
  211. package/bundled/locales/zh-TW/skills/commands/init.md +273 -0
  212. package/bundled/locales/zh-TW/skills/commands/methodology.md +1 -1
  213. package/bundled/locales/zh-TW/skills/commands/metrics.md +71 -0
  214. package/bundled/locales/zh-TW/skills/commands/migrate.md +90 -0
  215. package/bundled/locales/zh-TW/skills/commands/pr.md +78 -0
  216. package/bundled/locales/zh-TW/skills/commands/refactor.md +1 -1
  217. package/bundled/locales/zh-TW/skills/commands/release.md +63 -0
  218. package/bundled/locales/zh-TW/skills/commands/requirement.md +61 -0
  219. package/bundled/locales/zh-TW/skills/commands/reverse-bdd.md +54 -0
  220. package/bundled/locales/zh-TW/skills/commands/reverse-sdd.md +58 -0
  221. package/bundled/locales/zh-TW/skills/commands/reverse-tdd.md +58 -0
  222. package/bundled/locales/zh-TW/skills/commands/reverse.md +70 -0
  223. package/bundled/locales/zh-TW/skills/commands/review.md +57 -0
  224. package/bundled/locales/zh-TW/skills/commands/scan.md +74 -0
  225. package/bundled/locales/zh-TW/skills/commands/sdd-retro.md +47 -0
  226. package/bundled/locales/zh-TW/skills/commands/sdd.md +362 -0
  227. package/bundled/locales/zh-TW/skills/commands/security.md +73 -0
  228. package/bundled/locales/zh-TW/skills/commands/tdd.md +115 -0
  229. package/bundled/locales/zh-TW/skills/commands/update.md +326 -0
  230. package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -6
  231. package/bundled/locales/zh-TW/skills/database-assistant/SKILL.md +94 -0
  232. package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +140 -0
  233. package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -4
  234. package/bundled/locales/zh-TW/skills/documentation-guide/SKILL.md +1 -4
  235. package/bundled/locales/zh-TW/skills/durable-execution-assistant/SKILL.md +81 -0
  236. package/bundled/locales/zh-TW/skills/error-code-guide/SKILL.md +1 -4
  237. package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +1 -4
  238. package/bundled/locales/zh-TW/skills/git-workflow-guide/SKILL.md +1 -4
  239. package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +104 -0
  240. package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +1 -4
  241. package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +1 -4
  242. package/bundled/locales/zh-TW/skills/metrics-dashboard-assistant/SKILL.md +64 -0
  243. package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +74 -0
  244. package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +87 -0
  245. package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -4
  246. package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +1 -4
  247. package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +1 -4
  248. package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +1 -4
  249. package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -4
  250. package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +76 -0
  251. package/bundled/locales/zh-TW/skills/security-scan-assistant/SKILL.md +69 -0
  252. package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +74 -14
  253. package/bundled/locales/zh-TW/skills/spec-driven-dev/guide.md +243 -98
  254. package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +1 -4
  255. package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +1 -4
  256. package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +1 -5
  257. package/bundled/skills/README.md +11 -0
  258. package/bundled/skills/ac-coverage-assistant/SKILL.md +127 -0
  259. package/bundled/skills/ai-collaboration-standards/SKILL.md +10 -0
  260. package/bundled/skills/ai-friendly-architecture/SKILL.md +10 -0
  261. package/bundled/skills/ai-instruction-standards/SKILL.md +10 -0
  262. package/bundled/skills/api-design-assistant/SKILL.md +119 -0
  263. package/bundled/skills/atdd-assistant/SKILL.md +7 -0
  264. package/bundled/skills/bdd-assistant/SKILL.md +7 -0
  265. package/bundled/skills/brainstorm-assistant/SKILL.md +7 -0
  266. package/bundled/skills/checkin-assistant/SKILL.md +7 -0
  267. package/bundled/skills/ci-cd-assistant/SKILL.md +97 -0
  268. package/bundled/skills/code-review-assistant/SKILL.md +7 -0
  269. package/bundled/skills/commands/README.md +70 -0
  270. package/bundled/skills/commands/ac-coverage.md +135 -0
  271. package/bundled/skills/commands/api-design.md +86 -0
  272. package/bundled/skills/commands/atdd.md +69 -0
  273. package/bundled/skills/commands/audit.md +69 -0
  274. package/bundled/skills/commands/bdd.md +101 -0
  275. package/bundled/skills/commands/brainstorm.md +45 -0
  276. package/bundled/skills/commands/changelog.md +34 -0
  277. package/bundled/skills/commands/check.md +52 -1
  278. package/bundled/skills/commands/checkin.md +46 -0
  279. package/bundled/skills/commands/ci-cd.md +69 -0
  280. package/bundled/skills/commands/commit.md +79 -0
  281. package/bundled/skills/commands/config.md +48 -0
  282. package/bundled/skills/commands/coverage.md +53 -0
  283. package/bundled/skills/commands/database.md +70 -0
  284. package/bundled/skills/commands/derive-all.md +40 -0
  285. package/bundled/skills/commands/derive-atdd.md +33 -0
  286. package/bundled/skills/commands/derive-bdd.md +39 -0
  287. package/bundled/skills/commands/derive-tdd.md +40 -0
  288. package/bundled/skills/commands/derive.md +47 -0
  289. package/bundled/skills/commands/dev-workflow.md +104 -7
  290. package/bundled/skills/commands/discover.md +39 -0
  291. package/bundled/skills/commands/docgen.md +35 -0
  292. package/bundled/skills/commands/docs.md +40 -0
  293. package/bundled/skills/commands/durable.md +79 -0
  294. package/bundled/skills/commands/incident.md +84 -0
  295. package/bundled/skills/commands/init.md +55 -0
  296. package/bundled/skills/commands/methodology.md +72 -0
  297. package/bundled/skills/commands/metrics.md +65 -0
  298. package/bundled/skills/commands/migrate.md +84 -0
  299. package/bundled/skills/commands/pr.md +72 -0
  300. package/bundled/skills/commands/refactor.md +51 -0
  301. package/bundled/skills/commands/release.md +60 -0
  302. package/bundled/skills/commands/requirement.md +38 -0
  303. package/bundled/skills/commands/reverse-bdd.md +34 -0
  304. package/bundled/skills/commands/reverse-sdd.md +42 -0
  305. package/bundled/skills/commands/reverse-tdd.md +40 -0
  306. package/bundled/skills/commands/reverse.md +41 -0
  307. package/bundled/skills/commands/review.md +39 -0
  308. package/bundled/skills/commands/scan.md +68 -0
  309. package/bundled/skills/commands/sdd-retro.md +48 -0
  310. package/bundled/skills/commands/sdd.md +220 -0
  311. package/bundled/skills/commands/security.md +67 -0
  312. package/bundled/skills/commands/tdd.md +101 -0
  313. package/bundled/skills/commands/update.md +61 -0
  314. package/bundled/skills/commit-standards/SKILL.md +8 -2
  315. package/bundled/skills/database-assistant/SKILL.md +118 -0
  316. package/bundled/skills/dev-workflow-guide/SKILL.md +53 -7
  317. package/bundled/skills/dev-workflow-guide/workflow-phases.md +24 -0
  318. package/bundled/skills/durable-execution-assistant/SKILL.md +116 -0
  319. package/bundled/skills/forward-derivation/SKILL.md +7 -0
  320. package/bundled/skills/incident-response-assistant/SKILL.md +132 -0
  321. package/bundled/skills/methodology-system/SKILL.md +24 -2
  322. package/bundled/skills/metrics-dashboard-assistant/SKILL.md +109 -0
  323. package/bundled/skills/migration-assistant/SKILL.md +119 -0
  324. package/bundled/skills/pr-automation-assistant/SKILL.md +114 -0
  325. package/bundled/skills/project-discovery/SKILL.md +7 -0
  326. package/bundled/skills/refactoring-assistant/SKILL.md +7 -0
  327. package/bundled/skills/release-standards/SKILL.md +7 -0
  328. package/bundled/skills/requirement-assistant/SKILL.md +7 -0
  329. package/bundled/skills/reverse-engineer/SKILL.md +7 -0
  330. package/bundled/skills/security-assistant/SKILL.md +105 -0
  331. package/bundled/skills/security-scan-assistant/SKILL.md +96 -0
  332. package/bundled/skills/spec-driven-dev/SKILL.md +84 -4
  333. package/bundled/skills/spec-driven-dev/guide.md +156 -22
  334. package/bundled/skills/tdd-assistant/SKILL.md +7 -0
  335. package/bundled/skills/test-coverage-assistant/SKILL.md +11 -0
  336. package/bundled/skills/testing-guide/SKILL.md +23 -0
  337. package/package.json +1 -1
  338. package/src/commands/check.js +154 -8
  339. package/src/commands/config.js +231 -104
  340. package/src/commands/init.js +23 -3
  341. package/src/commands/update.js +250 -25
  342. package/src/config/ai-agent-paths.js +16 -0
  343. package/src/config/workflow-definitions.js +184 -0
  344. package/src/core/constants.js +6 -0
  345. package/src/flows/init-flow.js +23 -6
  346. package/src/i18n/messages.js +51 -3
  347. package/src/installers/integration-installer.js +67 -2
  348. package/src/installers/manifest-installer.js +1 -0
  349. package/src/installers/standards-installer.js +3 -2
  350. package/src/prompts/init.js +50 -3
  351. package/src/reconciler/manifest-migrator.js +2 -2
  352. package/src/reconciler/plan-executor.js +11 -0
  353. package/src/utils/integration-generator.js +327 -14
  354. package/src/utils/workflow-gate.js +292 -0
  355. package/standards-registry.json +160 -5
@@ -0,0 +1,120 @@
1
+ ---
2
+ source: ../../../../skills/commands/dev-workflow.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ name: dev-workflow
10
+ description: "[UDS] Guide for mapping software development phases to UDS commands and features"
11
+ argument-hint: "[phase name | scenario | 階段名稱 | 場景]"
12
+ ---
13
+
14
+ # 開發工作流程指南
15
+
16
+ > **Language**: [English](../../../../skills/commands/dev-workflow.md) | 繁體中文
17
+
18
+ 將你目前的開發階段對應到 UDS 指令。了解在每個階段應該使用哪些工具。
19
+
20
+ ## 情境感知啟動
21
+
22
+ 當調用 `/dev-workflow` 時,AI 助手必須先檢查專案的工作流程狀態:
23
+
24
+ ### 步驟 1:檢查進行中的工作流程
25
+
26
+ ```bash
27
+ ls .workflow-state/*.yaml .workflow-state/*.json 2>/dev/null
28
+ ```
29
+
30
+ **如果有進行中的工作流程:**
31
+
32
+ 1. 顯示進行中的工作流程摘要(名稱、階段、進度)
33
+ 2. 建議繼續:「你有一個進行中的 **{workflow}**,目前在 **{phase}** 階段。要用 `/{command}` 繼續嗎?」
34
+ 3. 根據目前階段顯示適當的下一步指令
35
+
36
+ **階段 → 下一步指令對應:**
37
+
38
+ | 工作流程 | 目前階段 | 建議的下一步指令 |
39
+ |----------|----------|------------------|
40
+ | SDD | discuss | `/sdd create` |
41
+ | SDD | create | `/sdd review` |
42
+ | SDD | review | `/sdd approve` |
43
+ | SDD | approve | `/sdd implement` |
44
+ | SDD | implement | `/sdd verify` |
45
+ | TDD | red | 撰寫失敗測試,然後執行測試 |
46
+ | TDD | green | 撰寫最少程式碼使測試通過 |
47
+ | TDD | refactor | 清理程式碼,然後 `/tdd` 進入下一輪 |
48
+ | BDD | discovery | `/bdd` 制定場景 |
49
+ | BDD | formulation | 撰寫 `.feature` 檔案 |
50
+ | BDD | automation | 實作步驟定義 |
51
+
52
+ **如果沒有進行中的工作流程:**
53
+
54
+ 繼續顯示下方的標準階段總覽。
55
+
56
+ ### 步驟 2:檢查活躍規格
57
+
58
+ ```bash
59
+ ls docs/specs/SPEC-*.md 2>/dev/null
60
+ ```
61
+
62
+ 如果有活躍規格存在,標示出來並建議適當的工作流程階段。
63
+
64
+ ---
65
+
66
+ ## 用法
67
+
68
+ ```bash
69
+ /dev-workflow # 顯示完整階段總覽
70
+ /dev-workflow planning # Phase I:規劃與設計
71
+ /dev-workflow testing # Phase II:測試驅動開發
72
+ /dev-workflow implementation # Phase III:實作
73
+ /dev-workflow quality # Phase IV:品質關卡
74
+ /dev-workflow release # Phase V:發布與提交
75
+ /dev-workflow docs # Phase VI:文件
76
+ /dev-workflow standards # Phase VII:工具與規範
77
+ /dev-workflow advanced # Phase VIII:進階分析
78
+ /dev-workflow new-feature # 場景:新功能工作流程
79
+ /dev-workflow bug-fix # 場景:修復錯誤工作流程
80
+ /dev-workflow refactoring # 場景:重構工作流程
81
+ ```
82
+
83
+ ## 快速對照表
84
+
85
+ | 階段 | UDS 指令 | 用途 |
86
+ |------|----------|------|
87
+ | **I. 規劃** | `/brainstorm` `/requirement` `/sdd` `/reverse` | 需求、規格、逆向工程 |
88
+ | **II. 測試** | `/bdd` `/atdd` `/tdd` `/coverage` `/derive` | 先寫測試再寫程式 |
89
+ | **III. 實作** | `/refactor` `/reverse` | 撰寫與改善程式碼 |
90
+ | **IV. 品質** | `/checkin` `/review` | 提交前檢查與審查 |
91
+ | **V. 發布** | `/commit` `/changelog` `/release` | 版本、提交、發布 |
92
+ | **VI. 文件** | `/docs` `/docgen` `/struct` | 文件與專案結構 |
93
+ | **VII. 規範** | `/discover` `/guide` | 參考指南 |
94
+ | **VIII. 進階** | `/methodology` | 跨方法論工作流程 |
95
+
96
+ ## 常見場景
97
+
98
+ ### 新功能
99
+
100
+ ```
101
+ /brainstorm → /requirement → /sdd → /derive → /tdd → /checkin → /commit
102
+ ```
103
+
104
+ ### 修復錯誤
105
+
106
+ ```
107
+ /discover → /reverse → /tdd → /checkin → /commit
108
+ ```
109
+
110
+ ### 重構
111
+
112
+ ```
113
+ /discover → /reverse → /coverage → /refactor → /checkin → /commit
114
+ ```
115
+
116
+ ## 參考
117
+
118
+ - [開發工作流程技能](../dev-workflow-guide/SKILL.md)
119
+ - [詳細階段指南](../dev-workflow-guide/workflow-phases.md)
120
+ - [每日工作流程指南](../../adoption/DAILY-WORKFLOW-GUIDE.md)
@@ -0,0 +1,87 @@
1
+ ---
2
+ source: ../../../../skills/commands/discover.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ name: discover
10
+ description: "[UDS] Assess project health, architecture, and risks before adding features"
11
+ argument-hint: "[feature area | 功能範圍]"
12
+ ---
13
+
14
+ # 專案現況評估
15
+
16
+ > **Language**: [English](../../../../skills/commands/discover.md) | 繁體中文
17
+
18
+ 在既有程式碼庫新增功能前的 Phase 0 評估。評估專案健康度、架構與風險。
19
+
20
+ ## 用法
21
+
22
+ ```bash
23
+ /discover [feature area]
24
+ ```
25
+
26
+ ## 評估維度
27
+
28
+ | 維度 | 檢查項目 |
29
+ |------|----------|
30
+ | **架構** | 模組結構、相依圖、進入點 |
31
+ | **相依性** | 過時套件、已知漏洞、授權風險 |
32
+ | **測試覆蓋率** | 現有測試、覆蓋率缺口、測試品質 |
33
+ | **安全性** | `npm audit` 結果、硬編碼密鑰、暴露端點 |
34
+ | **技術債** | TODO 標記、程式碼重複、複雜度熱點 |
35
+
36
+ ## 工作流程
37
+
38
+ 1. **掃描專案** - 讀取 package.json、目錄結構、設定檔
39
+ 2. **分析架構** - 繪製模組、相依性和資料流
40
+ 3. **檢查相依性** - 執行 `npm outdated`、`npm audit` 取得健康信號
41
+ 4. **評估風險** - 識別複雜度熱點、缺失測試、安全問題
42
+ 5. **產生報告** - 輸出健康分數與可執行的建議
43
+ 6. **決定下一步** - 根據發現結果判定 GO / NO-GO / CONDITIONAL
44
+
45
+ ## 範例
46
+
47
+ ```bash
48
+ /discover # 完整專案健康評估
49
+ /discover auth # 聚焦評估 auth 相關模組
50
+ /discover payments # 在新增支付功能前評估風險
51
+ ```
52
+
53
+ ## 輸出格式
54
+
55
+ ```
56
+ Project Health Report
57
+ =====================
58
+ Overall Score: 7.2 / 10
59
+
60
+ | Dimension | Score | Status | Key Finding |
61
+ |-----------------|-------|---------|------------------------|
62
+ | Architecture | 8/10 | Good | Clean module boundaries |
63
+ | Dependencies | 6/10 | Warning | 5 outdated, 1 critical |
64
+ | Test Coverage | 7/10 | Fair | 72% line coverage |
65
+ | Security | 8/10 | Good | No critical vulns |
66
+ | Technical Debt | 6/10 | Warning | 23 TODOs, 3 hotspots |
67
+
68
+ Verdict: CONDITIONAL
69
+ Recommendations:
70
+ 1. [HIGH] Update lodash to fix CVE-2024-XXXX
71
+ 2. [MED] Add tests for src/payments/ (0% coverage)
72
+ 3. [LOW] Resolve TODO backlog in src/utils/
73
+ ```
74
+
75
+ ## 後續步驟
76
+
77
+ 完成評估後,典型的 brownfield 工作流程為:
78
+
79
+ 1. `/discover` - 評估專案健康度(本指令)
80
+ 2. `/reverse spec` - 逆向工程現有程式碼為規格
81
+ 3. `/sdd` - 為新功能撰寫規格
82
+ 4. `/tdd` 或 `/bdd` - 在測試保護下實作
83
+
84
+ ## 參考
85
+
86
+ * [專案探索技能](../project-discovery/SKILL.md)
87
+ * [逆向工程標準](../../core/reverse-engineering-standards.md)
@@ -0,0 +1,68 @@
1
+ ---
2
+ source: ../../../../skills/commands/docgen.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ name: docgen
10
+ description: "[UDS] Generate usage documentation from project sources"
11
+ argument-hint: "[config file | 設定檔]"
12
+ ---
13
+
14
+ # 文件產生器
15
+
16
+ > **Language**: [English](../../../../skills/commands/docgen.md) | 繁體中文
17
+
18
+ 從專案原始檔案產生使用文件(速查表、參考手冊、使用指南)。
19
+
20
+ ## 用法
21
+
22
+ ```bash
23
+ /docgen [config file]
24
+ ```
25
+
26
+ ## 工作流程
27
+
28
+ 1. **讀取設定** - 載入 `.usage-docs.yaml`(或指定的設定檔)
29
+ 2. **掃描來源** - 讀取原始檔案、指令和技能定義
30
+ 3. **萃取內容** - 從來源解析說明、選項、範例
31
+ 4. **產生文件** - 以設定的格式輸出
32
+ 5. **寫入輸出** - 將產生的檔案儲存到設定的輸出目錄
33
+
34
+ ## 輸出類型
35
+
36
+ | 類型 | 說明 |
37
+ |------|------|
38
+ | **cheatsheet** | 速查表,列出命令與快捷方式 |
39
+ | **reference** | 完整功能參考手冊含所有選項 |
40
+ | **usage-guide** | 新手入門的逐步使用指南 |
41
+
42
+ ## 範例
43
+
44
+ ```bash
45
+ /docgen # 使用預設 .usage-docs.yaml 產生文件
46
+ /docgen .usage-docs.yaml # 從指定設定檔產生文件
47
+ /docgen --format cheatsheet # 僅產生速查表
48
+ ```
49
+
50
+ ## 設定檔格式
51
+
52
+ ```yaml
53
+ # .usage-docs.yaml
54
+ output_dir: docs/generated/
55
+ formats:
56
+ - cheatsheet
57
+ - reference
58
+ sources:
59
+ - path: skills/commands/
60
+ type: commands
61
+ - path: cli/src/commands/
62
+ type: cli
63
+ language: [en, zh-TW]
64
+ ```
65
+
66
+ ## 參考
67
+
68
+ * [文件產生器技能](../docs-generator/SKILL.md)
@@ -0,0 +1,66 @@
1
+ ---
2
+ source: ../../../../skills/commands/docs.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ name: docs
10
+ description: [UDS] Manage, guide, and generate documentation.
11
+ argument-hint: "[generate|readme|api] [options]"
12
+ ---
13
+
14
+ # /docs 命令
15
+
16
+ > **Language**: [English](../../../../skills/commands/docs.md) | 繁體中文
17
+
18
+ 管理、撰寫和生成專案文件。
19
+
20
+ ## 用法
21
+
22
+ ```bash
23
+ /docs [subcommand] [options]
24
+ ```
25
+
26
+ ### 子命令
27
+
28
+ | 子命令 | 說明 |
29
+ |--------|------|
30
+ | `generate` | 產生文件工件(速查表、參考手冊) |
31
+ | `readme` | 稽核並更新 README.md |
32
+ | `api` | 從程式碼產生 API 文件 |
33
+ | `structure` | 檢查文件目錄結構 |
34
+ | `(無)` | 顯示文件指南/狀態 |
35
+
36
+ ### Generate 選項
37
+
38
+ 搭配 `/docs generate` 使用:
39
+
40
+ | 選項 | 說明 |
41
+ |------|------|
42
+ | `--lang <lang>` | 語言(`en`、`zh-TW`、`zh-CN`) |
43
+ | `--cheatsheet` | 僅產生速查表 |
44
+ | `--reference` | 僅產生功能參考手冊 |
45
+ | `--check` | 檢查文件是否不同步 |
46
+
47
+ ## 範例
48
+
49
+ ```bash
50
+ # 產生所有文件
51
+ /docs generate
52
+
53
+ # 產生繁體中文文件
54
+ /docs generate --lang zh-TW
55
+
56
+ # 更新 README
57
+ /docs readme
58
+
59
+ # 檢查文件結構
60
+ /docs structure
61
+ ```
62
+
63
+ ## 參考
64
+
65
+ * [文件指南技能](../documentation-guide/SKILL.md)
66
+ * [核心規範](../../core/documentation-writing-standards.md)
@@ -0,0 +1,85 @@
1
+ ---
2
+ source: ../../../../skills/commands/durable.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-25
6
+ status: current
7
+ ---
8
+
9
+ ---
10
+ description: "[UDS] Guide workflow failure recovery with checkpoints, retries and rollback strategies"
11
+ allowed-tools: Read, Write, Grep, Glob
12
+ argument-hint: "[workflow name or failure context | 工作流名稱或失敗情境]"
13
+ ---
14
+
15
+ # 持久執行助手
16
+
17
+ 引導工作流程故障恢復,包含檢查點、重試與回滾策略。
18
+
19
+ ## 工作流程
20
+
21
+ ```
22
+ DETECT ──► DIAGNOSE ──► RECOVER ──► VERIFY ──► CONTINUE
23
+ ```
24
+
25
+ ## 使用方式
26
+
27
+ - `/durable` - 開始互動式故障恢復
28
+ - `/durable --checkpoint` - 設計檢查點策略
29
+ - `/durable --retry` - 設計重試策略
30
+ - `/durable --rollback` - 規劃回滾策略
31
+ - `/durable <workflow>` - 分析指定工作流程
32
+
33
+ ## AI Agent Behavior | AI 代理行為
34
+
35
+ > 遵循 [AI Command Behavior Standards](../../core/ai-command-behavior.md)
36
+
37
+ ### Entry Router | 進入路由
38
+
39
+ | 輸入 | AI 動作 |
40
+ |------|---------|
41
+ | `/durable` | 詢問工作流程或失敗情境,進入 DETECT |
42
+ | `/durable --checkpoint` | 直接進入檢查點策略設計 |
43
+ | `/durable --retry` | 直接進入重試策略設計 |
44
+ | `/durable --rollback` | 直接進入回滾策略規劃 |
45
+ | `/durable <workflow>` | 分析指定工作流程 |
46
+
47
+ ### Interaction Script | 互動腳本
48
+
49
+ #### DETECT / DIAGNOSE 階段
50
+ 1. 分析工作流程結構和失敗點
51
+ 2. 識別需要持久化的狀態
52
+
53
+ **決策:故障類型**
54
+ - IF 暫時性故障(網路、超時) → 建議重試策略(exponential backoff)
55
+ - IF 資料不一致 → 建議檢查點 + 補償交易
56
+ - IF 不可逆失敗 → 建議回滾策略
57
+
58
+ 🛑 **STOP**: 診斷結果展示後等待使用者確認策略方向
59
+
60
+ #### RECOVER 階段
61
+ 1. 設計選定的恢復策略
62
+ 2. 展示策略細節和程式碼建議
63
+
64
+ 🛑 **STOP**: 策略設計後等待使用者確認
65
+
66
+ #### VERIFY 階段
67
+ 1. 建議驗證步驟確認恢復成功
68
+
69
+ ### Stop Points | 停止點
70
+
71
+ | 階段 | 停止點 | 等待內容 |
72
+ |------|--------|---------|
73
+ | DIAGNOSE | 診斷結果後 | 確認策略方向 |
74
+ | RECOVER | 策略設計後 | 確認實施 |
75
+
76
+ ### Error Handling | 錯誤處理
77
+
78
+ | 錯誤條件 | AI 動作 |
79
+ |----------|---------|
80
+ | 無法識別工作流程模式 | 詢問使用者描述工作流程步驟 |
81
+ | 多種故障類型並存 | 逐一分析,建議組合策略 |
82
+
83
+ ## 參考
84
+
85
+ - 完整標準:[durable-execution-assistant](../durable-execution-assistant/SKILL.md)
@@ -0,0 +1,51 @@
1
+ ---
2
+ source: ../../../../skills/commands/guide.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ name: guide
10
+ description: [UDS] Access Universal Development Standards guides and references.
11
+ ---
12
+
13
+ # /guide 命令
14
+
15
+ > **Language**: [English](../../../../skills/commands/guide.md) | 繁體中文
16
+
17
+ `/guide` 命令是存取所有 Universal Development Standards 參考資料和指南的中央入口。
18
+
19
+ ## 用法
20
+
21
+ ```bash
22
+ /guide [topic]
23
+ ```
24
+
25
+ ## 可用主題
26
+
27
+ | 主題 | 說明 | 來源 |
28
+ |------|------|------|
29
+ | `git` | Git 工作流程與分支策略 | `skills/git-workflow-guide/` |
30
+ | `testing` | 測試金字塔與策略 | `skills/testing-guide/` |
31
+ | `errors` | 錯誤碼設計標準 | `skills/error-code-guide/` |
32
+ | `logging` | 結構化日誌標準 | `skills/logging-guide/` |
33
+ | `structure` | 專案結構慣例 | `skills/project-structure-guide/` |
34
+ | `ai-arch` | AI 友善架構 | `skills/ai-friendly-architecture/` |
35
+ | `ai-collab` | AI 協作與反幻覺 | `skills/ai-collaboration-standards/` |
36
+ | `ai-instruct` | AI 指令檔案標準 | `skills/ai-instruction-standards/` |
37
+
38
+ ## 範例
39
+
40
+ - `/guide git` - 顯示 Git 分支與命名慣例
41
+ - `/guide testing` - 顯示測試金字塔與最佳實踐
42
+ - `/guide structure` - 顯示建議的專案目錄結構
43
+ - `/guide` - 列出所有可用指南
44
+
45
+ ## AI 實作注意事項
46
+
47
+ 當使用者調用 `/guide [topic]` 時:
48
+ 1. 識別請求的主題。
49
+ 2. 讀取對應的標準/技能檔案(例如 `skills/git-workflow-guide/SKILL.md`)。
50
+ 3. 向使用者摘要或呈現該檔案的關鍵資訊。
51
+ 4. 如果主題缺失或無效,列出可用的主題清單。
@@ -0,0 +1,90 @@
1
+ ---
2
+ source: ../../../../skills/commands/incident.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-25
6
+ status: current
7
+ ---
8
+
9
+ ---
10
+ description: "[UDS] Guide incident response, root cause analysis and post-mortem documentation"
11
+ allowed-tools: Read, Write, Grep, Glob
12
+ argument-hint: "[incident description or severity | 事故描述或嚴重程度]"
13
+ ---
14
+
15
+ # 事故回應助手
16
+
17
+ 引導事故回應、根因分析和事後檢討文件撰寫。
18
+
19
+ ## 工作流程
20
+
21
+ ```
22
+ DETECT ──► TRIAGE ──► MITIGATE ──► RESOLVE ──► POST-MORTEM
23
+ ```
24
+
25
+ ## 使用方式
26
+
27
+ - `/incident` - 開始互動式事故回應
28
+ - `/incident "API 500 errors"` - 回應特定事故
29
+ - `/incident --post-mortem` - 撰寫已解決事故的事後檢討
30
+ - `/incident --sev1` - 啟動 SEV1 回應協議
31
+
32
+ ## AI Agent Behavior | AI 代理行為
33
+
34
+ > 遵循 [AI Command Behavior Standards](../../core/ai-command-behavior.md)
35
+
36
+ ### Entry Router | 進入路由
37
+
38
+ | 輸入 | AI 動作 |
39
+ |------|---------|
40
+ | `/incident` | 詢問事故描述和嚴重程度,進入 DETECT |
41
+ | `/incident "description"` | 以描述為起點,進入 TRIAGE |
42
+ | `/incident --post-mortem` | 直接進入 POST-MORTEM 階段 |
43
+ | `/incident --sev1` | 啟動 SEV1 緊急回應協議 |
44
+
45
+ ### Interaction Script | 互動腳本
46
+
47
+ #### DETECT / TRIAGE 階段
48
+ 1. 收集事故症狀和影響範圍
49
+ 2. 評估嚴重程度(SEV1-4)
50
+
51
+ **決策:嚴重程度**
52
+ - IF SEV1/SEV2 → 立即列出緊急行動清單,建議通知相關人員
53
+ - IF SEV3/SEV4 → 按標準流程排查
54
+
55
+ 🛑 **STOP**: 嚴重程度評估後等待使用者確認
56
+
57
+ #### MITIGATE 階段
58
+ 1. 建議即時緩解措施
59
+ 2. 追蹤緩解狀態
60
+
61
+ #### RESOLVE 階段
62
+ 1. 引導根因分析(5 Whys)
63
+ 2. 建議修復方案
64
+
65
+ 🛑 **STOP**: 修復方案確認後等待使用者確認實施
66
+
67
+ #### POST-MORTEM 階段
68
+ 1. 收集時間線、根因、影響
69
+ 2. 生成事後檢討文件
70
+
71
+ 🛑 **STOP**: 文件生成後等待使用者確認寫入
72
+
73
+ ### Stop Points | 停止點
74
+
75
+ | 階段 | 停止點 | 等待內容 |
76
+ |------|--------|---------|
77
+ | TRIAGE | 嚴重程度評估後 | 確認分級 |
78
+ | RESOLVE | 修復方案提出後 | 確認實施 |
79
+ | POST-MORTEM | 文件生成後 | 確認寫入 |
80
+
81
+ ### Error Handling | 錯誤處理
82
+
83
+ | 錯誤條件 | AI 動作 |
84
+ |----------|---------|
85
+ | 無法判斷嚴重程度 | 列出分級標準,請使用者選擇 |
86
+ | 缺乏足夠症狀資訊 | 引導收集更多資訊(日誌、監控、錯誤訊息) |
87
+
88
+ ## 參考
89
+
90
+ - 完整標準:[incident-response-assistant](../incident-response-assistant/SKILL.md)