specweave 0.18.0 → 0.20.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 (428) hide show
  1. package/CLAUDE.md +229 -1817
  2. package/README.md +68 -0
  3. package/bin/specweave.js +62 -6
  4. package/dist/locales/de/.gitkeep +0 -0
  5. package/dist/locales/de/cli.json +108 -0
  6. package/dist/locales/en/cli.json +287 -0
  7. package/dist/locales/en/errors.json +7 -0
  8. package/dist/locales/en/templates.json +6 -0
  9. package/dist/locales/es/.gitkeep +0 -0
  10. package/dist/locales/es/cli.json +41 -0
  11. package/dist/locales/fr/.gitkeep +0 -0
  12. package/dist/locales/fr/cli.json +108 -0
  13. package/dist/locales/ja/.gitkeep +0 -0
  14. package/dist/locales/ja/cli.json +108 -0
  15. package/dist/locales/ko/.gitkeep +0 -0
  16. package/dist/locales/ko/cli.json +108 -0
  17. package/dist/locales/pt/.gitkeep +0 -0
  18. package/dist/locales/pt/cli.json +108 -0
  19. package/dist/locales/ru/.gitkeep +0 -0
  20. package/dist/locales/ru/cli.json +269 -0
  21. package/dist/locales/zh/.gitkeep +0 -0
  22. package/dist/locales/zh/cli.json +108 -0
  23. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
  24. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +3 -0
  25. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
  26. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +21 -0
  27. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +1 -0
  28. package/dist/plugins/specweave/lib/hooks/update-ac-status.js +162 -0
  29. package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +1 -0
  30. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -1
  31. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +65 -6
  32. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -1
  33. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +25 -0
  34. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +1 -0
  35. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +191 -0
  36. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +1 -0
  37. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts +112 -0
  38. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts.map +1 -0
  39. package/dist/plugins/specweave-github/lib/completion-calculator.js +301 -0
  40. package/dist/plugins/specweave-github/lib/completion-calculator.js.map +1 -0
  41. package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +3 -3
  42. package/dist/plugins/specweave-github/lib/duplicate-detector.js +3 -3
  43. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +70 -0
  44. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +1 -0
  45. package/dist/plugins/specweave-github/lib/epic-content-builder.js +258 -0
  46. package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +1 -0
  47. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +14 -0
  48. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  49. package/dist/plugins/specweave-github/lib/github-client-v2.js +51 -0
  50. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  51. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts +2 -2
  52. package/dist/plugins/specweave-github/lib/github-epic-sync.d.ts.map +1 -1
  53. package/dist/plugins/specweave-github/lib/github-epic-sync.js +20 -5
  54. package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -1
  55. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +87 -0
  56. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -0
  57. package/dist/plugins/specweave-github/lib/github-feature-sync.js +412 -0
  58. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -0
  59. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  60. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +64 -13
  61. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  62. package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts +78 -0
  63. package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts.map +1 -0
  64. package/dist/plugins/specweave-github/lib/progress-comment-builder.js +237 -0
  65. package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -0
  66. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts +97 -0
  67. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -0
  68. package/dist/plugins/specweave-github/lib/user-story-content-builder.js +301 -0
  69. package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -0
  70. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts +83 -0
  71. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -0
  72. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +386 -0
  73. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -0
  74. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +28 -0
  75. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -0
  76. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +156 -0
  77. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -0
  78. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts +57 -0
  79. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.d.ts.map +1 -0
  80. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +248 -0
  81. package/dist/plugins/specweave-kafka/lib/cli/kcat-wrapper.js.map +1 -0
  82. package/dist/plugins/specweave-kafka/lib/cli/types.d.ts +82 -0
  83. package/dist/plugins/specweave-kafka/lib/cli/types.d.ts.map +1 -0
  84. package/dist/plugins/specweave-kafka/lib/cli/types.js +13 -0
  85. package/dist/plugins/specweave-kafka/lib/cli/types.js.map +1 -0
  86. package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts +49 -0
  87. package/dist/plugins/specweave-kafka/lib/mcp/detector.d.ts.map +1 -0
  88. package/dist/plugins/specweave-kafka/lib/mcp/detector.js +316 -0
  89. package/dist/plugins/specweave-kafka/lib/mcp/detector.js.map +1 -0
  90. package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts +70 -0
  91. package/dist/plugins/specweave-kafka/lib/mcp/types.d.ts.map +1 -0
  92. package/dist/plugins/specweave-kafka/lib/mcp/types.js +23 -0
  93. package/dist/plugins/specweave-kafka/lib/mcp/types.js.map +1 -0
  94. package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts +85 -0
  95. package/dist/plugins/specweave-kafka/lib/utils/partitioning.d.ts.map +1 -0
  96. package/dist/plugins/specweave-kafka/lib/utils/partitioning.js +281 -0
  97. package/dist/plugins/specweave-kafka/lib/utils/partitioning.js.map +1 -0
  98. package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts +75 -0
  99. package/dist/plugins/specweave-kafka/lib/utils/sizing.d.ts.map +1 -0
  100. package/dist/plugins/specweave-kafka/lib/utils/sizing.js +238 -0
  101. package/dist/plugins/specweave-kafka/lib/utils/sizing.js.map +1 -0
  102. package/dist/spec-parser.js +629 -0
  103. package/dist/src/cli/commands/import-docs.js +4 -4
  104. package/dist/src/cli/commands/import-docs.js.map +1 -1
  105. package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -1
  106. package/dist/src/cli/commands/init-multiproject.js +17 -18
  107. package/dist/src/cli/commands/init-multiproject.js.map +1 -1
  108. package/dist/src/cli/commands/init.d.ts.map +1 -1
  109. package/dist/src/cli/commands/init.js +107 -3
  110. package/dist/src/cli/commands/init.js.map +1 -1
  111. package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -1
  112. package/dist/src/cli/commands/migrate-to-multiproject.js +8 -4
  113. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  114. package/dist/src/cli/commands/switch-project.d.ts.map +1 -1
  115. package/dist/src/cli/commands/switch-project.js +9 -26
  116. package/dist/src/cli/commands/switch-project.js.map +1 -1
  117. package/dist/src/cli/commands/sync-spec-content.js +3 -0
  118. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  119. package/dist/src/core/deduplication/command-deduplicator.d.ts +166 -0
  120. package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -0
  121. package/dist/src/core/deduplication/command-deduplicator.js +254 -0
  122. package/dist/src/core/deduplication/command-deduplicator.js.map +1 -0
  123. package/dist/src/core/increment/active-increment-manager.d.ts +42 -15
  124. package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -1
  125. package/dist/src/core/increment/active-increment-manager.js +113 -46
  126. package/dist/src/core/increment/active-increment-manager.js.map +1 -1
  127. package/dist/src/core/increment/conflict-resolver.d.ts +40 -0
  128. package/dist/src/core/increment/conflict-resolver.d.ts.map +1 -0
  129. package/dist/src/core/increment/conflict-resolver.js +219 -0
  130. package/dist/src/core/increment/conflict-resolver.js.map +1 -0
  131. package/dist/src/core/increment/discipline-checker.d.ts.map +1 -1
  132. package/dist/src/core/increment/discipline-checker.js +7 -1
  133. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  134. package/dist/src/core/increment/duplicate-detector.d.ts +52 -0
  135. package/dist/src/core/increment/duplicate-detector.d.ts.map +1 -0
  136. package/dist/src/core/increment/duplicate-detector.js +276 -0
  137. package/dist/src/core/increment/duplicate-detector.js.map +1 -0
  138. package/dist/src/core/increment/increment-archiver.d.ts +90 -0
  139. package/dist/src/core/increment/increment-archiver.d.ts.map +1 -0
  140. package/dist/src/core/increment/increment-archiver.js +368 -0
  141. package/dist/src/core/increment/increment-archiver.js.map +1 -0
  142. package/dist/src/core/increment/increment-reopener.d.ts +165 -0
  143. package/dist/src/core/increment/increment-reopener.d.ts.map +1 -0
  144. package/dist/src/core/increment/increment-reopener.js +390 -0
  145. package/dist/src/core/increment/increment-reopener.js.map +1 -0
  146. package/dist/src/core/increment/metadata-manager.d.ts +26 -1
  147. package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
  148. package/dist/src/core/increment/metadata-manager.js +143 -5
  149. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  150. package/dist/src/core/increment/recent-work-scanner.d.ts +121 -0
  151. package/dist/src/core/increment/recent-work-scanner.d.ts.map +1 -0
  152. package/dist/src/core/increment/recent-work-scanner.js +303 -0
  153. package/dist/src/core/increment/recent-work-scanner.js.map +1 -0
  154. package/dist/src/core/increment/types.d.ts +1 -0
  155. package/dist/src/core/increment/types.d.ts.map +1 -1
  156. package/dist/src/core/increment-utils.d.ts +112 -0
  157. package/dist/src/core/increment-utils.d.ts.map +1 -0
  158. package/dist/src/core/increment-utils.js +210 -0
  159. package/dist/src/core/increment-utils.js.map +1 -0
  160. package/dist/src/core/living-docs/ac-project-specific-generator.d.ts +65 -0
  161. package/dist/src/core/living-docs/ac-project-specific-generator.d.ts.map +1 -0
  162. package/dist/src/core/living-docs/ac-project-specific-generator.js +175 -0
  163. package/dist/src/core/living-docs/ac-project-specific-generator.js.map +1 -0
  164. package/dist/src/core/living-docs/feature-archiver.d.ts +130 -0
  165. package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -0
  166. package/dist/src/core/living-docs/feature-archiver.js +549 -0
  167. package/dist/src/core/living-docs/feature-archiver.js.map +1 -0
  168. package/dist/src/core/living-docs/feature-id-manager.d.ts +81 -0
  169. package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -0
  170. package/dist/src/core/living-docs/feature-id-manager.js +339 -0
  171. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -0
  172. package/dist/src/core/living-docs/hierarchy-mapper.d.ts +144 -83
  173. package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
  174. package/dist/src/core/living-docs/hierarchy-mapper.js +488 -270
  175. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  176. package/dist/src/core/living-docs/index.d.ts +6 -0
  177. package/dist/src/core/living-docs/index.d.ts.map +1 -1
  178. package/dist/src/core/living-docs/index.js +6 -0
  179. package/dist/src/core/living-docs/index.js.map +1 -1
  180. package/dist/src/core/living-docs/project-detector.d.ts +6 -0
  181. package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
  182. package/dist/src/core/living-docs/project-detector.js +35 -1
  183. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  184. package/dist/src/core/living-docs/spec-distributor.d.ts +100 -26
  185. package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -1
  186. package/dist/src/core/living-docs/spec-distributor.js +1275 -258
  187. package/dist/src/core/living-docs/spec-distributor.js.map +1 -1
  188. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +109 -0
  189. package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -0
  190. package/dist/src/core/living-docs/task-project-specific-generator.js +221 -0
  191. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -0
  192. package/dist/src/core/living-docs/types.d.ts +143 -0
  193. package/dist/src/core/living-docs/types.d.ts.map +1 -1
  194. package/dist/src/core/project-manager.d.ts +2 -17
  195. package/dist/src/core/project-manager.d.ts.map +1 -1
  196. package/dist/src/core/project-manager.js +68 -48
  197. package/dist/src/core/project-manager.js.map +1 -1
  198. package/dist/src/core/spec-content-sync.d.ts +1 -1
  199. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  200. package/dist/src/core/sync/enhanced-content-builder.d.ts +32 -54
  201. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
  202. package/dist/src/core/sync/enhanced-content-builder.js +142 -138
  203. package/dist/src/core/sync/enhanced-content-builder.js.map +1 -1
  204. package/dist/src/core/sync/performance-optimizer.d.ts +153 -0
  205. package/dist/src/core/sync/performance-optimizer.d.ts.map +1 -0
  206. package/dist/src/core/sync/performance-optimizer.js +220 -0
  207. package/dist/src/core/sync/performance-optimizer.js.map +1 -0
  208. package/dist/src/core/sync/retry-handler.d.ts +98 -0
  209. package/dist/src/core/sync/retry-handler.d.ts.map +1 -0
  210. package/dist/src/core/sync/retry-handler.js +196 -0
  211. package/dist/src/core/sync/retry-handler.js.map +1 -0
  212. package/dist/src/core/sync/spec-content-sync.d.ts +88 -0
  213. package/dist/src/core/sync/spec-content-sync.d.ts.map +1 -0
  214. package/dist/src/core/sync/spec-content-sync.js +5 -0
  215. package/dist/src/core/sync/spec-content-sync.js.map +1 -0
  216. package/dist/src/core/sync/types.d.ts +52 -0
  217. package/dist/src/core/sync/types.d.ts.map +1 -0
  218. package/dist/src/core/sync/types.js +5 -0
  219. package/dist/src/core/sync/types.js.map +1 -0
  220. package/dist/src/core/types/config.d.ts +125 -0
  221. package/dist/src/core/types/config.d.ts.map +1 -1
  222. package/dist/src/core/types/config.js +25 -0
  223. package/dist/src/core/types/config.js.map +1 -1
  224. package/dist/src/core/types/increment-metadata.d.ts +10 -0
  225. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  226. package/dist/src/core/types/increment-metadata.js +10 -1
  227. package/dist/src/core/types/increment-metadata.js.map +1 -1
  228. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  229. package/dist/src/integrations/jira/jira-incremental-mapper.js +4 -8
  230. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  231. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
  232. package/dist/src/integrations/jira/jira-mapper.js +4 -8
  233. package/dist/src/integrations/jira/jira-mapper.js.map +1 -1
  234. package/dist/tsconfig.tsbuildinfo +1 -0
  235. package/package.json +1 -1
  236. package/plugins/specweave/COMMANDS.md +13 -4
  237. package/plugins/specweave/agents/pm/AGENT.md +159 -12
  238. package/plugins/specweave/commands/specweave-abandon.md +22 -20
  239. package/plugins/specweave/commands/specweave-archive-features.md +121 -0
  240. package/plugins/specweave/commands/specweave-archive-increments.md +82 -0
  241. package/plugins/specweave/commands/specweave-archive.md +363 -0
  242. package/plugins/specweave/commands/specweave-backlog.md +211 -0
  243. package/plugins/specweave/commands/specweave-fix-duplicates.md +517 -0
  244. package/plugins/specweave/commands/specweave-increment.md +4 -3
  245. package/plugins/specweave/commands/specweave-progress.md +176 -27
  246. package/plugins/specweave/commands/specweave-reopen.md +391 -0
  247. package/plugins/specweave/commands/specweave-restore-feature.md +90 -0
  248. package/plugins/specweave/commands/specweave-restore.md +309 -0
  249. package/plugins/specweave/commands/specweave-resume.md +51 -23
  250. package/plugins/specweave/commands/specweave-status.md +41 -7
  251. package/plugins/specweave/commands/specweave-sync-specs.md +425 -0
  252. package/plugins/specweave/commands/specweave.md +70 -405
  253. package/plugins/specweave/hooks/hooks.json +4 -0
  254. package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
  255. package/plugins/specweave/hooks/post-increment-planning.sh +26 -2
  256. package/plugins/specweave/hooks/post-task-completion.sh +39 -0
  257. package/plugins/specweave/hooks/pre-command-deduplication.sh +83 -0
  258. package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
  259. package/plugins/specweave/lib/hooks/sync-living-docs.js +2 -0
  260. package/plugins/specweave/lib/hooks/sync-living-docs.ts +4 -0
  261. package/plugins/specweave/lib/hooks/update-ac-status.js +102 -0
  262. package/plugins/specweave/lib/hooks/update-ac-status.ts +192 -0
  263. package/plugins/specweave/skills/archive-increments/SKILL.md +198 -0
  264. package/plugins/specweave/skills/increment-planner/scripts/feature-utils.js +14 -0
  265. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +244 -0
  266. package/plugins/specweave-ado/lib/ado-spec-content-sync.js +49 -5
  267. package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +72 -6
  268. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
  269. package/plugins/specweave-confluent/.claude-plugin/plugin.json +23 -0
  270. package/plugins/specweave-confluent/README.md +375 -0
  271. package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +306 -0
  272. package/plugins/specweave-confluent/skills/confluent-kafka-connect/SKILL.md +453 -0
  273. package/plugins/specweave-confluent/skills/confluent-ksqldb/SKILL.md +470 -0
  274. package/plugins/specweave-confluent/skills/confluent-schema-registry/SKILL.md +316 -0
  275. package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +2 -2
  276. package/plugins/specweave-github/agents/user-story-updater/AGENT.md +148 -0
  277. package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +1 -1
  278. package/plugins/specweave-github/commands/specweave-github-update-user-story.md +156 -0
  279. package/plugins/specweave-github/hooks/post-task-completion.sh +42 -9
  280. package/plugins/specweave-github/lib/completion-calculator.js +262 -0
  281. package/plugins/specweave-github/lib/completion-calculator.ts +434 -0
  282. package/plugins/specweave-github/lib/duplicate-detector.js +3 -3
  283. package/plugins/specweave-github/lib/duplicate-detector.ts +4 -4
  284. package/plugins/specweave-github/lib/epic-content-builder.js +265 -0
  285. package/plugins/specweave-github/lib/epic-content-builder.ts +376 -0
  286. package/plugins/specweave-github/lib/github-client-v2.js +49 -0
  287. package/plugins/specweave-github/lib/github-client-v2.ts +59 -0
  288. package/plugins/specweave-github/lib/github-epic-sync.js +23 -24
  289. package/plugins/specweave-github/lib/github-epic-sync.ts +30 -5
  290. package/plugins/specweave-github/lib/github-feature-sync.js +381 -0
  291. package/plugins/specweave-github/lib/github-feature-sync.ts +568 -0
  292. package/plugins/specweave-github/lib/github-spec-content-sync.js +40 -10
  293. package/plugins/specweave-github/lib/github-spec-content-sync.ts +82 -14
  294. package/plugins/specweave-github/lib/progress-comment-builder.js +229 -0
  295. package/plugins/specweave-github/lib/progress-comment-builder.ts +324 -0
  296. package/plugins/specweave-github/lib/user-story-content-builder.js +299 -0
  297. package/plugins/specweave-github/lib/user-story-content-builder.ts +413 -0
  298. package/plugins/specweave-github/lib/user-story-issue-builder.js +344 -0
  299. package/plugins/specweave-github/lib/user-story-issue-builder.ts +543 -0
  300. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +189 -0
  301. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +134 -0
  302. package/plugins/specweave-jira/lib/{enhanced-jira-sync.ts.disabled → enhanced-jira-sync.ts} +26 -52
  303. package/plugins/specweave-kafka/.claude-plugin/plugin.json +26 -0
  304. package/plugins/specweave-kafka/IMPLEMENTATION-COMPLETE.md +483 -0
  305. package/plugins/specweave-kafka/README.md +242 -0
  306. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +235 -0
  307. package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +209 -0
  308. package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +266 -0
  309. package/plugins/specweave-kafka/commands/deploy.md +99 -0
  310. package/plugins/specweave-kafka/commands/dev-env.md +176 -0
  311. package/plugins/specweave-kafka/commands/mcp-configure.md +101 -0
  312. package/plugins/specweave-kafka/commands/monitor-setup.md +96 -0
  313. package/plugins/specweave-kafka/docker/kafka-local/docker-compose.yml +187 -0
  314. package/plugins/specweave-kafka/docker/redpanda/docker-compose.yml +199 -0
  315. package/plugins/specweave-kafka/docker/templates/consumer-nodejs.js +225 -0
  316. package/plugins/specweave-kafka/docker/templates/consumer-python.py +220 -0
  317. package/plugins/specweave-kafka/docker/templates/producer-nodejs.js +168 -0
  318. package/plugins/specweave-kafka/docker/templates/producer-python.py +167 -0
  319. package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.js +438 -0
  320. package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.ts +541 -0
  321. package/plugins/specweave-kafka/lib/adapters/platform-adapter.js +47 -0
  322. package/plugins/specweave-kafka/lib/adapters/platform-adapter.ts +343 -0
  323. package/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +258 -0
  324. package/plugins/specweave-kafka/lib/cli/kcat-wrapper.ts +298 -0
  325. package/plugins/specweave-kafka/lib/cli/types.js +10 -0
  326. package/plugins/specweave-kafka/lib/cli/types.ts +92 -0
  327. package/plugins/specweave-kafka/lib/connectors/connector-catalog.js +305 -0
  328. package/plugins/specweave-kafka/lib/connectors/connector-catalog.ts +528 -0
  329. package/plugins/specweave-kafka/lib/documentation/diagram-generator.js +114 -0
  330. package/plugins/specweave-kafka/lib/documentation/diagram-generator.ts +195 -0
  331. package/plugins/specweave-kafka/lib/documentation/exporter.js +210 -0
  332. package/plugins/specweave-kafka/lib/documentation/exporter.ts +338 -0
  333. package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.js +60 -0
  334. package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.ts +130 -0
  335. package/plugins/specweave-kafka/lib/documentation/topology-generator.js +143 -0
  336. package/plugins/specweave-kafka/lib/documentation/topology-generator.ts +290 -0
  337. package/plugins/specweave-kafka/lib/mcp/detector.js +298 -0
  338. package/plugins/specweave-kafka/lib/mcp/detector.ts +352 -0
  339. package/plugins/specweave-kafka/lib/mcp/types.js +21 -0
  340. package/plugins/specweave-kafka/lib/mcp/types.ts +77 -0
  341. package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.js +193 -0
  342. package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.ts +362 -0
  343. package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.js +188 -0
  344. package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.ts +359 -0
  345. package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.js +195 -0
  346. package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.ts +380 -0
  347. package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.js +209 -0
  348. package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.ts +358 -0
  349. package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.js +354 -0
  350. package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.ts +563 -0
  351. package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.js +259 -0
  352. package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.ts +516 -0
  353. package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.js +233 -0
  354. package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.ts +423 -0
  355. package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.js +266 -0
  356. package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.ts +445 -0
  357. package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.js +312 -0
  358. package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.ts +561 -0
  359. package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.js +289 -0
  360. package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.ts +607 -0
  361. package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.js +264 -0
  362. package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.ts +498 -0
  363. package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.js +263 -0
  364. package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.ts +549 -0
  365. package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.js +205 -0
  366. package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.ts +399 -0
  367. package/plugins/specweave-kafka/lib/performance/performance-optimizer.js +249 -0
  368. package/plugins/specweave-kafka/lib/performance/performance-optimizer.ts +427 -0
  369. package/plugins/specweave-kafka/lib/security/kafka-security.js +252 -0
  370. package/plugins/specweave-kafka/lib/security/kafka-security.ts +494 -0
  371. package/plugins/specweave-kafka/lib/utils/capacity-planner.js +203 -0
  372. package/plugins/specweave-kafka/lib/utils/capacity-planner.ts +469 -0
  373. package/plugins/specweave-kafka/lib/utils/config-validator.js +419 -0
  374. package/plugins/specweave-kafka/lib/utils/config-validator.ts +564 -0
  375. package/plugins/specweave-kafka/lib/utils/partitioning.js +329 -0
  376. package/plugins/specweave-kafka/lib/utils/partitioning.ts +473 -0
  377. package/plugins/specweave-kafka/lib/utils/sizing.js +221 -0
  378. package/plugins/specweave-kafka/lib/utils/sizing.ts +374 -0
  379. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-broker-metrics.json +628 -0
  380. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-cluster-overview.json +564 -0
  381. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-consumer-lag.json +509 -0
  382. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-jvm-metrics.json +674 -0
  383. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-topic-metrics.json +578 -0
  384. package/plugins/specweave-kafka/monitoring/grafana/provisioning/dashboards/kafka.yml +17 -0
  385. package/plugins/specweave-kafka/monitoring/grafana/provisioning/datasources/prometheus.yml +17 -0
  386. package/plugins/specweave-kafka/monitoring/prometheus/kafka-alerts.yml +415 -0
  387. package/plugins/specweave-kafka/monitoring/prometheus/kafka-jmx-exporter.yml +256 -0
  388. package/plugins/specweave-kafka/package.json +41 -0
  389. package/plugins/specweave-kafka/skills/kafka-architecture/SKILL.md +647 -0
  390. package/plugins/specweave-kafka/skills/kafka-cli-tools/SKILL.md +433 -0
  391. package/plugins/specweave-kafka/skills/kafka-iac-deployment/SKILL.md +449 -0
  392. package/plugins/specweave-kafka/skills/kafka-kubernetes/SKILL.md +667 -0
  393. package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +273 -0
  394. package/plugins/specweave-kafka/skills/kafka-observability/SKILL.md +576 -0
  395. package/plugins/specweave-kafka/templates/config/broker-production.properties +254 -0
  396. package/plugins/specweave-kafka/templates/config/consumer-low-latency.properties +112 -0
  397. package/plugins/specweave-kafka/templates/config/producer-high-throughput.properties +120 -0
  398. package/plugins/specweave-kafka/templates/migration/mirrormaker2-config.properties +234 -0
  399. package/plugins/specweave-kafka/templates/monitoring/grafana/multi-cluster-dashboard.json +686 -0
  400. package/plugins/specweave-kafka/terraform/apache-kafka/main.tf +347 -0
  401. package/plugins/specweave-kafka/terraform/apache-kafka/outputs.tf +107 -0
  402. package/plugins/specweave-kafka/terraform/apache-kafka/templates/kafka-broker-init.sh.tpl +216 -0
  403. package/plugins/specweave-kafka/terraform/apache-kafka/variables.tf +156 -0
  404. package/plugins/specweave-kafka/terraform/aws-msk/main.tf +362 -0
  405. package/plugins/specweave-kafka/terraform/aws-msk/outputs.tf +93 -0
  406. package/plugins/specweave-kafka/terraform/aws-msk/templates/server.properties.tpl +32 -0
  407. package/plugins/specweave-kafka/terraform/aws-msk/variables.tf +235 -0
  408. package/plugins/specweave-kafka/terraform/azure-event-hubs/main.tf +281 -0
  409. package/plugins/specweave-kafka/terraform/azure-event-hubs/outputs.tf +118 -0
  410. package/plugins/specweave-kafka/terraform/azure-event-hubs/variables.tf +148 -0
  411. package/plugins/specweave-kafka/tsconfig.json +21 -0
  412. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +23 -0
  413. package/plugins/specweave-kafka-streams/README.md +310 -0
  414. package/plugins/specweave-kafka-streams/skills/kafka-streams-topology/SKILL.md +539 -0
  415. package/plugins/specweave-n8n/.claude-plugin/plugin.json +22 -0
  416. package/plugins/specweave-n8n/README.md +354 -0
  417. package/plugins/specweave-n8n/skills/n8n-kafka-workflows/SKILL.md +504 -0
  418. package/plugins/specweave-release/commands/specweave-release-platform.md +1 -1
  419. package/plugins/specweave-release/hooks/post-task-completion.sh +2 -2
  420. package/src/templates/AGENTS.md.template +601 -7
  421. package/src/templates/CLAUDE.md.template +188 -88
  422. package/plugins/specweave-ado/commands/specweave-ado-sync-spec.md +0 -255
  423. package/plugins/specweave-github/commands/specweave-github-sync-epic.md +0 -248
  424. package/plugins/specweave-github/commands/specweave-github-sync-from.md +0 -147
  425. package/plugins/specweave-github/commands/specweave-github-sync-spec.md +0 -208
  426. package/plugins/specweave-github/commands/specweave-github-sync-tasks.md +0 -530
  427. package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +0 -267
  428. package/plugins/specweave-jira/commands/specweave-jira-sync-spec.md +0 -240
