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,293 @@
1
+ # Acceptance Criteria Traceability Standards
2
+
3
+ > **Language**: English | [繁體中文](../locales/zh-TW/core/acceptance-criteria-traceability.md)
4
+
5
+ **Applicability**: All software projects using specification-driven or test-driven workflows
6
+ **Scope**: universal
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ Acceptance Criteria Traceability Standards define how to track the relationship between Acceptance Criteria (AC), test implementations, and coverage status. This standard ensures every AC is verifiably tested and provides standardized reporting formats for coverage analysis.
13
+
14
+ ## References
15
+
16
+ | Standard/Source | Content |
17
+ |----------------|---------|
18
+ | ISO/IEC/IEEE 29119-3 | Test Documentation — Traceability Matrix |
19
+ | IEEE 830 | Software Requirements Specification — Traceability |
20
+ | ISTQB Foundation | Requirements-based testing |
21
+ | INVEST Principles | Acceptance criteria quality |
22
+
23
+ ---
24
+
25
+ ## AC-to-Test Traceability Matrix
26
+
27
+ ### Standard Matrix Format
28
+
29
+ | AC-ID | Test File | Test Name | Status | Notes |
30
+ |-------|-----------|-----------|--------|-------|
31
+ | AC-1 | `tests/auth.test.ts` | `should login with valid credentials` | ✅ covered | |
32
+ | AC-2 | `tests/auth.test.ts` | `should reject invalid credentials` | ✅ covered | |
33
+ | AC-3 | — | — | ❌ uncovered | Blocked by API dependency |
34
+ | AC-4 | `tests/auth.test.ts` | `should lock account after 5 failures` | ⚠️ partial | Missing edge case |
35
+
36
+ ### Matrix Fields
37
+
38
+ | Field | Required | Description |
39
+ |-------|----------|-------------|
40
+ | `AC-ID` | Yes | Unique identifier from the specification (e.g., AC-1, AC-2) |
41
+ | `Test File` | Yes (if covered) | Path to the test file implementing this AC |
42
+ | `Test Name` | Yes (if covered) | Name of the test case or describe block |
43
+ | `Status` | Yes | Coverage status: `covered`, `partial`, `uncovered` |
44
+ | `Notes` | No | Additional context (blockers, dependencies, etc.) |
45
+
46
+ ### Linking Convention
47
+
48
+ Tests MUST reference their source AC using standard annotations:
49
+
50
+ ```typescript
51
+ // TypeScript/JavaScript
52
+ describe('AC-1: User login with valid credentials', () => {
53
+ // @AC AC-1
54
+ // @SPEC SPEC-001
55
+ it('should redirect to dashboard on successful login', () => { ... });
56
+ });
57
+ ```
58
+
59
+ ```python
60
+ # Python
61
+ class TestAC1_UserLogin:
62
+ """AC-1: User login with valid credentials
63
+ @AC AC-1
64
+ @SPEC SPEC-001
65
+ """
66
+ def test_redirect_to_dashboard(self): ...
67
+ ```
68
+
69
+ ```gherkin
70
+ # BDD Feature
71
+ @SPEC-001 @AC-1
72
+ Scenario: User login with valid credentials
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Coverage Status Definitions
78
+
79
+ ### Status Classification
80
+
81
+ | Status | Symbol | Definition | Criteria |
82
+ |--------|--------|-----------|----------|
83
+ | **Covered** | ✅ | AC is fully tested | All conditions in AC have corresponding test assertions |
84
+ | **Partial** | ⚠️ | AC is partially tested | Some conditions tested, but edge cases or paths missing |
85
+ | **Uncovered** | ❌ | AC has no tests | No test case references this AC |
86
+
87
+ ### Coverage Calculation
88
+
89
+ ```
90
+ AC Coverage % = (covered_count / total_ac_count) × 100
91
+
92
+ Where:
93
+ covered_count = count of AC with status "covered"
94
+ total_ac_count = total number of AC in specification
95
+ partial counts as 0.5 for coverage calculation
96
+ ```
97
+
98
+ ### Example Calculation
99
+
100
+ ```
101
+ SPEC-001: 8 AC total
102
+ - 5 covered (✅)
103
+ - 2 partial (⚠️)
104
+ - 1 uncovered (❌)
105
+
106
+ Coverage = (5 + 2×0.5) / 8 = 6/8 = 75%
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Quality Thresholds
112
+
113
+ ### Default Thresholds
114
+
115
+ | Threshold | Value | Enforcement |
116
+ |-----------|-------|-------------|
117
+ | **Minimum AC Coverage** | 100% | Required for production release |
118
+ | **Minimum for Check-in** | 80% | Required for feature branch merge |
119
+ | **Warning Level** | 60% | Triggers coverage warning |
120
+
121
+ ### Configurable Thresholds
122
+
123
+ Projects MAY customize thresholds in their configuration:
124
+
125
+ ```json
126
+ {
127
+ "acCoverage": {
128
+ "minimum": 100,
129
+ "checkinMinimum": 80,
130
+ "warningLevel": 60,
131
+ "partialWeight": 0.5
132
+ }
133
+ }
134
+ ```
135
+
136
+ ### Threshold Exceptions
137
+
138
+ Exceptions to coverage requirements MUST be documented:
139
+
140
+ | Exception Type | When Allowed | Documentation Required |
141
+ |---------------|-------------|----------------------|
142
+ | External dependency blocker | Third-party API unavailable | Issue link + timeline |
143
+ | Infrastructure limitation | Test environment constraint | Workaround plan |
144
+ | Deferred to next iteration | Agreed with stakeholders | Ticket reference |
145
+
146
+ ---
147
+
148
+ ## AC Coverage Report Format
149
+
150
+ ### Standard Report Structure
151
+
152
+ ```markdown
153
+ # AC Coverage Report
154
+
155
+ **Specification**: SPEC-001 — User Authentication
156
+ **Generated**: 2026-03-18
157
+ **Coverage**: 75% (6/8 AC)
158
+
159
+ ## Summary
160
+
161
+ | Status | Count | Percentage |
162
+ |--------|-------|------------|
163
+ | ✅ Covered | 5 | 62.5% |
164
+ | ⚠️ Partial | 2 | 25.0% |
165
+ | ❌ Uncovered | 1 | 12.5% |
166
+
167
+ ## Traceability Matrix
168
+
169
+ | AC-ID | Description | Status | Test Reference |
170
+ |-------|-------------|--------|----------------|
171
+ | AC-1 | Login with valid credentials | ✅ | auth.test.ts:15 |
172
+ | AC-2 | Reject invalid credentials | ✅ | auth.test.ts:32 |
173
+ | AC-3 | Rate limit login attempts | ⚠️ | auth.test.ts:48 (missing edge case) |
174
+ | ... | ... | ... | ... |
175
+
176
+ ## Gaps
177
+
178
+ ### Uncovered AC
179
+ - **AC-8**: Social login integration — Blocked by OAuth provider sandbox
180
+
181
+ ### Partial AC
182
+ - **AC-3**: Rate limit — Missing test for concurrent requests
183
+ - **AC-6**: Session timeout — Missing test for background tab behavior
184
+
185
+ ## Action Items
186
+ 1. [ ] AC-8: Set up OAuth sandbox environment (ETA: 2026-03-25)
187
+ 2. [ ] AC-3: Add concurrent request test
188
+ 3. [ ] AC-6: Add background tab test
189
+ ```
190
+
191
+ ### Machine-Readable Format
192
+
193
+ ```json
194
+ {
195
+ "specId": "SPEC-001",
196
+ "specName": "User Authentication",
197
+ "generatedAt": "2026-03-18T10:00:00Z",
198
+ "coverage": {
199
+ "percentage": 75,
200
+ "covered": 5,
201
+ "partial": 2,
202
+ "uncovered": 1,
203
+ "total": 8
204
+ },
205
+ "matrix": [
206
+ {
207
+ "acId": "AC-1",
208
+ "description": "Login with valid credentials",
209
+ "status": "covered",
210
+ "testFile": "tests/auth.test.ts",
211
+ "testName": "should login with valid credentials",
212
+ "testLine": 15
213
+ }
214
+ ]
215
+ }
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Automatic Spec Generation Quality Rules
221
+
222
+ ### AC Quality Requirements
223
+
224
+ When generating specifications automatically (from PRD, user stories, or requirements), the generated AC MUST meet these quality criteria:
225
+
226
+ | Criterion | Description | Validation |
227
+ |-----------|-------------|-----------|
228
+ | **Specific** | AC describes a concrete, observable behavior | No vague terms ("should work well", "fast enough") |
229
+ | **Measurable** | AC has quantifiable or verifiable outcome | Contains expected values, states, or behaviors |
230
+ | **Achievable** | AC is technically feasible | References known APIs, data, or capabilities |
231
+ | **Relevant** | AC relates to the feature's purpose | Maps to a user need or business requirement |
232
+ | **Testable** | AC can be verified by a test | Can be expressed as Given-When-Then |
233
+
234
+ ### Spec Generation I/O Contract
235
+
236
+ #### Input Format
237
+
238
+ | Input Type | Required Fields | Example |
239
+ |-----------|----------------|---------|
240
+ | PRD | Title, Description, User Stories | Product Requirements Document |
241
+ | User Story | As a / I want / So that | "As a user, I want to login..." |
242
+ | Feature Brief | Feature name, Goals, Constraints | Feature description document |
243
+
244
+ #### Output Format
245
+
246
+ Generated spec MUST include:
247
+
248
+ | Section | Required | Description |
249
+ |---------|----------|-------------|
250
+ | SPEC ID | Yes | Unique identifier (e.g., SPEC-001) |
251
+ | Title | Yes | Feature name |
252
+ | Description | Yes | What the feature does |
253
+ | Acceptance Criteria | Yes | Numbered AC list (AC-1, AC-2, ...) |
254
+ | AC Format | Yes | Given-When-Then or structured bullet |
255
+ | Testability Flag | Yes | Each AC marked as testable/not-testable |
256
+
257
+ #### Validation Rules
258
+
259
+ 1. **AC Count**: Generated spec MUST have at least 1 AC
260
+ 2. **AC Uniqueness**: No duplicate AC descriptions
261
+ 3. **AC Completeness**: Happy path + at least 1 error/edge case
262
+ 4. **AC Testability**: 100% of AC must be testable
263
+ 5. **Traceability**: Each AC links back to source requirement
264
+
265
+ ---
266
+
267
+ ## Anti-Patterns
268
+
269
+ | Anti-Pattern | Impact | Correct Approach |
270
+ |--------------|--------|------------------|
271
+ | Untraceable tests | Cannot verify spec coverage | Always annotate tests with AC-ID |
272
+ | Claiming partial as covered | False confidence in coverage | Use honest status classification |
273
+ | Ignoring uncovered AC | Gaps in verification | Track and plan coverage for all AC |
274
+ | AC without testability | Cannot be verified | Ensure all AC are testable |
275
+ | Coverage without assertions | Tests run but verify nothing | Check for meaningful assertions |
276
+
277
+ ---
278
+
279
+ ## Related Standards
280
+
281
+ - [Forward Derivation Standards](forward-derivation-standards.md) — Generating tests from AC
282
+ - [Spec-Driven Development](spec-driven-development.md) — AC definition format
283
+ - [Testing Standards](testing-standards.md) — Test implementation standards
284
+ - [Check-in Standards](checkin-standards.md) — Coverage gates for check-in
285
+ - [Test Governance](test-governance.md) — Completion criteria
286
+
287
+ ---
288
+
289
+ ## Version History
290
+
291
+ | Version | Date | Changes |
292
+ |---------|------|---------|
293
+ | 1.0.0 | 2026-03-18 | Initial version — traceability matrix, coverage calculation, spec generation rules |
@@ -0,0 +1,149 @@
1
+ # Agent Dispatch & Parallel Coordination
2
+
3
+ > **Language**: English | [繁體中文](../locales/zh-TW/core/agent-dispatch.md)
4
+
5
+ **Version**: 1.0.0
6
+ **Last Updated**: 2026-03-20
7
+ **Applicability**: AI-assisted development with multi-agent orchestration
8
+ **Scope**: universal
9
+ **Inspired by**: [Superpowers](https://github.com/obra/superpowers) — dispatching-parallel-agents, subagent-driven-development (MIT)
10
+
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Define standards for dispatching AI sub-agents in parallel, coordinating their work, and handling their return states. This standard ensures efficient parallelization while preventing file conflicts and integration failures.
16
+
17
+ 定義 AI 子代理的並行派遣、工作協調與狀態回報標準。確保高效並行化的同時,防止檔案衝突與整合失敗。
18
+
19
+ ---
20
+
21
+ ## Glossary
22
+
23
+ | Term | Definition |
24
+ |------|-----------|
25
+ | Sub-agent | An AI agent spawned by an orchestrator to handle a specific task |
26
+ | Independent Domain | A task scope with no shared mutable state with other tasks |
27
+ | Status Protocol | The standardized return states a sub-agent must report |
28
+ | File Conflict | When multiple agents modify the same file concurrently |
29
+
30
+ ---
31
+
32
+ ## Core Principle — Independence Before Parallelism
33
+
34
+ > **Before dispatching agents in parallel, verify their task domains are independent (no shared mutable state).**
35
+
36
+ 派遣前必須識別獨立域 — 無共享可變狀態才可並行。
37
+
38
+ ---
39
+
40
+ ## Prompt Design Principles
41
+
42
+ Every sub-agent prompt must follow three principles:
43
+
44
+ ### 1. Focused(聚焦)
45
+
46
+ Each agent handles exactly one problem domain. Do not combine unrelated tasks.
47
+
48
+ 每個代理只處理單一問題域,不混合無關任務。
49
+
50
+ ### 2. Self-contained(自足)
51
+
52
+ The prompt includes all context needed for execution. The agent should not need to ask questions or search for additional information.
53
+
54
+ Prompt 包含執行所需的完整上下文,代理不需要額外提問或搜尋。
55
+
56
+ ### 3. Specific Output(明確輸出)
57
+
58
+ Define exactly what format the agent should return its results in.
59
+
60
+ 明確定義期望的回報格式。
61
+
62
+ ---
63
+
64
+ ## Status Protocol
65
+
66
+ Every sub-agent must report one of four statuses upon completion:
67
+
68
+ | Status | Description | Orchestrator Action |
69
+ |--------|-------------|-------------------|
70
+ | `DONE` | Task completed successfully | Continue to next task |
71
+ | `DONE_WITH_CONCERNS` | Completed but with concerns to record | Log concerns, continue |
72
+ | `NEEDS_CONTEXT` | Needs more context to complete | Inject context, re-dispatch (not a retry) |
73
+ | `BLOCKED` | Cannot complete, needs escalation | Upgrade model tier or split task |
74
+
75
+ ### Status Decision Flow
76
+
77
+ ```
78
+ Agent completes work
79
+ ├── All acceptance criteria met? → DONE
80
+ ├── Criteria met but concerns exist? → DONE_WITH_CONCERNS
81
+ ├── Missing information to proceed? → NEEDS_CONTEXT
82
+ └── Fundamentally unable to complete? → BLOCKED
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Conflict Detection
88
+
89
+ When parallel agents return, the orchestrator must:
90
+
91
+ 1. **Check for file conflicts** — did multiple agents modify the same file?
92
+ 2. **Run the full test suite** — verify integration after merging all changes
93
+ 3. **Resolve conflicts** — either automatically or flag for human review
94
+
95
+ ```
96
+ Agent A (modifies: src/auth.ts, src/auth.test.ts) ─┐
97
+ ├─→ Conflict check → Integration test
98
+ Agent B (modifies: src/api.ts, src/api.test.ts) ─┘
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Rules
104
+
105
+ | ID | Trigger | Action | Priority |
106
+ |----|---------|--------|----------|
107
+ | AD-001 | Multiple agents edit the same file | Flag conflict, require merge resolution | Critical |
108
+ | AD-002 | Agent reports BLOCKED | Upgrade model tier and retry once | High |
109
+ | AD-003 | All parallel agents complete | Run full test suite to verify integration | High |
110
+
111
+ ---
112
+
113
+ ## Examples
114
+
115
+ ### Good: Parallel Independent Tasks
116
+
117
+ ```yaml
118
+ # Two agents working on independent modules
119
+ Agent 1:
120
+ task: "Add rate limiting to /api/users endpoint"
121
+ files: [src/api/users.ts, src/api/users.test.ts]
122
+
123
+ Agent 2:
124
+ task: "Add caching to /api/products endpoint"
125
+ files: [src/api/products.ts, src/api/products.test.ts]
126
+
127
+ # No shared files → safe to parallelize
128
+ ```
129
+
130
+ ### Bad: Parallel Dependent Tasks
131
+
132
+ ```yaml
133
+ # Two agents modifying shared state
134
+ Agent 1:
135
+ task: "Refactor database connection pool"
136
+ files: [src/db.ts] # ⚠️ shared file
137
+
138
+ Agent 2:
139
+ task: "Add connection retry logic"
140
+ files: [src/db.ts] # ⚠️ conflict!
141
+ ```
142
+
143
+ ---
144
+
145
+ ## References
146
+
147
+ - **Superpowers**: [dispatching-parallel-agents](https://github.com/obra/superpowers), [subagent-driven-development](https://github.com/obra/superpowers) (MIT)
148
+ - **MapReduce**: Conceptual parallel execution model
149
+ - **Actor Model**: Independent agent communication pattern
@@ -0,0 +1,239 @@
1
+ # AI Command Behavior Standards
2
+
3
+ > **Language**: English | [繁體中文](../locales/zh-TW/core/ai-command-behavior.md) | [简体中文](../locales/zh-CN/core/ai-command-behavior.md)
4
+
5
+ **Version**: 1.0.0
6
+ **Last Updated**: 2026-03-24
7
+ **Applicability**: All projects using AI-assisted commands or skills
8
+ **Scope**: universal
9
+ **Industry Standards**: None (Emerging AI tool practice)
10
+ **References**: [SPEC-STD-07](../docs/specs/standards/SPEC-STD-07-ai-command-behavior.md)
11
+
12
+ ---
13
+
14
+ ## Purpose
15
+
16
+ This standard defines a structure for specifying AI Agent runtime behavior in command/skill definition files. It ensures that AI agents produce consistent, predictable interactions when executing commands — regardless of which AI model or tool runs them.
17
+
18
+ **Problem**: Commands define "what" to do but lack "how" the AI should interact with the user, leading to unpredictable behavior.
19
+
20
+ **Solution**: A standard `## AI Agent Behavior` section with four subsections covering entry routing, interaction flow, stop points, and error handling.
21
+
22
+ ---
23
+
24
+ ## AI Behavior Section Structure
25
+
26
+ Every command definition file that requires AI interaction SHOULD include:
27
+
28
+ ```markdown
29
+ ## AI Agent Behavior | AI 代理行為
30
+
31
+ ### Entry Router | 進入路由
32
+
33
+ ### Interaction Script | 互動腳本
34
+
35
+ ### Stop Points | 停止點
36
+
37
+ ### Error Handling | 錯誤處理
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Section Definitions
43
+
44
+ ### 1. Entry Router
45
+
46
+ Defines what the AI does for each invocation pattern. Use a decision table for commands with multiple invocation patterns.
47
+
48
+ **Format:**
49
+
50
+ ```markdown
51
+ | Input | AI Action |
52
+ |-------|-----------|
53
+ | `/cmd` | [action when no arguments] |
54
+ | `/cmd <name>` | [action with name argument] |
55
+ | `/cmd <phase>` | [action with phase subcommand] |
56
+ | `/cmd <phase> <target>` | [action with phase and target] |
57
+ ```
58
+
59
+ **Simple commands** (single invocation pattern) may use a one-line description instead.
60
+
61
+ **Rules:**
62
+ - Every documented invocation pattern MUST have a corresponding entry
63
+ - The "no arguments" case MUST always be defined
64
+ - Entry actions MUST be deterministic — no ambiguity in what happens first
65
+
66
+ ### 2. Interaction Script
67
+
68
+ Defines step-by-step AI behavior using **mixed granularity**:
69
+
70
+ | Element | Granularity | Reason |
71
+ |---------|-------------|--------|
72
+ | Decision points | Precise (IF/THEN) | Affects downstream flow |
73
+ | General steps | Guideline (numbered list) | AI needs flexibility |
74
+
75
+ **Decision point format:**
76
+
77
+ ```markdown
78
+ **Decision: [Name]**
79
+ - IF [condition A] → [specific action]
80
+ - IF [condition B] → [specific action]
81
+ - ELSE → [default action]
82
+ ```
83
+
84
+ **General step format:**
85
+
86
+ ```markdown
87
+ 1. [Step description]
88
+ 2. [Step description]
89
+ 3. [Step description]
90
+ ```
91
+
92
+ **Rules:**
93
+ - Decision points MUST use explicit IF/THEN/ELSE
94
+ - General steps SHOULD use numbered lists
95
+ - Output format (what the AI shows to the user) SHOULD be specified for key outputs
96
+
97
+ ### 3. Stop Points
98
+
99
+ Defines moments where the AI MUST pause and wait for user confirmation.
100
+
101
+ **Marker format:**
102
+
103
+ ```markdown
104
+ 🛑 **STOP**: [description] — wait for user confirmation before continuing
105
+ ```
106
+
107
+ **Default stop principles** (apply when no explicit stop points are defined):
108
+
109
+ | Situation | Action |
110
+ |-----------|--------|
111
+ | About to write/modify files | 🛑 STOP |
112
+ | About to execute irreversible operations | 🛑 STOP |
113
+ | Phase/stage completion | 🛑 STOP |
114
+ | Need additional information from user | 🛑 STOP |
115
+ | Read-only analysis complete, showing results | ▶️ CONTINUE |
116
+
117
+ **Rules:**
118
+ - Stop points MUST be explicit — do not rely on AI judgment
119
+ - Each stop point MUST describe what the AI is waiting for
120
+ - The number of stop points should be proportional to the operation's risk
121
+
122
+ ### 4. Error Handling
123
+
124
+ Defines AI behavior when prerequisites fail or unexpected states occur.
125
+
126
+ **Format:**
127
+
128
+ ```markdown
129
+ | Error Condition | AI Action |
130
+ |-----------------|-----------|
131
+ | [prerequisite not met] | [guide to correct step] |
132
+ | [unexpected state] | [stop and ask user] |
133
+ ```
134
+
135
+ **Default error principles:**
136
+
137
+ 1. **State the problem**: Tell user which prerequisite failed
138
+ 2. **Guide to resolution**: Suggest the correct command or step
139
+ 3. **Never silently skip**: Do not proceed by ignoring failures
140
+ 4. **Never auto-fix without permission**: Unless explicitly allowed in the command definition
141
+ 5. **Ask when uncertain**: Stop and ask rather than guess
142
+
143
+ ---
144
+
145
+ ## Applicability Rules
146
+
147
+ Not all commands need a full `## AI Agent Behavior` section.
148
+
149
+ | Condition | Full Definition Required | Reason |
150
+ |-----------|-------------------------|--------|
151
+ | Multi-phase workflow | ✅ Yes | Complex flow needs guidance |
152
+ | Multiple invocation patterns | ✅ Yes | Entry routing is ambiguous otherwise |
153
+ | Single clear action | ❌ No | Behavior is self-evident |
154
+ | Pure information query | ❌ No | No interaction decisions to make |
155
+ | Orchestration of sub-commands | ✅ Yes | Coordination logic needs definition |
156
+
157
+ **Heuristic**: If two different AI models could reasonably interpret the command differently, it needs a behavior definition.
158
+
159
+ ---
160
+
161
+ ## Example: Minimal Behavior Section
162
+
163
+ For a command like `/coverage` with moderate complexity:
164
+
165
+ ```markdown
166
+ ## AI Agent Behavior
167
+
168
+ ### Entry Router
169
+
170
+ | Input | AI Action |
171
+ |-------|-----------|
172
+ | `/coverage` | Detect test framework, run coverage, show summary |
173
+ | `/coverage <path>` | Run coverage for specific path only |
174
+
175
+ ### Interaction Script
176
+
177
+ 1. Detect project test framework (look for jest.config, vitest.config, etc.)
178
+ 2. Run coverage command
179
+ 3. Parse output and present summary table
180
+
181
+ **Decision: Low coverage detected**
182
+ - IF coverage < project threshold → highlight gaps, suggest files to test
183
+ - ELSE → show summary only
184
+
185
+ ### Stop Points
186
+
187
+ 🛑 **STOP**: After showing coverage summary — ask if user wants detailed file-by-file breakdown
188
+
189
+ ### Error Handling
190
+
191
+ | Error Condition | AI Action |
192
+ |-----------------|-----------|
193
+ | No test framework detected | Ask user which framework to use |
194
+ | Tests fail during coverage run | Show failures first, ask if user wants coverage anyway |
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Quick Reference Card
200
+
201
+ ### Section Checklist
202
+
203
+ | Section | Must Define | Key Rule |
204
+ |---------|------------|----------|
205
+ | Entry Router | All invocation patterns | "No arguments" case is mandatory |
206
+ | Interaction Script | Decision points + general flow | Decision = precise, Steps = guideline |
207
+ | Stop Points | Every pause moment | Explicit markers, no AI guessing |
208
+ | Error Handling | Prerequisite failures | Never silently skip |
209
+
210
+ ### Granularity Guide
211
+
212
+ | Element | Level | Format |
213
+ |---------|-------|--------|
214
+ | Entry Router | Precise | Decision table |
215
+ | Stop Points | Precise | 🛑 markers |
216
+ | Interaction Script | Guideline | Numbered steps + IF/THEN for decisions |
217
+ | Error Handling | Principles | Error table + default rules |
218
+
219
+ ---
220
+
221
+ ## Related Standards
222
+
223
+ - [AI Instruction Standards](ai-instruction-standards.md) — file structure for AI instruction files
224
+ - [AI Agreement Standards](ai-agreement-standards.md) — human-AI collaboration agreements
225
+ - [Anti-Hallucination Standards](anti-hallucination.md) — evidence-based AI behavior
226
+
227
+ ---
228
+
229
+ ## Version History
230
+
231
+ | Version | Date | Changes |
232
+ |---------|------|---------|
233
+ | 1.0.0 | 2026-03-24 | Initial release |
234
+
235
+ ---
236
+
237
+ ## License
238
+
239
+ This standard is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).