specweave 0.15.0 → 0.16.1

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 (822) hide show
  1. package/CLAUDE.md +38 -0
  2. package/dist/cli/commands/init.d.ts.map +1 -1
  3. package/dist/cli/commands/init.js +162 -3
  4. package/dist/cli/commands/init.js.map +1 -1
  5. package/dist/cli/helpers/github/increment-profile-selector.d.ts +47 -0
  6. package/dist/cli/helpers/github/increment-profile-selector.d.ts.map +1 -0
  7. package/dist/cli/helpers/github/increment-profile-selector.js +186 -0
  8. package/dist/cli/helpers/github/increment-profile-selector.js.map +1 -0
  9. package/dist/cli/helpers/github/profile-manager.d.ts +119 -0
  10. package/dist/cli/helpers/github/profile-manager.d.ts.map +1 -0
  11. package/dist/cli/helpers/github/profile-manager.js +311 -0
  12. package/dist/cli/helpers/github/profile-manager.js.map +1 -0
  13. package/dist/cli/helpers/issue-tracker/github-multi-repo.d.ts +81 -0
  14. package/dist/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -0
  15. package/dist/cli/helpers/issue-tracker/github-multi-repo.js +385 -0
  16. package/dist/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -0
  17. package/dist/cli/helpers/issue-tracker/github.d.ts +13 -0
  18. package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -1
  19. package/dist/cli/helpers/issue-tracker/github.js +38 -143
  20. package/dist/cli/helpers/issue-tracker/github.js.map +1 -1
  21. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  22. package/dist/cli/helpers/issue-tracker/index.js +126 -43
  23. package/dist/cli/helpers/issue-tracker/index.js.map +1 -1
  24. package/dist/cli/helpers/issue-tracker/utils.d.ts +8 -0
  25. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -1
  26. package/dist/cli/helpers/issue-tracker/utils.js +46 -0
  27. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -1
  28. package/dist/core/increment/active-increment-manager.d.ts +79 -0
  29. package/dist/core/increment/active-increment-manager.d.ts.map +1 -0
  30. package/dist/core/increment/active-increment-manager.js +153 -0
  31. package/dist/core/increment/active-increment-manager.js.map +1 -0
  32. package/dist/core/increment/metadata-manager.d.ts +2 -0
  33. package/dist/core/increment/metadata-manager.d.ts.map +1 -1
  34. package/dist/core/increment/metadata-manager.js +15 -0
  35. package/dist/core/increment/metadata-manager.js.map +1 -1
  36. package/dist/utils/git-detector.d.ts +84 -0
  37. package/dist/utils/git-detector.d.ts.map +1 -0
  38. package/dist/utils/git-detector.js +233 -0
  39. package/dist/utils/git-detector.js.map +1 -0
  40. package/package.json +2 -2
  41. package/plugins/specweave/commands/specweave-done.md +109 -1
  42. package/plugins/specweave/hooks/lib/update-status-line.sh +30 -4
  43. package/plugins/specweave/hooks/user-prompt-submit.sh +77 -21
  44. package/plugins/specweave/lib/hooks/git-diff-analyzer.js +129 -213
  45. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +146 -192
  46. package/plugins/specweave/lib/hooks/prepare-reflection-context.js +103 -116
  47. package/plugins/specweave/lib/hooks/reflection-config-loader.js +85 -125
  48. package/plugins/specweave/lib/hooks/reflection-parser.js +267 -385
  49. package/plugins/specweave/lib/hooks/reflection-prompt-builder.js +169 -226
  50. package/plugins/specweave/lib/hooks/reflection-storage.js +223 -297
  51. package/plugins/specweave/lib/hooks/run-self-reflection.js +120 -191
  52. package/plugins/specweave/lib/hooks/sync-living-docs.js +87 -129
  53. package/plugins/specweave/lib/hooks/translate-file.js +239 -300
  54. package/plugins/specweave/lib/hooks/translate-living-docs.js +88 -144
  55. package/plugins/specweave/lib/hooks/types/reflection-types.js +57 -72
  56. package/plugins/specweave/lib/hooks/update-tasks-md.js +117 -179
  57. package/plugins/specweave-ado/lib/ado-board-resolver.js +135 -205
  58. package/plugins/specweave-ado/lib/ado-hierarchical-sync.js +223 -335
  59. package/plugins/specweave-ado/lib/ado-spec-sync.js +380 -414
  60. package/plugins/specweave-ado/lib/project-selector.js +168 -196
  61. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +2 -2
  62. package/plugins/specweave-figma/ARCHITECTURE.md +1 -1
  63. package/plugins/specweave-figma/README.md +1 -1
  64. package/plugins/specweave-github/hooks/hooks.json +0 -11
  65. package/plugins/specweave-github/lib/cli-sync-increment-changes.js +9 -20
  66. package/plugins/specweave-github/lib/github-board-resolver.js +69 -115
  67. package/plugins/specweave-github/lib/github-client-v2.js +400 -389
  68. package/plugins/specweave-github/lib/github-client.js +246 -280
  69. package/plugins/specweave-github/lib/github-hierarchical-sync.js +168 -251
  70. package/plugins/specweave-github/lib/github-issue-updater.js +231 -288
  71. package/plugins/specweave-github/lib/github-spec-sync.js +379 -420
  72. package/plugins/specweave-github/lib/github-sync-bidirectional.js +175 -202
  73. package/plugins/specweave-github/lib/github-sync-increment-changes.js +212 -251
  74. package/plugins/specweave-github/lib/index.js +11 -10
  75. package/plugins/specweave-github/lib/repo-selector.js +174 -201
  76. package/plugins/specweave-github/lib/subtask-sync.js +132 -125
  77. package/plugins/specweave-github/lib/task-parser.js +191 -207
  78. package/plugins/specweave-github/lib/task-sync.js +344 -296
  79. package/plugins/specweave-github/lib/types.js +0 -5
  80. package/plugins/specweave-jira/lib/jira-board-resolver.js +50 -79
  81. package/plugins/specweave-jira/lib/jira-hierarchical-sync.js +119 -191
  82. package/plugins/specweave-jira/lib/jira-spec-sync.js +366 -405
  83. package/plugins/specweave-jira/lib/project-selector.js +172 -201
  84. package/plugins/specweave-jira/lib/reorganization-detector.js +202 -237
  85. package/plugins/specweave-jira/lib/setup-wizard.js +162 -204
  86. package/plugins/specweave-ml/README.md +1 -1
  87. package/dist/core/agent-model-manager.d.ts +0 -52
  88. package/dist/core/agent-model-manager.d.ts.map +0 -1
  89. package/dist/core/agent-model-manager.js +0 -120
  90. package/dist/core/agent-model-manager.js.map +0 -1
  91. package/dist/core/model-selector.d.ts +0 -57
  92. package/dist/core/model-selector.d.ts.map +0 -1
  93. package/dist/core/model-selector.js +0 -115
  94. package/dist/core/model-selector.js.map +0 -1
  95. package/dist/core/phase-detector.d.ts +0 -62
  96. package/dist/core/phase-detector.d.ts.map +0 -1
  97. package/dist/core/phase-detector.js +0 -229
  98. package/dist/core/phase-detector.js.map +0 -1
  99. package/dist/hooks/lib/git-diff-analyzer.d.ts +0 -89
  100. package/dist/hooks/lib/git-diff-analyzer.d.ts.map +0 -1
  101. package/dist/hooks/lib/git-diff-analyzer.js +0 -226
  102. package/dist/hooks/lib/git-diff-analyzer.js.map +0 -1
  103. package/dist/hooks/lib/invoke-translator-skill.d.ts +0 -60
  104. package/dist/hooks/lib/invoke-translator-skill.d.ts.map +0 -1
  105. package/dist/hooks/lib/invoke-translator-skill.js +0 -201
  106. package/dist/hooks/lib/invoke-translator-skill.js.map +0 -1
  107. package/dist/hooks/lib/prepare-reflection-context.d.ts +0 -42
  108. package/dist/hooks/lib/prepare-reflection-context.d.ts.map +0 -1
  109. package/dist/hooks/lib/prepare-reflection-context.js +0 -123
  110. package/dist/hooks/lib/prepare-reflection-context.js.map +0 -1
  111. package/dist/hooks/lib/reflection-config-loader.d.ts +0 -45
  112. package/dist/hooks/lib/reflection-config-loader.d.ts.map +0 -1
  113. package/dist/hooks/lib/reflection-config-loader.js +0 -132
  114. package/dist/hooks/lib/reflection-config-loader.js.map +0 -1
  115. package/dist/hooks/lib/reflection-parser.d.ts +0 -33
  116. package/dist/hooks/lib/reflection-parser.d.ts.map +0 -1
  117. package/dist/hooks/lib/reflection-parser.js +0 -419
  118. package/dist/hooks/lib/reflection-parser.js.map +0 -1
  119. package/dist/hooks/lib/reflection-prompt-builder.d.ts +0 -56
  120. package/dist/hooks/lib/reflection-prompt-builder.d.ts.map +0 -1
  121. package/dist/hooks/lib/reflection-prompt-builder.js +0 -239
  122. package/dist/hooks/lib/reflection-prompt-builder.js.map +0 -1
  123. package/dist/hooks/lib/reflection-storage.d.ts +0 -64
  124. package/dist/hooks/lib/reflection-storage.d.ts.map +0 -1
  125. package/dist/hooks/lib/reflection-storage.js +0 -305
  126. package/dist/hooks/lib/reflection-storage.js.map +0 -1
  127. package/dist/hooks/lib/run-self-reflection.d.ts +0 -43
  128. package/dist/hooks/lib/run-self-reflection.d.ts.map +0 -1
  129. package/dist/hooks/lib/run-self-reflection.js +0 -203
  130. package/dist/hooks/lib/run-self-reflection.js.map +0 -1
  131. package/dist/hooks/lib/sync-living-docs.d.ts +0 -27
  132. package/dist/hooks/lib/sync-living-docs.d.ts.map +0 -1
  133. package/dist/hooks/lib/sync-living-docs.js +0 -116
  134. package/dist/hooks/lib/sync-living-docs.js.map +0 -1
  135. package/dist/hooks/lib/translate-file.d.ts +0 -59
  136. package/dist/hooks/lib/translate-file.d.ts.map +0 -1
  137. package/dist/hooks/lib/translate-file.js +0 -350
  138. package/dist/hooks/lib/translate-file.js.map +0 -1
  139. package/dist/hooks/lib/translate-living-docs.d.ts +0 -13
  140. package/dist/hooks/lib/translate-living-docs.d.ts.map +0 -1
  141. package/dist/hooks/lib/translate-living-docs.js +0 -175
  142. package/dist/hooks/lib/translate-living-docs.js.map +0 -1
  143. package/dist/hooks/lib/types/reflection-types.d.ts +0 -164
  144. package/dist/hooks/lib/types/reflection-types.d.ts.map +0 -1
  145. package/dist/hooks/lib/types/reflection-types.js +0 -73
  146. package/dist/hooks/lib/types/reflection-types.js.map +0 -1
  147. package/dist/hooks/lib/update-tasks-md.d.ts +0 -29
  148. package/dist/hooks/lib/update-tasks-md.d.ts.map +0 -1
  149. package/dist/hooks/lib/update-tasks-md.js +0 -203
  150. package/dist/hooks/lib/update-tasks-md.js.map +0 -1
  151. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +0 -89
  152. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +0 -1
  153. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js +0 -226
  154. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +0 -1
  155. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +0 -60
  156. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +0 -1
  157. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js +0 -201
  158. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +0 -1
  159. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +0 -42
  160. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +0 -1
  161. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js +0 -123
  162. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +0 -1
  163. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +0 -45
  164. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +0 -1
  165. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js +0 -132
  166. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js.map +0 -1
  167. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts +0 -33
  168. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +0 -1
  169. package/dist/plugins/specweave/lib/hooks/reflection-parser.js +0 -419
  170. package/dist/plugins/specweave/lib/hooks/reflection-parser.js.map +0 -1
  171. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +0 -56
  172. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +0 -1
  173. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js +0 -239
  174. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +0 -1
  175. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts +0 -64
  176. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +0 -1
  177. package/dist/plugins/specweave/lib/hooks/reflection-storage.js +0 -305
  178. package/dist/plugins/specweave/lib/hooks/reflection-storage.js.map +0 -1
  179. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts +0 -43
  180. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +0 -1
  181. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js +0 -203
  182. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js.map +0 -1
  183. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +0 -27
  184. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +0 -1
  185. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +0 -144
  186. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +0 -1
  187. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts +0 -59
  188. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts.map +0 -1
  189. package/dist/plugins/specweave/lib/hooks/translate-file.js +0 -350
  190. package/dist/plugins/specweave/lib/hooks/translate-file.js.map +0 -1
  191. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts +0 -13
  192. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +0 -1
  193. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js +0 -175
  194. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js.map +0 -1
  195. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts +0 -164
  196. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +0 -1
  197. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js +0 -73
  198. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js.map +0 -1
  199. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts +0 -29
  200. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +0 -1
  201. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js +0 -203
  202. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js.map +0 -1
  203. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts +0 -94
  204. package/dist/plugins/specweave-ado/lib/ado-board-resolver.d.ts.map +0 -1
  205. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js +0 -219
  206. package/dist/plugins/specweave-ado/lib/ado-board-resolver.js.map +0 -1
  207. package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts +0 -124
  208. package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts.map +0 -1
  209. package/dist/plugins/specweave-ado/lib/ado-client-v2.js +0 -382
  210. package/dist/plugins/specweave-ado/lib/ado-client-v2.js.map +0 -1
  211. package/dist/plugins/specweave-ado/lib/ado-client.d.ts +0 -112
  212. package/dist/plugins/specweave-ado/lib/ado-client.d.ts.map +0 -1
  213. package/dist/plugins/specweave-ado/lib/ado-client.js +0 -257
  214. package/dist/plugins/specweave-ado/lib/ado-client.js.map +0 -1
  215. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts +0 -40
  216. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.d.ts.map +0 -1
  217. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.js +0 -370
  218. package/dist/plugins/specweave-ado/lib/ado-hierarchical-sync.js.map +0 -1
  219. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +0 -100
  220. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +0 -1
  221. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +0 -471
  222. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +0 -1
  223. package/dist/plugins/specweave-ado/lib/project-selector.d.ts +0 -42
  224. package/dist/plugins/specweave-ado/lib/project-selector.d.ts.map +0 -1
  225. package/dist/plugins/specweave-ado/lib/project-selector.js +0 -211
  226. package/dist/plugins/specweave-ado/lib/project-selector.js.map +0 -1
  227. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +0 -12
  228. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +0 -1
  229. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js +0 -28
  230. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +0 -1
  231. package/dist/plugins/specweave-github/lib/github-board-resolver.d.ts +0 -54
  232. package/dist/plugins/specweave-github/lib/github-board-resolver.d.ts.map +0 -1
  233. package/dist/plugins/specweave-github/lib/github-board-resolver.js +0 -122
  234. package/dist/plugins/specweave-github/lib/github-board-resolver.js.map +0 -1
  235. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +0 -104
  236. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +0 -1
  237. package/dist/plugins/specweave-github/lib/github-client-v2.js +0 -408
  238. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +0 -1
  239. package/dist/plugins/specweave-github/lib/github-client.d.ts +0 -96
  240. package/dist/plugins/specweave-github/lib/github-client.d.ts.map +0 -1
  241. package/dist/plugins/specweave-github/lib/github-client.js +0 -299
  242. package/dist/plugins/specweave-github/lib/github-client.js.map +0 -1
  243. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.d.ts +0 -29
  244. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.d.ts.map +0 -1
  245. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.js +0 -268
  246. package/dist/plugins/specweave-github/lib/github-hierarchical-sync.js.map +0 -1
  247. package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts +0 -61
  248. package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts.map +0 -1
  249. package/dist/plugins/specweave-github/lib/github-issue-updater.js +0 -327
  250. package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +0 -1
  251. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +0 -108
  252. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts.map +0 -1
  253. package/dist/plugins/specweave-github/lib/github-spec-sync.js +0 -505
  254. package/dist/plugins/specweave-github/lib/github-spec-sync.js.map +0 -1
  255. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +0 -36
  256. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +0 -1
  257. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +0 -228
  258. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +0 -1
  259. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +0 -18
  260. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +0 -1
  261. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +0 -287
  262. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +0 -1
  263. package/dist/plugins/specweave-github/lib/index.d.ts +0 -10
  264. package/dist/plugins/specweave-github/lib/index.d.ts.map +0 -1
  265. package/dist/plugins/specweave-github/lib/index.js +0 -10
  266. package/dist/plugins/specweave-github/lib/index.js.map +0 -1
  267. package/dist/plugins/specweave-github/lib/repo-selector.d.ts +0 -49
  268. package/dist/plugins/specweave-github/lib/repo-selector.d.ts.map +0 -1
  269. package/dist/plugins/specweave-github/lib/repo-selector.js +0 -216
  270. package/dist/plugins/specweave-github/lib/repo-selector.js.map +0 -1
  271. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
  272. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
  273. package/dist/plugins/specweave-github/lib/subtask-sync.js +0 -147
  274. package/dist/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
  275. package/dist/plugins/specweave-github/lib/task-parser.d.ts +0 -37
  276. package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
  277. package/dist/plugins/specweave-github/lib/task-parser.js +0 -211
  278. package/dist/plugins/specweave-github/lib/task-parser.js.map +0 -1
  279. package/dist/plugins/specweave-github/lib/task-sync.d.ts +0 -51
  280. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
  281. package/dist/plugins/specweave-github/lib/task-sync.js +0 -332
  282. package/dist/plugins/specweave-github/lib/task-sync.js.map +0 -1
  283. package/dist/plugins/specweave-github/lib/types.d.ts +0 -80
  284. package/dist/plugins/specweave-github/lib/types.d.ts.map +0 -1
  285. package/dist/plugins/specweave-github/lib/types.js +0 -5
  286. package/dist/plugins/specweave-github/lib/types.js.map +0 -1
  287. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts +0 -50
  288. package/dist/plugins/specweave-jira/lib/jira-board-resolver.d.ts.map +0 -1
  289. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js +0 -84
  290. package/dist/plugins/specweave-jira/lib/jira-board-resolver.js.map +0 -1
  291. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts +0 -33
  292. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.d.ts.map +0 -1
  293. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.js +0 -206
  294. package/dist/plugins/specweave-jira/lib/jira-hierarchical-sync.js.map +0 -1
  295. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +0 -105
  296. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +0 -1
  297. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +0 -456
  298. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +0 -1
  299. package/dist/plugins/specweave-jira/lib/project-selector.d.ts +0 -42
  300. package/dist/plugins/specweave-jira/lib/project-selector.d.ts.map +0 -1
  301. package/dist/plugins/specweave-jira/lib/project-selector.js +0 -216
  302. package/dist/plugins/specweave-jira/lib/project-selector.js.map +0 -1
  303. package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts +0 -67
  304. package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts.map +0 -1
  305. package/dist/plugins/specweave-jira/lib/reorganization-detector.js +0 -252
  306. package/dist/plugins/specweave-jira/lib/reorganization-detector.js.map +0 -1
  307. package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts +0 -29
  308. package/dist/plugins/specweave-jira/lib/setup-wizard.d.ts.map +0 -1
  309. package/dist/plugins/specweave-jira/lib/setup-wizard.js +0 -219
  310. package/dist/plugins/specweave-jira/lib/setup-wizard.js.map +0 -1
  311. package/dist/project-mapper.js +0 -272
  312. package/dist/scripts/split-spec-by-project.js +0 -105
  313. package/dist/spec-splitter.js +0 -283
  314. package/dist/src/adapters/adapter-base.d.ts +0 -71
  315. package/dist/src/adapters/adapter-base.d.ts.map +0 -1
  316. package/dist/src/adapters/adapter-base.js +0 -139
  317. package/dist/src/adapters/adapter-base.js.map +0 -1
  318. package/dist/src/adapters/adapter-interface.d.ts +0 -149
  319. package/dist/src/adapters/adapter-interface.d.ts.map +0 -1
  320. package/dist/src/adapters/adapter-interface.js +0 -8
  321. package/dist/src/adapters/adapter-interface.js.map +0 -1
  322. package/dist/src/adapters/adapter-loader.d.ts +0 -91
  323. package/dist/src/adapters/adapter-loader.d.ts.map +0 -1
  324. package/dist/src/adapters/adapter-loader.js +0 -238
  325. package/dist/src/adapters/adapter-loader.js.map +0 -1
  326. package/dist/src/adapters/agents-md-generator.d.ts +0 -48
  327. package/dist/src/adapters/agents-md-generator.d.ts.map +0 -1
  328. package/dist/src/adapters/agents-md-generator.js +0 -193
  329. package/dist/src/adapters/agents-md-generator.js.map +0 -1
  330. package/dist/src/adapters/claude/adapter.d.ts +0 -128
  331. package/dist/src/adapters/claude/adapter.d.ts.map +0 -1
  332. package/dist/src/adapters/claude/adapter.js +0 -415
  333. package/dist/src/adapters/claude/adapter.js.map +0 -1
  334. package/dist/src/adapters/claude-md-generator.d.ts +0 -78
  335. package/dist/src/adapters/claude-md-generator.d.ts.map +0 -1
  336. package/dist/src/adapters/claude-md-generator.js +0 -307
  337. package/dist/src/adapters/claude-md-generator.js.map +0 -1
  338. package/dist/src/adapters/codex/adapter.d.ts +0 -50
  339. package/dist/src/adapters/codex/adapter.d.ts.map +0 -1
  340. package/dist/src/adapters/codex/adapter.js +0 -316
  341. package/dist/src/adapters/codex/adapter.js.map +0 -1
  342. package/dist/src/adapters/cursor/adapter.d.ts +0 -98
  343. package/dist/src/adapters/cursor/adapter.d.ts.map +0 -1
  344. package/dist/src/adapters/cursor/adapter.js +0 -406
  345. package/dist/src/adapters/cursor/adapter.js.map +0 -1
  346. package/dist/src/adapters/doc-generator.d.ts +0 -69
  347. package/dist/src/adapters/doc-generator.d.ts.map +0 -1
  348. package/dist/src/adapters/doc-generator.js +0 -247
  349. package/dist/src/adapters/doc-generator.js.map +0 -1
  350. package/dist/src/adapters/gemini/adapter.d.ts +0 -50
  351. package/dist/src/adapters/gemini/adapter.d.ts.map +0 -1
  352. package/dist/src/adapters/gemini/adapter.js +0 -281
  353. package/dist/src/adapters/gemini/adapter.js.map +0 -1
  354. package/dist/src/adapters/generic/adapter.d.ts +0 -86
  355. package/dist/src/adapters/generic/adapter.d.ts.map +0 -1
  356. package/dist/src/adapters/generic/adapter.js +0 -338
  357. package/dist/src/adapters/generic/adapter.js.map +0 -1
  358. package/dist/src/cli/commands/abandon.d.ts +0 -13
  359. package/dist/src/cli/commands/abandon.d.ts.map +0 -1
  360. package/dist/src/cli/commands/abandon.js +0 -15
  361. package/dist/src/cli/commands/abandon.js.map +0 -1
  362. package/dist/src/cli/commands/import-docs.d.ts +0 -21
  363. package/dist/src/cli/commands/import-docs.d.ts.map +0 -1
  364. package/dist/src/cli/commands/import-docs.js +0 -146
  365. package/dist/src/cli/commands/import-docs.js.map +0 -1
  366. package/dist/src/cli/commands/init-multiproject.d.ts +0 -11
  367. package/dist/src/cli/commands/init-multiproject.d.ts.map +0 -1
  368. package/dist/src/cli/commands/init-multiproject.js +0 -202
  369. package/dist/src/cli/commands/init-multiproject.js.map +0 -1
  370. package/dist/src/cli/commands/init.d.ts +0 -9
  371. package/dist/src/cli/commands/init.d.ts.map +0 -1
  372. package/dist/src/cli/commands/init.js +0 -1444
  373. package/dist/src/cli/commands/init.js.map +0 -1
  374. package/dist/src/cli/commands/install.d.ts +0 -9
  375. package/dist/src/cli/commands/install.d.ts.map +0 -1
  376. package/dist/src/cli/commands/install.js +0 -127
  377. package/dist/src/cli/commands/install.js.map +0 -1
  378. package/dist/src/cli/commands/list.d.ts +0 -8
  379. package/dist/src/cli/commands/list.d.ts.map +0 -1
  380. package/dist/src/cli/commands/list.js +0 -119
  381. package/dist/src/cli/commands/list.js.map +0 -1
  382. package/dist/src/cli/commands/migrate-to-multiproject.d.ts +0 -37
  383. package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +0 -1
  384. package/dist/src/cli/commands/migrate-to-multiproject.js +0 -189
  385. package/dist/src/cli/commands/migrate-to-multiproject.js.map +0 -1
  386. package/dist/src/cli/commands/migrate-to-profiles.d.ts +0 -25
  387. package/dist/src/cli/commands/migrate-to-profiles.d.ts.map +0 -1
  388. package/dist/src/cli/commands/migrate-to-profiles.js +0 -350
  389. package/dist/src/cli/commands/migrate-to-profiles.js.map +0 -1
  390. package/dist/src/cli/commands/pause.d.ts +0 -13
  391. package/dist/src/cli/commands/pause.d.ts.map +0 -1
  392. package/dist/src/cli/commands/pause.js +0 -15
  393. package/dist/src/cli/commands/pause.js.map +0 -1
  394. package/dist/src/cli/commands/qa.d.ts +0 -54
  395. package/dist/src/cli/commands/qa.d.ts.map +0 -1
  396. package/dist/src/cli/commands/qa.js +0 -98
  397. package/dist/src/cli/commands/qa.js.map +0 -1
  398. package/dist/src/cli/commands/resume.d.ts +0 -12
  399. package/dist/src/cli/commands/resume.d.ts.map +0 -1
  400. package/dist/src/cli/commands/resume.js +0 -14
  401. package/dist/src/cli/commands/resume.js.map +0 -1
  402. package/dist/src/cli/commands/status.d.ts +0 -12
  403. package/dist/src/cli/commands/status.d.ts.map +0 -1
  404. package/dist/src/cli/commands/status.js +0 -23
  405. package/dist/src/cli/commands/status.js.map +0 -1
  406. package/dist/src/cli/commands/switch-project.d.ts +0 -13
  407. package/dist/src/cli/commands/switch-project.d.ts.map +0 -1
  408. package/dist/src/cli/commands/switch-project.js +0 -91
  409. package/dist/src/cli/commands/switch-project.js.map +0 -1
  410. package/dist/src/cli/commands/validate-jira.d.ts +0 -35
  411. package/dist/src/cli/commands/validate-jira.d.ts.map +0 -1
  412. package/dist/src/cli/commands/validate-jira.js +0 -112
  413. package/dist/src/cli/commands/validate-jira.js.map +0 -1
  414. package/dist/src/cli/commands/validate-plugins.d.ts +0 -41
  415. package/dist/src/cli/commands/validate-plugins.d.ts.map +0 -1
  416. package/dist/src/cli/commands/validate-plugins.js +0 -171
  417. package/dist/src/cli/commands/validate-plugins.js.map +0 -1
  418. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +0 -57
  419. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +0 -1
  420. package/dist/src/cli/helpers/issue-tracker/ado.js +0 -243
  421. package/dist/src/cli/helpers/issue-tracker/ado.js.map +0 -1
  422. package/dist/src/cli/helpers/issue-tracker/github.d.ts +0 -65
  423. package/dist/src/cli/helpers/issue-tracker/github.d.ts.map +0 -1
  424. package/dist/src/cli/helpers/issue-tracker/github.js +0 -426
  425. package/dist/src/cli/helpers/issue-tracker/github.js.map +0 -1
  426. package/dist/src/cli/helpers/issue-tracker/index.d.ts +0 -22
  427. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +0 -1
  428. package/dist/src/cli/helpers/issue-tracker/index.js +0 -314
  429. package/dist/src/cli/helpers/issue-tracker/index.js.map +0 -1
  430. package/dist/src/cli/helpers/issue-tracker/jira.d.ts +0 -61
  431. package/dist/src/cli/helpers/issue-tracker/jira.d.ts.map +0 -1
  432. package/dist/src/cli/helpers/issue-tracker/jira.js +0 -404
  433. package/dist/src/cli/helpers/issue-tracker/jira.js.map +0 -1
  434. package/dist/src/cli/helpers/issue-tracker/types.d.ts +0 -108
  435. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +0 -1
  436. package/dist/src/cli/helpers/issue-tracker/types.js +0 -16
  437. package/dist/src/cli/helpers/issue-tracker/types.js.map +0 -1
  438. package/dist/src/cli/helpers/issue-tracker/utils.d.ts +0 -112
  439. package/dist/src/cli/helpers/issue-tracker/utils.d.ts.map +0 -1
  440. package/dist/src/cli/helpers/issue-tracker/utils.js +0 -247
  441. package/dist/src/cli/helpers/issue-tracker/utils.js.map +0 -1
  442. package/dist/src/core/agent-model-manager.d.ts +0 -52
  443. package/dist/src/core/agent-model-manager.d.ts.map +0 -1
  444. package/dist/src/core/agent-model-manager.js +0 -120
  445. package/dist/src/core/agent-model-manager.js.map +0 -1
  446. package/dist/src/core/brownfield/analyzer.d.ts +0 -86
  447. package/dist/src/core/brownfield/analyzer.d.ts.map +0 -1
  448. package/dist/src/core/brownfield/analyzer.js +0 -365
  449. package/dist/src/core/brownfield/analyzer.js.map +0 -1
  450. package/dist/src/core/brownfield/importer.d.ts +0 -76
  451. package/dist/src/core/brownfield/importer.d.ts.map +0 -1
  452. package/dist/src/core/brownfield/importer.js +0 -287
  453. package/dist/src/core/brownfield/importer.js.map +0 -1
  454. package/dist/src/core/config-manager.d.ts +0 -47
  455. package/dist/src/core/config-manager.d.ts.map +0 -1
  456. package/dist/src/core/config-manager.js +0 -136
  457. package/dist/src/core/config-manager.js.map +0 -1
  458. package/dist/src/core/cost-tracker.d.ts +0 -108
  459. package/dist/src/core/cost-tracker.d.ts.map +0 -1
  460. package/dist/src/core/cost-tracker.js +0 -281
  461. package/dist/src/core/cost-tracker.js.map +0 -1
  462. package/dist/src/core/credentials-manager.d.ts +0 -107
  463. package/dist/src/core/credentials-manager.d.ts.map +0 -1
  464. package/dist/src/core/credentials-manager.js +0 -457
  465. package/dist/src/core/credentials-manager.js.map +0 -1
  466. package/dist/src/core/i18n/language-detector.d.ts +0 -29
  467. package/dist/src/core/i18n/language-detector.d.ts.map +0 -1
  468. package/dist/src/core/i18n/language-detector.js +0 -143
  469. package/dist/src/core/i18n/language-detector.js.map +0 -1
  470. package/dist/src/core/i18n/language-manager.d.ts +0 -101
  471. package/dist/src/core/i18n/language-manager.d.ts.map +0 -1
  472. package/dist/src/core/i18n/language-manager.js +0 -232
  473. package/dist/src/core/i18n/language-manager.js.map +0 -1
  474. package/dist/src/core/i18n/language-registry.d.ts +0 -44
  475. package/dist/src/core/i18n/language-registry.d.ts.map +0 -1
  476. package/dist/src/core/i18n/language-registry.js +0 -234
  477. package/dist/src/core/i18n/language-registry.js.map +0 -1
  478. package/dist/src/core/i18n/locale-manager.d.ts +0 -62
  479. package/dist/src/core/i18n/locale-manager.d.ts.map +0 -1
  480. package/dist/src/core/i18n/locale-manager.js +0 -137
  481. package/dist/src/core/i18n/locale-manager.js.map +0 -1
  482. package/dist/src/core/i18n/system-prompt-injector.d.ts +0 -33
  483. package/dist/src/core/i18n/system-prompt-injector.d.ts.map +0 -1
  484. package/dist/src/core/i18n/system-prompt-injector.js +0 -131
  485. package/dist/src/core/i18n/system-prompt-injector.js.map +0 -1
  486. package/dist/src/core/i18n/types.d.ts +0 -151
  487. package/dist/src/core/i18n/types.d.ts.map +0 -1
  488. package/dist/src/core/i18n/types.js +0 -11
  489. package/dist/src/core/i18n/types.js.map +0 -1
  490. package/dist/src/core/increment/limits.d.ts +0 -68
  491. package/dist/src/core/increment/limits.d.ts.map +0 -1
  492. package/dist/src/core/increment/limits.js +0 -224
  493. package/dist/src/core/increment/limits.js.map +0 -1
  494. package/dist/src/core/increment/metadata-manager.d.ts +0 -114
  495. package/dist/src/core/increment/metadata-manager.d.ts.map +0 -1
  496. package/dist/src/core/increment/metadata-manager.js +0 -320
  497. package/dist/src/core/increment/metadata-manager.js.map +0 -1
  498. package/dist/src/core/increment/status-commands.d.ts +0 -43
  499. package/dist/src/core/increment/status-commands.d.ts.map +0 -1
  500. package/dist/src/core/increment/status-commands.js +0 -277
  501. package/dist/src/core/increment/status-commands.js.map +0 -1
  502. package/dist/src/core/increment-status.d.ts +0 -72
  503. package/dist/src/core/increment-status.d.ts.map +0 -1
  504. package/dist/src/core/increment-status.js +0 -227
  505. package/dist/src/core/increment-status.js.map +0 -1
  506. package/dist/src/core/model-selector.d.ts +0 -57
  507. package/dist/src/core/model-selector.d.ts.map +0 -1
  508. package/dist/src/core/model-selector.js +0 -115
  509. package/dist/src/core/model-selector.js.map +0 -1
  510. package/dist/src/core/phase-detector.d.ts +0 -62
  511. package/dist/src/core/phase-detector.d.ts.map +0 -1
  512. package/dist/src/core/phase-detector.js +0 -229
  513. package/dist/src/core/phase-detector.js.map +0 -1
  514. package/dist/src/core/plugin-loader.d.ts +0 -131
  515. package/dist/src/core/plugin-loader.d.ts.map +0 -1
  516. package/dist/src/core/plugin-loader.js +0 -421
  517. package/dist/src/core/plugin-loader.js.map +0 -1
  518. package/dist/src/core/project-manager.d.ts +0 -127
  519. package/dist/src/core/project-manager.d.ts.map +0 -1
  520. package/dist/src/core/project-manager.js +0 -524
  521. package/dist/src/core/project-manager.js.map +0 -1
  522. package/dist/src/core/project-structure-detector.d.ts +0 -92
  523. package/dist/src/core/project-structure-detector.d.ts.map +0 -1
  524. package/dist/src/core/project-structure-detector.js +0 -289
  525. package/dist/src/core/project-structure-detector.js.map +0 -1
  526. package/dist/src/core/qa/qa-runner.d.ts +0 -16
  527. package/dist/src/core/qa/qa-runner.d.ts.map +0 -1
  528. package/dist/src/core/qa/qa-runner.js +0 -404
  529. package/dist/src/core/qa/qa-runner.js.map +0 -1
  530. package/dist/src/core/qa/quality-gate-decider.d.ts +0 -53
  531. package/dist/src/core/qa/quality-gate-decider.d.ts.map +0 -1
  532. package/dist/src/core/qa/quality-gate-decider.js +0 -268
  533. package/dist/src/core/qa/quality-gate-decider.js.map +0 -1
  534. package/dist/src/core/qa/risk-calculator.d.ts +0 -126
  535. package/dist/src/core/qa/risk-calculator.d.ts.map +0 -1
  536. package/dist/src/core/qa/risk-calculator.js +0 -247
  537. package/dist/src/core/qa/risk-calculator.js.map +0 -1
  538. package/dist/src/core/qa/types.d.ts +0 -315
  539. package/dist/src/core/qa/types.d.ts.map +0 -1
  540. package/dist/src/core/qa/types.js +0 -8
  541. package/dist/src/core/qa/types.js.map +0 -1
  542. package/dist/src/core/rfc-generator-v2.d.ts +0 -149
  543. package/dist/src/core/rfc-generator-v2.d.ts.map +0 -1
  544. package/dist/src/core/rfc-generator-v2.js +0 -399
  545. package/dist/src/core/rfc-generator-v2.js.map +0 -1
  546. package/dist/src/core/specs/spec-metadata-manager.d.ts +0 -70
  547. package/dist/src/core/specs/spec-metadata-manager.d.ts.map +0 -1
  548. package/dist/src/core/specs/spec-metadata-manager.js +0 -371
  549. package/dist/src/core/specs/spec-metadata-manager.js.map +0 -1
  550. package/dist/src/core/specs/spec-parser.d.ts +0 -66
  551. package/dist/src/core/specs/spec-parser.d.ts.map +0 -1
  552. package/dist/src/core/specs/spec-parser.js +0 -276
  553. package/dist/src/core/specs/spec-parser.js.map +0 -1
  554. package/dist/src/core/sync/bidirectional-engine.d.ts +0 -110
  555. package/dist/src/core/sync/bidirectional-engine.d.ts.map +0 -1
  556. package/dist/src/core/sync/bidirectional-engine.js +0 -356
  557. package/dist/src/core/sync/bidirectional-engine.js.map +0 -1
  558. package/dist/src/core/sync/folder-mapper.d.ts +0 -71
  559. package/dist/src/core/sync/folder-mapper.d.ts.map +0 -1
  560. package/dist/src/core/sync/folder-mapper.js +0 -168
  561. package/dist/src/core/sync/folder-mapper.js.map +0 -1
  562. package/dist/src/core/sync/profile-manager.d.ts +0 -72
  563. package/dist/src/core/sync/profile-manager.d.ts.map +0 -1
  564. package/dist/src/core/sync/profile-manager.js +0 -338
  565. package/dist/src/core/sync/profile-manager.js.map +0 -1
  566. package/dist/src/core/sync/profile-selector.d.ts +0 -52
  567. package/dist/src/core/sync/profile-selector.d.ts.map +0 -1
  568. package/dist/src/core/sync/profile-selector.js +0 -179
  569. package/dist/src/core/sync/profile-selector.js.map +0 -1
  570. package/dist/src/core/sync/profile-validator.d.ts +0 -52
  571. package/dist/src/core/sync/profile-validator.d.ts.map +0 -1
  572. package/dist/src/core/sync/profile-validator.js +0 -225
  573. package/dist/src/core/sync/profile-validator.js.map +0 -1
  574. package/dist/src/core/sync/project-context.d.ts +0 -81
  575. package/dist/src/core/sync/project-context.d.ts.map +0 -1
  576. package/dist/src/core/sync/project-context.js +0 -354
  577. package/dist/src/core/sync/project-context.js.map +0 -1
  578. package/dist/src/core/sync/rate-limiter.d.ts +0 -116
  579. package/dist/src/core/sync/rate-limiter.d.ts.map +0 -1
  580. package/dist/src/core/sync/rate-limiter.js +0 -308
  581. package/dist/src/core/sync/rate-limiter.js.map +0 -1
  582. package/dist/src/core/sync/time-range-selector.d.ts +0 -48
  583. package/dist/src/core/sync/time-range-selector.d.ts.map +0 -1
  584. package/dist/src/core/sync/time-range-selector.js +0 -224
  585. package/dist/src/core/sync/time-range-selector.js.map +0 -1
  586. package/dist/src/core/types/config.d.ts +0 -90
  587. package/dist/src/core/types/config.d.ts.map +0 -1
  588. package/dist/src/core/types/config.js +0 -44
  589. package/dist/src/core/types/config.js.map +0 -1
  590. package/dist/src/core/types/increment-metadata.d.ts +0 -120
  591. package/dist/src/core/types/increment-metadata.d.ts.map +0 -1
  592. package/dist/src/core/types/increment-metadata.js +0 -138
  593. package/dist/src/core/types/increment-metadata.js.map +0 -1
  594. package/dist/src/core/types/plugin.d.ts +0 -283
  595. package/dist/src/core/types/plugin.d.ts.map +0 -1
  596. package/dist/src/core/types/plugin.js +0 -49
  597. package/dist/src/core/types/plugin.js.map +0 -1
  598. package/dist/src/core/types/spec-metadata.d.ts +0 -229
  599. package/dist/src/core/types/spec-metadata.d.ts.map +0 -1
  600. package/dist/src/core/types/spec-metadata.js +0 -14
  601. package/dist/src/core/types/spec-metadata.js.map +0 -1
  602. package/dist/src/core/types/sync-profile.d.ts +0 -403
  603. package/dist/src/core/types/sync-profile.d.ts.map +0 -1
  604. package/dist/src/core/types/sync-profile.js +0 -55
  605. package/dist/src/core/types/sync-profile.js.map +0 -1
  606. package/dist/src/hooks/lib/git-diff-analyzer.d.ts +0 -89
  607. package/dist/src/hooks/lib/git-diff-analyzer.d.ts.map +0 -1
  608. package/dist/src/hooks/lib/git-diff-analyzer.js +0 -226
  609. package/dist/src/hooks/lib/git-diff-analyzer.js.map +0 -1
  610. package/dist/src/hooks/lib/invoke-translator-skill.d.ts +0 -60
  611. package/dist/src/hooks/lib/invoke-translator-skill.d.ts.map +0 -1
  612. package/dist/src/hooks/lib/invoke-translator-skill.js +0 -201
  613. package/dist/src/hooks/lib/invoke-translator-skill.js.map +0 -1
  614. package/dist/src/hooks/lib/prepare-reflection-context.d.ts +0 -42
  615. package/dist/src/hooks/lib/prepare-reflection-context.d.ts.map +0 -1
  616. package/dist/src/hooks/lib/prepare-reflection-context.js +0 -123
  617. package/dist/src/hooks/lib/prepare-reflection-context.js.map +0 -1
  618. package/dist/src/hooks/lib/reflection-config-loader.d.ts +0 -45
  619. package/dist/src/hooks/lib/reflection-config-loader.d.ts.map +0 -1
  620. package/dist/src/hooks/lib/reflection-config-loader.js +0 -132
  621. package/dist/src/hooks/lib/reflection-config-loader.js.map +0 -1
  622. package/dist/src/hooks/lib/reflection-parser.d.ts +0 -33
  623. package/dist/src/hooks/lib/reflection-parser.d.ts.map +0 -1
  624. package/dist/src/hooks/lib/reflection-parser.js +0 -419
  625. package/dist/src/hooks/lib/reflection-parser.js.map +0 -1
  626. package/dist/src/hooks/lib/reflection-prompt-builder.d.ts +0 -56
  627. package/dist/src/hooks/lib/reflection-prompt-builder.d.ts.map +0 -1
  628. package/dist/src/hooks/lib/reflection-prompt-builder.js +0 -239
  629. package/dist/src/hooks/lib/reflection-prompt-builder.js.map +0 -1
  630. package/dist/src/hooks/lib/reflection-storage.d.ts +0 -64
  631. package/dist/src/hooks/lib/reflection-storage.d.ts.map +0 -1
  632. package/dist/src/hooks/lib/reflection-storage.js +0 -305
  633. package/dist/src/hooks/lib/reflection-storage.js.map +0 -1
  634. package/dist/src/hooks/lib/run-self-reflection.d.ts +0 -43
  635. package/dist/src/hooks/lib/run-self-reflection.d.ts.map +0 -1
  636. package/dist/src/hooks/lib/run-self-reflection.js +0 -203
  637. package/dist/src/hooks/lib/run-self-reflection.js.map +0 -1
  638. package/dist/src/hooks/lib/sync-living-docs.d.ts +0 -27
  639. package/dist/src/hooks/lib/sync-living-docs.d.ts.map +0 -1
  640. package/dist/src/hooks/lib/sync-living-docs.js +0 -116
  641. package/dist/src/hooks/lib/sync-living-docs.js.map +0 -1
  642. package/dist/src/hooks/lib/translate-file.d.ts +0 -59
  643. package/dist/src/hooks/lib/translate-file.d.ts.map +0 -1
  644. package/dist/src/hooks/lib/translate-file.js +0 -350
  645. package/dist/src/hooks/lib/translate-file.js.map +0 -1
  646. package/dist/src/hooks/lib/translate-living-docs.d.ts +0 -13
  647. package/dist/src/hooks/lib/translate-living-docs.d.ts.map +0 -1
  648. package/dist/src/hooks/lib/translate-living-docs.js +0 -175
  649. package/dist/src/hooks/lib/translate-living-docs.js.map +0 -1
  650. package/dist/src/hooks/lib/types/reflection-types.d.ts +0 -164
  651. package/dist/src/hooks/lib/types/reflection-types.d.ts.map +0 -1
  652. package/dist/src/hooks/lib/types/reflection-types.js +0 -73
  653. package/dist/src/hooks/lib/types/reflection-types.js.map +0 -1
  654. package/dist/src/hooks/lib/update-tasks-md.d.ts +0 -29
  655. package/dist/src/hooks/lib/update-tasks-md.d.ts.map +0 -1
  656. package/dist/src/hooks/lib/update-tasks-md.js +0 -203
  657. package/dist/src/hooks/lib/update-tasks-md.js.map +0 -1
  658. package/dist/src/integrations/ado/ado-client.d.ts +0 -127
  659. package/dist/src/integrations/ado/ado-client.d.ts.map +0 -1
  660. package/dist/src/integrations/ado/ado-client.js +0 -416
  661. package/dist/src/integrations/ado/ado-client.js.map +0 -1
  662. package/dist/src/integrations/jira/jira-client.d.ts +0 -139
  663. package/dist/src/integrations/jira/jira-client.d.ts.map +0 -1
  664. package/dist/src/integrations/jira/jira-client.js +0 -386
  665. package/dist/src/integrations/jira/jira-client.js.map +0 -1
  666. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +0 -75
  667. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +0 -1
  668. package/dist/src/integrations/jira/jira-incremental-mapper.js +0 -474
  669. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +0 -1
  670. package/dist/src/integrations/jira/jira-mapper.d.ts +0 -105
  671. package/dist/src/integrations/jira/jira-mapper.d.ts.map +0 -1
  672. package/dist/src/integrations/jira/jira-mapper.js +0 -494
  673. package/dist/src/integrations/jira/jira-mapper.js.map +0 -1
  674. package/dist/src/metrics/calculators/change-failure-rate.d.ts +0 -22
  675. package/dist/src/metrics/calculators/change-failure-rate.d.ts.map +0 -1
  676. package/dist/src/metrics/calculators/change-failure-rate.js +0 -70
  677. package/dist/src/metrics/calculators/change-failure-rate.js.map +0 -1
  678. package/dist/src/metrics/calculators/deployment-frequency.d.ts +0 -20
  679. package/dist/src/metrics/calculators/deployment-frequency.d.ts.map +0 -1
  680. package/dist/src/metrics/calculators/deployment-frequency.js +0 -61
  681. package/dist/src/metrics/calculators/deployment-frequency.js.map +0 -1
  682. package/dist/src/metrics/calculators/lead-time.d.ts +0 -22
  683. package/dist/src/metrics/calculators/lead-time.d.ts.map +0 -1
  684. package/dist/src/metrics/calculators/lead-time.js +0 -82
  685. package/dist/src/metrics/calculators/lead-time.js.map +0 -1
  686. package/dist/src/metrics/calculators/mttr.d.ts +0 -21
  687. package/dist/src/metrics/calculators/mttr.d.ts.map +0 -1
  688. package/dist/src/metrics/calculators/mttr.js +0 -60
  689. package/dist/src/metrics/calculators/mttr.js.map +0 -1
  690. package/dist/src/metrics/dora-calculator.d.ts +0 -28
  691. package/dist/src/metrics/dora-calculator.d.ts.map +0 -1
  692. package/dist/src/metrics/dora-calculator.js +0 -117
  693. package/dist/src/metrics/dora-calculator.js.map +0 -1
  694. package/dist/src/metrics/github-client.d.ts +0 -51
  695. package/dist/src/metrics/github-client.d.ts.map +0 -1
  696. package/dist/src/metrics/github-client.js +0 -133
  697. package/dist/src/metrics/github-client.js.map +0 -1
  698. package/dist/src/metrics/report-generator.d.ts +0 -17
  699. package/dist/src/metrics/report-generator.d.ts.map +0 -1
  700. package/dist/src/metrics/report-generator.js +0 -403
  701. package/dist/src/metrics/report-generator.js.map +0 -1
  702. package/dist/src/metrics/types.d.ts +0 -112
  703. package/dist/src/metrics/types.d.ts.map +0 -1
  704. package/dist/src/metrics/types.js +0 -10
  705. package/dist/src/metrics/types.js.map +0 -1
  706. package/dist/src/metrics/utils/percentile.d.ts +0 -25
  707. package/dist/src/metrics/utils/percentile.d.ts.map +0 -1
  708. package/dist/src/metrics/utils/percentile.js +0 -46
  709. package/dist/src/metrics/utils/percentile.js.map +0 -1
  710. package/dist/src/metrics/utils/tier-classifier.d.ts +0 -61
  711. package/dist/src/metrics/utils/tier-classifier.d.ts.map +0 -1
  712. package/dist/src/metrics/utils/tier-classifier.js +0 -100
  713. package/dist/src/metrics/utils/tier-classifier.js.map +0 -1
  714. package/dist/src/testing/test-generator.d.ts +0 -117
  715. package/dist/src/testing/test-generator.d.ts.map +0 -1
  716. package/dist/src/testing/test-generator.js +0 -370
  717. package/dist/src/testing/test-generator.js.map +0 -1
  718. package/dist/src/types/cost-tracking.d.ts +0 -43
  719. package/dist/src/types/cost-tracking.d.ts.map +0 -1
  720. package/dist/src/types/cost-tracking.js +0 -8
  721. package/dist/src/types/cost-tracking.js.map +0 -1
  722. package/dist/src/types/model-selection.d.ts +0 -53
  723. package/dist/src/types/model-selection.d.ts.map +0 -1
  724. package/dist/src/types/model-selection.js +0 -12
  725. package/dist/src/types/model-selection.js.map +0 -1
  726. package/dist/src/utils/agents-md-compiler.d.ts +0 -68
  727. package/dist/src/utils/agents-md-compiler.d.ts.map +0 -1
  728. package/dist/src/utils/agents-md-compiler.js +0 -420
  729. package/dist/src/utils/agents-md-compiler.js.map +0 -1
  730. package/dist/src/utils/auth-helpers.d.ts +0 -58
  731. package/dist/src/utils/auth-helpers.d.ts.map +0 -1
  732. package/dist/src/utils/auth-helpers.js +0 -108
  733. package/dist/src/utils/auth-helpers.js.map +0 -1
  734. package/dist/src/utils/auto-install.d.ts +0 -47
  735. package/dist/src/utils/auto-install.d.ts.map +0 -1
  736. package/dist/src/utils/auto-install.js +0 -211
  737. package/dist/src/utils/auto-install.js.map +0 -1
  738. package/dist/src/utils/claude-cli-detector.d.ts +0 -75
  739. package/dist/src/utils/claude-cli-detector.d.ts.map +0 -1
  740. package/dist/src/utils/claude-cli-detector.js +0 -285
  741. package/dist/src/utils/claude-cli-detector.js.map +0 -1
  742. package/dist/src/utils/cost-reporter.d.ts +0 -58
  743. package/dist/src/utils/cost-reporter.d.ts.map +0 -1
  744. package/dist/src/utils/cost-reporter.js +0 -224
  745. package/dist/src/utils/cost-reporter.js.map +0 -1
  746. package/dist/src/utils/docs-preview/config-generator.d.ts +0 -46
  747. package/dist/src/utils/docs-preview/config-generator.d.ts.map +0 -1
  748. package/dist/src/utils/docs-preview/config-generator.js +0 -377
  749. package/dist/src/utils/docs-preview/config-generator.js.map +0 -1
  750. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +0 -38
  751. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +0 -1
  752. package/dist/src/utils/docs-preview/docusaurus-setup.js +0 -177
  753. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +0 -1
  754. package/dist/src/utils/docs-preview/index.d.ts +0 -7
  755. package/dist/src/utils/docs-preview/index.d.ts.map +0 -1
  756. package/dist/src/utils/docs-preview/index.js +0 -7
  757. package/dist/src/utils/docs-preview/index.js.map +0 -1
  758. package/dist/src/utils/docs-preview/package-installer.d.ts +0 -42
  759. package/dist/src/utils/docs-preview/package-installer.d.ts.map +0 -1
  760. package/dist/src/utils/docs-preview/package-installer.js +0 -182
  761. package/dist/src/utils/docs-preview/package-installer.js.map +0 -1
  762. package/dist/src/utils/docs-preview/server-manager.d.ts +0 -30
  763. package/dist/src/utils/docs-preview/server-manager.d.ts.map +0 -1
  764. package/dist/src/utils/docs-preview/server-manager.js +0 -212
  765. package/dist/src/utils/docs-preview/server-manager.js.map +0 -1
  766. package/dist/src/utils/docs-preview/sidebar-builder.d.ts +0 -32
  767. package/dist/src/utils/docs-preview/sidebar-builder.d.ts.map +0 -1
  768. package/dist/src/utils/docs-preview/sidebar-builder.js +0 -202
  769. package/dist/src/utils/docs-preview/sidebar-builder.js.map +0 -1
  770. package/dist/src/utils/docs-preview/types.d.ts +0 -57
  771. package/dist/src/utils/docs-preview/types.d.ts.map +0 -1
  772. package/dist/src/utils/docs-preview/types.js +0 -2
  773. package/dist/src/utils/docs-preview/types.js.map +0 -1
  774. package/dist/src/utils/env-file.d.ts +0 -88
  775. package/dist/src/utils/env-file.d.ts.map +0 -1
  776. package/dist/src/utils/env-file.js +0 -180
  777. package/dist/src/utils/env-file.js.map +0 -1
  778. package/dist/src/utils/env-multi-project-parser.d.ts +0 -220
  779. package/dist/src/utils/env-multi-project-parser.d.ts.map +0 -1
  780. package/dist/src/utils/env-multi-project-parser.js +0 -403
  781. package/dist/src/utils/env-multi-project-parser.js.map +0 -1
  782. package/dist/src/utils/esm-helpers.d.ts +0 -50
  783. package/dist/src/utils/esm-helpers.d.ts.map +0 -1
  784. package/dist/src/utils/esm-helpers.js +0 -57
  785. package/dist/src/utils/esm-helpers.js.map +0 -1
  786. package/dist/src/utils/execFileNoThrow.d.ts +0 -99
  787. package/dist/src/utils/execFileNoThrow.d.ts.map +0 -1
  788. package/dist/src/utils/execFileNoThrow.js +0 -137
  789. package/dist/src/utils/execFileNoThrow.js.map +0 -1
  790. package/dist/src/utils/external-resource-validator.d.ts +0 -102
  791. package/dist/src/utils/external-resource-validator.d.ts.map +0 -1
  792. package/dist/src/utils/external-resource-validator.js +0 -442
  793. package/dist/src/utils/external-resource-validator.js.map +0 -1
  794. package/dist/src/utils/generate-skills-index.d.ts +0 -24
  795. package/dist/src/utils/generate-skills-index.d.ts.map +0 -1
  796. package/dist/src/utils/generate-skills-index.js +0 -410
  797. package/dist/src/utils/generate-skills-index.js.map +0 -1
  798. package/dist/src/utils/model-selection.d.ts +0 -75
  799. package/dist/src/utils/model-selection.d.ts.map +0 -1
  800. package/dist/src/utils/model-selection.js +0 -204
  801. package/dist/src/utils/model-selection.js.map +0 -1
  802. package/dist/src/utils/plugin-validator.d.ts +0 -161
  803. package/dist/src/utils/plugin-validator.d.ts.map +0 -1
  804. package/dist/src/utils/plugin-validator.js +0 -558
  805. package/dist/src/utils/plugin-validator.js.map +0 -1
  806. package/dist/src/utils/pricing-constants.d.ts +0 -70
  807. package/dist/src/utils/pricing-constants.d.ts.map +0 -1
  808. package/dist/src/utils/pricing-constants.js +0 -71
  809. package/dist/src/utils/pricing-constants.js.map +0 -1
  810. package/dist/src/utils/project-detection.d.ts +0 -141
  811. package/dist/src/utils/project-detection.d.ts.map +0 -1
  812. package/dist/src/utils/project-detection.js +0 -321
  813. package/dist/src/utils/project-detection.js.map +0 -1
  814. package/dist/src/utils/string-utils.d.ts +0 -40
  815. package/dist/src/utils/string-utils.d.ts.map +0 -1
  816. package/dist/src/utils/string-utils.js +0 -58
  817. package/dist/src/utils/string-utils.js.map +0 -1
  818. package/dist/src/utils/translation.d.ts +0 -187
  819. package/dist/src/utils/translation.d.ts.map +0 -1
  820. package/dist/src/utils/translation.js +0 -414
  821. package/dist/src/utils/translation.js.map +0 -1
  822. package/plugins/specweave-github/hooks/post-increment-done.sh +0 -224
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Increment Profile Selector
3
+ *
4
+ * Handles profile selection when creating new increments
5
+ * in multi-repository projects
6
+ *
7
+ * @module cli/helpers/github/increment-profile-selector
8
+ */
9
+ import * as fs from 'fs';
10
+ import * as path from 'path';
11
+ import chalk from 'chalk';
12
+ import { GitHubProfileManager } from './profile-manager.js';
13
+ /**
14
+ * Select GitHub profile for an increment
15
+ *
16
+ * @param projectPath - Path to project root
17
+ * @param incrementId - Increment identifier
18
+ * @returns Selected profile ID or null
19
+ */
20
+ export async function selectProfileForIncrement(projectPath, incrementId) {
21
+ const manager = new GitHubProfileManager(projectPath);
22
+ // Check if profiles exist
23
+ if (!manager.hasProfiles()) {
24
+ console.log(chalk.gray('No GitHub profiles configured - skipping repository selection'));
25
+ return null;
26
+ }
27
+ const profileCount = manager.getProfileCount();
28
+ // If only one profile, auto-select it
29
+ if (profileCount === 1) {
30
+ const profile = manager.getActiveProfile();
31
+ if (profile) {
32
+ console.log(chalk.gray(`Using GitHub repository: ${profile.config.owner}/${profile.config.repo}`));
33
+ return profile.id;
34
+ }
35
+ }
36
+ // Multiple profiles - prompt for selection
37
+ console.log(chalk.cyan('\n🎯 Repository Selection\n'));
38
+ console.log(chalk.gray(`Select the GitHub repository for increment ${incrementId}:\n`));
39
+ const profile = await manager.selectProfile(`Which repository should '${incrementId}' sync to?`);
40
+ if (profile) {
41
+ console.log(chalk.green(`✓ Selected: ${profile.displayName} (${profile.config.owner}/${profile.config.repo})\n`));
42
+ return profile.id;
43
+ }
44
+ return null;
45
+ }
46
+ /**
47
+ * Save profile selection to increment metadata
48
+ *
49
+ * @param projectPath - Path to project root
50
+ * @param incrementId - Increment identifier
51
+ * @param profileId - Selected profile ID
52
+ */
53
+ export async function saveIncrementProfile(projectPath, incrementId, profileId) {
54
+ const metadataPath = path.join(projectPath, '.specweave', 'increments', incrementId, 'metadata.json');
55
+ let metadata;
56
+ // Load existing metadata or create new
57
+ if (fs.existsSync(metadataPath)) {
58
+ const content = fs.readFileSync(metadataPath, 'utf-8');
59
+ metadata = JSON.parse(content);
60
+ metadata.githubProfile = profileId;
61
+ metadata.updatedAt = new Date().toISOString();
62
+ }
63
+ else {
64
+ metadata = {
65
+ incrementId,
66
+ githubProfile: profileId,
67
+ createdAt: new Date().toISOString(),
68
+ updatedAt: new Date().toISOString()
69
+ };
70
+ }
71
+ // Ensure directory exists
72
+ const dir = path.dirname(metadataPath);
73
+ if (!fs.existsSync(dir)) {
74
+ fs.mkdirSync(dir, { recursive: true });
75
+ }
76
+ // Save metadata
77
+ fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2) + '\n');
78
+ }
79
+ /**
80
+ * Get profile for an existing increment
81
+ *
82
+ * @param projectPath - Path to project root
83
+ * @param incrementId - Increment identifier
84
+ * @returns Profile ID or null
85
+ */
86
+ export function getIncrementProfile(projectPath, incrementId) {
87
+ const metadataPath = path.join(projectPath, '.specweave', 'increments', incrementId, 'metadata.json');
88
+ if (!fs.existsSync(metadataPath)) {
89
+ return null;
90
+ }
91
+ try {
92
+ const content = fs.readFileSync(metadataPath, 'utf-8');
93
+ const metadata = JSON.parse(content);
94
+ return metadata.githubProfile || null;
95
+ }
96
+ catch (error) {
97
+ console.error(chalk.red(`Failed to read increment metadata: ${error}`));
98
+ return null;
99
+ }
100
+ }
101
+ /**
102
+ * Prompt to change profile for an increment
103
+ *
104
+ * @param projectPath - Path to project root
105
+ * @param incrementId - Increment identifier
106
+ * @returns New profile ID or null
107
+ */
108
+ export async function changeIncrementProfile(projectPath, incrementId) {
109
+ const manager = new GitHubProfileManager(projectPath);
110
+ const currentProfileId = getIncrementProfile(projectPath, incrementId);
111
+ if (!manager.hasProfiles()) {
112
+ console.log(chalk.yellow('No GitHub profiles configured'));
113
+ return null;
114
+ }
115
+ // Show current profile
116
+ if (currentProfileId) {
117
+ const currentProfile = manager.getProfile(currentProfileId);
118
+ if (currentProfile) {
119
+ console.log(chalk.gray(`Current repository: ${currentProfile.displayName} (${currentProfile.config.owner}/${currentProfile.config.repo})`));
120
+ }
121
+ }
122
+ else {
123
+ console.log(chalk.gray('No repository currently selected'));
124
+ }
125
+ // Prompt for new profile
126
+ const newProfile = await manager.selectProfile('Select new repository:');
127
+ if (newProfile && newProfile.id !== currentProfileId) {
128
+ await saveIncrementProfile(projectPath, incrementId, newProfile.id);
129
+ console.log(chalk.green(`✓ Changed to: ${newProfile.displayName}`));
130
+ return newProfile.id;
131
+ }
132
+ return null;
133
+ }
134
+ /**
135
+ * List all increments grouped by profile
136
+ *
137
+ * @param projectPath - Path to project root
138
+ */
139
+ export function listIncrementsByProfile(projectPath) {
140
+ const manager = new GitHubProfileManager(projectPath);
141
+ const incrementsDir = path.join(projectPath, '.specweave', 'increments');
142
+ if (!fs.existsSync(incrementsDir)) {
143
+ console.log(chalk.yellow('No increments found'));
144
+ return;
145
+ }
146
+ // Build profile map
147
+ const profileMap = new Map();
148
+ const noProfile = [];
149
+ // Scan all increments
150
+ const increments = fs.readdirSync(incrementsDir)
151
+ .filter(dir => dir.match(/^\d{4}-/)); // Only numbered increments
152
+ for (const incrementId of increments) {
153
+ const profileId = getIncrementProfile(projectPath, incrementId);
154
+ if (profileId) {
155
+ if (!profileMap.has(profileId)) {
156
+ profileMap.set(profileId, []);
157
+ }
158
+ profileMap.get(profileId).push(incrementId);
159
+ }
160
+ else {
161
+ noProfile.push(incrementId);
162
+ }
163
+ }
164
+ // Display results
165
+ console.log(chalk.cyan('\nIncrements by Repository:\n'));
166
+ // Show mapped increments
167
+ for (const [profileId, incrementIds] of profileMap) {
168
+ const profile = manager.getProfile(profileId);
169
+ if (profile) {
170
+ console.log(chalk.white(`${profile.displayName} (${profile.config.owner}/${profile.config.repo}):`));
171
+ incrementIds.forEach(id => {
172
+ console.log(` - ${id}`);
173
+ });
174
+ console.log('');
175
+ }
176
+ }
177
+ // Show unmapped increments
178
+ if (noProfile.length > 0) {
179
+ console.log(chalk.yellow('No repository assigned:'));
180
+ noProfile.forEach(id => {
181
+ console.log(` - ${id}`);
182
+ });
183
+ console.log('');
184
+ }
185
+ }
186
+ //# sourceMappingURL=increment-profile-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"increment-profile-selector.js","sourceRoot":"","sources":["../../../../src/cli/helpers/github/increment-profile-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAc5D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,WAAmB,EACnB,WAAmB;IAEnB,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEtD,0BAA0B;IAC1B,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC,CAA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C3B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * GitHub Profile Manager
3
+ *
4
+ * Manages multiple GitHub repository profiles for multi-repo projects
5
+ * Handles CRUD operations and profile selection for increments
6
+ *
7
+ * @module cli/helpers/github/profile-manager
8
+ */
9
+ /**
10
+ * GitHub repository profile
11
+ */
12
+ export interface GitHubProfile {
13
+ id: string;
14
+ provider: 'github';
15
+ displayName: string;
16
+ config: {
17
+ owner: string;
18
+ repo: string;
19
+ monorepoProjects?: string[];
20
+ };
21
+ timeRange?: {
22
+ default: string;
23
+ max: string;
24
+ };
25
+ rateLimits?: {
26
+ maxItemsPerSync: number;
27
+ warnThreshold: number;
28
+ };
29
+ }
30
+ /**
31
+ * GitHub Profile Manager
32
+ *
33
+ * Handles all profile-related operations
34
+ */
35
+ export declare class GitHubProfileManager {
36
+ private configPath;
37
+ private config;
38
+ constructor(projectPath: string);
39
+ /**
40
+ * Load config from disk
41
+ */
42
+ private loadConfig;
43
+ /**
44
+ * Save config to disk
45
+ */
46
+ private saveConfig;
47
+ /**
48
+ * Get all GitHub profiles
49
+ *
50
+ * @returns Array of GitHub profiles
51
+ */
52
+ getAllProfiles(): GitHubProfile[];
53
+ /**
54
+ * Get a specific profile by ID
55
+ *
56
+ * @param id - Profile ID
57
+ * @returns Profile or null
58
+ */
59
+ getProfile(id: string): GitHubProfile | null;
60
+ /**
61
+ * Get the active/default profile
62
+ *
63
+ * @returns Active profile or null
64
+ */
65
+ getActiveProfile(): GitHubProfile | null;
66
+ /**
67
+ * Add a new profile
68
+ *
69
+ * @param profile - Profile to add
70
+ * @returns Success status
71
+ */
72
+ addProfile(profile: Omit<GitHubProfile, 'provider'>): boolean;
73
+ /**
74
+ * Update an existing profile
75
+ *
76
+ * @param id - Profile ID
77
+ * @param updates - Partial profile updates
78
+ * @returns Success status
79
+ */
80
+ updateProfile(id: string, updates: Partial<Omit<GitHubProfile, 'id' | 'provider'>>): boolean;
81
+ /**
82
+ * Delete a profile
83
+ *
84
+ * @param id - Profile ID
85
+ * @returns Success status
86
+ */
87
+ deleteProfile(id: string): boolean;
88
+ /**
89
+ * Set active profile
90
+ *
91
+ * @param id - Profile ID
92
+ * @returns Success status
93
+ */
94
+ setActiveProfile(id: string): boolean;
95
+ /**
96
+ * Interactive profile selection
97
+ *
98
+ * @param message - Prompt message
99
+ * @returns Selected profile or null
100
+ */
101
+ selectProfile(message?: string): Promise<GitHubProfile | null>;
102
+ /**
103
+ * Check if any profiles exist
104
+ *
105
+ * @returns True if profiles exist
106
+ */
107
+ hasProfiles(): boolean;
108
+ /**
109
+ * Get profile count
110
+ *
111
+ * @returns Number of profiles
112
+ */
113
+ getProfileCount(): number;
114
+ /**
115
+ * List all profiles (formatted for display)
116
+ */
117
+ listProfiles(): void;
118
+ }
119
+ //# sourceMappingURL=profile-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-manager.d.ts","sourceRoot":"","sources":["../../../../src/cli/helpers/github/profile-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,UAAU,CAAC,EAAE;QACX,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAkBD;;;;GAIG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAkB;gBAEpB,WAAW,EAAE,MAAM;IAK/B;;OAEG;IACH,OAAO,CAAC,UAAU;IAgClB;;OAEG;IACH,OAAO,CAAC,UAAU;IAalB;;;;OAIG;IACH,cAAc,IAAI,aAAa,EAAE;IAUjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI;IAQ5C;;;;OAIG;IACH,gBAAgB,IAAI,aAAa,GAAG,IAAI;IAUxC;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,GAAG,OAAO;IA4C7D;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,UAAU,CAAC,CAAC,GAAG,OAAO;IAuB5F;;;;;OAKG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IA+BlC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAiBrC;;;;;OAKG;IACG,aAAa,CAAC,OAAO,GAAE,MAAoC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA2BjG;;;;OAIG;IACH,WAAW,IAAI,OAAO;IAItB;;;;OAIG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,YAAY,IAAI,IAAI;CAwBrB"}
@@ -0,0 +1,311 @@
1
+ /**
2
+ * GitHub Profile Manager
3
+ *
4
+ * Manages multiple GitHub repository profiles for multi-repo projects
5
+ * Handles CRUD operations and profile selection for increments
6
+ *
7
+ * @module cli/helpers/github/profile-manager
8
+ */
9
+ import * as fs from 'fs';
10
+ import * as path from 'path';
11
+ import chalk from 'chalk';
12
+ import inquirer from 'inquirer';
13
+ /**
14
+ * GitHub Profile Manager
15
+ *
16
+ * Handles all profile-related operations
17
+ */
18
+ export class GitHubProfileManager {
19
+ constructor(projectPath) {
20
+ this.configPath = path.join(projectPath, '.specweave', 'config.json');
21
+ this.loadConfig();
22
+ }
23
+ /**
24
+ * Load config from disk
25
+ */
26
+ loadConfig() {
27
+ try {
28
+ if (fs.existsSync(this.configPath)) {
29
+ const content = fs.readFileSync(this.configPath, 'utf-8');
30
+ this.config = JSON.parse(content);
31
+ }
32
+ else {
33
+ this.config = {};
34
+ }
35
+ // Ensure sync structure exists
36
+ if (!this.config.sync) {
37
+ this.config.sync = {
38
+ enabled: false,
39
+ activeProfile: '',
40
+ profiles: {}
41
+ };
42
+ }
43
+ if (!this.config.sync.profiles) {
44
+ this.config.sync.profiles = {};
45
+ }
46
+ }
47
+ catch (error) {
48
+ console.error(chalk.red('Failed to load config:'), error);
49
+ this.config = {
50
+ sync: {
51
+ enabled: false,
52
+ activeProfile: '',
53
+ profiles: {}
54
+ }
55
+ };
56
+ }
57
+ }
58
+ /**
59
+ * Save config to disk
60
+ */
61
+ saveConfig() {
62
+ try {
63
+ const dir = path.dirname(this.configPath);
64
+ if (!fs.existsSync(dir)) {
65
+ fs.mkdirSync(dir, { recursive: true });
66
+ }
67
+ fs.writeFileSync(this.configPath, JSON.stringify(this.config, null, 2) + '\n');
68
+ }
69
+ catch (error) {
70
+ console.error(chalk.red('Failed to save config:'), error);
71
+ throw error;
72
+ }
73
+ }
74
+ /**
75
+ * Get all GitHub profiles
76
+ *
77
+ * @returns Array of GitHub profiles
78
+ */
79
+ getAllProfiles() {
80
+ if (!this.config.sync?.profiles) {
81
+ return [];
82
+ }
83
+ return Object.entries(this.config.sync.profiles)
84
+ .filter(([_, profile]) => profile.provider === 'github')
85
+ .map(([id, profile]) => ({ ...profile, id }));
86
+ }
87
+ /**
88
+ * Get a specific profile by ID
89
+ *
90
+ * @param id - Profile ID
91
+ * @returns Profile or null
92
+ */
93
+ getProfile(id) {
94
+ const profile = this.config.sync?.profiles?.[id];
95
+ if (!profile || profile.provider !== 'github') {
96
+ return null;
97
+ }
98
+ return { ...profile, id };
99
+ }
100
+ /**
101
+ * Get the active/default profile
102
+ *
103
+ * @returns Active profile or null
104
+ */
105
+ getActiveProfile() {
106
+ const activeId = this.config.sync?.activeProfile;
107
+ if (!activeId) {
108
+ // If no active profile set, return the first GitHub profile
109
+ const profiles = this.getAllProfiles();
110
+ return profiles.length > 0 ? profiles[0] : null;
111
+ }
112
+ return this.getProfile(activeId);
113
+ }
114
+ /**
115
+ * Add a new profile
116
+ *
117
+ * @param profile - Profile to add
118
+ * @returns Success status
119
+ */
120
+ addProfile(profile) {
121
+ try {
122
+ if (!this.config.sync) {
123
+ this.config.sync = {
124
+ enabled: true,
125
+ activeProfile: profile.id,
126
+ profiles: {}
127
+ };
128
+ }
129
+ // Check if ID already exists
130
+ if (this.config.sync.profiles[profile.id]) {
131
+ console.error(chalk.red(`Profile with ID '${profile.id}' already exists`));
132
+ return false;
133
+ }
134
+ // Add the profile
135
+ this.config.sync.profiles[profile.id] = {
136
+ ...profile,
137
+ provider: 'github',
138
+ timeRange: profile.timeRange || {
139
+ default: '1M',
140
+ max: '6M'
141
+ },
142
+ rateLimits: profile.rateLimits || {
143
+ maxItemsPerSync: 500,
144
+ warnThreshold: 100
145
+ }
146
+ };
147
+ // Set as active if it's the first profile
148
+ if (!this.config.sync.activeProfile) {
149
+ this.config.sync.activeProfile = profile.id;
150
+ this.config.sync.enabled = true;
151
+ }
152
+ this.saveConfig();
153
+ return true;
154
+ }
155
+ catch (error) {
156
+ console.error(chalk.red('Failed to add profile:'), error);
157
+ return false;
158
+ }
159
+ }
160
+ /**
161
+ * Update an existing profile
162
+ *
163
+ * @param id - Profile ID
164
+ * @param updates - Partial profile updates
165
+ * @returns Success status
166
+ */
167
+ updateProfile(id, updates) {
168
+ try {
169
+ const profile = this.config.sync?.profiles?.[id];
170
+ if (!profile) {
171
+ console.error(chalk.red(`Profile '${id}' not found`));
172
+ return false;
173
+ }
174
+ // Update the profile
175
+ this.config.sync.profiles[id] = {
176
+ ...profile,
177
+ ...updates,
178
+ provider: 'github' // Ensure provider stays as github
179
+ };
180
+ this.saveConfig();
181
+ return true;
182
+ }
183
+ catch (error) {
184
+ console.error(chalk.red('Failed to update profile:'), error);
185
+ return false;
186
+ }
187
+ }
188
+ /**
189
+ * Delete a profile
190
+ *
191
+ * @param id - Profile ID
192
+ * @returns Success status
193
+ */
194
+ deleteProfile(id) {
195
+ try {
196
+ if (!this.config.sync?.profiles?.[id]) {
197
+ console.error(chalk.red(`Profile '${id}' not found`));
198
+ return false;
199
+ }
200
+ // Delete the profile
201
+ delete this.config.sync.profiles[id];
202
+ // Update active profile if necessary
203
+ if (this.config.sync.activeProfile === id) {
204
+ const remainingProfiles = this.getAllProfiles();
205
+ this.config.sync.activeProfile = remainingProfiles.length > 0
206
+ ? remainingProfiles[0].id
207
+ : '';
208
+ // Disable sync if no profiles left
209
+ if (remainingProfiles.length === 0) {
210
+ this.config.sync.enabled = false;
211
+ }
212
+ }
213
+ this.saveConfig();
214
+ return true;
215
+ }
216
+ catch (error) {
217
+ console.error(chalk.red('Failed to delete profile:'), error);
218
+ return false;
219
+ }
220
+ }
221
+ /**
222
+ * Set active profile
223
+ *
224
+ * @param id - Profile ID
225
+ * @returns Success status
226
+ */
227
+ setActiveProfile(id) {
228
+ try {
229
+ if (!this.config.sync?.profiles?.[id]) {
230
+ console.error(chalk.red(`Profile '${id}' not found`));
231
+ return false;
232
+ }
233
+ this.config.sync.activeProfile = id;
234
+ this.config.sync.enabled = true;
235
+ this.saveConfig();
236
+ return true;
237
+ }
238
+ catch (error) {
239
+ console.error(chalk.red('Failed to set active profile:'), error);
240
+ return false;
241
+ }
242
+ }
243
+ /**
244
+ * Interactive profile selection
245
+ *
246
+ * @param message - Prompt message
247
+ * @returns Selected profile or null
248
+ */
249
+ async selectProfile(message = 'Select GitHub repository:') {
250
+ const profiles = this.getAllProfiles();
251
+ if (profiles.length === 0) {
252
+ console.log(chalk.yellow('No GitHub profiles configured'));
253
+ return null;
254
+ }
255
+ if (profiles.length === 1) {
256
+ // Auto-select if only one profile
257
+ return profiles[0];
258
+ }
259
+ const { selectedId } = await inquirer.prompt([{
260
+ type: 'list',
261
+ name: 'selectedId',
262
+ message,
263
+ choices: profiles.map(p => ({
264
+ name: `${p.displayName} (${p.config.owner}/${p.config.repo})`,
265
+ value: p.id,
266
+ short: p.id
267
+ }))
268
+ }]);
269
+ return this.getProfile(selectedId);
270
+ }
271
+ /**
272
+ * Check if any profiles exist
273
+ *
274
+ * @returns True if profiles exist
275
+ */
276
+ hasProfiles() {
277
+ return this.getAllProfiles().length > 0;
278
+ }
279
+ /**
280
+ * Get profile count
281
+ *
282
+ * @returns Number of profiles
283
+ */
284
+ getProfileCount() {
285
+ return this.getAllProfiles().length;
286
+ }
287
+ /**
288
+ * List all profiles (formatted for display)
289
+ */
290
+ listProfiles() {
291
+ const profiles = this.getAllProfiles();
292
+ const activeId = this.config.sync?.activeProfile;
293
+ if (profiles.length === 0) {
294
+ console.log(chalk.yellow('No GitHub profiles configured'));
295
+ return;
296
+ }
297
+ console.log(chalk.cyan('\nGitHub Repository Profiles:\n'));
298
+ profiles.forEach(profile => {
299
+ const isActive = profile.id === activeId;
300
+ const marker = isActive ? chalk.green('✓') : ' ';
301
+ const label = isActive ? chalk.green('(active)') : '';
302
+ console.log(`${marker} ${chalk.white(profile.id)}: ${profile.displayName} ${label}`);
303
+ console.log(` ${chalk.gray(`${profile.config.owner}/${profile.config.repo}`)}`);
304
+ if (profile.config.monorepoProjects && profile.config.monorepoProjects.length > 0) {
305
+ console.log(` ${chalk.gray('Projects:')} ${profile.config.monorepoProjects.join(', ')}`);
306
+ }
307
+ });
308
+ console.log('');
309
+ }
310
+ }
311
+ //# sourceMappingURL=profile-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-manager.js","sourceRoot":"","sources":["../../../../src/cli/helpers/github/profile-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,I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