@@ -14,9 +14,15 @@
14
14
  */
15
15
  /**
16
16
  * Active increment state stored in .specweave/state/active-increment.json
17
+ *
18
+ * **UPGRADED**: Now supports MULTIPLE active increments (up to 2)
19
+ * - One regular feature increment
20
+ * - One hotfix/bug increment (optional)
17
21
  */
18
22
  export interface ActiveIncrementState {
19
- id: string | null;
23
+ ids: string[];
24
+ id?: string | null;
25
+ lastUpdated: string;
20
26
  }
21
27
  /**
22
28
  * Active Increment Manager
@@ -28,22 +34,43 @@ export declare class ActiveIncrementManager {
28
34
  private stateFile;
29
35
  constructor(rootDir?: string);
30
36
  /**
31
- * Get the currently active increment ID
32
- * Returns null if no increment is active
37
+ * Get all currently active increment IDs
38
+ * Returns empty array if no increments are active
39
+ *
40
+ * **NEW**: Returns array of ALL active increments (max 2)
41
+ */
42
+ getActive(): string[];
43
+ /**
44
+ * Get the primary active increment (first in list)
45
+ * Returns null if no increments are active
46
+ *
47
+ * This maintains backwards compatibility with code expecting a single ID
33
48
  */
34
- getActive(): string | null;
49
+ getPrimary(): string | null;
35
50
  /**
36
- * Set the active increment
51
+ * Add an increment to the active list
37
52
  * Validates that the increment exists and is actually active
53
+ *
54
+ * **NEW**: Adds to list instead of replacing (max 2)
55
+ * @param skipValidation - Skip validation (used during lazy initialization to prevent circular dependency)
56
+ */
57
+ addActive(incrementId: string, skipValidation?: boolean): void;
58
+ /**
59
+ * Remove an increment from the active list
60
+ */
61
+ removeActive(incrementId: string): void;
62
+ /**
63
+ * Set the active increment (legacy method for backwards compatibility)
64
+ * Now delegates to addActive()
65
+ * @param skipValidation - Skip validation (used during lazy initialization to prevent circular dependency)
38
66
  */
