universal-dev-standards 4.2.0 → 5.0.0-beta.11

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 (544) hide show
  1. package/README.md +3 -3
  2. package/bin/uds.js +165 -5
  3. package/bundled/core/acceptance-test-driven-development.md +19 -721
  4. package/bundled/core/accessibility-standards.md +862 -0
  5. package/bundled/core/ai-agreement-standards.md +95 -0
  6. package/bundled/core/ai-friendly-architecture.md +2 -0
  7. package/bundled/core/ai-instruction-standards.md +2 -0
  8. package/bundled/core/anti-hallucination.md +90 -637
  9. package/bundled/core/behavior-driven-development.md +20 -735
  10. package/bundled/core/changelog-standards.md +4 -0
  11. package/bundled/core/checkin-standards.md +21 -4
  12. package/bundled/core/code-review-checklist.md +3 -0
  13. package/bundled/core/commit-message-guide.md +14 -3
  14. package/bundled/core/deployment-standards.md +296 -0
  15. package/bundled/core/developer-memory.md +568 -0
  16. package/bundled/core/documentation-structure.md +114 -18
  17. package/bundled/core/documentation-writing-standards.md +272 -2
  18. package/bundled/core/error-code-standards.md +3 -0
  19. package/bundled/core/forward-derivation-standards.md +134 -8
  20. package/bundled/core/git-workflow.md +72 -686
  21. package/bundled/core/guides/anti-hallucination-guide.md +517 -0
  22. package/bundled/core/guides/git-workflow-guide.md +954 -0
  23. package/bundled/core/guides/performance-guide.md +508 -0
  24. package/bundled/core/guides/refactoring-guide.md +608 -0
  25. package/bundled/core/guides/security-guide.md +485 -0
  26. package/bundled/core/logging-standards.md +337 -2
  27. package/bundled/core/performance-standards.md +231 -0
  28. package/bundled/core/project-context-memory.md +180 -0
  29. package/bundled/core/project-structure.md +315 -2
  30. package/bundled/core/refactoring-standards.md +81 -761
  31. package/bundled/core/requirement-engineering.md +39 -0
  32. package/bundled/core/reverse-engineering-standards.md +6 -4
  33. package/bundled/core/security-standards.md +244 -0
  34. package/bundled/core/spec-driven-development.md +20 -319
  35. package/bundled/core/test-completeness-dimensions.md +213 -11
  36. package/bundled/core/test-driven-development.md +22 -978
  37. package/bundled/core/testing-standards.md +222 -2903
  38. package/bundled/core/versioning.md +16 -55
  39. package/bundled/core/virtual-organization-standards.md +85 -0
  40. package/bundled/locales/README.md +4 -4
  41. package/bundled/locales/zh-CN/CHANGELOG.md +18 -18
  42. package/bundled/locales/zh-CN/CLAUDE.md +3 -3
  43. package/bundled/locales/zh-CN/MAINTENANCE.md +7 -7
  44. package/bundled/locales/zh-CN/README.md +47 -6
  45. package/bundled/locales/zh-CN/STANDARDS-MAPPING.md +1 -1
  46. package/bundled/locales/zh-CN/adoption/ADOPTION-GUIDE.md +3 -3
  47. package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +66 -7
  48. package/bundled/locales/zh-CN/adoption/STATIC-DYNAMIC-GUIDE.md +22 -22
  49. package/bundled/locales/zh-CN/adoption/checklists/enterprise.md +5 -5
  50. package/bundled/locales/zh-CN/adoption/checklists/minimal.md +4 -4
  51. package/bundled/locales/zh-CN/adoption/checklists/recommended.md +5 -5
  52. package/bundled/locales/zh-CN/ai/MAINTENANCE.md +13 -13
  53. package/bundled/locales/zh-CN/core/ai-instruction-standards.md +1 -1
  54. package/bundled/locales/zh-CN/core/anti-hallucination.md +39 -3
  55. package/bundled/locales/zh-CN/core/checkin-standards.md +18 -5
  56. package/bundled/locales/zh-CN/core/commit-message-guide.md +1 -1
  57. package/bundled/locales/zh-CN/core/developer-memory.md +576 -0
  58. package/bundled/locales/zh-CN/core/documentation-structure.md +43 -5
  59. package/bundled/locales/zh-CN/core/documentation-writing-standards.md +146 -5
  60. package/bundled/locales/zh-CN/core/git-workflow.md +179 -4
  61. package/bundled/locales/zh-CN/core/logging-standards.md +177 -4
  62. package/bundled/locales/zh-CN/core/project-structure.md +117 -5
  63. package/bundled/locales/zh-CN/core/refactoring-standards.md +3 -3
  64. package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +6 -6
  65. package/bundled/locales/zh-CN/core/spec-driven-development.md +516 -14
  66. package/bundled/locales/zh-CN/core/test-completeness-dimensions.md +155 -24
  67. package/bundled/locales/zh-CN/core/test-driven-development.md +71 -20
  68. package/bundled/locales/zh-CN/core/testing-standards.md +4 -4
  69. package/bundled/locales/zh-CN/core/versioning.md +1 -1
  70. package/bundled/locales/zh-CN/docs/AI-AGENT-ROADMAP.md +90 -51
  71. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +184 -0
  72. package/bundled/locales/zh-CN/docs/CLI-FLOW.md +239 -0
  73. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +320 -0
  74. package/bundled/locales/zh-CN/docs/OPERATION-WORKFLOW.md +43 -43
  75. package/bundled/locales/zh-CN/docs/STANDARDS-REFERENCE.md +440 -0
  76. package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -1
  77. package/bundled/locales/zh-CN/docs/WINDOWS-GUIDE.md +1 -1
  78. package/bundled/locales/zh-CN/integrations/codex/README.md +3 -3
  79. package/bundled/locales/zh-CN/integrations/gemini-cli/README.md +3 -3
  80. package/bundled/locales/zh-CN/integrations/github-copilot/README.md +5 -5
  81. package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +9 -9
  82. package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +18 -6
  83. package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +2 -2
  84. package/bundled/locales/zh-CN/integrations/opencode/README.md +3 -3
  85. package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +22 -10
  86. package/bundled/locales/zh-CN/integrations/openspec/README.md +1 -1
  87. package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +3 -3
  88. package/bundled/locales/zh-CN/integrations/spec-kit/README.md +1 -1
  89. package/bundled/locales/zh-CN/options/commit-message/bilingual.md +1 -1
  90. package/bundled/locales/zh-CN/options/commit-message/english.md +1 -1
  91. package/bundled/locales/zh-CN/options/commit-message/traditional-chinese.md +1 -1
  92. package/bundled/locales/zh-CN/options/git-workflow/gitflow.md +1 -1
  93. package/bundled/locales/zh-CN/options/git-workflow/github-flow.md +1 -1
  94. package/bundled/locales/zh-CN/options/git-workflow/merge-commit.md +1 -1
  95. package/bundled/locales/zh-CN/options/git-workflow/rebase-ff.md +1 -1
  96. package/bundled/locales/zh-CN/options/git-workflow/squash-merge.md +1 -1
  97. package/bundled/locales/zh-CN/options/git-workflow/trunk-based.md +1 -1
  98. package/bundled/locales/zh-CN/options/project-structure/dotnet.md +1 -1
  99. package/bundled/locales/zh-CN/options/project-structure/go.md +1 -1
  100. package/bundled/locales/zh-CN/options/project-structure/java.md +1 -1
  101. package/bundled/locales/zh-CN/options/project-structure/nodejs.md +1 -1
  102. package/bundled/locales/zh-CN/options/project-structure/python.md +1 -1
  103. package/bundled/locales/zh-CN/options/testing/e2e-testing.md +1 -1
  104. package/bundled/locales/zh-CN/options/testing/integration-testing.md +1 -1
  105. package/bundled/locales/zh-CN/options/testing/system-testing.md +1 -1
  106. package/bundled/locales/zh-CN/options/testing/unit-testing.md +1 -1
  107. package/bundled/locales/zh-CN/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +2 -2
  108. package/bundled/locales/zh-CN/skills/README.md +131 -81
  109. package/bundled/locales/zh-CN/skills/agents/README.md +281 -0
  110. package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +10 -10
  111. package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +8 -8
  112. package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +8 -8
  113. package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +221 -0
  114. package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +214 -0
  115. package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +71 -0
  116. package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +428 -0
  117. package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +484 -0
  118. package/bundled/locales/zh-CN/skills/atdd-assistant/guide.md +368 -0
  119. package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +68 -0
  120. package/bundled/locales/zh-CN/skills/bdd-assistant/bdd-workflow.md +406 -0
  121. package/bundled/locales/zh-CN/skills/bdd-assistant/gherkin-guide.md +454 -0
  122. package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +324 -0
  123. package/bundled/locales/zh-CN/skills/changelog-guide/SKILL.md +64 -0
  124. package/bundled/locales/zh-CN/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +6 -7
  125. package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +56 -0
  126. package/bundled/locales/zh-CN/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -7
  127. package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +56 -0
  128. package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +4 -4
  129. package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +5 -6
  130. package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +4 -4
  131. package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/bdd.md +2 -2
  132. package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/methodology.md +3 -3
  133. package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/refactor.md +3 -3
  134. package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +61 -0
  135. package/bundled/locales/zh-CN/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +4 -4
  136. package/bundled/locales/zh-CN/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +5 -6
  137. package/bundled/locales/zh-CN/skills/{claude-code/commit-standards → commit-standards}/language-options.md +3 -3
  138. package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +59 -0
  139. package/bundled/locales/zh-CN/skills/docs-generator/guide.md +262 -0
  140. package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -8
  141. package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +4 -4
  142. package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +3 -3
  143. package/bundled/locales/zh-CN/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +6 -6
  144. package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +62 -0
  145. package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +130 -0
  146. package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +6 -6
  147. package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +3 -3
  148. package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +4 -4
  149. package/bundled/locales/zh-CN/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +6 -6
  150. package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +78 -0
  151. package/bundled/locales/zh-CN/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +2 -2
  152. package/bundled/locales/zh-CN/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +2 -2
  153. package/bundled/locales/zh-CN/skills/{claude-code/methodology-system → methodology-system}/runtime.md +3 -3
  154. package/bundled/locales/zh-CN/skills/project-discovery/SKILL.md +66 -0
  155. package/bundled/locales/zh-CN/skills/project-discovery/guide.md +371 -0
  156. package/bundled/locales/zh-CN/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +4 -4
  157. package/bundled/locales/zh-CN/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +1 -1
  158. package/bundled/locales/zh-CN/skills/refactoring-assistant/SKILL.md +67 -0
  159. package/bundled/locales/zh-CN/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -8
  160. package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +64 -0
  161. package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/changelog-format.md +3 -3
  162. package/bundled/locales/zh-CN/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +5 -6
  163. package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/release-workflow.md +7 -7
  164. package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +3 -3
  165. package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +67 -0
  166. package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +4 -5
  167. package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +3 -3
  168. package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +3 -3
  169. package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +67 -0
  170. package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +2 -2
  171. package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +17 -18
  172. package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +2 -2
  173. package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +3 -3
  174. package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +75 -0
  175. package/bundled/locales/zh-CN/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +10 -11
  176. package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +66 -0
  177. package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +12 -16
  178. package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
  179. package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +3 -3
  180. package/bundled/locales/zh-CN/skills/test-coverage-assistant/SKILL.md +65 -0
  181. package/bundled/locales/zh-CN/skills/test-coverage-assistant/guide.md +284 -0
  182. package/bundled/locales/zh-CN/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +8 -8
  183. package/bundled/locales/zh-CN/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +4 -4
  184. package/bundled/locales/zh-CN/skills/{cline → tools/cline}/README.md +1 -1
  185. package/bundled/locales/zh-CN/skills/{copilot → tools/copilot}/README.md +1 -1
  186. package/bundled/locales/zh-CN/skills/{copilot → tools/copilot}/copilot-instructions.md +1 -1
  187. package/bundled/locales/zh-CN/skills/{cursor → tools/cursor}/README.md +1 -1
  188. package/bundled/locales/zh-CN/skills/{windsurf → tools/windsurf}/README.md +1 -1
  189. package/bundled/locales/zh-TW/CHANGELOG.md +16 -16
  190. package/bundled/locales/zh-TW/CLAUDE.md +3 -3
  191. package/bundled/locales/zh-TW/MAINTENANCE.md +7 -7
  192. package/bundled/locales/zh-TW/README.md +57 -10
  193. package/bundled/locales/zh-TW/STANDARDS-MAPPING.md +1 -1
  194. package/bundled/locales/zh-TW/adoption/ADOPTION-GUIDE.md +4 -4
  195. package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +66 -7
  196. package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +22 -22
  197. package/bundled/locales/zh-TW/adoption/checklists/enterprise.md +5 -5
  198. package/bundled/locales/zh-TW/adoption/checklists/minimal.md +4 -4
  199. package/bundled/locales/zh-TW/adoption/checklists/recommended.md +5 -5
  200. package/bundled/locales/zh-TW/ai/MAINTENANCE.md +13 -13
  201. package/bundled/locales/zh-TW/ai/standards/anti-hallucination.ai.yaml +3 -2
  202. package/bundled/locales/zh-TW/ai/standards/git-workflow.ai.yaml +4 -3
  203. package/bundled/locales/zh-TW/ai/standards/spec-driven-development.ai.yaml +3 -3
  204. package/bundled/locales/zh-TW/ai/standards/testing.ai.yaml +1 -0
  205. package/bundled/locales/zh-TW/core/ai-instruction-standards.md +1 -1
  206. package/bundled/locales/zh-TW/core/anti-hallucination.md +38 -701
  207. package/bundled/locales/zh-TW/core/changelog-standards.md +1 -1
  208. package/bundled/locales/zh-TW/core/checkin-standards.md +18 -5
  209. package/bundled/locales/zh-TW/core/code-review-checklist.md +1 -1
  210. package/bundled/locales/zh-TW/core/commit-message-guide.md +1 -1
  211. package/bundled/locales/zh-TW/core/developer-memory.md +576 -0
  212. package/bundled/locales/zh-TW/core/documentation-structure.md +115 -22
  213. package/bundled/locales/zh-TW/core/documentation-writing-standards.md +126 -5
  214. package/bundled/locales/zh-TW/core/forward-derivation-standards.md +2 -2
  215. package/bundled/locales/zh-TW/core/git-workflow.md +38 -812
  216. package/bundled/locales/zh-TW/core/guides/anti-hallucination-guide.md +779 -0
  217. package/bundled/locales/zh-TW/core/guides/git-workflow-guide.md +1016 -0
  218. package/bundled/locales/zh-TW/core/guides/refactoring-guide.md +864 -0
  219. package/bundled/locales/zh-TW/core/guides/testing-guide.md +2280 -0
  220. package/bundled/locales/zh-TW/core/logging-standards.md +159 -4
  221. package/bundled/locales/zh-TW/core/project-structure.md +102 -9
  222. package/bundled/locales/zh-TW/core/refactoring-standards.md +37 -823
  223. package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +6 -6
  224. package/bundled/locales/zh-TW/core/spec-driven-development.md +17 -268
  225. package/bundled/locales/zh-TW/core/test-completeness-dimensions.md +128 -14
  226. package/bundled/locales/zh-TW/core/test-driven-development.md +20 -983
  227. package/bundled/locales/zh-TW/core/testing-standards.md +120 -2105
  228. package/bundled/locales/zh-TW/core/versioning.md +13 -55
  229. package/bundled/locales/zh-TW/docs/AI-AGENT-ROADMAP.md +90 -51
  230. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +184 -0
  231. package/bundled/locales/zh-TW/docs/CLI-FLOW.md +239 -0
  232. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +320 -0
  233. package/bundled/locales/zh-TW/docs/MIGRATION-V5.md +71 -0
  234. package/bundled/locales/zh-TW/docs/OPERATION-WORKFLOW.md +42 -42
  235. package/bundled/locales/zh-TW/docs/STANDARDS-REFERENCE.md +440 -0
  236. package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -1
  237. package/bundled/locales/zh-TW/docs/WINDOWS-GUIDE.md +1 -1
  238. package/bundled/locales/zh-TW/integrations/claude-code/README.md +44 -0
  239. package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +3 -3
  240. package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +18 -6
  241. package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +22 -10
  242. package/bundled/locales/zh-TW/methodologies/guides/sdd-guide.md +338 -0
  243. package/bundled/locales/zh-TW/methodologies/guides/tdd-guide.md +1055 -0
  244. package/bundled/locales/zh-TW/options/commit-message/bilingual.md +1 -1
  245. package/bundled/locales/zh-TW/options/commit-message/english.md +1 -1
  246. package/bundled/locales/zh-TW/options/commit-message/traditional-chinese.md +1 -1
  247. package/bundled/locales/zh-TW/options/git-workflow/gitflow.md +1 -1
  248. package/bundled/locales/zh-TW/options/git-workflow/github-flow.md +1 -1
  249. package/bundled/locales/zh-TW/options/git-workflow/merge-commit.md +1 -1
  250. package/bundled/locales/zh-TW/options/git-workflow/rebase-ff.md +1 -1
  251. package/bundled/locales/zh-TW/options/git-workflow/squash-merge.md +1 -1
  252. package/bundled/locales/zh-TW/options/git-workflow/trunk-based.md +1 -1
  253. package/bundled/locales/zh-TW/options/project-structure/dotnet.md +1 -1
  254. package/bundled/locales/zh-TW/options/project-structure/go.md +1 -1
  255. package/bundled/locales/zh-TW/options/project-structure/java.md +1 -1
  256. package/bundled/locales/zh-TW/options/project-structure/nodejs.md +1 -1
  257. package/bundled/locales/zh-TW/options/project-structure/python.md +1 -1
  258. package/bundled/locales/zh-TW/options/testing/e2e-testing.md +1 -1
  259. package/bundled/locales/zh-TW/options/testing/integration-testing.md +1 -1
  260. package/bundled/locales/zh-TW/options/testing/system-testing.md +1 -1
  261. package/bundled/locales/zh-TW/options/testing/unit-testing.md +1 -1
  262. package/bundled/locales/zh-TW/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +2 -2
  263. package/bundled/locales/zh-TW/skills/README.md +131 -79
  264. package/bundled/locales/zh-TW/skills/agents/README.md +281 -0
  265. package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +7 -7
  266. package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +8 -8
  267. package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +8 -8
  268. package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +221 -0
  269. package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +214 -0
  270. package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +71 -0
  271. package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +428 -0
  272. package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +484 -0
  273. package/bundled/locales/zh-TW/skills/atdd-assistant/guide.md +368 -0
  274. package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +68 -0
  275. package/bundled/locales/zh-TW/skills/bdd-assistant/bdd-workflow.md +406 -0
  276. package/bundled/locales/zh-TW/skills/bdd-assistant/gherkin-guide.md +454 -0
  277. package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +324 -0
  278. package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +64 -0
  279. package/bundled/locales/zh-TW/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +6 -7
  280. package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +56 -0
  281. package/bundled/locales/zh-TW/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -7
  282. package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +56 -0
  283. package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +4 -4
  284. package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +2 -3
  285. package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +4 -4
  286. package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/bdd.md +2 -2
  287. package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/methodology.md +3 -3
  288. package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/refactor.md +3 -3
  289. package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +61 -0
  290. package/bundled/locales/zh-TW/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +4 -4
  291. package/bundled/locales/zh-TW/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +5 -6
  292. package/bundled/locales/zh-TW/skills/{claude-code/commit-standards → commit-standards}/language-options.md +3 -3
  293. package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +59 -0
  294. package/bundled/locales/zh-TW/skills/docs-generator/guide.md +262 -0
  295. package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -8
  296. package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +4 -4
  297. package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +3 -3
  298. package/bundled/locales/zh-TW/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +6 -6
  299. package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +62 -0
  300. package/bundled/locales/zh-TW/skills/{claude-code/forward-derivation/SKILL.md → forward-derivation/guide.md} +24 -19
  301. package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +3 -3
  302. package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +3 -3
  303. package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +4 -4
  304. package/bundled/locales/zh-TW/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +6 -6
  305. package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +78 -0
  306. package/bundled/locales/zh-TW/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +2 -2
  307. package/bundled/locales/zh-TW/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +2 -2
  308. package/bundled/locales/zh-TW/skills/{claude-code/methodology-system → methodology-system}/runtime.md +3 -3
  309. package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +66 -0
  310. package/bundled/locales/zh-TW/skills/project-discovery/guide.md +371 -0
  311. package/bundled/locales/zh-TW/skills/project-discovery/workflow.md +574 -0
  312. package/bundled/locales/zh-TW/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +4 -4
  313. package/bundled/locales/zh-TW/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +1 -1
  314. package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +67 -0
  315. package/bundled/locales/zh-TW/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -8
  316. package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +64 -0
  317. package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/changelog-format.md +3 -3
  318. package/bundled/locales/zh-TW/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +2 -3
  319. package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/release-workflow.md +60 -28
  320. package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +3 -3
  321. package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +67 -0
  322. package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +2 -3
  323. package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +3 -3
  324. package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +3 -3
  325. package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +67 -0
  326. package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +2 -2
  327. package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +17 -18
  328. package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +2 -2
  329. package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +3 -3
  330. package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +75 -0
  331. package/bundled/locales/zh-TW/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +9 -10
  332. package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +66 -0
  333. package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +9 -10
  334. package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
  335. package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +3 -3
  336. package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +65 -0
  337. package/bundled/locales/zh-TW/skills/{claude-code/test-coverage-assistant/SKILL.md → test-coverage-assistant/guide.md} +27 -24
  338. package/bundled/locales/zh-TW/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +6 -6
  339. package/bundled/locales/zh-TW/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +4 -4
  340. package/bundled/locales/zh-TW/skills/{cline → tools/cline}/README.md +1 -1
  341. package/bundled/locales/zh-TW/skills/{copilot → tools/copilot}/README.md +1 -1
  342. package/bundled/locales/zh-TW/skills/{copilot → tools/copilot}/copilot-instructions.md +1 -1
  343. package/bundled/locales/zh-TW/skills/{cursor → tools/cursor}/README.md +1 -1
  344. package/bundled/locales/zh-TW/skills/{windsurf → tools/windsurf}/README.md +1 -1
  345. package/bundled/skills/INTEGRATION-GUIDE.md +210 -0
  346. package/bundled/skills/README.md +95 -0
  347. package/bundled/skills/_shared/README.md +60 -0
  348. package/bundled/skills/{claude-code/agents → agents}/README.md +2 -2
  349. package/bundled/skills/{claude-code/agents → agents}/code-architect.md +1 -1
  350. package/bundled/skills/{claude-code/agents → agents}/doc-writer.md +1 -1
  351. package/bundled/skills/{claude-code/agents → agents}/reviewer.md +1 -1
  352. package/bundled/skills/{claude-code/agents → agents}/spec-analyst.md +1 -1
  353. package/bundled/skills/{claude-code/agents → agents}/test-specialist.md +1 -1
  354. package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +28 -5
  355. package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +24 -5
  356. package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +31 -6
  357. package/bundled/skills/ai-friendly-architecture/SKILL.md +216 -0
  358. package/bundled/skills/ai-instruction-standards/SKILL.md +209 -0
  359. package/bundled/skills/atdd-assistant/SKILL.md +74 -0
  360. package/bundled/skills/{claude-code/atdd-assistant → atdd-assistant}/acceptance-criteria-guide.md +1 -1
  361. package/bundled/skills/{claude-code/atdd-assistant → atdd-assistant}/atdd-workflow.md +1 -1
  362. package/bundled/skills/{claude-code/atdd-assistant/SKILL.md → atdd-assistant/guide.md} +11 -11
  363. package/bundled/skills/bdd-assistant/SKILL.md +70 -0
  364. package/bundled/skills/{claude-code/bdd-assistant → bdd-assistant}/bdd-workflow.md +1 -1
  365. package/bundled/skills/{claude-code/bdd-assistant → bdd-assistant}/gherkin-guide.md +1 -1
  366. package/bundled/skills/{claude-code/bdd-assistant/SKILL.md → bdd-assistant/guide.md} +11 -11
  367. package/bundled/skills/changelog-guide/SKILL.md +66 -0
  368. package/bundled/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +8 -6
  369. package/bundled/skills/checkin-assistant/SKILL.md +52 -0
  370. package/bundled/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -6
  371. package/bundled/skills/code-review-assistant/SKILL.md +53 -0
  372. package/bundled/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +3 -3
  373. package/bundled/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +7 -5
  374. package/bundled/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +3 -3
  375. package/bundled/skills/commands/COMMAND-FAMILY-OVERVIEW.md +290 -0
  376. package/bundled/skills/{claude-code/commands → commands}/README.md +13 -3
  377. package/bundled/skills/{claude-code/commands → commands}/atdd.md +3 -3
  378. package/bundled/skills/{claude-code/commands → commands}/bdd.md +2 -2
  379. package/bundled/skills/commands/changelog.md +58 -0
  380. package/bundled/skills/{claude-code/commands → commands}/check.md +1 -1
  381. package/bundled/skills/commands/checkin.md +53 -0
  382. package/bundled/skills/{claude-code/commands → commands}/commit.md +3 -3
  383. package/bundled/skills/{claude-code/commands → commands}/config.md +1 -1
  384. package/bundled/skills/{claude-code/commands → commands}/coverage.md +5 -4
  385. package/bundled/skills/commands/derive-all.md +53 -0
  386. package/bundled/skills/commands/derive-atdd.md +49 -0
  387. package/bundled/skills/commands/derive-bdd.md +47 -0
  388. package/bundled/skills/commands/derive-tdd.md +48 -0
  389. package/bundled/skills/commands/derive.md +72 -0
  390. package/bundled/skills/commands/discover.md +80 -0
  391. package/bundled/skills/commands/docgen.md +61 -0
  392. package/bundled/skills/commands/docs.md +59 -0
  393. package/bundled/skills/commands/guide.md +44 -0
  394. package/bundled/skills/{claude-code/commands → commands}/init.md +2 -2
  395. package/bundled/skills/{claude-code/commands → commands}/methodology.md +32 -16
  396. package/bundled/skills/{claude-code/commands → commands}/refactor.md +2 -2
  397. package/bundled/skills/commands/release.md +56 -0
  398. package/bundled/skills/{claude-code/commands → commands}/requirement.md +3 -3
  399. package/bundled/skills/commands/reverse-bdd.md +47 -0
  400. package/bundled/skills/commands/reverse-sdd.md +51 -0
  401. package/bundled/skills/commands/reverse-tdd.md +51 -0
  402. package/bundled/skills/commands/reverse.md +63 -0
  403. package/bundled/skills/{claude-code/commands → commands}/review.md +3 -3
  404. package/bundled/skills/commands/sdd.md +135 -0
  405. package/bundled/skills/{claude-code/commands → commands}/tdd.md +3 -3
  406. package/bundled/skills/{claude-code/commands → commands}/update.md +2 -2
  407. package/bundled/skills/commit-standards/SKILL.md +60 -0
  408. package/bundled/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +3 -3
  409. package/bundled/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +17 -5
  410. package/bundled/skills/{claude-code/commit-standards → commit-standards}/language-options.md +2 -2
  411. package/bundled/skills/docs-generator/SKILL.md +69 -0
  412. package/bundled/skills/docs-generator/guide.md +258 -0
  413. package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -7
  414. package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +3 -3
  415. package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +2 -2
  416. package/bundled/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +7 -5
  417. package/bundled/skills/forward-derivation/SKILL.md +61 -0
  418. package/bundled/skills/{claude-code/forward-derivation/SKILL.md → forward-derivation/guide.md} +44 -29
  419. package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +7 -5
  420. package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +2 -2
  421. package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +3 -3
  422. package/bundled/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +7 -5
  423. package/bundled/skills/methodology-system/SKILL.md +75 -0
  424. package/bundled/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +1 -1
  425. package/bundled/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +51 -16
  426. package/bundled/skills/methodology-system/integrated-flow.md +454 -0
  427. package/bundled/skills/{claude-code/methodology-system → methodology-system}/runtime.md +2 -2
  428. package/bundled/skills/project-discovery/SKILL.md +63 -0
  429. package/bundled/skills/project-discovery/guide.md +367 -0
  430. package/bundled/skills/project-discovery/workflow.md +566 -0
  431. package/bundled/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +14 -4
  432. package/bundled/skills/refactoring-assistant/SKILL.md +78 -0
  433. package/bundled/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -7
  434. package/bundled/skills/release-standards/SKILL.md +61 -0
  435. package/bundled/skills/{claude-code/release-standards → release-standards}/changelog-format.md +2 -2
  436. package/bundled/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +7 -5
  437. package/bundled/skills/{claude-code/release-standards → release-standards}/release-workflow.md +59 -24
  438. package/bundled/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +2 -2
  439. package/bundled/skills/requirement-assistant/SKILL.md +66 -0
  440. package/bundled/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +14 -6
  441. package/bundled/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +2 -2
  442. package/bundled/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +2 -2
  443. package/bundled/skills/reverse-engineer/SKILL.md +64 -0
  444. package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +1 -1
  445. package/bundled/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +21 -18
  446. package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +1 -1
  447. package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +2 -2
  448. package/bundled/skills/spec-driven-dev/SKILL.md +80 -0
  449. package/bundled/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +50 -8
  450. package/bundled/skills/tdd-assistant/SKILL.md +65 -0
  451. package/bundled/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +10 -10
  452. package/bundled/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
  453. package/bundled/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +2 -2
  454. package/bundled/skills/test-coverage-assistant/SKILL.md +63 -0
  455. package/bundled/skills/{claude-code/test-coverage-assistant/SKILL.md → test-coverage-assistant/guide.md} +39 -24
  456. package/bundled/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +12 -7
  457. package/bundled/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +3 -3
  458. package/bundled/skills/testing-guide/testing-theory.md +2291 -0
  459. package/bundled/skills/tools/cline/.clinerules +79 -0
  460. package/bundled/skills/tools/cline/README.md +50 -0
  461. package/bundled/skills/tools/copilot/README.md +99 -0
  462. package/bundled/skills/tools/copilot/copilot-instructions.md +71 -0
  463. package/bundled/skills/tools/cursor/.cursorrules +101 -0
  464. package/bundled/skills/tools/cursor/README.md +50 -0
  465. package/bundled/skills/tools/windsurf/.windsurfrules +76 -0
  466. package/bundled/skills/tools/windsurf/README.md +51 -0
  467. package/bundled/skills/{claude-code/workflows → workflows}/README.md +1 -1
  468. package/bundled/skills/workflows/release.workflow.yaml +893 -0
  469. package/package.json +4 -1
  470. package/src/commands/agent.js +3 -9
  471. package/src/commands/check.js +189 -130
  472. package/src/commands/config.js +1316 -0
  473. package/src/commands/configure.js +3 -950
  474. package/src/commands/fix.js +53 -0
  475. package/src/commands/hitl.js +19 -0
  476. package/src/commands/init.js +320 -1030
  477. package/src/commands/list.js +4 -10
  478. package/src/commands/simulate.js +61 -0
  479. package/src/commands/skills.js +3 -9
  480. package/src/commands/spec.js +288 -0
  481. package/src/commands/start.js +373 -0
  482. package/src/commands/sweep.js +142 -0
  483. package/src/commands/update.js +138 -27
  484. package/src/commands/workflow.js +262 -10
  485. package/src/config/ai-agent-paths.js +89 -29
  486. package/src/core/constants.js +7 -1
  487. package/src/core/manifest.js +1 -0
  488. package/src/flows/init-flow.js +243 -0
  489. package/src/hitl/checkpoint.js +80 -0
  490. package/src/hitl/classifier.js +54 -0
  491. package/src/hitl/manager.js +88 -0
  492. package/src/i18n/messages.js +925 -99
  493. package/src/index.js +1 -0
  494. package/src/installers/integration-installer.js +237 -0
  495. package/src/installers/manifest-installer.js +131 -0
  496. package/src/installers/skills-installer.js +286 -0
  497. package/src/installers/standards-installer.js +193 -0
  498. package/src/missions/MissionManager.js +501 -0
  499. package/src/prompts/init.js +228 -130
  500. package/src/prompts/integrations.js +13 -1
  501. package/src/schemas/standard.schema.json +117 -0
  502. package/src/utils/agents-installer.js +2 -2
  503. package/src/utils/config-loader.js +47 -0
  504. package/src/utils/config-manager.js +108 -0
  505. package/src/utils/config-merger.js +47 -0
  506. package/src/utils/github.js +22 -18
  507. package/src/utils/inquirer-patch.js +98 -0
  508. package/src/utils/integration-generator.js +392 -58
  509. package/src/utils/reference-sync.js +69 -19
  510. package/src/utils/skills-installer.js +6 -3
  511. package/src/utils/standard-fixer.js +141 -0
  512. package/src/utils/standard-validator.js +329 -0
  513. package/src/utils/workflow-executor.js +886 -0
  514. package/src/utils/workflow-state.js +404 -0
  515. package/src/utils/workflows-installer.js +2 -2
  516. package/src/vibe/auto-sweep.js +349 -0
  517. package/src/vibe/micro-spec.js +428 -0
  518. package/standards-registry.json +278 -102
  519. package/bundled/locales/zh-CN/skills/claude-code/README.md +0 -174
  520. package/bundled/locales/zh-CN/skills/claude-code/test-coverage-assistant/SKILL.md +0 -282
  521. package/bundled/locales/zh-TW/skills/claude-code/README.md +0 -174
  522. package/bundled/skills/claude-code/README.md +0 -215
  523. package/bundled/skills/claude-code/commands/changelog.md +0 -57
  524. package/bundled/skills/claude-code/commands/derive-all.md +0 -214
  525. package/bundled/skills/claude-code/commands/derive-atdd.md +0 -177
  526. package/bundled/skills/claude-code/commands/derive-bdd.md +0 -158
  527. package/bundled/skills/claude-code/commands/derive-tdd.md +0 -259
  528. package/bundled/skills/claude-code/commands/docs.md +0 -75
  529. package/bundled/skills/claude-code/commands/release.md +0 -50
  530. package/bundled/skills/claude-code/commands/reverse-bdd.md +0 -264
  531. package/bundled/skills/claude-code/commands/reverse-spec.md +0 -185
  532. package/bundled/skills/claude-code/commands/reverse-tdd.md +0 -351
  533. package/bundled/skills/claude-code/commands/spec.md +0 -69
  534. package/bundled/skills/claude-code/methodology-system/integrated-flow.md +0 -322
  535. /package/bundled/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +0 -0
  536. /package/bundled/skills/{claude-code/ai → ai}/standards/checkin.ai.yaml +0 -0
  537. /package/bundled/skills/{claude-code/ai → ai}/standards/commit.ai.yaml +0 -0
  538. /package/bundled/skills/{claude-code/ai → ai}/standards/refactoring.ai.yaml +0 -0
  539. /package/bundled/skills/{claude-code/ai → ai}/standards/testing.ai.yaml +0 -0
  540. /package/bundled/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +0 -0
  541. /package/bundled/skills/{claude-code/workflows → workflows}/code-review.workflow.yaml +0 -0
  542. /package/bundled/skills/{claude-code/workflows → workflows}/feature-dev.workflow.yaml +0 -0
  543. /package/bundled/skills/{claude-code/workflows → workflows}/integrated-flow.workflow.yaml +0 -0
  544. /package/bundled/skills/{claude-code/workflows → workflows}/large-codebase-analysis.workflow.yaml +0 -0
