specweave 0.33.5 → 0.34.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 (683) hide show
  1. package/.claude-plugin/README.md +13 -13
  2. package/.claude-plugin/marketplace.json +26 -37
  3. package/CLAUDE.md +427 -70
  4. package/README.md +34 -31
  5. package/bin/fix-marketplace-errors.sh +1 -1
  6. package/bin/install-commands.sh +2 -2
  7. package/bin/specweave.js +58 -1
  8. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +5 -0
  9. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts.map +1 -1
  10. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +14 -4
  11. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +1 -1
  12. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts +1 -0
  13. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts.map +1 -1
  14. package/dist/plugins/specweave-github/lib/completion-calculator.js +2 -0
  15. package/dist/plugins/specweave-github/lib/completion-calculator.js.map +1 -1
  16. package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts.map +1 -1
  17. package/dist/plugins/specweave-github/lib/duplicate-detector.js +20 -6
  18. package/dist/plugins/specweave-github/lib/duplicate-detector.js.map +1 -1
  19. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +9 -0
  20. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  21. package/dist/plugins/specweave-github/lib/github-client-v2.js +31 -18
  22. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  23. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +7 -0
  24. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  25. package/dist/plugins/specweave-github/lib/github-feature-sync.js +47 -11
  26. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  27. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +39 -13
  28. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +1 -1
  29. package/dist/plugins/specweave-github/lib/github-issue-updater.d.ts.map +1 -1
  30. package/dist/plugins/specweave-github/lib/github-issue-updater.js +15 -3
  31. package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -1
  32. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +7 -0
  33. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts.map +1 -1
  34. package/dist/plugins/specweave-github/lib/github-spec-sync.js +17 -4
  35. package/dist/plugins/specweave-github/lib/github-spec-sync.js.map +1 -1
  36. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -1
  37. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +13 -3
  38. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
  39. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +1 -1
  40. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +14 -4
  41. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -1
  42. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +1 -1
  43. package/dist/plugins/specweave-github/lib/increment-issue-builder.js +24 -8
  44. package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +1 -1
  45. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -1
  46. package/dist/plugins/specweave-github/lib/user-story-content-builder.js +21 -18
  47. package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -1
  48. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts +3 -0
  49. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
  50. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +20 -19
  51. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
  52. package/dist/src/cli/cleanup-zombies.js +34 -18
  53. package/dist/src/cli/cleanup-zombies.js.map +1 -1
  54. package/dist/src/cli/commands/discrepancies.js +6 -6
  55. package/dist/src/cli/commands/discrepancies.js.map +1 -1
  56. package/dist/src/cli/commands/docs.js +1 -1
  57. package/dist/src/cli/commands/docs.js.map +1 -1
  58. package/dist/src/cli/commands/import-docs.d.ts +1 -1
  59. package/dist/src/cli/commands/import-docs.js +2 -2
  60. package/dist/src/cli/commands/import-docs.js.map +1 -1
  61. package/dist/src/cli/commands/import-external.d.ts +1 -1
  62. package/dist/src/cli/commands/import-external.js +1 -1
  63. package/dist/src/cli/commands/init-multiproject.d.ts +1 -1
  64. package/dist/src/cli/commands/init-multiproject.js +3 -3
  65. package/dist/src/cli/commands/init-multiproject.js.map +1 -1
  66. package/dist/src/cli/commands/init.js +2 -2
  67. package/dist/src/cli/commands/init.js.map +1 -1
  68. package/dist/src/cli/commands/living-docs.d.ts +1 -0
  69. package/dist/src/cli/commands/living-docs.d.ts.map +1 -1
  70. package/dist/src/cli/commands/living-docs.js +18 -2
  71. package/dist/src/cli/commands/living-docs.js.map +1 -1
  72. package/dist/src/cli/commands/migrate-to-multiproject.js +1 -1
  73. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  74. package/dist/src/cli/commands/migrate-to-profiles.js +1 -1
  75. package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
  76. package/dist/src/cli/commands/next-command.d.ts +1 -1
  77. package/dist/src/cli/commands/next-command.js +9 -9
  78. package/dist/src/cli/commands/next-command.js.map +1 -1
  79. package/dist/src/cli/commands/notifications.js +3 -3
  80. package/dist/src/cli/commands/notifications.js.map +1 -1
  81. package/dist/src/cli/commands/plan/increment-detector.js +2 -2
  82. package/dist/src/cli/commands/plan/increment-detector.js.map +1 -1
  83. package/dist/src/cli/commands/plan/plan-orchestrator.d.ts +2 -2
  84. package/dist/src/cli/commands/plan/plan-orchestrator.js +2 -2
  85. package/dist/src/cli/commands/plan/plan-validator.js +2 -2
  86. package/dist/src/cli/commands/plan/plan-validator.js.map +1 -1
  87. package/dist/src/cli/commands/plan/types.d.ts +1 -1
  88. package/dist/src/cli/commands/plan/types.js +1 -1
  89. package/dist/src/cli/commands/plan-command.d.ts +3 -3
  90. package/dist/src/cli/commands/plan-command.js +12 -12
  91. package/dist/src/cli/commands/plan-command.js.map +1 -1
  92. package/dist/src/cli/commands/project.d.ts +77 -0
  93. package/dist/src/cli/commands/project.d.ts.map +1 -0
  94. package/dist/src/cli/commands/project.js +526 -0
  95. package/dist/src/cli/commands/project.js.map +1 -0
  96. package/dist/src/cli/commands/save.d.ts +49 -0
  97. package/dist/src/cli/commands/save.d.ts.map +1 -0
  98. package/dist/src/cli/commands/save.js +583 -0
  99. package/dist/src/cli/commands/save.js.map +1 -0
  100. package/dist/src/cli/commands/sync-spec-commits.js +15 -6
  101. package/dist/src/cli/commands/sync-spec-commits.js.map +1 -1
  102. package/dist/src/cli/commands/sync-spec-content.js +15 -6
  103. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  104. package/dist/src/cli/helpers/init/ado-repo-cloning.js +2 -2
  105. package/dist/src/cli/helpers/init/ado-repo-cloning.js.map +1 -1
  106. package/dist/src/cli/helpers/init/bitbucket-repo-cloning.d.ts +1 -1
  107. package/dist/src/cli/helpers/init/bitbucket-repo-cloning.js +3 -3
  108. package/dist/src/cli/helpers/init/bitbucket-repo-cloning.js.map +1 -1
  109. package/dist/src/cli/helpers/init/brownfield-analysis.js +18 -18
  110. package/dist/src/cli/helpers/init/brownfield-analysis.js.map +1 -1
  111. package/dist/src/cli/helpers/init/directory-structure.d.ts.map +1 -1
  112. package/dist/src/cli/helpers/init/directory-structure.js +3 -0
  113. package/dist/src/cli/helpers/init/directory-structure.js.map +1 -1
  114. package/dist/src/cli/helpers/init/external-import.js +18 -18
  115. package/dist/src/cli/helpers/init/external-import.js.map +1 -1
  116. package/dist/src/cli/helpers/init/github-repo-cloning.d.ts +1 -1
  117. package/dist/src/cli/helpers/init/github-repo-cloning.js +3 -3
  118. package/dist/src/cli/helpers/init/github-repo-cloning.js.map +1 -1
  119. package/dist/src/cli/helpers/init/initial-increment-generator.js +12 -12
  120. package/dist/src/cli/helpers/init/living-docs-preflight.js +5 -5
  121. package/dist/src/cli/helpers/init/living-docs-preflight.js.map +1 -1
  122. package/dist/src/cli/helpers/init/next-steps.js +9 -9
  123. package/dist/src/cli/helpers/init/next-steps.js.map +1 -1
  124. package/dist/src/cli/helpers/init/plugin-installer.js +3 -3
  125. package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -1
  126. package/dist/src/cli/helpers/init/translation-config.js +9 -9
  127. package/dist/src/cli/helpers/init/translation-config.js.map +1 -1
  128. package/dist/src/cli/helpers/init/types.d.ts +1 -1
  129. package/dist/src/cli/helpers/init/types.d.ts.map +1 -1
  130. package/dist/src/cli/helpers/issue-tracker/ado.js +1 -1
  131. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  132. package/dist/src/cli/helpers/issue-tracker/github.js +1 -1
  133. package/dist/src/cli/helpers/issue-tracker/github.js.map +1 -1
  134. package/dist/src/cli/helpers/issue-tracker/index.js +2 -2
  135. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  136. package/dist/src/cli/helpers/issue-tracker/jira.js +1 -1
  137. package/dist/src/cli/helpers/issue-tracker/jira.js.map +1 -1
  138. package/dist/src/cli/update-status-line.js +1 -1
  139. package/dist/src/cli/update-status-line.js.map +1 -1
  140. package/dist/src/cli/workers/brownfield-worker.js +1 -1
  141. package/dist/src/cli/workers/brownfield-worker.js.map +1 -1
  142. package/dist/src/cli/workers/import-worker.js +1 -1
  143. package/dist/src/cli/workers/import-worker.js.map +1 -1
  144. package/dist/src/core/background/brownfield-launcher.js +4 -4
  145. package/dist/src/core/background/brownfield-launcher.js.map +1 -1
  146. package/dist/src/core/background/index.d.ts +3 -3
  147. package/dist/src/core/background/index.js +3 -3
  148. package/dist/src/core/background/job-launcher.d.ts +1 -1
  149. package/dist/src/core/background/job-launcher.js +3 -3
  150. package/dist/src/core/background/job-launcher.js.map +1 -1
  151. package/dist/src/core/brownfield/importer.js +1 -1
  152. package/dist/src/core/brownfield/importer.js.map +1 -1
  153. package/dist/src/core/config/config-manager.d.ts +7 -1
  154. package/dist/src/core/config/config-manager.d.ts.map +1 -1
  155. package/dist/src/core/config/config-manager.js +24 -2
  156. package/dist/src/core/config/config-manager.js.map +1 -1
  157. package/dist/src/core/config/single-project-migrator.d.ts +110 -0
  158. package/dist/src/core/config/single-project-migrator.d.ts.map +1 -0
  159. package/dist/src/core/config/single-project-migrator.js +179 -0
  160. package/dist/src/core/config/single-project-migrator.js.map +1 -0
  161. package/dist/src/core/config/types.d.ts +3 -3
  162. package/dist/src/core/credentials/credentials-manager.d.ts +25 -4
  163. package/dist/src/core/credentials/credentials-manager.d.ts.map +1 -1
  164. package/dist/src/core/credentials/credentials-manager.js +54 -15
  165. package/dist/src/core/credentials/credentials-manager.js.map +1 -1
  166. package/dist/src/core/deduplication/command-deduplicator.d.ts +4 -4
  167. package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -1
  168. package/dist/src/core/deduplication/command-deduplicator.js +3 -3
  169. package/dist/src/core/external-tools/external-items-counter.d.ts +4 -4
  170. package/dist/src/core/external-tools/external-items-counter.js +4 -4
  171. package/dist/src/core/external-tools/external-items-display.js +4 -4
  172. package/dist/src/core/external-tools/external-items-display.js.map +1 -1
  173. package/dist/src/core/increment/completion-validator.js +3 -3
  174. package/dist/src/core/increment/completion-validator.js.map +1 -1
  175. package/dist/src/core/increment/conflict-resolver.js +2 -2
  176. package/dist/src/core/increment/conflict-resolver.js.map +1 -1
  177. package/dist/src/core/increment/desync-detector.d.ts +1 -1
  178. package/dist/src/core/increment/desync-detector.js +3 -3
  179. package/dist/src/core/increment/desync-detector.js.map +1 -1
  180. package/dist/src/core/increment/discipline-checker.js +2 -2
  181. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  182. package/dist/src/core/increment/increment-archiver.js +4 -4
  183. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  184. package/dist/src/core/increment/increment-utils.d.ts +53 -2
  185. package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
  186. package/dist/src/core/increment/increment-utils.js +78 -7
  187. package/dist/src/core/increment/increment-utils.js.map +1 -1
  188. package/dist/src/core/increment/metadata-manager.js +6 -6
  189. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  190. package/dist/src/core/increment/metadata-validator.js +1 -1
  191. package/dist/src/core/increment/metadata-validator.js.map +1 -1
  192. package/dist/src/core/increment/recent-work-scanner.js +2 -2
  193. package/dist/src/core/increment/recent-work-scanner.js.map +1 -1
  194. package/dist/src/core/increment/spec-sync-manager.js +1 -1
  195. package/dist/src/core/increment/spec-sync-manager.js.map +1 -1
  196. package/dist/src/core/increment/status-auto-transition.d.ts +68 -1
  197. package/dist/src/core/increment/status-auto-transition.d.ts.map +1 -1
  198. package/dist/src/core/increment/status-auto-transition.js +141 -1
  199. package/dist/src/core/increment/status-auto-transition.js.map +1 -1
  200. package/dist/src/core/increment/status-change-sync-trigger.d.ts +1 -1
  201. package/dist/src/core/increment/status-change-sync-trigger.js +3 -3
  202. package/dist/src/core/increment/status-change-sync-trigger.js.map +1 -1
  203. package/dist/src/core/living-docs/cross-project-sync.d.ts +12 -0
  204. package/dist/src/core/living-docs/cross-project-sync.d.ts.map +1 -1
  205. package/dist/src/core/living-docs/cross-project-sync.js +33 -0
  206. package/dist/src/core/living-docs/cross-project-sync.js.map +1 -1
  207. package/dist/src/core/living-docs/feature-archiver.d.ts +3 -3
  208. package/dist/src/core/living-docs/feature-archiver.js +3 -3
  209. package/dist/src/core/living-docs/feature-consistency-validator.js +1 -1
  210. package/dist/src/core/living-docs/feature-consistency-validator.js.map +1 -1
  211. package/dist/src/core/living-docs/feature-id-manager.d.ts +5 -0
  212. package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -1
  213. package/dist/src/core/living-docs/feature-id-manager.js +19 -1
  214. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
  215. package/dist/src/core/living-docs/governance/standards-generator.js +1 -1
  216. package/dist/src/core/living-docs/governance/standards-generator.js.map +1 -1
  217. package/dist/src/core/living-docs/hierarchy-mapper.d.ts +5 -0
  218. package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
  219. package/dist/src/core/living-docs/hierarchy-mapper.js +22 -2
  220. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  221. package/dist/src/core/living-docs/living-docs-sync.d.ts +1 -0
  222. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  223. package/dist/src/core/living-docs/living-docs-sync.js +77 -8
  224. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  225. package/dist/src/core/living-docs/project-detector.d.ts +9 -0
  226. package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
  227. package/dist/src/core/living-docs/project-detector.js +38 -3
  228. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  229. package/dist/src/core/living-docs/suggestions-generator.js +1 -1
  230. package/dist/src/core/living-docs/suggestions-generator.js.map +1 -1
  231. package/dist/src/core/notifications/command-integration.js +1 -1
  232. package/dist/src/core/notifications/command-integration.js.map +1 -1
  233. package/dist/src/core/project/adapters/ado-project-adapter.d.ts +73 -0
  234. package/dist/src/core/project/adapters/ado-project-adapter.d.ts.map +1 -0
  235. package/dist/src/core/project/adapters/ado-project-adapter.js +304 -0
  236. package/dist/src/core/project/adapters/ado-project-adapter.js.map +1 -0
  237. package/dist/src/core/project/adapters/github-project-adapter.d.ts +76 -0
  238. package/dist/src/core/project/adapters/github-project-adapter.d.ts.map +1 -0
  239. package/dist/src/core/project/adapters/github-project-adapter.js +315 -0
  240. package/dist/src/core/project/adapters/github-project-adapter.js.map +1 -0
  241. package/dist/src/core/project/adapters/jira-project-adapter.d.ts +69 -0
  242. package/dist/src/core/project/adapters/jira-project-adapter.d.ts.map +1 -0
  243. package/dist/src/core/project/adapters/jira-project-adapter.js +241 -0
  244. package/dist/src/core/project/adapters/jira-project-adapter.js.map +1 -0
  245. package/dist/src/core/project/project-event-bus.d.ts +72 -0
  246. package/dist/src/core/project/project-event-bus.d.ts.map +1 -0
  247. package/dist/src/core/project/project-event-bus.js +150 -0
  248. package/dist/src/core/project/project-event-bus.js.map +1 -0
  249. package/dist/src/core/project/project-manager.d.ts +0 -22
  250. package/dist/src/core/project/project-manager.d.ts.map +1 -1
  251. package/dist/src/core/project/project-manager.js +5 -275
  252. package/dist/src/core/project/project-manager.js.map +1 -1
  253. package/dist/src/core/project/project-registry.d.ts +93 -0
  254. package/dist/src/core/project/project-registry.d.ts.map +1 -0
  255. package/dist/src/core/project/project-registry.js +448 -0
  256. package/dist/src/core/project/project-registry.js.map +1 -0
  257. package/dist/src/core/project/project-resolution.d.ts +229 -0
  258. package/dist/src/core/project/project-resolution.d.ts.map +1 -0
  259. package/dist/src/core/project/project-resolution.js +633 -0
  260. package/dist/src/core/project/project-resolution.js.map +1 -0
  261. package/dist/src/core/project/types/project-types.d.ts +214 -0
  262. package/dist/src/core/project/types/project-types.d.ts.map +1 -0
  263. package/dist/src/core/project/types/project-types.js +9 -0
  264. package/dist/src/core/project/types/project-types.js.map +1 -0
  265. package/dist/src/core/repo-structure/setup-summary.js +2 -2
  266. package/dist/src/core/repo-structure/setup-summary.js.map +1 -1
  267. package/dist/src/core/specs/spec-identifier-detector.d.ts.map +1 -1
  268. package/dist/src/core/specs/spec-identifier-detector.js +8 -5
  269. package/dist/src/core/specs/spec-identifier-detector.js.map +1 -1
  270. package/dist/src/core/status-line/status-line-updater.js +1 -1
  271. package/dist/src/core/status-line/status-line-updater.js.map +1 -1
  272. package/dist/src/core/types/increment-metadata.d.ts +3 -3
  273. package/dist/src/core/types/increment-metadata.js +3 -3
  274. package/dist/src/core/types/increment-metadata.js.map +1 -1
  275. package/dist/src/core/types/sync-profile.d.ts +1 -0
  276. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  277. package/dist/src/core/types/sync-profile.js.map +1 -1
  278. package/dist/src/core/validators/ac-presence-validator.d.ts +4 -4
  279. package/dist/src/core/validators/ac-presence-validator.js +3 -3
  280. package/dist/src/core/validators/ac-presence-validator.js.map +1 -1
  281. package/dist/src/core/workflow/backlog-scanner.d.ts +5 -0
  282. package/dist/src/core/workflow/backlog-scanner.d.ts.map +1 -1
  283. package/dist/src/core/workflow/backlog-scanner.js +14 -2
  284. package/dist/src/core/workflow/backlog-scanner.js.map +1 -1
  285. package/dist/src/core/workflow/phase-detector.js +17 -17
  286. package/dist/src/core/workflow/phase-detector.js.map +1 -1
  287. package/dist/src/core/workflow/types.d.ts +1 -1
  288. package/dist/src/core/workflow/types.d.ts.map +1 -1
  289. package/dist/src/core/workflow/workflow-orchestrator.d.ts +1 -1
  290. package/dist/src/core/workflow/workflow-orchestrator.js +9 -9
  291. package/dist/src/core/workflow/workflow-orchestrator.js.map +1 -1
  292. package/dist/src/hooks/scheduler-startup.js +1 -1
  293. package/dist/src/hooks/scheduler-startup.js.map +1 -1
  294. package/dist/src/importers/item-converter.js +1 -1
  295. package/dist/src/importers/item-converter.js.map +1 -1
  296. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +17 -1
  297. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  298. package/dist/src/integrations/jira/jira-incremental-mapper.js +20 -12
  299. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  300. package/dist/src/integrations/jira/jira-mapper.d.ts +17 -1
  301. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
  302. package/dist/src/integrations/jira/jira-mapper.js +13 -5
  303. package/dist/src/integrations/jira/jira-mapper.js.map +1 -1
  304. package/dist/src/living-docs/enterprise-analyzer.js +1 -1
  305. package/dist/src/living-docs/enterprise-analyzer.js.map +1 -1
  306. package/dist/src/sync/ado-reconciler.d.ts +5 -0
  307. package/dist/src/sync/ado-reconciler.d.ts.map +1 -1
  308. package/dist/src/sync/ado-reconciler.js +16 -4
  309. package/dist/src/sync/ado-reconciler.js.map +1 -1
  310. package/dist/src/sync/jira-reconciler.d.ts +3 -0
  311. package/dist/src/sync/jira-reconciler.d.ts.map +1 -1
  312. package/dist/src/sync/jira-reconciler.js +12 -5
  313. package/dist/src/sync/jira-reconciler.js.map +1 -1
  314. package/dist/src/types/dashboard-cache.d.ts +4 -2
  315. package/dist/src/types/dashboard-cache.d.ts.map +1 -1
  316. package/dist/src/types/dashboard-cache.js +1 -1
  317. package/dist/src/types/dashboard-cache.js.map +1 -1
  318. package/dist/src/utils/ac-embedder.d.ts +1 -1
  319. package/dist/src/utils/docs-preview/docusaurus-setup.js +2 -2
  320. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
  321. package/dist/src/utils/docs-preview/sidebar-builder.js +1 -1
  322. package/dist/src/utils/env-multi-project-parser.d.ts +17 -0
  323. package/dist/src/utils/env-multi-project-parser.d.ts.map +1 -1
  324. package/dist/src/utils/env-multi-project-parser.js +26 -1
  325. package/dist/src/utils/env-multi-project-parser.js.map +1 -1
  326. package/dist/src/utils/external-tool-drift-detector.d.ts +2 -2
  327. package/dist/src/utils/external-tool-drift-detector.js +6 -6
  328. package/dist/src/utils/external-tool-drift-detector.js.map +1 -1
  329. package/dist/src/utils/notification-constants.js +2 -2
  330. package/dist/src/utils/notification-constants.js.map +1 -1
  331. package/dist/src/utils/notification-manager.d.ts +12 -3
  332. package/dist/src/utils/notification-manager.d.ts.map +1 -1
  333. package/dist/src/utils/notification-manager.js +51 -49
  334. package/dist/src/utils/notification-manager.js.map +1 -1
  335. package/dist/src/utils/platform-utils.d.ts +12 -3
  336. package/dist/src/utils/platform-utils.d.ts.map +1 -1
  337. package/dist/src/utils/platform-utils.js +35 -16
  338. package/dist/src/utils/platform-utils.js.map +1 -1
  339. package/dist/src/utils/plugin-validator.js +11 -11
  340. package/dist/src/utils/plugin-validator.js.map +1 -1
  341. package/dist/src/validators/ac-coverage-validator.d.ts +1 -1
  342. package/dist/src/validators/ac-coverage-validator.js +1 -1
  343. package/package.json +3 -1
  344. package/plugins/PLUGINS-INDEX.md +1 -2
  345. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  346. package/plugins/specweave/COMMANDS.md +49 -49
  347. package/plugins/specweave/agents/pm/AGENT.md +18 -18
  348. package/plugins/specweave/agents/test-aware-planner/AGENT.md +7 -7
  349. package/plugins/specweave/agents/translator/AGENT.md +2 -2
  350. package/plugins/specweave/commands/{specweave-abandon.md → abandon.md} +20 -20
  351. package/plugins/specweave/commands/{specweave-analyze-standards.sh → analyze-standards.sh} +4 -4
  352. package/plugins/specweave/commands/{specweave-archive-features.md → archive-features.md} +7 -7
  353. package/plugins/specweave/commands/{specweave-archive.md → archive.md} +36 -36
  354. package/plugins/specweave/commands/{specweave-backlog.md → backlog.md} +24 -24
  355. package/plugins/specweave/commands/{specweave-check-hooks.md → check-hooks.md} +10 -10
  356. package/plugins/specweave/commands/{specweave-check-tests.md → check-tests.md} +14 -14
  357. package/plugins/specweave/commands/{specweave-costs.md → costs.md} +8 -8
  358. package/plugins/specweave/commands/{specweave-discrepancies.md → discrepancies.md} +15 -15
  359. package/plugins/specweave/commands/{specweave-discrepancy-to-increment.md → discrepancy-to-increment.md} +10 -10
  360. package/plugins/specweave/commands/{specweave-do.md → do.md} +37 -39
  361. package/plugins/specweave/commands/{specweave-done.md → done.md} +23 -23
  362. package/plugins/specweave/commands/{specweave-embed-acs.md → embed-acs.md} +21 -21
  363. package/plugins/specweave/commands/{specweave-external.md → external.md} +11 -11
  364. package/plugins/specweave/commands/{specweave-fix-duplicates.md → fix-duplicates.md} +16 -16
  365. package/plugins/specweave/commands/{specweave-import-docs.md → import-docs.md} +7 -7
  366. package/plugins/specweave/commands/{specweave-import-external.md → import-external.md} +9 -9
  367. package/plugins/specweave/commands/{specweave-increment.md → increment.md} +17 -17
  368. package/plugins/specweave/commands/{specweave-jobs.md → jobs.md} +28 -28
  369. package/plugins/specweave/commands/{specweave-judge-llm.md → judge-llm.md} +19 -19
  370. package/plugins/specweave/commands/{specweave-living-docs.md → living-docs.md} +72 -29
  371. package/plugins/specweave/commands/migrate-config.md +2 -2
  372. package/plugins/specweave/commands/{specweave-next.md → next.md} +20 -20
  373. package/plugins/specweave/commands/{specweave-notifications.md → notifications.md} +11 -11
  374. package/plugins/specweave/commands/{specweave-organize-docs.md → organize-docs.md} +9 -9
  375. package/plugins/specweave/commands/{specweave-pause.md → pause.md} +19 -19
  376. package/plugins/specweave/commands/{specweave-plan.md → plan.md} +19 -19
  377. package/plugins/specweave/commands/{specweave-progress.md → progress.md} +6 -6
  378. package/plugins/specweave/commands/{specweave-qa.md → qa.md} +15 -15
  379. package/plugins/specweave/commands/{specweave-reopen.md → reopen.md} +41 -41
  380. package/plugins/specweave/commands/{specweave-restore-feature.md → restore-feature.md} +6 -6
  381. package/plugins/specweave/commands/{specweave-restore.md → restore.md} +26 -26
  382. package/plugins/specweave/commands/{specweave-resume.md → resume.md} +33 -33
  383. package/plugins/specweave/commands/revert-wip-limit.md +4 -4
  384. package/plugins/specweave/commands/{specweave-save.md → save.md} +34 -34
  385. package/plugins/specweave/commands/{specweave-status.md → status.md} +29 -29
  386. package/plugins/specweave/commands/{specweave.md → sw.md} +28 -28
  387. package/plugins/specweave/commands/{specweave-sync-acs.md → sync-acs.md} +12 -12
  388. package/plugins/specweave/commands/sync-diagnostics.md +5 -5
  389. package/plugins/specweave/commands/{specweave-sync-docs.md → sync-docs.md} +7 -7
  390. package/plugins/specweave/commands/{specweave-sync-logs.md → sync-logs.md} +14 -14
  391. package/plugins/specweave/commands/{specweave-sync-monitor.md → sync-monitor.md} +5 -5
  392. package/plugins/specweave/commands/{specweave-sync-progress.md → sync-progress.md} +38 -38
  393. package/plugins/specweave/commands/{specweave-sync-specs.md → sync-specs.md} +17 -17
  394. package/plugins/specweave/commands/{specweave-sync-status.md → sync-status.md} +16 -16
  395. package/plugins/specweave/commands/{specweave-sync-tasks.md → sync-tasks.md} +13 -13
  396. package/plugins/specweave/commands/{specweave-tdd-cycle.md → tdd-cycle.md} +1 -1
  397. package/plugins/specweave/commands/{specweave-tdd-green.md → tdd-green.md} +1 -1
  398. package/plugins/specweave/commands/{specweave-tdd-red.md → tdd-red.md} +1 -1
  399. package/plugins/specweave/commands/{specweave-tdd-refactor.md → tdd-refactor.md} +1 -1
  400. package/plugins/specweave/commands/{specweave-translate.md → translate.md} +17 -17
  401. package/plugins/specweave/commands/{specweave-update-scope.md → update-scope.md} +8 -8
  402. package/plugins/specweave/commands/{specweave-update-status.md → update-status.md} +6 -6
  403. package/plugins/specweave/commands/{specweave-validate-features.md → validate-features.md} +8 -8
  404. package/plugins/specweave/commands/{specweave-validate.md → validate.md} +20 -20
  405. package/plugins/specweave/commands/{specweave-workflow.md → workflow.md} +40 -40
  406. package/plugins/specweave/hooks/README.md +5 -5
  407. package/plugins/specweave/hooks/config-env-separator.sh +99 -0
  408. package/plugins/specweave/hooks/github-metadata-guard.sh +73 -0
  409. package/plugins/specweave/hooks/hooks.json +32 -2
  410. package/plugins/specweave/hooks/post-first-increment.sh +2 -2
  411. package/plugins/specweave/hooks/post-increment-completion.sh +7 -7
  412. package/plugins/specweave/hooks/post-increment-planning.sh +11 -11
  413. package/plugins/specweave/hooks/post-increment-status-change.sh +1 -1
  414. package/plugins/specweave/hooks/post-metadata-change.sh +1 -1
  415. package/plugins/specweave/hooks/post-spec-update.sh +2 -2
  416. package/plugins/specweave/hooks/post-task-completion.sh +2 -2
  417. package/plugins/specweave/hooks/pre-increment-start.sh +7 -7
  418. package/plugins/specweave/hooks/project-folder-guard.sh +272 -0
  419. package/plugins/specweave/hooks/spec-project-validator.sh +68 -47
  420. package/plugins/specweave/hooks/user-prompt-submit.sh +27 -27
  421. package/plugins/specweave/hooks/v2/guards/completion-guard.sh +2 -2
  422. package/plugins/specweave/hooks/v2/guards/metadata-json-guard.sh +1 -1
  423. package/plugins/specweave/hooks/v2/handlers/github-sync-handler.sh +1 -1
  424. package/plugins/specweave/lib/hooks/consolidated-sync.js +35 -5
  425. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +2 -2
  426. package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +2 -2
  427. package/plugins/specweave/lib/hooks/prepare-reflection-context.js +1 -1
  428. package/plugins/specweave/lib/hooks/prepare-reflection-context.ts +1 -1
  429. package/plugins/specweave/lib/hooks/sync-living-docs.js +5 -5
  430. package/plugins/specweave/lib/hooks/translate-file.d.ts +1 -1
  431. package/plugins/specweave/lib/hooks/translate-file.js +2 -2
  432. package/plugins/specweave/lib/hooks/translate-file.ts +3 -3
  433. package/plugins/specweave/lib/hooks/us-completion-orchestrator.js +1 -1
  434. package/plugins/specweave/lib/hooks/us-completion-orchestrator.ts +2 -2
  435. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +6 -6
  436. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  437. package/plugins/specweave/lib/vendor/core/increment/status-auto-transition.d.ts +113 -0
  438. package/plugins/specweave/lib/vendor/core/increment/status-auto-transition.js +318 -0
  439. package/plugins/specweave/lib/vendor/core/increment/status-auto-transition.js.map +1 -0
  440. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +3 -3
  441. package/plugins/specweave/lib/vendor/core/types/increment-metadata.js +3 -3
  442. package/plugins/specweave/lib/vendor/core/types/increment-metadata.js.map +1 -1
  443. package/plugins/specweave/scripts/README.md +9 -9
  444. package/plugins/specweave/scripts/cleanup-state.sh +1 -1
  445. package/plugins/specweave/scripts/jobs.js +2 -2
  446. package/plugins/specweave/scripts/progress.js +6 -6
  447. package/plugins/specweave/scripts/read-costs.sh +3 -3
  448. package/plugins/specweave/scripts/read-jobs.sh +8 -8
  449. package/plugins/specweave/scripts/read-progress.sh +17 -10
  450. package/plugins/specweave/scripts/read-status.sh +7 -7
  451. package/plugins/specweave/scripts/read-workflow.sh +18 -18
  452. package/plugins/specweave/scripts/rebuild-dashboard-cache.sh +6 -5
  453. package/plugins/specweave/scripts/session-watchdog.sh +4 -4
  454. package/plugins/specweave/scripts/status.js +7 -7
  455. package/plugins/specweave/scripts/update-dashboard-cache.sh +28 -10
  456. package/plugins/specweave/skills/SKILLS-INDEX.md +4 -4
  457. package/plugins/specweave/skills/archive-increments/SKILL.md +15 -15
  458. package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +5 -5
  459. package/plugins/specweave/skills/code-standards-analyzer/SKILL.md +4 -4
  460. package/plugins/specweave/skills/context-loader/SKILL.md +1 -1
  461. package/plugins/specweave/skills/{specweave-detector → detector}/SKILL.md +5 -5
  462. package/plugins/specweave/skills/discrepancy-viewer.md +4 -4
  463. package/plugins/specweave/skills/external-sync-wizard/SKILL.md +24 -24
  464. package/plugins/specweave/skills/{specweave-framework → framework}/SKILL.md +33 -33
  465. package/plugins/specweave/skills/increment-planner/SKILL.md +25 -24
  466. package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +6 -16
  467. package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +6 -12
  468. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +6 -6
  469. package/plugins/specweave/skills/increment-work-router/SKILL.md +23 -23
  470. package/plugins/specweave/skills/instant-status/SKILL.md +7 -7
  471. package/plugins/specweave/skills/plugin-validator/SKILL.md +9 -9
  472. package/plugins/specweave/skills/pm-closure-validation/SKILL.md +4 -4
  473. package/plugins/specweave/skills/progress-sync/SKILL.md +51 -51
  474. package/plugins/specweave/skills/project-kickstarter/SKILL.md +11 -11
  475. package/plugins/specweave/skills/role-orchestrator/README.md +1 -1
  476. package/plugins/specweave/skills/role-orchestrator/SKILL.md +4 -4
  477. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +17 -17
  478. package/plugins/specweave/skills/spec-generator/SKILL.md +6 -6
  479. package/plugins/specweave/skills/tdd-workflow/SKILL.md +21 -21
  480. package/plugins/specweave/skills/translator/SKILL.md +4 -4
  481. package/plugins/specweave/skills/umbrella-repo-detector/SKILL.md +5 -5
  482. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  483. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +4 -4
  484. package/plugins/specweave-ado/agents/ado-sync-judge/AGENT.md +4 -4
  485. package/plugins/specweave-ado/commands/cleanup-duplicates.md +9 -9
  486. package/plugins/specweave-ado/commands/clone.md +17 -17
  487. package/plugins/specweave-ado/commands/close.md +10 -10
  488. package/plugins/specweave-ado/commands/create.md +8 -8
  489. package/plugins/specweave-ado/commands/import-areas.md +15 -15
  490. package/plugins/specweave-ado/commands/import-projects.md +12 -12
  491. package/plugins/specweave-ado/commands/pull.md +25 -25
  492. package/plugins/specweave-ado/commands/push.md +20 -20
  493. package/plugins/specweave-ado/commands/reconcile.md +7 -7
  494. package/plugins/specweave-ado/commands/status.md +7 -7
  495. package/plugins/specweave-ado/commands/sync.md +17 -17
  496. package/plugins/specweave-ado/hooks/post-living-docs-update.sh +2 -2
  497. package/plugins/specweave-ado/lib/ado-project-detector.js +1 -1
  498. package/plugins/specweave-ado/lib/ado-project-detector.ts +1 -1
  499. package/plugins/specweave-ado/skills/{specweave-ado-mapper → ado-mapper}/SKILL.md +2 -2
  500. package/plugins/specweave-ado/skills/ado-multi-project/SKILL.md +6 -6
  501. package/plugins/specweave-ado/skills/ado-resource-validator/SKILL.md +5 -5
  502. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +19 -19
  503. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
  504. package/plugins/specweave-alternatives/commands/alternatives-analyze.md +14 -14
  505. package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
  506. package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
  507. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
  508. package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +1 -1
  509. package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +1 -1
  510. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  511. package/plugins/specweave-diagrams/commands/diagrams-generate.md +1 -1
  512. package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
  513. package/plugins/specweave-docs/commands/build.md +8 -8
  514. package/plugins/specweave-docs/commands/generate.md +22 -22
  515. package/plugins/specweave-docs/commands/health.md +10 -10
  516. package/plugins/specweave-docs/commands/init.md +9 -9
  517. package/plugins/specweave-docs/commands/organize.md +10 -10
  518. package/plugins/specweave-docs/commands/validate.md +9 -9
  519. package/plugins/specweave-docs/commands/view.md +14 -14
  520. package/plugins/specweave-docs/skills/preview/SKILL.md +11 -11
  521. package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
  522. package/plugins/specweave-figma/commands/figma-import.md +1 -1
  523. package/plugins/specweave-figma/commands/figma-to-react.md +1 -1
  524. package/plugins/specweave-figma/commands/figma-tokens.md +1 -1
  525. package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
  526. package/plugins/specweave-frontend/agents/frontend-architect/README.md +5 -5
  527. package/plugins/specweave-frontend/commands/component-generate.md +1 -1
  528. package/plugins/specweave-frontend/commands/design-system-init.md +1 -1
  529. package/plugins/specweave-frontend/commands/frontend-scaffold.md +1 -1
  530. package/plugins/specweave-frontend/commands/nextjs-setup.md +1 -1
  531. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  532. package/plugins/specweave-github/MULTI-PROJECT-SYNC-ARCHITECTURE.md +4 -4
  533. package/plugins/specweave-github/SYNC-ARCHITECTURE-FIX-SUMMARY.md +18 -18
  534. package/plugins/specweave-github/agents/github-manager/AGENT.md +8 -8
  535. package/plugins/specweave-github/commands/cleanup-duplicates.md +8 -8
  536. package/plugins/specweave-github/commands/close.md +25 -25
  537. package/plugins/specweave-github/commands/create.md +17 -17
  538. package/plugins/specweave-github/commands/pull.md +12 -12
  539. package/plugins/specweave-github/commands/push.md +12 -12
  540. package/plugins/specweave-github/commands/reconcile.md +7 -7
  541. package/plugins/specweave-github/commands/status.md +24 -24
  542. package/plugins/specweave-github/commands/sync.md +34 -34
  543. package/plugins/specweave-github/commands/update-user-story.md +6 -6
  544. package/plugins/specweave-github/hooks/README.md +8 -8
  545. package/plugins/specweave-github/hooks/post-task-completion.sh +2 -2
  546. package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +12 -4
  547. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +16 -4
  548. package/plugins/specweave-github/lib/completion-calculator.js +3 -1
  549. package/plugins/specweave-github/lib/completion-calculator.ts +6 -0
  550. package/plugins/specweave-github/lib/duplicate-detector.js +12 -6
  551. package/plugins/specweave-github/lib/duplicate-detector.ts +22 -6
  552. package/plugins/specweave-github/lib/github-board-resolver.js +7 -2
  553. package/plugins/specweave-github/lib/github-board-resolver.ts +13 -2
  554. package/plugins/specweave-github/lib/github-client-v2.js +29 -18
  555. package/plugins/specweave-github/lib/github-client-v2.ts +33 -18
  556. package/plugins/specweave-github/lib/github-feature-sync.js +41 -11
  557. package/plugins/specweave-github/lib/github-feature-sync.ts +52 -11
  558. package/plugins/specweave-github/lib/github-hierarchical-sync.js +6 -1
  559. package/plugins/specweave-github/lib/github-hierarchical-sync.ts +12 -1
  560. package/plugins/specweave-github/lib/github-increment-sync-cli.js +35 -17
  561. package/plugins/specweave-github/lib/github-increment-sync-cli.ts +44 -16
  562. package/plugins/specweave-github/lib/github-issue-updater.js +8 -3
  563. package/plugins/specweave-github/lib/github-issue-updater.ts +16 -3
  564. package/plugins/specweave-github/lib/github-spec-sync.js +14 -4
  565. package/plugins/specweave-github/lib/github-spec-sync.ts +19 -4
  566. package/plugins/specweave-github/lib/github-sync-bidirectional.js +8 -3
  567. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +14 -3
  568. package/plugins/specweave-github/lib/github-sync-increment-changes.js +9 -4
  569. package/plugins/specweave-github/lib/github-sync-increment-changes.ts +15 -4
  570. package/plugins/specweave-github/lib/increment-issue-builder.js +23 -10
  571. package/plugins/specweave-github/lib/increment-issue-builder.ts +29 -11
  572. package/plugins/specweave-github/lib/user-story-content-builder.js +19 -16
  573. package/plugins/specweave-github/lib/user-story-content-builder.ts +24 -19
  574. package/plugins/specweave-github/lib/user-story-issue-builder.js +10 -13
  575. package/plugins/specweave-github/lib/user-story-issue-builder.ts +20 -19
  576. package/plugins/specweave-github/reference/github-specweave-mapping.md +1 -1
  577. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +3 -3
  578. package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +8 -8
  579. package/plugins/specweave-github/skills/github-sync/SKILL.md +14 -14
  580. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  581. package/plugins/specweave-infrastructure/commands/{specweave-infrastructure-monitor-setup.md → monitor-setup.md} +1 -1
  582. package/plugins/specweave-infrastructure/commands/{specweave-infrastructure-slo-implement.md → slo-implement.md} +1 -1
  583. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  584. package/plugins/specweave-jira/agents/jira-sync-judge/AGENT.md +3 -3
  585. package/plugins/specweave-jira/commands/cleanup-duplicates.md +9 -9
  586. package/plugins/specweave-jira/commands/close.md +13 -13
  587. package/plugins/specweave-jira/commands/create.md +8 -8
  588. package/plugins/specweave-jira/commands/import-boards.md +15 -15
  589. package/plugins/specweave-jira/commands/import-projects-full.md +15 -15
  590. package/plugins/specweave-jira/commands/import-projects.md +10 -10
  591. package/plugins/specweave-jira/commands/pull.md +10 -10
  592. package/plugins/specweave-jira/commands/push.md +11 -11
  593. package/plugins/specweave-jira/commands/reconcile.md +7 -7
  594. package/plugins/specweave-jira/commands/status.md +16 -16
  595. package/plugins/specweave-jira/commands/sync.md +27 -27
  596. package/plugins/specweave-jira/skills/{specweave-jira-mapper → jira-mapper}/SKILL.md +2 -2
  597. package/plugins/specweave-jira/skills/jira-resource-validator/SKILL.md +4 -4
  598. package/plugins/specweave-jira/skills/jira-sync/SKILL.md +5 -5
  599. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  600. package/plugins/specweave-kafka/IMPLEMENTATION-COMPLETE.md +10 -10
  601. package/plugins/specweave-kafka/README.md +12 -12
  602. package/plugins/specweave-kafka/commands/deploy.md +5 -5
  603. package/plugins/specweave-kafka/commands/dev-env.md +2 -2
  604. package/plugins/specweave-kafka/commands/mcp-configure.md +3 -3
  605. package/plugins/specweave-kafka/commands/monitor-setup.md +3 -3
  606. package/plugins/specweave-kafka/skills/kafka-architecture/SKILL.md +4 -4
  607. package/plugins/specweave-kafka/skills/kafka-cli-tools/SKILL.md +5 -5
  608. package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +6 -6
  609. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  610. package/plugins/specweave-kafka-streams/commands/topology.md +4 -4
  611. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
  612. package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
  613. package/plugins/specweave-ml/README.md +9 -9
  614. package/plugins/specweave-ml/commands/{specweave-ml-deploy.md → deploy.md} +1 -1
  615. package/plugins/specweave-ml/commands/{specweave-ml-evaluate.md → evaluate.md} +1 -1
  616. package/plugins/specweave-ml/commands/{specweave-ml-explain.md → explain.md} +1 -1
  617. package/plugins/specweave-ml/commands/{specweave-ml-pipeline.md → pipeline.md} +1 -1
  618. package/plugins/specweave-ml/skills/automl-optimizer/SKILL.md +1 -1
  619. package/plugins/specweave-ml/skills/data-visualizer/SKILL.md +1 -1
  620. package/plugins/specweave-ml/skills/experiment-tracker/SKILL.md +4 -4
  621. package/plugins/specweave-ml/skills/feature-engineer/SKILL.md +1 -1
  622. package/plugins/specweave-ml/skills/ml-deployment-helper/SKILL.md +2 -2
  623. package/plugins/specweave-ml/skills/ml-pipeline-orchestrator/SKILL.md +10 -10
  624. package/plugins/specweave-ml/skills/model-registry/SKILL.md +1 -1
  625. package/plugins/specweave-ml/skills/time-series-forecaster/SKILL.md +1 -1
  626. package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
  627. package/plugins/specweave-mobile/README.md +2 -2
  628. package/plugins/specweave-mobile/agents/mobile-architect/AGENT.md +2 -2
  629. package/plugins/specweave-mobile/skills/react-native-setup/SKILL.md +1 -1
  630. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  631. package/plugins/specweave-n8n/commands/workflow-template.md +4 -4
  632. package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
  633. package/plugins/specweave-payments/commands/stripe-setup.md +1 -1
  634. package/plugins/specweave-payments/commands/subscription-flow.md +1 -1
  635. package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +1 -1
  636. package/plugins/specweave-plugin-dev/commands/plugin-create.md +1 -1
  637. package/plugins/specweave-plugin-dev/commands/plugin-publish.md +1 -1
  638. package/plugins/specweave-plugin-dev/commands/plugin-test.md +1 -1
  639. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  640. package/plugins/specweave-release/IMPLEMENTATION.md +14 -14
  641. package/plugins/specweave-release/README.md +33 -33
  642. package/plugins/specweave-release/agents/release-manager/AGENT.md +18 -18
  643. package/plugins/specweave-release/commands/{specweave-release-align.md → align.md} +19 -19
  644. package/plugins/specweave-release/commands/{specweave-release-init.md → init.md} +19 -19
  645. package/plugins/specweave-release/commands/{specweave-release-npm.md → npm.md} +14 -14
  646. package/plugins/specweave-release/commands/{specweave-release-platform.md → platform.md} +17 -17
  647. package/plugins/specweave-release/commands/{specweave-release-rc.md → rc.md} +37 -37
  648. package/plugins/specweave-release/hooks/post-task-completion.sh +1 -1
  649. package/plugins/specweave-release/skills/rc-manager/SKILL.md +12 -12
  650. package/plugins/specweave-release/skills/release-coordinator/SKILL.md +11 -11
  651. package/plugins/specweave-release/skills/release-strategy-advisor/SKILL.md +4 -4
  652. package/plugins/specweave-release/skills/version-aligner/SKILL.md +7 -7
  653. package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
  654. package/plugins/specweave-testing/agents/qa-engineer/README.md +5 -5
  655. package/plugins/specweave-testing/commands/e2e-setup.md +1 -1
  656. package/plugins/specweave-testing/commands/test-coverage.md +1 -1
  657. package/plugins/specweave-testing/commands/test-generate.md +1 -1
  658. package/plugins/specweave-testing/commands/test-init.md +1 -1
  659. package/plugins/specweave-tooling/.claude-plugin/plugin.json +1 -1
  660. package/plugins/specweave-tooling/commands/{specweave-tooling-skill-create.md → skill-create.md} +1 -1
  661. package/plugins/specweave-tooling/commands/{specweave-tooling-skill-package.md → skill-package.md} +1 -1
  662. package/plugins/specweave-tooling/commands/{specweave-tooling-skill-validate.md → skill-validate.md} +1 -1
  663. package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
  664. package/plugins/specweave-ui/commands/ui-automate.md +9 -9
  665. package/plugins/specweave-ui/commands/ui-inspect.md +6 -6
  666. package/src/templates/AGENTS.md.template +49 -49
  667. package/src/templates/CLAUDE.md.template +11 -11
  668. package/dist/src/cli/commands/switch-project.d.ts +0 -13
  669. package/dist/src/cli/commands/switch-project.d.ts.map +0 -1
  670. package/dist/src/cli/commands/switch-project.js +0 -78
  671. package/dist/src/cli/commands/switch-project.js.map +0 -1
  672. package/plugins/specweave/commands/specweave-init-multiproject.md +0 -146
  673. package/plugins/specweave-core/.claude-plugin/plugin.json +0 -21
  674. package/plugins/specweave-core/commands/architecture-review.md +0 -288
  675. package/plugins/specweave-core/commands/code-review.md +0 -213
  676. package/plugins/specweave-core/commands/refactor-plan.md +0 -249
  677. package/plugins/specweave-core/skills/code-quality/SKILL.md +0 -158
  678. package/plugins/specweave-core/skills/design-patterns/SKILL.md +0 -245
  679. package/plugins/specweave-core/skills/software-architecture/SKILL.md +0 -84
  680. /package/plugins/specweave/skills/{specweave-framework → framework}/test-cases/test-1-increment-naming.yaml +0 -0
  681. /package/plugins/specweave/skills/{specweave-framework → framework}/test-cases/test-2-source-of-truth.yaml +0 -0
  682. /package/plugins/specweave/skills/{specweave-framework → framework}/test-cases/test-3-increment-discipline.yaml +0 -0
  683. /package/plugins/specweave/skills/{specweave-framework → framework}/test-cases/test-4-file-placement.yaml +0 -0