39
- setActive(incrementId: string): void;
67
+ setActive(incrementId: string, skipValidation?: boolean): void;
40
68
  /**
41
- * Clear the active increment (no increment is active)
69
+ * Clear all active increments
42
70
  */
43
71
  clearActive(): void;
44
72
  /**
45
- * Smart update: Set active increment to next available active increment,
46
- * or clear if none are active.
73
+ * Smart update: Rebuild active list from metadata
47
74
  *
48
75
  * This is called when:
49
76
  * - An increment is completed
@@ -51,16 +78,16 @@ export declare class ActiveIncrementManager {
51
78
  * - An increment is abandoned
52
79
  *
53
80
  * Logic:
54
- * 1. Get all active increments
55
- * 2. If any exist, set the first one as active
56
- * 3. Otherwise, clear active state
81
+ * 1. Scan all increments for status=active
82
+ * 2. Update cache to match reality
83
+ * 3. Max 2 increments (sorted by lastActivity)
57
84
  */
58
85
  smartUpdate(): void;
59
86
  /**
60
- * Validate that the active increment pointer is correct
61
- * Fixes stale pointers automatically
87
+ * Validate that all active increment pointers are correct
88
+ * Does NOT fix stale pointers - caller should call smartUpdate() if needed
62
89
  *
63
- * Returns true if valid/fixed, false if invalid and couldn't fix
90
+ * Returns true if all valid, false if any invalid
64
91
  */
