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,238 @@
1
+ ---
2
+ source: ../../../core/pipeline-integration-standards.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-18
6
+ status: current
7
+ ---
8
+
9
+ # Pipeline 整合標準
10
+
11
+ > **語言**: [English](../../../core/pipeline-integration-standards.md) | 繁體中文
12
+
13
+ **適用範圍**: 所有使用自動化開發 Pipeline 的軟體專案
14
+ **Scope**: universal
15
+
16
+ ---
17
+
18
+ ## 概述
19
+
20
+ Pipeline 整合標準定義自動化開發 Pipeline 應如何讀取專案設定、執行開發階段,以及根據專案情境調整行為。本標準為 AI 輔助及 CI/CD 驅動的開發工作流程提供一套與語言、框架無關的通用模型。
21
+
22
+ ## 參考資料
23
+
24
+ | 標準/來源 | 內容 |
25
+ |-----------|------|
26
+ | ISO/IEC 12207 | 軟體生命週期流程 |
27
+ | ISO/IEC 15504 (SPICE) | 流程評估 |
28
+ | Continuous Delivery(Jez Humble) | Pipeline 設計原則 |
29
+ | DORA Metrics | 部署頻率、前置時間、MTTR、變更失敗率 |
30
+
31
+ ---
32
+
33
+ ## 設定契約
34
+
35
+ ### UDS 設定區塊
36
+
37
+ 使用自動化 Pipeline 的專案必須在標準設定區塊中宣告其 Pipeline 偏好。設定區塊通常放置於專案的 manifest 檔案中(例如 `manifest.json`、`uds.config.json` 或等效檔案)。
38
+
39
+ ### 標準開關名稱
40
+
41
+ | 開關 | 型別 | 預設值 | 描述 |
42
+ |------|------|--------|------|
43
+ | `autoSpecGeneration` | boolean | false | 自動從 PRD/使用者故事產生 SDD 規格 |
44
+ | `autoDerive` | boolean | false | 規格核准後自動衍生 BDD/TDD/ATDD |
45
+ | `autoTDD` | boolean | false | 衍生完成後自動進入 TDD RED 階段 |
46
+ | `autoCheckin` | boolean | false | 所有品質關卡通過後自動提交 |
47
+ | `autoBatch` | boolean | false | 自動批次累積待提交的變更 |
48
+
49
+ ### 開關語意
50
+
51
+ 每個開關控制特定的 Pipeline 行為:
52
+
53
+ | 開關 | 開啟時 | 關閉時 |
54
+ |------|--------|--------|
55
+ | `autoSpecGeneration` | Pipeline 從輸入產生規格草稿並提交審查 | 需手動建立規格 |
56
+ | `autoDerive` | 規格核准後 Pipeline 自動執行衍生(BDD/TDD/ATDD) | 透過指令手動衍生 |
57
+ | `autoTDD` | 衍生完成後 Pipeline 設定 RED 狀態並建立測試骨架 | 開發者手動進入 TDD |
58
+ | `autoCheckin` | 所有關卡通過(測試、lint、覆蓋率)後 Pipeline 自動提交 | 開發者手動提交 |
59
+ | `autoBatch` | Pipeline 累積變更並在達到閾值時合併 | 每次變更個別提交 |
60
+
61
+ ### 設定範例
62
+
63
+ ```json
64
+ {
65
+ "pipeline": {
66
+ "autoSpecGeneration": true,
67
+ "autoDerive": true,
68
+ "autoTDD": true,
69
+ "autoCheckin": false,
70
+ "autoBatch": false,
71
+ "context": "greenfield"
72
+ }
73
+ }
74
+ ```
75
+
76
+ ### 設定讀取規則
77
+
78
+ 1. **安全預設值**:所有開關預設為 OFF(手動模式)
79
+ 2. **明確宣告**:Pipeline 必須在讀取設定後才能確定開關狀態,不得假設
80
+ 3. **執行期覆寫**:CLI flag 或環境變數可覆寫檔案式設定
81
+ 4. **驗證**:Pipeline 在執行前必須驗證設定值
82
+
83
+ ---
84
+
85
+ ## Pipeline 階段模型
86
+
87
+ ### 標準六階段 Pipeline
88
+
89
+ ```
90
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
91
+ │ 1.PLAN │───▶│ 2.SPEC │───▶│ 3.DERIVE │───▶│ 4.BUILD │───▶│ 5.REVIEW │───▶│6.CHECKIN │
92
+ │ 需求分析 │ │ 規格撰寫 │ │ 測試衍生 │ │ 實作建置 │ │ 審查驗證 │ │ 提交簽入 │
93
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
94
+ ```
95
+
96
+ ### 階段定義
97
+
98
+ | 階段 | 輸入 | 輸出 | 品質關卡 |
99
+ |------|------|------|---------|
100
+ | **Plan(規劃)** | PRD、使用者故事、需求 | 結構化需求文件 | 需求已審查 |
101
+ | **Spec(規格)** | 需求 | 含驗收條件的 SDD 規格 | 規格已核准 |
102
+ | **Derive(衍生)** | 已核准的規格 | BDD 情境、TDD 骨架、ATDD 表格 | 1:1 驗收條件對應已驗證 |
103
+ | **Build(建置)** | 測試骨架 + 規格 | 實作程式碼 | 測試通過(RED→GREEN) |
104
+ | **Review(審查)** | 實作 + 測試 | 審查意見 | 審查已核准 |
105
+ | **Checkin(簽入)** | 已核准的變更 | 已提交的程式碼 | 所有品質關卡通過 |
106
+
107
+ ### 階段相依性
108
+
109
+ - 每個階段的輸出為下一階段的輸入
110
+ - 未經明確設定不得跳過任何階段
111
+ - 品質關卡失敗必須阻擋進入下一階段
112
+
113
+ ---
114
+
115
+ ## 開發情境分類
116
+
117
+ ### 情境類型
118
+
119
+ | 情境 | 描述 | 典型場景 |
120
+ |------|------|---------|
121
+ | **Greenfield** | 全新專案或功能,無既有程式碼 | 新增模組、新服務、新產品 |
122
+ | **Brownfield** | 需修改的既有程式碼庫 | 為舊有程式碼新增功能、重構 |
123
+ | **Adhoc** | 小型、獨立的變更 | Bug 修復、設定變更、Hotfix |
124
+
125
+ ### 情境策略矩陣
126
+
127
+ | 階段 | Greenfield | Brownfield | Adhoc |
128
+ |------|-----------|------------|-------|
129
+ | **Plan** | 完整需求分析 | 優先進行影響分析 | 快速評估 |
130
+ | **Spec** | 完整 SDD | Delta SDD(僅變更部分) | 可選(重大變更才需要) |
131
+ | **Derive** | 完整衍生 | 針對性衍生 | 跳過(除非複雜) |
132
+ | **Build** | 從零開始 TDD | 修改既有程式碼 + 新測試 | 直接修復 |
133
+ | **Review** | 完整審查 | 聚焦於變更的審查 | 快速審查 |
134
+ | **Checkin** | 標準簽入 | 標準簽入 | 標準簽入 |
135
+
136
+ ### 情境自動偵測啟發式規則
137
+
138
+ Pipeline 應使用下列訊號自動偵測情境:
139
+
140
+ | 訊號 | Greenfield 指標 | Brownfield 指標 | Adhoc 指標 |
141
+ |------|----------------|----------------|-----------|
142
+ | 檔案數量 | 無檔案或極少檔案 | 已建立的程式碼庫 | 不適用 |
143
+ | 變更範圍 | 新目錄/模組 | 修改既有檔案 | 變更 1–3 個檔案 |
144
+ | 測試覆蓋率 | 無既有測試 | 既有測試套件 | 既有測試已涵蓋該區域 |
145
+ | 規格是否存在 | 無規格 | 既有規格 | 可能有也可能沒有 |
146
+
147
+ ### 情境覆寫
148
+
149
+ 開發者可在設定中明確指定情境:
150
+
151
+ ```json
152
+ {
153
+ "pipeline": {
154
+ "context": "brownfield"
155
+ }
156
+ }
157
+ ```
158
+
159
+ 或透過 CLI flag 指定:
160
+ ```bash
161
+ pipeline run --context=greenfield
162
+ ```
163
+
164
+ ---
165
+
166
+ ## 整合驗證
167
+
168
+ ### Pipeline 實作者檢查清單
169
+
170
+ 實作本標準的整合者必須驗證以下項目:
171
+
172
+ | 檢查項目 | 要求 | 驗證方式 |
173
+ |---------|------|---------|
174
+ | 設定讀取 | Pipeline 從設定中讀取所有開關 | 單元測試:模擬設定 → 驗證行為 |
175
+ | 預設值處理 | 未設定的開關預設為 OFF | 單元測試:空設定 → 手動模式 |
176
+ | 階段執行 | 6 個階段依序執行 | 整合測試:完整 Pipeline 執行 |
177
+ | 關卡強制執行 | 失敗的關卡阻擋下一階段 | 整合測試:注入失敗 → 驗證阻擋 |
178
+ | 情境感知 | Pipeline 根據情境類型調整 | 整合測試:各情境 → 驗證階段 |
179
+ | 覆寫支援 | CLI flag 覆寫檔案設定 | 單元測試:檔案 + flag → flag 優先 |
180
+
181
+ ### 驗證規則
182
+
183
+ 1. **設定 Schema 驗證**:對照已知開關名稱進行驗證;對未知鍵值發出警告
184
+ 2. **開關型別安全**:所有開關必須為 boolean;拒絕非 boolean 值
185
+ 3. **情境列舉值**:情境必須為以下其中之一:`greenfield`、`brownfield`、`adhoc`
186
+ 4. **階段完整性**:Pipeline 必須回報哪些階段已執行、哪些已跳過
187
+
188
+ ---
189
+
190
+ ## 反模式
191
+
192
+ | 反模式 | 影響 | 正確做法 |
193
+ |--------|------|---------|
194
+ | 硬編碼 Pipeline 行為 | 無法適應專案需求 | 在執行期讀取設定 |
195
+ | 忽略情境類型 | 執行錯誤的階段 | 偵測或讀取情境設定 |
196
+ | 跳過品質關卡 | 有問題的程式碼進入程式碼庫 | 在每個階段強制執行關卡 |
197
+ | 全有或全無的自動化 | 使用者完全迴避 Pipeline | 允許逐開關的細粒度控制 |
198
+ | 靜默跳過階段 | 失去可追蹤性 | 記錄並回報所有跳過決策 |
199
+
200
+ ---
201
+
202
+ ## 最佳實踐
203
+
204
+ ### 應做事項
205
+
206
+ - ✅ 在執行任何階段前先讀取設定
207
+ - ✅ 所有開關預設為 OFF(安全預設值)
208
+ - ✅ 在 Pipeline 啟動時記錄哪些開關為啟用狀態
209
+ - ✅ 回報階段執行狀態(已執行/已跳過/失敗)
210
+ - ✅ 允許逐階段的細粒度開關控制
211
+ - ✅ 在使用前驗證設定 Schema
212
+ - ✅ 支援透過 CLI 覆寫設定
213
+
214
+ ### 不應做事項
215
+
216
+ - ❌ 未讀取設定即假設開關狀態
217
+ - ❌ 靜默跳過階段而不記錄
218
+ - ❌ 忽略品質關卡失敗
219
+ - ❌ 硬編碼 Pipeline 行為
220
+ - ❌ 混用情境策略(例如:Greenfield 規格 + Adhoc 建置)
221
+
222
+ ---
223
+
224
+ ## 相關標準
225
+
226
+ - [規格驅動開發(Spec-Driven Development)](spec-driven-development.md) — Spec 階段工作流程
227
+ - [正向衍生標準(Forward Derivation Standards)](forward-derivation-standards.md) — Derive 階段實作
228
+ - [簽入標準(Check-in Standards)](checkin-standards.md) — Checkin 階段品質關卡
229
+ - [變更批次標準(Change Batching Standards)](change-batching-standards.md) — 簽入前的批次合併
230
+ - [驗收條件追蹤(Acceptance Criteria Traceability)](acceptance-criteria-traceability.md) — 跨階段驗收條件追蹤
231
+
232
+ ---
233
+
234
+ ## 版本歷程
235
+
236
+ | 版本 | 日期 | 變更內容 |
237
+ |------|------|---------|
238
+ | 1.0.0 | 2026-03-18 | 初始版本 — 設定契約、六階段 Pipeline 模型、情境分類 |
@@ -0,0 +1,79 @@
1
+ ---
2
+ source: ../../../core/project-context-memory.md
3
+ source_version: 1.1.0
4
+ translation_version: 1.1.0
5
+ last_synced: 2026-03-24
6
+ status: current
7
+ ---
8
+
9
+ # 專案情境記憶標準
10
+
11
+ > **語言**: [English](../../../core/project-context-memory.md) | 繁體中文
12
+
13
+ **版本**: 1.1.0
14
+ **最後更新**: 2026-03-16
15
+ **適用性**: 所有使用 AI 助手的軟體專案
16
+ **範圍**: uds-specific
17
+
18
+ ---
19
+
20
+ ## 目的
21
+
22
+ 本標準定義一個結構化系統,用於擷取、檢索和強制執行**專案特定**的情境、架構決策和領域知識。不同於開發者記憶(通用且可轉移),專案情境記憶作為特定程式碼庫的「長期大腦」,確保 AI 助手遵守本地慣例和歷史決策。
23
+
24
+ ---
25
+
26
+ ## 快速參考
27
+
28
+ ### 記憶項目結構
29
+
30
+ | 欄位 | 類型 | 說明 |
31
+ |------|------|------|
32
+ | `id` | string | 唯一識別碼(`PRJ-YYYY-NNNN`) |
33
+ | `type` | enum | `decision` / `convention` / `structure` / `glossary` |
34
+ | `summary` | string | 一句話摘要 |
35
+ | `status` | enum | `active` / `proposed` / `deprecated` |
36
+ | `scope` | list | 適用的檔案或目錄 |
37
+
38
+ ### 儲存位置
39
+
40
+ 項目以 **Markdown + YAML Frontmatter** 格式儲存,確保人類可讀(文件)和機器可解析。
41
+
42
+ - **目錄**: `.project-context/`
43
+ - **格式**: `.md` 檔案
44
+
45
+ ## 記憶類型
46
+
47
+ | 類型 | 說明 | 範例 |
48
+ |------|------|------|
49
+ | `decision` | 架構或技術決策 | 「使用 PostgreSQL 而非 MongoDB」 |
50
+ | `convention` | 程式碼慣例 | 「API 回應必須使用 camelCase」 |
51
+ | `structure` | 專案結構規則 | 「測試檔案與原始碼平行放置」 |
52
+ | `glossary` | 領域術語定義 | 「'tenant' 指多租戶的獨立實例」 |
53
+
54
+ ## 記憶生命週期
55
+
56
+ ```
57
+ proposed → active → deprecated
58
+ ```
59
+
60
+ | 狀態 | 說明 |
61
+ |------|------|
62
+ | `proposed` | 新提出但尚未團隊確認的項目 |
63
+ | `active` | 已確認且必須遵守的項目 |
64
+ | `deprecated` | 已過時但保留供歷史參考 |
65
+
66
+ ## AI 助手行為
67
+
68
+ 當 AI 助手在專案中工作時:
69
+
70
+ 1. **載入** — 在工作階段開始時讀取 `.project-context/` 中的所有 `active` 項目
71
+ 2. **遵守** — 所有建議和程式碼生成必須符合活躍的記憶項目
72
+ 3. **提議** — 發現新的隱含慣例時,建議建立新的記憶項目
73
+ 4. **衝突** — 如果使用者請求與活躍記憶衝突,必須提醒使用者
74
+
75
+ ## 相關標準
76
+
77
+ - [情境感知載入](context-aware-loading.md)
78
+ - [反幻覺標準](anti-hallucination.md)
79
+ - [AI 協議標準](ai-agreement-standards.md)
@@ -0,0 +1,79 @@
1
+ ---
2
+ source: ../../../core/requirement-engineering.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-24
6
+ status: current
7
+ ---
8
+
9
+ # 需求工程標準
10
+
11
+ > **語言**: [English](../../../core/requirement-engineering.md) | 繁體中文
12
+
13
+ **版本**: 1.0.0
14
+ **最後更新**: 2026-01-28
15
+ **適用性**: 所有軟體專案
16
+ **範圍**: 通用 (Universal)
17
+ **業界標準**: IEEE 830-1998、IEEE 29148-2018、SWEBOK v4.0
18
+ **參考**: [computer.org](https://www.computer.org/education/bodies-of-knowledge/software-engineering/v4)
19
+
20
+ ---
21
+
22
+ ## 摘要
23
+
24
+ 需求工程是在整個開發生命週期中系統性地引出、分析、規格化和驗證軟體需求的過程。它提供撰寫、管理和驗證需求的理論基礎,基於業界標準包括 IEEE 830-1998、IEEE 29148-2018、SWEBOK v4.0 和 ISO/IEC 25010。
25
+
26
+ 此過程涵蓋功能需求(系統應做什麼)、非功能需求(效能、安全、可用性等品質屬性)和約束條件。使用者故事(Agile 格式)搭配驗收條件(Given-When-Then)作為主要規格格式,透過 INVEST 準則驗證。
27
+
28
+ ---
29
+
30
+ **完整指南:[需求工程指南](../../../methodologies/guides/requirement-engineering-guide.md)**
31
+
32
+ ---
33
+
34
+ ## 快速參考
35
+
36
+ | 面向 | 說明 |
37
+ |------|------|
38
+ | **核心流程** | 引出 → 分析 → 規格化 → 驗證 |
39
+ | **需求類型** | 功能需求 (FR)、非功能需求 (NFR)、約束條件 |
40
+ | **優先級排序** | MoSCoW、P0-P3、Kano 模型 |
41
+ | **品質模型** | ISO/IEC 25010(8 個特徵) |
42
+ | **標準** | IEEE 830、IEEE 29148、SWEBOK v4.0 |
43
+
44
+ ## 使用者故事格式
45
+
46
+ ```
47
+ 作為 [角色]
48
+ 我希望 [功能]
49
+ 以便 [商業價值]
50
+ ```
51
+
52
+ ### INVEST 準則
53
+
54
+ | 準則 | 說明 |
55
+ |------|------|
56
+ | **I**ndependent | 獨立 — 故事之間盡量獨立 |
57
+ | **N**egotiable | 可協商 — 細節可以討論調整 |
58
+ | **V**aluable | 有價值 — 對使用者或業務有價值 |
59
+ | **E**stimable | 可估算 — 可以估算工作量 |
60
+ | **S**mall | 小型 — 可在一個迭代內完成 |
61
+ | **T**estable | 可測試 — 可以撰寫驗收條件 |
62
+
63
+ ## 需求優先級
64
+
65
+ ### MoSCoW 方法
66
+
67
+ | 分類 | 說明 |
68
+ |------|------|
69
+ | **Must have** | 必要 — 沒有就無法發布 |
70
+ | **Should have** | 應有 — 重要但可以延後 |
71
+ | **Could have** | 可有 — 增值但非必要 |
72
+ | **Won't have** | 不做 — 此版本明確排除 |
73
+
74
+ ## 相關標準
75
+
76
+ - [規格驅動開發](spec-driven-development.md)
77
+ - [正向推導標準](forward-derivation-standards.md)
78
+ - [行為驅動開發](behavior-driven-development.md)
79
+ - [測試標準](testing-standards.md)
@@ -0,0 +1,74 @@
1
+ ---
2
+ source: ../../../core/security-standards.md
3
+ source_version: 1.1.0
4
+ translation_version: 1.1.0
5
+ last_synced: 2026-03-24
6
+ status: current
7
+ ---
8
+
9
+ # 安全標準
10
+
11
+ > **語言**: [English](../../../core/security-standards.md) | 繁體中文
12
+
13
+ **版本**: 1.1.0
14
+ **最後更新**: 2026-01-29
15
+ **適用性**: 所有軟體專案
16
+ **範圍**: 通用 (Universal)
17
+ **業界標準**: OWASP Top 10 (2021)、OWASP ASVS v4.0、NIST SP 800-53
18
+ **參考**: [owasp.org](https://owasp.org/Top10/)
19
+
20
+ > **詳細說明與範例,請參閱 [安全指南](../../../core/guides/security-guide.md)**
21
+
22
+ ---
23
+
24
+ ## 目的
25
+
26
+ 本標準定義軟體開發的完整安全指南,涵蓋安全程式設計實踐、弱點預防、認證/授權和安全測試。
27
+
28
+ **參考標準**:
29
+ - [OWASP Top 10 (2021)](https://owasp.org/Top10/)
30
+ - [OWASP ASVS v4.0](https://owasp.org/www-project-application-security-verification-standard/)
31
+ - [NIST SP 800-53](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final)
32
+
33
+ ---
34
+
35
+ ## 核心安全原則
36
+
37
+ | 原則 | 實作 |
38
+ |------|------|
39
+ | **最小權限** | 基於角色的存取控制、限時 token |
40
+ | **安全失敗** | 認證錯誤時拒絕存取、不暴露堆疊追蹤 |
41
+ | **職責分離** | 開發/部署/管理使用不同角色 |
42
+ | **縱深防禦** | 不依賴單一控制措施 |
43
+ | **預設安全** | 安全預設值、明確選擇較不安全的選項 |
44
+ | **零信任** | 驗證每個請求、假設已被入侵 |
45
+
46
+ ## OWASP Top 10 預防清單
47
+
48
+ | # | 風險 | 預防措施 |
49
+ |---|------|----------|
50
+ | A01 | 權限控制失效 | RBAC、最小權限、伺服器端驗證 |
51
+ | A02 | 加密失敗 | TLS 1.2+、AES-256、安全金鑰管理 |
52
+ | A03 | 注入攻擊 | 參數化查詢、輸入驗證、ORM |
53
+ | A04 | 不安全設計 | 威脅模型、安全設計審查 |
54
+ | A05 | 安全設定錯誤 | 安全預設值、最小化安裝 |
55
+ | A06 | 易受攻擊的元件 | 依賴掃描、定期更新 |
56
+ | A07 | 認證失敗 | MFA、密碼策略、會話管理 |
57
+ | A08 | 資料完整性失敗 | 數位簽章、CI/CD 管線安全 |
58
+ | A09 | 記錄與監控不足 | 集中式日誌、告警、SIEM |
59
+ | A10 | SSRF | 白名單、網路分區、輸入驗證 |
60
+
61
+ ## 安全測試
62
+
63
+ | 測試類型 | 工具 | 頻率 |
64
+ |----------|------|------|
65
+ | SAST(靜態分析) | SonarQube、Semgrep | 每次提交 |
66
+ | DAST(動態分析) | OWASP ZAP、Burp Suite | 每次發布 |
67
+ | SCA(軟體組成分析) | Snyk、npm audit | 每日 |
68
+ | 滲透測試 | 手動/自動化 | 每季 |
69
+
70
+ ## 相關標準
71
+
72
+ - [部署標準](deployment-standards.md)
73
+ - [效能標準](performance-standards.md)
74
+ - [測試標準](testing-standards.md)
@@ -0,0 +1,95 @@
1
+ ---
2
+ source: ../../../core/systematic-debugging.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-24
6
+ status: current
7
+ ---
8
+
9
+ # 系統化除錯工作流程
10
+
11
+ > **語言**: [English](../../../core/systematic-debugging.md) | 繁體中文
12
+
13
+ **版本**: 1.0.0
14
+ **最後更新**: 2026-03-20
15
+ **適用性**: 所有使用 AI 輔助開發的軟體專案
16
+ **範圍**: 通用 (Universal)
17
+ **靈感來源**: [Superpowers](https://github.com/obra/superpowers) — systematic-debugging (MIT)
18
+
19
+ ---
20
+
21
+ ## 目的
22
+
23
+ 定義結構化的四階段除錯工作流,防止常見的「猜測修復」反模式。強制要求在嘗試修復前先進行根因分析,並包含 **3-Strike Rule** 以提早發現架構問題。
24
+
25
+ ---
26
+
27
+ ## 術語表
28
+
29
+ | 術語 | 定義 |
30
+ |------|------|
31
+ | 根因 (Root Cause) | 缺陷存在的根本原因,而非僅僅是表徵 |
32
+ | 3-Strike Rule | 連續 3 次修復嘗試失敗後,懷疑存在架構問題 |
33
+ | 反向追蹤 (Backward Tracing) | 從錯誤表徵追溯到源頭 |
34
+ | 元件邊界 (Component Boundary) | 兩個模組或子系統之間的介面 |
35
+
36
+ ---
37
+
38
+ ## 核心原則 — 鐵律
39
+
40
+ > **禁止跳過根因分析直接修復。**
41
+
42
+ 如果你發現自己在說「快速修復」、「試試看」或「應該可以了」— **停下來**,回到第一階段。
43
+
44
+ ---
45
+
46
+ ## 四階段除錯工作流
47
+
48
+ ### 階段 1:觀察與重現
49
+
50
+ | 步驟 | 說明 |
51
+ |------|------|
52
+ | 收集錯誤資訊 | 錯誤訊息、堆疊追蹤、日誌 |
53
+ | 確定重現步驟 | 建立可靠的重現路徑 |
54
+ | 記錄環境條件 | 作業系統、版本、設定 |
55
+
56
+ ### 階段 2:根因分析
57
+
58
+ | 技術 | 適用場景 |
59
+ |------|----------|
60
+ | 反向追蹤 | 從錯誤點向後追溯資料流 |
61
+ | 二分法 | 快速縮小問題範圍 |
62
+ | 元件隔離 | 逐一排除元件 |
63
+ | 日誌分析 | 檢查事件順序和狀態變化 |
64
+
65
+ ### 階段 3:修復
66
+
67
+ | 規則 | 說明 |
68
+ |------|------|
69
+ | 先寫測試 | 寫一個重現 bug 的失敗測試 |
70
+ | 最小化修改 | 只修改必要的程式碼 |
71
+ | 驗證修復 | 確認測試從紅轉綠 |
72
+ | 無副作用 | 確認沒有引入新的 bug |
73
+
74
+ ### 階段 4:驗證與預防
75
+
76
+ | 步驟 | 說明 |
77
+ |------|------|
78
+ | 執行完整測試套件 | 確保沒有回歸 |
79
+ | 更新文件 | 記錄根因和修復方案 |
80
+ | 回顧 | 是否需要加強預防措施 |
81
+
82
+ ## 3-Strike Rule
83
+
84
+ 連續 3 次修復嘗試失敗時:
85
+
86
+ 1. **停止修復** — 不要再嘗試第 4 次
87
+ 2. **升級** — 通知架構師或資深開發人員
88
+ 3. **重新分析** — 從更高層次重新分析問題
89
+ 4. **考慮重構** — 問題可能在架構層面
90
+
91
+ ## 相關標準
92
+
93
+ - [驗證證據](verification-evidence.md)
94
+ - [測試標準](testing-standards.md)
95
+ - [AI 模型選擇策略](model-selection.md)
@@ -0,0 +1,88 @@
1
+ ---
2
+ source: ../../../core/test-governance.md
3
+ source_version: 1.0.0
4
+ translation_version: 1.0.0
5
+ last_synced: 2026-03-24
6
+ status: current
7
+ ---
8
+
9
+ # 測試治理標準
10
+
11
+ > **語言**: [English](../../../core/test-governance.md) | 繁體中文
12
+
13
+ **適用性**: 所有軟體專案
14
+ **範圍**: 通用 (Universal)
15
+
16
+ ---
17
+
18
+ ## 概述
19
+
20
+ 測試治理標準定義測試活動的政策、完成準則和環境管理策略。本標準橋接 ISO/IEC/IEEE 29119 正式流程與 Agile/Scrum 實踐。
21
+
22
+ ## 參考
23
+
24
+ | 標準/來源 | 內容 |
25
+ |-----------|------|
26
+ | ISO/IEC/IEEE 29119-2 | 測試流程 |
27
+ | ISO/IEC/IEEE 29119-3 | 測試文件(測試計劃/測試案例) |
28
+ | ISO/IEC/IEEE 12207 | 驗證流程 + 整合流程 |
29
+ | Agile/Scrum 指南 | 完成定義 (DoD) |
30
+ | ISTQB 基礎教學大綱 | 測試層級、測試類型 |
31
+ | Mike Cohn 測試金字塔 | 金字塔經驗比例(建議預設值) |
32
+
33
+ ## 術語
34
+
35
+ | 術語 | 標準來源 | 說明 |
36
+ |------|----------|------|
37
+ | 完成定義 (DoD) | Agile/Scrum | 任務/功能完成的檢查清單 |
38
+ | 測試完成準則 | ISO 29119-2 | 測試活動的退出準則 |
39
+ | 系統整合測試 | ISO 12207 | 非正式 ISO 術語,但為業界標準 |
40
+ | 金字塔比例 70/20/7/3 | Mike Cohn(經驗值) | 建議預設值,非強制 |
41
+
42
+ ---
43
+
44
+ ## 測試政策
45
+
46
+ ### 品質目標
47
+
48
+ | ID | 名稱 | 衡量指標 |
49
+ |----|------|----------|
50
+ | QO-1 | 缺陷密度 | < 1 缺陷/KLOC(正式發布) |
51
+ | QO-2 | 測試覆蓋率 | 依測試金字塔比例 |
52
+ | QO-3 | 回歸率 | < 5% 每次迭代 |
53
+
54
+ ### 測試金字塔
55
+
56
+ | 層級 | 比例 | 執行時間 | 說明 |
57
+ |------|------|----------|------|
58
+ | 單元測試 (UT) | 70% | < 100ms/test | 測試個別函式/方法 |
59
+ | 整合測試 (IT) | 20% | < 1s/test | 測試元件互動 |
60
+ | 端對端測試 (E2E) | 7% | 數秒/test | 測試使用者工作流 |
61
+ | 效能/安全測試 | 3% | 分鐘級 | 非功能測試 |
62
+
63
+ ### 完成定義 (DoD)
64
+
65
+ 每個功能完成前必須滿足:
66
+
67
+ | 項目 | 說明 |
68
+ |------|------|
69
+ | 所有測試通過 | 100% 通過率 |
70
+ | 覆蓋率達標 | 符合金字塔比例 |
71
+ | 無已知缺陷 | P0/P1 缺陷為零 |
72
+ | 程式碼審查完成 | 至少一位審查者核准 |
73
+ | 文件更新 | API 文件和 CHANGELOG 已更新 |
74
+
75
+ ## 測試環境管理
76
+
77
+ | 環境 | 用途 | 管理責任 |
78
+ |------|------|----------|
79
+ | 本地 (Local) | 開發者單元測試 | 開發者 |
80
+ | CI | 自動化測試 | CI/CD 管線 |
81
+ | Staging | 整合和 E2E 測試 | DevOps |
82
+ | Production | 煙霧測試和監控 | SRE |
83
+
84
+ ## 相關標準
85
+
86
+ - [測試標準](testing-standards.md)
87
+ - [提交規範](checkin-standards.md)
88
+ - [部署標準](deployment-standards.md)