@@ -7,21 +7,27 @@
7
7
  * @module core/config/config-manager
8
8
  */
9
9
  import { SpecWeaveConfig, ValidationResult } from './types.js';
10
+ import { type Logger } from '../../utils/logger.js';
10
11
  /**
11
12
  * Manages SpecWeave configuration
12
13
  */
13
14
  export declare class ConfigManager {
14
15
  private configPath;
16
+ private projectRoot;
15
17
  private config;
18
+ private logger;
16
19
  /**
17
20
  * Create a new ConfigManager
18
21
  *
19
22
  * @param projectRoot - Path to project root (default: process.cwd())
23
+ * @param logger - Logger instance (default: consoleLogger)
20
24
  */
21
- constructor(projectRoot?: string);
25
+ constructor(projectRoot?: string, logger?: Logger);
22
26
  /**
23
27
  * Read configuration from disk
24
28
  *
29
+ * Auto-migration: Detects and fixes single-project repos with multiProject.enabled=true
30
+ *
25
31
  * @returns Configuration object
26
32
  */
27
33
  read(): Promise<SpecWeaveConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/config/config-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,eAAe,EAEf,gBAAgB,EAEjB,MAAM,YAAY,CAAC;AAOpB;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAgC;IAE9C;;;;OAIG;gBACS,WAAW,GAAE,MAAsB;IAI/C;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,eAAe,CAAC;IAsBtC;;;;OAIG;IACH,QAAQ,IAAI,eAAe;IAuB3B;;;;OAIG;IACG,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBnD;;;;OAIG;IACG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9D;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAKrC;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlD;;;;OAIG;IACG,MAAM,IAAI,OAAO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Ae,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBnD;;;;OAIG;IACG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9D;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAKrC;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlD;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAShC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,gBAAgB;IA4IpD;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IAgBjB;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IAcjB;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS;IAejB;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB;AAOD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,aAAa,CAKpE;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAG/E;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG9F"}
@@ -9,6 +9,8 @@
9
9
  import { promises as fs } from 'fs';
10
10
  import path from 'path';
11
11
  import { DEFAULT_CONFIG } from './types.js';
12
+ import { detectAndMigrateSingleProject } from './single-project-migrator.js';
13
+ import { consoleLogger } from '../../utils/logger.js';
12
14
  /**
13
15
  * Configuration file path
14
16
  */
@@ -21,14 +23,19 @@ export class ConfigManager {
21
23
  * Create a new ConfigManager
22
24
  *
23
25
  * @param projectRoot - Path to project root (default: process.cwd())
26
+ * @param logger - Logger instance (default: consoleLogger)
24
27
  */
25
- constructor(projectRoot = process.cwd()) {
28
+ constructor(projectRoot = process.cwd(), logger = consoleLogger) {
26
29
  this.config = null;
30
+ this.projectRoot = projectRoot;
27
31
  this.configPath = path.join(projectRoot, '.specweave', CONFIG_FILE_NAME);
32
+ this.logger = logger;
28
33
  }
29
34
  /**
30
35
  * Read configuration from disk
31
36
  *
37
+ * Auto-migration: Detects and fixes single-project repos with multiProject.enabled=true
38
+ *
32
39
  * @returns Configuration object
33
40
  */
34
41
  async read() {
@@ -39,7 +46,22 @@ export class ConfigManager {
39
46
  const content = await fs.readFile(this.configPath, 'utf-8');
40
47
  const parsed = JSON.parse(content);
41
48
  // Merge with defaults (for backward compatibility)
42
- this.config = this.mergeWithDefaults(parsed);
49
+ let config = this.mergeWithDefaults(parsed);
50
+ // Auto-migration: Single-project detection (v0.34.0+)
51
+ const migrationResult = await detectAndMigrateSingleProject(config, {
52
+ logger: this.logger,
53
+ projectRoot: this.projectRoot,
54
+ createBackup: true
55
+ });
56
+ // If migrated, save the updated config directly (bypass validation to preserve all fields)
57
+ if (migrationResult.result.migrated) {
58
+ this.logger.log('✅ Auto-migrated to single-project mode');
59
+ // Write directly to disk without validation (migration already validated)
60
+ const content = JSON.stringify(migrationResult.config, null, 2);
61
+ await fs.writeFile(this.configPath, content, 'utf-8');
62
+ config = migrationResult.config;
63
+ }
64
+ this.config = config;
43
65
  return this.config;
44
66
  }
45
67
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../../../../src/core/config/config-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAEL,cAAc,EAGf,MAAM,YAAY,CAAC;AAE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;IAC7E,MAAM,OAAO,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Single-Project Migrator
3
+ *
4
+ * Automatically detects and migrates repositories with exactly 1 project
5
+ * from multi-project mode (multiProject.enabled=true) to single-project mode
6
+ * (multiProject.enabled=false).
7
+ *
8
+ * This is part of the fix for the auto-enable multi-project bug where
9
+ * single-project repositories were incorrectly configured with multi-project mode.
10
+ *
11
+ * @module core/config/single-project-migrator
12
+ * @since v0.34.0
13
+ */
14
+ import type { Logger } from '../../utils/logger.js';
15
+ /**
16
+ * Project data structure (extracted from multiProject.projects)
17
+ */
18
+ export interface ProjectData {
19
+ id: string;
20
+ name: string;
21
+ description?: string;
22
+ keywords?: string[];
23
+ techStack?: string[];
24
+ team?: string;
25
+ externalTools?: {
26
+ github?: {
27
+ repository: string;
28
+ };
29
+ jira?: {
30
+ project: string;
31
+ board?: string;
32
+ };
33
+ ado?: {
34
+ project: string;
35
+ areaPath?: string;
36
+ };
37
+ };
38
+ }
39
+ /**
40
+ * Multi-project configuration structure
41
+ */
42
+ export interface MultiProjectConfig {
43
+ enabled: boolean;
44
+ activeProject?: string;
45
+ projects: Record<string, ProjectData>;
46
+ }
47
+ /**
48
+ * Config structure with both project and multiProject fields
49
+ */
50
+ export interface Config {
51
+ project?: {
52
+ name: string;
53
+ version?: string;
54
+ description?: string;
55
+ techStack?: string[];
56
+ team?: string;
57
+ };
58
+ multiProject?: MultiProjectConfig;
59
+ [key: string]: any;
60
+ }
61
+ /**
62
+ * Migration result
63
+ */
64
+ export interface MigrationResult {
65
+ migrated: boolean;
66
+ reason: string;
67
+ preservedFields: string[];
68
+ backupPath?: string;
69
+ }
70
+ /**
71
+ * Result of migration attempt
72
+ */
73
+ export interface MigrationAttempt {
74
+ config: Config;
75
+ result: MigrationResult;
76
+ }
77
+ /**
78
+ * Single-project migrator options
79
+ */
80
+ export interface MigratorOptions {
81
+ logger?: Logger;
82
+ projectRoot?: string;
83
+ createBackup?: boolean;
84
+ }
85
+ /**
86
+ * Detects and migrates single-project repositories from multi-project mode to single-project mode
87
+ *
88
+ * Algorithm:
89
+ * 1. Check if multiProject.enabled === true
90
+ * 2. Count projects in multiProject.projects
91
+ * 3. If exactly 1 project:
92
+ * a. Extract project data
93
+ * b. Move to top-level project field
94
+ * c. Set multiProject.enabled = false
95
+ * d. Log migration
96
+ * 4. Return updated config
97
+ *
98
+ * @param config - Current configuration object
99
+ * @param options - Migration options
100
+ * @returns Updated config and migration result
101
+ */
102
+ export declare function detectAndMigrateSingleProject(config: Config, options?: MigratorOptions): Promise<MigrationAttempt>;
103
+ /**
104
+ * Checks if config needs migration (exported for testing)
105
+ *
106
+ * @param config - Configuration to check
107
+ * @returns true if migration needed, false otherwise
108
+ */
109
+ export declare function needsMigration(config: Config): boolean;
110
+ //# sourceMappingURL=single-project-migrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-project-migrator.d.ts","sourceRoot":"","sources":["../../../../src/core/config/single-project-migrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE;QACd,MAAM,CAAC,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;QAChC,IAAI,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAA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;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAOtD"}
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Single-Project Migrator
3
+ *
4
+ * Automatically detects and migrates repositories with exactly 1 project
5
+ * from multi-project mode (multiProject.enabled=true) to single-project mode
6
+ * (multiProject.enabled=false).
7
+ *
8
+ * This is part of the fix for the auto-enable multi-project bug where
9
+ * single-project repositories were incorrectly configured with multi-project mode.
10
+ *
11
+ * @module core/config/single-project-migrator
12
+ * @since v0.34.0
13
+ */
14
+ import { consoleLogger } from '../../utils/logger.js';
15
+ import * as fs from 'fs';
16
+ import * as path from 'path';
17
+ /**
18
+ * Detects and migrates single-project repositories from multi-project mode to single-project mode
19
+ *
20
+ * Algorithm:
21
+ * 1. Check if multiProject.enabled === true
22
+ * 2. Count projects in multiProject.projects
23
+ * 3. If exactly 1 project:
24
+ * a. Extract project data
25
+ * b. Move to top-level project field
26
+ * c. Set multiProject.enabled = false
27
+ * d. Log migration
28
+ * 4. Return updated config
29
+ *
30
+ * @param config - Current configuration object
31
+ * @param options - Migration options
32
+ * @returns Updated config and migration result
33
+ */
34
+ export async function detectAndMigrateSingleProject(config, options = {}) {
35
+ const logger = options.logger ?? consoleLogger;
36
+ const projectRoot = options.projectRoot ?? process.cwd();
37
+ const createBackup = options.createBackup ?? true;
38
+ // Check if multi-project mode is enabled
39
+ if (config.multiProject?.enabled !== true) {
40
+ return {
41
+ config,
42
+ result: {
43
+ migrated: false,
44
+ reason: 'Already in single-project mode (multiProject.enabled=false)',
45
+ preservedFields: []
46
+ }
47
+ };
48
+ }
49
+ // Count projects
50
+ const projects = config.multiProject.projects || {};
51
+ const projectCount = Object.keys(projects).length;
52
+ // If 0 projects, this is an error state
53
+ if (projectCount === 0) {
54
+ logger.warn('⚠️ Multi-project mode enabled but no projects defined');
55
+ return {
56
+ config,
57
+ result: {
58
+ migrated: false,
59
+ reason: 'No projects found in multiProject.projects (error state)',
60
+ preservedFields: []
61
+ }
62
+ };
63
+ }
64
+ // If multiple projects, genuinely multi-project
65
+ if (projectCount > 1) {
66
+ return {
67
+ config,
68
+ result: {
69
+ migrated: false,
70
+ reason: `Genuinely multi-project (${projectCount} projects configured)`,
71
+ preservedFields: []
72
+ }
73
+ };
74
+ }
75
+ // Single project with multi-project enabled = BUG
76
+ const [projectId, projectData] = Object.entries(projects)[0];
77
+ logger.log(`🔧 Auto-migrating to single-project mode (found 1 project: ${projectId})`);
78
+ // Create backup if enabled
79
+ let backupPath;
80
+ if (createBackup) {
81
+ const configPath = path.join(projectRoot, '.specweave', 'config.json');
82
+ backupPath = `${configPath}.backup-${Date.now()}`;
83
+ try {
84
+ await fs.promises.copyFile(configPath, backupPath);
85
+ logger.log(` 📦 Backup created: ${backupPath}`);
86
+ }
87
+ catch (error) {
88
+ logger.warn(` ⚠️ Could not create backup: ${error instanceof Error ? error.message : String(error)}`);
89
+ backupPath = undefined;
90
+ }
91
+ }
92
+ // Track preserved fields
93
+ const preservedFields = [];
94
+ // Build top-level project object from projectData
95
+ const migratedProject = {
96
+ name: projectData.id,
97
+ version: projectData.name || projectData.id, // Use name as version if available
98
+ description: projectData.description,
99
+ techStack: projectData.techStack,
100
+ team: projectData.team
101
+ };
102
+ // Track what was preserved
103
+ if (projectData.description)
104
+ preservedFields.push('description');
105
+ if (projectData.techStack)
106
+ preservedFields.push('techStack');
107
+ if (projectData.team)
108
+ preservedFields.push('team');
109
+ if (projectData.externalTools)
110
+ preservedFields.push('externalTools');
111
+ // Create migrated config
112
+ const migratedConfig = {
113
+ ...config,
114
+ project: migratedProject,
115
+ multiProject: {
116
+ enabled: false,
117
+ projects: {} // Clear projects array
118
+ }
119
+ };
120
+ // Log migration to file
121
+ await logMigration(projectRoot, {
122
+ timestamp: new Date().toISOString(),
123
+ projectId,
124
+ projectCount,
125
+ preservedFields,
126
+ backupPath
127
+ }, logger);
128
+ logger.log(` ✅ Migrated: multiProject.enabled = false`);
129
+ logger.log(` 📁 Project: ${projectId}`);
130
+ logger.log(` 🔐 Preserved: ${preservedFields.join(', ') || 'no additional fields'}`);
131
+ return {
132
+ config: migratedConfig,
133
+ result: {
134
+ migrated: true,
135
+ reason: `Single project detected (${projectId})`,
136
+ preservedFields,
137
+ backupPath
138
+ }
139
+ };
140
+ }
141
+ /**
142
+ * Logs migration to .specweave/logs/migration.log
143
+ */
144
+ async function logMigration(projectRoot, details, logger) {
145
+ const logsDir = path.join(projectRoot, '.specweave', 'logs');
146
+ const logFile = path.join(logsDir, 'migration.log');
147
+ try {
148
+ // Ensure logs directory exists
149
+ await fs.promises.mkdir(logsDir, { recursive: true });
150
+ const logEntry = [
151
+ `[${details.timestamp}] Single-Project Migration`,
152
+ ` Project ID: ${details.projectId}`,
153
+ ` Project Count: ${details.projectCount}`,
154
+ ` Preserved Fields: ${details.preservedFields.join(', ') || 'none'}`,
155
+ details.backupPath ? ` Backup: ${details.backupPath}` : '',
156
+ ` Result: SUCCESS`,
157
+ ''
158
+ ].filter(Boolean).join('\n');
159
+ await fs.promises.appendFile(logFile, logEntry);
160
+ logger.debug(` 📝 Migration logged to ${logFile}`);
161
+ }
162
+ catch (error) {
163
+ logger.warn(` ⚠️ Could not write migration log: ${error instanceof Error ? error.message : String(error)}`);
164
+ }
165
+ }
166
+ /**
167
+ * Checks if config needs migration (exported for testing)
168
+ *
169
+ * @param config - Configuration to check
170
+ * @returns true if migration needed, false otherwise
171
+ */
172
+ export function needsMigration(config) {
173
+ if (config.multiProject?.enabled !== true) {
174
+ return false;
175
+ }
176
+ const projectCount = Object.keys(config.multiProject.projects || {}).length;
177
+ return projectCount === 1;
178
+ }
179
+ //# sourceMappingURL=single-project-migrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-project-migrator.js","sourceRoot":"","sources":["../../../../src/core/config/single-project-migrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,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B,CAAC"}
@@ -387,7 +387,7 @@ export interface TranslationScope {
387
387
  export interface TranslationConfiguration {
388
388
  /**
389
389
  * Master switch for auto-translation
390
- * When false, user must use /specweave:translate manually
390
+ * When false, user must use /sw:translate manually
391
391
  */
392
392
  enabled: boolean;
393
393
  /**
@@ -403,13 +403,13 @@ export interface TranslationConfiguration {
403
403
  /**
404
404
  * Translation method
405
405
  * - 'auto': Hooks trigger translation automatically
406
- * - 'manual': User must run /specweave:translate
406
+ * - 'manual': User must run /sw:translate
407
407
  * - 'none': Translation disabled entirely
408
408
  */
409
409
  method: 'auto' | 'manual' | 'none';
410
410
  /**
411
411
  * Keep SpecWeave framework terms in English
412
- * e.g., increment, spec.md, tasks.md, /specweave:*
412
+ * e.g., increment, spec.md, tasks.md, /sw:*
413
413
  */
414
414
  preserveFrameworkTerms: boolean;
415
415
  /**
@@ -2,10 +2,17 @@
2
2
  * Secure Credentials Manager
3
3
  *
4
4
  * Handles API keys and credentials for external integrations (Jira, ADO, etc.)
5
- * - Loads from .env file or environment variables
6
- * - Validates credential format
7
- * - Never logs secrets
8
- * - Provides masked logging for debugging
5
+ *
6
+ * ARCHITECTURE (v0.34.0+):
7
+ * - SECRETS (PAT, API_TOKEN, EMAIL) -> .env file (gitignored)
8
+ * - CONFIG (domain, organization, project) -> config.json via ConfigManager
9
+ *
10
+ * This class loads secrets from .env and provides fallback to process.env
11
+ * for backward compatibility. Config values should be loaded from ConfigManager
12
+ * in calling code (reconcilers, importers, etc.)
13
+ *
14
+ * @deprecated For config values (domain, org, project), use ConfigManager directly.
15
+ * Only use CredentialsManager for secrets (PAT, tokens, emails).
9
16
  */
10
17
  export interface AdoCredentials {
11
18
  pat: string;
@@ -54,12 +61,26 @@ export declare class CredentialsManager {
54
61
  private parseEnvFile;
55
62
  /**
56
63
  * Get ADO credentials
64
+ *
65
+ * NOTE (v0.34.0+): This method returns secrets from .env.
66
+ * For config values (organization, project), use ConfigManager directly:
67
+ * const config = await configManager.read();
68
+ * const org = config.issueTracker?.organization_ado || '';
69
+ *
57
70
  * @throws Error if credentials not found
71
+ * @deprecated organization and project fields are deprecated - use ConfigManager
58
72
  */
59
73
  getAdoCredentials(): AdoCredentials;
60
74
  /**
61
75
  * Get Jira credentials
76
+ *
77
+ * NOTE (v0.34.0+): This method returns secrets from .env.
78
+ * For config values (domain), use ConfigManager directly:
79
+ * const config = await configManager.read();
80
+ * const domain = config.issueTracker?.domain || '';
81
+ *
62
82
  * @throws Error if credentials not found
83
+ * @deprecated domain field is deprecated - use ConfigManager
63
84
  */
64
85
  getJiraCredentials(): JiraCredentials;
65
86
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"credentials-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/credentials/credentials-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,qBAAqB,GAAG,YAAY,GAAG,iBAAiB,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqB;IAC5C,OAAO,CAAC,WAAW,CAAyB;IAC5C,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO;WAIO,WAAW,IAAI,kBAAkB;IAO/C;;OAEG;IACH,OAAO,CAAC,WAAW;IA2HnB;;OAEG;IACH,OAAO,CAAC,YAAY;IA+BpB;;;OAGG;IACI,iBAAiB,IAAI,cAAc;IAY1C;;;OAGG;IACI,kBAAkB,IAAI,eAAe;IAY5C;;OAEG;IACI,iBAAiB,IAAI,OAAO;IAInC;;OAEG;IACI,kBAAkB,IAAI,OAAO;IAIpC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAoB/B;;OAEG;IACI,gBAAgB,IAAI,MAAM;IAqBjC;;OAEG;IACI,iBAAiB,IAAI,MAAM;IAqBlC;;OAEG;IACH,OAAO,CAAC,UAAU;IAUlB;;OAEG;IACI,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IA4I9D;;OAEG;IACH,OAAO,CAAC,eAAe;IAcvB;;OAEG;IACI,gBAAgB,IAAI,IAAI;CAgChC;AAGD,eAAO,MAAM,kBAAkB,oBAAmC,CAAC"}
1
+ {"version":3,"file":"credentials-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/credentials/credentials-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;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O/C;;OAEG;IACH,OAAO,CAAC,WAAW;IAmJnB;;OAEG;IACH,OAAO,CAAC,YAAY;IA+BpB;;;;;;;;;;OAUG;IACI,iBAAiB,IAAI,cAAc;IAY1C;;;;;;;;;;OAUG;IACI,kBAAkB,IAAI,eAAe;IAY5C;;OAEG;IACI,iBAAiB,IAAI,OAAO;IAInC;;OAEG;IACI,kBAAkB,IAAI,OAAO;IAIpC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAoB/B;;OAEG;IACI,gBAAgB,IAAI,MAAM;IAqBjC;;OAEG;IACI,iBAAiB,IAAI,MAAM;IAqBlC;;OAEG;IACH,OAAO,CAAC,UAAU;IAUlB;;OAEG;IACI,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IA4I9D;;OAEG;IACH,OAAO,CAAC,eAAe;IAcvB;;OAEG;IACI,gBAAgB,IAAI,IAAI;CAgChC;AAGD,eAAO,MAAM,kBAAkB,oBAAmC,CAAC"}
@@ -2,10 +2,17 @@
2
2
  * Secure Credentials Manager
3
3
  *
4
4
  * Handles API keys and credentials for external integrations (Jira, ADO, etc.)
5
- * - Loads from .env file or environment variables
6
- * - Validates credential format
7
- * - Never logs secrets
8
- * - Provides masked logging for debugging
5
+ *
6
+ * ARCHITECTURE (v0.34.0+):
7
+ * - SECRETS (PAT, API_TOKEN, EMAIL) -> .env file (gitignored)
8
+ * - CONFIG (domain, organization, project) -> config.json via ConfigManager
9
+ *
10
+ * This class loads secrets from .env and provides fallback to process.env
11
+ * for backward compatibility. Config values should be loaded from ConfigManager
12
+ * in calling code (reconcilers, importers, etc.)
13
+ *
14
+ * @deprecated For config values (domain, org, project), use ConfigManager directly.
15
+ * Only use CredentialsManager for secrets (PAT, tokens, emails).
9
16
  */
10
17
  import * as fs from 'fs';
11
18
  import * as path from 'path';
@@ -37,24 +44,34 @@ export class CredentialsManager {
37
44
  }
38
45
  });
39
46
  }
40
- // Load ADO credentials
47
+ // Load ADO credentials (SECRETS only - PAT)
48
+ // NOTE: organization and project should come from config.json via ConfigManager
41
49
  if (process.env.AZURE_DEVOPS_PAT) {
42
- const project = process.env.AZURE_DEVOPS_PROJECT || '';
43
50
  const singleTeam = process.env.AZURE_DEVOPS_TEAM || '';
44
51
  const multiTeams = process.env.AZURE_DEVOPS_TEAMS || '';
45
52
  // Parse comma-separated teams
46
53
  const teams = multiTeams
47
54
  ? multiTeams.split(',').map(t => t.trim()).filter(t => t.length > 0)
48
55
  : (singleTeam ? [singleTeam] : []);
56
+ // DEPRECATED (v0.34.0+): org and project should come from config.json
57
+ // Kept for backward compatibility - will be removed in v1.0
58
+ const deprecatedOrg = process.env.AZURE_DEVOPS_ORG || '';
59
+ const deprecatedProject = process.env.AZURE_DEVOPS_PROJECT || '';
60
+ if (deprecatedOrg || deprecatedProject) {
61
+ console.warn('⚠️ DEPRECATED: AZURE_DEVOPS_ORG and AZURE_DEVOPS_PROJECT in .env\n' +
62
+ ' Move to .specweave/config.json: issueTracker.organization_ado and issueTracker.project\n' +
63
+ ' This will be removed in v1.0');
64
+ }
49
65
  this.credentials.ado = {
50
66
  pat: process.env.AZURE_DEVOPS_PAT,
51
- organization: process.env.AZURE_DEVOPS_ORG || '',
52
- project: project, // One project (ADO standard)
67
+ organization: deprecatedOrg, // DEPRECATED - use ConfigManager
68
+ project: deprecatedProject, // DEPRECATED - use ConfigManager
53
69
  team: singleTeam || teams[0], // Use first team for backward compatibility
54
70
  teams: teams.length > 1 ? teams : undefined // Multiple teams (optional)
55
71
  };
56
72
  }
57
- // Load Jira credentials
73
+ // Load Jira credentials (SECRETS only - token, email)
74
+ // NOTE: domain should come from config.json via ConfigManager
58
75
  if (process.env.JIRA_API_TOKEN) {
59
76
  const strategy = process.env.JIRA_STRATEGY || undefined;
60
77
  const singleProject = process.env.JIRA_PROJECT || '';
@@ -71,10 +88,18 @@ export class CredentialsManager {
71
88
  const boards = boardsStr
72
89
  ? boardsStr.split(',').map(b => b.trim()).filter(b => b.length > 0)
73
90
  : [];
91
+ // DEPRECATED (v0.34.0+): domain should come from config.json
92
+ // Kept for backward compatibility - will be removed in v1.0
93
+ const deprecatedDomain = process.env.JIRA_DOMAIN || '';
94
+ if (deprecatedDomain) {
95
+ console.warn('⚠️ DEPRECATED: JIRA_DOMAIN in .env\n' +
96
+ ' Move to .specweave/config.json: issueTracker.domain\n' +
97
+ ' This will be removed in v1.0');
98
+ }
74
99
  this.credentials.jira = {
75
100
  apiToken: process.env.JIRA_API_TOKEN,
76
- email: process.env.JIRA_EMAIL || '',
77
- domain: process.env.JIRA_DOMAIN || '',
101
+ email: process.env.JIRA_EMAIL || '', // SECRET - stays in .env
102
+ domain: deprecatedDomain, // DEPRECATED - use ConfigManager
78
103
  strategy,
79
104
  // Strategy 1: Project-per-team
80
105
  projects: projects.length > 0 ? projects : undefined,
@@ -155,24 +180,38 @@ export class CredentialsManager {
155
180
  }
156
181
  /**
157
182
  * Get ADO credentials
183
+ *
184
+ * NOTE (v0.34.0+): This method returns secrets from .env.
185
+ * For config values (organization, project), use ConfigManager directly:
186
+ * const config = await configManager.read();
187
+ * const org = config.issueTracker?.organization_ado || '';
188
+ *
158
189
  * @throws Error if credentials not found
190
+ * @deprecated organization and project fields are deprecated - use ConfigManager
159
191
  */
160
192
  getAdoCredentials() {
161
193
  if (!this.credentials.ado) {
162
- throw new Error('Azure DevOps credentials not found. Please set AZURE_DEVOPS_PAT, ' +
163
- 'AZURE_DEVOPS_ORG, and AZURE_DEVOPS_PROJECT in .env file or environment variables.');
194
+ throw new Error('Azure DevOps credentials not found. Please set AZURE_DEVOPS_PAT in .env file.\n' +
195
+ 'For organization and project, use .specweave/config.json (issueTracker.organization_ado).');
164
196
  }
165
197
  this.validateAdoCredentials(this.credentials.ado);
166
198
  return this.credentials.ado;
167
199
  }
168
200
  /**
169
201
  * Get Jira credentials
202
+ *
203
+ * NOTE (v0.34.0+): This method returns secrets from .env.
204
+ * For config values (domain), use ConfigManager directly:
205
+ * const config = await configManager.read();
206
+ * const domain = config.issueTracker?.domain || '';
207
+ *
170
208
  * @throws Error if credentials not found
209
+ * @deprecated domain field is deprecated - use ConfigManager
171
210
  */
172
211
  getJiraCredentials() {
173
212
  if (!this.credentials.jira) {
174
- throw new Error('Jira credentials not found. Please set JIRA_API_TOKEN, JIRA_EMAIL, ' +
175
- 'and JIRA_DOMAIN in .env file or environment variables.');
213
+ throw new Error('Jira credentials not found. Please set JIRA_API_TOKEN and JIRA_EMAIL in .env file.\n' +
214
+ 'For domain, use .specweave/config.json (issueTracker.domain).');
176
215
  }
177
216
  this.validateJiraCredentials(this.credentials.jira);
178
217
  return this.credentials.jira;