65
92
  validate(): boolean;
66
93
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"active-increment-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/increment/active-increment-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,qBAAa,sBAAsB;IAGrB,OAAO,CAAC,OAAO;IAF3B,OAAO,CAAC,SAAS,CAAS;gBAEN,OAAO,GAAE,MAAsB;IAInD;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAgB1B;;;OAGG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAgBpC;;OAEG;IACH,WAAW,IAAI,IAAI;IAKnB;;;;;;;;;;;;;OAaG;IACH,WAAW,IAAI,IAAI;IAanB;;;;;OAKG;IACH,QAAQ,IAAI,OAAO;IA+BnB;;OAEG;IACH,OAAO,CAAC,UAAU;IAalB;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACH,MAAM,IAAI,OAAO;CAGlB"}
1
+ {"version":3,"file":"active-increment-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/increment/active-increment-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IAEnC,GAAG,EAAE,MAAM,EAAE,CAAC;IAGd,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,sBAAsB;IAGrB,OAAO,CAAC,OAAO;IAF3B,OAAO,CAAC,SAAS,CAAS;gBAEN,OAAO,GAAE,MAAsB;IAInD;;;;;OAKG;IACH,SAAS,IAAI,MAAM,EAAE;IAqBrB;;;;;OAKG;IACH,UAAU,IAAI,MAAM,GAAG,IAAI;IAK3B;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,GAAE,OAAe,GAAG,IAAI;IAgCrE;;OAEG;IACH,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAWvC;;;;OAIG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,GAAE,OAAe,GAAG,IAAI;IAIrE;;OAEG;IACH,WAAW,IAAI,IAAI;IAQnB;;;;;;;;;;;;OAYG;IACH,WAAW,IAAI,IAAI;IAyBnB;;;;;OAKG;IACH,QAAQ,IAAI,OAAO;IAmCnB;;OAEG;IACH,OAAO,CAAC,UAAU;IAalB;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACH,MAAM,IAAI,OAAO;CAGlB"}
@@ -27,48 +27,102 @@ export class ActiveIncrementManager {
27
27
  this.stateFile = path.join(rootDir, '.specweave/state/active-increment.json');
28
28
  }
