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,119 @@
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
+ status: current
7
+ ---
8
+
9
+ ---
10
+ name: dev-workflow
11
+ description: "[UDS] Guide for mapping software development phases to UDS commands and features"
12
+ argument-hint: "[phase name | scenario | 阶段名称 | 场景]"
13
+ ---
14
+
15
+ # 开发工作流程指南
16
+
17
+ 将你目前的开发阶段对应到 UDS 命令。了解在每个阶段应该使用哪些工具。
18
+
19
+ ## 情境感知启动
20
+
21
+ 当调用 `/dev-workflow` 时,AI 助手必须先检查专案的工作流程状态:
22
+
23
+ ### 步骤 1:检查进行中的工作流程
24
+
25
+ ```bash
26
+ ls .workflow-state/*.yaml .workflow-state/*.json 2>/dev/null
27
+ ```
28
+
29
+ **如果有进行中的工作流程:**
30
+
31
+ 1. 显示进行中的工作流程摘要(名称、阶段、进度)
32
+ 2. 建议恢复:"您有一个进行中的 **{workflow}**,在阶段 **{phase}**。使用 `/{command}` 继续?"
33
+ 3. 根据当前阶段显示适当的下一步命令
34
+
35
+ **阶段 → 下一步命令对应:**
36
+
37
+ | Workflow | Current Phase | Suggested Next Command |
38
+ |----------|--------------|----------------------|
39
+ | SDD | discuss | `/sdd create` |
40
+ | SDD | create | `/sdd review` |
41
+ | SDD | review | `/sdd approve` |
42
+ | SDD | approve | `/sdd implement` |
43
+ | SDD | implement | `/sdd verify` |
44
+ | TDD | red | 编写失败测试,然后运行测试 |
45
+ | TDD | green | 编写最小代码以通过 |
46
+ | TDD | refactor | 清理后使用 `/tdd` 进入下一个循环 |
47
+ | BDD | discovery | `/bdd` 以制定场景 |
48
+ | BDD | formulation | 编写 `.feature` 文件 |
49
+ | BDD | automation | 实作步骤定义 |
50
+
51
+ **如果没有进行中的工作流程:**
52
+
53
+ 继续显示下方的标准阶段概览。
54
+
55
+ ### 步骤 2:检查活跃规格
56
+
57
+ ```bash
58
+ ls docs/specs/SPEC-*.md 2>/dev/null
59
+ ```
60
+
61
+ 如果存在活跃规格,突出显示并建议适当的工作流程阶段。
62
+
63
+ ---
64
+
65
+ ## 用法
66
+
67
+ ```bash
68
+ /dev-workflow # 显示完整阶段概览
69
+ /dev-workflow planning # 阶段 I:规划与设计
70
+ /dev-workflow testing # 阶段 II:测试驱动开发
71
+ /dev-workflow implementation # 阶段 III:实作
72
+ /dev-workflow quality # 阶段 IV:质量关卡
73
+ /dev-workflow release # 阶段 V:发布与提交
74
+ /dev-workflow docs # 阶段 VI:文档
75
+ /dev-workflow standards # 阶段 VII:工具与标准
76
+ /dev-workflow advanced # 阶段 VIII:进阶分析
77
+ /dev-workflow new-feature # 场景:新功能工作流程
78
+ /dev-workflow bug-fix # 场景:修复错误工作流程
79
+ /dev-workflow refactoring # 场景:重构工作流程
80
+ ```
81
+
82
+ ## 快速对照表
83
+
84
+ | Phase | UDS Commands | 用途 |
85
+ |-------|-------------|------|
86
+ | **I. 规划** | `/brainstorm` `/requirement` `/sdd` `/reverse` | 需求、规格、逆向工程 |
87
+ | **II. 测试** | `/bdd` `/atdd` `/tdd` `/coverage` `/derive` | 先写测试再写代码 |
88
+ | **III. 实作** | `/refactor` `/reverse` | 编写与改善代码 |
89
+ | **IV. 质量** | `/checkin` `/review` | 提交前检查与审查 |
90
+ | **V. 发布** | `/commit` `/changelog` `/release` | 版本、提交、发布 |
91
+ | **VI. 文档** | `/docs` `/docgen` `/struct` | 文档与专案结构 |
92
+ | **VII. 标准** | `/discover` `/guide` | 参考指南 |
93
+ | **VIII. 进阶** | `/methodology` | 跨方法论工作流程 |
94
+
95
+ ## 常见场景
96
+
97
+ ### 新功能
98
+
99
+ ```
100
+ /brainstorm → /requirement → /sdd → /derive → /tdd → /checkin → /commit
101
+ ```
102
+
103
+ ### 修复错误
104
+
105
+ ```
106
+ /discover → /reverse → /tdd → /checkin → /commit
107
+ ```
108
+
109
+ ### 重构
110
+
111
+ ```
112
+ /discover → /reverse → /coverage → /refactor → /checkin → /commit
113
+ ```
114
+
115
+ ## 参考
116
+
117
+ - [开发工作流程技能](../dev-workflow-guide/SKILL.md)
118
+ - [详细阶段指南](../dev-workflow-guide/workflow-phases.md)
119
+ - [日常工作流程指南](../../adoption/DAILY-WORKFLOW-GUIDE.md)
@@ -0,0 +1,86 @@
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
+ status: current
7
+ ---
8
+
9
+ ---
10
+ name: discover
11
+ description: "[UDS] Assess project health, architecture, and risks before adding features"
12
+ argument-hint: "[feature area | 功能范围]"
13
+ ---
14
+
15
+ # 专案现况评估
16
+
17
+ 在既有代码库新增功能前的 Phase 0 评估。评估专案健康度、架构与风险。
18
+
19
+ ## 用法
20
+
21
+ ```bash
22
+ /discover [feature area]
23
+ ```
24
+
25
+ ## 评估维度
26
+
27
+ | 维度 | 检查项目 |
28
+ |------|----------|
29
+ | **架构** | 模组结构、依赖图、入口点 |
30
+ | **依赖** | 过时套件、已知漏洞、授权风险 |
31
+ | **测试覆盖率** | 现有测试、覆盖率缺口、测试质量 |
32
+ | **安全** | `npm audit` 发现、硬编码密钥、暴露端点 |
33
+ | **技术债** | TODO 标记、代码重复、复杂度热点 |
34
+
35
+ ## 工作流程
36
+
37
+ 1. **扫描专案** - 读取 package.json、目录结构、配置文件
38
+ 2. **分析架构** - 映射模组、依赖关系和数据流
39
+ 3. **检查依赖** - 运行 `npm outdated`、`npm audit` 获取健康信号
40
+ 4. **评估风险** - 识别复杂度热点、缺失测试、安全问题
41
+ 5. **生成报告** - 输出健康评分与可执行建议
42
+ 6. **决定下一步** - 根据发现结果判断 GO / NO-GO / CONDITIONAL
43
+
44
+ ## 范例
45
+
46
+ ```bash
47
+ /discover # 完整专案健康评估
48
+ /discover auth # 针对认证相关模组的集中评估
49
+ /discover payments # 评估新增支付功能前的风险
50
+ ```
51
+
52
+ ## 输出格式
53
+
54
+ ```
55
+ Project Health Report
56
+ =====================
57
+ Overall Score: 7.2 / 10
58
+
59
+ | Dimension | Score | Status | Key Finding |
60
+ |-----------------|-------|---------|------------------------|
61
+ | Architecture | 8/10 | Good | Clean module boundaries |
62
+ | Dependencies | 6/10 | Warning | 5 outdated, 1 critical |
63
+ | Test Coverage | 7/10 | Fair | 72% line coverage |
64
+ | Security | 8/10 | Good | No critical vulns |
65
+ | Technical Debt | 6/10 | Warning | 23 TODOs, 3 hotspots |
66
+
67
+ Verdict: CONDITIONAL
68
+ Recommendations:
69
+ 1. [HIGH] Update lodash to fix CVE-2024-XXXX
70
+ 2. [MED] Add tests for src/payments/ (0% coverage)
71
+ 3. [LOW] Resolve TODO backlog in src/utils/
72
+ ```
73
+
74
+ ## 后续步骤
75
+
76
+ 发现评估后,典型的棕地(brownfield)工作流程为:
77
+
78
+ 1. `/discover` - 评估专案健康度(本命令)
79
+ 2. `/reverse spec` - 逆向工程现有代码为规格
80
+ 3. `/sdd` - 为新功能编写规格
81
+ 4. `/tdd` 或 `/bdd` - 在测试保护下实作
82
+
83
+ ## 参考
84
+
85
+ * [专案探索技能](../project-discovery/SKILL.md)
86
+ * [逆向工程规范](../../core/reverse-engineering-standards.md)
@@ -0,0 +1,67 @@
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
+ status: current
7
+ ---
8
+
9
+ ---
10
+ name: docgen
11
+ description: "[UDS] Generate usage documentation from project sources"
12
+ argument-hint: "[config file | 配置文件]"
13
+ ---
14
+
15
+ # 文档生成器
16
+
17
+ 从专案原始文件生成使用文档(速查表、参考手册、使用指南)。
18
+
19
+ ## 用法
20
+
21
+ ```bash
22
+ /docgen [config file]
23
+ ```
24
+
25
+ ## 工作流程
26
+
27
+ 1. **读取配置** - 加载 `.usage-docs.yaml`(或指定的配置文件)
28
+ 2. **扫描来源** - 读取原始文件、命令和技能定义
29
+ 3. **提取内容** - 从来源中解析描述、选项、范例
30
+ 4. **生成文档** - 以配置的格式产生输出
31
+ 5. **写入输出** - 将生成的文件保存到配置的输出目录
32
+
33
+ ## 输出类型
34
+
35
+ | 类型 | 说明 |
36
+ |------|------|
37
+ | **cheatsheet** | 速查表,列出命令与快捷方式 |
38
+ | **reference** | 完整功能参考手册含所有选项 |
39
+ | **usage-guide** | 新手入门的逐步使用指南 |
40
+
41
+ ## 范例
42
+
43
+ ```bash
44
+ /docgen # 使用默认 .usage-docs.yaml 生成文档
45
+ /docgen .usage-docs.yaml # 从指定配置文件生成文档
46
+ /docgen --format cheatsheet # 仅生成速查表
47
+ ```
48
+
49
+ ## 配置文件格式
50
+
51
+ ```yaml
52
+ # .usage-docs.yaml
53
+ output_dir: docs/generated/
54
+ formats:
55
+ - cheatsheet
56
+ - reference
57
+ sources:
58
+ - path: skills/commands/
59
+ type: commands
60
+ - path: cli/src/commands/
61
+ type: cli
62
+ language: [en, zh-TW]
63
+ ```
64
+
65
+ ## 参考
66
+
67
+ * [文档生成器技能](../docs-generator/SKILL.md)
@@ -0,0 +1,65 @@
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
+ status: current
7
+ ---
8
+
9
+ ---
10
+ name: docs
11
+ description: [UDS] Manage, guide, and generate documentation.
12
+ argument-hint: "[generate|readme|api] [options]"
13
+ ---
14
+
15
+ # /docs 命令
16
+
17
+ 管理、编写和生成专案文档。
18
+
19
+ ## 用法
20
+
21
+ ```bash
22
+ /docs [subcommand] [options]
23
+ ```
24
+
25
+ ### 子命令
26
+
27
+ | Subcommand | Description |
28
+ |------------|-------------|
29
+ | `generate` | 生成文档产物(速查表、参考手册) |
30
+ | `readme` | 审查并更新 README.md |
31
+ | `api` | 从代码生成 API 文档 |
32
+ | `structure` | 检查文档文件夹结构 |
33
+ | `(none)` | 显示文档指南/状态 |
34
+
35
+ ### Generate 选项
36
+
37
+ 与 `/docs generate` 一起使用:
38
+
39
+ | Option | Description |
40
+ |--------|-------------|
41
+ | `--lang <lang>` | 语言(`en`、`zh-TW`、`zh-CN`) |
42
+ | `--cheatsheet` | 仅生成速查表 |
43
+ | `--reference` | 仅生成功能参考 |
44
+ | `--check` | 检查文档是否不同步 |
45
+
46
+ ## 范例
47
+
48
+ ```bash
49
+ # 生成所有文档
50
+ /docs generate
51
+
52
+ # 生成繁体中文文档
53
+ /docs generate --lang zh-TW
54
+
55
+ # 更新 README
56
+ /docs readme
57
+
58
+ # 检查文档结构
59
+ /docs structure
60
+ ```
61
+
62
+ ## 参考
63
+
64
+ * [文档指南技能](../documentation-guide/SKILL.md)
65
+ * [核心规范](../../core/documentation-writing-standards.md)
@@ -0,0 +1,87 @@
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
+ # Durable Execution Assistant | 持久执行助手
16
+
17
+ Guide workflow failure recovery with checkpoints, retries and rollback strategies.
18
+
19
+ 引导工作流程故障恢复,包含检查点、重试与回滚策略。
20
+
21
+ ## Workflow | 工作流程
22
+
23
+ ```
24
+ DETECT ──► DIAGNOSE ──► RECOVER ──► VERIFY ──► CONTINUE
25
+ ```
26
+
27
+ ## Usage | 使用方式
28
+
29
+ - `/durable` - 启动交互式故障恢复
30
+ - `/durable --checkpoint` - 设计检查点策略
31
+ - `/durable --retry` - 设计重试策略
32
+ - `/durable --rollback` - 规划回滚策略
33
+ - `/durable <workflow>` - 分析特定工作流程
34
+
35
+ ## AI Agent Behavior | AI 代理行为
36
+
37
+ > 遵循 [AI Command Behavior Standards](../../core/ai-command-behavior.md)
38
+
39
+ ### Entry Router | 进入路由
40
+
41
+ | 输入 | AI 动作 |
42
+ |------|---------|
43
+ | `/durable` | 询问工作流程或失败情境,进入 DETECT |
44
+ | `/durable --checkpoint` | 直接进入检查点策略设计 |
45
+ | `/durable --retry` | 直接进入重试策略设计 |
46
+ | `/durable --rollback` | 直接进入回滚策略规划 |
47
+ | `/durable <workflow>` | 分析指定工作流程 |
48
+
49
+ ### Interaction Script | 交互脚本
50
+
51
+ #### DETECT / DIAGNOSE
52
+ 1. 分析工作流程结构和失败点
53
+ 2. 识别需要持久化的状态
54
+
55
+ **Decision: 故障类型**
56
+ - IF 暂时性故障(网络、超时) → 建议重试策略(exponential backoff)
57
+ - IF 数据不一致 → 建议检查点 + 补偿事务
58
+ - IF 不可逆失败 → 建议回滚策略
59
+
60
+ **STOP**: 诊断结果展示后等待用户确认策略方向
61
+
62
+ #### RECOVER
63
+ 1. 设计选定的恢复策略
64
+ 2. 展示策略细节和代码建议
65
+
66
+ **STOP**: 策略设计后等待用户确认
67
+
68
+ #### VERIFY
69
+ 1. 建议验证步骤确认恢复成功
70
+
71
+ ### Stop Points | 停止点
72
+
73
+ | 阶段 | 停止点 | 等待内容 |
74
+ |------|--------|---------|
75
+ | DIAGNOSE | 诊断结果后 | 确认策略方向 |
76
+ | RECOVER | 策略设计后 | 确认实施 |
77
+
78
+ ### Error Handling | 错误处理
79
+
80
+ | 错误条件 | AI 动作 |
81
+ |----------|---------|
82
+ | 无法识别工作流程模式 | 询问用户描述工作流程步骤 |
83
+ | 多种故障类型并存 | 逐一分析,建议组合策略 |
84
+
85
+ ## Reference | 参考
86
+
87
+ - Full standard: [durable-execution-assistant](../durable-execution-assistant/SKILL.md)
@@ -0,0 +1,52 @@
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
+ status: current
7
+ ---
8
+
9
+ ---
10
+ name: guide
11
+ description: [UDS] Access Universal Development Standards guides and references.
12
+ ---
13
+
14
+ # /guide 命令
15
+
16
+ > **语言**: [English](../../../../skills/commands/guide.md) | 简体中文
17
+
18
+ `/guide` 命令是访问所有 Universal Development Standards 参考资料和指南的中央入口。
19
+
20
+ ## 用法
21
+
22
+ ```bash
23
+ /guide [topic]
24
+ ```
25
+
26
+ ## 可用主题
27
+
28
+ | 主题 | 说明 | 来源 |
29
+ |------|------|------|
30
+ | `git` | Git 工作流与分支策略 | `skills/git-workflow-guide/` |
31
+ | `testing` | 测试金字塔与策略 | `skills/testing-guide/` |
32
+ | `errors` | 错误码设计规范 | `skills/error-code-guide/` |
33
+ | `logging` | 结构化日志规范 | `skills/logging-guide/` |
34
+ | `structure` | 专案结构约定 | `skills/project-structure-guide/` |
35
+ | `ai-arch` | AI 友好的架构 | `skills/ai-friendly-architecture/` |
36
+ | `ai-collab` | AI 协作与防幻觉 | `skills/ai-collaboration-standards/` |
37
+ | `ai-instruct` | AI 指令文件规范 | `skills/ai-instruction-standards/` |
38
+
39
+ ## 范例
40
+
41
+ - `/guide git` - 显示 Git 分支与命名约定
42
+ - `/guide testing` - 显示测试金字塔与最佳实践
43
+ - `/guide structure` - 显示推荐的专案文件夹结构
44
+ - `/guide` - 列出所有可用指南
45
+
46
+ ## AI 实作说明
47
+
48
+ 当用户调用 `/guide [topic]` 时:
49
+ 1. 识别请求的主题。
50
+ 2. 读取对应的规范/技能文件(例如 `skills/git-workflow-guide/SKILL.md`)。
51
+ 3. 向用户摘要或呈现该文件的关键信息。
52
+ 4. 如果主题缺失或无效,列出可用主题。
@@ -0,0 +1,92 @@
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
+ # Incident Response Assistant | 事故响应助手
16
+
17
+ Guide incident response, root cause analysis and post-mortem documentation.
18
+
19
+ 引导事故响应、根因分析和事后复盘文档撰写。
20
+
21
+ ## Workflow | 工作流程
22
+
23
+ ```
24
+ DETECT ──► TRIAGE ──► MITIGATE ──► RESOLVE ──► POST-MORTEM
25
+ ```
26
+
27
+ ## Usage | 使用方式
28
+
29
+ - `/incident` - 启动交互式事故响应
30
+ - `/incident "API 500 errors"` - 响应特定事故
31
+ - `/incident --post-mortem` - 为已解决事故撰写复盘文档
32
+ - `/incident --sev1` - 启动 SEV1 响应协议
33
+
34
+ ## AI Agent Behavior | AI 代理行为
35
+
36
+ > 遵循 [AI Command Behavior Standards](../../core/ai-command-behavior.md)
37
+
38
+ ### Entry Router | 进入路由
39
+
40
+ | 输入 | AI 动作 |
41
+ |------|---------|
42
+ | `/incident` | 询问事故描述和严重程度,进入 DETECT |
43
+ | `/incident "description"` | 以描述为起点,进入 TRIAGE |
44
+ | `/incident --post-mortem` | 直接进入 POST-MORTEM 阶段 |
45
+ | `/incident --sev1` | 启动 SEV1 紧急响应协议 |
46
+
47
+ ### Interaction Script | 交互脚本
48
+
49
+ #### DETECT / TRIAGE
50
+ 1. 收集事故症状和影响范围
51
+ 2. 评估严重程度(SEV1-4)
52
+
53
+ **Decision: 严重程度**
54
+ - IF SEV1/SEV2 → 立即列出紧急行动清单,建议通知相关人员
55
+ - IF SEV3/SEV4 → 按标准流程排查
56
+
57
+ **STOP**: 严重程度评估后等待用户确认
58
+
59
+ #### MITIGATE
60
+ 1. 建议即时缓解措施
61
+ 2. 追踪缓解状态
62
+
63
+ #### RESOLVE
64
+ 1. 引导根因分析(5 Whys)
65
+ 2. 建议修复方案
66
+
67
+ **STOP**: 修复方案确认后等待用户确认实施
68
+
69
+ #### POST-MORTEM
70
+ 1. 收集时间线、根因、影响
71
+ 2. 生成事后复盘文档
72
+
73
+ **STOP**: 文档生成后等待用户确认写入
74
+
75
+ ### Stop Points | 停止点
76
+
77
+ | 阶段 | 停止点 | 等待内容 |
78
+ |------|--------|---------|
79
+ | TRIAGE | 严重程度评估后 | 确认分级 |
80
+ | RESOLVE | 修复方案提出后 | 确认实施 |
81
+ | POST-MORTEM | 文档生成后 | 确认写入 |
82
+
83
+ ### Error Handling | 错误处理
84
+
85
+ | 错误条件 | AI 动作 |
86
+ |----------|---------|
87
+ | 无法判断严重程度 | 列出分级标准,请用户选择 |
88
+ | 缺乏足够症状信息 | 引导收集更多信息(日志、监控、错误消息) |
89
+
90
+ ## Reference | 参考
91
+
92
+ - Full standard: [incident-response-assistant](../incident-response-assistant/SKILL.md)