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
package/bin/uds.js CHANGED
@@ -76,6 +76,8 @@ program
76
76
  .option('--locale <locale>', 'Locale extension (zh-tw)')
77
77
  .option('--skills-location <location>', 'Skills location (marketplace, user, project, none) [default: marketplace]')
78
78
  .option('--content-mode <mode>', 'Content mode for integration files (minimal, index, full) [default: index]')
79
+ .option('--agents-md', 'Generate AGENTS.md universal summary')
80
+ .option('--no-agents-md', 'Skip AGENTS.md generation')
79
81
  .option('-y, --yes', 'Use defaults, skip interactive prompts')
80
82
  .option('-E, --experimental', 'Enable experimental features (methodology)')
81
83
  .action(initCommand);
@@ -112,7 +114,7 @@ program
112
114
 
113
115
  program
114
116
  .command('check')
115
- .description('Check adoption status of current project')
117
+ .description('Check file integrity and adoption status (quick validation). For deep health diagnosis, use "uds audit"')
116
118
  .option('-s, --standard <id>', 'Validate against a specific standard physical spec')
117
119
  .option('--json', 'Output result in JSON format')
118
120
  .option('--summary', 'Show compact status summary (for use by other commands)')
@@ -172,7 +174,7 @@ program
172
174
 
173
175
  program
174
176
  .command('audit')
175
- .description('Audit UDS installation and collect feedback')
177
+ .description('Deep health diagnosis with pattern detection and feedback (strategic). For quick file check, use "uds check"')
176
178
  .option('--health', 'Health check only')
177
179
  .option('--patterns', 'Pattern detection only')
178
180
  .option('--friction', 'Friction detection only')
@@ -197,7 +199,7 @@ program
197
199
  // Spec command with subcommands (Vibe Coding)
198
200
  const specCommand = program
199
201
  .command('spec')
200
- .description('Manage micro-specs for vibe coding');
202
+ .description('Manage lightweight micro-specs for vibe coding. For full spec lifecycle with review, use "/sdd"');
201
203
 
202
204
  specCommand
203
205
  .command('create <intent>')
