specweave 0.12.7 → 0.13.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 (916) hide show
  1. package/CLAUDE.md +199 -46
  2. package/bin/specweave.js +12 -0
  3. package/dist/cli/commands/check-discipline.d.ts +16 -0
  4. package/dist/cli/commands/check-discipline.d.ts.map +1 -0
  5. package/dist/cli/commands/check-discipline.js +79 -0
  6. package/dist/cli/commands/check-discipline.js.map +1 -0
  7. package/dist/cli/commands/init.d.ts.map +1 -1
  8. package/dist/cli/commands/init.js +25 -313
  9. package/dist/cli/commands/init.js.map +1 -1
  10. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  11. package/dist/cli/helpers/issue-tracker/index.js +130 -0
  12. package/dist/cli/helpers/issue-tracker/index.js.map +1 -1
  13. package/dist/core/increment/discipline-checker.d.ts +60 -0
  14. package/dist/core/increment/discipline-checker.d.ts.map +1 -0
  15. package/dist/core/increment/discipline-checker.js +274 -0
  16. package/dist/core/increment/discipline-checker.js.map +1 -0
  17. package/dist/core/increment/metadata-validator.d.ts +33 -0
  18. package/dist/core/increment/metadata-validator.d.ts.map +1 -0
  19. package/dist/core/increment/metadata-validator.js +147 -0
  20. package/dist/core/increment/metadata-validator.js.map +1 -0
  21. package/dist/core/increment/types.d.ts +88 -0
  22. package/dist/core/increment/types.d.ts.map +1 -0
  23. package/dist/core/increment/types.js +8 -0
  24. package/dist/core/increment/types.js.map +1 -0
  25. package/dist/core/qa/qa-runner.d.ts.map +1 -1
  26. package/dist/core/qa/qa-runner.js +22 -4
  27. package/dist/core/qa/qa-runner.js.map +1 -1
  28. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +89 -0
  29. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +1 -0
  30. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js +226 -0
  31. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +1 -0
  32. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +60 -0
  33. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +1 -0
  34. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js +201 -0
  35. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +1 -0
  36. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +42 -0
  37. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +1 -0
  38. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js +123 -0
  39. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +1 -0
  40. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +45 -0
  41. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +1 -0
  42. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js +132 -0
  43. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js.map +1 -0
  44. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts +33 -0
  45. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +1 -0
  46. package/dist/plugins/specweave/lib/hooks/reflection-parser.js +419 -0
  47. package/dist/plugins/specweave/lib/hooks/reflection-parser.js.map +1 -0
  48. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +56 -0
  49. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +1 -0
  50. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js +239 -0
  51. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +1 -0
  52. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts +64 -0
  53. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +1 -0
  54. package/dist/plugins/specweave/lib/hooks/reflection-storage.js +305 -0
  55. package/dist/plugins/specweave/lib/hooks/reflection-storage.js.map +1 -0
  56. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts +43 -0
  57. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +1 -0
  58. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js +203 -0
  59. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js.map +1 -0
  60. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +27 -0
  61. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -0
  62. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +144 -0
  63. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -0
  64. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts +59 -0
  65. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts.map +1 -0
  66. package/dist/plugins/specweave/lib/hooks/translate-file.js +350 -0
  67. package/dist/plugins/specweave/lib/hooks/translate-file.js.map +1 -0
  68. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts +13 -0
  69. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +1 -0
  70. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js +175 -0
  71. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js.map +1 -0
  72. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts +164 -0
  73. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +1 -0
  74. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js +73 -0
  75. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js.map +1 -0
  76. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts +29 -0
  77. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +1 -0
  78. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js +203 -0
  79. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js.map +1 -0
  80. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts +94 -0
  81. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +1 -0
  82. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js +219 -0
  83. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js.map +1 -0
  84. package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts +124 -0
  85. package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts.map +1 -0
  86. package/dist/plugins/specweave-ado/lib/ado-client-v2.js +382 -0
  87. package/dist/plugins/specweave-ado/lib/ado-client-v2.js.map +1 -0
  88. package/dist/plugins/specweave-ado/lib/ado-client.d.ts +112 -0
  89. package/dist/plugins/specweave-ado/lib/ado-client.d.ts.map +1 -0
  90. package/dist/plugins/specweave-ado/lib/ado-client.js +257 -0
  91. package/dist/plugins/specweave-ado/lib/ado-client.js.map +1 -0
  92. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts +40 -0
  93. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts.map +1 -0
  94. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.js +370 -0
  95. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.js.map +1 -0
  96. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +100 -0
  97. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -0
  98. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +471 -0
  99. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -0
  100. package/dist/plugins/specweave-ado/lib/project-selector.d.ts +42 -0
  101. package/dist/plugins/specweave-ado/lib/project-selector.d.ts.map +1 -0
  102. package/dist/plugins/specweave-ado/lib/project-selector.js +211 -0
  103. package/dist/plugins/specweave-ado/lib/project-selector.js.map +1 -0
  104. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +12 -0
  105. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +1 -0
  106. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js +28 -0
  107. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +1 -0
  108. package/dist/plugins/specweave-github/lib/github-board-resolver.d.ts +54 -0
  109. package/dist/plugins/specweave-github/lib/github-board-resolver.d.ts.map +1 -0
  110. package/dist/plugins/specweave-github/lib/github-board-resolver.js +122 -0
  111. package/dist/plugins/specweave-github/lib/github-board-resolver.js.map +1 -0
  112. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +104 -0
  113. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -0
  114. package/dist/plugins/specweave-github/lib/github-client-v2.js +408 -0
  115. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -0
  116. package/dist/plugins/specweave-github/lib/github-client.d.ts +96 -0
  117. package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
  118. package/dist/plugins/specweave-github/lib/github-client.js +299 -0
  119. package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
  120. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.d.ts +29 -0
  121. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.d.ts.map +1 -0
  122. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.js +268 -0
  123. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.js.map +1 -0
  124. package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts +61 -0
  125. package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts.map +1 -0
  126. package/dist/plugins/specweave-github/lib/github-issue-updater.js +327 -0
  127. package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -0
  128. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +108 -0
  129. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts.map +1 -0
  130. package/dist/plugins/specweave-github/lib/github-spec-sync.js +505 -0
  131. package/dist/plugins/specweave-github/lib/github-spec-sync.js.map +1 -0
  132. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +36 -0
  133. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -0
  134. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +228 -0
  135. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -0
  136. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +18 -0
  137. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +1 -0
  138. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +287 -0
  139. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -0
  140. package/dist/plugins/specweave-github/lib/index.d.ts +10 -0
  141. package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -0
  142. package/dist/plugins/specweave-github/lib/index.js +10 -0
  143. package/dist/plugins/specweave-github/lib/index.js.map +1 -0
  144. package/dist/plugins/specweave-github/lib/repo-selector.d.ts +49 -0
  145. package/dist/plugins/specweave-github/lib/repo-selector.d.ts.map +1 -0
  146. package/dist/plugins/specweave-github/lib/repo-selector.js +216 -0
  147. package/dist/plugins/specweave-github/lib/repo-selector.js.map +1 -0
  148. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
  149. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
  150. package/dist/plugins/specweave-github/lib/subtask-sync.js +147 -0
  151. package/dist/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
  152. package/dist/plugins/specweave-github/lib/task-parser.d.ts +37 -0
  153. package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
  154. package/dist/plugins/specweave-github/lib/task-parser.js +211 -0
  155. package/dist/plugins/specweave-github/lib/task-parser.js.map +1 -0
  156. package/dist/plugins/specweave-github/lib/task-sync.d.ts +51 -0
  157. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
  158. package/dist/plugins/specweave-github/lib/task-sync.js +332 -0
  159. package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -0
  160. package/dist/plugins/specweave-github/lib/types.d.ts +80 -0
  161. package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -0
  162. package/dist/plugins/specweave-github/lib/types.js +5 -0
  163. package/dist/plugins/specweave-github/lib/types.js.map +1 -0
  164. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
  165. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
  166. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
  167. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
  168. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts +33 -0
  169. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts.map +1 -0
  170. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.js +206 -0
  171. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.js.map +1 -0
  172. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +105 -0
  173. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -0
  174. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +456 -0
  175. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -0
  176. package/dist/plugins/specweave-jira/lib/project-selector.d.ts +42 -0
  177. package/dist/plugins/specweave-jira/lib/project-selector.d.ts.map +1 -0
  178. package/dist/plugins/specweave-jira/lib/project-selector.js +216 -0
  179. package/dist/plugins/specweave-jira/lib/project-selector.js.map +1 -0
  180. package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts +67 -0
  181. package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts.map +1 -0
  182. package/dist/plugins/specweave-jira/lib/reorganization-detector.js +252 -0
  183. package/dist/plugins/specweave-jira/lib/reorganization-detector.js.map +1 -0
  184. package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts +29 -0
  185. package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts.map +1 -0
  186. package/dist/plugins/specweave-jira/lib/setup-wizard.js +219 -0
  187. package/dist/plugins/specweave-jira/lib/setup-wizard.js.map +1 -0
  188. package/dist/src/adapters/adapter-base.d.ts +71 -0
  189. package/dist/src/adapters/adapter-base.d.ts.map +1 -0
  190. package/dist/src/adapters/adapter-base.js +139 -0
  191. package/dist/src/adapters/adapter-base.js.map +1 -0
  192. package/dist/src/adapters/adapter-interface.d.ts +149 -0
  193. package/dist/src/adapters/adapter-interface.d.ts.map +1 -0
  194. package/dist/src/adapters/adapter-interface.js +8 -0
  195. package/dist/src/adapters/adapter-interface.js.map +1 -0
  196. package/dist/src/adapters/adapter-loader.d.ts +91 -0
  197. package/dist/src/adapters/adapter-loader.d.ts.map +1 -0
  198. package/dist/src/adapters/adapter-loader.js +238 -0
  199. package/dist/src/adapters/adapter-loader.js.map +1 -0
  200. package/dist/src/adapters/agents-md-generator.d.ts +48 -0
  201. package/dist/src/adapters/agents-md-generator.d.ts.map +1 -0
  202. package/dist/src/adapters/agents-md-generator.js +193 -0
  203. package/dist/src/adapters/agents-md-generator.js.map +1 -0
  204. package/dist/src/adapters/claude/adapter.d.ts +128 -0
  205. package/dist/src/adapters/claude/adapter.d.ts.map +1 -0
  206. package/dist/src/adapters/claude/adapter.js +415 -0
  207. package/dist/src/adapters/claude/adapter.js.map +1 -0
  208. package/dist/src/adapters/claude-md-generator.d.ts +78 -0
  209. package/dist/src/adapters/claude-md-generator.d.ts.map +1 -0
  210. package/dist/src/adapters/claude-md-generator.js +307 -0
  211. package/dist/src/adapters/claude-md-generator.js.map +1 -0
  212. package/dist/src/adapters/codex/adapter.d.ts +50 -0
  213. package/dist/src/adapters/codex/adapter.d.ts.map +1 -0
  214. package/dist/src/adapters/codex/adapter.js +316 -0
  215. package/dist/src/adapters/codex/adapter.js.map +1 -0
  216. package/dist/src/adapters/cursor/adapter.d.ts +98 -0
  217. package/dist/src/adapters/cursor/adapter.d.ts.map +1 -0
  218. package/dist/src/adapters/cursor/adapter.js +406 -0
  219. package/dist/src/adapters/cursor/adapter.js.map +1 -0
  220. package/dist/src/adapters/doc-generator.d.ts +69 -0
  221. package/dist/src/adapters/doc-generator.d.ts.map +1 -0
  222. package/dist/src/adapters/doc-generator.js +247 -0
  223. package/dist/src/adapters/doc-generator.js.map +1 -0
  224. package/dist/src/adapters/gemini/adapter.d.ts +50 -0
  225. package/dist/src/adapters/gemini/adapter.d.ts.map +1 -0
  226. package/dist/src/adapters/gemini/adapter.js +281 -0
  227. package/dist/src/adapters/gemini/adapter.js.map +1 -0
  228. package/dist/src/adapters/generic/adapter.d.ts +86 -0
  229. package/dist/src/adapters/generic/adapter.d.ts.map +1 -0
  230. package/dist/src/adapters/generic/adapter.js +338 -0
  231. package/dist/src/adapters/generic/adapter.js.map +1 -0
  232. package/dist/src/cli/commands/abandon.d.ts +13 -0
  233. package/dist/src/cli/commands/abandon.d.ts.map +1 -0
  234. package/dist/src/cli/commands/abandon.js +15 -0
  235. package/dist/src/cli/commands/abandon.js.map +1 -0
  236. package/dist/src/cli/commands/import-docs.d.ts +21 -0
  237. package/dist/src/cli/commands/import-docs.d.ts.map +1 -0
  238. package/dist/src/cli/commands/import-docs.js +146 -0
  239. package/dist/src/cli/commands/import-docs.js.map +1 -0
  240. package/dist/src/cli/commands/init-multiproject.d.ts +11 -0
  241. package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -0
  242. package/dist/src/cli/commands/init-multiproject.js +202 -0
  243. package/dist/src/cli/commands/init-multiproject.js.map +1 -0
  244. package/dist/src/cli/commands/init.d.ts +9 -0
  245. package/dist/src/cli/commands/init.d.ts.map +1 -0
  246. package/dist/src/cli/commands/init.js +1444 -0
  247. package/dist/src/cli/commands/init.js.map +1 -0
  248. package/dist/src/cli/commands/install.d.ts +9 -0
  249. package/dist/src/cli/commands/install.d.ts.map +1 -0
  250. package/dist/src/cli/commands/install.js +127 -0
  251. package/dist/src/cli/commands/install.js.map +1 -0
  252. package/dist/src/cli/commands/list.d.ts +8 -0
  253. package/dist/src/cli/commands/list.d.ts.map +1 -0
  254. package/dist/src/cli/commands/list.js +119 -0
  255. package/dist/src/cli/commands/list.js.map +1 -0
  256. package/dist/src/cli/commands/migrate-to-multiproject.d.ts +37 -0
  257. package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -0
  258. package/dist/src/cli/commands/migrate-to-multiproject.js +189 -0
  259. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -0
  260. package/dist/src/cli/commands/migrate-to-profiles.d.ts +25 -0
  261. package/dist/src/cli/commands/migrate-to-profiles.d.ts.map +1 -0
  262. package/dist/src/cli/commands/migrate-to-profiles.js +350 -0
  263. package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -0
  264. package/dist/src/cli/commands/pause.d.ts +13 -0
  265. package/dist/src/cli/commands/pause.d.ts.map +1 -0
  266. package/dist/src/cli/commands/pause.js +15 -0
  267. package/dist/src/cli/commands/pause.js.map +1 -0
  268. package/dist/src/cli/commands/qa.d.ts +54 -0
  269. package/dist/src/cli/commands/qa.d.ts.map +1 -0
  270. package/dist/src/cli/commands/qa.js +98 -0
  271. package/dist/src/cli/commands/qa.js.map +1 -0
  272. package/dist/src/cli/commands/resume.d.ts +12 -0
  273. package/dist/src/cli/commands/resume.d.ts.map +1 -0
  274. package/dist/src/cli/commands/resume.js +14 -0
  275. package/dist/src/cli/commands/resume.js.map +1 -0
  276. package/dist/src/cli/commands/status.d.ts +12 -0
  277. package/dist/src/cli/commands/status.d.ts.map +1 -0
  278. package/dist/src/cli/commands/status.js +23 -0
  279. package/dist/src/cli/commands/status.js.map +1 -0
  280. package/dist/src/cli/commands/switch-project.d.ts +13 -0
  281. package/dist/src/cli/commands/switch-project.d.ts.map +1 -0
  282. package/dist/src/cli/commands/switch-project.js +91 -0
  283. package/dist/src/cli/commands/switch-project.js.map +1 -0
  284. package/dist/src/cli/commands/validate-jira.d.ts +35 -0
  285. package/dist/src/cli/commands/validate-jira.d.ts.map +1 -0
  286. package/dist/src/cli/commands/validate-jira.js +112 -0
  287. package/dist/src/cli/commands/validate-jira.js.map +1 -0
  288. package/dist/src/cli/commands/validate-plugins.d.ts +41 -0
  289. package/dist/src/cli/commands/validate-plugins.d.ts.map +1 -0
  290. package/dist/src/cli/commands/validate-plugins.js +171 -0
  291. package/dist/src/cli/commands/validate-plugins.js.map +1 -0
  292. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +57 -0
  293. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
  294. package/dist/src/cli/helpers/issue-tracker/ado.js +243 -0
  295. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -0
  296. package/dist/src/cli/helpers/issue-tracker/github.d.ts +65 -0
  297. package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +1 -0
  298. package/dist/src/cli/helpers/issue-tracker/github.js +426 -0
  299. package/dist/src/cli/helpers/issue-tracker/github.js.map +1 -0
  300. package/dist/src/cli/helpers/issue-tracker/index.d.ts +22 -0
  301. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -0
  302. package/dist/src/cli/helpers/issue-tracker/index.js +314 -0
  303. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -0
  304. package/dist/src/cli/helpers/issue-tracker/jira.d.ts +61 -0
  305. package/dist/src/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
  306. package/dist/src/cli/helpers/issue-tracker/jira.js +404 -0
  307. package/dist/src/cli/helpers/issue-tracker/jira.js.map +1 -0
  308. package/dist/src/cli/helpers/issue-tracker/types.d.ts +108 -0
  309. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -0
  310. package/dist/src/cli/helpers/issue-tracker/types.js +16 -0
  311. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -0
  312. package/dist/src/cli/helpers/issue-tracker/utils.d.ts +112 -0
  313. package/dist/src/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
  314. package/dist/src/cli/helpers/issue-tracker/utils.js +247 -0
  315. package/dist/src/cli/helpers/issue-tracker/utils.js.map +1 -0
  316. package/dist/src/core/agent-model-manager.d.ts +52 -0
  317. package/dist/src/core/agent-model-manager.d.ts.map +1 -0
  318. package/dist/src/core/agent-model-manager.js +120 -0
  319. package/dist/src/core/agent-model-manager.js.map +1 -0
  320. package/dist/src/core/brownfield/analyzer.d.ts +86 -0
  321. package/dist/src/core/brownfield/analyzer.d.ts.map +1 -0
  322. package/dist/src/core/brownfield/analyzer.js +365 -0
  323. package/dist/src/core/brownfield/analyzer.js.map +1 -0
  324. package/dist/src/core/brownfield/importer.d.ts +76 -0
  325. package/dist/src/core/brownfield/importer.d.ts.map +1 -0
  326. package/dist/src/core/brownfield/importer.js +287 -0
  327. package/dist/src/core/brownfield/importer.js.map +1 -0
  328. package/dist/src/core/config-manager.d.ts +47 -0
  329. package/dist/src/core/config-manager.d.ts.map +1 -0
  330. package/dist/src/core/config-manager.js +136 -0
  331. package/dist/src/core/config-manager.js.map +1 -0
  332. package/dist/src/core/cost-tracker.d.ts +108 -0
  333. package/dist/src/core/cost-tracker.d.ts.map +1 -0
  334. package/dist/src/core/cost-tracker.js +281 -0
  335. package/dist/src/core/cost-tracker.js.map +1 -0
  336. package/dist/src/core/credentials-manager.d.ts +107 -0
  337. package/dist/src/core/credentials-manager.d.ts.map +1 -0
  338. package/dist/src/core/credentials-manager.js +457 -0
  339. package/dist/src/core/credentials-manager.js.map +1 -0
  340. package/dist/src/core/i18n/language-detector.d.ts +29 -0
  341. package/dist/src/core/i18n/language-detector.d.ts.map +1 -0
  342. package/dist/src/core/i18n/language-detector.js +143 -0
  343. package/dist/src/core/i18n/language-detector.js.map +1 -0
  344. package/dist/src/core/i18n/language-manager.d.ts +101 -0
  345. package/dist/src/core/i18n/language-manager.d.ts.map +1 -0
  346. package/dist/src/core/i18n/language-manager.js +232 -0
  347. package/dist/src/core/i18n/language-manager.js.map +1 -0
  348. package/dist/src/core/i18n/language-registry.d.ts +44 -0
  349. package/dist/src/core/i18n/language-registry.d.ts.map +1 -0
  350. package/dist/src/core/i18n/language-registry.js +234 -0
  351. package/dist/src/core/i18n/language-registry.js.map +1 -0
  352. package/dist/src/core/i18n/locale-manager.d.ts +62 -0
  353. package/dist/src/core/i18n/locale-manager.d.ts.map +1 -0
  354. package/dist/src/core/i18n/locale-manager.js +137 -0
  355. package/dist/src/core/i18n/locale-manager.js.map +1 -0
  356. package/dist/src/core/i18n/system-prompt-injector.d.ts +33 -0
  357. package/dist/src/core/i18n/system-prompt-injector.d.ts.map +1 -0
  358. package/dist/src/core/i18n/system-prompt-injector.js +131 -0
  359. package/dist/src/core/i18n/system-prompt-injector.js.map +1 -0
  360. package/dist/src/core/i18n/types.d.ts +151 -0
  361. package/dist/src/core/i18n/types.d.ts.map +1 -0
  362. package/dist/src/core/i18n/types.js +11 -0
  363. package/dist/src/core/i18n/types.js.map +1 -0
  364. package/dist/src/core/increment/limits.d.ts +68 -0
  365. package/dist/src/core/increment/limits.d.ts.map +1 -0
  366. package/dist/src/core/increment/limits.js +224 -0
  367. package/dist/src/core/increment/limits.js.map +1 -0
  368. package/dist/src/core/increment/metadata-manager.d.ts +114 -0
  369. package/dist/src/core/increment/metadata-manager.d.ts.map +1 -0
  370. package/dist/src/core/increment/metadata-manager.js +320 -0
  371. package/dist/src/core/increment/metadata-manager.js.map +1 -0
  372. package/dist/src/core/increment/status-commands.d.ts +43 -0
  373. package/dist/src/core/increment/status-commands.d.ts.map +1 -0
  374. package/dist/src/core/increment/status-commands.js +277 -0
  375. package/dist/src/core/increment/status-commands.js.map +1 -0
  376. package/dist/src/core/increment-status.d.ts +72 -0
  377. package/dist/src/core/increment-status.d.ts.map +1 -0
  378. package/dist/src/core/increment-status.js +227 -0
  379. package/dist/src/core/increment-status.js.map +1 -0
  380. package/dist/src/core/model-selector.d.ts +57 -0
  381. package/dist/src/core/model-selector.d.ts.map +1 -0
  382. package/dist/src/core/model-selector.js +115 -0
  383. package/dist/src/core/model-selector.js.map +1 -0
  384. package/dist/src/core/phase-detector.d.ts +62 -0
  385. package/dist/src/core/phase-detector.d.ts.map +1 -0
  386. package/dist/src/core/phase-detector.js +229 -0
  387. package/dist/src/core/phase-detector.js.map +1 -0
  388. package/dist/src/core/plugin-loader.d.ts +131 -0
  389. package/dist/src/core/plugin-loader.d.ts.map +1 -0
  390. package/dist/src/core/plugin-loader.js +421 -0
  391. package/dist/src/core/plugin-loader.js.map +1 -0
  392. package/dist/src/core/project-manager.d.ts +127 -0
  393. package/dist/src/core/project-manager.d.ts.map +1 -0
  394. package/dist/src/core/project-manager.js +524 -0
  395. package/dist/src/core/project-manager.js.map +1 -0
  396. package/dist/src/core/project-structure-detector.d.ts +92 -0
  397. package/dist/src/core/project-structure-detector.d.ts.map +1 -0
  398. package/dist/src/core/project-structure-detector.js +289 -0
  399. package/dist/src/core/project-structure-detector.js.map +1 -0
  400. package/dist/src/core/qa/qa-runner.d.ts +16 -0
  401. package/dist/src/core/qa/qa-runner.d.ts.map +1 -0
  402. package/dist/src/core/qa/qa-runner.js +404 -0
  403. package/dist/src/core/qa/qa-runner.js.map +1 -0
  404. package/dist/src/core/qa/quality-gate-decider.d.ts +53 -0
  405. package/dist/src/core/qa/quality-gate-decider.d.ts.map +1 -0
  406. package/dist/src/core/qa/quality-gate-decider.js +268 -0
  407. package/dist/src/core/qa/quality-gate-decider.js.map +1 -0
  408. package/dist/src/core/qa/risk-calculator.d.ts +126 -0
  409. package/dist/src/core/qa/risk-calculator.d.ts.map +1 -0
  410. package/dist/src/core/qa/risk-calculator.js +247 -0
  411. package/dist/src/core/qa/risk-calculator.js.map +1 -0
  412. package/dist/src/core/qa/types.d.ts +315 -0
  413. package/dist/src/core/qa/types.d.ts.map +1 -0
  414. package/dist/src/core/qa/types.js +8 -0
  415. package/dist/src/core/qa/types.js.map +1 -0
  416. package/dist/src/core/rfc-generator-v2.d.ts +149 -0
  417. package/dist/src/core/rfc-generator-v2.d.ts.map +1 -0
  418. package/dist/src/core/rfc-generator-v2.js +399 -0
  419. package/dist/src/core/rfc-generator-v2.js.map +1 -0
  420. package/dist/src/core/specs/spec-metadata-manager.d.ts +70 -0
  421. package/dist/src/core/specs/spec-metadata-manager.d.ts.map +1 -0
  422. package/dist/src/core/specs/spec-metadata-manager.js +371 -0
  423. package/dist/src/core/specs/spec-metadata-manager.js.map +1 -0
  424. package/dist/src/core/specs/spec-parser.d.ts +66 -0
  425. package/dist/src/core/specs/spec-parser.d.ts.map +1 -0
  426. package/dist/src/core/specs/spec-parser.js +276 -0
  427. package/dist/src/core/specs/spec-parser.js.map +1 -0
  428. package/dist/src/core/sync/bidirectional-engine.d.ts +110 -0
  429. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -0
  430. package/dist/src/core/sync/bidirectional-engine.js +356 -0
  431. package/dist/src/core/sync/bidirectional-engine.js.map +1 -0
  432. package/dist/src/core/sync/folder-mapper.d.ts +71 -0
  433. package/dist/src/core/sync/folder-mapper.d.ts.map +1 -0
  434. package/dist/src/core/sync/folder-mapper.js +168 -0
  435. package/dist/src/core/sync/folder-mapper.js.map +1 -0
  436. package/dist/src/core/sync/profile-manager.d.ts +72 -0
  437. package/dist/src/core/sync/profile-manager.d.ts.map +1 -0
  438. package/dist/src/core/sync/profile-manager.js +338 -0
  439. package/dist/src/core/sync/profile-manager.js.map +1 -0
  440. package/dist/src/core/sync/profile-selector.d.ts +52 -0
  441. package/dist/src/core/sync/profile-selector.d.ts.map +1 -0
  442. package/dist/src/core/sync/profile-selector.js +179 -0
  443. package/dist/src/core/sync/profile-selector.js.map +1 -0
  444. package/dist/src/core/sync/profile-validator.d.ts +52 -0
  445. package/dist/src/core/sync/profile-validator.d.ts.map +1 -0
  446. package/dist/src/core/sync/profile-validator.js +225 -0
  447. package/dist/src/core/sync/profile-validator.js.map +1 -0
  448. package/dist/src/core/sync/project-context.d.ts +81 -0
  449. package/dist/src/core/sync/project-context.d.ts.map +1 -0
  450. package/dist/src/core/sync/project-context.js +354 -0
  451. package/dist/src/core/sync/project-context.js.map +1 -0
  452. package/dist/src/core/sync/rate-limiter.d.ts +116 -0
  453. package/dist/src/core/sync/rate-limiter.d.ts.map +1 -0
  454. package/dist/src/core/sync/rate-limiter.js +308 -0
  455. package/dist/src/core/sync/rate-limiter.js.map +1 -0
  456. package/dist/src/core/sync/time-range-selector.d.ts +48 -0
  457. package/dist/src/core/sync/time-range-selector.d.ts.map +1 -0
  458. package/dist/src/core/sync/time-range-selector.js +224 -0
  459. package/dist/src/core/sync/time-range-selector.js.map +1 -0
  460. package/dist/src/core/types/config.d.ts +90 -0
  461. package/dist/src/core/types/config.d.ts.map +1 -0
  462. package/dist/src/core/types/config.js +44 -0
  463. package/dist/src/core/types/config.js.map +1 -0
  464. package/dist/src/core/types/increment-metadata.d.ts +120 -0
  465. package/dist/src/core/types/increment-metadata.d.ts.map +1 -0
  466. package/dist/src/core/types/increment-metadata.js +138 -0
  467. package/dist/src/core/types/increment-metadata.js.map +1 -0
  468. package/dist/src/core/types/plugin.d.ts +283 -0
  469. package/dist/src/core/types/plugin.d.ts.map +1 -0
  470. package/dist/src/core/types/plugin.js +49 -0
  471. package/dist/src/core/types/plugin.js.map +1 -0
  472. package/dist/src/core/types/spec-metadata.d.ts +229 -0
  473. package/dist/src/core/types/spec-metadata.d.ts.map +1 -0
  474. package/dist/src/core/types/spec-metadata.js +14 -0
  475. package/dist/src/core/types/spec-metadata.js.map +1 -0
  476. package/dist/src/core/types/sync-profile.d.ts +403 -0
  477. package/dist/src/core/types/sync-profile.d.ts.map +1 -0
  478. package/dist/src/core/types/sync-profile.js +55 -0
  479. package/dist/src/core/types/sync-profile.js.map +1 -0
  480. package/dist/src/hooks/lib/git-diff-analyzer.d.ts +89 -0
  481. package/dist/src/hooks/lib/git-diff-analyzer.d.ts.map +1 -0
  482. package/dist/src/hooks/lib/git-diff-analyzer.js +226 -0
  483. package/dist/src/hooks/lib/git-diff-analyzer.js.map +1 -0
  484. package/dist/src/hooks/lib/invoke-translator-skill.d.ts +60 -0
  485. package/dist/src/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
  486. package/dist/src/hooks/lib/invoke-translator-skill.js +201 -0
  487. package/dist/src/hooks/lib/invoke-translator-skill.js.map +1 -0
  488. package/dist/src/hooks/lib/prepare-reflection-context.d.ts +42 -0
  489. package/dist/src/hooks/lib/prepare-reflection-context.d.ts.map +1 -0
  490. package/dist/src/hooks/lib/prepare-reflection-context.js +123 -0
  491. package/dist/src/hooks/lib/prepare-reflection-context.js.map +1 -0
  492. package/dist/src/hooks/lib/reflection-config-loader.d.ts +45 -0
  493. package/dist/src/hooks/lib/reflection-config-loader.d.ts.map +1 -0
  494. package/dist/src/hooks/lib/reflection-config-loader.js +132 -0
  495. package/dist/src/hooks/lib/reflection-config-loader.js.map +1 -0
  496. package/dist/src/hooks/lib/reflection-parser.d.ts +33 -0
  497. package/dist/src/hooks/lib/reflection-parser.d.ts.map +1 -0
  498. package/dist/src/hooks/lib/reflection-parser.js +419 -0
  499. package/dist/src/hooks/lib/reflection-parser.js.map +1 -0
  500. package/dist/src/hooks/lib/reflection-prompt-builder.d.ts +56 -0
  501. package/dist/src/hooks/lib/reflection-prompt-builder.d.ts.map +1 -0
  502. package/dist/src/hooks/lib/reflection-prompt-builder.js +239 -0
  503. package/dist/src/hooks/lib/reflection-prompt-builder.js.map +1 -0
  504. package/dist/src/hooks/lib/reflection-storage.d.ts +64 -0
  505. package/dist/src/hooks/lib/reflection-storage.d.ts.map +1 -0
  506. package/dist/src/hooks/lib/reflection-storage.js +305 -0
  507. package/dist/src/hooks/lib/reflection-storage.js.map +1 -0
  508. package/dist/src/hooks/lib/run-self-reflection.d.ts +43 -0
  509. package/dist/src/hooks/lib/run-self-reflection.d.ts.map +1 -0
  510. package/dist/src/hooks/lib/run-self-reflection.js +203 -0
  511. package/dist/src/hooks/lib/run-self-reflection.js.map +1 -0
  512. package/dist/src/hooks/lib/sync-living-docs.d.ts +27 -0
  513. package/dist/src/hooks/lib/sync-living-docs.d.ts.map +1 -0
  514. package/dist/src/hooks/lib/sync-living-docs.js +116 -0
  515. package/dist/src/hooks/lib/sync-living-docs.js.map +1 -0
  516. package/dist/src/hooks/lib/translate-file.d.ts +59 -0
  517. package/dist/src/hooks/lib/translate-file.d.ts.map +1 -0
  518. package/dist/src/hooks/lib/translate-file.js +350 -0
  519. package/dist/src/hooks/lib/translate-file.js.map +1 -0
  520. package/dist/src/hooks/lib/translate-living-docs.d.ts +13 -0
  521. package/dist/src/hooks/lib/translate-living-docs.d.ts.map +1 -0
  522. package/dist/src/hooks/lib/translate-living-docs.js +175 -0
  523. package/dist/src/hooks/lib/translate-living-docs.js.map +1 -0
  524. package/dist/src/hooks/lib/types/reflection-types.d.ts +164 -0
  525. package/dist/src/hooks/lib/types/reflection-types.d.ts.map +1 -0
  526. package/dist/src/hooks/lib/types/reflection-types.js +73 -0
  527. package/dist/src/hooks/lib/types/reflection-types.js.map +1 -0
  528. package/dist/src/hooks/lib/update-tasks-md.d.ts +29 -0
  529. package/dist/src/hooks/lib/update-tasks-md.d.ts.map +1 -0
  530. package/dist/src/hooks/lib/update-tasks-md.js +203 -0
  531. package/dist/src/hooks/lib/update-tasks-md.js.map +1 -0
  532. package/dist/src/integrations/ado/ado-client.d.ts +127 -0
  533. package/dist/src/integrations/ado/ado-client.d.ts.map +1 -0
  534. package/dist/src/integrations/ado/ado-client.js +416 -0
  535. package/dist/src/integrations/ado/ado-client.js.map +1 -0
  536. package/dist/src/integrations/jira/jira-client.d.ts +139 -0
  537. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -0
  538. package/dist/src/integrations/jira/jira-client.js +386 -0
  539. package/dist/src/integrations/jira/jira-client.js.map +1 -0
  540. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +75 -0
  541. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -0
  542. package/dist/src/integrations/jira/jira-incremental-mapper.js +474 -0
  543. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -0
  544. package/dist/src/integrations/jira/jira-mapper.d.ts +105 -0
  545. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -0
  546. package/dist/src/integrations/jira/jira-mapper.js +494 -0
  547. package/dist/src/integrations/jira/jira-mapper.js.map +1 -0
  548. package/dist/src/metrics/calculators/change-failure-rate.d.ts +22 -0
  549. package/dist/src/metrics/calculators/change-failure-rate.d.ts.map +1 -0
  550. package/dist/src/metrics/calculators/change-failure-rate.js +70 -0
  551. package/dist/src/metrics/calculators/change-failure-rate.js.map +1 -0
  552. package/dist/src/metrics/calculators/deployment-frequency.d.ts +20 -0
  553. package/dist/src/metrics/calculators/deployment-frequency.d.ts.map +1 -0
  554. package/dist/src/metrics/calculators/deployment-frequency.js +61 -0
  555. package/dist/src/metrics/calculators/deployment-frequency.js.map +1 -0
  556. package/dist/src/metrics/calculators/lead-time.d.ts +22 -0
  557. package/dist/src/metrics/calculators/lead-time.d.ts.map +1 -0
  558. package/dist/src/metrics/calculators/lead-time.js +82 -0
  559. package/dist/src/metrics/calculators/lead-time.js.map +1 -0
  560. package/dist/src/metrics/calculators/mttr.d.ts +21 -0
  561. package/dist/src/metrics/calculators/mttr.d.ts.map +1 -0
  562. package/dist/src/metrics/calculators/mttr.js +60 -0
  563. package/dist/src/metrics/calculators/mttr.js.map +1 -0
  564. package/dist/src/metrics/dora-calculator.d.ts +28 -0
  565. package/dist/src/metrics/dora-calculator.d.ts.map +1 -0
  566. package/dist/src/metrics/dora-calculator.js +117 -0
  567. package/dist/src/metrics/dora-calculator.js.map +1 -0
  568. package/dist/src/metrics/github-client.d.ts +51 -0
  569. package/dist/src/metrics/github-client.d.ts.map +1 -0
  570. package/dist/src/metrics/github-client.js +133 -0
  571. package/dist/src/metrics/github-client.js.map +1 -0
  572. package/dist/src/metrics/report-generator.d.ts +17 -0
  573. package/dist/src/metrics/report-generator.d.ts.map +1 -0
  574. package/dist/src/metrics/report-generator.js +403 -0
  575. package/dist/src/metrics/report-generator.js.map +1 -0
  576. package/dist/src/metrics/types.d.ts +112 -0
  577. package/dist/src/metrics/types.d.ts.map +1 -0
  578. package/dist/src/metrics/types.js +10 -0
  579. package/dist/src/metrics/types.js.map +1 -0
  580. package/dist/src/metrics/utils/percentile.d.ts +25 -0
  581. package/dist/src/metrics/utils/percentile.d.ts.map +1 -0
  582. package/dist/src/metrics/utils/percentile.js +46 -0
  583. package/dist/src/metrics/utils/percentile.js.map +1 -0
  584. package/dist/src/metrics/utils/tier-classifier.d.ts +61 -0
  585. package/dist/src/metrics/utils/tier-classifier.d.ts.map +1 -0
  586. package/dist/src/metrics/utils/tier-classifier.js +100 -0
  587. package/dist/src/metrics/utils/tier-classifier.js.map +1 -0
  588. package/dist/src/testing/test-generator.d.ts +117 -0
  589. package/dist/src/testing/test-generator.d.ts.map +1 -0
  590. package/dist/src/testing/test-generator.js +370 -0
  591. package/dist/src/testing/test-generator.js.map +1 -0
  592. package/dist/src/types/cost-tracking.d.ts +43 -0
  593. package/dist/src/types/cost-tracking.d.ts.map +1 -0
  594. package/dist/src/types/cost-tracking.js +8 -0
  595. package/dist/src/types/cost-tracking.js.map +1 -0
  596. package/dist/src/types/model-selection.d.ts +53 -0
  597. package/dist/src/types/model-selection.d.ts.map +1 -0
  598. package/dist/src/types/model-selection.js +12 -0
  599. package/dist/src/types/model-selection.js.map +1 -0
  600. package/dist/src/utils/agents-md-compiler.d.ts +68 -0
  601. package/dist/src/utils/agents-md-compiler.d.ts.map +1 -0
  602. package/dist/src/utils/agents-md-compiler.js +420 -0
  603. package/dist/src/utils/agents-md-compiler.js.map +1 -0
  604. package/dist/src/utils/auth-helpers.d.ts +58 -0
  605. package/dist/src/utils/auth-helpers.d.ts.map +1 -0
  606. package/dist/src/utils/auth-helpers.js +108 -0
  607. package/dist/src/utils/auth-helpers.js.map +1 -0
  608. package/dist/src/utils/auto-install.d.ts +47 -0
  609. package/dist/src/utils/auto-install.d.ts.map +1 -0
  610. package/dist/src/utils/auto-install.js +211 -0
  611. package/dist/src/utils/auto-install.js.map +1 -0
  612. package/dist/src/utils/claude-cli-detector.d.ts +75 -0
  613. package/dist/src/utils/claude-cli-detector.d.ts.map +1 -0
  614. package/dist/src/utils/claude-cli-detector.js +285 -0
  615. package/dist/src/utils/claude-cli-detector.js.map +1 -0
  616. package/dist/src/utils/cost-reporter.d.ts +58 -0
  617. package/dist/src/utils/cost-reporter.d.ts.map +1 -0
  618. package/dist/src/utils/cost-reporter.js +224 -0
  619. package/dist/src/utils/cost-reporter.js.map +1 -0
  620. package/dist/src/utils/docs-preview/config-generator.d.ts +46 -0
  621. package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -0
  622. package/dist/src/utils/docs-preview/config-generator.js +377 -0
  623. package/dist/src/utils/docs-preview/config-generator.js.map +1 -0
  624. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +38 -0
  625. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -0
  626. package/dist/src/utils/docs-preview/docusaurus-setup.js +177 -0
  627. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -0
  628. package/dist/src/utils/docs-preview/index.d.ts +7 -0
  629. package/dist/src/utils/docs-preview/index.d.ts.map +1 -0
  630. package/dist/src/utils/docs-preview/index.js +7 -0
  631. package/dist/src/utils/docs-preview/index.js.map +1 -0
  632. package/dist/src/utils/docs-preview/package-installer.d.ts +42 -0
  633. package/dist/src/utils/docs-preview/package-installer.d.ts.map +1 -0
  634. package/dist/src/utils/docs-preview/package-installer.js +182 -0
  635. package/dist/src/utils/docs-preview/package-installer.js.map +1 -0
  636. package/dist/src/utils/docs-preview/server-manager.d.ts +30 -0
  637. package/dist/src/utils/docs-preview/server-manager.d.ts.map +1 -0
  638. package/dist/src/utils/docs-preview/server-manager.js +212 -0
  639. package/dist/src/utils/docs-preview/server-manager.js.map +1 -0
  640. package/dist/src/utils/docs-preview/sidebar-builder.d.ts +32 -0
  641. package/dist/src/utils/docs-preview/sidebar-builder.d.ts.map +1 -0
  642. package/dist/src/utils/docs-preview/sidebar-builder.js +202 -0
  643. package/dist/src/utils/docs-preview/sidebar-builder.js.map +1 -0
  644. package/dist/src/utils/docs-preview/types.d.ts +57 -0
  645. package/dist/src/utils/docs-preview/types.d.ts.map +1 -0
  646. package/dist/src/utils/docs-preview/types.js +2 -0
  647. package/dist/src/utils/docs-preview/types.js.map +1 -0
  648. package/dist/src/utils/env-file.d.ts +88 -0
  649. package/dist/src/utils/env-file.d.ts.map +1 -0
  650. package/dist/src/utils/env-file.js +180 -0
  651. package/dist/src/utils/env-file.js.map +1 -0
  652. package/dist/src/utils/env-multi-project-parser.d.ts +220 -0
  653. package/dist/src/utils/env-multi-project-parser.d.ts.map +1 -0
  654. package/dist/src/utils/env-multi-project-parser.js +403 -0
  655. package/dist/src/utils/env-multi-project-parser.js.map +1 -0
  656. package/dist/src/utils/esm-helpers.d.ts +50 -0
  657. package/dist/src/utils/esm-helpers.d.ts.map +1 -0
  658. package/dist/src/utils/esm-helpers.js +57 -0
  659. package/dist/src/utils/esm-helpers.js.map +1 -0
  660. package/dist/src/utils/execFileNoThrow.d.ts +99 -0
  661. package/dist/src/utils/execFileNoThrow.d.ts.map +1 -0
  662. package/dist/src/utils/execFileNoThrow.js +137 -0
  663. package/dist/src/utils/execFileNoThrow.js.map +1 -0
  664. package/dist/src/utils/external-resource-validator.d.ts +102 -0
  665. package/dist/src/utils/external-resource-validator.d.ts.map +1 -0
  666. package/dist/src/utils/external-resource-validator.js +442 -0
  667. package/dist/src/utils/external-resource-validator.js.map +1 -0
  668. package/dist/src/utils/generate-skills-index.d.ts +24 -0
  669. package/dist/src/utils/generate-skills-index.d.ts.map +1 -0
  670. package/dist/src/utils/generate-skills-index.js +410 -0
  671. package/dist/src/utils/generate-skills-index.js.map +1 -0
  672. package/dist/src/utils/model-selection.d.ts +75 -0
  673. package/dist/src/utils/model-selection.d.ts.map +1 -0
  674. package/dist/src/utils/model-selection.js +204 -0
  675. package/dist/src/utils/model-selection.js.map +1 -0
  676. package/dist/src/utils/plugin-validator.d.ts +161 -0
  677. package/dist/src/utils/plugin-validator.d.ts.map +1 -0
  678. package/dist/src/utils/plugin-validator.js +558 -0
  679. package/dist/src/utils/plugin-validator.js.map +1 -0
  680. package/dist/src/utils/pricing-constants.d.ts +70 -0
  681. package/dist/src/utils/pricing-constants.d.ts.map +1 -0
  682. package/dist/src/utils/pricing-constants.js +71 -0
  683. package/dist/src/utils/pricing-constants.js.map +1 -0
  684. package/dist/src/utils/project-detection.d.ts +141 -0
  685. package/dist/src/utils/project-detection.d.ts.map +1 -0
  686. package/dist/src/utils/project-detection.js +321 -0
  687. package/dist/src/utils/project-detection.js.map +1 -0
  688. package/dist/src/utils/string-utils.d.ts +40 -0
  689. package/dist/src/utils/string-utils.d.ts.map +1 -0
  690. package/dist/src/utils/string-utils.js +58 -0
  691. package/dist/src/utils/string-utils.js.map +1 -0
  692. package/dist/src/utils/translation.d.ts +187 -0
  693. package/dist/src/utils/translation.d.ts.map +1 -0
  694. package/dist/src/utils/translation.js +414 -0
  695. package/dist/src/utils/translation.js.map +1 -0
  696. package/package.json +4 -3
  697. package/plugins/specweave/.claude-plugin/plugin.json +2 -1
  698. package/plugins/specweave/agents/pm/AGENT.md +8 -38
  699. package/plugins/specweave/commands/specweave-increment.md +28 -48
  700. package/plugins/specweave/hooks/README.md +289 -92
  701. package/plugins/specweave/hooks/hooks.json +10 -0
  702. package/plugins/specweave/hooks/post-increment-completion.sh +83 -0
  703. package/plugins/specweave/hooks/post-increment-planning.sh +2 -2
  704. package/plugins/specweave/hooks/post-task-completion.sh +20 -141
  705. package/plugins/specweave/hooks/user-prompt-submit.sh +142 -0
  706. package/plugins/specweave/lib/hooks/git-diff-analyzer.d.js +0 -0
  707. package/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +89 -0
  708. package/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +1 -0
  709. package/plugins/specweave/lib/hooks/git-diff-analyzer.js +226 -0
  710. package/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +1 -0
  711. package/plugins/specweave/lib/hooks/invoke-translator-skill.d.js +0 -0
  712. package/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +60 -0
  713. package/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +1 -0
  714. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +201 -0
  715. package/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +1 -0
  716. package/plugins/specweave/lib/hooks/prepare-reflection-context.d.js +0 -0
  717. package/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +42 -0
  718. package/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +1 -0
  719. package/plugins/specweave/lib/hooks/prepare-reflection-context.js +123 -0
  720. package/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +1 -0
  721. package/plugins/specweave/lib/hooks/reflection-config-loader.d.js +0 -0
  722. package/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +45 -0
  723. package/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +1 -0
  724. package/plugins/specweave/lib/hooks/reflection-config-loader.js +132 -0
  725. package/plugins/specweave/lib/hooks/reflection-config-loader.js.map +1 -0
  726. package/plugins/specweave/lib/hooks/reflection-parser.d.js +0 -0
  727. package/plugins/specweave/lib/hooks/reflection-parser.d.ts +33 -0
  728. package/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +1 -0
  729. package/plugins/specweave/lib/hooks/reflection-parser.js +419 -0
  730. package/plugins/specweave/lib/hooks/reflection-parser.js.map +1 -0
  731. package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.js +0 -0
  732. package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +56 -0
  733. package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +1 -0
  734. package/plugins/specweave/lib/hooks/reflection-prompt-builder.js +239 -0
  735. package/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +1 -0
  736. package/plugins/specweave/lib/hooks/reflection-storage.d.js +0 -0
  737. package/plugins/specweave/lib/hooks/reflection-storage.d.ts +64 -0
  738. package/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +1 -0
  739. package/plugins/specweave/lib/hooks/reflection-storage.js +305 -0
  740. package/plugins/specweave/lib/hooks/reflection-storage.js.map +1 -0
  741. package/plugins/specweave/lib/hooks/run-self-reflection.d.js +0 -0
  742. package/plugins/specweave/lib/hooks/run-self-reflection.d.ts +43 -0
  743. package/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +1 -0
  744. package/plugins/specweave/lib/hooks/run-self-reflection.js +203 -0
  745. package/plugins/specweave/lib/hooks/run-self-reflection.js.map +1 -0
  746. package/plugins/specweave/lib/hooks/sync-living-docs.d.js +1 -0
  747. package/plugins/specweave/lib/hooks/sync-living-docs.d.ts +27 -0
  748. package/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -0
  749. package/plugins/specweave/lib/hooks/sync-living-docs.js +144 -0
  750. package/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -0
  751. package/plugins/specweave/lib/hooks/translate-file.d.js +0 -0
  752. package/plugins/specweave/lib/hooks/translate-file.d.ts +59 -0
  753. package/plugins/specweave/lib/hooks/translate-file.d.ts.map +1 -0
  754. package/plugins/specweave/lib/hooks/translate-file.js +350 -0
  755. package/plugins/specweave/lib/hooks/translate-file.js.map +1 -0
  756. package/plugins/specweave/lib/hooks/translate-living-docs.d.js +0 -0
  757. package/plugins/specweave/lib/hooks/translate-living-docs.d.ts +13 -0
  758. package/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +1 -0
  759. package/plugins/specweave/lib/hooks/translate-living-docs.js +175 -0
  760. package/plugins/specweave/lib/hooks/translate-living-docs.js.map +1 -0
  761. package/plugins/specweave/lib/hooks/types/reflection-types.d.js +0 -0
  762. package/plugins/specweave/lib/hooks/types/reflection-types.d.ts +164 -0
  763. package/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +1 -0
  764. package/plugins/specweave/lib/hooks/types/reflection-types.js +73 -0
  765. package/plugins/specweave/lib/hooks/types/reflection-types.js.map +1 -0
  766. package/plugins/specweave/lib/hooks/update-tasks-md.d.js +1 -0
  767. package/plugins/specweave/lib/hooks/update-tasks-md.d.ts +29 -0
  768. package/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +1 -0
  769. package/plugins/specweave/lib/hooks/update-tasks-md.js +203 -0
  770. package/plugins/specweave/lib/hooks/update-tasks-md.js.map +1 -0
  771. package/plugins/specweave-ado/.claude-plugin/plugin.json +2 -1
  772. package/plugins/specweave-ado/hooks/README.md +201 -0
  773. package/plugins/specweave-ado/hooks/hooks.json +15 -0
  774. package/plugins/specweave-ado/hooks/post-task-completion.sh +150 -0
  775. package/plugins/specweave-ado/lib/ado-board-resolver.d.js +0 -0
  776. package/plugins/specweave-ado/lib/ado-board-resolver.d.ts +94 -0
  777. package/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +1 -0
  778. package/plugins/specweave-ado/lib/ado-board-resolver.js +219 -0
  779. package/plugins/specweave-ado/lib/ado-board-resolver.js.map +1 -0
  780. package/plugins/specweave-ado/lib/ado-client-v2.d.js +0 -0
  781. package/plugins/specweave-ado/lib/ado-client-v2.d.ts +124 -0
  782. package/plugins/specweave-ado/lib/ado-client-v2.d.ts.map +1 -0
  783. package/plugins/specweave-ado/lib/ado-client-v2.js +435 -0
  784. package/plugins/specweave-ado/lib/ado-client-v2.js.map +1 -0
  785. package/plugins/specweave-ado/lib/ado-client-v2.ts +134 -10
  786. package/plugins/specweave-ado/lib/ado-client.d.js +4 -0
  787. package/plugins/specweave-ado/lib/ado-client.d.ts +112 -0
  788. package/plugins/specweave-ado/lib/ado-client.d.ts.map +1 -0
  789. package/plugins/specweave-ado/lib/ado-client.js +248 -0
  790. package/plugins/specweave-ado/lib/ado-client.js.map +1 -0
  791. package/plugins/specweave-ado/lib/ado-client.ts +19 -3
  792. package/plugins/specweave-ado/lib/ado-hierarchical-sync.d.js +0 -0
  793. package/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts +40 -0
  794. package/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts.map +1 -0
  795. package/plugins/specweave-ado/lib/ado-hierarchical-sync.js +370 -0
  796. package/plugins/specweave-ado/lib/ado-hierarchical-sync.js.map +1 -0
  797. package/plugins/specweave-ado/lib/ado-spec-sync.d.js +0 -0
  798. package/plugins/specweave-ado/lib/ado-spec-sync.d.ts +100 -0
  799. package/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -0
  800. package/plugins/specweave-ado/lib/ado-spec-sync.js +471 -0
  801. package/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -0
  802. package/plugins/specweave-ado/lib/project-selector.d.js +0 -0
  803. package/plugins/specweave-github/.claude-plugin/plugin.json +2 -1
  804. package/plugins/specweave-github/hooks/README.md +280 -0
  805. package/plugins/specweave-github/hooks/hooks.json +15 -0
  806. package/plugins/specweave-github/hooks/post-task-completion.sh +241 -0
  807. package/plugins/specweave-github/lib/cli-sync-increment-changes.d.js +1 -0
  808. package/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +12 -0
  809. package/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +1 -0
  810. package/plugins/specweave-github/lib/cli-sync-increment-changes.js +28 -0
  811. package/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +1 -0
  812. package/plugins/specweave-github/lib/github-board-resolver.d.js +0 -0
  813. package/plugins/specweave-github/lib/github-board-resolver.d.ts +54 -0
  814. package/plugins/specweave-github/lib/github-board-resolver.d.ts.map +1 -0
  815. package/plugins/specweave-github/lib/github-board-resolver.js +122 -0
  816. package/plugins/specweave-github/lib/github-board-resolver.js.map +1 -0
  817. package/plugins/specweave-github/lib/github-client-v2.d.js +0 -0
  818. package/plugins/specweave-github/lib/github-client-v2.d.ts +104 -0
  819. package/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -0
  820. package/plugins/specweave-github/lib/github-client-v2.js +408 -0
  821. package/plugins/specweave-github/lib/github-client-v2.js.map +1 -0
  822. package/plugins/specweave-github/lib/github-client.d.js +0 -0
  823. package/plugins/specweave-github/lib/github-client.d.ts +96 -0
  824. package/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
  825. package/plugins/specweave-github/lib/github-client.js +299 -0
  826. package/plugins/specweave-github/lib/github-client.js.map +1 -0
  827. package/plugins/specweave-github/lib/github-hierarchical-sync.d.js +0 -0
  828. package/plugins/specweave-github/lib/github-hierarchical-sync.d.ts +29 -0
  829. package/plugins/specweave-github/lib/github-hierarchical-sync.d.ts.map +1 -0
  830. package/plugins/specweave-github/lib/github-hierarchical-sync.js +268 -0
  831. package/plugins/specweave-github/lib/github-hierarchical-sync.js.map +1 -0
  832. package/plugins/specweave-github/lib/github-issue-updater.d.js +0 -0
  833. package/plugins/specweave-github/lib/github-issue-updater.d.ts +61 -0
  834. package/plugins/specweave-github/lib/github-issue-updater.d.ts.map +1 -0
  835. package/plugins/specweave-github/lib/github-issue-updater.js +327 -0
  836. package/plugins/specweave-github/lib/github-issue-updater.js.map +1 -0
  837. package/plugins/specweave-github/lib/github-spec-sync.d.js +0 -0
  838. package/plugins/specweave-github/lib/github-spec-sync.d.ts +108 -0
  839. package/plugins/specweave-github/lib/github-spec-sync.d.ts.map +1 -0
  840. package/plugins/specweave-github/lib/github-spec-sync.js +505 -0
  841. package/plugins/specweave-github/lib/github-spec-sync.js.map +1 -0
  842. package/plugins/specweave-github/lib/github-sync-bidirectional.d.js +0 -0
  843. package/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +36 -0
  844. package/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -0
  845. package/plugins/specweave-github/lib/github-sync-bidirectional.js +228 -0
  846. package/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -0
  847. package/plugins/specweave-github/lib/github-sync-increment-changes.d.js +0 -0
  848. package/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +18 -0
  849. package/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +1 -0
  850. package/plugins/specweave-github/lib/github-sync-increment-changes.js +287 -0
  851. package/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -0
  852. package/plugins/specweave-github/lib/index.d.js +11 -0
  853. package/plugins/specweave-github/lib/index.d.ts +10 -0
  854. package/plugins/specweave-github/lib/index.d.ts.map +1 -0
  855. package/plugins/specweave-github/lib/index.js +10 -0
  856. package/plugins/specweave-github/lib/index.js.map +1 -0
  857. package/plugins/specweave-github/lib/repo-selector.d.js +0 -0
  858. package/plugins/specweave-github/lib/repo-selector.d.ts +49 -0
  859. package/plugins/specweave-github/lib/repo-selector.d.ts.map +1 -0
  860. package/plugins/specweave-github/lib/repo-selector.js +216 -0
  861. package/plugins/specweave-github/lib/repo-selector.js.map +1 -0
  862. package/plugins/specweave-github/lib/subtask-sync.d.js +0 -0
  863. package/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
  864. package/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
  865. package/plugins/specweave-github/lib/subtask-sync.js +147 -0
  866. package/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
  867. package/plugins/specweave-github/lib/task-parser.d.js +0 -0
  868. package/plugins/specweave-github/lib/task-parser.d.ts +37 -0
  869. package/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
  870. package/plugins/specweave-github/lib/task-parser.js +211 -0
  871. package/plugins/specweave-github/lib/task-parser.js.map +1 -0
  872. package/plugins/specweave-github/lib/task-sync.d.js +0 -0
  873. package/plugins/specweave-github/lib/task-sync.d.ts +51 -0
  874. package/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
  875. package/plugins/specweave-github/lib/task-sync.js +332 -0
  876. package/plugins/specweave-github/lib/task-sync.js.map +1 -0
  877. package/plugins/specweave-github/lib/types.d.js +0 -0
  878. package/plugins/specweave-github/lib/types.d.ts +80 -0
  879. package/plugins/specweave-github/lib/types.d.ts.map +1 -0
  880. package/plugins/specweave-github/lib/types.js +5 -0
  881. package/plugins/specweave-github/lib/types.js.map +1 -0
  882. package/plugins/specweave-jira/.claude-plugin/plugin.json +2 -1
  883. package/plugins/specweave-jira/hooks/README.md +201 -0
  884. package/plugins/specweave-jira/hooks/hooks.json +15 -0
  885. package/plugins/specweave-jira/hooks/post-task-completion.sh +150 -0
  886. package/plugins/specweave-jira/lib/jira-board-resolver.d.js +0 -0
  887. package/plugins/specweave-jira/lib/jira-board-resolver.d.ts +50 -0
  888. package/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +1 -0
  889. package/plugins/specweave-jira/lib/jira-board-resolver.js +84 -0
  890. package/plugins/specweave-jira/lib/jira-board-resolver.js.map +1 -0
  891. package/plugins/specweave-jira/lib/jira-hierarchical-sync.d.js +0 -0
  892. package/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts +33 -0
  893. package/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts.map +1 -0
  894. package/plugins/specweave-jira/lib/jira-hierarchical-sync.js +206 -0
  895. package/plugins/specweave-jira/lib/jira-hierarchical-sync.js.map +1 -0
  896. package/plugins/specweave-jira/lib/jira-spec-sync.d.js +0 -0
  897. package/plugins/specweave-jira/lib/jira-spec-sync.d.ts +105 -0
  898. package/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -0
  899. package/plugins/specweave-jira/lib/jira-spec-sync.js +456 -0
  900. package/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -0
  901. package/plugins/specweave-jira/lib/project-selector.d.js +0 -0
  902. package/plugins/specweave-jira/lib/project-selector.d.ts +42 -0
  903. package/plugins/specweave-jira/lib/project-selector.d.ts.map +1 -0
  904. package/plugins/specweave-jira/lib/project-selector.js +216 -0
  905. package/plugins/specweave-jira/lib/project-selector.js.map +1 -0
  906. package/plugins/specweave-jira/lib/reorganization-detector.d.js +0 -0
  907. package/plugins/specweave-jira/lib/reorganization-detector.d.ts +67 -0
  908. package/plugins/specweave-jira/lib/reorganization-detector.d.ts.map +1 -0
  909. package/plugins/specweave-jira/lib/reorganization-detector.js +252 -0
  910. package/plugins/specweave-jira/lib/reorganization-detector.js.map +1 -0
  911. package/plugins/specweave-jira/lib/setup-wizard.d.js +4 -0
  912. package/plugins/specweave-jira/lib/setup-wizard.d.ts +29 -0
  913. package/plugins/specweave-jira/lib/setup-wizard.d.ts.map +1 -0
  914. package/plugins/specweave-jira/lib/setup-wizard.js +219 -0
  915. package/plugins/specweave-jira/lib/setup-wizard.js.map +1 -0
  916. package/src/templates/CLAUDE.md.template +41 -0
