specweave 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/.claude-plugin/README.md +325 -0
  2. package/.claude-plugin/marketplace.json +210 -0
  3. package/CLAUDE.md +871 -596
  4. package/README.md +188 -137
  5. package/bin/install-agents.sh +1 -1
  6. package/bin/install-commands.sh +66 -14
  7. package/bin/install-hooks.sh +1 -1
  8. package/bin/install-skills.sh +1 -1
  9. package/bin/specweave.js +2 -0
  10. package/dist/adapters/claude/adapter.d.ts +49 -11
  11. package/dist/adapters/claude/adapter.d.ts.map +1 -1
  12. package/dist/adapters/claude/adapter.js +175 -42
  13. package/dist/adapters/claude/adapter.js.map +1 -1
  14. package/dist/adapters/copilot/adapter.d.ts +20 -2
  15. package/dist/adapters/copilot/adapter.d.ts.map +1 -1
  16. package/dist/adapters/copilot/adapter.js +117 -7
  17. package/dist/adapters/copilot/adapter.js.map +1 -1
  18. package/dist/adapters/cursor/adapter.d.ts +18 -0
  19. package/dist/adapters/cursor/adapter.d.ts.map +1 -1
  20. package/dist/adapters/cursor/adapter.js +55 -3
  21. package/dist/adapters/cursor/adapter.js.map +1 -1
  22. package/dist/adapters/generic/adapter.d.ts +18 -0
  23. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  24. package/dist/adapters/generic/adapter.js +55 -3
  25. package/dist/adapters/generic/adapter.js.map +1 -1
  26. package/dist/cli/commands/init.d.ts +1 -0
  27. package/dist/cli/commands/init.d.ts.map +1 -1
  28. package/dist/cli/commands/init.js +346 -124
  29. package/dist/cli/commands/init.js.map +1 -1
  30. package/dist/cli/commands/install.d.ts +2 -0
  31. package/dist/cli/commands/install.d.ts.map +1 -1
  32. package/dist/cli/commands/install.js +28 -25
  33. package/dist/cli/commands/install.js.map +1 -1
  34. package/dist/cli/commands/list.d.ts +2 -0
  35. package/dist/cli/commands/list.d.ts.map +1 -1
  36. package/dist/cli/commands/list.js +26 -24
  37. package/dist/cli/commands/list.js.map +1 -1
  38. package/dist/cli/commands/plugin.d.ts +7 -1
  39. package/dist/cli/commands/plugin.d.ts.map +1 -1
  40. package/dist/cli/commands/plugin.js +72 -61
  41. package/dist/cli/commands/plugin.js.map +1 -1
  42. package/dist/core/i18n/language-detector.d.ts +29 -0
  43. package/dist/core/i18n/language-detector.d.ts.map +1 -0
  44. package/dist/core/i18n/language-detector.js +143 -0
  45. package/dist/core/i18n/language-detector.js.map +1 -0
  46. package/dist/core/i18n/language-manager.d.ts +101 -0
  47. package/dist/core/i18n/language-manager.d.ts.map +1 -0
  48. package/dist/core/i18n/language-manager.js +232 -0
  49. package/dist/core/i18n/language-manager.js.map +1 -0
  50. package/dist/core/i18n/language-registry.d.ts +44 -0
  51. package/dist/core/i18n/language-registry.d.ts.map +1 -0
  52. package/dist/core/i18n/language-registry.js +234 -0
  53. package/dist/core/i18n/language-registry.js.map +1 -0
  54. package/dist/core/i18n/locale-manager.d.ts +62 -0
  55. package/dist/core/i18n/locale-manager.d.ts.map +1 -0
  56. package/dist/core/i18n/locale-manager.js +137 -0
  57. package/dist/core/i18n/locale-manager.js.map +1 -0
  58. package/dist/core/i18n/system-prompt-injector.d.ts +33 -0
  59. package/dist/core/i18n/system-prompt-injector.d.ts.map +1 -0
  60. package/dist/core/i18n/system-prompt-injector.js +131 -0
  61. package/dist/core/i18n/system-prompt-injector.js.map +1 -0
  62. package/dist/core/i18n/types.d.ts +151 -0
  63. package/dist/core/i18n/types.d.ts.map +1 -0
  64. package/dist/core/i18n/types.js +11 -0
  65. package/dist/core/i18n/types.js.map +1 -0
  66. package/dist/core/increment-status.d.ts +72 -0
  67. package/dist/core/increment-status.d.ts.map +1 -0
  68. package/dist/core/increment-status.js +227 -0
  69. package/dist/core/increment-status.js.map +1 -0
  70. package/dist/core/plugin-loader.d.ts +33 -13
  71. package/dist/core/plugin-loader.d.ts.map +1 -1
  72. package/dist/core/plugin-loader.js +145 -43
  73. package/dist/core/plugin-loader.js.map +1 -1
  74. package/dist/core/types/config.d.ts +51 -0
  75. package/dist/core/types/config.d.ts.map +1 -0
  76. package/dist/core/types/config.js +21 -0
  77. package/dist/core/types/config.js.map +1 -0
  78. package/dist/core/types/plugin.d.ts +73 -42
  79. package/dist/core/types/plugin.d.ts.map +1 -1
  80. package/dist/core/types/plugin.js +4 -3
  81. package/dist/core/types/plugin.js.map +1 -1
  82. package/dist/hooks/lib/sync-living-docs.d.ts +27 -0
  83. package/dist/hooks/lib/sync-living-docs.d.ts.map +1 -0
  84. package/dist/hooks/lib/sync-living-docs.js +116 -0
  85. package/dist/hooks/lib/sync-living-docs.js.map +1 -0
  86. package/dist/hooks/lib/translate-living-docs.d.ts +13 -0
  87. package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -0
  88. package/dist/hooks/lib/translate-living-docs.js +166 -0
  89. package/dist/hooks/lib/translate-living-docs.js.map +1 -0
  90. package/dist/hooks/lib/update-tasks-md.d.ts +29 -0
  91. package/dist/hooks/lib/update-tasks-md.d.ts.map +1 -0
  92. package/dist/hooks/lib/update-tasks-md.js +203 -0
  93. package/dist/hooks/lib/update-tasks-md.js.map +1 -0
  94. package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -1
  95. package/dist/integrations/jira/jira-mapper.js.map +1 -1
  96. package/dist/locales/de/.gitkeep +0 -0
  97. package/dist/locales/de/cli.json +108 -0
  98. package/dist/locales/en/cli.json +269 -0
  99. package/dist/locales/en/errors.json +7 -0
  100. package/dist/locales/en/templates.json +6 -0
  101. package/dist/locales/es/.gitkeep +0 -0
  102. package/dist/locales/es/cli.json +41 -0
  103. package/dist/locales/fr/.gitkeep +0 -0
  104. package/dist/locales/fr/cli.json +108 -0
  105. package/dist/locales/ja/.gitkeep +0 -0
  106. package/dist/locales/ja/cli.json +108 -0
  107. package/dist/locales/ko/.gitkeep +0 -0
  108. package/dist/locales/ko/cli.json +108 -0
  109. package/dist/locales/pt/.gitkeep +0 -0
  110. package/dist/locales/pt/cli.json +108 -0
  111. package/dist/locales/ru/.gitkeep +0 -0
  112. package/dist/locales/ru/cli.json +269 -0
  113. package/dist/locales/zh/.gitkeep +0 -0
  114. package/dist/locales/zh/cli.json +108 -0
  115. package/dist/plugins/specweave-github/lib/github-client.d.ts +86 -0
  116. package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
  117. package/dist/plugins/specweave-github/lib/github-client.js +275 -0
  118. package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
  119. package/dist/plugins/specweave-github/lib/index.d.ts +10 -0
  120. package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -0
  121. package/dist/plugins/specweave-github/lib/index.js +10 -0
  122. package/dist/plugins/specweave-github/lib/index.js.map +1 -0
  123. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
  124. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
  125. package/dist/plugins/specweave-github/lib/subtask-sync.js +147 -0
  126. package/dist/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
  127. package/dist/plugins/specweave-github/lib/task-parser.d.ts +37 -0
  128. package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
  129. package/dist/plugins/specweave-github/lib/task-parser.js +211 -0
  130. package/dist/plugins/specweave-github/lib/task-parser.js.map +1 -0
  131. package/dist/plugins/specweave-github/lib/task-sync.d.ts +51 -0
  132. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
  133. package/dist/plugins/specweave-github/lib/task-sync.js +332 -0
  134. package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -0
  135. package/dist/plugins/specweave-github/lib/types.d.ts +80 -0
  136. package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -0
  137. package/dist/plugins/specweave-github/lib/types.js +5 -0
  138. package/dist/plugins/specweave-github/lib/types.js.map +1 -0
  139. package/dist/utils/agents-md-compiler.d.ts +68 -0
  140. package/dist/utils/agents-md-compiler.d.ts.map +1 -0
  141. package/dist/utils/agents-md-compiler.js +420 -0
  142. package/dist/utils/agents-md-compiler.js.map +1 -0
  143. package/dist/utils/generate-skills-index.js +4 -4
  144. package/dist/utils/generate-skills-index.js.map +1 -1
  145. package/package.json +12 -13
  146. package/plugins/specweave-ado/.claude-plugin/plugin.json +8 -0
  147. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +8 -0
  148. package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +626 -0
  149. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
  150. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +208 -0
  151. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
  152. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
  153. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +1010 -0
  154. package/plugins/specweave-backend/.claude-plugin/plugin.json +8 -0
  155. package/plugins/specweave-core/.claude-plugin/plugin.json +25 -0
  156. package/{src → plugins/specweave-core}/agents/pm/AGENT.md +80 -0
  157. package/plugins/specweave-core/agents/translator/AGENT.md +282 -0
  158. package/{src → plugins/specweave-core}/commands/README.md +11 -11
  159. package/{src → plugins/specweave-core}/commands/specweave.costs.md +7 -7
  160. package/{src → plugins/specweave-core}/commands/specweave.do.md +34 -7
  161. package/{src → plugins/specweave-core}/commands/specweave.increment.md +83 -18
  162. package/{src → plugins/specweave-core}/commands/specweave.md +49 -17
  163. package/{src → plugins/specweave-core}/commands/specweave.sync-docs.md +5 -5
  164. package/plugins/specweave-core/commands/specweave.translate.md +425 -0
  165. package/{src → plugins/specweave-core}/commands/specweave.validate.md +1 -1
  166. package/plugins/specweave-core/hooks/hooks.json +13 -0
  167. package/plugins/specweave-core/hooks/post-task-completion.sh +265 -0
  168. package/plugins/specweave-core/skills/SKILLS-INDEX.md +229 -0
  169. package/{src → plugins/specweave-core}/skills/brownfield-analyzer/SKILL.md +66 -24
  170. package/{src → plugins/specweave-core}/skills/context-loader/SKILL.md +1 -1
  171. package/plugins/specweave-core/skills/context-optimizer/SKILL.md +588 -0
  172. package/plugins/specweave-core/skills/docs-updater/SKILL.md +0 -0
  173. package/{src → plugins/specweave-core}/skills/increment-planner/SKILL.md +81 -4
  174. package/plugins/specweave-core/skills/plugin-detector/SKILL.md +211 -0
  175. package/{src → plugins/specweave-core}/skills/project-kickstarter/SKILL.md +7 -7
  176. package/plugins/specweave-core/skills/rfc-generator/SKILL.md +369 -0
  177. package/{src → plugins/specweave-core}/skills/specweave-detector/SKILL.md +2 -2
  178. package/plugins/specweave-core/skills/specweave-framework/SKILL.md +498 -0
  179. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-1-increment-naming.yaml +11 -0
  180. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-2-source-of-truth.yaml +11 -0
  181. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-3-increment-discipline.yaml +12 -0
  182. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-4-file-placement.yaml +11 -0
  183. package/{src → plugins/specweave-core}/skills/tdd-workflow/SKILL.md +20 -20
  184. package/plugins/specweave-core/skills/translator/SKILL.md +172 -0
  185. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +8 -0
  186. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +8 -0
  187. package/plugins/specweave-docs/.claude-plugin/plugin.json +8 -0
  188. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +526 -0
  189. package/plugins/specweave-figma/.claude-plugin/.mcp.json +12 -0
  190. package/plugins/specweave-figma/.claude-plugin/plugin.json +8 -0
  191. package/plugins/specweave-figma/ARCHITECTURE.md +453 -0
  192. package/plugins/specweave-figma/README.md +728 -0
  193. package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +632 -0
  194. package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +29 -0
  195. package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +27 -0
  196. package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +28 -0
  197. package/plugins/specweave-frontend/.claude-plugin/plugin.json +8 -0
  198. package/plugins/specweave-github/.claude-plugin/plugin.json +8 -0
  199. package/plugins/specweave-github/agents/github-manager/AGENT.md +651 -0
  200. package/plugins/specweave-github/commands/github-close-issue.md +418 -0
  201. package/plugins/specweave-github/commands/github-create-issue.md +307 -0
  202. package/plugins/specweave-github/commands/github-status.md +533 -0
  203. package/plugins/specweave-github/commands/github-sync-tasks.md +530 -0
  204. package/plugins/specweave-github/commands/github-sync.md +443 -0
  205. package/plugins/specweave-github/lib/github-client.ts +330 -0
  206. package/plugins/specweave-github/lib/index.ts +10 -0
  207. package/plugins/specweave-github/lib/subtask-sync.ts +225 -0
  208. package/plugins/specweave-github/lib/task-parser.ts +246 -0
  209. package/plugins/specweave-github/lib/task-sync.ts +402 -0
  210. package/plugins/specweave-github/lib/types.ts +86 -0
  211. package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +497 -0
  212. package/plugins/specweave-github/skills/github-sync/SKILL.md +461 -0
  213. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +8 -0
  214. package/plugins/specweave-jira/.claude-plugin/plugin.json +8 -0
  215. package/{src → plugins/specweave-jira}/commands/specweave.sync-jira.md +18 -18
  216. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +8 -0
  217. package/plugins/specweave-ml/.claude-plugin/plugin.json +39 -0
  218. package/plugins/specweave-ml/README.md +885 -0
  219. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +402 -0
  220. package/plugins/specweave-ml/commands/ml-deploy.md +116 -0
  221. package/plugins/specweave-ml/commands/ml-evaluate.md +87 -0
  222. package/plugins/specweave-ml/commands/ml-explain.md +83 -0
  223. package/plugins/specweave-ml/skills/anomaly-detector/SKILL.md +559 -0
  224. package/plugins/specweave-ml/skills/automl-optimizer/SKILL.md +485 -0
  225. package/plugins/specweave-ml/skills/cv-pipeline-builder/SKILL.md +157 -0
  226. package/plugins/specweave-ml/skills/data-visualizer/SKILL.md +521 -0
  227. package/plugins/specweave-ml/skills/experiment-tracker/SKILL.md +535 -0
  228. package/plugins/specweave-ml/skills/feature-engineer/SKILL.md +566 -0
  229. package/plugins/specweave-ml/skills/ml-deployment-helper/SKILL.md +345 -0
  230. package/plugins/specweave-ml/skills/ml-pipeline-orchestrator/SKILL.md +518 -0
  231. package/plugins/specweave-ml/skills/model-evaluator/SKILL.md +155 -0
  232. package/plugins/specweave-ml/skills/model-explainer/SKILL.md +227 -0
  233. package/plugins/specweave-ml/skills/model-registry/SKILL.md +541 -0
  234. package/plugins/specweave-ml/skills/nlp-pipeline-builder/SKILL.md +180 -0
  235. package/plugins/specweave-ml/skills/time-series-forecaster/SKILL.md +569 -0
  236. package/plugins/specweave-payments/.claude-plugin/plugin.json +8 -0
  237. package/plugins/specweave-testing/.claude-plugin/plugin.json +8 -0
  238. package/plugins/specweave-tooling/.claude-plugin/plugin.json +8 -0
  239. package/plugins/specweave-ui/.claude-plugin/plugin.json +106 -0
  240. package/plugins/specweave-ui/.mcp.json +14 -0
  241. package/plugins/specweave-ui/README.md +386 -0
  242. package/src/adapters/claude/adapter.ts +193 -46
  243. package/src/adapters/copilot/adapter.ts +132 -7
  244. package/src/adapters/cursor/adapter.ts +62 -3
  245. package/src/adapters/generic/adapter.ts +62 -3
  246. package/src/templates/AGENTS.md.template +170 -1
  247. package/src/templates/CLAUDE.md.template +122 -24
  248. package/src/templates/tasks.md.template +261 -0
  249. package/src/agents/ml-engineer/AGENT.md +0 -150
  250. package/src/commands/specweave.sync-github.md +0 -269
  251. package/src/hooks/post-task-completion.sh +0 -121
  252. package/src/skills/SKILLS-INDEX.md +0 -444
  253. package/src/skills/github-sync/SKILL.md +0 -234
  254. /package/{src → plugins/specweave-ado}/skills/ado-sync/README.md +0 -0
  255. /package/{src → plugins/specweave-ado}/skills/ado-sync/SKILL.md +0 -0
  256. /package/{src → plugins/specweave-ado}/skills/specweave-ado-mapper/SKILL.md +0 -0
  257. /package/{src → plugins/specweave-backend}/agents/database-optimizer/AGENT.md +0 -0
  258. /package/{src → plugins/specweave-backend}/skills/dotnet-backend/SKILL.md +0 -0
  259. /package/{src → plugins/specweave-backend}/skills/nodejs-backend/SKILL.md +0 -0
  260. /package/{src → plugins/specweave-backend}/skills/python-backend/SKILL.md +0 -0
  261. /package/{src → plugins/specweave-core}/agents/architect/AGENT.md +0 -0
  262. /package/{src → plugins/specweave-core}/agents/code-reviewer.md +0 -0
  263. /package/{src → plugins/specweave-core}/agents/docs-writer/AGENT.md +0 -0
  264. /package/{src → plugins/specweave-core}/agents/performance/AGENT.md +0 -0
  265. /package/{src → plugins/specweave-core}/agents/qa-lead/AGENT.md +0 -0
  266. /package/{src → plugins/specweave-core}/agents/security/AGENT.md +0 -0
  267. /package/{src → plugins/specweave-core}/agents/tdd-orchestrator/AGENT.md +0 -0
  268. /package/{src → plugins/specweave-core}/agents/tech-lead/AGENT.md +0 -0
  269. /package/{src → plugins/specweave-core}/commands/specweave.done.md +0 -0
  270. /package/{src → plugins/specweave-core}/commands/specweave.inc.md +0 -0
  271. /package/{src → plugins/specweave-core}/commands/specweave.list-increments.md +0 -0
  272. /package/{src → plugins/specweave-core}/commands/specweave.next.md +0 -0
  273. /package/{src → plugins/specweave-core}/commands/specweave.progress.md +0 -0
  274. /package/{src → plugins/specweave-core}/commands/specweave.tdd-cycle.md +0 -0
  275. /package/{src → plugins/specweave-core}/commands/specweave.tdd-green.md +0 -0
  276. /package/{src → plugins/specweave-core}/commands/specweave.tdd-red.md +0 -0
  277. /package/{src → plugins/specweave-core}/commands/specweave.tdd-refactor.md +0 -0
  278. /package/{src → plugins/specweave-core}/hooks/README.md +0 -0
  279. /package/{src → plugins/specweave-core}/hooks/docs-changed.sh +0 -0
  280. /package/{src → plugins/specweave-core}/hooks/human-input-required.sh +0 -0
  281. /package/{src → plugins/specweave-core}/hooks/post-increment-plugin-detect.sh +0 -0
  282. /package/{src → plugins/specweave-core}/hooks/pre-implementation.sh +0 -0
  283. /package/{src → plugins/specweave-core}/hooks/pre-task-plugin-detect.sh +0 -0
  284. /package/{src → plugins/specweave-core}/skills/brownfield-onboarder/SKILL.md +0 -0
  285. /package/{src → plugins/specweave-core}/skills/docs-updater/README.md +0 -0
  286. /package/{src → plugins/specweave-core}/skills/increment-planner/scripts/feature-utils.js +0 -0
  287. /package/{src → plugins/specweave-core}/skills/increment-quality-judge/SKILL.md +0 -0
  288. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +0 -0
  289. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +0 -0
  290. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +0 -0
  291. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +0 -0
  292. /package/{src → plugins/specweave-core}/skills/role-orchestrator/README.md +0 -0
  293. /package/{src → plugins/specweave-core}/skills/role-orchestrator/SKILL.md +0 -0
  294. /package/{src → plugins/specweave-core}/skills/task-builder/README.md +0 -0
  295. /package/{src → plugins/specweave-cost-optimizer}/skills/cost-optimizer/SKILL.md +0 -0
  296. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/AGENT.md +0 -0
  297. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-component-template.mmd +0 -0
  298. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-container-template.mmd +0 -0
  299. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-context-template.mmd +0 -0
  300. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/deployment-template.mmd +0 -0
  301. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/er-diagram-template.mmd +0 -0
  302. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/sequence-template.mmd +0 -0
  303. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -0
  304. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-2-sequence.yaml +0 -0
  305. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -0
  306. /package/{src → plugins/specweave-diagrams}/skills/diagrams-architect/SKILL.md +0 -0
  307. /package/{src → plugins/specweave-diagrams}/skills/diagrams-generator/SKILL.md +0 -0
  308. /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/README.md +0 -0
  309. /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/SKILL.md +0 -0
  310. /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/README.md +0 -0
  311. /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/SKILL.md +0 -0
  312. /package/{src → plugins/specweave-frontend}/skills/design-system-architect/SKILL.md +0 -0
  313. /package/{src → plugins/specweave-frontend}/skills/frontend/SKILL.md +0 -0
  314. /package/{src → plugins/specweave-frontend}/skills/nextjs/SKILL.md +0 -0
  315. /package/{src → plugins/specweave-infrastructure}/agents/devops/AGENT.md +0 -0
  316. /package/{src → plugins/specweave-infrastructure}/agents/network-engineer/AGENT.md +0 -0
  317. /package/{src → plugins/specweave-infrastructure}/agents/observability-engineer/AGENT.md +0 -0
  318. /package/{src → plugins/specweave-infrastructure}/agents/performance-engineer/AGENT.md +0 -0
  319. /package/{src → plugins/specweave-infrastructure}/agents/sre/AGENT.md +0 -0
  320. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/backend-diagnostics.md +0 -0
  321. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/database-diagnostics.md +0 -0
  322. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/infrastructure.md +0 -0
  323. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/monitoring.md +0 -0
  324. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/security-incidents.md +0 -0
  325. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/ui-diagnostics.md +0 -0
  326. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/01-high-cpu-usage.md +0 -0
  327. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/02-database-deadlock.md +0 -0
  328. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/03-memory-leak.md +0 -0
  329. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/04-slow-api-response.md +0 -0
  330. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/05-ddos-attack.md +0 -0
  331. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/06-disk-full.md +0 -0
  332. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/07-service-down.md +0 -0
  333. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/08-data-corruption.md +0 -0
  334. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/09-cascade-failure.md +0 -0
  335. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/10-rate-limit-exceeded.md +0 -0
  336. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/health-check.sh +0 -0
  337. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/log-analyzer.py +0 -0
  338. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/metrics-collector.sh +0 -0
  339. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/trace-analyzer.js +0 -0
  340. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/incident-report.md +0 -0
  341. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/mitigation-plan.md +0 -0
  342. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/post-mortem.md +0 -0
  343. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/runbook-template.md +0 -0
  344. /package/{src → plugins/specweave-infrastructure}/commands/specweave.monitor-setup.md +0 -0
  345. /package/{src → plugins/specweave-infrastructure}/commands/specweave.slo-implement.md +0 -0
  346. /package/{src → plugins/specweave-infrastructure}/skills/distributed-tracing/SKILL.md +0 -0
  347. /package/{src → plugins/specweave-infrastructure}/skills/grafana-dashboards/SKILL.md +0 -0
  348. /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/README.md +0 -0
  349. /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/SKILL.md +0 -0
  350. /package/{src → plugins/specweave-infrastructure}/skills/prometheus-configuration/SKILL.md +0 -0
  351. /package/{src → plugins/specweave-infrastructure}/skills/slo-implementation/SKILL.md +0 -0
  352. /package/{src → plugins/specweave-jira}/skills/jira-sync/README.md +0 -0
  353. /package/{src → plugins/specweave-jira}/skills/jira-sync/SKILL.md +0 -0
  354. /package/{src → plugins/specweave-jira}/skills/specweave-jira-mapper/SKILL.md +0 -0
  355. /package/{src → plugins/specweave-kubernetes}/agents/kubernetes-architect/AGENT.md +0 -0
  356. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/SKILL.md +0 -0
  357. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/argocd-setup.md +0 -0
  358. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/sync-policies.md +0 -0
  359. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/SKILL.md +0 -0
  360. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -0
  361. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -0
  362. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/references/chart-structure.md +0 -0
  363. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -0
  364. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/SKILL.md +0 -0
  365. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/configmap-template.yaml +0 -0
  366. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/deployment-template.yaml +0 -0
  367. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/service-template.yaml +0 -0
  368. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/deployment-spec.md +0 -0
  369. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/service-spec.md +0 -0
  370. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/SKILL.md +0 -0
  371. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/assets/network-policy-template.yaml +0 -0
  372. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/references/rbac-patterns.md +0 -0
  373. /package/{src → plugins/specweave-ml}/agents/data-scientist/AGENT.md +0 -0
  374. /package/{src → plugins/specweave-ml}/agents/mlops-engineer/AGENT.md +0 -0
  375. /package/{src → plugins/specweave-ml}/commands/specweave.ml-pipeline.md +0 -0
  376. /package/{src → plugins/specweave-ml}/skills/ml-pipeline-workflow/SKILL.md +0 -0
  377. /package/{src → plugins/specweave-payments}/agents/payment-integration/AGENT.md +0 -0
  378. /package/{src → plugins/specweave-payments}/skills/billing-automation/SKILL.md +0 -0
  379. /package/{src → plugins/specweave-payments}/skills/paypal-integration/SKILL.md +0 -0
  380. /package/{src → plugins/specweave-payments}/skills/pci-compliance/SKILL.md +0 -0
  381. /package/{src → plugins/specweave-payments}/skills/stripe-integration/SKILL.md +0 -0
  382. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/README.md +0 -0
  383. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/SKILL.md +0 -0
  384. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/execute.js +0 -0
  385. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/lib/utils.js +0 -0
  386. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/package.json +0 -0
  387. /package/{src → plugins/specweave-tooling}/skills/skill-creator/LICENSE.txt +0 -0
  388. /package/{src → plugins/specweave-tooling}/skills/skill-creator/SKILL.md +0 -0
  389. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/init_skill.py +0 -0
  390. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/package_skill.py +0 -0
  391. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/quick_validate.py +0 -0
  392. /package/{src → plugins/specweave-tooling}/skills/skill-router/SKILL.md +0 -0