29
29
  /**
30
- * Get the currently active increment ID
31
- * Returns null if no increment is active
30
+ * Get all currently active increment IDs
31
+ * Returns empty array if no increments are active
32
+ *
33
+ * **NEW**: Returns array of ALL active increments (max 2)
32
34
  */
33
35
  getActive() {
34
36
  try {
35
37
  if (!fs.existsSync(this.stateFile)) {
36
- return null;
38
+ return [];
37
39
  }
38
40
  const content = fs.readFileSync(this.stateFile, 'utf-8');
39
41
  const state = JSON.parse(content);
40
- return state.id || null;
42
+ // Backwards compatibility: Support old format
43
+ if (state.id && !state.ids) {
44
+ return [state.id];
45
+ }
46
+ return state.ids || [];
41
47
  }
42
48
  catch (error) {
43
- // File read/parse error = no active increment
44
- return null;
49
+ // File read/parse error = no active increments
50
+ return [];
45
51
  }
46
52
  }
47
53
  /**
48
- * Set the active increment
54
+ * Get the primary active increment (first in list)
55
+ * Returns null if no increments are active
56
+ *
57
+ * This maintains backwards compatibility with code expecting a single ID
58
+ */
59
+ getPrimary() {
60
+ const active = this.getActive();
61
+ return active.length > 0 ? active[0] : null;
62
+ }
63
+ /**
64
+ * Add an increment to the active list
49
65
  * Validates that the increment exists and is actually active
66
+ *
67
+ * **NEW**: Adds to list instead of replacing (max 2)
68
+ * @param skipValidation - Skip validation (used during lazy initialization to prevent circular dependency)
50
69
  */