@@ -0,0 +1,1444 @@
1
+ import fs from 'fs-extra';
2
+ import * as path from 'path';
3
+ import chalk from 'chalk';
4
+ import ora from 'ora';
5
+ import inquirer from 'inquirer';
6
+ import { execFileNoThrowSync } from '../../utils/execFileNoThrow.js';
7
+ import { detectClaudeCli, getClaudeCliDiagnostic, getClaudeCliSuggestions } from '../../utils/claude-cli-detector.js';
8
+ import { AdapterLoader } from '../../adapters/adapter-loader.js';
9
+ import { ClaudeMdGenerator } from '../../adapters/claude-md-generator.js';
10
+ import { AgentsMdGenerator } from '../../adapters/agents-md-generator.js';
11
+ import { getDirname } from '../../utils/esm-helpers.js';
12
+ import { LanguageManager, isLanguageSupported, getSupportedLanguages, getSystemPromptForLanguage } from '../../core/i18n/language-manager.js';
13
+ import { getLocaleManager } from '../../core/i18n/locale-manager.js';
14
+ const __dirname = getDirname(import.meta.url);
15
+ /**
16
+ * Detect if we're in the SpecWeave framework repository itself
17
+ * (development mode vs. user project mode)
18
+ *
19
+ * @param targetDir - Directory to check
20
+ * @returns true if this is the SpecWeave framework repo
21
+ */
22
+ async function isSpecWeaveFrameworkRepo(targetDir) {
23
+ try {
24
+ const packageJsonPath = path.join(targetDir, 'package.json');
25
+ if (!fs.existsSync(packageJsonPath)) {
26
+ return false;
27
+ }
28
+ const packageJson = await fs.readJson(packageJsonPath);
29
+ // Check if this is the specweave package itself
30
+ return packageJson.name === 'specweave';
31
+ }
32
+ catch (error) {
33
+ return false;
34
+ }
35
+ }
36
+ export async function initCommand(projectName, options = {}) {
37
+ // Validate and normalize language option
38
+ const language = options.language?.toLowerCase() || 'en';
39
+ // Validate language if provided
40
+ if (options.language && !isLanguageSupported(language)) {
41
+ const locale = getLocaleManager('en'); // Use English for error messages about invalid language
42
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.invalidLanguage', { language: options.language })}`));
43
+ console.error(chalk.yellow(`${locale.t('cli', 'init.errors.supportedLanguages', { languages: getSupportedLanguages().join(', ') })}\n`));
44
+ process.exit(1);
45
+ }
46
+ // Initialize LanguageManager and LocaleManager
47
+ const i18n = new LanguageManager({ defaultLanguage: language });
48
+ const locale = getLocaleManager(language);
49
+ // Display welcome message in user's language
50
+ console.log(chalk.blue.bold(`\n${locale.t('cli', 'init.welcome')}\n`));
51
+ let targetDir;
52
+ let finalProjectName;
53
+ let usedDotNotation = false;
54
+ let continueExisting = false; // Track if user chose to continue with existing project
55
+ // Handle "." for current directory initialization
56
+ if (projectName === '.') {
57
+ usedDotNotation = true;
58
+ targetDir = process.cwd();
59
+ const dirName = path.basename(targetDir);
60
+ // Validate directory name is suitable for project name
61
+ if (!/^[a-z0-9-]+$/.test(dirName)) {
62
+ console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.invalidDirName', { dirName })}`));
63
+ const suggestedName = dirName.toLowerCase().replace(/[^a-z0-9-]/g, '-');
64
+ const { name } = await inquirer.prompt([
65
+ {
66
+ type: 'input',
67
+ name: 'name',
68
+ message: 'Project name (for templates):',
69
+ default: suggestedName,
70
+ validate: (input) => {
71
+ if (/^[a-z0-9-]+$/.test(input))
72
+ return true;
73
+ return 'Project name must be lowercase letters, numbers, and hyphens only';
74
+ },
75
+ },
76
+ ]);
77
+ finalProjectName = name;
78
+ }
79
+ else {
80
+ finalProjectName = dirName;
81
+ }
82
+ // Safety: Warn if directory is not empty
83
+ const allFiles = fs.readdirSync(targetDir);
84
+ const existingFiles = allFiles.filter(f => !f.startsWith('.')); // Ignore hidden files
85
+ if (existingFiles.length > 0) {
86
+ console.log(chalk.yellow(`\n${locale.t('cli', 'init.warnings.directoryNotEmpty', { count: existingFiles.length, plural: existingFiles.length === 1 ? '' : 's' })}`));
87
+ const { confirm } = await inquirer.prompt([
88
+ {
89
+ type: 'confirm',
90
+ name: 'confirm',
91
+ message: 'Initialize SpecWeave in current directory?',
92
+ default: false,
93
+ },
94
+ ]);
95
+ if (!confirm) {
96
+ console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
97
+ process.exit(0);
98
+ }
99
+ }
100
+ // Check if .specweave already exists - SMART RE-INITIALIZATION
101
+ if (fs.existsSync(path.join(targetDir, '.specweave'))) {
102
+ console.log(chalk.blue('\n📦 Existing SpecWeave project detected!'));
103
+ console.log(chalk.gray(' Found .specweave/ folder with your increments, docs, and configuration.\n'));
104
+ const { action } = await inquirer.prompt([
105
+ {
106
+ type: 'list',
107
+ name: 'action',
108
+ message: 'What would you like to do?',
109
+ choices: [
110
+ {
111
+ name: '✨ Continue working (keep all existing increments, docs, and history)',
112
+ value: 'continue',
113
+ short: 'Continue'
114
+ },
115
+ {
116
+ name: '🔄 Fresh start (delete .specweave/ and start from scratch)',
117
+ value: 'fresh',
118
+ short: 'Fresh start'
119
+ },
120
+ {
121
+ name: '❌ Cancel (exit without changes)',
122
+ value: 'cancel',
123
+ short: 'Cancel'
124
+ }
125
+ ],
126
+ default: 'continue'
127
+ },
128
+ ]);
129
+ if (action === 'cancel') {
130
+ console.log(chalk.yellow('\n⏸️ Initialization cancelled. No changes made.'));
131
+ process.exit(0);
132
+ }
133
+ if (action === 'fresh') {
134
+ console.log(chalk.yellow('\n⚠️ WARNING: This will DELETE all increments, docs, and configuration!'));
135
+ const { confirmFresh } = await inquirer.prompt([
136
+ {
137
+ type: 'confirm',
138
+ name: 'confirmFresh',
139
+ message: 'Are you sure you want to start fresh? (all .specweave/ content will be lost)',
140
+ default: false,
141
+ },
142
+ ]);
143
+ if (!confirmFresh) {
144
+ console.log(chalk.yellow('\n⏸️ Fresh start cancelled. No changes made.'));
145
+ process.exit(0);
146
+ }
147
+ // Delete .specweave/ and .claude/ for fresh start
148
+ fs.removeSync(path.join(targetDir, '.specweave'));
149
+ console.log(chalk.blue(' ♻️ Removed .specweave/ (fresh start)'));
150
+ if (fs.existsSync(path.join(targetDir, '.claude'))) {
151
+ fs.removeSync(path.join(targetDir, '.claude'));
152
+ console.log(chalk.blue(' ♻️ Removed .claude/ (will recreate with marketplace settings)'));
153
+ }
154
+ console.log(chalk.green(' ✅ Starting fresh - will create new .specweave/ structure\n'));
155
+ }
156
+ else {
157
+ // Continue working - keep everything, just refresh config if needed
158
+ continueExisting = true;
159
+ console.log(chalk.green('\n✅ Continuing with existing project'));
160
+ console.log(chalk.gray(' → Keeping all increments, docs, and history'));
161
+ console.log(chalk.gray(' → Will refresh .claude/settings.json (marketplace registration)'));
162
+ console.log(chalk.gray(' → Config will be updated if needed\n'));
163
+ // Refresh .claude/settings.json (marketplace registration)
164
+ // This ensures marketplace is always up-to-date even when continuing
165
+ if (!fs.existsSync(path.join(targetDir, '.claude'))) {
166
+ fs.mkdirSync(path.join(targetDir, '.claude'), { recursive: true });
167
+ }
168
+ }
169
+ }
170
+ }
171
+ else {
172
+ // Original behavior: create subdirectory
173
+ // 1. Get project name if not provided
174
+ if (!projectName) {
175
+ const answers = await inquirer.prompt([
176
+ {
177
+ type: 'input',
178
+ name: 'projectName',
179
+ message: 'Project name:',
180
+ default: 'my-saas',
181
+ validate: (input) => {
182
+ if (/^[a-z0-9-]+$/.test(input))
183
+ return true;
184
+ return 'Project name must be lowercase letters, numbers, and hyphens only';
185
+ },
186
+ },
187
+ ]);
188
+ projectName = answers.projectName;
189
+ }
190
+ targetDir = path.resolve(process.cwd(), projectName);
191
+ finalProjectName = projectName;
192
+ // 2. Check if directory exists
193
+ if (fs.existsSync(targetDir)) {
194
+ // Brownfield-safe: Check what's in the directory
195
+ const allFiles = fs.readdirSync(targetDir);
196
+ const existingFiles = allFiles.filter(f => !f.startsWith('.')); // Ignore hidden files
197
+ const hasSpecweave = fs.existsSync(path.join(targetDir, '.specweave'));
198
+ if (existingFiles.length > 0 || hasSpecweave) {
199
+ console.log(chalk.yellow(`\nDirectory ${projectName} exists with ${existingFiles.length} file(s).`));
200
+ if (hasSpecweave) {
201
+ // SMART RE-INITIALIZATION (same as current directory case)
202
+ console.log(chalk.blue('\n📦 Existing SpecWeave project detected!'));
203
+ console.log(chalk.gray(' Found .specweave/ folder with your increments, docs, and configuration.\n'));
204
+ const { action } = await inquirer.prompt([
205
+ {
206
+ type: 'list',
207
+ name: 'action',
208
+ message: 'What would you like to do?',
209
+ choices: [
210
+ {
211
+ name: '✨ Continue working (keep all existing increments, docs, and history)',
212
+ value: 'continue',
213
+ short: 'Continue'
214
+ },
215
+ {
216
+ name: '🔄 Fresh start (delete .specweave/ and start from scratch)',
217
+ value: 'fresh',
218
+ short: 'Fresh start'
219
+ },
220
+ {
221
+ name: '❌ Cancel (exit without changes)',
222
+ value: 'cancel',
223
+ short: 'Cancel'
224
+ }
225
+ ],
226
+ default: 'continue'
227
+ },
228
+ ]);
229
+ if (action === 'cancel') {
230
+ console.log(chalk.yellow('\n⏸️ Initialization cancelled. No changes made.'));
231
+ process.exit(0);
232
+ }
233
+ if (action === 'fresh') {
234
+ console.log(chalk.yellow('\n⚠️ WARNING: This will DELETE all increments, docs, and configuration!'));
235
+ const { confirmFresh } = await inquirer.prompt([
236
+ {
237
+ type: 'confirm',
238
+ name: 'confirmFresh',
239
+ message: 'Are you sure you want to start fresh? (all .specweave/ content will be lost)',
240
+ default: false,
241
+ },
242
+ ]);
243
+ if (!confirmFresh) {
244
+ console.log(chalk.yellow('\n⏸️ Fresh start cancelled. No changes made.'));
245
+ process.exit(0);
246
+ }
247
+ // Delete .specweave/ and .claude/ for fresh start
248
+ fs.removeSync(path.join(targetDir, '.specweave'));
249
+ console.log(chalk.blue(' ♻️ Removed .specweave/ (fresh start)'));
250
+ if (fs.existsSync(path.join(targetDir, '.claude'))) {
251
+ fs.removeSync(path.join(targetDir, '.claude'));
252
+ console.log(chalk.blue(' ♻️ Removed .claude/ (will recreate with marketplace settings)'));
253
+ }
254
+ console.log(chalk.green(' ✅ Starting fresh - will create new .specweave/ structure\n'));
255
+ }
256
+ else {
257
+ // Continue working - keep everything, just refresh config if needed
258
+ continueExisting = true;
259
+ console.log(chalk.green('\n✅ Continuing with existing project'));
260
+ console.log(chalk.gray(' → Keeping all increments, docs, and history'));
261
+ console.log(chalk.gray(' → Will refresh .claude/settings.json (marketplace registration)'));
262
+ console.log(chalk.gray(' → Config will be updated if needed\n'));
263
+ // Refresh .claude/settings.json (marketplace registration)
264
+ if (!fs.existsSync(path.join(targetDir, '.claude'))) {
265
+ fs.mkdirSync(path.join(targetDir, '.claude'), { recursive: true });
266
+ }
267
+ }
268
+ }
269
+ else {
270
+ // No .specweave/ folder, just brownfield directory with files
271
+ const { initExisting } = await inquirer.prompt([
272
+ {
273
+ type: 'confirm',
274
+ name: 'initExisting',
275
+ message: 'Initialize SpecWeave in existing directory (non-destructive)?',
276
+ default: false,
277
+ },
278
+ ]);
279
+ if (!initExisting) {
280
+ console.log(chalk.yellow(locale.t('cli', 'init.errors.cancelled')));
281
+ process.exit(0);
282
+ }
283
+ console.log(chalk.green(' ✅ Initializing in existing directory (brownfield-safe)\n'));
284
+ }
285
+ }
286
+ }
287
+ else {
288
+ fs.mkdirSync(targetDir, { recursive: true });
289
+ }
290
+ }
291
+ // 3. Check for nested .specweave/ (CRITICAL: prevent nested folders)
292
+ const parentSpecweaveFolders = detectNestedSpecweave(targetDir);
293
+ if (parentSpecweaveFolders && parentSpecweaveFolders.length > 0) {
294
+ console.log('');
295
+ console.log(chalk.red.bold(locale.t('cli', 'init.errors.nestedNotSupported')));
296
+ console.log('');
297
+ // Show all found .specweave/ folders
298
+ if (parentSpecweaveFolders.length === 1) {
299
+ console.log(chalk.yellow(` ${locale.t('cli', 'init.errors.parentFound')}`));
300
+ console.log(chalk.white(` ${parentSpecweaveFolders[0].path}`));
301
+ }
302
+ else {
303
+ console.log(chalk.yellow(` Found ${parentSpecweaveFolders.length} parent .specweave/ folders:`));
304
+ console.log('');
305
+ // Sort by depth (closest first)
306
+ const sortedFolders = [...parentSpecweaveFolders].sort((a, b) => a.depth - b.depth);
307
+ sortedFolders.forEach((folder, index) => {
308
+ const marker = index === 0 ? chalk.green('✓ CLOSEST') : chalk.gray(` ${folder.depth} level${folder.depth > 1 ? 's' : ''} up`);
309
+ console.log(` ${marker}: ${chalk.white(folder.path)}`);
310
+ });
311
+ }
312
+ console.log('');
313
+ console.log(chalk.cyan(` ${locale.t('cli', 'init.info.nestedEnforcement')}`));
314
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet1')}`));
315
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet2')}`));
316
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.nestedBullet3')}`));
317
+ console.log('');
318
+ // Suggest using the CLOSEST folder (most relevant)
319
+ const closestFolder = parentSpecweaveFolders.reduce((closest, current) => current.depth < closest.depth ? current : closest);
320
+ console.log(chalk.cyan(` ${locale.t('cli', 'init.info.nestedToFix')}`));
321
+ console.log(chalk.green.bold(` Recommended: Use the CLOSEST .specweave/ folder`));
322
+ console.log(chalk.white(` ${locale.t('cli', 'init.nestedCdCommand', { path: closestFolder.path })}`));
323
+ console.log(chalk.white(` ${locale.t('cli', 'init.nestedIncCommand')}`));
324
+ console.log('');
325
+ // Provide cleanup option if user has multiple unnecessary folders
326
+ if (parentSpecweaveFolders.length > 1) {
327
+ console.log(chalk.yellow.bold(` 💡 Tip: Multiple .specweave/ folders detected`));
328
+ console.log(chalk.gray(` If some are unnecessary, consider removing them:`));
329
+ console.log('');
330
+ parentSpecweaveFolders.forEach(folder => {
331
+ console.log(chalk.gray(` rm -rf "${folder.path}/.specweave" # Remove if not needed`));
332
+ });
333
+ console.log('');
334
+ }
335
+ process.exit(1);
336
+ }
337
+ const spinner = ora('Creating SpecWeave project...').start();
338
+ try {
339
+ // 4. Detect or select tool
340
+ const adapterLoader = new AdapterLoader();
341
+ let toolName;
342
+ if (options.adapter) {
343
+ // User explicitly chose a tool via --adapter flag
344
+ toolName = options.adapter;
345
+ spinner.text = `Using ${toolName}...`;
346
+ }
347
+ else {
348
+ // SMART CHECK: If continuing existing project, read existing adapter from config
349
+ let existingAdapter = null;
350
+ if (continueExisting) {
351
+ const existingConfigPath = path.join(targetDir, '.specweave', 'config.json');
352
+ if (fs.existsSync(existingConfigPath)) {
353
+ try {
354
+ const existingConfig = fs.readJsonSync(existingConfigPath);
355
+ existingAdapter = existingConfig?.adapters?.default || null;
356
+ }
357
+ catch (error) {
358
+ // Invalid config, will proceed with detection
359
+ }
360
+ }
361
+ }
362
+ // Detect tool and always ask user (even if matches existing config)
363
+ const detectedTool = await adapterLoader.detectTool();
364
+ spinner.stop();
365
+ console.log('');
366
+ console.log(chalk.cyan(`🔍 ${locale.t('cli', 'init.toolDetection.header')}`));
367
+ // Show existing adapter if present
368
+ if (existingAdapter) {
369
+ console.log(chalk.blue(` 📋 Current adapter: ${existingAdapter}`));
370
+ if (existingAdapter === detectedTool) {
371
+ console.log(chalk.gray(` Detected tool matches current config`));
372
+ }
373
+ else {
374
+ console.log(chalk.yellow(` ⚠️ Detected tool (${detectedTool}) differs from config`));
375
+ }
376
+ }
377
+ else {
378
+ // No existing adapter (new project)
379
+ if (detectedTool === 'claude') {
380
+ console.log(chalk.gray(` Recommended: ${detectedTool} (no other tool detected)`));
381
+ }
382
+ else {
383
+ console.log(chalk.gray(` ${locale.t('cli', 'init.toolDetection.detected', { tool: detectedTool })}`));
384
+ }
385
+ }
386
+ console.log('');
387
+ // Check if running in CI/non-interactive environment
388
+ const isCI = process.env.CI === 'true' ||
389
+ process.env.GITHUB_ACTIONS === 'true' ||
390
+ process.env.GITLAB_CI === 'true' ||
391
+ process.env.CIRCLECI === 'true' ||
392
+ !process.stdin.isTTY;
393
+ let confirmTool = true; // Default to yes
394
+ if (isCI) {
395
+ // In CI, automatically use detected tool without prompting
396
+ console.log(chalk.gray(` ${locale.t('cli', 'init.toolDetection.ciAutoConfirm', { tool: detectedTool })}`));
397
+ toolName = detectedTool;
398
+ }
399
+ else {
400
+ // Interactive mode - ask for confirmation
401
+ const response = await inquirer.prompt([
402
+ {
403
+ type: 'confirm',
404
+ name: 'confirmTool',
405
+ message: locale.t('cli', 'init.toolDetection.confirmPrompt', { tool: detectedTool }),
406
+ default: true
407
+ }
408
+ ]);
409
+ confirmTool = response.confirmTool;
410
+ }
411
+ if (!confirmTool) {
412
+ // Let user choose from available tools
413
+ const { selectedTool } = await inquirer.prompt([
414
+ {
415
+ type: 'list',
416
+ name: 'selectedTool',
417
+ message: locale.t('cli', 'init.toolDetection.selectPrompt'),
418
+ choices: [
419
+ { name: `Claude Code (Recommended - Full automation)`, value: 'claude' },
420
+ { name: 'Cursor (Partial - AGENTS.md compilation, team commands, less reliable)', value: 'cursor' },
421
+ { name: 'Other (Copilot, ChatGPT, Gemini - Limited: no hooks, manual workflow, high context usage)', value: 'generic' }
422
+ ]
423
+ }
424
+ ]);
425
+ toolName = selectedTool;
426
+ }
427
+ else {
428
+ // User confirmed detected tool
429
+ toolName = detectedTool;
430
+ }
431
+ spinner.start(`Using ${toolName}...`);
432
+ }
433
+ // 4. Create directory structure (adapter-specific)
434
+ // Skip if continuing with existing project (directories already exist)
435
+ if (!continueExisting) {
436
+ createDirectoryStructure(targetDir, toolName);
437
+ spinner.text = 'Directory structure created...';
438
+ }
439
+ else {
440
+ spinner.text = 'Using existing directory structure...';
441
+ }
442
+ // 5. Configure GitHub marketplace for Claude Code
443
+ // ✅ NEW APPROACH: Claude Code fetches plugins from GitHub (no local copying!)
444
+ if (toolName === 'claude') {
445
+ try {
446
+ spinner.text = 'Configuring GitHub marketplace...';
447
+ // Settings.json will be created by setupClaudePluginAutoRegistration()
448
+ // No need to copy marketplace or plugins - everything is fetched from GitHub
449
+ spinner.succeed('GitHub marketplace configured');
450
+ console.log(chalk.gray(` ✓ Marketplace: github.com/anton-abyzov/specweave/.claude-plugin`));
451
+ console.log(chalk.gray(` ✓ Plugins fetch on-demand (no local copies = faster init)`));
452
+ }
453
+ catch (error) {
454
+ // Log errors in debug mode for troubleshooting
455
+ if (process.env.DEBUG) {
456
+ spinner.stop();
457
+ console.error(chalk.red(`\n❌ Marketplace setup error: ${error instanceof Error ? error.message : String(error)}`));
458
+ if (error instanceof Error && error.stack) {
459
+ console.error(chalk.gray(error.stack));
460
+ }
461
+ spinner.start();
462
+ }
463
+ console.warn(chalk.yellow(`\n${locale.t('cli', 'init.warnings.marketplaceCopyFailed')}`));
464
+ }
465
+ }
466
+ // 6. Copy base templates (config, README, CLAUDE.md - same for all)
467
+ // Skip if continuing with existing project (files already exist)
468
+ if (!continueExisting) {
469
+ const templatesDir = findSourceDir('templates');
470
+ await copyTemplates(templatesDir, targetDir, finalProjectName, language);
471
+ spinner.text = 'Base templates copied...';
472
+ }
473
+ else {
474
+ spinner.text = 'Skipping template copying (using existing files)...';
475
+ }
476
+ // 6. Install based on tool
477
+ if (toolName === 'claude') {
478
+ // DEFAULT: Native Claude Code plugins (installed globally via /plugin install)
479
+ // No per-project copying needed - plugins work across all projects!
480
+ spinner.text = 'Configuring for Claude Code...';
481
+ console.log(`\n${locale.t('cli', 'init.claudeNativeComplete')}`);
482
+ console.log(` ${locale.t('cli', 'init.claudeNativeBenefits')}`);
483
+ }
484
+ else {
485
+ // Use adapter for non-Claude tools
486
+ spinner.text = `Installing ${toolName} adapter...`;
487
+ const adapter = adapterLoader.getAdapter(toolName);
488
+ if (!adapter) {
489
+ throw new Error(`Adapter not found: ${toolName}`);
490
+ }
491
+ await adapterLoader.checkRequirements(toolName);
492
+ await adapter.install({
493
+ projectPath: targetDir,
494
+ projectName: finalProjectName,
495
+ techStack: options.techStack ? { language: options.techStack } : undefined,
496
+ docsApproach: 'incremental'
497
+ });
498
+ // 6. Copy plugins/ folder for non-Claude adapters
499
+ // CRITICAL: Copilot/Cursor/Generic need local plugins/ folder!
500
+ // AGENTS.md instructs AI to read plugins/specweave/commands/*.md
501
+ // Without this folder, those commands don't exist in the project!
502
+ if (toolName !== 'claude') {
503
+ spinner.start('Copying plugins folder for command execution...');
504
+ try {
505
+ const specweavePackageRoot = findPackageRoot(__dirname);
506
+ if (specweavePackageRoot) {
507
+ const sourcePluginsDir = path.join(specweavePackageRoot, 'plugins');
508
+ const targetPluginsDir = path.join(targetDir, 'plugins');
509
+ if (fs.existsSync(sourcePluginsDir)) {
510
+ // Copy entire plugins/ folder from SpecWeave package to user project
511
+ fs.copySync(sourcePluginsDir, targetPluginsDir, {
512
+ overwrite: true,
513
+ filter: (src) => {
514
+ // Exclude .DS_Store and other hidden files
515
+ const basename = path.basename(src);
516
+ return !basename.startsWith('.');
517
+ }
518
+ });
519
+ spinner.succeed('Plugins folder copied successfully');
520
+ console.log(chalk.green(' ✔ AI can now execute SpecWeave commands'));
521
+ console.log(chalk.gray(' → Copilot/Cursor will read plugins/specweave/commands/*.md'));
522
+ }
523
+ else {
524
+ spinner.warn('Could not find plugins/ in SpecWeave package');
525
+ console.log(chalk.yellow(' → Command execution may not work without plugins/ folder'));
526
+ }
527
+ }
528
+ else {
529
+ spinner.warn('Could not locate SpecWeave package');
530
+ console.log(chalk.yellow(' → Skipping plugins/ folder copy'));
531
+ }
532
+ }
533
+ catch (error) {
534
+ spinner.warn('Could not copy plugins folder');
535
+ console.log(chalk.yellow(` ${error instanceof Error ? error.message : error}`));
536
+ }
537
+ }
538
+ // 7. Install core plugin for non-Claude adapters
539
+ // CRITICAL: Cursor/Copilot/Generic need plugin files in project!
540
+ // Claude uses plugin system (global), but others need local files for AGENTS.md/instructions.md
541
+ try {
542
+ spinner.start('Installing SpecWeave core plugin...');
543
+ // Load core plugin from plugins/specweave/
544
+ const corePluginPath = findSourceDir('plugins/specweave');
545
+ const { PluginLoader } = await import('../../core/plugin-loader.js');
546
+ const loader = new PluginLoader();
547
+ const corePlugin = await loader.loadFromDirectory(corePluginPath);
548
+ // Compile for adapter (Cursor → AGENTS.md, Copilot → instructions.md, etc.)
549
+ if (adapter.supportsPlugins()) {
550
+ await adapter.compilePlugin(corePlugin);
551
+ spinner.succeed('SpecWeave core plugin installed');
552
+ console.log(chalk.green(' ✔ Skills, agents, commands added to project'));
553
+ console.log(chalk.gray(` → ${corePlugin.skills.length} skills, ${corePlugin.agents.length} agents, ${corePlugin.commands.length} commands`));
554
+ }
555
+ else {
556
+ spinner.warn('Adapter does not support plugins');
557
+ console.log(chalk.yellow(' → Core functionality may be limited'));
558
+ }
559
+ }
560
+ catch (error) {
561
+ spinner.warn('Could not install core plugin');
562
+ console.log(chalk.yellow(` ${error instanceof Error ? error.message : error}`));
563
+ console.log(chalk.gray(' → You can manually reference plugin files if needed'));
564
+ }
565
+ }
566
+ // 9. Initialize git (skip if .git already exists)
567
+ const gitDir = path.join(targetDir, '.git');
568
+ if (!fs.existsSync(gitDir)) {
569
+ // Use secure command execution for git commands
570
+ const gitInitResult = execFileNoThrowSync('git', ['init'], { cwd: targetDir, shell: false });
571
+ if (gitInitResult.success) {
572
+ spinner.text = 'Git repository initialized...';
573
+ }
574
+ else {
575
+ spinner.warn('Git initialization skipped (git not found)');
576
+ }
577
+ // 10. Create initial commit (if git init succeeded)
578
+ if (gitInitResult.success) {
579
+ const gitAddResult = execFileNoThrowSync('git', ['add', '.'], { cwd: targetDir, shell: false });
580
+ if (gitAddResult.success) {
581
+ const gitCommitResult = execFileNoThrowSync('git', [
582
+ 'commit',
583
+ '-m',
584
+ 'Initial commit with SpecWeave'
585
+ ], { cwd: targetDir, shell: false });
586
+ if (gitCommitResult.success) {
587
+ spinner.text = 'Initial commit created...';
588
+ }
589
+ // Git commit might fail if no user configured - that's ok, no need to warn
590
+ }
591
+ }
592
+ }
593
+ else {
594
+ spinner.text = 'Using existing Git repository...';
595
+ }
596
+ spinner.succeed('SpecWeave project created successfully!');
597
+ // 11. Show tool-specific next steps
598
+ if (toolName !== 'claude') {
599
+ const adapter = adapterLoader.getAdapter(toolName);
600
+ if (adapter) {
601
+ await adapter.postInstall({
602
+ projectPath: targetDir,
603
+ projectName: finalProjectName,
604
+ techStack: options.techStack ? { language: options.techStack } : undefined,
605
+ docsApproach: 'incremental'
606
+ });
607
+ }
608
+ }
609
+ // 13. Create config.json with language setting
610
+ createConfigFile(targetDir, finalProjectName, toolName, language, false);
611
+ // 14. Setup Claude Code plugin auto-registration (if Claude detected)
612
+ let autoInstallSucceeded = false;
613
+ if (toolName === 'claude') {
614
+ try {
615
+ setupClaudePluginAutoRegistration(targetDir, language);
616
+ }
617
+ catch (error) {
618
+ // Non-critical - show manual instructions in next steps
619
+ console.warn(chalk.yellow(`\n${locale.t('cli', 'init.warnings.pluginAutoSetupFailed')}`));
620
+ }
621
+ // 15. AUTO-INSTALL ALL PLUGINS via Claude CLI (Breaking Change: No selective loading)
622
+ // Pre-flight check: Is Claude CLI available? (ROBUST CHECK)
623
+ const claudeStatus = detectClaudeCli();
624
+ if (!claudeStatus.available) {
625
+ // Claude CLI NOT working → explain clearly with actionable diagnostics
626
+ const diagnostic = getClaudeCliDiagnostic(claudeStatus);
627
+ const suggestions = getClaudeCliSuggestions(claudeStatus);
628
+ spinner.warn(diagnostic);
629
+ console.log('');
630
+ console.log(chalk.yellow.bold('⚠️ Claude Code CLI Issue Detected'));
631
+ console.log('');
632
+ // Show detailed diagnostic info with MORE context
633
+ if (claudeStatus.commandExists) {
634
+ console.log(chalk.white('Found command in PATH, but verification failed:'));
635
+ console.log('');
636
+ if (claudeStatus.commandPath) {
637
+ console.log(chalk.gray(` Path: ${claudeStatus.commandPath}`));
638
+ }
639
+ if (claudeStatus.exitCode !== undefined) {
640
+ console.log(chalk.gray(` Exit code: ${claudeStatus.exitCode}`));
641
+ }
642
+ console.log(chalk.gray(` Issue: ${claudeStatus.error}`));
643
+ console.log('');
644
+ // Explain what this likely means
645
+ if (claudeStatus.error === 'version_check_failed') {
646
+ console.log(chalk.yellow('⚠️ This likely means:'));
647
+ console.log(chalk.gray(' • You have a DIFFERENT tool named "claude" in PATH'));
648
+ console.log(chalk.gray(' • It\'s not the Claude Code CLI from Anthropic'));
649
+ console.log(chalk.gray(' • The command exists but doesn\'t respond to --version'));
650
+ }
651
+ }
652
+ else {
653
+ console.log(chalk.white('Claude CLI not found in PATH'));
654
+ }
655
+ console.log('');
656
+ // Show actionable suggestions
657
+ console.log(chalk.cyan('💡 How to fix:'));
658
+ console.log('');
659
+ suggestions.forEach(suggestion => {
660
+ console.log(chalk.gray(` ${suggestion}`));
661
+ });
662
+ console.log('');
663
+ // Only show alternatives if user is NOT using Claude already
664
+ if (claudeStatus.error === 'command_not_found') {
665
+ console.log(chalk.cyan('Alternative Options:'));
666
+ console.log('');
667
+ console.log(chalk.white('1️⃣ Use Claude Code IDE (no CLI needed):'));
668
+ console.log(chalk.gray(' → Open this project in Claude Code'));
669
+ console.log(chalk.gray(' → Run: /plugin install specweave'));
670
+ console.log(chalk.gray(' → Works immediately, no npm installation!'));
671
+ console.log('');
672
+ console.log(chalk.white('2️⃣ Use Different AI Tool:'));
673
+ console.log(chalk.gray(' → Run: specweave init --adapter cursor'));
674
+ console.log(chalk.gray(' → Works without Claude CLI'));
675
+ console.log(chalk.gray(' → Less automation but no CLI dependency'));
676
+ console.log('');
677
+ }
678
+ autoInstallSucceeded = false;
679
+ }
680
+ else {
681
+ // Claude CLI available → install ALL plugins from marketplace
682
+ try {
683
+ // Step 1: FORCE marketplace refresh - remove and re-add from GitHub
684
+ spinner.start('Refreshing SpecWeave marketplace...');
685
+ const listResult = execFileNoThrowSync('claude', [
686
+ 'plugin',
687
+ 'marketplace',
688
+ 'list'
689
+ ]);
690
+ const marketplaceExists = listResult.success &&
691
+ (listResult.stdout || '').toLowerCase().includes('specweave');
692
+ if (marketplaceExists) {
693
+ // Always remove existing marketplace to ensure fresh install
694
+ execFileNoThrowSync('claude', [
695
+ 'plugin',
696
+ 'marketplace',
697
+ 'remove',
698
+ 'specweave'
699
+ ]);
700
+ console.log(chalk.blue(' 🔄 Removed existing marketplace'));
701
+ }
702
+ // Add marketplace from GitHub (always fresh)
703
+ const addResult = execFileNoThrowSync('claude', [
704
+ 'plugin',
705
+ 'marketplace',
706
+ 'add',
707
+ 'anton-abyzov/specweave'
708
+ ]);
709
+ if (!addResult.success) {
710
+ throw new Error('Failed to add marketplace from GitHub');
711
+ }
712
+ console.log(chalk.green(' ✔ Marketplace registered from GitHub'));
713
+ spinner.succeed('SpecWeave marketplace refreshed');
714
+ // Step 2: Load marketplace.json to get ALL available plugins
715
+ spinner.start('Loading available plugins...');
716
+ const marketplaceJsonPath = findSourceDir('.claude-plugin/marketplace.json');
717
+ if (!fs.existsSync(marketplaceJsonPath)) {
718
+ throw new Error('marketplace.json not found - cannot determine plugins to install');
719
+ }
720
+ const marketplace = JSON.parse(fs.readFileSync(marketplaceJsonPath, 'utf-8'));
721
+ const allPlugins = marketplace.plugins || [];
722
+ if (allPlugins.length === 0) {
723
+ throw new Error('No plugins found in marketplace.json');
724
+ }
725
+ console.log(chalk.blue(` 📦 Found ${allPlugins.length} plugins to install`));
726
+ spinner.succeed(`Found ${allPlugins.length} plugins`);
727
+ // Step 3: Install ALL plugins (no selective loading!)
728
+ let successCount = 0;
729
+ let failCount = 0;
730
+ const failedPlugins = [];
731
+ for (const plugin of allPlugins) {
732
+ const pluginName = plugin.name;
733
+ spinner.start(`Installing ${pluginName}...`);
734
+ const installResult = execFileNoThrowSync('claude', [
735
+ 'plugin',
736
+ 'install',
737
+ pluginName
738
+ ]);
739
+ if (installResult.success) {
740
+ successCount++;
741
+ spinner.succeed(`${pluginName} installed`);
742
+ }
743
+ else {
744
+ failCount++;
745
+ failedPlugins.push(pluginName);
746
+ spinner.warn(`${pluginName} failed (will continue)`);
747
+ }
748
+ }
749
+ // Step 4: Report results
750
+ console.log('');
751
+ console.log(chalk.green.bold(`✅ Plugin Installation Complete`));
752
+ console.log(chalk.white(` Installed: ${successCount}/${allPlugins.length} plugins`));
753
+ if (failCount > 0) {
754
+ console.log(chalk.yellow(` Failed: ${failCount} plugins`));
755
+ console.log(chalk.gray(` Failed plugins: ${failedPlugins.join(', ')}`));
756
+ console.log(chalk.gray(` → You can install these manually later`));
757
+ }
758
+ console.log('');
759
+ console.log(chalk.cyan('📋 Available capabilities:'));
760
+ console.log(chalk.gray(' • /specweave:increment - Plan new features'));
761
+ console.log(chalk.gray(' • /specweave:do - Execute tasks'));
762
+ console.log(chalk.gray(' • /specweave-github:sync - GitHub integration'));
763
+ console.log(chalk.gray(' • /specweave-jira:sync - JIRA integration'));
764
+ console.log(chalk.gray(' • /specweave:docs preview - Documentation preview'));
765
+ console.log(chalk.gray(' • ...and more!'));
766
+ autoInstallSucceeded = successCount > 0;
767
+ }
768
+ catch (error) {
769
+ // Installation failed - provide helpful diagnostics
770
+ spinner.warn('Could not auto-install plugins');
771
+ console.log('');
772
+ // Diagnose error and provide actionable hints
773
+ if (error.message.includes('not found') || error.message.includes('ENOENT')) {
774
+ console.log(chalk.yellow(' Reason: Claude CLI found but command failed'));
775
+ console.log(chalk.gray(' → Try manually: /plugin install specweave'));
776
+ }
777
+ else if (error.message.includes('EACCES') || error.message.includes('permission')) {
778
+ console.log(chalk.yellow(' Reason: Permission denied'));
779
+ console.log(chalk.gray(' → Check file permissions or run with appropriate access'));
780
+ }
781
+ else if (error.message.includes('ECONNREFUSED') || error.message.includes('network')) {
782
+ console.log(chalk.yellow(' Reason: Network error'));
783
+ console.log(chalk.gray(' → Check internet connection and try again'));
784
+ }
785
+ else if (process.env.DEBUG) {
786
+ console.log(chalk.gray(` Error: ${error.message}`));
787
+ }
788
+ console.log('');
789
+ console.log(chalk.cyan('📦 Manual installation:'));
790
+ console.log(chalk.white(' /plugin install specweave'));
791
+ console.log(chalk.white(' /plugin install specweave-github'));
792
+ console.log(chalk.white(' ...etc.'));
793
+ console.log('');
794
+ autoInstallSucceeded = false;
795
+ }
796
+ }
797
+ // 10.5 Issue Tracker Integration (CRITICAL!)
798
+ // MUST happen AFTER plugin installation is complete
799
+ // Asks user: Which tracker? (GitHub/Jira/ADO/None)
800
+ // Collects credentials and runs smart validation
801
+ //
802
+ // NEW: Always run for ALL projects (including framework repo)
803
+ // Detects existing config and asks user if they want to change it
804
+ const isFrameworkRepo = await isSpecWeaveFrameworkRepo(targetDir);
805
+ try {
806
+ const { setupIssueTracker } = await import('../helpers/issue-tracker/index.js');
807
+ // Check if sync config already exists
808
+ const configPath = path.join(targetDir, '.specweave', 'config.json');
809
+ let existingTracker = null;
810
+ if (fs.existsSync(configPath)) {
811
+ const config = await fs.readJson(configPath);
812
+ if (config.sync?.activeProfile && config.sync?.profiles) {
813
+ const activeProfile = config.sync.profiles[config.sync.activeProfile];
814
+ if (activeProfile?.provider) {
815
+ existingTracker = activeProfile.provider;
816
+ }
817
+ }
818
+ }
819
+ if (existingTracker) {
820
+ // Existing config detected - ask if user wants to reconfigure
821
+ console.log(chalk.blue('\n🔍 Existing Issue Tracker Configuration Detected'));
822
+ console.log(chalk.gray(` Current: ${existingTracker.charAt(0).toUpperCase() + existingTracker.slice(1)}`));
823
+ console.log('');
824
+ const { reconfigure } = await inquirer.prompt([{
825
+ type: 'confirm',
826
+ name: 'reconfigure',
827
+ message: 'Do you want to reconfigure your issue tracker?',
828
+ default: false
829
+ }]);
830
+ if (!reconfigure) {
831
+ console.log(chalk.gray(' ✓ Keeping existing configuration\n'));
832
+ }
833
+ else {
834
+ // User wants to reconfigure - run setup
835
+ await setupIssueTracker({
836
+ projectPath: targetDir,
837
+ language: language,
838
+ maxRetries: 3,
839
+ isFrameworkRepo
840
+ });
841
+ }
842
+ }
843
+ else {
844
+ // No existing config - run setup
845
+ if (isFrameworkRepo) {
846
+ console.log(chalk.blue('\n🔍 Detected SpecWeave framework repository'));
847
+ console.log(chalk.gray(' Recommended: Configure GitHub sync for automatic bidirectional sync'));
848
+ console.log('');
849
+ }
850
+ await setupIssueTracker({
851
+ projectPath: targetDir,
852
+ language: language,
853
+ maxRetries: 3,
854
+ isFrameworkRepo
855
+ });
856
+ }
857
+ }
858
+ catch (error) {
859
+ // Non-critical error - log but continue
860
+ if (process.env.DEBUG) {
861
+ console.error(chalk.red(`\n❌ Issue tracker setup error: ${error.message}`));
862
+ }
863
+ console.log(chalk.yellow('\n⚠️ Issue tracker setup skipped (can configure later)'));
864
+ }
865
+ }
866
+ showNextSteps(finalProjectName, toolName, language, usedDotNotation, toolName === 'claude' ? autoInstallSucceeded : undefined);
867
+ }
868
+ catch (error) {
869
+ spinner.fail('Failed to create project');
870
+ console.error(chalk.red(`\n${locale.t('cli', 'init.genericError')}`), error);
871
+ process.exit(1);
872
+ }
873
+ }
874
+ function createDirectoryStructure(targetDir, adapterName) {
875
+ const directories = [
876
+ // Core increment structure
877
+ '.specweave/increments',
878
+ // 6-pillar documentation structure
879
+ '.specweave/docs/internal/strategy', // Business specs (WHAT, WHY)
880
+ '.specweave/docs/internal/specs', // Feature specifications (detailed requirements)
881
+ '.specweave/docs/internal/architecture', // Technical design (HOW)
882
+ '.specweave/docs/internal/architecture/adr', // Architecture Decision Records
883
+ '.specweave/docs/internal/architecture/diagrams', // Architecture diagrams
884
+ '.specweave/docs/internal/delivery', // Roadmap, CI/CD, guides
885
+ '.specweave/docs/internal/operations', // Runbooks, SLOs
886
+ '.specweave/docs/internal/governance', // Security, compliance
887
+ '.specweave/docs/public', // Published documentation
888
+ ];
889
+ // For Claude Code ONLY: Create .claude/ folder (for settings.json)
890
+ // Non-Claude adapters: NO .claude/ folder (they use plugins/ folder directly)
891
+ if (adapterName === 'claude') {
892
+ directories.push('.claude');
893
+ }
894
+ directories.forEach((dir) => {
895
+ fs.mkdirSync(path.join(targetDir, dir), { recursive: true });
896
+ });
897
+ }
898
+ async function copyTemplates(templatesDir, targetDir, projectName, language = 'en') {
899
+ const locale = getLocaleManager(language);
900
+ // Verify templates directory exists
901
+ if (!fs.existsSync(templatesDir)) {
902
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.templatesNotFound', { path: templatesDir })}`));
903
+ const packageRoot = findPackageRoot(__dirname);
904
+ if (packageRoot) {
905
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
906
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.tryingAlternate')}`));
907
+ // Try src/templates as fallback
908
+ const altPath = path.join(packageRoot, 'src', 'templates');
909
+ if (fs.existsSync(altPath)) {
910
+ console.error(chalk.yellow(` ${locale.t('cli', 'init.errors.foundTemplatesAt', { path: altPath })}`));
911
+ templatesDir = altPath;
912
+ }
913
+ else {
914
+ throw new Error('Failed to locate templates directory');
915
+ }
916
+ }
917
+ else {
918
+ throw new Error('Failed to locate templates directory and package root');
919
+ }
920
+ }
921
+ // Copy README.md
922
+ const readmeTemplate = path.join(templatesDir, 'README.md.template');
923
+ if (fs.existsSync(readmeTemplate)) {
924
+ let readme = fs.readFileSync(readmeTemplate, 'utf-8');
925
+ readme = readme.replace(/{{PROJECT_NAME}}/g, projectName);
926
+ fs.writeFileSync(path.join(targetDir, 'README.md'), readme);
927
+ }
928
+ // Generate CLAUDE.md - PRIMARY instruction file for Claude Code
929
+ // CRITICAL: Claude Code ONLY reads CLAUDE.md (NOT AGENTS.md!)
930
+ // This is the native/baseline experience - skills, agents, hooks, slash commands
931
+ const skillsDir = findSourceDir('skills');
932
+ const agentsDir = findSourceDir('agents');
933
+ const commandsDir = findSourceDir('commands');
934
+ const claudeMdTemplatePath = path.normalize(path.join(templatesDir, 'CLAUDE.md.template'));
935
+ const claudeGen = new ClaudeMdGenerator(skillsDir, agentsDir, commandsDir);
936
+ const claudeMd = await claudeGen.generate({
937
+ projectName,
938
+ projectPath: targetDir,
939
+ templatePath: fs.existsSync(claudeMdTemplatePath) ? claudeMdTemplatePath : undefined
940
+ });
941
+ fs.writeFileSync(path.join(targetDir, 'CLAUDE.md'), claudeMd);
942
+ // Generate AGENTS.md - Universal file for ALL OTHER AI tools
943
+ // Following agents.md standard: https://agents.md/
944
+ // Used by: Cursor, Gemini CLI, Codex, GitHub Copilot, and ANY non-Claude tool
945
+ // NOTE: Claude Code does NOT read this file - it only reads CLAUDE.md above
946
+ // Replaces: .cursorrules, instructions.md, and other tool-specific files
947
+ const agentsMdTemplatePath = path.normalize(path.join(templatesDir, 'AGENTS.md.template'));
948
+ const agentsGen = new AgentsMdGenerator(skillsDir, agentsDir, commandsDir);
949
+ const agentsMd = await agentsGen.generate({
950
+ projectName,
951
+ projectPath: targetDir,
952
+ templatePath: fs.existsSync(agentsMdTemplatePath) ? agentsMdTemplatePath : undefined
953
+ });
954
+ fs.writeFileSync(path.join(targetDir, 'AGENTS.md'), agentsMd);
955
+ // Copy .gitignore
956
+ const gitignoreTemplate = path.join(templatesDir, '.gitignore.template');
957
+ if (fs.existsSync(gitignoreTemplate)) {
958
+ fs.copyFileSync(gitignoreTemplate, path.join(targetDir, '.gitignore'));
959
+ }
960
+ // Copy .gitattributes (forces LF line endings on all platforms, prevents Windows CRLF warnings)
961
+ const gitattributesTemplate = path.join(templatesDir, '.gitattributes.template');
962
+ if (fs.existsSync(gitattributesTemplate)) {
963
+ fs.copyFileSync(gitattributesTemplate, path.join(targetDir, '.gitattributes'));
964
+ }
965
+ }
966
+ /**
967
+ * Detect ALL parent directories that contain .specweave/ folders
968
+ * SpecWeave ONLY supports root-level .specweave/ folders
969
+ * Nested .specweave/ folders are NOT supported
970
+ *
971
+ * @param targetDir - Directory where user wants to initialize
972
+ * @returns Array of paths to parent .specweave/ folders with depth info, or null if none found
973
+ */
974
+ function detectNestedSpecweave(targetDir) {
975
+ const foundFolders = [];
976
+ // Start from parent of target directory
977
+ let currentDir = path.dirname(path.resolve(targetDir));
978
+ const root = path.parse(currentDir).root;
979
+ let depth = 1;
980
+ // Walk up the directory tree and find ALL .specweave/ folders
981
+ while (currentDir !== root) {
982
+ const specweavePath = path.join(currentDir, '.specweave');
983
+ // Check if .specweave/ exists at this level
984
+ if (fs.existsSync(specweavePath)) {
985
+ foundFolders.push({ path: currentDir, depth });
986
+ }
987
+ // Move up one level
988
+ const parentDir = path.dirname(currentDir);
989
+ if (parentDir === currentDir)
990
+ break; // Reached root
991
+ currentDir = parentDir;
992
+ depth++;
993
+ }
994
+ return foundFolders.length > 0 ? foundFolders : null;
995
+ }
996
+ /**
997
+ * Find the package root by walking up the directory tree looking for package.json
998
+ * This works reliably on all platforms including Windows with UNC paths
999
+ */
1000
+ function findPackageRoot(startDir) {
1001
+ let currentDir = startDir;
1002
+ const root = path.parse(currentDir).root;
1003
+ while (currentDir !== root) {
1004
+ const packageJsonPath = path.join(currentDir, 'package.json');
1005
+ if (fs.existsSync(packageJsonPath)) {
1006
+ try {
1007
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
1008
+ // Verify this is the specweave package
1009
+ if (packageJson.name === 'specweave') {
1010
+ return currentDir;
1011
+ }
1012
+ }
1013
+ catch (error) {
1014
+ // Not a valid package.json, continue searching
1015
+ }
1016
+ }
1017
+ const parentDir = path.dirname(currentDir);
1018
+ if (parentDir === currentDir)
1019
+ break; // Reached root
1020
+ currentDir = parentDir;
1021
+ }
1022
+ return null;
1023
+ }
1024
+ /**
1025
+ * Find the source directory, trying multiple possible locations
1026
+ * Handles both development and installed package scenarios
1027
+ * Windows-compatible with proper path normalization
1028
+ */
1029
+ function findSourceDir(relativePath) {
1030
+ // First, try to find package root by walking up from __dirname
1031
+ const packageRoot = findPackageRoot(__dirname);
1032
+ if (packageRoot) {
1033
+ // Try directly in package root FIRST (for plugins/, .claude-plugin/)
1034
+ // This is critical because package.json includes these folders for npm publish
1035
+ const rootPath = path.normalize(path.join(packageRoot, relativePath));
1036
+ if (fs.existsSync(rootPath)) {
1037
+ return rootPath;
1038
+ }
1039
+ // Try src/ directory (for templates/, utils/, etc.)
1040
+ const srcPath = path.normalize(path.join(packageRoot, 'src', relativePath));
1041
+ if (fs.existsSync(srcPath)) {
1042
+ return srcPath;
1043
+ }
1044
+ // Try dist/ directory (fallback for compiled outputs)
1045
+ const distPath = path.normalize(path.join(packageRoot, 'dist', relativePath));
1046
+ if (fs.existsSync(distPath)) {
1047
+ return distPath;
1048
+ }
1049
+ }
1050
+ // Fallback: Try multiple possible locations relative to __dirname
1051
+ const possiblePaths = [
1052
+ // Development: dist/cli/commands -> src/
1053
+ path.normalize(path.join(__dirname, '../../..', relativePath)),
1054
+ // Installed: node_modules/specweave/dist/cli/commands -> node_modules/specweave/src/
1055
+ path.normalize(path.join(__dirname, '../../../src', relativePath)),
1056
+ // Alternative: go up from dist/ to package root, then to src/
1057
+ path.normalize(path.join(__dirname, '../../..', 'src', relativePath)),
1058
+ // Absolute from package root (for global installs)
1059
+ path.resolve(__dirname, '../../../src', relativePath),
1060
+ ];
1061
+ for (const testPath of possiblePaths) {
1062
+ if (fs.existsSync(testPath)) {
1063
+ return testPath;
1064
+ }
1065
+ }
1066
+ // If nothing found, return the first path and let the caller handle the error
1067
+ return possiblePaths[0];
1068
+ }
1069
+ function copyCommands(commandsDir, targetCommandsDir, language) {
1070
+ const locale = getLocaleManager(language);
1071
+ // v0.4.0+: Commands moved to plugins/specweave/commands/
1072
+ const sourceDir = findSourceDir('plugins/specweave/commands');
1073
+ if (!fs.existsSync(sourceDir)) {
1074
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'commands' })}`));
1075
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
1076
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
1077
+ const packageRoot = findPackageRoot(__dirname);
1078
+ if (packageRoot) {
1079
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
1080
+ }
1081
+ else {
1082
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
1083
+ }
1084
+ throw new Error('Failed to locate source commands directory. This may be a Windows path resolution issue.');
1085
+ }
1086
+ // Validate source directory contains files
1087
+ const sourceFiles = fs.readdirSync(sourceDir).filter(f => f.endsWith('.md'));
1088
+ if (sourceFiles.length === 0) {
1089
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'commands' })}`));
1090
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
1091
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
1092
+ throw new Error('Source commands directory exists but contains no .md files');
1093
+ }
1094
+ try {
1095
+ // Ensure target directory exists
1096
+ fs.ensureDirSync(targetCommandsDir);
1097
+ // Copy each command file and inject system prompts if needed
1098
+ for (const file of sourceFiles) {
1099
+ const sourcePath = path.join(sourceDir, file);
1100
+ const targetPath = path.join(targetCommandsDir, file);
1101
+ // Read, potentially inject, and write
1102
+ const content = fs.readFileSync(sourcePath, 'utf-8');
1103
+ const modifiedContent = language !== 'en'
1104
+ ? injectSystemPromptForInit(content, language)
1105
+ : content;
1106
+ fs.writeFileSync(targetPath, modifiedContent, 'utf-8');
1107
+ }
1108
+ // Validate files were copied
1109
+ const copiedFiles = fs.readdirSync(targetCommandsDir).filter(f => f.endsWith('.md'));
1110
+ if (copiedFiles.length === 0) {
1111
+ throw new Error(`Copy completed but no files found in target directory: ${targetCommandsDir}`);
1112
+ }
1113
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedFiles', { count: copiedFiles.length })}`));
1114
+ }
1115
+ catch (error) {
1116
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'commands', error: error.message })}`));
1117
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
1118
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetCommandsDir })}`));
1119
+ throw error;
1120
+ }
1121
+ }
1122
+ function copyAgents(agentsDir, targetAgentsDir, language) {
1123
+ const locale = getLocaleManager(language);
1124
+ // v0.4.0+: Agents moved to plugins/specweave/agents/
1125
+ const sourceDir = findSourceDir('plugins/specweave/agents');
1126
+ if (!fs.existsSync(sourceDir)) {
1127
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'agents' })}`));
1128
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
1129
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
1130
+ const packageRoot = findPackageRoot(__dirname);
1131
+ if (packageRoot) {
1132
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
1133
+ }
1134
+ else {
1135
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
1136
+ }
1137
+ throw new Error('Failed to locate source agents directory. This may be a Windows path resolution issue.');
1138
+ }
1139
+ // Validate source directory contains subdirectories with AGENT.md files
1140
+ const agentDirs = fs.readdirSync(sourceDir, { withFileTypes: true })
1141
+ .filter(dirent => dirent.isDirectory());
1142
+ if (agentDirs.length === 0) {
1143
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'agents' })}`));
1144
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
1145
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
1146
+ throw new Error('Source agents directory exists but contains no agent subdirectories');
1147
+ }
1148
+ try {
1149
+ // Ensure target directory exists
1150
+ fs.ensureDirSync(targetAgentsDir);
1151
+ // Copy each agent directory and inject system prompts if needed
1152
+ for (const agentDir of agentDirs) {
1153
+ const sourcePath = path.join(sourceDir, agentDir.name);
1154
+ const targetPath = path.join(targetAgentsDir, agentDir.name);
1155
+ // Copy entire agent directory first
1156
+ fs.copySync(sourcePath, targetPath, {
1157
+ overwrite: true,
1158
+ errorOnExist: false
1159
+ });
1160
+ // Then inject system prompt into AGENT.md if language !== 'en'
1161
+ if (language !== 'en') {
1162
+ const agentMdPath = path.join(targetPath, 'AGENT.md');
1163
+ if (fs.existsSync(agentMdPath)) {
1164
+ const content = fs.readFileSync(agentMdPath, 'utf-8');
1165
+ const modifiedContent = injectSystemPromptForInit(content, language);
1166
+ fs.writeFileSync(agentMdPath, modifiedContent, 'utf-8');
1167
+ }
1168
+ }
1169
+ }
1170
+ // Validate subdirectories were copied
1171
+ const copiedDirs = fs.readdirSync(targetAgentsDir, { withFileTypes: true })
1172
+ .filter(dirent => dirent.isDirectory());
1173
+ if (copiedDirs.length === 0) {
1174
+ throw new Error(`Copy completed but no agent directories found in target: ${targetAgentsDir}`);
1175
+ }
1176
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedAgents', { count: copiedDirs.length })}`));
1177
+ }
1178
+ catch (error) {
1179
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'agents', error: error.message })}`));
1180
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
1181
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetAgentsDir })}`));
1182
+ throw error;
1183
+ }
1184
+ }
1185
+ /**
1186
+ * Inject system prompt for non-English languages
1187
+ */
1188
+ function injectSystemPromptForInit(content, language) {
1189
+ if (language === 'en') {
1190
+ return content; // No changes for English
1191
+ }
1192
+ const systemPrompt = getSystemPromptForLanguage(language);
1193
+ // Inject after YAML frontmatter if present
1194
+ if (content.startsWith('---')) {
1195
+ const endOfFrontmatter = content.indexOf('---', 3);
1196
+ if (endOfFrontmatter !== -1) {
1197
+ const frontmatter = content.substring(0, endOfFrontmatter + 3);
1198
+ const body = content.substring(endOfFrontmatter + 3);
1199
+ return `${frontmatter}\n\n${systemPrompt}\n${body}`;
1200
+ }
1201
+ }
1202
+ // No frontmatter - inject at the top
1203
+ return `${systemPrompt}\n\n${content}`;
1204
+ }
1205
+ function copySkills(skillsDir, targetSkillsDir, language) {
1206
+ const locale = getLocaleManager(language);
1207
+ // v0.4.0+: Skills moved to plugins/specweave/skills/
1208
+ const sourceDir = findSourceDir('plugins/specweave/skills');
1209
+ if (!fs.existsSync(sourceDir)) {
1210
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'skills' })}`));
1211
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
1212
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
1213
+ const packageRoot = findPackageRoot(__dirname);
1214
+ if (packageRoot) {
1215
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
1216
+ }
1217
+ else {
1218
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
1219
+ }
1220
+ throw new Error('Failed to locate source skills directory. This may be a Windows path resolution issue.');
1221
+ }
1222
+ // Validate source directory contains subdirectories with SKILL.md files
1223
+ const skillDirs = fs.readdirSync(sourceDir, { withFileTypes: true })
1224
+ .filter(dirent => dirent.isDirectory());
1225
+ if (skillDirs.length === 0) {
1226
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'skills' })}`));
1227
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
1228
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
1229
+ throw new Error('Source skills directory exists but contains no skill subdirectories');
1230
+ }
1231
+ try {
1232
+ // Ensure target directory exists
1233
+ fs.ensureDirSync(targetSkillsDir);
1234
+ // Copy each skill directory and inject system prompts if needed
1235
+ for (const skillDir of skillDirs) {
1236
+ const sourcePath = path.join(sourceDir, skillDir.name);
1237
+ const targetPath = path.join(targetSkillsDir, skillDir.name);
1238
+ // Copy entire skill directory first
1239
+ fs.copySync(sourcePath, targetPath, {
1240
+ overwrite: true,
1241
+ errorOnExist: false
1242
+ });
1243
+ // Then inject system prompt into SKILL.md if language !== 'en'
1244
+ if (language !== 'en') {
1245
+ const skillMdPath = path.join(targetPath, 'SKILL.md');
1246
+ if (fs.existsSync(skillMdPath)) {
1247
+ const content = fs.readFileSync(skillMdPath, 'utf-8');
1248
+ const modifiedContent = injectSystemPromptForInit(content, language);
1249
+ fs.writeFileSync(skillMdPath, modifiedContent, 'utf-8');
1250
+ }
1251
+ }
1252
+ }
1253
+ // Validate subdirectories were copied
1254
+ const copiedDirs = fs.readdirSync(targetSkillsDir, { withFileTypes: true })
1255
+ .filter(dirent => dirent.isDirectory());
1256
+ if (copiedDirs.length === 0) {
1257
+ throw new Error(`Copy completed but no skill directories found in target: ${targetSkillsDir}`);
1258
+ }
1259
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedSkills', { count: copiedDirs.length })}`));
1260
+ }
1261
+ catch (error) {
1262
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'skills', error: error.message })}`));
1263
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
1264
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetSkillsDir })}`));
1265
+ throw error;
1266
+ }
1267
+ }
1268
+ function copyHooks(hooksDir, targetHooksDir, language = 'en') {
1269
+ const locale = getLocaleManager(language);
1270
+ // v0.4.0+: Hooks moved to plugins/specweave/hooks/
1271
+ const sourceDir = findSourceDir('plugins/specweave/hooks');
1272
+ if (!fs.existsSync(sourceDir)) {
1273
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceNotFound', { type: 'hooks' })}`));
1274
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.expectedAt', { path: sourceDir })}`));
1275
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.dirname', { path: __dirname })}`));
1276
+ const packageRoot = findPackageRoot(__dirname);
1277
+ if (packageRoot) {
1278
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.packageRoot', { root: packageRoot })}`));
1279
+ }
1280
+ else {
1281
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.couldNotFindRoot')}`));
1282
+ }
1283
+ throw new Error('Failed to locate source hooks directory. This may be a Windows path resolution issue.');
1284
+ }
1285
+ // Validate source directory contains hook files
1286
+ const hookFiles = fs.readdirSync(sourceDir).filter(f => f.endsWith('.sh') || f === 'README.md');
1287
+ if (hookFiles.length === 0) {
1288
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.sourceEmpty', { type: 'hooks' })}`));
1289
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.directory', { path: sourceDir })}`));
1290
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.installationIssue')}`));
1291
+ throw new Error('Source hooks directory exists but contains no hook files');
1292
+ }
1293
+ try {
1294
+ // Ensure target directory exists
1295
+ fs.ensureDirSync(targetHooksDir);
1296
+ // Copy all files from source to target
1297
+ fs.copySync(sourceDir, targetHooksDir, {
1298
+ overwrite: true,
1299
+ errorOnExist: false
1300
+ });
1301
+ // Validate files were copied
1302
+ const copiedFiles = fs.readdirSync(targetHooksDir).filter(f => f.endsWith('.sh') || f === 'README.md');
1303
+ if (copiedFiles.length === 0) {
1304
+ throw new Error(`Copy completed but no hook files found in target: ${targetHooksDir}`);
1305
+ }
1306
+ console.log(chalk.gray(` ${locale.t('cli', 'init.info.copiedHooks', { count: copiedFiles.length })}`));
1307
+ }
1308
+ catch (error) {
1309
+ console.error(chalk.red(`\n${locale.t('cli', 'init.errors.errorCopying', { type: 'hooks', error: error.message })}`));
1310
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.source', { path: sourceDir })}`));
1311
+ console.error(chalk.red(` ${locale.t('cli', 'init.errors.target', { path: targetHooksDir })}`));
1312
+ throw error;
1313
+ }
1314
+ }
1315
+ /**
1316
+ * Create .specweave/config.json with project settings
1317
+ */
1318
+ function createConfigFile(targetDir, projectName, adapter, language, enableDocsPreview = true) {
1319
+ const configPath = path.join(targetDir, '.specweave', 'config.json');
1320
+ const config = {
1321
+ project: {
1322
+ name: projectName,
1323
+ version: '0.1.0',
1324
+ },
1325
+ adapters: {
1326
+ default: adapter,
1327
+ },
1328
+ // Documentation preview settings (for Claude Code only)
1329
+ ...(adapter === 'claude' && {
1330
+ documentation: {
1331
+ preview: {
1332
+ enabled: enableDocsPreview,
1333
+ autoInstall: false, // Lazy install on first use
1334
+ port: 3015, // Internal docs (avoid port 3000 - used by React/Next.js/Vite)
1335
+ openBrowser: true,
1336
+ theme: 'default',
1337
+ excludeFolders: ['legacy', 'node_modules']
1338
+ }
1339
+ }
1340
+ }),
1341
+ // Only include language if non-English
1342
+ ...(language !== 'en' && {
1343
+ language,
1344
+ translation: {
1345
+ method: 'in-session',
1346
+ autoTranslateLivingDocs: false,
1347
+ keepFrameworkTerms: true,
1348
+ keepTechnicalTerms: true,
1349
+ translateCodeComments: true,
1350
+ translateVariableNames: false,
1351
+ },
1352
+ }),
1353
+ };
1354
+ fs.writeJsonSync(configPath, config, { spaces: 2 });
1355
+ }
1356
+ /**
1357
+ * Setup Claude Code automatic plugin registration
1358
+ * Creates .claude/settings.json with extraKnownMarketplaces
1359
+ * This triggers Claude's native auto-install when users trust the folder
1360
+ */
1361
+ function setupClaudePluginAutoRegistration(targetDir, language) {
1362
+ const locale = getLocaleManager(language);
1363
+ const settingsPath = path.join(targetDir, '.claude', 'settings.json');
1364
+ // Create settings.json with GitHub marketplace registration
1365
+ // ✅ Claude Code fetches plugins from GitHub (no local marketplace files needed!)
1366
+ const settings = {
1367
+ extraKnownMarketplaces: {
1368
+ specweave: {
1369
+ source: {
1370
+ source: 'github',
1371
+ repo: 'anton-abyzov/specweave',
1372
+ path: '.claude-plugin'
1373
+ }
1374
+ }
1375
+ }
1376
+ };
1377
+ try {
1378
+ fs.writeJsonSync(settingsPath, settings, { spaces: 2 });
1379
+ console.log(chalk.green(`\n✅ ${locale.t('cli', 'init.success.pluginAutoSetup')}`));
1380
+ console.log(chalk.gray(` Marketplace: github.com/anton-abyzov/specweave/.claude-plugin`));
1381
+ console.log(chalk.gray(` Plugins will be fetched from GitHub (always up-to-date)`));
1382
+ }
1383
+ catch (error) {
1384
+ throw new Error(`Failed to create .claude/settings.json: ${error.message}`);
1385
+ }
1386
+ }
1387
+ function showNextSteps(projectName, adapterName, language, usedDotNotation = false, pluginAutoInstalled = false) {
1388
+ const locale = getLocaleManager(language);
1389
+ console.log('');
1390
+ console.log(chalk.cyan.bold(locale.t('cli', 'init.nextSteps.header')));
1391
+ console.log('');
1392
+ let stepNumber = 1;
1393
+ // Only show "cd" step if we created a subdirectory
1394
+ if (!usedDotNotation) {
1395
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.cd', { projectName }))}`);
1396
+ console.log('');
1397
+ stepNumber++;
1398
+ }
1399
+ // Adapter-specific instructions
1400
+ if (adapterName === 'claude') {
1401
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step1'))}`);
1402
+ console.log('');
1403
+ stepNumber++;
1404
+ // Only show manual install if auto-install failed
1405
+ if (!pluginAutoInstalled) {
1406
+ console.log(` ${stepNumber}. ${chalk.yellow.bold('⚠️ ' + locale.t('cli', 'init.nextSteps.claude.step2'))}`);
1407
+ console.log(` ${chalk.cyan.bold(locale.t('cli', 'init.nextSteps.claude.installCore'))}`);
1408
+ console.log(` ${chalk.gray('↑ Required for slash commands like /specweave:increment')}`);
1409
+ console.log('');
1410
+ stepNumber++;
1411
+ }
1412
+ console.log(` ${stepNumber}. ${chalk.white('All plugins are already installed!')}`);
1413
+ console.log(` ${chalk.gray('✔ All 19+ SpecWeave plugins installed automatically')}`);
1414
+ console.log(` ${chalk.gray('✔ No need to install additional plugins manually')}`);
1415
+ console.log(` ${chalk.gray('✔ Full capabilities available immediately')}`);
1416
+ console.log('');
1417
+ stepNumber++;
1418
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.claude.step4'))}`);
1419
+ console.log(` ${chalk.cyan(locale.t('cli', 'init.nextSteps.claude.example'))}`);
1420
+ console.log(` ${chalk.gray(locale.t('cli', 'init.nextSteps.claude.autoActivate'))}`);
1421
+ }
1422
+ else if (adapterName === 'cursor') {
1423
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step1'))}`);
1424
+ console.log('');
1425
+ console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step2'))}`);
1426
+ console.log(` ${locale.t('cli', 'init.nextSteps.cursor.guide')}`);
1427
+ console.log('');
1428
+ console.log(` ${stepNumber + 2}. ${chalk.white(locale.t('cli', 'init.nextSteps.cursor.step3'))}`);
1429
+ console.log(` ${locale.t('cli', 'init.nextSteps.cursor.shortcuts')}`);
1430
+ }
1431
+ else if (adapterName === 'generic') {
1432
+ console.log(` ${stepNumber}. ${chalk.white(locale.t('cli', 'init.nextSteps.generic.step1'))}`);
1433
+ console.log('');
1434
+ console.log(` ${stepNumber + 1}. ${chalk.white(locale.t('cli', 'init.nextSteps.generic.step2'))}`);
1435
+ console.log(` ${locale.t('cli', 'init.nextSteps.generic.compatibility')}`);
1436
+ }
1437
+ console.log('');
1438
+ console.log(chalk.green.bold(locale.t('cli', 'init.nextSteps.footer')));
1439
+ console.log('');
1440
+ console.log(chalk.gray(locale.t('cli', 'init.nextSteps.docsLink')));
1441
+ console.log(chalk.gray(locale.t('cli', 'init.nextSteps.githubLink')));
1442
+ console.log('');
1443
+ }
1444
+ //# sourceMappingURL=init.js.map