@@ -9,9 +9,24 @@ import { ClaudeMdGenerator } from '../../adapters/claude-md-generator.js';
9
9
  import { AgentsMdGenerator } from '../../adapters/agents-md-generator.js';
10
10
  import { getDirname } from '../../utils/esm-helpers.js';
11
11
  import { generateSkillsIndex } from '../../utils/generate-skills-index.js';
12
+ import { LanguageManager, isLanguageSupported, getSupportedLanguages, getSystemPromptForLanguage } from '../../core/i18n/language-manager.js';
13
+ import { getLocaleManager } from '../../core/i18n/locale-manager.js';
12
14
  const __dirname = getDirname(import.meta.url);
13
15
  export async function initCommand(projectName, options = {}) {
14
- console.log(chalk.blue.bold('\nšŸš€ SpecWeave Initialization\n'));
16
+ // Validate and normalize language option
17
+ const language = options.language?.toLowerCase() || 'en';
18
+ // Validate language if provided
19
+ if (options.language && !isLanguageSupported(language)) {
20
+ const locale = getLocaleManager('en'); // Use English for error messages about invalid language
21
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.invalidLanguage', { language: options.language })}`));
22
+ console.error(chalk.yellow(`${locale.t('cli', 'init.errors.supportedLanguages', { languages: getSupportedLanguages().join(', ') })}\n`));
23
+ process.exit(1);
24
+ }
25
+ // Initialize LanguageManager and LocaleManager
26
+ const i18n = new LanguageManager({ defaultLanguage: language });
27
+ const locale = getLocaleManager(language);
28
+ // Display welcome message in user's language
29
+ console.log(chalk.blue.bold(`\n${locale.t('cli', 'init.welcome')}\n`));
15
30
  let targetDir;
16
31
  let finalProjectName;
17
32
  let usedDotNotation = false;
@@ -22,7 +37,7 @@ export async function initCommand(projectName, options = {}) {
22
37
  const dirName = path.basename(targetDir);
23
38
  // Validate directory name is suitable for project name
24
39
  if (!/^[a-z0-9-]+$/.test(dirName)) {
25
- console.log(chalk.yellow(`\nāš ļø Current directory name '${dirName}' contains invalid characters.`));
40
+ console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.invalidDirName', { dirName })}`));
26
41
  const suggestedName = dirName.toLowerCase().replace(/[^a-z0-9-]/g, '-');
27
42
  const { name } = await inquirer.prompt([
28
43
  {
@@ -46,7 +61,7 @@ export async function initCommand(projectName, options = {}) {
46
61
  const allFiles = fs.readdirSync(targetDir);
47
62
  const existingFiles = allFiles.filter(f => !f.startsWith('.')); // Ignore hidden files
48
63
  if (existingFiles.length > 0) {
49
- console.log(chalk.yellow(`\nāš ļø Current directory contains ${existingFiles.length} file${existingFiles.length === 1 ? '' : 's'}.`));
64
+ console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.directoryNotEmpty', { count: existingFiles.length, plural: existingFiles.length === 1 ? '' : 's' })}`));
50
65
  const { confirm } = await inquirer.prompt([
51
66
  {
52
67
  type: 'confirm',
@@ -56,7 +71,7 @@ export async function initCommand(projectName, options = {}) {
56
71
  },
57
72
  ]);
58
73
  if (!confirm) {
59
- console.log(chalk.yellow('āŒ Initialization cancelled'));
74
+ console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
60
75
  process.exit(0);
61
76
  }
62
77
  }
@@ -71,7 +86,7 @@ export async function initCommand(projectName, options = {}) {
71
86
  },
72
87
  ]);
73
88
  if (!overwrite) {
74
- console.log(chalk.yellow('āŒ Initialization cancelled'));
89
+ console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
75
90
  process.exit(0);
76
91
  }
77
92
  fs.removeSync(path.join(targetDir, '.specweave'));
@@ -112,7 +127,7 @@ export async function initCommand(projectName, options = {}) {
112
127
  },
113
128
  ]);
114
129
  if (!overwrite) {
115
- console.log(chalk.yellow('āŒ Initialization cancelled'));
130
+ console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
116
131
  process.exit(0);
117
132
  }
118
133
  fs.emptyDirSync(targetDir);
@@ -121,9 +136,29 @@ export async function initCommand(projectName, options = {}) {
121
136
  fs.mkdirSync(targetDir, { recursive: true });
122
137
  }
123
138
  }
139
+ // 3. Check for nested .specweave/ (CRITICAL: prevent nested folders)
140
+ const parentSpecweave = detectNestedSpecweave(targetDir);
141
+ if (parentSpecweave) {
142
+ console.log('');
143
+ console.log(chalk.red.bold(locale.t('cli', 'init.errors.nestedNotSupported')));
144
+ console.log('');
145
+ console.log(chalk.yellow(` ${locale.t('cli', 'init.errors.parentFound')}`));
146
+ console.log(chalk.white(` ${parentSpecweave}`));
147
+ console.log('');
148
+ console.log(chalk.cyan(` ${locale.t('cli', 'init.info.nestedEnforcement')}`));
149
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet1')}`));
150
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet2')}`));
151
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet3')}`));
152
+ console.log('');
153
+ console.log(chalk.cyan(` ${locale.t('cli', 'init.info.nestedToFix')}`));
154
+ console.log(chalk.white(` ${locale.t('cli', 'init.nestedCdCommand', { path: parentSpecweave })}`));
155
+ console.log(chalk.white(` ${locale.t('cli', 'init.nestedIncCommand')}`));
156
+ console.log('');
157
+ process.exit(1);
158
+ }
124
159
  const spinner = ora('Creating SpecWeave project...').start();
125
160
  try {
126
- // 3. Detect or select tool
161
+ // 4. Detect or select tool
127
162
  const adapterLoader = new AdapterLoader();
128
163
  let toolName;
129
164
  if (options.adapter) {
@@ -140,54 +175,72 @@ export async function initCommand(projectName, options = {}) {
140
175
  // 4. Create directory structure (same for all)
141
176
  createDirectoryStructure(targetDir);
142
177
  spinner.text = 'Directory structure created...';
143
- // 5. Copy base templates (config, README, CLAUDE.md - same for all)
178
+ // 5. Copy plugin marketplace (for Claude Code auto-registration)
179
+ if (toolName === 'claude') {
180
+ try {
181
+ const sourceMarketplace = findSourceDir('.claude-plugin');
182
+ const targetMarketplace = path.join(targetDir, '.claude-plugin');
183
+ if (fs.existsSync(sourceMarketplace)) {
184
+ fs.copySync(sourceMarketplace, targetMarketplace, {
185
+ overwrite: true,
186
+ errorOnExist: false
187
+ });
188
+ spinner.text = 'Plugin marketplace copied...';
189
+ }
190
+ }
191
+ catch (error) {
192
+ // Non-critical - plugins can still be installed manually
193
+ console.warn(chalk.yellow(`\n${locale.t('cli', 'init.warnings.marketplaceCopyFailed')}`));
194
+ }
195
+ }
196
+ // 6. Copy base templates (config, README, CLAUDE.md - same for all)
144
197
  const templatesDir = findSourceDir('templates');
145
- await copyTemplates(templatesDir, targetDir, finalProjectName);
198
+ await copyTemplates(templatesDir, targetDir, finalProjectName, language);
146
199
  spinner.text = 'Base templates copied...';
147
200
  // 6. Install based on tool
148
201
  if (toolName === 'claude') {
149
202
  // DEFAULT: Native Claude Code installation (no adapter needed!)
150
203
  spinner.text = 'Installing Claude Code components...';
151
204
  try {
152
- copyCommands('', path.join(targetDir, '.claude/commands'));
205
+ copyCommands('', path.join(targetDir, '.claude/commands'), language);
153
206
  spinner.text = 'Slash commands installed...';
154
207
  }
155
208
  catch (error) {
156
209
  spinner.fail('Failed to copy commands');
157
- console.error(chalk.red(`\nāŒ Commands copy failed: ${error.message}`));
210
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.commandsCopyFailed', { error: error.message })}`));
158
211
  throw error;
159
212
  }
160
213
  try {
161
- copyAgents('', path.join(targetDir, '.claude/agents'));
214
+ copyAgents('', path.join(targetDir, '.claude/agents'), language);
162
215
  spinner.text = 'Agents installed...';
163
216
  }
164
217
  catch (error) {
165
218
  spinner.fail('Failed to copy agents');
166
- console.error(chalk.red(`\nāŒ Agents copy failed: ${error.message}`));
219
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.agentsCopyFailed', { error: error.message })}`));
167
220
  throw error;
168
221
  }
169
222
  try {
170
- copySkills('', path.join(targetDir, '.claude/skills'));
223
+ copySkills('', path.join(targetDir, '.claude/skills'), language);
171
224
  spinner.text = 'Skills installed...';
172
225
  }
173
226
  catch (error) {
174
227
  spinner.fail('Failed to copy skills');
175
- console.error(chalk.red(`\nāŒ Skills copy failed: ${error.message}`));
228
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.skillsCopyFailed', { error: error.message })}`));
176
229
  throw error;
177
230
  }
178
231
  try {
179
- copyHooks('', path.join(targetDir, '.claude/hooks'));
232
+ copyHooks('', path.join(targetDir, '.claude/hooks'), language);
180
233
  spinner.text = 'Hooks installed...';
181
234
  }
182
235
  catch (error) {
183
236
  spinner.fail('Failed to copy hooks');
184
- console.error(chalk.red(`\nāŒ Hooks copy failed: ${error.message}`));
237
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.hooksCopyFailed', { error: error.message })}`));
185
238
  throw error;
186
239
  }
187
240
  try {
188
241
  spinner.text = 'Generating skills index...';
189
- // Generate skills index and copy to target
190
- const sourceIndexPath = path.join(__dirname, '../../../src/skills/SKILLS-INDEX.md');
242
+ // Generate skills index and copy to target (root-level after v0.5.0)
243
+ const sourceIndexPath = path.join(__dirname, '../../../skills/SKILLS-INDEX.md');
191
244
  await generateSkillsIndex(sourceIndexPath);
192
245
  // Copy index to target .claude/skills/
193
246
  const targetIndexPath = path.join(targetDir, '.claude/skills/SKILLS-INDEX.md');
@@ -196,11 +249,11 @@ export async function initCommand(projectName, options = {}) {
196
249
  }
197
250
  catch (error) {
198
251
  // Non-critical error - don't fail installation
199
- console.warn(chalk.yellow(`\nāš ļø Warning: Could not generate skills index: ${error.message}`));
200
- console.warn(chalk.yellow(' Skills will still work, but manual indexing may be needed.'));
252
+ console.warn(chalk.yellow(`\n${locale.t('cli', 'init.warnings.skillsIndexWarning', { error: error.message })}`));
253
+ console.warn(chalk.yellow(` ${locale.t('cli', 'init.warnings.skillsIndexNote')}`));
201
254
  }
202
- console.log('\n✨ Claude Code native installation complete!');
203
- console.log(' āœ… Native skills, agents, hooks work out of the box');
255
+ console.log(`\n${locale.t('cli', 'init.claudeNativeComplete')}`);
256
+ console.log(` ${locale.t('cli', 'init.claudeNativeBenefits')}`);
204
257
  }
205
258
  else {
206
259
  // Use adapter for non-Claude tools
@@ -252,7 +305,7 @@ export async function initCommand(projectName, options = {}) {
252
305
  const suggestedPlugins = detectionResults.map(r => r.pluginName);
253
306
  pluginSpinner.succeed(`Detected ${suggestedPlugins.length} suggested plugins`);
254
307
  if (suggestedPlugins.length > 0) {
255
- console.log(chalk.cyan('\nšŸ’” Suggested Plugins:'));
308
+ console.log(chalk.cyan(`\n${locale.t('cli', 'init.info.suggestedPlugins')}`));
256
309
  for (const pluginName of suggestedPlugins) {
257
310
  console.log(` • ${chalk.white(pluginName)}`);
258
311
  }
@@ -286,7 +339,7 @@ export async function initCommand(projectName, options = {}) {
286
339
  }
287
340
  catch (error) {
288
341
  pluginSpinner.warn('Plugin detection skipped');
289
- console.log(chalk.gray(` You can enable plugins later with: specweave plugin enable <name>`));
342
+ console.log(chalk.gray(` ${locale.t('cli', 'init.pluginEnableLater')}`));
290
343
  }
291
344
  // 12. Show tool-specific next steps
292
345
  if (toolName !== 'claude') {
@@ -300,11 +353,23 @@ export async function initCommand(projectName, options = {}) {
300
353
  });
301
354
  }
302
355
  }
303
- showNextSteps(finalProjectName, toolName, usedDotNotation);
356
+ // 13. Create config.json with language setting
357
+ createConfigFile(targetDir, finalProjectName, toolName, language);
358
+ // 14. Setup Claude Code plugin auto-registration (if Claude detected)
359
+ if (toolName === 'claude') {
360
+ try {
361
+ setupClaudePluginAutoRegistration(targetDir, language);
362
+ }
363
+ catch (error) {
364
+ // Non-critical - show manual instructions in next steps
365
+ console.warn(chalk.yellow(`\n${locale.t('cli', 'init.warnings.pluginAutoSetupFailed')}`));
366
+ }
367
+ }
368
+ showNextSteps(finalProjectName, toolName, language, usedDotNotation);
304
369
  }
305
370
  catch (error) {
306
371
  spinner.fail('Failed to create project');
307
- console.error(chalk.red('\nError:'), error);
372
+ console.error(chalk.red(`\n${locale.t('cli', 'init.genericError')}`), error);
308
373
  process.exit(1);
309
374
  }
310
375
  }
@@ -329,18 +394,19 @@ function createDirectoryStructure(targetDir) {
329
394
  fs.mkdirSync(path.join(targetDir, dir), { recursive: true });
330
395
  });
331
396
  }
332
- async function copyTemplates(templatesDir, targetDir, projectName) {
397
+ async function copyTemplates(templatesDir, targetDir, projectName, language = 'en') {
398
+ const locale = getLocaleManager(language);
333
399
  // Verify templates directory exists
334
400
  if (!fs.existsSync(templatesDir)) {
335
- console.error(chalk.red(`\nāŒ Error: Templates directory not found at: ${templatesDir}`));
401
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.templatesNotFound', { path: templatesDir })}`));
336
402
  const packageRoot = findPackageRoot(__dirname);
337
403
  if (packageRoot) {
338
- console.error(chalk.red(` Package root: ${packageRoot}`));
339
- console.error(chalk.red(` Trying alternate locations...`));
404
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
405
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.tryingAlternate')}`));
340
406
  // Try src/templates as fallback
341
407
  const altPath = path.join(packageRoot, 'src', 'templates');
342
408
  if (fs.existsSync(altPath)) {
343
- console.error(chalk.yellow(` āœ“ Found templates at: ${altPath}`));
409
+ console.error(chalk.yellow(` ${locale.t('cli', 'init.errors.foundTemplatesAt', { path: altPath })}`));
344
410
  templatesDir = altPath;
345
411
  }
346
412
  else {
@@ -391,6 +457,33 @@ async function copyTemplates(templatesDir, targetDir, projectName) {
391
457
  fs.copyFileSync(gitignoreTemplate, path.join(targetDir, '.gitignore'));
392
458
  }
393
459
  }
460
+ /**
461
+ * Detect if a parent directory contains a .specweave/ folder
462
+ * SpecWeave ONLY supports root-level .specweave/ folders
463
+ * Nested .specweave/ folders are NOT supported
464
+ *
465
+ * @param targetDir - Directory where user wants to initialize
466
+ * @returns Path to parent .specweave/ folder, or null if none found
467
+ */
468
+ function detectNestedSpecweave(targetDir) {
469
+ // Start from parent of target directory
470
+ let currentDir = path.dirname(path.resolve(targetDir));
471
+ const root = path.parse(currentDir).root;
472
+ // Walk up the directory tree
473
+ while (currentDir !== root) {
474
+ const specweavePath = path.join(currentDir, '.specweave');
475
+ // Check if .specweave/ exists at this level
476
+ if (fs.existsSync(specweavePath)) {
477
+ return currentDir; // Found parent .specweave/
478
+ }
479
+ // Move up one level
480
+ const parentDir = path.dirname(currentDir);
481
+ if (parentDir === currentDir)
482
+ break; // Reached root
483
+ currentDir = parentDir;
484
+ }
485
+ return null; // No parent .specweave/ found
486
+ }
394
487
  /**
395
488
  * Find the package root by walking up the directory tree looking for package.json
396
489
  * This works reliably on all platforms including Windows with UNC paths
@@ -463,63 +556,71 @@ function findSourceDir(relativePath) {
463
556
  // If nothing found, return the first path and let the caller handle the error
464
557
  return possiblePaths[0];
465
558
  }
466
- function copyCommands(commandsDir, targetCommandsDir) {
559
+ function copyCommands(commandsDir, targetCommandsDir, language) {
560
+ const locale = getLocaleManager(language);
467
561
  const sourceDir = findSourceDir('commands');
468
562
  if (!fs.existsSync(sourceDir)) {
469
- console.error(chalk.red(`\nāŒ Error: Source commands directory not found`));
470
- console.error(chalk.red(` Expected at: ${sourceDir}`));
471
- console.error(chalk.red(` __dirname: ${__dirname}`));
563
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'commands' })}`));
564
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
565
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
472
566
  const packageRoot = findPackageRoot(__dirname);
473
567
  if (packageRoot) {
474
- console.error(chalk.red(` Package root: ${packageRoot}`));
568
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
475
569
  }
476
570
  else {
477
- console.error(chalk.red(` Could not find package root (looking for package.json with name="specweave")`));
571
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
478
572
  }
479
573
  throw new Error('Failed to locate source commands directory. This may be a Windows path resolution issue.');
480
574
  }
481
575
  // Validate source directory contains files
482
576
  const sourceFiles = fs.readdirSync(sourceDir).filter(f => f.endsWith('.md'));
483
577
  if (sourceFiles.length === 0) {
484
- console.error(chalk.red(`\nāŒ Error: Source commands directory is empty`));
485
- console.error(chalk.red(` Directory: ${sourceDir}`));
486
- console.error(chalk.red(` This indicates a package installation issue.`));
578
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'commands' })}`));
579
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
580
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
487
581
  throw new Error('Source commands directory exists but contains no .md files');
488
582
  }
489
583
  try {
490
584
  // Ensure target directory exists
491
585
  fs.ensureDirSync(targetCommandsDir);
492
- // Copy all files from source to target
493
- fs.copySync(sourceDir, targetCommandsDir, {
494
- overwrite: true,
495
- errorOnExist: false
496
- });
586
+ // Copy each command file and inject system prompts if needed
587
+ for (const file of sourceFiles) {
588
+ const sourcePath = path.join(sourceDir, file);
589
+ const targetPath = path.join(targetCommandsDir, file);
590
+ // Read, potentially inject, and write
591
+ const content = fs.readFileSync(sourcePath, 'utf-8');
592
+ const modifiedContent = language !== 'en'
593
+ ? injectSystemPromptForInit(content, language)
594
+ : content;
595
+ fs.writeFileSync(targetPath, modifiedContent, 'utf-8');
596
+ }
497
597
  // Validate files were copied
498
598
  const copiedFiles = fs.readdirSync(targetCommandsDir).filter(f => f.endsWith('.md'));
499
599
  if (copiedFiles.length === 0) {
500
600
  throw new Error(`Copy completed but no files found in target directory: ${targetCommandsDir}`);
501
601
  }
502
- console.log(chalk.gray(` āœ“ Copied ${copiedFiles.length} command files`));
602
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedFiles', { count: copiedFiles.length })}`));
503
603
  }
504
604
  catch (error) {
505
- console.error(chalk.red(`\nāŒ Error copying commands: ${error.message}`));
506
- console.error(chalk.red(` Source: ${sourceDir}`));
507
- console.error(chalk.red(` Target: ${targetCommandsDir}`));
605
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'commands', error: error.message })}`));
606
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
607
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetCommandsDir })}`));
508
608
  throw error;
509
609
  }
510
610
  }
511
- function copyAgents(agentsDir, targetAgentsDir) {
611
+ function copyAgents(agentsDir, targetAgentsDir, language) {
612
+ const locale = getLocaleManager(language);
512
613
  const sourceDir = findSourceDir('agents');
513
614
  if (!fs.existsSync(sourceDir)) {
514
- console.error(chalk.red(`\nāŒ Error: Source agents directory not found`));
515
- console.error(chalk.red(` Expected at: ${sourceDir}`));
516
- console.error(chalk.red(` __dirname: ${__dirname}`));
615
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'agents' })}`));
616
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
617
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
517
618
  const packageRoot = findPackageRoot(__dirname);
518
619
  if (packageRoot) {
519
- console.error(chalk.red(` Package root: ${packageRoot}`));
620
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
520
621
  }
521
622
  else {
522
- console.error(chalk.red(` Could not find package root (looking for package.json with name="specweave")`));
623
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
523
624
  }
524
625
  throw new Error('Failed to locate source agents directory. This may be a Windows path resolution issue.');
525
626
  }
@@ -527,46 +628,81 @@ function copyAgents(agentsDir, targetAgentsDir) {
527
628
  const agentDirs = fs.readdirSync(sourceDir, { withFileTypes: true })
528
629
  .filter(dirent => dirent.isDirectory());
529
630
  if (agentDirs.length === 0) {
530
- console.error(chalk.red(`\nāŒ Error: Source agents directory is empty`));
531
- console.error(chalk.red(` Directory: ${sourceDir}`));
532
- console.error(chalk.red(` This indicates a package installation issue.`));
631
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'agents' })}`));
632
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
633
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
533
634
  throw new Error('Source agents directory exists but contains no agent subdirectories');
534
635
  }
535
636
  try {
536
637
  // Ensure target directory exists
537
638
  fs.ensureDirSync(targetAgentsDir);
538
- // Copy all directories from source to target
539
- fs.copySync(sourceDir, targetAgentsDir, {
540
- overwrite: true,
541
- errorOnExist: false
542
- });
639
+ // Copy each agent directory and inject system prompts if needed
640
+ for (const agentDir of agentDirs) {
641
+ const sourcePath = path.join(sourceDir, agentDir.name);
642
+ const targetPath = path.join(targetAgentsDir, agentDir.name);
643
+ // Copy entire agent directory first
644
+ fs.copySync(sourcePath, targetPath, {
645
+ overwrite: true,
646
+ errorOnExist: false
647
+ });
648
+ // Then inject system prompt into AGENT.md if language !== 'en'
649
+ if (language !== 'en') {
650
+ const agentMdPath = path.join(targetPath, 'AGENT.md');
651
+ if (fs.existsSync(agentMdPath)) {
652
+ const content = fs.readFileSync(agentMdPath, 'utf-8');
653
+ const modifiedContent = injectSystemPromptForInit(content, language);
654
+ fs.writeFileSync(agentMdPath, modifiedContent, 'utf-8');
655
+ }
656
+ }
657
+ }
543
658
  // Validate subdirectories were copied
544
659
  const copiedDirs = fs.readdirSync(targetAgentsDir, { withFileTypes: true })
545
660
  .filter(dirent => dirent.isDirectory());
546
661
  if (copiedDirs.length === 0) {
547
662
  throw new Error(`Copy completed but no agent directories found in target: ${targetAgentsDir}`);
548
663
  }
549
- console.log(chalk.gray(` āœ“ Copied ${copiedDirs.length} agent directories`));
664
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedAgents', { count: copiedDirs.length })}`));
550
665
  }
551
666
  catch (error) {
552
- console.error(chalk.red(`\nāŒ Error copying agents: ${error.message}`));
553
- console.error(chalk.red(` Source: ${sourceDir}`));
554
- console.error(chalk.red(` Target: ${targetAgentsDir}`));
667
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'agents', error: error.message })}`));
668
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
669
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetAgentsDir })}`));
555
670
  throw error;
556
671
  }
557
672
  }
558
- function copySkills(skillsDir, targetSkillsDir) {
673
+ /**
674
+ * Inject system prompt for non-English languages
675
+ */
676
+ function injectSystemPromptForInit(content, language) {
677
+ if (language === 'en') {
678
+ return content; // No changes for English
679
+ }
680
+ const systemPrompt = getSystemPromptForLanguage(language);
681
+ // Inject after YAML frontmatter if present
682
+ if (content.startsWith('---')) {
683
+ const endOfFrontmatter = content.indexOf('---', 3);
684
+ if (endOfFrontmatter !== -1) {
685
+ const frontmatter = content.substring(0, endOfFrontmatter + 3);
686
+ const body = content.substring(endOfFrontmatter + 3);
687
+ return `${frontmatter}\n\n${systemPrompt}\n${body}`;
688
+ }
689
+ }
690
+ // No frontmatter - inject at the top
691
+ return `${systemPrompt}\n\n${content}`;
692
+ }
693
+ function copySkills(skillsDir, targetSkillsDir, language) {
694
+ const locale = getLocaleManager(language);
559
695
  const sourceDir = findSourceDir('skills');
560
696
  if (!fs.existsSync(sourceDir)) {
561
- console.error(chalk.red(`\nāŒ Error: Source skills directory not found`));
562
- console.error(chalk.red(` Expected at: ${sourceDir}`));
563
- console.error(chalk.red(` __dirname: ${__dirname}`));
697
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'skills' })}`));
698
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
699
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
564
700
  const packageRoot = findPackageRoot(__dirname);
565
701
  if (packageRoot) {
566
- console.error(chalk.red(` Package root: ${packageRoot}`));
702
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
567
703
  }
568
704
  else {
569
- console.error(chalk.red(` Could not find package root (looking for package.json with name="specweave")`));
705
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
570
706
  }
571
707
  throw new Error('Failed to locate source skills directory. This may be a Windows path resolution issue.');
572
708
  }
@@ -574,55 +710,70 @@ function copySkills(skillsDir, targetSkillsDir) {
574
710
  const skillDirs = fs.readdirSync(sourceDir, { withFileTypes: true })
575
711
  .filter(dirent => dirent.isDirectory());
576
712
  if (skillDirs.length === 0) {
577
- console.error(chalk.red(`\nāŒ Error: Source skills directory is empty`));
578
- console.error(chalk.red(` Directory: ${sourceDir}`));
579
- console.error(chalk.red(` This indicates a package installation issue.`));
713
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'skills' })}`));
714
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
715
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
580
716
  throw new Error('Source skills directory exists but contains no skill subdirectories');
581
717
  }
582
718
  try {
583
719
  // Ensure target directory exists
584
720
  fs.ensureDirSync(targetSkillsDir);
585
- // Copy all directories from source to target
586
- fs.copySync(sourceDir, targetSkillsDir, {
587
- overwrite: true,
588
- errorOnExist: false
589
- });
721
+ // Copy each skill directory and inject system prompts if needed
722
+ for (const skillDir of skillDirs) {
723
+ const sourcePath = path.join(sourceDir, skillDir.name);
724
+ const targetPath = path.join(targetSkillsDir, skillDir.name);
725
+ // Copy entire skill directory first
726
+ fs.copySync(sourcePath, targetPath, {
727
+ overwrite: true,
728
+ errorOnExist: false
729
+ });
730
+ // Then inject system prompt into SKILL.md if language !== 'en'
731
+ if (language !== 'en') {
732
+ const skillMdPath = path.join(targetPath, 'SKILL.md');
733
+ if (fs.existsSync(skillMdPath)) {
734
+ const content = fs.readFileSync(skillMdPath, 'utf-8');
735
+ const modifiedContent = injectSystemPromptForInit(content, language);
736
+ fs.writeFileSync(skillMdPath, modifiedContent, 'utf-8');
737
+ }
738
+ }
739
+ }
590
740
  // Validate subdirectories were copied
591
741
  const copiedDirs = fs.readdirSync(targetSkillsDir, { withFileTypes: true })
592
742
  .filter(dirent => dirent.isDirectory());
593
743
  if (copiedDirs.length === 0) {
594
744
  throw new Error(`Copy completed but no skill directories found in target: ${targetSkillsDir}`);
595
745
  }
596
- console.log(chalk.gray(` āœ“ Copied ${copiedDirs.length} skill directories`));
746
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedSkills', { count: copiedDirs.length })}`));
597
747
  }
598
748
  catch (error) {
599
- console.error(chalk.red(`\nāŒ Error copying skills: ${error.message}`));
600
- console.error(chalk.red(` Source: ${sourceDir}`));
601
- console.error(chalk.red(` Target: ${targetSkillsDir}`));
749
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'skills', error: error.message })}`));
750
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
751
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetSkillsDir })}`));
602
752
  throw error;
