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,230 @@
1
+ # Pipeline Integration Standards
2
+
3
+ > **Language**: English | [繁體中文](../locales/zh-TW/core/pipeline-integration-standards.md)
4
+
5
+ **Applicability**: All software projects using automated development pipelines
6
+ **Scope**: universal
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ Pipeline Integration Standards define how automated development pipelines should read project configuration, execute development stages, and adapt behavior based on project context. This standard provides a language-agnostic, framework-agnostic model for AI-assisted and CI/CD-driven development workflows.
13
+
14
+ ## References
15
+
16
+ | Standard/Source | Content |
17
+ |----------------|---------|
18
+ | ISO/IEC 12207 | Software Lifecycle Processes |
19
+ | ISO/IEC 15504 (SPICE) | Process Assessment |
20
+ | Continuous Delivery (Jez Humble) | Pipeline design principles |
21
+ | DORA Metrics | Deployment frequency, lead time, MTTR, change failure rate |
22
+
23
+ ---
24
+
25
+ ## Configuration Contract
26
+
27
+ ### UDS Configuration Block
28
+
29
+ Projects using automated pipelines MUST declare their pipeline preferences in a standard configuration block. The configuration block is typically placed in the project's manifest file (e.g., `manifest.json`, `uds.config.json`, or equivalent).
30
+
31
+ ### Standard Toggle Names
32
+
33
+ | Toggle | Type | Default | Description |
34
+ |--------|------|---------|-------------|
35
+ | `autoSpecGeneration` | boolean | false | Automatically generate SDD specs from PRD/user stories |
36
+ | `autoDerive` | boolean | false | Automatically derive BDD/TDD/ATDD from approved specs |
37
+ | `autoTDD` | boolean | false | Automatically enter TDD RED phase after derivation |
38
+ | `autoCheckin` | boolean | false | Automatically commit when all quality gates pass |
39
+ | `autoBatch` | boolean | false | Automatically batch pending changes before commit |
40
+
41
+ ### Toggle Semantics
42
+
43
+ Each toggle controls a specific pipeline behavior:
44
+
45
+ | Toggle | When ON | When OFF |
46
+ |--------|---------|----------|
47
+ | `autoSpecGeneration` | Pipeline generates spec draft from input, submits for review | Manual spec creation required |
48
+ | `autoDerive` | Pipeline runs derivation (BDD/TDD/ATDD) after spec approval | Manual derivation via commands |
49
+ | `autoTDD` | Pipeline sets RED state and creates test skeleton after derivation | Developer manually enters TDD |
50
+ | `autoCheckin` | Pipeline commits after all gates pass (tests, lint, coverage) | Developer manually commits |
51
+ | `autoBatch` | Pipeline accumulates changes and merges at threshold | Each change committed individually |
52
+
53
+ ### Configuration Example
54
+
55
+ ```json
56
+ {
57
+ "pipeline": {
58
+ "autoSpecGeneration": true,
59
+ "autoDerive": true,
60
+ "autoTDD": true,
61
+ "autoCheckin": false,
62
+ "autoBatch": false,
63
+ "context": "greenfield"
64
+ }
65
+ }
66
+ ```
67
+
68
+ ### Configuration Reading Rules
69
+
70
+ 1. **Fail-safe defaults**: All toggles default to OFF (manual mode)
71
+ 2. **Explicit declaration**: Pipeline MUST NOT assume toggle state without reading configuration
72
+ 3. **Runtime override**: CLI flags or environment variables MAY override file-based configuration
73
+ 4. **Validation**: Pipeline MUST validate configuration values before execution
74
+
75
+ ---
76
+
77
+ ## Pipeline Stage Model
78
+
79
+ ### Standard 6-Stage Pipeline
80
+
81
+ ```
82
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
83
+ │ 1.PLAN │───▶│ 2.SPEC │───▶│ 3.DERIVE │───▶│ 4.BUILD │───▶│ 5.REVIEW │───▶│6.CHECKIN │
84
+ │ 需求分析 │ │ 規格撰寫 │ │ 測試衍生 │ │ 實作建置 │ │ 審查驗證 │ │ 提交簽入 │
85
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
86
+ ```
87
+
88
+ ### Stage Definitions
89
+
90
+ | Stage | Input | Output | Quality Gate |
91
+ |-------|-------|--------|-------------|
92
+ | **Plan** | PRD, user stories, requirements | Structured requirements document | Requirements reviewed |
93
+ | **Spec** | Requirements | SDD specification with AC | Spec approved |
94
+ | **Derive** | Approved spec | BDD scenarios, TDD skeletons, ATDD tables | 1:1 AC mapping verified |
95
+ | **Build** | Test skeletons + spec | Implementation code | Tests pass (RED→GREEN) |
96
+ | **Review** | Implementation + tests | Review feedback | Review approved |
97
+ | **Checkin** | Approved changes | Committed code | All quality gates pass |
98
+
99
+ ### Stage Dependencies
100
+
101
+ - Each stage's output is the next stage's input
102
+ - Stages MUST NOT be skipped without explicit configuration
103
+ - Failed quality gates MUST block progression to next stage
104
+
105
+ ---
106
+
107
+ ## Development Context Classification
108
+
109
+ ### Context Types
110
+
111
+ | Context | Description | Typical Scenario |
112
+ |---------|-------------|------------------|
113
+ | **Greenfield** | New project or feature with no existing code | Starting a new module, new service, new product |
114
+ | **Brownfield** | Existing codebase requiring modification | Adding features to legacy code, refactoring |
115
+ | **Adhoc** | Small, isolated changes | Bug fixes, configuration changes, hotfixes |
116
+
117
+ ### Context Strategy Matrix
118
+
119
+ | Stage | Greenfield | Brownfield | Adhoc |
120
+ |-------|-----------|------------|-------|
121
+ | **Plan** | Full requirements | Impact analysis first | Quick assessment |
122
+ | **Spec** | Complete SDD | Delta SDD (changes only) | Optional (for significant changes) |
123
+ | **Derive** | Full derivation | Targeted derivation | Skip (unless complex) |
124
+ | **Build** | TDD from scratch | Modify existing + new tests | Direct fix |
125
+ | **Review** | Full review | Focused review on changes | Quick review |
126
+ | **Checkin** | Standard checkin | Standard checkin | Standard checkin |
127
+
128
+ ### Context Detection Heuristics
129
+
130
+ Pipelines SHOULD auto-detect context using these signals:
131
+
132
+ | Signal | Greenfield Indicator | Brownfield Indicator | Adhoc Indicator |
133
+ |--------|---------------------|---------------------|-----------------|
134
+ | File count | 0 or minimal files | Established codebase | N/A |
135
+ | Change scope | New directory/module | Modifications to existing files | 1-3 files changed |
136
+ | Test coverage | No existing tests | Existing test suite | Existing tests cover area |
137
+ | Spec existence | No specs | Existing specs | May or may not have specs |
138
+
139
+ ### Context Override
140
+
141
+ Developers can explicitly set context in configuration:
142
+
143
+ ```json
144
+ {
145
+ "pipeline": {
146
+ "context": "brownfield"
147
+ }
148
+ }
149
+ ```
150
+
151
+ Or via CLI flag:
152
+ ```bash
153
+ pipeline run --context=greenfield
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Integration Verification
159
+
160
+ ### Pipeline Implementor Checklist
161
+
162
+ Implementors integrating with this standard MUST verify:
163
+
164
+ | Check | Requirement | Verification Method |
165
+ |-------|-------------|-------------------|
166
+ | Config reading | Pipeline reads all toggles from configuration | Unit test: mock config → verify behavior |
167
+ | Default handling | Unset toggles default to OFF | Unit test: empty config → manual mode |
168
+ | Stage execution | All 6 stages execute in order | Integration test: full pipeline run |
169
+ | Gate enforcement | Failed gates block next stage | Integration test: inject failure → verify block |
170
+ | Context awareness | Pipeline adapts to context type | Integration test: each context → verify stages |
171
+ | Override support | CLI flags override file config | Unit test: file + flag → flag wins |
172
+
173
+ ### Validation Rules
174
+
175
+ 1. **Configuration schema**: Validate against known toggle names; warn on unknown keys
176
+ 2. **Toggle type safety**: All toggles MUST be boolean; reject non-boolean values
177
+ 3. **Context enum**: Context MUST be one of: `greenfield`, `brownfield`, `adhoc`
178
+ 4. **Stage completeness**: Pipeline MUST report which stages were executed and which were skipped
179
+
180
+ ---
181
+
182
+ ## Anti-Patterns
183
+
184
+ | Anti-Pattern | Impact | Correct Approach |
185
+ |--------------|--------|------------------|
186
+ | Hardcoding pipeline behavior | Cannot adapt to project needs | Read configuration at runtime |
187
+ | Ignoring context type | Wrong stages executed | Detect or read context setting |
188
+ | Skipping quality gates | Broken code enters codebase | Enforce gates at each stage |
189
+ | All-or-nothing automation | Users avoid pipeline entirely | Allow per-toggle granular control |
190
+ | Silent stage skipping | Lost traceability | Log and report all skip decisions |
191
+
192
+ ---
193
+
194
+ ## Best Practices
195
+
196
+ ### Do's
197
+
198
+ - ✅ Read configuration before executing any stage
199
+ - ✅ Default all toggles to OFF (safe defaults)
200
+ - ✅ Log which toggles are active at pipeline start
201
+ - ✅ Report stage execution status (executed/skipped/failed)
202
+ - ✅ Allow granular toggle control per stage
203
+ - ✅ Validate configuration schema before use
204
+ - ✅ Support configuration override via CLI
205
+
206
+ ### Don'ts
207
+
208
+ - ❌ Assume toggle state without reading configuration
209
+ - ❌ Skip stages silently without logging
210
+ - ❌ Ignore quality gate failures
211
+ - ❌ Hardcode pipeline behavior
212
+ - ❌ Mix context strategies (e.g., greenfield spec + adhoc build)
213
+
214
+ ---
215
+
216
+ ## Related Standards
217
+
218
+ - [Spec-Driven Development](spec-driven-development.md) — Spec stage workflow
219
+ - [Forward Derivation Standards](forward-derivation-standards.md) — Derive stage implementation
220
+ - [Check-in Standards](checkin-standards.md) — Checkin stage quality gates
221
+ - [Change Batching Standards](change-batching-standards.md) — Batch merging before checkin
222
+ - [Acceptance Criteria Traceability](acceptance-criteria-traceability.md) — AC tracking across stages
223
+
224
+ ---
225
+
226
+ ## Version History
227
+
228
+ | Version | Date | Changes |
229
+ |---------|------|---------|
230
+ | 1.0.0 | 2026-03-18 | Initial version — configuration contract, 6-stage pipeline model, context classification |
@@ -0,0 +1,156 @@
1
+ # Systematic Debugging Workflow
2
+
3
+ > **Language**: English | [繁體中文](../locales/zh-TW/core/systematic-debugging.md)
4
+
5
+ **Version**: 1.0.0
6
+ **Last Updated**: 2026-03-20
7
+ **Applicability**: All software projects using AI-assisted development
8
+ **Scope**: universal
9
+ **Inspired by**: [Superpowers](https://github.com/obra/superpowers) — systematic-debugging (MIT)
10
+
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Define a structured, four-phase debugging workflow that prevents the common anti-pattern of "guess and fix" cycles. This standard enforces root cause analysis before any fix attempt and includes the **3-Strike Rule** to catch architectural issues early.
16
+
17
+ 本標準定義結構化的四階段除錯工作流,防止常見的「猜測修復」反模式。強制要求在嘗試修復前先進行根因分析,並包含 **3-Strike Rule** 以提早發現架構問題。
18
+
19
+ ---
20
+
21
+ ## Glossary
22
+
23
+ | Term | Definition |
24
+ |------|-----------|
25
+ | Root Cause | The fundamental reason a defect exists, not merely the symptom |
26
+ | 3-Strike Rule | After 3 consecutive failed fix attempts, suspect an architectural issue |
27
+ | Backward Tracing | Tracing from error symptom back to the originating source |
28
+ | Component Boundary | The interface between two modules or subsystems |
29
+
30
+ ---
31
+
32
+ ## Core Principle — The Iron Rule
33
+
34
+ > **Never skip root cause analysis to jump directly to a fix.**
35
+
36
+ 禁止跳過根因分析直接修復。
37
+
38
+ If you catch yourself saying "quick fix", "just try", or "should work now" — **stop** and return to Phase 1.
39
+
40
+ ---
41
+
42
+ ## The Four Phases
43
+
44
+ ### Phase 1: Root Cause Investigation(根因調查)
45
+
46
+ Analyze error messages and track recent changes to form an initial hypothesis.
47
+
48
+ 1. **Read the error carefully** — identify the exact location and type of failure
49
+ 2. **Track recent changes** — use `git log`, `git diff`, `git blame` to find what changed
50
+ 3. **Add diagnostics at component boundaries** — insert logging / breakpoints at interfaces between modules
51
+ 4. **Record observations** — document what you see and form an initial hypothesis
52
+
53
+ 分析錯誤訊息並追蹤最近變更,形成初步假設。
54
+
55
+ ### Phase 2: Pattern Analysis(模式分析)
56
+
57
+ Compare the failing code against similar working implementations.
58
+
59
+ 1. **Search for similar successful implementations** in the codebase
60
+ 2. **Identify differences** between the failing and working code
61
+ 3. **Check for missing preconditions** — initialization, configuration, ordering
62
+
63
+ 比對失敗程式碼與類似的成功實作,找出差異。
64
+
65
+ ### Phase 3: Hypothesis Testing(假設測試)
66
+
67
+ Validate your hypothesis with minimal, isolated changes.
68
+
69
+ 1. **Make the smallest possible change** to test your hypothesis
70
+ 2. **Change only one variable at a time** — never make multiple changes simultaneously
71
+ 3. **Record each attempt** — document the hypothesis, the change, and the result
72
+
73
+ 以最小化修改驗證假設,每次只改一個變數。
74
+
75
+ ### Phase 4: Fix Implementation(修復實作)
76
+
77
+ Only implement the fix after confirming the root cause.
78
+
79
+ 1. **Confirm the root cause** is validated by your hypothesis testing
80
+ 2. **Implement the fix** with proper error handling
81
+ 3. **Run the full test suite** — ensure no regressions
82
+ 4. **Verify the fix doesn't introduce new issues**
83
+
84
+ 確認根因後才實作修復,並執行完整測試套件驗證。
85
+
86
+ ---
87
+
88
+ ## The 3-Strike Rule
89
+
90
+ > After **3 consecutive failed fix attempts**, stop guessing and question the architectural design.
91
+
92
+ 連續 3 次修復失敗後,必須停止猜測並質疑架構設計。
93
+
94
+ When the 3-Strike Rule triggers:
95
+
96
+ 1. Step back from the specific bug
97
+ 2. Review the overall module/component design
98
+ 3. Consider whether the architecture supports the intended behavior
99
+ 4. Look for design flaws that make the bug class possible
100
+ 5. Consider refactoring before attempting another fix
101
+
102
+ ---
103
+
104
+ ## Rules
105
+
106
+ | ID | Trigger | Action | Priority |
107
+ |----|---------|--------|----------|
108
+ | SD-001 | 3 consecutive failed fixes | Stop guessing, question architectural design | Critical |
109
+ | SD-002 | Phrases like "quick fix", "just try", "should work now" | Return to Phase 1 root cause analysis | High |
110
+ | SD-003 | Multi-component interaction error | Add diagnostic observations at every component boundary | Medium |
111
+
112
+ ---
113
+
114
+ ## Anti-Patterns to Avoid
115
+
116
+ | Anti-Pattern | Why It's Harmful |
117
+ |-------------|-----------------|
118
+ | Shotgun debugging | Random changes waste time and may introduce new bugs |
119
+ | Copy-paste fix from Stack Overflow | Without understanding, the fix may not address the actual root cause |
120
+ | Suppressing the error | Hiding symptoms doesn't fix the problem |
121
+ | "It works on my machine" | Environment differences are clues, not dismissals |
122
+
123
+ ---
124
+
125
+ ## Examples
126
+
127
+ ### Good: Structured Debugging
128
+
129
+ ```
130
+ Phase 1: TypeError at line 42 in parser.ts — reading property of undefined
131
+ git log shows parser.ts was modified 2 commits ago
132
+ Added console.log at module boundary → input is null when empty array passed
133
+
134
+ Phase 2: Similar parser in legacy/ handles empty arrays with early return
135
+
136
+ Phase 3: Added early return for empty array → test passes
137
+ Changed only one thing, recorded result
138
+
139
+ Phase 4: Implemented fix, ran full test suite (47/47 pass), no regressions
140
+ ```
141
+
142
+ ### Bad: Guess-and-Fix
143
+
144
+ ```
145
+ "Hmm, let me try adding a null check... nope.
146
+ Maybe wrapping in try-catch... still broken.
147
+ Let me just change the type to any... 🤦"
148
+ ```
149
+
150
+ ---
151
+
152
+ ## References
153
+
154
+ - **Superpowers**: [systematic-debugging](https://github.com/obra/superpowers) (MIT)
155
+ - **The Pragmatic Programmer**: Chapter on Debugging
156
+ - **Debugging by Thinking**: A Multidisciplinary Approach (Robert Charles Metzger)
@@ -2,8 +2,8 @@
2
2
 
3
3
  > **Language**: English | [繁體中文](../locales/zh-TW/core/testing-standards.md)
4
4
 
5
- **Version**: 3.0.0
6
- **Last Updated**: 2026-01-29
5
+ **Version**: 3.1.0
6
+ **Last Updated**: 2026-03-24
7
7
  **Applicability**: All software projects
8
8
  **Scope**: universal
9
9
  **Industry Standards**: ISTQB CTFL v4.0, ISO/IEC/IEEE 29119
@@ -38,40 +38,62 @@ This standard defines actionable testing rules and conventions for AI agents and
38
38
 
39
39
  ---
40
40
 
41
+ ## Coverage Targets (Primary Metric)
42
+
43
+ > **Coverage is the primary metric for test quality.** Higher coverage means more code is protected by tests.
44
+ > **覆蓋率是測試品質的主要指標。** 更高的覆蓋率代表更多程式碼受到測試保護。
45
+
46
+ | Metric | Minimum | Standard | Ideal |
47
+ |--------|---------|----------|-------|
48
+ | **Line Coverage** | 80% | 90% | 95%+ |
49
+ | **Branch Coverage** | 70% | 85% | 90%+ |
50
+ | **Function Coverage** | 85% | 95% | 100% |
51
+ | **Mutation Score** | — | 80% | 90%+ (critical code) |
52
+
53
+ **Level definitions:**
54
+ - **Minimum**: Baseline for all projects — below this is a quality risk
55
+ - **Standard**: Target for most projects — achievable with disciplined testing
56
+ - **Ideal**: Target for critical systems and core business logic — strive for 100% where practical
57
+
58
+ > **Practical guidance**: 100% coverage is the ideal goal. In practice, diminishing returns appear around 95%+ for line coverage. Focus the last 5% on critical paths (authentication, payment, data integrity) rather than generated code or trivial getters/setters.
59
+
60
+ ---
61
+
62
+ ## Coverage vs Ratio — Key Distinction
63
+
64
+ > **AI agents and developers: do NOT confuse these two concepts.**
65
+
66
+ | Concept | Meaning | Importance |
67
+ |---------|---------|------------|
68
+ | **Coverage(覆蓋率)** | Percentage of code executed by tests | **Primary metric** — measures protection |
69
+ | **Ratio(佔比)** | Distribution of test count across levels | Reference only — affects execution time |
70
+
71
+ **Coverage** answers: "How much of my code is tested?"
72
+ **Ratio** answers: "What proportion of my tests are unit vs integration vs E2E?"
73
+
74
+ ---
75
+
41
76
  ## Testing Framework Selection
42
77
 
43
78
  | Framework | Levels | Best For |
44
79
  |-----------|--------|----------|
45
80
  | **ISTQB** | UT → IT/SIT → ST → AT/UAT | Enterprise, compliance, formal QA |
46
- | **Industry Pyramid** | UT (70%) → IT (20%) → ST (7%) → E2E (3%) | Agile, DevOps, CI/CD |
81
+ | **Industry Pyramid** | UT → IT → ST → E2E | Agile, DevOps, CI/CD |
47
82
 
48
83
  ---
49
84
 
50
- ## Testing Pyramid (Default Ratios)
85
+ ## Testing Pyramid (Test Count Ratio — Reference Only)
51
86
 
52
- ```
53
- ┌───────┐
54
- │ E2E │ ← 3% (Slow, expensive)
55
- ─┴───────┴─
56
- ┌───────────┐
57
- │ ST │ ← 7% (System Testing)
58
- ─┴───────────┴─
59
- ┌─────────────┐
60
- │ IT │ ← 20% (Integration Testing)
61
- ─┴─────────────┴─
62
- ┌─────────────────┐
63
- │ UT │ ← 70% (Unit Testing - Foundation)
64
- └─────────────────┘
65
- ```
87
+ > **Note**: These are test **count** ratios (how many tests at each level), NOT coverage targets. See [Coverage Targets](#coverage-targets-primary-metric) above for coverage requirements.
66
88
 
67
- > **Note**: The 70/20/7/3 ratio is an empirical recommendation (Mike Cohn), not a mandatory standard.
89
+ | Level | Test Count Ratio | Execution Time Target |
90
+ |-------|-----------------|----------------------|
91
+ | Unit Testing (UT) | ~70% of tests | < 10 min total |
92
+ | Integration Testing (IT) | ~20% of tests | < 30 min total |
93
+ | System Testing (ST) | ~7% of tests | < 1 hour total |
94
+ | E2E Testing | ~3% of tests | < 2 hours total |
68
95
 
69
- | Level | Percentage | Execution Time Target |
70
- |-------|------------|----------------------|
71
- | Unit Testing (UT) | 70% | < 10 min total |
72
- | Integration Testing (IT) | 20% | < 30 min total |
73
- | System Testing (ST) | 7% | < 1 hour total |
74
- | E2E Testing | 3% | < 2 hours total |
96
+ > The 70/20/7/3 ratio is an empirical recommendation (Mike Cohn). It optimizes for fast feedback — most tests run quickly (UT), fewer tests run slowly (E2E).
75
97
 
76
98
  ---
77
99
 
@@ -110,11 +132,7 @@ This standard defines actionable testing rules and conventions for AI agents and
110
132
 
111
133
  #### Coverage Thresholds
112
134
 
113
- | Metric | Minimum | Recommended |
114
- |--------|---------|-------------|
115
- | Line Coverage | 70% | 85% |
116
- | Branch Coverage | 60% | 80% |
117
- | Function Coverage | 80% | 90% |
135
+ > See [Coverage Targets](#coverage-targets-primary-metric) at the top of this document for the authoritative coverage requirements.
118
136
 
119
137
  ---
120
138
 
@@ -429,15 +447,6 @@ tests/
429
447
 
430
448
  ---
431
449
 
432
- ## Coverage Targets Summary
433
-
434
- | Metric | Minimum | Recommended |
435
- |--------|---------|-------------|
436
- | Line | 70% | 85% |
437
- | Branch | 60% | 80% |
438
- | Function | 80% | 90% |
439
- | Mutation Score | - | >= 80% (critical code) |
440
-
441
450
  ---
442
451
 
443
452
  ## Related Standards
@@ -456,6 +465,7 @@ tests/
456
465
 
457
466
  | Version | Date | Changes |
458
467
  |---------|------|---------|
468
+ | 3.1.0 | 2026-03-24 | **Coverage-first restructure**: Elevated Coverage Targets to primary position, raised thresholds (Line 80/90/95+, Branch 70/85/90+, Function 85/95/100), added Coverage vs Ratio distinction, demoted Testing Pyramid to reference-only |
459
469
  | 3.0.0 | 2026-01-29 | **Major refactor**: Split into Rules (this file) and Theory (testing-theory.md). Reduced from 141KB/3185 lines to ~12KB/350 lines. All educational content moved to skills/testing-guide/testing-theory.md. Rules-only format optimized for AI agent consumption. |
460
470
  | 2.2.0 | 2026-01-20 | Added Test Documentation Structure section |
461
471
  | 2.1.0 | 2026-01-05 | Added SWEBOK v4.0 reference, Testing Fundamentals, Test-Related Measures |
@@ -0,0 +1,172 @@
1
+ # Verification Evidence Standard
2
+
3
+ > **Language**: English | [繁體中文](../locales/zh-TW/core/verification-evidence.md)
4
+
5
+ **Version**: 1.0.0
6
+ **Last Updated**: 2026-03-20
7
+ **Applicability**: All AI-assisted development workflows
8
+ **Scope**: universal
9
+ **Inspired by**: [Superpowers](https://github.com/obra/superpowers) — verification-before-completion (MIT)
10
+
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Establish an "Iron Law" that no task can be claimed as complete without verification evidence. This standard prevents AI agents from hallucinating success and ensures every completion claim is backed by executable proof.
16
+
17
+ 建立「鐵律」:無驗證證據不可聲稱完成。防止 AI 代理虛構成功結果,確保每個完成聲明都有可執行的證據支持。
18
+
19
+ ---
20
+
21
+ ## Glossary
22
+
23
+ | Term | Definition |
24
+ |------|-----------|
25
+ | Verification Evidence | A structured record of a verification command's execution and result |
26
+ | Iron Law | The absolute rule: no evidence = no completion claim |
27
+ | RED-GREEN Cycle | Proving a bug fix by showing the test fails before and passes after the fix |
28
+ | Exit Code | The numeric return value of a command (0 = success, non-zero = failure) |
29
+
30
+ ---
31
+
32
+ ## The Iron Law
33
+
34
+ > **No verification evidence = no completion claim.**
35
+
36
+ 無驗證證據 = 不可聲稱完成。
37
+
38
+ An agent saying "it's done" is not evidence. The verification must be independently executable and produce observable output.
39
+
40
+ 代理聲稱「已完成」不是證據。驗證必須是可獨立執行且產生可觀察輸出的。
41
+
42
+ ---
43
+
44
+ ## Evidence Format
45
+
46
+ Every verification must produce a structured evidence record:
47
+
48
+ ```json
49
+ {
50
+ "command": "pnpm test -- --filter core",
51
+ "exit_code": 0,
52
+ "output": "Tests: 47 passed, 0 failed\nDuration: 3.2s",
53
+ "timestamp": "2026-03-20T14:30:00Z"
54
+ }
55
+ ```
56
+
57
+ ### Required Fields
58
+
59
+ | Field | Type | Required | Description |
60
+ |-------|------|----------|-------------|
61
+ | `command` | string | Yes | The actual verification command executed |
62
+ | `exit_code` | number | Yes | Command exit code (0 = success) |
63
+ | `output` | string | Yes | Command output (truncated to 2000 chars, preserving key info) |
64
+ | `timestamp` | string | Yes | Execution time in ISO 8601 format |
65
+
66
+ ---
67
+
68
+ ## RED-GREEN Cycle
69
+
70
+ For bug fixes and regression tests, verification requires showing both the failure and the fix:
71
+
72
+ ### Step 1: RED — Prove the Bug Exists
73
+
74
+ Run the test **before** the fix to confirm it fails:
75
+
76
+ ```json
77
+ {
78
+ "command": "pnpm test -- parser.test.ts",
79
+ "exit_code": 1,
80
+ "output": "FAIL: expected null to equal { name: 'test' }",
81
+ "timestamp": "2026-03-20T14:25:00Z"
82
+ }
83
+ ```
84
+
85
+ ### Step 2: Apply the Fix
86
+
87
+ Make the code change.
88
+
89
+ ### Step 3: GREEN — Prove the Fix Works
90
+
91
+ Run the test **after** the fix to confirm it passes:
92
+
93
+ ```json
94
+ {
95
+ "command": "pnpm test -- parser.test.ts",
96
+ "exit_code": 0,
97
+ "output": "PASS: 12 tests passed",
98
+ "timestamp": "2026-03-20T14:28:00Z"
99
+ }
100
+ ```
101
+
102
+ ### Step 4: Record Both
103
+
104
+ The evidence record must include both RED and GREEN phases.
105
+
106
+ 回歸測試必須展示 RED → GREEN 循環,兩個階段的證據都必須記錄。
107
+
108
+ ---
109
+
110
+ ## Trust Rules
111
+
112
+ | Rule | Description |
113
+ |------|-------------|
114
+ | Agent says "done" but no `verification_evidence` | Mark as **unverified** |
115
+ | `verification_evidence` exists but `exit_code ≠ 0` | Mark as **verification failed** |
116
+ | Multiple verification steps | **All** steps must pass |
117
+ | Agent provides evidence for wrong command | Mark as **unverified** |
118
+
119
+ ---
120
+
121
+ ## Rules
122
+
123
+ | ID | Trigger | Action | Priority |
124
+ |----|---------|--------|----------|
125
+ | VE-001 | Agent reports success without verification_evidence | Downgrade to `done_with_concerns` | Critical |
126
+ | VE-002 | `exit_code ≠ 0` in evidence | Mark verification failed, trigger fix loop | High |
127
+ | VE-003 | Bug fix without RED-GREEN cycle | Request both RED and GREEN evidence | High |
128
+ | VE-004 | Output exceeds 2000 chars | Truncate but preserve error messages and summary lines | Medium |
129
+
130
+ ---
131
+
132
+ ## Output Truncation Guidelines
133
+
134
+ When verification output exceeds 2000 characters:
135
+
136
+ 1. **Keep**: Error messages, failure summaries, test counts, final status line
137
+ 2. **Remove**: Verbose progress output, stack traces for passing tests, duplicate lines
138
+ 3. **Mark truncation**: Add `[... truncated ...]` where content was removed
139
+
140
+ ---
141
+
142
+ ## Examples
143
+
144
+ ### Good: Complete Evidence
145
+
146
+ ```yaml
147
+ verification_evidence:
148
+ - command: "pnpm test"
149
+ exit_code: 0
150
+ output: "Test Suites: 12 passed\nTests: 147 passed\nTime: 8.3s"
151
+ timestamp: "2026-03-20T14:30:00Z"
152
+ - command: "pnpm lint"
153
+ exit_code: 0
154
+ output: "No issues found"
155
+ timestamp: "2026-03-20T14:30:05Z"
156
+ ```
157
+
158
+ ### Bad: No Evidence
159
+
160
+ ```yaml
161
+ status: success
162
+ message: "I've completed the task and everything should work now."
163
+ # ❌ No verification_evidence — violates Iron Law
164
+ ```
165
+
166
+ ---
167
+
168
+ ## References
169
+
170
+ - **Superpowers**: [verification-before-completion](https://github.com/obra/superpowers) (MIT)
171
+ - **Test-Driven Development**: RED-GREEN-REFACTOR cycle
172
+ - **Anti-Hallucination**: Complementary standard for preventing fabricated claims