@@ -0,0 +1,1316 @@
1
+ import chalk from 'chalk';
2
+ import inquirer from 'inquirer';
3
+ import ora from 'ora';
4
+ import { unlinkSync, existsSync } from 'fs';
5
+ import { join, basename } from 'path';
6
+ import { config } from '../utils/config-manager.js';
7
+ import { msg, t as getMessages, setLanguage, isLanguageExplicitlySet } from '../i18n/messages.js';
8
+ import {
9
+ getOptionSource,
10
+ findOption,
11
+ getAllStandards,
12
+ getStandardsByLevel,
13
+ getStandardSource
14
+ } from '../utils/registry.js';
15
+ import {
16
+ copyStandard,
17
+ readManifest,
18
+ writeManifest,
19
+ isInitialized
20
+ } from '../utils/copier.js';
21
+ import {
22
+ promptFormat,
23
+ promptGitWorkflow,
24
+ promptMergeStrategy,
25
+ promptCommitLanguage,
26
+ promptTestLevels,
27
+ promptConfirm,
28
+ promptManageAITools,
29
+ promptAdoptionLevel,
30
+ promptContentModeChange,
31
+ handleAgentsMdSharing,
32
+ promptMethodology,
33
+ promptSkillsInstallLocation,
34
+ promptCommandsInstallation,
35
+ promptDisplayLanguage
36
+ } from '../prompts/init.js';
37
+ import {
38
+ installSkillsToMultipleAgents,
39
+ installCommandsToMultipleAgents,
40
+ getInstalledSkillsInfoForAgent,
41
+ getInstalledCommandsForAgent
42
+ } from '../utils/skills-installer.js';
43
+ import {
44
+ getAgentConfig,
45
+ getAgentDisplayName
46
+ } from '../config/ai-agent-paths.js';
47
+ import {
48
+ writeIntegrationFile,
49
+ getToolFilePath
50
+ } from '../utils/integration-generator.js';
51
+ import { getMarketplaceSkillsInfo } from '../utils/github.js';
52
+ import { regenerateIntegrations } from './update.js';
53
+
54
+ /**
55
+ * Get localized message with fallback (for config-specific keys)
56
+ */
57
+ function t(key, fallback) {
58
+ return msg(key) || fallback;
59
+ }
60
+
61
+ /**
62
+ * Vibe mode presets for different development styles
63
+ */
64
+ const VIBE_PRESETS = {
65
+ relaxed: {
66
+ name: 'Relaxed (Prototype/Hackathon)',
67
+ description: 'Maximum speed, minimal interrupts. Good for rapid prototyping.',
68
+ settings: {
69
+ 'hitl.threshold': 4,
70
+ 'vibe-coding.enabled': true,
71
+ 'vibe-coding.micro-specs.require-confirmation': false,
72
+ 'vibe-coding.auto-sweep.enabled': true,
73
+ 'vibe-coding.auto-sweep.trigger': 'session-end',
74
+ 'vibe-coding.standards-injection.mode': 'soft'
75
+ }
76
+ },
77
+ balanced: {
78
+ name: 'Balanced (Recommended)',
79
+ description: 'Good balance between speed and safety. Confirms critical actions.',
80
+ settings: {
81
+ 'hitl.threshold': 2,
82
+ 'vibe-coding.enabled': true,
83
+ 'vibe-coding.micro-specs.require-confirmation': true,
84
+ 'vibe-coding.auto-sweep.enabled': true,
85
+ 'vibe-coding.auto-sweep.trigger': 'session-end',
86
+ 'vibe-coding.standards-injection.mode': 'soft'
87
+ }
88
+ },
89
+ strict: {
90
+ name: 'Strict (Production)',
91
+ description: 'Maximum safety. Confirms most actions. Good for production code.',
92
+ settings: {
93
+ 'hitl.threshold': 1,
94
+ 'vibe-coding.enabled': true,
95
+ 'vibe-coding.micro-specs.require-confirmation': true,
96
+ 'vibe-coding.auto-sweep.enabled': true,
97
+ 'vibe-coding.auto-sweep.trigger': 'commit-hook',
98
+ 'vibe-coding.standards-injection.mode': 'strict'
99
+ }
100
+ }
101
+ };
102
+
103
+ /**
104
+ * Handle config command — unified entry point
105
+ * @param {string} action - list, get, set, init
106
+ * @param {string} key - Config key
107
+ * @param {string} value - Config value
108
+ * @param {Object} options - Command options
109
+ */
110
+ export async function configCommand(action, key, value, options) {
111
+ // Initialize config manager
112
+ const currentConfig = config.init();
113
+
114
+ // Handle 'list' action explicitly
115
+ if (action === 'list') {
116
+ console.log(chalk.bold('Current Configuration:'));
117
+ console.log(JSON.stringify(currentConfig, null, 2));
118
+ return;
119
+ }
120
+
121
+ // Handle 'get' action
122
+ if (action === 'get') {
123
+ if (!key) {
124
+ console.error(chalk.red('Error: Key is required for get command'));
125
+ return;
126
+ }
127
+ const val = config.get(key);
128
+ console.log(val !== undefined ? val : chalk.gray('undefined'));
129
+ return;
130
+ }
131
+
132
+ // Handle 'set' action
133
+ if (action === 'set') {
134
+ if (!key || value === undefined) {
135
+ console.error(chalk.red('Error: Key and value are required for set command'));
136
+ return;
137
+ }
138
+
139
+ // Type inference
140
+ let typedValue = value;
141
+ if (value === 'true') typedValue = true;
142
+ if (value === 'false') typedValue = false;
143
+ if (!isNaN(Number(value))) typedValue = Number(value);
144
+
145
+ const scope = options.global ? 'global' : 'project';
146
+ config.set(key, typedValue, scope);
147
+
148
+ console.log(chalk.green(`Configuration updated (${scope}): ${key} = ${typedValue}`));
149
+ return;
150
+ }
151
+
152
+ // Handle 'init' action
153
+ if (action === 'init') {
154
+ await handleConfigInit(options);
155
+ return;
156
+ }
157
+
158
+ // No action: check for --type (direct project configuration) or show interactive menu
159
+ if (!action) {
160
+ // --type provided: go directly to project configuration
161
+ if (options.type) {
162
+ return runProjectConfiguration(options);
163
+ }
164
+
165
+ // --yes flag with no action: non-interactive mode, show JSON config
166
+ if (options.yes) {
167
+ console.log(chalk.bold('Current Configuration:'));
168
+ console.log(JSON.stringify(currentConfig, null, 2));
169
+ return;
170
+ }
171
+
172
+ // No arguments at all: show unified interactive menu
173
+ const projectPath = process.cwd();
174
+ const initialized = isInitialized(projectPath);
175
+
176
+ // Set language from manifest (same pattern as runProjectConfiguration)
177
+ if (initialized && !isLanguageExplicitlySet()) {
178
+ const manifest = readManifest(projectPath);
179
+ if (manifest) {
180
+ const uiLang = manifest.options?.display_language || 'en';
181
+ setLanguage(uiLang);
182
+ }
183
+ }
184
+
185
+ const menuChoices = [];
186
+
187
+ if (initialized) {
188
+ menuChoices.push({
189
+ name: t('config.menuProjectSettings', 'Project settings (level, AI tools, Skills, format, workflow...)'),
190
+ value: 'project'
191
+ });
192
+ }
193
+
194
+ menuChoices.push({
195
+ name: t('config.menuPreferences', 'Preferences (UI language, HITL threshold, Vibe Coding)'),
196
+ value: 'preferences'
197
+ });
198
+
199
+ menuChoices.push({
200
+ name: t('config.menuShowConfig', 'Show current configuration (JSON)'),
201
+ value: 'show'
202
+ });
203
+
204
+ const { menuChoice } = await inquirer.prompt([
205
+ {
206
+ type: 'list',
207
+ name: 'menuChoice',
208
+ message: t('config.menuQuestion', 'What would you like to configure?'),
209
+ choices: menuChoices
210
+ }
211
+ ]);
212
+
213
+ if (menuChoice === 'project') {
214
+ return runProjectConfiguration(options);
215
+ } else if (menuChoice === 'preferences') {
216
+ await handleConfigInit(options);
217
+ return;
218
+ } else if (menuChoice === 'show') {
219
+ console.log(chalk.bold('Current Configuration:'));
220
+ console.log(JSON.stringify(currentConfig, null, 2));
221
+ return;
222
+ }
223
+
224
+ return;
225
+ }
226
+
227
+ console.error(chalk.red(`Unknown action: ${action}`));
228
+ }
229
+
230
+ /**
231
+ * Handle config init with optional --vibe-mode
232
+ * @param {Object} options - Command options
233
+ */
234
+ async function handleConfigInit(options) {
235
+ console.log('');
236
+ console.log(chalk.bold(t('config.initTitle', 'UDS Configuration Setup')));
237
+ console.log('');
238
+
239
+ // Check for --vibe-mode flag
240
+ if (options.vibeMode) {
241
+ await initVibeMode(options);
242
+ return;
243
+ }
244
+
245
+ // Default init: show menu
246
+ const { initType } = await inquirer.prompt([
247
+ {
248
+ type: 'list',
249
+ name: 'initType',
250
+ message: t('config.initQuestion', 'What would you like to configure?'),
251
+ choices: [
252
+ {
253
+ name: t('config.displayLanguageOption', 'Display Language - Change UI language'),
254
+ value: 'display_language'
255
+ },
256
+ {
257
+ name: t('config.vibeMode', 'Vibe Coding Mode - For AI-assisted development'),
258
+ value: 'vibe'
259
+ },
260
+ {
261
+ name: t('config.missionMode', 'Mission Mode - For goal-oriented development'),
262
+ value: 'mission'
263
+ },
264
+ {
265
+ name: t('config.customMode', 'Custom - Set individual options'),
266
+ value: 'custom'
267
+ }
268
+ ]
269
+ }
270
+ ]);
271
+
272
+ if (initType === 'display_language') {
273
+ await handleDisplayLanguageChange();
274
+ return;
275
+ } else if (initType === 'vibe') {
276
+ await initVibeMode(options);
277
+ } else if (initType === 'mission') {
278
+ console.log(chalk.yellow(t('config.missionComingSoon', 'Mission mode setup coming soon!')));
279
+ console.log(chalk.gray(t('config.useStartCommand', 'For now, use: uds start <mission-type> <intent>')));
280
+ } else {
281
+ console.log(chalk.gray(t('config.customHint', 'Use: uds config set <key> <value>')));
282
+ }
283
+ }
284
+
285
+ /**
286
+ * Handle display language change
287
+ */
288
+ async function handleDisplayLanguageChange() {
289
+ const projectPath = process.cwd();
290
+ const initialized = isInitialized(projectPath);
291
+ let currentLang = config.get('ui.language') || 'en';
292
+
293
+ if (initialized) {
294
+ const manifest = readManifest(projectPath);
295
+ if (manifest?.options?.display_language) {
296
+ currentLang = manifest.options.display_language;
297
+ }
298
+ }
299
+
300
+ const langNames = { en: 'English', 'zh-tw': '繁體中文', 'zh-cn': '简体中文' };
301
+ console.log(chalk.gray(` ${t('config.currentLanguage', 'Current language')}: ${langNames[currentLang] || currentLang}`));
302
+
303
+ const newLang = await promptDisplayLanguage();
304
+
305
+ if (newLang === currentLang) {
306
+ console.log(chalk.gray(t('config.noLanguageChange', 'Language unchanged.')));
307
+ return;
308
+ }
309
+
310
+ if (!initialized) {
311
+ const common = getMessages().commands.common;
312
+ console.log(chalk.red(common.notInitialized));
313
+ console.log(chalk.gray(` ${common.runInit}`));
314
+ return;
315
+ }
316
+
317
+ const manifest = readManifest(projectPath);
318
+ if (manifest) {
319
+ manifest.options = manifest.options || {};
320
+ manifest.options.display_language = newLang;
321
+ writeManifest(manifest, projectPath);
322
+ console.log(chalk.green(t('config.languageUpdated', 'Display language updated!')));
323
+
324
+ // Offer to regenerate integrations if AI tools are configured
325
+ if (manifest.aiTools?.length > 0) {
326
+ const { confirm } = await inquirer.prompt([{
327
+ type: 'confirm',
328
+ name: 'confirm',
329
+ message: t('config.regenerateForLanguage', 'Regenerate AI tool integrations with new language?'),
330
+ default: true
331
+ }]);
332
+
333
+ if (confirm) {
334
+ const spinner = (await import('ora')).default(t('config.applyingPreset', 'Applying...')).start();
335
+ regenerateIntegrations(projectPath, manifest);
336
+ writeManifest(manifest, projectPath);
337
+ spinner.succeed(t('config.languageUpdated', 'Display language updated!'));
338
+ }
339
+ }
340
+ }
341
+ }
342
+
343
+ /**
344
+ * Initialize Vibe Coding mode
345
+ * @param {Object} options - Command options
346
+ */
347
+ async function initVibeMode(options) {
348
+ console.log(chalk.bold(t('config.vibeModeTitle', 'Vibe Coding Configuration')));
349
+ console.log(chalk.gray(t('config.vibeModeDesc', 'Configure UDS for natural language-driven development')));
350
+ console.log('');
351
+
352
+ // Select preset
353
+ let preset;
354
+ if (options.yes) {
355
+ preset = 'balanced';
356
+ } else {
357
+ const { selectedPreset } = await inquirer.prompt([
358
+ {
359
+ type: 'list',
360
+ name: 'selectedPreset',
361
+ message: t('config.selectPreset', 'Select a preset:'),
362
+ choices: Object.entries(VIBE_PRESETS).map(([key, value]) => ({
363
+ name: `${t(`config.presets.${key}.name`, value.name)}\n ${chalk.gray(t(`config.presets.${key}.description`, value.description))}`,
364
+ value: key,
365
+ short: t(`config.presets.${key}.name`, value.name)
366
+ }))
367
+ }
368
+ ]);
369
+ preset = selectedPreset;
370
+ }
371
+
372
+ const presetConfig = VIBE_PRESETS[preset];
373
+ const scope = options.global ? 'global' : 'project';
374
+
375
+ // Show what will be set
376
+ console.log('');
377
+ const presetName = t(`config.presets.${preset}.name`, presetConfig.name);
378
+ console.log(chalk.cyan(`${t('config.applyingPreset', 'Applying preset:')} ${presetName}`));
379
+ console.log(chalk.gray('─'.repeat(50)));
380
+
381
+ for (const [key, value] of Object.entries(presetConfig.settings)) {
382
+ console.log(` ${key}: ${chalk.yellow(value)}`);
383
+ }
384
+ console.log(chalk.gray('─'.repeat(50)));
385
+
386
+ // Confirm unless --yes
387
+ if (!options.yes) {
388
+ const { confirm } = await inquirer.prompt([
389
+ {
390
+ type: 'confirm',
391
+ name: 'confirm',
392
+ message: t('config.confirmApply', 'Apply these settings?'),
393
+ default: true
394
+ }
395
+ ]);
396
+
397
+ if (!confirm) {
398
+ console.log(chalk.gray(t('config.cancelled', 'Configuration cancelled.')));
399
+ return;
400
+ }
401
+ }
402
+
403
+ // Apply settings
404
+ for (const [key, value] of Object.entries(presetConfig.settings)) {
405
+ config.set(key, value, scope);
406
+ }
407
+
408
+ console.log('');
409
+ console.log(chalk.green(t('config.vibeEnabled', 'Vibe Coding mode enabled!')));
410
+ console.log('');
411
+ console.log(chalk.gray(t('config.nextSteps', 'Next steps:')));
412
+ console.log(chalk.gray(` • ${t('config.useSpec', 'Generate specs:')} uds spec create "your idea"`));
413
+ console.log(chalk.gray(` • ${t('config.useSweep', 'Clean up code:')} uds sweep`));
414
+ console.log(chalk.gray(` • ${t('config.useStart', 'Start a mission:')} uds start greenfield "MyApp"`));
415
+ }
416
+
417
+ /**
418
+ * Run project configuration (formerly configureCommand)
419
+ * @param {Object} options - Command options
420
+ */
421
+ export async function runProjectConfiguration(options) {
422
+ const projectPath = process.cwd();
423
+
424
+ // Check if initialized first
425
+ if (!isInitialized(projectPath)) {
426
+ const common = getMessages().commands.common;
427
+ console.log(chalk.red(common.notInitialized));
428
+ console.log(chalk.gray(` ${common.runInit}`));
429
+ return;
430
+ }
431
+
432
+ // Read manifest and set language before using getMessages()
433
+ const manifest = readManifest(projectPath);
434
+ if (!manifest) {
435
+ const common = getMessages().commands.common;
436
+ console.log(chalk.red(common.couldNotReadManifest));
437
+ return;
438
+ }
439
+
440
+ // Set UI language based on display_language setting
441
+ // Only override if user didn't explicitly set --ui-lang flag
442
+ if (!isLanguageExplicitlySet()) {
443
+ const uiLang = manifest.options?.display_language || 'en';
444
+ setLanguage(uiLang);
445
+ }
446
+
447
+ // Now get localized messages
448
+ const msgObj = getMessages().commands.configure;
449
+ const common = getMessages().commands.common;
450
+
451
+ console.log();
452
+ console.log(chalk.bold(msgObj.title));
453
+ console.log(chalk.gray('─'.repeat(50)));
454
+
455
+ console.log();
456
+ console.log(chalk.cyan(msgObj.currentConfig));
457
+ console.log(chalk.gray(` ${common.level}: ${manifest.level || 2}`));
458
+ console.log(chalk.gray(` ${common.format}: ${manifest.format || 'human'}`));
459
+ console.log(chalk.gray(` ${common.contentMode}: ${manifest.contentMode || 'minimal'}`));
460
+ console.log(chalk.gray(` ${common.aiTools}: ${manifest.aiTools?.length > 0 ? manifest.aiTools.join(', ') : common.none}`));
461
+ // Only show methodology with -E flag (completely hidden otherwise)
462
+ if (options.experimental && manifest.methodology?.active) {
463
+ console.log(chalk.gray(` ${common.methodology}: ${manifest.methodology.active.toUpperCase()}`) + chalk.yellow(` ${msgObj.experimental}`));
464
+ }
465
+ if (manifest.options) {
466
+ if (manifest.options.workflow) {
467
+ console.log(chalk.gray(` ${msgObj.gitWorkflow}: ${manifest.options.workflow}`));
468
+ }
469
+ if (manifest.options.merge_strategy) {
470
+ console.log(chalk.gray(` ${msgObj.mergeStrategy}: ${manifest.options.merge_strategy}`));
471
+ }
472
+ if (manifest.options.commit_language) {
473
+ console.log(chalk.gray(` ${msgObj.commitLanguage}: ${manifest.options.commit_language}`));
474
+ }
475
+ if (manifest.options.test_levels && manifest.options.test_levels.length > 0) {
476
+ console.log(chalk.gray(` ${msgObj.testLevels}: ${manifest.options.test_levels.join(', ')}`));
477
+ }
478
+ }
479
+ console.log();
480
+
481
+ // Determine what to configure based on options or interactive mode
482
+ let configType = options.type || null;
483
+
484
+ if (!configType) {
485
+ const inq = await import('inquirer');
486
+
487
+ // Build choices array - methodology only shown with -E flag
488
+ const baseChoices = [
489
+ { name: msgObj.optionFormat, value: 'format' },
490
+ { name: msgObj.optionWorkflow, value: 'workflow' },
491
+ { name: msgObj.optionMergeStrategy, value: 'merge_strategy' },
492
+ { name: msgObj.optionCommitLanguage, value: 'commit_language' },
493
+ { name: msgObj.optionTestLevels, value: 'test_levels' },
494
+ new inq.default.Separator(),
495
+ { name: chalk.cyan(msgObj.optionAITools), value: 'ai_tools' },
496
+ { name: chalk.cyan(msgObj.optionSkills || 'Manage Skills installations'), value: 'skills' },
497
+ { name: chalk.cyan(msgObj.optionCommands || 'Manage Commands installations'), value: 'commands' },
498
+ new inq.default.Separator(),
499
+ { name: chalk.cyan(msgObj.optionLevel), value: 'level' },
500
+ { name: chalk.cyan(msgObj.optionContentMode), value: 'content_mode' }
501
+ ];
502
+
503
+ // Only add methodology option when -E flag is used
504
+ if (options.experimental) {
505
+ baseChoices.push(
506
+ { name: `${chalk.cyan(msgObj.optionMethodology)} ${chalk.yellow(msgObj.experimental)}`, value: 'methodology' }
507
+ );
508
+ }
509
+
510
+ baseChoices.push(
511
+ new inq.default.Separator(),
512
+ { name: msgObj.optionAll, value: 'all' }
513
+ );
514
+
515
+ const { type } = await inq.default.prompt([
516
+ {
517
+ type: 'list',
518
+ name: 'type',
519
+ message: msgObj.selectOption,
520
+ choices: baseChoices
521
+ }
522
+ ]);
523
+ configType = type;
524
+ }
525
+
526
+ // Collect new options
527
+ const newOptions = { ...manifest.options };
528
+ let newFormat = manifest.format;
529
+ let newLevel = manifest.level || 2;
530
+ let newContentMode = manifest.contentMode || 'minimal';
531
+ let newAITools = [...(manifest.aiTools || [])];
532
+ let needsIntegrationRegeneration = false;
533
+
534
+ // Handle AI Tools configuration
535
+ if (configType === 'ai_tools') {
536
+ const result = await promptManageAITools(manifest.aiTools || []);
537
+
538
+ if (result.action === 'add' && result.tools.length > 0) {
539
+ // Handle AGENTS.md sharing
540
+ const toolsWithSharing = handleAgentsMdSharing(result.tools);
541
+ newAITools = [...new Set([...newAITools, ...toolsWithSharing])];
542
+ needsIntegrationRegeneration = true;
543
+ } else if (result.action === 'remove' && result.tools.length > 0) {
544
+ newAITools = newAITools.filter(tool => !result.tools.includes(tool));
545
+
546
+ // Remove integration files for removed tools
547
+ const spinner = ora(msgObj.removingIntegrations).start();
548
+ for (const tool of result.tools) {
549
+ const filePath = join(projectPath, getToolFilePath(tool));
550
+ if (existsSync(filePath)) {
551
+ try {
552
+ unlinkSync(filePath);
553
+ console.log(chalk.gray(` ${msgObj.removed}: ${getToolFilePath(tool)}`));
554
+ } catch (err) {
555
+ console.log(chalk.yellow(` ${msgObj.couldNotRemove}: ${getToolFilePath(tool)}`));
556
+ }
557
+ }
558
+ }
559
+ spinner.succeed(msgObj.integrationsRemoved);
560
+ } else if (result.action === 'view' || result.action === 'cancel') {
561
+ console.log(chalk.gray(msgObj.noChanges));
562
+ process.exit(0);
563
+ }
564
+ }
565
+
566
+ // Handle Skills configuration
567
+ if (configType === 'skills') {
568
+ await handleSkillsConfiguration(manifest, projectPath, msgObj, common, options.aiTool, options.skillsLocation);
569
+ process.exit(0);
570
+ }
571
+
572
+ // Handle Commands configuration
573
+ if (configType === 'commands') {
574
+ await handleCommandsConfiguration(manifest, projectPath, msgObj, common, options.aiTool);
575
+ process.exit(0);
576
+ }
577
+
578
+ // Handle Level configuration
579
+ if (configType === 'level') {
580
+ newLevel = await promptAdoptionLevel(manifest.level || 2);
581
+ if (newLevel !== manifest.level) {
582
+ needsIntegrationRegeneration = true;
583
+ }
584
+ }
585
+
586
+ // Handle Content Mode configuration
587
+ if (configType === 'content_mode') {
588
+ newContentMode = await promptContentModeChange(manifest.contentMode || 'minimal');
589
+ if (newContentMode !== manifest.contentMode) {
590
+ needsIntegrationRegeneration = true;
591
+ }
592
+ }
593
+
594
+ // Handle Methodology configuration
595
+ let newMethodology = manifest.methodology?.active || null;
596
+ if (configType === 'methodology') {
597
+ newMethodology = await promptMethodology();
598
+ }
599
+
600
+ // Handle traditional options
601
+ if (configType === 'all' || configType === 'format') {
602
+ newFormat = await promptFormat();
603
+ }
604
+
605
+ if (configType === 'all' || configType === 'workflow') {
606
+ newOptions.workflow = await promptGitWorkflow();
607
+ }
608
+
609
+ if (configType === 'all' || configType === 'merge_strategy') {
610
+ newOptions.merge_strategy = await promptMergeStrategy();
611
+ }
612
+
613
+ if (configType === 'all' || configType === 'commit_language') {
614
+ newOptions.commit_language = await promptCommitLanguage();
615
+ }
616
+
617
+ if (configType === 'all' || configType === 'test_levels') {
618
+ newOptions.test_levels = await promptTestLevels();
619
+ }
620
+
621
+ // Show changes
622
+ console.log();
623
+ console.log(chalk.cyan(msgObj.newConfig));
624
+ console.log(chalk.gray(` ${common.level}: ${newLevel}`));
625
+ console.log(chalk.gray(` ${common.format}: ${newFormat}`));
626
+ console.log(chalk.gray(` ${common.contentMode}: ${newContentMode}`));
627
+ console.log(chalk.gray(` ${common.aiTools}: ${newAITools.length > 0 ? newAITools.join(', ') : common.none}`));
628
+ if (newMethodology) {
629
+ console.log(chalk.gray(` ${common.methodology}: ${newMethodology.toUpperCase()}`));
630
+ }
631
+ if (newOptions.workflow) {
632
+ console.log(chalk.gray(` ${msgObj.gitWorkflow}: ${newOptions.workflow}`));
633
+ }
634
+ if (newOptions.merge_strategy) {
635
+ console.log(chalk.gray(` ${msgObj.mergeStrategy}: ${newOptions.merge_strategy}`));
636
+ }
637
+ if (newOptions.commit_language) {
638
+ console.log(chalk.gray(` ${msgObj.commitLanguage}: ${newOptions.commit_language}`));
639
+ }
640
+ if (newOptions.test_levels && newOptions.test_levels.length > 0) {
641
+ console.log(chalk.gray(` ${msgObj.testLevels}: ${newOptions.test_levels.join(', ')}`));
642
+ }
643
+ console.log();
644
+
645
+ // Confirm (skip if --yes flag is provided)
646
+ if (!options.yes) {
647
+ const confirmed = await promptConfirm(msgObj.applyChanges);
648
+ if (!confirmed) {
649
+ console.log(chalk.yellow(msgObj.configCancelled));
650
+ process.exit(0);
651
+ }
652
+ }
653
+
654
+ // Apply changes
655
+ const spinner = ora(msgObj.updatingConfig).start();
656
+
657
+ const results = {
658
+ copied: [],
659
+ generated: [],
660
+ errors: []
661
+ };
662
+
663
+ const standards = getAllStandards();
664
+ const formatsToUse = newFormat === 'both' ? ['ai', 'human'] : [newFormat];
665
+
666
+ // Helper to copy option files
667
+ const copyOptionFile = async (std, optionCategory, optionId, targetFormat) => {
668
+ const option = findOption(std, optionCategory, optionId);
669
+ if (option) {
670
+ const sourcePath = getOptionSource(option, targetFormat);
671
+ const result = await copyStandard(sourcePath, '.standards/options', projectPath);
672
+ if (result.success) {
673
+ results.copied.push(sourcePath);
674
+ } else {
675
+ results.errors.push(`${sourcePath}: ${result.error}`);
676
+ }
677
+ }
678
+ };
679
+
680
+ // Copy new option files
681
+ for (const std of standards) {
682
+ if (!std.options) continue;
683
+
684
+ for (const targetFormat of formatsToUse) {
685
+ // Git workflow
686
+ if (std.id === 'git-workflow') {
687
+ if (newOptions.workflow && newOptions.workflow !== manifest.options?.workflow) {
688
+ await copyOptionFile(std, 'workflow', newOptions.workflow, targetFormat);
689
+ }
690
+ if (newOptions.merge_strategy && newOptions.merge_strategy !== manifest.options?.merge_strategy) {
691
+ await copyOptionFile(std, 'merge_strategy', newOptions.merge_strategy, targetFormat);
692
+ }
693
+ }
694
+
695
+ // Commit message
696
+ if (std.id === 'commit-message') {
697
+ if (newOptions.commit_language && newOptions.commit_language !== manifest.options?.commit_language) {
698
+ await copyOptionFile(std, 'commit_language', newOptions.commit_language, targetFormat);
699
+ }
700
+ }
701
+
702
+ // Testing
703
+ if (std.id === 'testing' && newOptions.test_levels) {
704
+ for (const level of newOptions.test_levels) {
705
+ if (!manifest.options?.test_levels?.includes(level)) {
706
+ await copyOptionFile(std, 'test_level', level, targetFormat);
707
+ }
708
+ }
709
+ }
710
+ }
711
+ }
712
+
713
+ // Handle level change - copy new standards if upgrading
714
+ if (newLevel > (manifest.level || 2)) {
715
+ const levelSpinner = ora(msgObj.addingStandards).start();
716
+ const newStandards = getStandardsByLevel(newLevel);
717
+ const existingStandards = new Set(manifest.standards?.map(s => basename(s)) || []);
718
+
719
+ for (const std of newStandards) {
720
+ for (const targetFormat of formatsToUse) {
721
+ const sourcePath = getStandardSource(std, targetFormat);
722
+ const fileName = basename(sourcePath);
723
+ if (!existingStandards.has(fileName)) {
724
+ const result = await copyStandard(sourcePath, '.standards', projectPath);
725
+ if (result.success) {
726
+ results.copied.push(sourcePath);
727
+ }
728
+ }
729
+ }
730
+ }
731
+ levelSpinner.succeed(msgObj.standardsAdded);
732
+ }
733
+
734
+ // Regenerate integration files if needed
735
+ if (needsIntegrationRegeneration && newAITools.length > 0) {
736
+ const intSpinner = ora(msgObj.regeneratingIntegrations).start();
737
+
738
+ // Build installed standards list
739
+ const installedStandardsList = manifest.standards?.map(s => basename(s)) || [];
740
+
741
+ // Determine language setting
742
+ let commonLanguage = 'en';
743
+ if (newOptions.commit_language === 'bilingual') {
744
+ commonLanguage = 'bilingual';
745
+ } else if (newOptions.commit_language === 'traditional-chinese') {
746
+ commonLanguage = 'zh-tw';
747
+ }
748
+
749
+ // Track generated files to handle AGENTS.md sharing
750
+ const generatedFiles = new Set();
751
+
752
+ for (const tool of newAITools) {
753
+ const targetFile = getToolFilePath(tool);
754
+ if (generatedFiles.has(targetFile)) {
755
+ continue; // Skip if already generated (AGENTS.md sharing)
756
+ }
757
+
758
+ const toolConfig = {
759
+ tool,
760
+ categories: ['anti-hallucination', 'commit-standards', 'code-review'],
761
+ language: commonLanguage,
762
+ installedStandards: installedStandardsList,
763
+ contentMode: newContentMode,
764
+ level: newLevel,
765
+ // Pass commit_language for dynamic commit standards generation
766
+ commitLanguage: newOptions.commit_language || 'english'
767
+ };
768
+
769
+ const result = writeIntegrationFile(tool, toolConfig, projectPath);
770
+ if (result.success) {
771
+ results.generated.push(result.path);
772
+ generatedFiles.add(targetFile);
773
+ } else {
774
+ results.errors.push(`${tool}: ${result.error}`);
775
+ }
776
+ }
777
+ intSpinner.succeed(msgObj.regeneratedIntegrations.replace('{count}', results.generated.length));
778
+ }
779
+
780
+ // Update manifest
781
+ manifest.format = newFormat;
782
+ manifest.options = newOptions;
783
+ manifest.level = newLevel;
784
+ manifest.contentMode = newContentMode;
785
+ manifest.aiTools = newAITools;
786
+ manifest.version = '3.2.0';
787
+
788
+ // Update methodology
789
+ if (newMethodology) {
790
+ manifest.methodology = {
791
+ active: newMethodology,
792
+ available: ['tdd', 'bdd', 'sdd', 'atdd'],
793
+ config: {
794
+ checkpointsEnabled: true,
795
+ reminderIntensity: 'suggest',
796
+ skipLimit: 3
797
+ }
798
+ };
799
+ } else if (configType === 'methodology' && !newMethodology) {
800
+ // User explicitly chose "None"
801
+ manifest.methodology = null;
802
+ }
803
+
804
+ writeManifest(manifest, projectPath);
805
+
806
+ spinner.succeed(msgObj.configUpdated);
807
+
808
+ // Summary
809
+ console.log();
810
+ console.log(chalk.green(msgObj.configSuccess));
811
+ if (results.copied.length > 0) {
812
+ console.log(chalk.gray(` ${msgObj.newOptionsCopied.replace('{count}', results.copied.length)}`));
813
+ }
814
+ if (results.generated.length > 0) {
815
+ console.log(chalk.gray(` ${msgObj.integrationsRegenerated.replace('{count}', results.generated.length)}`));
816
+ }
817
+
818
+ if (results.errors.length > 0) {
819
+ console.log();
820
+ console.log(chalk.yellow(msgObj.errorsOccurred.replace('{count}', results.errors.length)));
821
+ for (const err of results.errors) {
822
+ console.log(chalk.gray(` ${err}`));
823
+ }
824
+ }
825
+
826
+ // Smart apply: offer to regenerate integrations if config changed but not already regenerated
827
+ // Skip for types that have their own flow or don't affect integrations
828
+ const skipApplyTypes = ['skills', 'commands', 'methodology'];
829
+ const alreadyRegenerated = results.generated.length > 0;
830
+ const shouldOfferApply = !skipApplyTypes.includes(configType) &&
831
+ newAITools.length > 0 &&
832
+ !alreadyRegenerated;
833
+
834
+ if (shouldOfferApply) {
835
+ console.log();
836
+
837
+ if (options.yes) {
838
+ // --yes flag: auto-apply without prompting
839
+ const applySpinner = ora(msgObj.applyingChanges).start();
840
+ const applyResults = regenerateIntegrations(projectPath, manifest);
841
+ applySpinner.succeed(msgObj.changesApplied || msgObj.regeneratedIntegrations.replace('{count}', applyResults.updated.length));
842
+
843
+ // Update manifest with new file hashes
844
+ writeManifest(manifest, projectPath);
845
+
846
+ if (applyResults.errors.length > 0) {
847
+ console.log(chalk.yellow(msgObj.errorsOccurred.replace('{count}', applyResults.errors.length)));
848
+ for (const err of applyResults.errors) {
849
+ console.log(chalk.gray(` ${err}`));
850
+ }
851
+ }
852
+ } else {
853
+ // Interactive mode: prompt user
854
+ const inq = await import('inquirer');
855
+ const { apply } = await inq.default.prompt([{
856
+ type: 'confirm',
857
+ name: 'apply',
858
+ message: msgObj.applyChangesNow,
859
+ default: true
860
+ }]);
861
+
862
+ if (apply) {
863
+ const applySpinner = ora(msgObj.applyingChanges).start();
864
+ const applyResults = regenerateIntegrations(projectPath, manifest);
865
+ applySpinner.succeed(msgObj.changesApplied || msgObj.regeneratedIntegrations.replace('{count}', applyResults.updated.length));
866
+
867
+ // Update manifest with new file hashes
868
+ writeManifest(manifest, projectPath);
869
+
870
+ if (applyResults.errors.length > 0) {
871
+ console.log(chalk.yellow(msgObj.errorsOccurred.replace('{count}', applyResults.errors.length)));
872
+ for (const err of applyResults.errors) {
873
+ console.log(chalk.gray(` ${err}`));
874
+ }
875
+ }
876
+ } else {
877
+ console.log(chalk.gray(msgObj.runUpdateLater));
878
+ }
879
+ }
880
+ }
881
+
882
+ console.log();
883
+
884
+ // Exit explicitly to prevent hanging due to inquirer's readline interface
885
+ process.exit(0);
886
+ }
887
+
888
+ /**
889
+ * Handle Skills configuration
890
+ * @param {Object} manifest - Project manifest
891
+ * @param {string} projectPath - Project path
892
+ * @param {Object} msgObj - i18n messages
893
+ * @param {Object} common - Common i18n messages
894
+ * @param {string} [specificTool] - Specific AI tool to install (non-interactive mode)
895
+ * @param {string} [skillsLocation] - Skills installation location (project, user) for non-interactive mode
896
+ */
897
+ async function handleSkillsConfiguration(manifest, projectPath, msgObj, common, specificTool, skillsLocation) {
898
+ const inq = await import('inquirer');
899
+ const aiTools = manifest.aiTools || [];
900
+
901
+ // Non-interactive mode: install for specific tool
902
+ if (specificTool) {
903
+ const agentCfg = getAgentConfig(specificTool);
904
+ if (!agentCfg) {
905
+ console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
906
+ console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code, cursor, windsurf, cline, codex'));
907
+ return;
908
+ }
909
+ if (!agentCfg.supportsSkills) {
910
+ console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Skills`));
911
+ return;
912
+ }
913
+
914
+ // Validate skillsLocation if provided
915
+ const validLocations = ['project', 'user'];
916
+ const level = skillsLocation && validLocations.includes(skillsLocation) ? skillsLocation : 'project';
917
+
918
+ // Install to specified level (defaults to project)
919
+ const installations = [{ agent: specificTool, level }];
920
+ const spinner = ora(`Installing Skills for ${getAgentDisplayName(specificTool)} (${level} level)...`).start();
921
+ const result = await installSkillsToMultipleAgents(installations, null, projectPath);
922
+ spinner.stop();
923
+
924
+ if (result.success) {
925
+ console.log(chalk.green(`Skills installed for ${getAgentDisplayName(specificTool)}`));
926
+ } else {
927
+ console.log(chalk.yellow('Skills installation completed with issues'));
928
+ }
929
+
930
+ // Update manifest
931
+ manifest.skills = manifest.skills || {};
932
+ manifest.skills.installations = manifest.skills.installations || [];
933
+ const existing = manifest.skills.installations.findIndex(i => i.agent === specificTool);
934
+ if (existing >= 0) {
935
+ manifest.skills.installations[existing] = installations[0];
936
+ } else {
937
+ manifest.skills.installations.push(installations[0]);
938
+ }
939
+ writeManifest(manifest, projectPath);
940
+ return;
941
+ }
942
+
943
+ // Interactive mode
944
+ if (aiTools.length === 0) {
945
+ console.log(chalk.yellow(msgObj.noAiToolsConfigured || 'No AI tools configured'));
946
+ console.log(chalk.gray(` ${msgObj.addAiToolsFirst || 'Add AI tools first with: uds config --type ai_tools'}`));
947
+ return;
948
+ }
949
+
950
+ // Get declined skills from manifest
951
+ const declinedSkills = manifest.declinedFeatures?.skills || [];
952
+
953
+ // Check if Skills are installed via marketplace (Claude Code only)
954
+ const marketplaceInfo = getMarketplaceSkillsInfo();
955
+ const hasMarketplaceSkills = marketplaceInfo?.installed;
956
+
957
+ // Show current Skills status
958
+ console.log(chalk.cyan(msgObj.currentSkillsStatus || 'Current Skills status:'));
959
+
960
+ // Show marketplace status if applicable
961
+ if (hasMarketplaceSkills && aiTools.includes('claude-code')) {
962
+ console.log(chalk.green(` ✓ ${msgObj.viaMarketplace || 'Via Marketplace'}: ${marketplaceInfo.version || 'installed'}`));
963
+ }
964
+
965
+ for (const tool of aiTools) {
966
+ const agentCfg = getAgentConfig(tool);
967
+ if (!agentCfg?.supportsSkills) continue;
968
+
969
+ const displayName = getAgentDisplayName(tool);
970
+ const projectInfo = getInstalledSkillsInfoForAgent(tool, 'project', projectPath);
971
+ const userInfo = getInstalledSkillsInfoForAgent(tool, 'user', projectPath);
972
+
973
+ if (projectInfo?.installed || userInfo?.installed) {
974
+ console.log(chalk.green(` ✓ ${displayName}:`));
975
+ if (userInfo?.installed) {
976
+ console.log(chalk.gray(` - User: ${userInfo.version || 'installed'}`));
977
+ }
978
+ if (projectInfo?.installed) {
979
+ console.log(chalk.gray(` - Project: ${projectInfo.version || 'installed'}`));
980
+ }
981
+ } else if (declinedSkills.includes(tool)) {
982
+ console.log(chalk.yellow(` ⊘ ${displayName}: ${msgObj.previouslyDeclined || 'Previously declined'}`));
983
+ } else if (hasMarketplaceSkills && tool === 'claude-code') {
984
+ // Claude Code has marketplace skills but no file-based installation
985
+ console.log(chalk.cyan(` ◎ ${displayName}: ${msgObj.marketplaceOnly || 'Marketplace only (no local files)'}`));
986
+ } else {
987
+ console.log(chalk.gray(` ○ ${displayName}: ${msgObj.notInstalled || 'Not installed'}`));
988
+ }
989
+ }
990
+
991
+ // Show marketplace coexistence note if user might want to install local files
992
+ if (hasMarketplaceSkills && aiTools.includes('claude-code')) {
993
+ console.log();
994
+ console.log(chalk.cyan(` ℹ ${msgObj.marketplaceCoexistNote || 'Note: File-based installation will coexist with Marketplace version'}`));
995
+ }
996
+ console.log();
997
+
998
+ // Build menu choices
999
+ const menuChoices = [
1000
+ { name: msgObj.installSkills || 'Install/Update Skills', value: 'install' }
1001
+ ];
1002
+
1003
+ // Add reinstall declined option if there are declined skills
1004
+ if (declinedSkills.length > 0) {
1005
+ menuChoices.push({
1006
+ name: msgObj.reinstallDeclinedSkills || 'Reinstall declined Skills',
1007
+ value: 'reinstall_declined'
1008
+ });
1009
+ }
1010
+
1011
+ menuChoices.push(
1012
+ { name: msgObj.viewStatus || 'View status only', value: 'view' },
1013
+ { name: common.cancelled || 'Cancel', value: 'cancel' }
1014
+ );
1015
+
1016
+ // Ask what action to take
1017
+ const { action } = await inq.default.prompt([
1018
+ {
1019
+ type: 'list',
1020
+ name: 'action',
1021
+ message: msgObj.skillsAction || 'What would you like to do?',
1022
+ choices: menuChoices
1023
+ }
1024
+ ]);
1025
+
1026
+ if (action === 'cancel' || action === 'view') {
1027
+ console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
1028
+ return;
1029
+ }
1030
+
1031
+ // Handle reinstall declined action
1032
+ if (action === 'reinstall_declined') {
1033
+ // Get only the declined tools that support skills
1034
+ const declinedToolsWithSupport = declinedSkills.filter(tool => {
1035
+ const agentCfg = getAgentConfig(tool);
1036
+ return agentCfg?.supportsSkills;
1037
+ });
1038
+
1039
+ if (declinedToolsWithSupport.length === 0) {
1040
+ console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
1041
+ return;
1042
+ }
1043
+
1044
+ // Prompt for installation level
1045
+ const { skillsLevel } = await inq.default.prompt([{
1046
+ type: 'list',
1047
+ name: 'skillsLevel',
1048
+ message: msgObj.skillsLevelQuestion || 'Where should Skills be installed?',
1049
+ choices: [
1050
+ { name: `${msgObj.projectLevel || 'Project level'} (.claude/skills/, etc.)`, value: 'project' },
1051
+ { name: `${msgObj.userLevel || 'User level'} (~/.claude/skills/, etc.)`, value: 'user' }
1052
+ ],
1053
+ default: 'project'
1054
+ }]);
1055
+
1056
+ const installations = declinedToolsWithSupport.map(agent => ({
1057
+ agent,
1058
+ location: skillsLevel
1059
+ }));
1060
+
1061
+ // Install Skills
1062
+ const spinner = ora(msgObj.installingSkills || 'Installing Skills...').start();
1063
+ const result = await installSkillsToMultipleAgents(installations, null, projectPath);
1064
+ spinner.stop();
1065
+
1066
+ if (result.success) {
1067
+ console.log(chalk.green(msgObj.skillsInstallSuccess || 'Skills installed successfully'));
1068
+ console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
1069
+ } else {
1070
+ console.log(chalk.yellow(msgObj.skillsInstallPartial || 'Skills installed with some issues'));
1071
+ if (result.totalErrors > 0) {
1072
+ console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
1073
+ }
1074
+ }
1075
+
1076
+ // Update manifest - clear declined status for installed tools
1077
+ manifest.skills = manifest.skills || {};
1078
+ manifest.skills.installations = installations;
1079
+ if (manifest.declinedFeatures?.skills) {
1080
+ manifest.declinedFeatures.skills = manifest.declinedFeatures.skills.filter(
1081
+ tool => !declinedToolsWithSupport.includes(tool)
1082
+ );
1083
+ }
1084
+ writeManifest(manifest, projectPath);
1085
+ return;
1086
+ }
1087
+
1088
+ // Use unified installation prompt
1089
+ const installations = await promptSkillsInstallLocation(aiTools);
1090
+ if (installations.length === 0) {
1091
+ console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
1092
+ return;
1093
+ }
1094
+
1095
+ // Install Skills
1096
+ const spinner = ora(msgObj.installingSkills || 'Installing Skills...').start();
1097
+ const result = await installSkillsToMultipleAgents(installations, null, projectPath);
1098
+ spinner.stop();
1099
+
1100
+ if (result.success) {
1101
+ console.log(chalk.green(msgObj.skillsInstallSuccess || 'Skills installed successfully'));
1102
+ console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
1103
+ } else {
1104
+ console.log(chalk.yellow(msgObj.skillsInstallPartial || 'Skills installed with some issues'));
1105
+ if (result.totalErrors > 0) {
1106
+ console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
1107
+ }
1108
+ }
1109
+
1110
+ // Update manifest
1111
+ manifest.skills = manifest.skills || {};
1112
+ manifest.skills.installations = installations;
1113
+ writeManifest(manifest, projectPath);
1114
+ }
1115
+
1116
+ /**
1117
+ * Handle Commands configuration
1118
+ * @param {Object} manifest - Project manifest
1119
+ * @param {string} projectPath - Project path
1120
+ * @param {Object} msgObj - i18n messages
1121
+ * @param {Object} common - Common i18n messages
1122
+ * @param {string} [specificTool] - Specific AI tool to install (triggers interactive prompt for level)
1123
+ */
1124
+ async function handleCommandsConfiguration(manifest, projectPath, msgObj, common, specificTool) {
1125
+ const inq = await import('inquirer');
1126
+ const aiTools = manifest.aiTools || [];
1127
+
1128
+ // Semi-interactive mode: install for specific tool (prompt for level)
1129
+ if (specificTool) {
1130
+ const agentCfg = getAgentConfig(specificTool);
1131
+ if (!agentCfg) {
1132
+ console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
1133
+ console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code'));
1134
+ return;
1135
+ }
1136
+ if (agentCfg.commands === null) {
1137
+ console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Commands`));
1138
+ console.log(chalk.gray(' Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'));
1139
+ return;
1140
+ }
1141
+
1142
+ // Prompt for installation level
1143
+ const { commandsLevel } = await inq.default.prompt([{
1144
+ type: 'list',
1145
+ name: 'commandsLevel',
1146
+ message: msgObj.commandsLevelQuestion || 'Where should Commands be installed?',
1147
+ choices: [
1148
+ { name: `${msgObj.projectLevel || 'Project level'} (${agentCfg.commands.project}) (${msgObj.recommended || 'Recommended'})`, value: 'project' },
1149
+ { name: `${msgObj.userLevel || 'User level'} (${agentCfg.commands.user})`, value: 'user' }
1150
+ ],
1151
+ default: 'project'
1152
+ }]);
1153
+
1154
+ // Install to selected level
1155
+ const installations = [{ agent: specificTool, level: commandsLevel }];
1156
+ const spinner = ora(`Installing Commands for ${getAgentDisplayName(specificTool)} (${commandsLevel} level)...`).start();
1157
+ const result = await installCommandsToMultipleAgents(installations, null, projectPath);
1158
+ spinner.stop();
1159
+
1160
+ if (result.success) {
1161
+ console.log(chalk.green(`Commands installed for ${getAgentDisplayName(specificTool)}`));
1162
+ } else {
1163
+ console.log(chalk.yellow('Commands installation completed with issues'));
1164
+ }
1165
+
1166
+ // Update manifest
1167
+ manifest.commands = manifest.commands || {};
1168
+ manifest.commands.installations = manifest.commands.installations || [];
1169
+ const existing = manifest.commands.installations.findIndex(i =>
1170
+ typeof i === 'string' ? i === specificTool : i.agent === specificTool
1171
+ );
1172
+ if (existing >= 0) {
1173
+ manifest.commands.installations[existing] = installations[0];
1174
+ } else {
1175
+ manifest.commands.installations.push(installations[0]);
1176
+ }
1177
+ writeManifest(manifest, projectPath);
1178
+ return;
1179
+ }
1180
+
1181
+ // Interactive mode
1182
+ // Filter tools that support commands (commands !== null means support)
1183
+ const commandSupportedTools = aiTools.filter(tool => {
1184
+ const agentCfg = getAgentConfig(tool);
1185
+ return agentCfg?.commands !== null;
1186
+ });
1187
+
1188
+ if (commandSupportedTools.length === 0) {
1189
+ console.log(chalk.yellow(msgObj.noCommandSupportedTools || 'No AI tools with command support configured'));
1190
+ console.log(chalk.gray(` ${msgObj.commandSupportedList || 'Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'}`));
1191
+ return;
1192
+ }
1193
+
1194
+ // Get declined commands from manifest
1195
+ const declinedCommands = manifest.declinedFeatures?.commands || [];
1196
+
1197
+ // Show current Commands status (check both project and user levels)
1198
+ console.log(chalk.cyan(msgObj.currentCommandsStatus || 'Current Commands status:'));
1199
+ for (const tool of commandSupportedTools) {
1200
+ const displayName = getAgentDisplayName(tool);
1201
+ const projectCmdInfo = getInstalledCommandsForAgent(tool, 'project', projectPath);
1202
+ const userCmdInfo = getInstalledCommandsForAgent(tool, 'user');
1203
+
1204
+ if (projectCmdInfo?.installed || userCmdInfo?.installed) {
1205
+ console.log(chalk.green(` ✓ ${displayName}:`));
1206
+ if (userCmdInfo?.installed) {
1207
+ console.log(chalk.gray(` - User: ${userCmdInfo.count} commands`));
1208
+ }
1209
+ if (projectCmdInfo?.installed) {
1210
+ console.log(chalk.gray(` - Project: ${projectCmdInfo.count} commands`));
1211
+ }
1212
+ } else if (declinedCommands.includes(tool)) {
1213
+ console.log(chalk.yellow(` ⊘ ${displayName}: ${msgObj.previouslyDeclined || 'Previously declined'}`));
1214
+ } else {
1215
+ console.log(chalk.gray(` ○ ${displayName}: ${msgObj.notInstalled || 'Not installed'}`));
1216
+ }
1217
+ }
1218
+ console.log();
1219
+
1220
+ // Build menu choices
1221
+ const menuChoices = [
1222
+ { name: msgObj.installCommands || 'Install/Update Commands', value: 'install' }
1223
+ ];
1224
+
1225
+ // Add reinstall declined option if there are declined commands
1226
+ const declinedCommandsWithSupport = declinedCommands.filter(tool =>
1227
+ commandSupportedTools.includes(tool)
1228
+ );
1229
+ if (declinedCommandsWithSupport.length > 0) {
1230
+ menuChoices.push({
1231
+ name: msgObj.reinstallDeclinedCommands || 'Reinstall declined Commands',
1232
+ value: 'reinstall_declined'
1233
+ });
1234
+ }
1235
+
1236
+ menuChoices.push(
1237
+ { name: msgObj.viewStatus || 'View status only', value: 'view' },
1238
+ { name: common.cancelled || 'Cancel', value: 'cancel' }
1239
+ );
1240
+
1241
+ // Ask what action to take
1242
+ const { action } = await inq.default.prompt([
1243
+ {
1244
+ type: 'list',
1245
+ name: 'action',
1246
+ message: msgObj.commandsAction || 'What would you like to do?',
1247
+ choices: menuChoices
1248
+ }
1249
+ ]);
1250
+
1251
+ if (action === 'cancel' || action === 'view') {
1252
+ console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
1253
+ return;
1254
+ }
1255
+
1256
+ // Handle reinstall declined action
1257
+ if (action === 'reinstall_declined') {
1258
+ if (declinedCommandsWithSupport.length === 0) {
1259
+ console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
1260
+ return;
1261
+ }
1262
+
1263
+ // Install Commands
1264
+ const spinner = ora(msgObj.installingCommands || 'Installing Commands...').start();
1265
+ const result = await installCommandsToMultipleAgents(declinedCommandsWithSupport, null, projectPath);
1266
+ spinner.stop();
1267
+
1268
+ if (result.success) {
1269
+ console.log(chalk.green(msgObj.commandsInstallSuccess || 'Commands installed successfully'));
1270
+ console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
1271
+ } else {
1272
+ console.log(chalk.yellow(msgObj.commandsInstallPartial || 'Commands installed with some issues'));
1273
+ if (result.totalErrors > 0) {
1274
+ console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
1275
+ }
1276
+ }
1277
+
1278
+ // Update manifest - clear declined status for installed tools
1279
+ manifest.commands = manifest.commands || {};
1280
+ manifest.commands.installations = declinedCommandsWithSupport;
1281
+ if (manifest.declinedFeatures?.commands) {
1282
+ manifest.declinedFeatures.commands = manifest.declinedFeatures.commands.filter(
1283
+ tool => !declinedCommandsWithSupport.includes(tool)
1284
+ );
1285
+ }
1286
+ writeManifest(manifest, projectPath);
1287
+ return;
1288
+ }
1289
+
1290
+ // Use unified installation prompt
1291
+ const selectedAgents = await promptCommandsInstallation(commandSupportedTools);
1292
+ if (selectedAgents.length === 0) {
1293
+ console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
1294
+ return;
1295
+ }
1296
+
1297
+ // Install Commands
1298
+ const spinner = ora(msgObj.installingCommands || 'Installing Commands...').start();
1299
+ const result = await installCommandsToMultipleAgents(selectedAgents, null, projectPath);
1300
+ spinner.stop();
1301
+
1302
+ if (result.success) {
1303
+ console.log(chalk.green(msgObj.commandsInstallSuccess || 'Commands installed successfully'));
1304
+ console.log(chalk.gray(` ${msgObj.totalInstalled || 'Total installed'}: ${result.totalInstalled}`));
1305
+ } else {
1306
+ console.log(chalk.yellow(msgObj.commandsInstallPartial || 'Commands installed with some issues'));
1307
+ if (result.totalErrors > 0) {
1308
+ console.log(chalk.red(` ${msgObj.errors || 'Errors'}: ${result.totalErrors}`));
1309
+ }
1310
+ }
1311
+
1312
+ // Update manifest
1313
+ manifest.commands = manifest.commands || {};
1314
+ manifest.commands.installations = selectedAgents;
1315
+ writeManifest(manifest, projectPath);
1316
+ }