603
753
  }
604
754
  }
605
- function copyHooks(hooksDir, targetHooksDir) {
755
+ function copyHooks(hooksDir, targetHooksDir, language = 'en') {
756
+ const locale = getLocaleManager(language);
606
757
  const sourceDir = findSourceDir('hooks');
607
758
  if (!fs.existsSync(sourceDir)) {
608
- console.error(chalk.red(`\nāŒ Error: Source hooks directory not found`));
609
- console.error(chalk.red(` Expected at: ${sourceDir}`));
610
- console.error(chalk.red(` __dirname: ${__dirname}`));
759
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'hooks' })}`));
760
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
761
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
611
762
  const packageRoot = findPackageRoot(__dirname);
612
763
  if (packageRoot) {
613
- console.error(chalk.red(` Package root: ${packageRoot}`));
764
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
614
765
  }
615
766
  else {
616
- console.error(chalk.red(` Could not find package root (looking for package.json with name="specweave")`));
767
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
617
768
  }
618
769
  throw new Error('Failed to locate source hooks directory. This may be a Windows path resolution issue.');
619
770
  }
620
771
  // Validate source directory contains hook files
621
772
  const hookFiles = fs.readdirSync(sourceDir).filter(f => f.endsWith('.sh') || f === 'README.md');
622
773
  if (hookFiles.length === 0) {
623
- console.error(chalk.red(`\nāŒ Error: Source hooks directory is empty`));
624
- console.error(chalk.red(` Directory: ${sourceDir}`));
625
- console.error(chalk.red(` This indicates a package installation issue.`));
774
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'hooks' })}`));
775
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
776
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
626
777
  throw new Error('Source hooks directory exists but contains no hook files');
