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,211 @@
1
+ ---
2
+ source: ../../../../skills/commands/config.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ description: [UDS] Configure project development standards
10
+ allowed-tools: Read, Bash(uds config:*), Bash(uds configure:*), Bash(uds check:*)
11
+ argument-hint: "[type] [--ai-tool <tool>]"
12
+ ---
13
+
14
+ # 設定標準
15
+
16
+ > **Language**: [English](../../../../skills/commands/config.md) | 繁體中文
17
+
18
+ 配置當前專案的 Universal Development Standards 設定。
19
+
20
+ ---
21
+
22
+ ## 互動模式(預設)
23
+
24
+ 當不指定類型時,使用 AskUserQuestion 詢問要配置什麼。
25
+
26
+ ### 步驟 0:顯示目前狀態
27
+
28
+ 首先,執行 `uds check --summary` 顯示目前安裝狀態。
29
+
30
+ ```bash
31
+ uds check --summary
32
+ ```
33
+
34
+ 這幫助用戶在修改前了解目前的配置。
35
+
36
+ ### 步驟 1:詢問配置類型
37
+
38
+ 使用 AskUserQuestion 提供以下選項:
39
+
40
+ | 類別 | 選項 |
41
+ |------|------|
42
+ | **基本選項** | Format、Git Workflow、Merge Strategy、Commit Language、Test Levels |
43
+ | **AI 工具** | 新增或移除 AI 工具整合 |
44
+ | **Skills** | 管理 Skills 安裝(安裝/更新/重新安裝已拒絕的)|
45
+ | **Commands** | 管理 Commands 安裝 |
46
+ | **進階** | Adoption Level、Content Mode |
47
+ | **全部** | 配置所有選項 |
48
+
49
+ ### 步驟 2:根據選擇執行
50
+
51
+ **如果選擇 AI 工具:**
52
+ ```bash
53
+ uds configure --type ai_tools
54
+ ```
55
+
56
+ **如果選擇 Skills:**
57
+ ```bash
58
+ uds configure --type skills
59
+ ```
60
+
61
+ **如果選擇 Commands:**
62
+ ```bash
63
+ uds configure --type commands
64
+ ```
65
+
66
+ **如果選擇 Adoption Level:**
67
+ ```bash
68
+ uds configure --type level
69
+ ```
70
+
71
+ **如果選擇 Content Mode:**
72
+ ```bash
73
+ uds configure --type content_mode
74
+ ```
75
+
76
+ ## 快速模式
77
+
78
+ 指定類型時,跳過互動式問題:
79
+
80
+ ```bash
81
+ /config ai_tools # 直接配置 AI 工具
82
+ /config skills # 直接管理 Skills
83
+ /config commands # 直接管理 Commands
84
+ /config level # 直接配置採用等級
85
+ /config content_mode # 直接配置內容模式
86
+ ```
87
+
88
+ ### 非互動式安裝
89
+
90
+ 使用 `--ai-tool` 選項為特定工具安裝 Skills/Commands,無需提示:
91
+
92
+ ```bash
93
+ # 為特定工具安裝 Skills(專案層級,預設)
94
+ uds configure --type skills --ai-tool opencode
95
+
96
+ # 為特定工具安裝 Skills(使用者層級)
97
+ uds configure --type skills --ai-tool opencode --skills-location user
98
+
99
+ # 為特定工具安裝 Skills(專案層級,明確指定)
100
+ uds configure --type skills --ai-tool claude-code --skills-location project
101
+
102
+ # 為特定工具安裝 Commands
103
+ uds configure --type commands --ai-tool copilot
104
+ ```
105
+
106
+ **Skills 位置選項:**
107
+
108
+ | 選項 | 路徑 | 說明 |
109
+ |------|------|------|
110
+ | `project` | `.claude/skills/`, `.opencode/skill/` | 專案特定(預設)|
111
+ | `user` | `~/.claude/skills/`, `~/.opencode/skill/` | 跨專案共享 |
112
+
113
+ ## 設定類型
114
+
115
+ | 類型 | 說明 |
116
+ |------|------|
117
+ | `ai_tools` | AI 工具整合 |
118
+ | `skills` | Skills 安裝管理 |
119
+ | `commands` | Commands 安裝管理 |
120
+ | `level` | 採用等級(1/2/3)|
121
+ | `content_mode` | 整合檔案內容模式 |
122
+ | `format` | AI/人類文件格式 |
123
+ | `workflow` | Git 工作流程策略 |
124
+ | `merge_strategy` | 合併策略 |
125
+ | `commit_language` | 提交訊息語言 |
126
+ | `test_levels` | 測試層級 |
127
+ | `methodology` | 開發方法論(實驗性,需要 -E)|
128
+ | `all` | 設定所有選項 |
129
+
130
+ ## Skills 配置
131
+
132
+ 選擇 `skills` 類型時,CLI 顯示:
133
+
134
+ 1. **目前狀態** - 顯示每個 AI 工具已安裝的 Skills
135
+ 2. **拒絕狀態** - 顯示使用者之前拒絕 Skills 的工具
136
+ 3. **動作選單**:
137
+ - 安裝/更新 Skills
138
+ - 重新安裝已拒絕的 Skills
139
+ - 僅檢視狀態
140
+
141
+ ```
142
+ Current Skills status:
143
+ ✓ Claude Code:
144
+ - User: v3.5.1
145
+ ○ OpenCode: Not installed
146
+ ⊘ Copilot: Previously declined
147
+
148
+ ? What would you like to do?
149
+ ❯ Install/Update Skills
150
+ Reinstall declined Skills
151
+ View status only
152
+ Cancel
153
+ ```
154
+
155
+ ## Commands 配置
156
+
157
+ 選擇 `commands` 類型時,CLI 顯示:
158
+
159
+ 1. **目前狀態** - 顯示每個支援工具已安裝的 Commands
160
+ 2. **拒絕狀態** - 顯示使用者之前拒絕 Commands 的工具
161
+ 3. **動作選單**與 Skills 類似
162
+
163
+ 支援 Commands 的工具:
164
+ - OpenCode (`.opencode/commands/`)
165
+ - GitHub Copilot (`.github/commands/`)
166
+ - Gemini CLI (`.gemini/commands/`)
167
+ - Roo Code (`.roo-code/commands/`)
168
+
169
+ ## 內容模式選項
170
+
171
+ | 模式 | 說明 |
172
+ |------|------|
173
+ | `standard` | 摘要 + 任務映射,AI 知道何時讀取哪個標準(推薦)|
174
+ | `full` | 將所有標準完整內嵌於整合檔案 |
175
+ | `minimal` | 僅內嵌核心規則 |
176
+
177
+ ## 設定變更的影響
178
+
179
+ | 配置 | 影響 |
180
+ |------|------|
181
+ | AI 工具(新增)| 產生新的整合檔案 |
182
+ | AI 工具(移除)| 刪除整合檔案 |
183
+ | Skills | 安裝/更新 Skills 至已配置的路徑 |
184
+ | Commands | 安裝/更新 Commands 至已配置的路徑 |
185
+ | Level | 更新標準,重新產生整合 |
186
+ | Content Mode | 重新產生所有整合檔案 |
187
+
188
+ ## 拒絕的功能
189
+
190
+ CLI 在 `manifest.declinedFeatures` 中追蹤拒絕的 Skills/Commands:
191
+
192
+ - 之前拒絕的工具不會在 `/update` 提示中出現
193
+ - 使用 `/config skills` 或 `/config commands` 重新安裝已拒絕的功能
194
+ - 從選單中選擇「重新安裝已拒絕的 Skills/Commands」
195
+
196
+ ## 選項參考
197
+
198
+ | 選項 | 說明 |
199
+ |------|------|
200
+ | `--type <type>` | 配置類型 |
201
+ | `--ai-tool <tool>` | 特定 AI 工具(非互動式)|
202
+ | `--skills-location <loc>` | Skills 安裝位置:project、user |
203
+ | `--yes`, `-y` | 跳過確認提示 |
204
+ | `-E`, `--experimental` | 啟用實驗性功能 |
205
+
206
+ ## 參考
207
+
208
+ - CLI 文件:`uds configure --help`
209
+ - 初始化命令:[/init](./init.md)
210
+ - 檢查命令:[/check](./check.md)
211
+ - 更新命令:[/update](./update.md)
@@ -0,0 +1,78 @@
1
+ ---
2
+ source: ../../../../skills/commands/coverage.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ description: [UDS] Analyze test coverage and provide recommendations
10
+ allowed-tools: Read, Grep, Glob, Bash(npm run test:coverage:*), Bash(npx:*)
11
+ argument-hint: "[file or module to analyze | 要分析的檔案或模組]"
12
+ ---
13
+
14
+ # 測試覆蓋率助手
15
+
16
+ > **Language**: [English](../../../../skills/commands/coverage.md) | 繁體中文
17
+
18
+ 多維度分析測試覆蓋率並提供可執行的建議。
19
+
20
+ ---
21
+
22
+ ## 覆蓋率維度
23
+
24
+ | 維度 | 測量內容 |
25
+ |------|----------|
26
+ | **Line** | 執行的行數 |
27
+ | **Branch** | 決策路徑 |
28
+ | **Function** | 呼叫的函數 |
29
+ | **Statement** | 執行的陳述式 |
30
+
31
+ ## 八維度框架
32
+
33
+ 1. **程式碼覆蓋率** - 行數、分支、函數
34
+ 2. **需求覆蓋率** - 所有需求已測試
35
+ 3. **風險覆蓋率** - 高風險區域已測試
36
+ 4. **整合覆蓋率** - 元件互動
37
+ 5. **邊界情況覆蓋率** - 邊界條件
38
+ 6. **錯誤覆蓋率** - 錯誤處理路徑
39
+ 7. **權限覆蓋率** - 存取控制場景
40
+ 8. **AI 生成品質** - AI 產生測試的有效性
41
+
42
+ ## 工作流程
43
+
44
+ 1. **執行覆蓋率工具** - 產生覆蓋率報告
45
+ 2. **分析缺口** - 找出未測試的區域
46
+ 3. **排序優先級** - 依風險和重要性排序
47
+ 4. **建議測試** - 建議應新增的具體測試
48
+ 5. **追蹤進度** - 隨時間監控覆蓋率
49
+
50
+ ## 覆蓋率目標
51
+
52
+ | 等級 | 覆蓋率 | 適用場景 |
53
+ |------|--------|----------|
54
+ | 最低 | 60% | 舊有程式碼 |
55
+ | 標準 | 80% | 大多數專案 |
56
+ | 高 | 90% | 關鍵系統 |
57
+ | 關鍵 | 95%+ | 安全關鍵系統 |
58
+
59
+ ## 使用方式
60
+
61
+ - `/coverage` - 執行完整覆蓋率分析
62
+ - `/coverage src/auth` - 分析特定模組
63
+ - `/coverage --recommend` - 取得測試建議
64
+
65
+ ## AC 覆蓋率(需求層級)
66
+
67
+ 本命令(`/coverage`)分析**程式碼層級**覆蓋率(line/branch/function)。若需**需求層級**覆蓋率 — 追蹤哪些驗收條件(AC)有對應測試 — 請使用 [`/ac-coverage`](./ac-coverage.md)。
68
+
69
+ | | `/coverage` | `/ac-coverage` |
70
+ |-|-------------|----------------|
71
+ | **層級** | 程式碼(line/branch/function)| 需求(AC 對測試)|
72
+ | **問題** | 「多少程式碼被測試了?」| 「哪些 AC 有測試?」|
73
+
74
+ ## 參考
75
+
76
+ - 完整標準:[test-coverage-assistant](../test-coverage-assistant/SKILL.md)
77
+ - 核心指南:[testing-standards](../../core/testing-standards.md)
78
+ - AC 覆蓋率:[/ac-coverage](./ac-coverage.md) — 需求層級追溯
@@ -0,0 +1,76 @@
1
+ ---
2
+ source: ../../../../skills/commands/database.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 database design, migration planning and query optimization"
11
+ allowed-tools: Read, Grep, Glob
12
+ argument-hint: "[schema or migration to review | 要審查的 schema 或遷移]"
13
+ ---
14
+
15
+ # 資料庫助手
16
+
17
+ 引導資料庫設計、遷移規劃和查詢最佳化。
18
+
19
+ ## 工作流程
20
+
21
+ ```
22
+ PLAN ──► WRITE ──► TEST ──► DEPLOY ──► VERIFY
23
+ ```
24
+
25
+ ## 使用方式
26
+
27
+ - `/database` - 開始互動式資料庫設計
28
+ - `/database schema` - 審查或設計 schema
29
+ - `/database --migration` - 規劃遷移
30
+
31
+ ## AI Agent Behavior | AI 代理行為
32
+
33
+ > 遵循 [AI Command Behavior Standards](../../core/ai-command-behavior.md)
34
+
35
+ ### Entry Router | 進入路由
36
+
37
+ | 輸入 | AI 動作 |
38
+ |------|---------|
39
+ | `/database` | 詢問任務類型(schema 設計 / 遷移規劃 / 查詢優化) |
40
+ | `/database schema` | 進入 schema 設計/審查模式 |
41
+ | `/database --migration` | 進入遷移規劃模式 |
42
+
43
+ ### Interaction Script | 互動腳本
44
+
45
+ 1. 確認任務類型和目標
46
+ 2. 分析現有 schema 或遷移檔案
47
+
48
+ **決策:任務類型**
49
+ - IF schema 設計 → 引導正規化、索引設計、關聯定義
50
+ - IF 遷移規劃 → 評估風險、產生遷移腳本、規劃回滾
51
+ - IF 查詢優化 → 分析慢查詢、建議索引
52
+
53
+ 3. 展示設計/計畫結果
54
+
55
+ 🛑 **STOP**: 結果展示後等待使用者確認
56
+
57
+ 🛑 **STOP**: 遷移腳本寫入前等待使用者確認
58
+
59
+ ### Stop Points | 停止點
60
+
61
+ | 停止點 | 等待內容 |
62
+ |--------|---------|
63
+ | 設計/計畫展示後 | 確認方案 |
64
+ | 遷移腳本生成後 | 確認寫入 |
65
+
66
+ ### Error Handling | 錯誤處理
67
+
68
+ | 錯誤條件 | AI 動作 |
69
+ |----------|---------|
70
+ | 無法偵測資料庫類型 | 詢問使用者(PostgreSQL/MySQL/MongoDB 等) |
71
+ | 遷移存在資料遺失風險 | 明確警告,要求使用者確認 |
72
+
73
+ ## 參考
74
+
75
+ - 完整標準:[database-assistant](../database-assistant/SKILL.md)
76
+ - 核心指南:[database-standards](../../core/database-standards.md)
@@ -0,0 +1,62 @@
1
+ ---
2
+ source: ../../../../skills/commands/derive-all.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ description: [UDS] Derive all test structures (BDD, TDD, ATDD) from SDD specification
10
+ allowed-tools: Read, Write, Grep, Glob
11
+ argument-hint: "[spec file path | 規格檔案路徑]"
12
+ ---
13
+
14
+ # /derive-all — 完整正向推演
15
+
16
+ > **Language**: [English](../../../../skills/commands/derive-all.md) | 繁體中文
17
+
18
+ 從已核准的 SDD 規格推演所有測試結構(BDD + TDD + 可選 ATDD)。
19
+
20
+ ---
21
+
22
+ ## 工作流程
23
+
24
+ ```
25
+ SPEC-XXX.md ──► /derive-bdd ──► /derive-tdd ──► [/derive-atdd] ──► Report
26
+ ```
27
+
28
+ 1. **解析** SDD 規格並驗證已核准
29
+ 2. **執行** `/derive-bdd` 產生 Gherkin 場景
30
+ 3. **執行** `/derive-tdd` 產生測試骨架
31
+ 4. **可選** 執行 `/derive-atdd` 產生驗收測試表格
32
+ 5. **產生** `DERIVATION-REPORT.md` 彙總所有輸出
33
+
34
+ ## 輸出檔案
35
+
36
+ | 檔案 | 內容 |
37
+ |------|------|
38
+ | `features/SPEC-XXX.feature` | BDD Gherkin 場景 |
39
+ | `tests/SPEC-XXX.test.ts` | TDD 測試骨架 |
40
+ | `DERIVATION-REPORT.md` | 摘要與統計 |
41
+
42
+ ## 使用方式
43
+
44
+ | 命令 | 用途 |
45
+ |------|------|
46
+ | `/derive-all specs/SPEC-001.md` | 從規格完整推演 |
47
+ | `/derive-all` | 互動式 — 詢問規格檔案 |
48
+
49
+ ## 典型 SDD 工作流程
50
+
51
+ ```bash
52
+ /sdd user-authentication # 步驟 1:建立規格
53
+ /sdd review specs/SPEC-001.md # 步驟 2:審查
54
+ /derive-all specs/SPEC-001.md # 步驟 3:推演測試
55
+ # 步驟 4:實作 — 填入 [TODO] 標記
56
+ ```
57
+
58
+ ## 參考
59
+
60
+ - 父命令:[/derive](../forward-derivation/SKILL.md)
61
+ - 核心標準:[forward-derivation-standards.md](../../core/forward-derivation-standards.md)
62
+ - 子命令:[/derive-bdd](./derive-bdd.md)、[/derive-tdd](./derive-tdd.md)、[/derive-atdd](./derive-atdd.md)
@@ -0,0 +1,58 @@
1
+ ---
2
+ source: ../../../../skills/commands/derive-atdd.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ description: [UDS] Derive ATDD acceptance tests from SDD specification
10
+ allowed-tools: Read, Write, Grep, Glob
11
+ argument-hint: "[spec file path | 規格檔案路徑]"
12
+ ---
13
+
14
+ # /derive-atdd — 推演 ATDD 驗收測試
15
+
16
+ > **Language**: [English](../../../../skills/commands/derive-atdd.md) | 繁體中文
17
+
18
+ 從已核准的 SDD 規格文件推演 ATDD 驗收測試表格。
19
+
20
+ ---
21
+
22
+ ## 工作流程
23
+
24
+ ```
25
+ SPEC-XXX.md ──► Parse AC ──► Generate acceptance.md ──► Review
26
+ ```
27
+
28
+ 1. **讀取** SDD 規格並提取驗收條件
29
+ 2. **映射** 每個 AC 為驗收測試表格(Given-When-Then 欄位)
30
+ 3. **產生** `acceptance.md`,包含測試資料和預期結果
31
+ 4. **輸出** 推演摘要
32
+
33
+ ## 輸出格式
34
+
35
+ ```markdown
36
+ # Acceptance Tests: SPEC-001
37
+
38
+ ## AC-1: [Description]
39
+
40
+ | # | Given | When | Then | Status |
41
+ |---|-------|------|------|--------|
42
+ | 1 | [precondition] | [action] | [expected] | ⬜ |
43
+ | 2 | [precondition] | [action] | [expected] | ⬜ |
44
+ ```
45
+
46
+ ## 使用方式
47
+
48
+ | 命令 | 用途 |
49
+ |------|------|
50
+ | `/derive-atdd specs/SPEC-001.md` | 從特定規格推演 ATDD |
51
+ | `/derive-atdd` | 互動式 — 詢問規格檔案 |
52
+
53
+ > **注意**:BDD 場景已可作為可執行的驗收測試。`/derive-atdd` 適用於專門的手動測試工作流程。
54
+
55
+ ## 參考
56
+
57
+ - 父命令:[/derive](../forward-derivation/SKILL.md)
58
+ - 核心標準:[forward-derivation-standards.md](../../core/forward-derivation-standards.md)
@@ -0,0 +1,54 @@
1
+ ---
2
+ source: ../../../../skills/commands/derive-bdd.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ description: [UDS] Derive BDD Gherkin scenarios from SDD specification
10
+ allowed-tools: Read, Write, Grep, Glob
11
+ argument-hint: "[spec file path | 規格檔案路徑]"
12
+ ---
13
+
14
+ # 推演 BDD 場景
15
+
16
+ > **Language**: [English](../../../../skills/commands/derive-bdd.md) | 繁體中文
17
+
18
+ 從已核准的 SDD 規格文件推演 Gherkin `.feature` 檔案。
19
+
20
+ ## 工作流程
21
+
22
+ ```
23
+ SPEC-XXX.md ──► Parse AC ──► Generate .feature ──► Review
24
+ ```
25
+
26
+ 1. **讀取** SDD 規格並萃取驗收條件
27
+ 2. **對應** 每個 AC 到一個 Gherkin Scenario(1:1)
28
+ 3. **產生** `.feature` 檔案,包含 `@SPEC-XXX` 和 `@AC-N` 標籤
29
+ 4. **輸出** 推演摘要
30
+
31
+ ## 輸出格式
32
+
33
+ ```gherkin
34
+ @SPEC-001
35
+ Feature: [Feature Name]
36
+
37
+ @AC-1
38
+ Scenario: [AC-1 description]
39
+ Given [context]
40
+ When [action]
41
+ Then [expected result]
42
+ ```
43
+
44
+ ## 使用方式
45
+
46
+ | 指令 | 用途 |
47
+ |------|------|
48
+ | `/derive-bdd specs/SPEC-001.md` | 從特定規格推演 BDD |
49
+ | `/derive-bdd` | 互動式 — 詢問規格檔案 |
50
+
51
+ ## 參考
52
+
53
+ - 父指令:[/derive](../forward-derivation/SKILL.md)
54
+ - 核心規範:[forward-derivation-standards.md](../../core/forward-derivation-standards.md)
@@ -0,0 +1,55 @@
1
+ ---
2
+ source: ../../../../skills/commands/derive-tdd.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ description: [UDS] Derive TDD test skeletons from SDD specification
10
+ allowed-tools: Read, Write, Grep, Glob
11
+ argument-hint: "[spec file path | 規格檔案路徑]"
12
+ ---
13
+
14
+ # 推演 TDD 測試骨架
15
+
16
+ > **Language**: [English](../../../../skills/commands/derive-tdd.md) | 繁體中文
17
+
18
+ 從已核准的 SDD 規格文件推演測試骨架檔案。
19
+
20
+ ## 工作流程
21
+
22
+ ```
23
+ SPEC-XXX.md ──► Parse AC ──► Generate .test.ts ──► Review
24
+ ```
25
+
26
+ 1. **讀取** SDD 規格並萃取驗收條件
27
+ 2. **對應** 每個 AC 到一個 `describe`/`it` 區塊,使用 AAA 模式
28
+ 3. **產生** 測試檔案,包含 `[TODO]` 標記供實作填入
29
+ 4. **輸出** 推演摘要
30
+
31
+ ## 輸出格式
32
+
33
+ ```typescript
34
+ describe('SPEC-001: [Feature Name]', () => {
35
+ describe('AC-1: [AC description]', () => {
36
+ it('should [expected behavior]', () => {
37
+ // Arrange — [TODO]
38
+ // Act — [TODO]
39
+ // Assert — [TODO]
40
+ });
41
+ });
42
+ });
43
+ ```
44
+
45
+ ## 使用方式
46
+
47
+ | 指令 | 用途 |
48
+ |------|------|
49
+ | `/derive-tdd specs/SPEC-001.md` | 從特定規格推演 TDD |
50
+ | `/derive-tdd` | 互動式 — 詢問規格檔案 |
51
+
52
+ ## 參考
53
+
54
+ - 父指令:[/derive](../forward-derivation/SKILL.md)
55
+ - 核心規範:[forward-derivation-standards.md](../../core/forward-derivation-standards.md)
@@ -0,0 +1,79 @@
1
+ ---
2
+ source: ../../../../skills/commands/derive.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-19
6
+ ---
7
+
8
+ ---
9
+ name: derive
10
+ description: [UDS] Derive BDD scenarios, TDD skeletons, or ATDD tables from specifications.
11
+ argument-hint: "[all|bdd|tdd|atdd] <spec-file> [--lang <lang>] [--framework <fw>] [--output-dir <dir>]"
12
+ ---
13
+
14
+ # 推演測試結構
15
+
16
+ > **Language**: [English](../../../../skills/commands/derive.md) | 繁體中文
17
+
18
+ 從已批准的 SDD 規格生成衍生工件(BDD 場景、TDD 骨架、ATDD 表格)。
19
+
20
+ ## 用法
21
+
22
+ ```bash
23
+ /derive [subcommand] <spec-file> [options]
24
+ ```
25
+
26
+ ### 子命令
27
+
28
+ | 子命令 | 說明 | 輸出 |
29
+ |--------|------|------|
30
+ | `all` | 產生 BDD + TDD(預設) | `.feature` + `.test.*` |
31
+ | `bdd` | 僅產生 BDD 場景 | `.feature` |
32
+ | `tdd` | 僅產生 TDD 骨架 | `.test.*` |
33
+ | `atdd` | 產生 ATDD 測試表格 | `.md`(Markdown 表格) |
34
+
35
+ ### 選項
36
+
37
+ | 選項 | 說明 | 預設值 |
38
+ |------|------|--------|
39
+ | `--lang` | 目標語言(ts、python 等) | 自動偵測或 `ts` |
40
+ | `--framework` | 測試框架(vitest、pytest 等) | 自動偵測或 `vitest` |
41
+ | `--output-dir` | 輸出目錄 | `./generated` |
42
+ | `--dry-run` | 預覽輸出但不寫入 | `false` |
43
+
44
+ ## 工作流程
45
+
46
+ 1. **讀取規格**:分析輸入的 `SPEC-XXX.md` 檔案。
47
+ 2. **萃取 AC**:解析所有驗收條件。
48
+ 3. **產生工件**:
49
+ * **BDD**:將 AC 轉換為 Gherkin `Scenario` 格式。
50
+ * **TDD**:建立測試檔案骨架,以 `describe`/`it` 區塊對應 AC。
51
+ * **ATDD**:建立 Markdown 表格,包含輸入/輸出/通過-失敗欄位。
52
+ 4. **驗證**:確保 AC 與生成項目之間為 1:1 對應。
53
+
54
+ ## 防幻覺
55
+
56
+ * **1:1 對應**:每個 AC 必須恰好對應一個測試/場景。
57
+ * **可追溯性**:所有生成的工件必須引用來源規格 ID 和 AC ID。
58
+ * **禁止捏造**:不得新增規格中不存在的場景。
59
+
60
+ ## 範例
61
+
62
+ ```bash
63
+ # 推演全部(BDD + TDD)
64
+ /derive all specs/SPEC-001.md
65
+
66
+ # 僅推演 BDD 場景
67
+ /derive bdd specs/SPEC-001.md
68
+
69
+ # 推演 Python 的 TDD
70
+ /derive tdd specs/SPEC-001.md --lang python --framework pytest
71
+
72
+ # 推演 ATDD 表格供手動測試
73
+ /derive atdd specs/SPEC-001.md
74
+ ```
75
+
76
+ ## 參考
77
+
78
+ * [正向推演標準](../forward-derivation/SKILL.md)
79
+ * [核心規範](../../core/forward-derivation-standards.md)