51
- setActive(incrementId) {
52
- // Validate increment exists
53
- const metadata = MetadataManager.read(incrementId);
54
- // Validate increment is actually active
55
- if (metadata.status !== IncrementStatus.ACTIVE) {
56
- throw new Error(`Cannot set ${incrementId} as active: status is ${metadata.status}, not active`);
70
+ addActive(incrementId, skipValidation = false) {
71
+ // Validate increment exists and is active (unless skipValidation is true)
72
+ if (!skipValidation) {
73
+ const metadata = MetadataManager.read(incrementId);
74
+ // Validate increment is actually active
75
+ if (metadata.status !== IncrementStatus.ACTIVE) {
76
+ throw new Error(`Cannot add ${incrementId} as active: status is ${metadata.status}, not active`);
77
+ }
78
+ }
79
+ // Get current active list
80
+ const currentActive = this.getActive();
81
+ // Don't add if already in list
82
+ if (currentActive.includes(incrementId)) {
83
+ return;
57
84
  }
58
- // Write state file atomically
59
- const state = { id: incrementId };
85
+ // Add to list (max 2)
86
+ const newActive = [...currentActive, incrementId].slice(0, 2);
87
+ // Write state
88
+ const state = {
89
+ ids: newActive,
90
+ lastUpdated: new Date().toISOString()
91
+ };
60
92
  this.writeState(state);
61
93
  }
62
94
  /**
63
- * Clear the active increment (no increment is active)
95
+ * Remove an increment from the active list
96
+ */
97
+ removeActive(incrementId) {
98
+ const currentActive = this.getActive();
99
+ const newActive = currentActive.filter(id => id !== incrementId);
100
+ const state = {
101
+ ids: newActive,
102
+ lastUpdated: new Date().toISOString()
103
+ };
104
+ this.writeState(state);
105
+ }
106
+ /**
107
+ * Set the active increment (legacy method for backwards compatibility)
108
+ * Now delegates to addActive()
109
+ * @param skipValidation - Skip validation (used during lazy initialization to prevent circular dependency)
110
+ */
111
+ setActive(incrementId, skipValidation = false) {
112
+ this.addActive(incrementId, skipValidation);
113
+ }
114
+ /**
115
+ * Clear all active increments
64
116
  */
65
117
  clearActive() {
66
- const state = { id: null };
118
+ const state = {
119
+ ids: [],
120
+ lastUpdated: new Date().toISOString()
121
+ };
67
122
  this.writeState(state);
68
123
  }
69
124
  /**
70
- * Smart update: Set active increment to next available active increment,
71
- * or clear if none are active.
125
+ * Smart update: Rebuild active list from metadata
72
126
  *
73
127
  * This is called when:
74
128
  * - An increment is completed
@@ -76,16 +130,26 @@ export class ActiveIncrementManager {
76
130
  * - An increment is abandoned
77
131
  *
78
132
  * Logic:
79
- * 1. Get all active increments
80
- * 2. If any exist, set the first one as active
81
- * 3. Otherwise, clear active state
133
+ * 1. Scan all increments for status=active
134
+ * 2. Update cache to match reality
135
+ * 3. Max 2 increments (sorted by lastActivity)
82
136
  */
83
137
  smartUpdate() {
84
138
  const activeIncrements = MetadataManager.getActive();
85
139
  if (activeIncrements.length > 0) {
86
- // Set first active increment as the active one
87
- // (Could be improved with "most recently active" logic)
88
- this.setActive(activeIncrements[0].id);
140
+ // Sort by lastActivity (most recent first)
141
+ const sorted = activeIncrements.sort((a, b) => {
142
+ const aTime = new Date(a.lastActivity).getTime();
143
+ const bTime = new Date(b.lastActivity).getTime();
144
+ return bTime - aTime; // Descending
145
+ });
146
+ // Take max 2
147
+ const activeIds = sorted.slice(0, 2).map(m => m.id);
148
+ const state = {
149
+ ids: activeIds,
150
+ lastUpdated: new Date().toISOString()
151
+ };
152
+ this.writeState(state);
89
153
  }
90
154
  else {
91
155
  // No active increments
@@ -93,35 +157,38 @@ export class ActiveIncrementManager {
93
157
  }
94
158
  }
95
159
  /**
96
- * Validate that the active increment pointer is correct
97
- * Fixes stale pointers automatically
160
+ * Validate that all active increment pointers are correct
161
+ * Does NOT fix stale pointers - caller should call smartUpdate() if needed
98
162
  *
99
- * Returns true if valid/fixed, false if invalid and couldn't fix
163
+ * Returns true if all valid, false if any invalid
100
164
  */
101
165
  validate() {
102
166
  const currentActive = this.getActive();
103
- // No active increment = valid (nothing to validate)
104
- if (currentActive === null) {
167
+ // No active increments = valid (nothing to validate)
168
+ if (currentActive.length === 0) {
105
169
  return true;
106
170
  }
107
- try {
108
- // Check if increment still exists
109
- const metadata = MetadataManager.read(currentActive);
110
- // Check if increment is actually active
111
- if (metadata.status !== IncrementStatus.ACTIVE) {
112
- // Stale pointer! Fix it automatically
113
- console.warn(`⚠️ Active increment pointer is stale: ${currentActive} is ${metadata.status}`);
114
- this.smartUpdate();
115
- return false;
171
+ let hasStale = false;
172
+ for (const incrementId of currentActive) {
173
+ try {
174
+ // Check if increment still exists
175
+ const metadata = MetadataManager.read(incrementId);
176
+ // Check if increment is actually active
177
+ if (metadata.status !== IncrementStatus.ACTIVE) {
178
+ // Stale pointer! Mark for fix
179
+ console.warn(`⚠️ Active increment pointer is stale: ${incrementId} is ${metadata.status}`);
180
+ hasStale = true;
181
+ }
182
+ }
183
+ catch (error) {
184
+ // Increment doesn't exist = stale pointer
185
+ console.warn(`⚠️ Active increment pointer is invalid: ${incrementId} not found`);
186
+ hasStale = true;
116
187
  }
117
- return true;
118
- }
119
- catch (error) {
120
- // Increment doesn't exist = stale pointer
121
- console.warn(`⚠️ Active increment pointer is invalid: ${currentActive} not found`);
122
- this.smartUpdate();
123
- return false;
124
188
  }
189
+ // Return false if stale found, but DON'T auto-fix (prevents circular dependency)
190
+ // Caller should call smartUpdate() if needed
191
+ return !hasStale;
125
192
  }
126
193
  /**
127
194
  * Write state file atomically (temp file → rename)
@@ -1 +1 @@
1
- {"version":3,"file":"active-increment-manager.js","sourceRoot":"","sources":["../../../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YAC1C,OAAO,CAAC,IAAI,CAAC,4CAA4C,aAAa,YAAY,CAAC,CAAC;YACpF,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;OAEG;IACK,UAAU,CAAC,KAA2B;QAC5C,gCAAgC;QAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7B,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;QAED,mCAAmC;QACnC,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,SAAS,MAAM,CAAC;QACzC,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACpE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;CACF"}
1
+ {"version":3,"file":"active-increment-manager.js","sourceRoot":"","sources":["../../../../src/core/increment/active-increment-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAoBxD;;;;GAIG;AACH,MAAM,OA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IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;CACF"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Conflict Resolver - Merge content and resolve duplicate conflicts
3
+ *
4
+ * Provides utilities to merge valuable content from losing versions to winning version,
5
+ * and delete losing versions with user confirmation.
6
+ *
7
+ * Part of increment 0033: Duplicate Increment Prevention System
8
+ */
9
+ import type { Duplicate, IncrementLocation } from './duplicate-detector.js';
10
+ /**
11
+ * Options for conflict resolution
12
+ */
13
+ export interface ResolveOptions {
14
+ dryRun?: boolean;
15
+ force?: boolean;
16
+ merge?: boolean;
17
+ }
18
+ /**
19
+ * Result of conflict resolution
20
+ */
21
+ export interface ResolutionResult {
22
+ winner: string;
23
+ merged: string[];
24
+ deleted: string[];
25
+ reportPath: string;
26
+ dryRun: boolean;
27
+ }
28
+ /**
29
+ * Resolve conflict by merging winner + losers
30
+ */
31
+ export declare function resolveConflict(duplicate: Duplicate, options?: ResolveOptions): Promise<ResolutionResult>;
32
+ /**
33
+ * Merge content from losing versions into winner
34
+ */
35
+ export declare function mergeContent(winner: IncrementLocation, losers: IncrementLocation[], options?: ResolveOptions): Promise<string[]>;
36
+ /**
37
+ * Resolve multiple duplicates in batch
38
+ */
39
+ export declare function resolveAllDuplicates(duplicates: Duplicate[], options?: ResolveOptions): Promise<ResolutionResult[]>;
40
+ //# sourceMappingURL=conflict-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflict-resolver.d.ts","sourceRoot":"","sources":["../../../../src/core/increment/conflict-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,SAAS,EACpB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAmC3B;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,iBAAiB,EAAE,EAC3B,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAiEnB;AAgHD;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,SAAS,EAAE,EACvB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAa7B"}
@@ -0,0 +1,219 @@
1
+ /**
2
+ * Conflict Resolver - Merge content and resolve duplicate conflicts
3
+ *
4
+ * Provides utilities to merge valuable content from losing versions to winning version,
5
+ * and delete losing versions with user confirmation.
6
+ *
7
+ * Part of increment 0033: Duplicate Increment Prevention System
8
+ */
9
+ import fs from 'fs-extra';
10
+ import * as path from 'path';
11
+ /**
12
+ * Resolve conflict by merging winner + losers
13
+ */
14
+ export async function resolveConflict(duplicate, options = {}) {
15
+ const winner = duplicate.recommendedWinner;
16
+ const losers = duplicate.losingVersions;
17
+ // Step 1: Merge valuable content from losers → winner (if merge enabled)
18
+ const mergedFiles = [];
19
+ if (options.merge) {
20
+ const merged = await mergeContent(winner, losers, options);
21
+ mergedFiles.push(...merged);
22
+ }
23
+ // Step 2: Create resolution report
24
+ const reportPath = await createResolutionReport(duplicate, mergedFiles, options);
25
+ // Step 3: Delete losing versions (if not dry-run)
26
+ const deletedPaths = [];
27
+ if (!options.dryRun) {
28
+ for (const loser of losers) {
29
+ if (options.force || await confirmDeletion(loser)) {
30
+ await fs.remove(loser.path);
31
+ deletedPaths.push(loser.path);
32
+ }
33
+ }
34
+ }
35
+ else {
36
+ // Dry-run: just record what would be deleted
37
+ deletedPaths.push(...losers.map(l => l.path));
38
+ }
39
+ return {
40
+ winner: winner.path,
41
+ merged: mergedFiles,
42
+ deleted: deletedPaths,
43
+ reportPath,
44
+ dryRun: options.dryRun || false
45
+ };
46
+ }
47
+ /**
48
+ * Merge content from losing versions into winner
49
+ */
50
+ export async function mergeContent(winner, losers, options = {}) {
51
+ const mergedFiles = [];
52
+ for (const loser of losers) {
53
+ // Merge reports/ folder (preserve all reports)
54
+ const loserReportsDir = path.join(loser.path, 'reports');
55
+ if (await fs.pathExists(loserReportsDir)) {
56
+ const winnerReportsDir = path.join(winner.path, 'reports');
57
+ await fs.ensureDir(winnerReportsDir);
58
+ const reportFiles = await fs.readdir(loserReportsDir);
59
+ for (const file of reportFiles) {
60
+ const sourcePath = path.join(loserReportsDir, file);
61
+ const targetPath = path.join(winnerReportsDir, file);
62
+ // Skip if not a file
63
+ const stats = await fs.stat(sourcePath);
64
+ if (!stats.isFile())
65
+ continue;
66
+ // Rename if file exists (add timestamp)
67
+ let finalPath = targetPath;
68
+ if (await fs.pathExists(targetPath)) {
69
+ const ext = path.extname(file);
70
+ const base = path.basename(file, ext);
71
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-').split('T')[0];
72
+ finalPath = path.join(winnerReportsDir, `${base}-MERGED-${timestamp}${ext}`);
73
+ }
74
+ if (!options.dryRun) {
75
+ await fs.copy(sourcePath, finalPath);
76
+ }
77
+ mergedFiles.push(finalPath);
78
+ }
79
+ }
80
+ // Merge metadata (union of GitHub/JIRA/ADO links)
81
+ const loserMetadataPath = path.join(loser.path, 'metadata.json');
82
+ if (await fs.pathExists(loserMetadataPath)) {
83
+ const winnerMetadataPath = path.join(winner.path, 'metadata.json');
84
+ if (await fs.pathExists(winnerMetadataPath)) {
85
+ try {
86
+ const loserMetadata = await fs.readJson(loserMetadataPath);
87
+ const winnerMetadata = await fs.readJson(winnerMetadataPath);
88
+ // Merge external links (take non-null values)
89
+ const merged = {
90
+ ...winnerMetadata,
91
+ github: winnerMetadata.github || loserMetadata.github,
92
+ jira: winnerMetadata.jira || loserMetadata.jira,
93
+ ado: winnerMetadata.ado || loserMetadata.ado
94
+ };
95
+ if (!options.dryRun) {
96
+ await fs.writeJson(winnerMetadataPath, merged, { spaces: 2 });
97
+ }
98
+ mergedFiles.push(winnerMetadataPath);
99
+ }
100
+ catch (error) {
101
+ // Skip corrupted metadata
102
+ }
103
+ }
104
+ }
105
+ }
106
+ return mergedFiles;
107
+ }
108
+ /**
109
+ * Create resolution report in winner's reports/ folder
110
+ */
111
+ async function createResolutionReport(duplicate, mergedFiles, options) {
112
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
113
+ const reportName = `DUPLICATE-RESOLUTION-${timestamp}.md`;
114
+ const reportPath = path.join(duplicate.recommendedWinner.path, 'reports', reportName);
115
+ const content = generateReportContent(duplicate, mergedFiles, options);
116
+ if (!options.dryRun) {
117
+ await fs.ensureDir(path.dirname(reportPath));
118
+ await fs.writeFile(reportPath, content, 'utf-8');
119
+ }
120
+ return reportPath;
121
+ }
122
+ /**
123
+ * Generate resolution report content
124
+ */
125
+ function generateReportContent(duplicate, mergedFiles, options) {
126
+ const winner = duplicate.recommendedWinner;
127
+ const losers = duplicate.losingVersions;
128
+ const timestamp = new Date().toISOString();
129
+ return `# Duplicate Resolution Report
130
+
131
+ **Generated**: ${timestamp}
132
+ **Increment Number**: ${duplicate.incrementNumber}
133
+ **Resolution Strategy**: ${options.merge ? 'Merge + Delete' : 'Delete Only'}
134
+
135
+ ## Conflict Summary
136
+
137
+ **Total Locations Found**: ${duplicate.locations.length}
138
+
139
+ ### Winner: ${winner.name}
140
+ - **Path**: \`${winner.path}\`
141
+ - **Status**: ${winner.status}
142
+ - **Last Activity**: ${winner.lastActivity}
143
+ - **File Count**: ${winner.fileCount}
144
+ - **Has Reports**: ${winner.hasReports ? 'Yes' : 'No'}
145
+ - **Has GitHub Link**: ${winner.hasGitHubLink ? 'Yes' : 'No'}
146
+
147
+ **Reason Selected**: ${duplicate.resolutionReason}
148
+
149
+ ## Losing Versions
150
+
151
+ ${losers.map((loser, idx) => `
152
+ ### ${idx + 1}. ${loser.name}
153
+ - **Path**: \`${loser.path}\`
154
+ - **Status**: ${loser.status}
155
+ - **Last Activity**: ${loser.lastActivity}
156
+ - **File Count**: ${loser.fileCount}
157
+ - **Action**: ${options.dryRun ? 'Would be deleted' : 'Deleted'}
158
+ `).join('\n')}
159
+
160
+ ## Merged Content
161
+
162
+ ${options.merge ? `
163
+ **Total Files Merged**: ${mergedFiles.length}
164
+
165
+ ${mergedFiles.length > 0 ? mergedFiles.map(f => `- \`${path.basename(f)}\``).join('\n') : 'No files merged'}
166
+ ` : 'Content merge was not enabled (--merge flag not used)'}
167
+
168
+ ## Command Used
169
+
170
+ \`\`\`bash
171
+ /specweave:fix-duplicates ${options.merge ? '--merge ' : ''}${options.force ? '--force ' : ''}${options.dryRun ? '--dry-run' : ''}
172
+ \`\`\`
173
+
174
+ ## Next Steps
175
+
176
+ ${options.dryRun ? `
177
+ This was a dry-run. To apply these changes:
178
+ 1. Review this report
179
+ 2. Run: \`/specweave:fix-duplicates --merge\` (without --dry-run)
180
+ ` : `
181
+ ✅ Duplicate resolved successfully!
182
+
183
+ - Winner preserved at: \`${winner.path}\`
184
+ - ${losers.length} losing version(s) deleted
185
+ - ${mergedFiles.length} file(s) merged
186
+ `}
187
+
188
+ ---
189
+
190
+ 🤖 Generated by SpecWeave Duplicate Prevention System
191
+ `;
192
+ }
193
+ /**
194
+ * Confirm deletion with user (interactive)
195
+ */
196
+ async function confirmDeletion(loser) {
197
+ // In a real CLI, this would prompt the user
198
+ // For now, we'll just return true (force mode)
199
+ // This will be implemented properly in the CLI command
200
+ console.log(`⚠️ Delete ${loser.path}? (Use --force to skip this prompt)`);
201
+ return true;
202
+ }
203
+ /**
204
+ * Resolve multiple duplicates in batch
205
+ */
206
+ export async function resolveAllDuplicates(duplicates, options = {}) {
207
+ const results = [];
208
+ for (const duplicate of duplicates) {
209
+ try {
210
+ const result = await resolveConflict(duplicate, options);
211
+ results.push(result);
212
+ }
213
+ catch (error) {
214
+ console.error(`Failed to resolve duplicate ${duplicate.incrementNumber}:`, error);
215
+ }
216
+ }
217
+ return results;
218
+ }
219
+ //# sourceMappingURL=conflict-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conflict-resolver.js","sourceRoot":"","sources":["../../../../src/core/increment/conflict-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAuB7B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,SAAoB,EACpB,UAA0B,EAAE;IAE5B,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;IAC3C,MAAM,MAAM,GAAG,SAAS,CAAC,cAAc,CAAC;IAExC,yEAAyE;IACzE,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3D,WAAW,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,mCAAmC;IACnC,MAAM,UAAU,GAAG,MAAM,sBAAsB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAEjF,kDAAkD;IAClD,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,IAAI,CAAC,OA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AC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,UAAuB,EACvB,UAA0B,EAAE;IAE5B,MAAM,OAAO,GAAuB,EAAE,CAAC;IAEvC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACzD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,+BAA+B,SAAS,CAAC,eAAe,GAAG,EAAE,KAAK,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"discipline-checker.d.ts","sourceRoot":"","sources":["../../../../src/core/increment/discipline-checker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,gBAAgB,EAEhB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAIpB;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,QAAQ,CAA0B;IAE1C;;;;;OAKG;gBACS,WAAW,GAAE,MAAsB,EAAE,YAAY,CAAC,EAAE,gBAAgB;IAchF;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAcxB;;;;;OAKG;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAuE3E;;OAEG;YACW,gBAAgB;IAgC9B;;OAEG;IACH,OAAO,CAAC,aAAa;IA0ErB;;OAEG;IACH,OAAO,CAAC,eAAe;IAmBvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAkBxB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsB9B;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAW/B"}
1
+ {"version":3,"file":"discipline-checker.d.ts","sourceRoot":"","sources":["../../../../src/core/increment/discipline-checker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,gBAAgB,EAEhB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAIpB;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,QAAQ,CAA0B;IAE1C;;;;;OAKG;gBACS,WAAW,GAAE,MAAsB,EAAE,YAAY,CAAC,EAAE,gBAAgB;IAchF;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAcxB;;;;;OAKG;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwE3E;;OAEG;YACW,gBAAgB;IAgC9B;;OAEG;IACH,OAAO,CAAC,aAAa;IAgFrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAmBvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAkBxB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsB9B;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;CAW/B"}