627
778
  }
628
779
  try {
@@ -638,65 +789,136 @@ function copyHooks(hooksDir, targetHooksDir) {
638
789
  if (copiedFiles.length === 0) {
639
790
  throw new Error(`Copy completed but no hook files found in target: ${targetHooksDir}`);
640
791
  }
641
- console.log(chalk.gray(` āœ“ Copied ${copiedFiles.length} hook files`));
792
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedHooks', { count: copiedFiles.length })}`));
642
793
  }
643
794
  catch (error) {
644
- console.error(chalk.red(`\nāŒ Error copying hooks: ${error.message}`));
645
- console.error(chalk.red(` Source: ${sourceDir}`));
646
- console.error(chalk.red(` Target: ${targetHooksDir}`));
795
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'hooks', error: error.message })}`));
796
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
797
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetHooksDir })}`));
647
798
  throw error;
648
799
  }
649
800
  }
650
- function showNextSteps(projectName, adapterName, usedDotNotation = false) {
801
+ /**
802
+ * Create .specweave/config.json with project settings
803
+ */
804
+ function createConfigFile(targetDir, projectName, adapter, language) {
805
+ const configPath = path.join(targetDir, '.specweave', 'config.json');
806
+ const config = {
807
+ project: {
808
+ name: projectName,
809
+ version: '0.1.0',
810
+ },
811
+ adapters: {
812
+ default: adapter,
813
+ },
814
+ // Only include language if non-English
815
+ ...(language !== 'en' && {
816
+ language,
817
+ translation: {
818
+ method: 'in-session',
819
+ autoTranslateLivingDocs: false,
820
+ keepFrameworkTerms: true,
821
+ keepTechnicalTerms: true,
822
+ translateCodeComments: true,
823
+ translateVariableNames: false,
824
+ },
825
+ }),
826
+ };
827
+ fs.writeJsonSync(configPath, config, { spaces: 2 });
828
+ }
829
+ /**
830
+ * Setup Claude Code automatic plugin registration
831
+ * Creates .claude/settings.json with extraKnownMarketplaces
832
+ * This triggers Claude's native auto-install when users trust the folder
833
+ */
834
+ function setupClaudePluginAutoRegistration(targetDir, language) {
835
+ const locale = getLocaleManager(language);
836
+ const settingsPath = path.join(targetDir, '.claude', 'settings.json');
837
+ // Check if marketplace files exist
838
+ const marketplacePath = path.join(targetDir, '.claude-plugin', 'marketplace.json');
839
+ if (!fs.existsSync(marketplacePath)) {
840
+ console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.marketplaceNotFound')}`));
841
+ return;
842
+ }
843
+ // Create settings.json with marketplace registration
844
+ const settings = {
845
+ extraKnownMarketplaces: {
846
+ specweave: {
847
+ source: {
848
+ source: 'local',
849
+ path: './.claude-plugin'
850
+ }
851
+ }
852
+ }
853
+ };
854
+ try {
855
+ fs.writeJsonSync(settingsPath, settings, { spaces: 2 });
856
+ console.log(chalk.green(`\nāœ… ${locale.t('cli', 'init.success.pluginAutoSetup')}`));
857
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.pluginAutoSetupDetails')}`));
858
+ }
859
+ catch (error) {
860
+ throw new Error(`Failed to create .claude/settings.json: ${error.message}`);
861
+ }
862
+ }
863
+ function showNextSteps(projectName, adapterName, language, usedDotNotation = false) {
864
+ const locale = getLocaleManager(language);
651
865
  console.log('');
652
- console.log(chalk.cyan.bold('šŸŽÆ Next steps:'));
866
+ console.log(chalk.cyan.bold(locale.t('cli', 'init.nextSteps.header')));
653
867
  console.log('');
654
868
  let stepNumber = 1;
655
869
  // Only show "cd" step if we created a subdirectory
656
870
  if (!usedDotNotation) {
657
- console.log(` ${stepNumber}. ${chalk.white(`cd ${projectName}`)}`);
871
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.cd', { projectName }))}`);
658
872
  console.log('');
659
873
  stepNumber++;
660
874
  }
661
875
  // Adapter-specific instructions
662
876
  if (adapterName === 'claude') {
663
- console.log(` ${stepNumber}. ${chalk.white('Open Claude Code and describe your project:')}`);
664
- console.log(` ${chalk.gray('"Build a real estate listing platform"')}`);
877
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step1'))}`);
878
+ console.log('');
879
+ // CRITICAL STEP: Install core plugin (highlighted)
880
+ console.log(` ${stepNumber + 1}. ${chalk.yellow.bold('āš ļø ' + locale.t('cli', 'init.nextSteps.claude.step2'))}`);
881
+ console.log(` ${chalk.cyan.bold(locale.t('cli', 'init.nextSteps.claude.installCore'))}`);
882
+ console.log(` ${chalk.gray('↑ Required for slash commands like /specweave:inc')}`);
883
+ console.log('');
884
+ console.log(` ${stepNumber + 2}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step3'))}`);
885
+ console.log(` ${chalk.gray(locale.t('cli', 'init.nextSteps.claude.installGitHub'))}`);
886
+ console.log(` ${chalk.gray(locale.t('cli', 'init.nextSteps.claude.installFrontend'))}`);
887
+ console.log(` ${chalk.gray('...or let SpecWeave suggest plugins automatically')}`);
665
888
  console.log('');
666
- console.log(` ${stepNumber + 1}. ${chalk.white('SpecWeave will:')}`);
667
- console.log(' • Auto-activate skills and agents');
668
- console.log(' • Create specifications');
669
- console.log(' • Build implementation');
889
+ console.log(` ${stepNumber + 3}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step4'))}`);
890
+ console.log(` ${chalk.cyan(locale.t('cli', 'init.nextSteps.claude.example'))}`);
891
+ console.log(` ${chalk.gray(locale.t('cli', 'init.nextSteps.claude.autoActivate'))}`);
670
892
  }
671
893
  else if (adapterName === 'cursor') {
672
- console.log(` ${stepNumber}. ${chalk.white('Open project in Cursor')}`);
894
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step1'))}`);
673
895
  console.log('');
674
- console.log(` ${stepNumber + 1}. ${chalk.white('Say: "Create increment for [your feature]"')}`);
675
- console.log(` Cursor will read .cursorrules and guide you`);
896
+ console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step2'))}`);
897
+ console.log(` ${locale.t('cli', 'init.nextSteps.cursor.guide')}`);
676
898
  console.log('');
677
- console.log(` ${stepNumber + 2}. ${chalk.white('Use @ shortcuts:')}`);
678
- console.log(` @increments, @docs, @strategy, @tests`);
899
+ console.log(` ${stepNumber + 2}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step3'))}`);
900
+ console.log(` ${locale.t('cli', 'init.nextSteps.cursor.shortcuts')}`);
679
901
  }
680
902
  else if (adapterName === 'copilot') {
681
- console.log(` ${stepNumber}. ${chalk.white('Open project in VS Code with Copilot')}`);
903
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.copilot.step1'))}`);
682
904
  console.log('');
683
- console.log(` ${stepNumber + 1}. ${chalk.white('Copilot will read workspace instructions automatically')}`);
684
- console.log(` Start creating increment folders and files`);
905
+ console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.copilot.step2'))}`);
906
+ console.log(` ${locale.t('cli', 'init.nextSteps.copilot.action')}`);
685
907
  console.log('');
686
- console.log(` ${stepNumber + 2}. ${chalk.white('Use Copilot Chat for guidance:')}`);
687
- console.log(` "How do I create a spec.md?"`);
908
+ console.log(` ${stepNumber + 2}. ${chalk.white(locale.t('cli', 'init.nextSteps.copilot.step3'))}`);
909
+ console.log(` ${locale.t('cli', 'init.nextSteps.copilot.example')}`);
688
910
  }
689
911
  else if (adapterName === 'generic') {
690
- console.log(` ${stepNumber}. ${chalk.white('Read SPECWEAVE-MANUAL.md')}`);
912
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.generic.step1'))}`);
691
913
  console.log('');
692
- console.log(` ${stepNumber + 1}. ${chalk.white('Follow step-by-step instructions')}`);
693
- console.log(` Works with ANY AI tool (ChatGPT, Claude web, Gemini)`);
914
+ console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.generic.step2'))}`);
915
+ console.log(` ${locale.t('cli', 'init.nextSteps.generic.compatibility')}`);
694
916
  }
695
917
  console.log('');
696
- console.log(chalk.green.bold('šŸš€ Ready to build with SpecWeave!'));
918
+ console.log(chalk.green.bold(locale.t('cli', 'init.nextSteps.footer')));
697
919
  console.log('');
698
- console.log(chalk.gray('Documentation: https://spec-weave.com'));
699
- console.log(chalk.gray('GitHub: https://github.com/anton-abyzov/specweave'));
920
+ console.log(chalk.gray(locale.t('cli', 'init.nextSteps.docsLink')));
921
+ console.log(chalk.gray(locale.t('cli', 'init.nextSteps.githubLink')));
700
922
  console.log('');
701
923
  }
702
924
  //# sourceMappingURL=init.js.map