@@ -0,0 +1,178 @@
1
+ # Acceptance Criteria Traceability Standards - AI Optimized
2
+ # Source: core/acceptance-criteria-traceability.md
3
+
4
+ standard:
5
+ id: acceptance-criteria-traceability
6
+ name: Acceptance Criteria Traceability
7
+ description: AC-to-test traceability matrix, coverage calculation, and spec generation quality rules
8
+
9
+ meta:
10
+ version: "1.0.0"
11
+ updated: "2026-03-18"
12
+ source: core/acceptance-criteria-traceability.md
13
+ references:
14
+ - "ISO/IEC/IEEE 29119-3 (Test Documentation — Traceability Matrix)"
15
+ - "IEEE 830 (Software Requirements Specification — Traceability)"
16
+ - "ISTQB Foundation (Requirements-based testing)"
17
+ - "INVEST Principles (Acceptance criteria quality)"
18
+
19
+ traceability_matrix:
20
+ description: Standard format for tracking AC to test relationships
21
+ fields:
22
+ - name: AC-ID
23
+ required: true
24
+ description: Unique identifier from specification (e.g., AC-1)
25
+ - name: Test File
26
+ required: conditionally
27
+ description: Path to test file (required if covered)
28
+ - name: Test Name
29
+ required: conditionally
30
+ description: Name of test case or describe block (required if covered)
31
+ - name: Status
32
+ required: true
33
+ description: "Coverage status: covered, partial, uncovered"
34
+ - name: Notes
35
+ required: false
36
+ description: Additional context (blockers, dependencies)
37
+
38
+ linking_convention:
39
+ description: Tests must reference source AC using standard annotations
40
+ annotations:
41
+ - "@AC AC-N — in test name or comment"
42
+ - "@SPEC SPEC-XXX — in test name or comment"
43
+ - "describe('AC-N: description') — in test structure"
44
+
45
+ coverage_status:
46
+ definitions:
47
+ - status: covered
48
+ symbol: "✅"
49
+ definition: AC is fully tested
50
+ criteria: All conditions in AC have corresponding test assertions
51
+
52
+ - status: partial
53
+ symbol: "⚠️"
54
+ definition: AC is partially tested
55
+ criteria: Some conditions tested, but edge cases or paths missing
56
+
57
+ - status: uncovered
58
+ symbol: "❌"
59
+ definition: AC has no tests
60
+ criteria: No test case references this AC
61
+
62
+ calculation:
63
+ formula: "AC Coverage % = (covered_count + partial_count × 0.5) / total_ac_count × 100"
64
+ note: Partial counts as 0.5 for coverage calculation
65
+
66
+ quality_thresholds:
67
+ defaults:
68
+ - name: Minimum AC Coverage
69
+ value: 100
70
+ enforcement: Required for production release
71
+ - name: Minimum for Check-in
72
+ value: 80
73
+ enforcement: Required for feature branch merge
74
+ - name: Warning Level
75
+ value: 60
76
+ enforcement: Triggers coverage warning
77
+
78
+ configurable: true
79
+ config_example:
80
+ acCoverage:
81
+ minimum: 100
82
+ checkinMinimum: 80
83
+ warningLevel: 60
84
+ partialWeight: 0.5
85
+
86
+ spec_generation_quality:
87
+ description: Rules for automatically generating specifications from PRD/user stories
88
+ ac_quality_criteria:
89
+ - criterion: Specific
90
+ description: AC describes concrete, observable behavior
91
+ validation: No vague terms like "should work well"
92
+
93
+ - criterion: Measurable
94
+ description: AC has quantifiable or verifiable outcome
95
+ validation: Contains expected values, states, or behaviors
96
+
97
+ - criterion: Achievable
98
+ description: AC is technically feasible
99
+ validation: References known APIs, data, or capabilities
100
+
101
+ - criterion: Relevant
102
+ description: AC relates to feature purpose
103
+ validation: Maps to user need or business requirement
104
+
105
+ - criterion: Testable
106
+ description: AC can be verified by a test
107
+ validation: Can be expressed as Given-When-Then
108
+
109
+ io_contract:
110
+ input_types:
111
+ - type: PRD
112
+ required_fields: Title, Description, User Stories
113
+ - type: User Story
114
+ required_fields: As a / I want / So that
115
+ - type: Feature Brief
116
+ required_fields: Feature name, Goals, Constraints
117
+
118
+ output_requirements:
119
+ - section: SPEC ID
120
+ required: true
121
+ - section: Title
122
+ required: true
123
+ - section: Description
124
+ required: true
125
+ - section: Acceptance Criteria
126
+ required: true
127
+ format: Numbered list (AC-1, AC-2, ...)
128
+ - section: AC Format
129
+ required: true
130
+ format: Given-When-Then or structured bullet
131
+ - section: Testability Flag
132
+ required: true
133
+ format: Each AC marked as testable/not-testable
134
+
135
+ validation_rules:
136
+ - "AC count >= 1"
137
+ - "No duplicate AC descriptions"
138
+ - "Happy path + at least 1 error/edge case"
139
+ - "100% of AC must be testable"
140
+ - "Each AC links back to source requirement"
141
+
142
+ rules:
143
+ - id: annotate-tests
144
+ trigger: writing tests for a specification
145
+ instruction: Always annotate tests with AC-ID and SPEC-ID using standard annotations
146
+ priority: required
147
+
148
+ - id: honest-status
149
+ trigger: reporting AC coverage
150
+ instruction: Use honest status classification (covered/partial/uncovered); never inflate coverage
151
+ priority: required
152
+
153
+ - id: track-all-ac
154
+ trigger: creating traceability matrix
155
+ instruction: Include ALL AC from specification, even uncovered ones
156
+ priority: required
157
+
158
+ - id: testable-ac
159
+ trigger: generating or reviewing specifications
160
+ instruction: Ensure all AC are testable; flag non-testable AC for revision
161
+ priority: required
162
+
163
+ - id: coverage-gate
164
+ trigger: before check-in or merge
165
+ instruction: Verify AC coverage meets project threshold before allowing commit
166
+ priority: recommended
167
+
168
+ - id: spec-quality
169
+ trigger: generating specifications automatically
170
+ instruction: Validate generated AC against SMART criteria and testability
171
+ priority: required
172
+
173
+ related_standards:
174
+ - forward-derivation-standards.md
175
+ - spec-driven-development.md
176
+ - testing-standards.md
177
+ - checkin-standards.md
178
+ - test-governance.md
@@ -0,0 +1,69 @@
1
+ # Agent Dispatch & Parallel Coordination - AI Optimized
2
+ # Source: core/agent-dispatch.md
3
+ # Inspired by Superpowers dispatching-parallel-agents + subagent-driven-development (MIT)
4
+
5
+ standard:
6
+ id: agent-dispatch
7
+ name: Agent Dispatch & Parallel Coordination
8
+ description: 子代理派遣與並行協調標準
9
+
10
+ meta:
11
+ version: "1.0.0"
12
+ updated: "2026-03-20"
13
+ source: core/agent-dispatch.md
14
+ description: 子代理派遣、並行協調與狀態回報標準
15
+ inspired_by: superpowers/subagent-driven-development
16
+
17
+ guidelines:
18
+ - "派遣前必須識別獨立域(無共享狀態 → 可並行)"
19
+ - "每個代理的 prompt 必須 Focused(單一問題域)、Self-contained(完整上下文)、Specific output(明確回報格式)"
20
+ - "代理必須回報明確狀態:DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT / BLOCKED"
21
+ - "並行代理返回後必須檢查檔案衝突"
22
+ - "所有代理完成後必須跑完整測試套件驗證整合"
23
+
24
+ status_protocol:
25
+ - status: DONE
26
+ description: "任務完成,無問題"
27
+ orchestrator_action: "繼續後續任務"
28
+ - status: DONE_WITH_CONCERNS
29
+ description: "任務完成,但有疑慮需記錄"
30
+ orchestrator_action: "記錄 concerns 到報告,繼續後續任務"
31
+ - status: NEEDS_CONTEXT
32
+ description: "需要更多上下文才能完成"
33
+ orchestrator_action: "注入額外 context,重新派遣(不計為 retry)"
34
+ - status: BLOCKED
35
+ description: "無法完成,需要人工介入或升級處理"
36
+ orchestrator_action: "嘗試升級模型或拆分任務"
37
+
38
+ prompt_structure:
39
+ - principle: Focused
40
+ description: "每個代理只處理單一問題域"
41
+ - principle: Self-contained
42
+ description: "prompt 包含完整執行所需的上下文"
43
+ - principle: Specific_output
44
+ description: "明確定義期望的回報格式"
45
+
46
+ rules:
47
+ - id: AD-001
48
+ trigger: "多個代理編輯相同檔案"
49
+ action: "標記衝突,需要人工或自動合併"
50
+ priority: critical
51
+ - id: AD-002
52
+ trigger: "代理回報 BLOCKED"
53
+ action: "嘗試升級模型等級再試一次"
54
+ priority: high
55
+ - id: AD-003
56
+ trigger: "所有並行代理完成"
57
+ action: "跑完整測試套件驗證整合"
58
+ priority: high
59
+
60
+ physical_spec:
61
+ type: checklist
62
+ validator:
63
+ type: ai_review
64
+ rule: "檢查代理派遣是否遵循獨立域識別、prompt 三原則、狀態協定"
65
+ checks:
66
+ - "並行代理是否在獨立域上工作(無共享檔案)"
67
+ - "代理 prompt 是否包含完整上下文"
68
+ - "代理是否回報標準化狀態碼"
69
+ - "並行完成後是否執行整合測試"
@@ -0,0 +1,45 @@
1
+ # AI Command Behavior Standards (AI-Optimized)
2
+ # Source: core/ai-command-behavior.md
3
+
4
+ id: ai-command-behavior
5
+ meta:
6
+ version: "1.0.0"
7
+ updated: "2026-03-24"
8
+ source: core/ai-command-behavior.md
9
+ description: Standard structure for specifying AI Agent runtime behavior in command/skill definition files
10
+
11
+ rules:
12
+ - id: behavior-section
13
+ trigger: creating or modifying command definition files
14
+ instruction: Include an "AI Agent Behavior" section with four subsections - Entry Router, Interaction Script, Stop Points, Error Handling
15
+ priority: recommended
16
+
17
+ - id: entry-router
18
+ trigger: command supports multiple invocation patterns
19
+ instruction: Define a decision table mapping each invocation pattern to a specific AI action. The "no arguments" case MUST always be defined
20
+ priority: required
21
+
22
+ - id: interaction-script
23
+ trigger: command requires multi-step AI interaction
24
+ instruction: Use mixed granularity - precise IF/THEN for decision points, numbered lists for general steps
25
+ priority: recommended
26
+
27
+ - id: stop-points
28
+ trigger: command involves file writes, irreversible operations, or phase completions
29
+ instruction: Mark explicit stop points with 🛑 STOP markers. Never rely on AI judgment for when to pause
30
+ priority: required
31
+
32
+ - id: error-handling
33
+ trigger: command has prerequisites or can encounter unexpected states
34
+ instruction: Define error conditions and AI actions. Never silently skip failures. Stop and ask when uncertain
35
+ priority: required
36
+
37
+ - id: applicability
38
+ trigger: evaluating whether a command needs behavior definition
39
+ instruction: Multi-phase workflows and multi-invocation commands require full definition. Single-action and pure-query commands do not
40
+ priority: recommended
41
+
42
+ related_standards:
43
+ - ai-instruction-standards
44
+ - ai-agreement-standards
45
+ - anti-hallucination
@@ -0,0 +1,192 @@
1
+ # API Design Standards - AI Optimized
2
+ # Source: core/api-design-standards.md
3
+
4
+ standard:
5
+ id: api-design
6
+ name: API Design Standards
7
+ description: Comprehensive API design guidelines for REST, GraphQL, and gRPC
8
+ guidelines:
9
+ - "Use nouns (plural, kebab-case) for resource URLs"
10
+ - "Follow RFC 7807 Problem Details for error responses"
11
+ - "Use cursor-based pagination for large datasets"
12
+ - "Version APIs via URL path (/v1/)"
13
+ - "Always require HTTPS"
14
+
15
+ meta:
16
+ version: "1.0.0"
17
+ updated: "2026-03-18"
18
+ source: core/api-design-standards.md
19
+ description: Comprehensive API design guidelines for REST, GraphQL, and gRPC
20
+
21
+ rest_principles:
22
+ resource_naming:
23
+ use_nouns: true
24
+ use_plural: true
25
+ case: kebab-case
26
+ max_nesting: 2
27
+ examples:
28
+ correct: ["/users", "/user-profiles", "/users/123/orders"]
29
+ incorrect: ["/getUsers", "/user_profiles", "/users/123/orders/456/items/789"]
30
+ http_verbs:
31
+ GET: {purpose: "Retrieve", body: false, idempotent: true, safe: true}
32
+ POST: {purpose: "Create", body: true, idempotent: false, safe: false}
33
+ PUT: {purpose: "Full replace", body: true, idempotent: true, safe: false}
34
+ PATCH: {purpose: "Partial update", body: true, idempotent: false, safe: false}
35
+ DELETE: {purpose: "Remove", body: optional, idempotent: true, safe: false}
36
+ status_codes:
37
+ success:
38
+ 200: "OK — GET, PUT, PATCH success"
39
+ 201: "Created — POST success (include Location header)"
40
+ 202: "Accepted — async processing"
41
+ 204: "No Content — DELETE success"
42
+ client_error:
43
+ 400: "Bad Request — malformed request"
44
+ 401: "Unauthorized — missing/invalid auth"
45
+ 403: "Forbidden — insufficient permissions"
46
+ 404: "Not Found — resource does not exist"
47
+ 409: "Conflict — state conflict"
48
+ 422: "Unprocessable Entity — validation error"
49
+ 429: "Too Many Requests — rate limited"
50
+ server_error:
51
+ 500: "Internal Server Error"
52
+ 502: "Bad Gateway"
53
+ 503: "Service Unavailable"
54
+ 504: "Gateway Timeout"
55
+
56
+ versioning_strategies:
57
+ recommended: url_path
58
+ options:
59
+ url_path: {example: "/v1/users", pros: "explicit, cacheable", cons: "URL pollution"}
60
+ header: {example: "Accept-Version: v1", pros: "clean URLs", cons: "hidden, harder to test"}
61
+ query_param: {example: "?v=1", pros: "easy to add", cons: "caching issues"}
62
+ lifecycle:
63
+ current: "Full support, new features"
64
+ supported: "6-12 months, bug/security fixes only"
65
+ deprecated: "3-6 months notice, sunset header"
66
+ retired: "Return 410 Gone"
67
+
68
+ pagination:
69
+ strategies:
70
+ offset: {best_for: "Simple lists, UI page numbers", default_limit: 20, max_limit: 100}
71
+ cursor: {best_for: "Real-time feeds, large datasets", consistent: true}
72
+ keyset: {best_for: "Sorted large datasets", performant: true}
73
+ standard_fields:
74
+ offset: [page, limit, totalCount, totalPages]
75
+ cursor: [limit, cursor, hasMore]
76
+
77
+ authentication:
78
+ methods:
79
+ api_key: {use_case: "Server-to-server", complexity: low, security: medium}
80
+ oauth2: {use_case: "Third-party access", complexity: high, security: high}
81
+ jwt_bearer: {use_case: "Stateless auth, microservices", complexity: medium, security: high}
82
+ mtls: {use_case: "Service mesh, zero-trust", complexity: high, security: very_high}
83
+ jwt_rules:
84
+ algorithm: "RS256 or ES256 (asymmetric)"
85
+ access_token_ttl: "15 min max"
86
+ refresh_token_ttl: "7-30 days"
87
+ never: [sensitive_data_in_payload, symmetric_for_multi_party]
88
+
89
+ rate_limiting:
90
+ headers:
91
+ - "X-RateLimit-Limit: max requests in window"
92
+ - "X-RateLimit-Remaining: requests left"
93
+ - "X-RateLimit-Reset: unix timestamp of reset"
94
+ - "Retry-After: seconds to wait (on 429)"
95
+ tiers:
96
+ free: "100/hour"
97
+ basic: "1,000/hour"
98
+ pro: "10,000/hour"
99
+ enterprise: "custom"
100
+ strategies: [fixed_window, sliding_window, token_bucket, leaky_bucket]
101
+
102
+ error_format:
103
+ standard: "RFC 7807 Problem Details"
104
+ required_fields:
105
+ type: "URI reference to error documentation"
106
+ title: "Short, human-readable summary"
107
+ status: "HTTP status code"
108
+ detail: "Specific explanation of this occurrence"
109
+ optional_fields:
110
+ instance: "URI of the request"
111
+ errors: "Array of field-level validation errors"
112
+ traceId: "Request trace identifier"
113
+
114
+ filtering_sorting:
115
+ filtering:
116
+ simple: "?status=active"
117
+ bracket: "?filter[status]=active"
118
+ range: "?filter[created_at][gte]=2026-01-01"
119
+ sorting:
120
+ ascending: "?sort=created_at"
121
+ descending: "?sort=-created_at"
122
+ multiple: "?sort=-created_at,last_name"
123
+ field_selection: "?fields=id,name,email"
124
+
125
+ graphql:
126
+ naming:
127
+ types: PascalCase
128
+ fields: camelCase
129
+ enums: SCREAMING_SNAKE_CASE
130
+ mutations: "verb + noun (createUser)"
131
+ input_types: "action + noun + Input"
132
+ payload_types: "action + noun + Payload"
133
+ pagination: "Relay connections (edges, nodes, pageInfo)"
134
+ errors: "Return userErrors in payload, not top-level errors"
135
+
136
+ grpc:
137
+ package: "company.service.version"
138
+ service_naming: "PascalCase + Service suffix"
139
+ rpc_methods: "PascalCase verb + noun"
140
+ field_naming: snake_case
141
+ error_mapping:
142
+ INVALID_ARGUMENT: 400
143
+ UNAUTHENTICATED: 401
144
+ PERMISSION_DENIED: 403
145
+ NOT_FOUND: 404
146
+ ALREADY_EXISTS: 409
147
+ RESOURCE_EXHAUSTED: 429
148
+ INTERNAL: 500
149
+
150
+ rules:
151
+ - id: REST-001
152
+ rule: "Use plural nouns in kebab-case for resource URLs; never use verbs"
153
+ severity: error
154
+ - id: REST-002
155
+ rule: "Return correct HTTP status codes; 201 for creation, 204 for deletion, 422 for validation errors"
156
+ severity: error
157
+ - id: REST-003
158
+ rule: "Use RFC 7807 Problem Details format for all error responses"
159
+ severity: error
160
+ - id: REST-004
161
+ rule: "Version APIs via URL path (/v1/) and maintain version lifecycle (current → deprecated → retired)"
162
+ severity: warning
163
+ - id: REST-005
164
+ rule: "Include rate limiting headers (X-RateLimit-Limit, Remaining, Reset) on all responses"
165
+ severity: warning
166
+ - id: REST-006
167
+ rule: "Use cursor-based pagination for large or real-time datasets; offset-based for simple lists"
168
+ severity: info
169
+ - id: REST-007
170
+ rule: "Require HTTPS for all API endpoints; TLS 1.2 minimum, TLS 1.3 preferred"
171
+ severity: error
172
+ - id: REST-008
173
+ rule: "Document every endpoint with OpenAPI 3.x including parameters, request/response examples, and auth"
174
+ severity: warning
175
+
176
+ quick_reference:
177
+ url_pattern: "[VERB] https://api.{domain}/v{N}/{resources}/{id}"
178
+ response_success: "{ data, meta, links }"
179
+ response_error: "{ type, title, status, detail, errors, traceId }"
180
+ verb_cheat_sheet:
181
+ list: "GET /users → 200"
182
+ read: "GET /users/123 → 200"
183
+ create: "POST /users → 201"
184
+ update_full: "PUT /users/123 → 200"
185
+ update_partial: "PATCH /users/123 → 200"
186
+ delete: "DELETE /users/123 → 204"
187
+
188
+ physical_spec:
189
+ type: custom_script
190
+ validator:
191
+ command: "test -f openapi.yaml || test -f openapi.json || test -f swagger.yaml || test -f swagger.json || test -f docs/api.yaml"
192
+ rule: "api_spec_exists"
@@ -0,0 +1,82 @@
1
+ # Branch Completion Workflow - AI Optimized
2
+ # Source: core/branch-completion.md
3
+ # Inspired by Superpowers finishing-a-development-branch (MIT)
4
+
5
+ standard:
6
+ id: branch-completion
7
+ name: Branch Completion Workflow
8
+ description: 分支完成工作流標準
9
+
10
+ meta:
11
+ version: "1.0.0"
12
+ updated: "2026-03-20"
13
+ source: core/branch-completion.md
14
+ description: 分支完成決策與清理標準
15
+ inspired_by: superpowers/finishing-a-development-branch
16
+
17
+ guidelines:
18
+ - "測試全過才能談完成"
19
+ - "提供 4 個完成選項讓使用者選擇"
20
+ - "Discard 需要明確確認,防止誤刪"
21
+ - "Worktree 對應分支完成後必須清理"
22
+
23
+ prerequisites:
24
+ - "所有測試通過"
25
+ - "lint 通過"
26
+ - "type check 通過"
27
+ - "無未提交的變更"
28
+
29
+ options:
30
+ - id: merge_locally
31
+ description: "合併到目標分支"
32
+ steps:
33
+ - "git checkout <target>"
34
+ - "git merge --no-ff <branch>"
35
+ - "刪除分支"
36
+ - "清理 worktree(若有)"
37
+ - id: create_pr
38
+ description: "建立 Pull Request"
39
+ steps:
40
+ - "推送分支到 remote"
41
+ - "建立 PR(含描述與測試計畫)"
42
+ - "等待審查"
43
+ - id: keep_as_is
44
+ description: "保持現狀不動"
45
+ steps:
46
+ - "記錄分支狀態"
47
+ - "提醒使用者稍後處理"
48
+ - id: discard
49
+ description: "丟棄所有變更"
50
+ steps:
51
+ - "要求使用者明確確認(輸入分支名稱)"
52
+ - "刪除分支(git branch -D)"
53
+ - "清理 worktree(若有)"
54
+
55
+ rules:
56
+ - id: BC-001
57
+ trigger: "使用者選擇 discard"
58
+ action: "要求輸入分支名稱確認,防止誤刪"
59
+ priority: critical
60
+ - id: BC-002
61
+ trigger: "分支有 worktree"
62
+ action: "完成後自動清理 worktree"
63
+ priority: high
64
+ - id: BC-003
65
+ trigger: "前置條件未滿足"
66
+ action: "阻止完成,顯示失敗的檢查項目"
67
+ priority: high
68
+ - id: BC-004
69
+ trigger: "分支閒置超過 14 天"
70
+ action: "通知使用者完成或丟棄"
71
+ priority: medium
72
+
73
+ physical_spec:
74
+ type: checklist
75
+ validator:
76
+ type: ai_review
77
+ rule: "檢查分支完成是否遵循前置條件檢查和四選項流程"
78
+ checks:
79
+ - "完成前是否通過所有前置條件(測試、lint、type check)"
80
+ - "是否提供完成選項供使用者選擇"
81
+ - "Discard 操作是否要求明確確認"
82
+ - "關聯的 worktree 是否被清理"