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
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: specweave-restore-feature
3
+ description: Restore a feature or epic from archive back to active status
4
+ ---
5
+
6
+ # Restore Feature or Epic from Archive
7
+
8
+ Restore an archived feature or epic back to its active location. This also restores all project-specific folders and updates links throughout the codebase.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ /specweave:restore-feature <feature-or-epic-id>
14
+ ```
15
+
16
+ ## Examples
17
+
18
+ ```bash
19
+ # Restore a feature
20
+ /specweave:restore-feature FS-001
21
+
22
+ # Restore an epic
23
+ /specweave:restore-feature EPIC-2024-Q4
24
+ ```
25
+
26
+ ## What Gets Restored
27
+
28
+ ### For Features:
29
+ 1. `_features/_archive/FS-XXX/` → `_features/FS-XXX/`
30
+ 2. `{project}/_archive/FS-XXX/` → `{project}/FS-XXX/` (all projects)
31
+ 3. All links updated from archive paths back to active paths
32
+
33
+ ### For Epics:
34
+ 1. `_epics/_archive/EPIC-XXX/` → `_epics/EPIC-XXX/`
35
+ 2. All links updated from archive paths back to active paths
36
+
37
+ ## Important Notes
38
+
39
+ - Cannot restore if the item already exists in active location
40
+ - Links are automatically updated throughout the codebase
41
+ - Consider restoring related increments if needed
42
+
43
+ ## Implementation
44
+
45
+ ```typescript
46
+ import { Task } from '@claude/types';
47
+
48
+ const task = new Task('restore-feature', 'Restore feature or epic from archive');
49
+
50
+ task.run(async () => {
51
+ const itemId = process.argv[3]; // Get the feature/epic ID
52
+
53
+ if (!itemId) {
54
+ console.error('❌ Please provide a feature or epic ID to restore');
55
+ console.log('Usage: /specweave:restore-feature <feature-or-epic-id>');
56
+ console.log('Example: /specweave:restore-feature FS-001');
57
+ process.exit(1);
58
+ }
59
+
60
+ const { FeatureArchiver } = await import('../../../dist/src/core/living-docs/feature-archiver.js');
61
+ const archiver = new FeatureArchiver(process.cwd());
62
+
63
+ try {
64
+ // Determine if it's a feature or epic
65
+ const isEpic = itemId.startsWith('EPIC-');
66
+
67
+ if (isEpic) {
68
+ // Restore epic (to be implemented)
69
+ await archiver.restoreEpic(itemId);
70
+ console.log(`✅ Restored epic ${itemId} from archive`);
71
+ } else {
72
+ // Restore feature
73
+ await archiver.restoreFeature(itemId);
74
+ console.log(`✅ Restored feature ${itemId} from archive`);
75
+ }
76
+
77
+ // Show current stats
78
+ const stats = await archiver.getArchiveStats();
79
+ console.log('\n📊 Current Archive Statistics:');
80
+ console.log(` Features: ${stats.features.active} active, ${stats.features.archived} archived`);
81
+ console.log(` Epics: ${stats.epics.active} active, ${stats.epics.archived} archived`);
82
+
83
+ } catch (error) {
84
+ console.error(`❌ Failed to restore ${itemId}: ${error.message}`);
85
+ process.exit(1);
86
+ }
87
+ });
88
+
89
+ export default task;
90
+ ```
@@ -0,0 +1,309 @@
1
+ ---
2
+ name: specweave:restore
3
+ description: Restore archived increments back to active folder
4
+ ---
5
+
6
+ # Restore Increment from Archive
7
+
8
+ Restore an archived increment back to the main increments folder. Useful when you need to reference, update, or continue work on an old increment.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ # Restore specific increment
14
+ /specweave:restore 0031
15
+
16
+ # Restore multiple increments
17
+ /specweave:restore 0001 0002 0003
18
+
19
+ # List archived increments
20
+ /specweave:restore --list
21
+ ```
22
+
23
+ ## Arguments
24
+
25
+ - `<increment-ids>`: Increment IDs to restore (e.g., "1", "0001", "0031")
26
+ - `--list`: List all archived increments without restoring
27
+
28
+ ## Examples
29
+
30
+ ### Example 1: Restore Specific Increment
31
+
32
+ ```bash
33
+ /specweave:restore 0031
34
+ ```
35
+
36
+ **Output**:
37
+ ```
38
+ 📦 Restoring increment from archive...
39
+
40
+ Increment: 0031-external-tool-status-sync
41
+ Source: .specweave/increments/_archive/0031-external-tool-status-sync/
42
+ Target: .specweave/increments/0031-external-tool-status-sync/
43
+
44
+ Checking target location...
45
+ ✓ Target location is empty
46
+
47
+ ✅ Restored: 0031-external-tool-status-sync
48
+ Location: .specweave/increments/0031-external-tool-status-sync/
49
+
50
+ 📊 Archive Statistics:
51
+ Active: 33 increments (+ 1 restored)
52
+ Archived: 30 increments (- 1)
53
+
54
+ Next: /specweave:do 0031 (to continue work)
55
+ ```
56
+
57
+ ### Example 2: List Archived Increments
58
+
59
+ ```bash
60
+ /specweave:restore --list
61
+ ```
62
+
63
+ **Output**:
64
+ ```
65
+ 📦 Archived Increments:
66
+
67
+ .specweave/increments/_archive/
68
+ ├── 0001-core-framework (152 days old)
69
+ ├── 0002-plugin-system (148 days old)
70
+ ├── 0003-auth-service (145 days old)
71
+ ├── 0004-payment-integration (142 days old)
72
+ ├── 0005-api-gateway (140 days old)
73
+ ...
74
+ ├── 0030-jira-integration (35 days old)
75
+ └── 0031-external-tool-status-sync (12 days old)
76
+
77
+ Total: 31 archived increments
78
+
79
+ To restore: /specweave:restore <increment-id>
80
+ ```
81
+
82
+ ### Example 3: Restore Multiple Increments
83
+
84
+ ```bash
85
+ /specweave:restore 0030 0031
86
+ ```
87
+
88
+ **Output**:
89
+ ```
90
+ 📦 Restoring increments from archive...
91
+
92
+ Restoring 0030-jira-integration...
93
+ ✅ Restored
94
+
95
+ Restoring 0031-external-tool-status-sync...
96
+ ✅ Restored
97
+
98
+ ✅ Restored: 2 increments
99
+
100
+ 📊 Archive Statistics:
101
+ Active: 34 increments (+ 2 restored)
102
+ Archived: 29 increments (- 2)
103
+ ```
104
+
105
+ ## Error Handling
106
+
107
+ ### Increment Not Found in Archive
108
+
109
+ ```
110
+ ❌ Error: Increment 0031 not found in archive
111
+
112
+ Archive location: .specweave/increments/_archive/
113
+
114
+ Available archived increments:
115
+ • 0001-core-framework
116
+ • 0002-plugin-system
117
+ • 0003-auth-service
118
+ ...
119
+
120
+ Use: /specweave:restore --list to see all
121
+ ```
122
+
123
+ ### Target Location Already Exists
124
+
125
+ ```
126
+ ❌ Error: Cannot restore 0031 - already exists in active folder
127
+
128
+ Conflict:
129
+ Archive: .specweave/increments/_archive/0031-external-tool-status-sync/
130
+ Active: .specweave/increments/0031-external-tool-status-sync/
131
+
132
+ Options:
133
+ 1. Delete active version first (if it's a duplicate)
134
+ 2. Resolve duplicates: /specweave:fix-duplicates
135
+ 3. Archive active version: /specweave:archive 0031
136
+ 4. Rename one version manually
137
+
138
+ Recommended: /specweave:fix-duplicates (auto-resolves conflicts)
139
+ ```
140
+
141
+ ### Permission Errors
142
+
143
+ ```
144
+ ❌ Error: Permission denied
145
+
146
+ Could not move:
147
+ From: .specweave/increments/_archive/0031-external-tool-status-sync/
148
+ To: .specweave/increments/0031-external-tool-status-sync/
149
+
150
+ Check:
151
+ • File permissions
152
+ • Disk space
153
+ • Files not open in another program
154
+ ```
155
+
156
+ ## Safety Checks
157
+
158
+ Before restoring, the system checks:
159
+ - ✅ **Increment exists in archive**: Source folder exists
160
+ - ✅ **Target location empty**: No conflict in main folder
161
+ - ✅ **Valid increment structure**: Has required files (metadata.json)
162
+ - ✅ **Disk space available**: Enough space for restored files
163
+
164
+ ## Related Commands
165
+
166
+ - `/specweave:archive <increment-id>` - Archive completed increments
167
+ - `/specweave:status` - View archive statistics
168
+ - `/specweave:fix-duplicates` - Auto-resolve duplicate increments
169
+ - `/specweave:do <increment-id>` - Resume work on restored increment
170
+
171
+ ## Implementation
172
+
173
+ ```typescript
174
+ import { Task } from '@claude/types';
175
+
176
+ const task = new Task('restore-increment', 'Restore increment from archive');
177
+
178
+ task.run(async () => {
179
+ const { IncrementArchiver } = await import('../../../dist/src/core/increment/increment-archiver.js');
180
+ const archiver = new IncrementArchiver(process.cwd());
181
+
182
+ // Parse arguments
183
+ const args = process.argv.slice(2);
184
+
185
+ // List mode
186
+ if (args.includes('--list')) {
187
+ const archived = await archiver.listArchived();
188
+ console.log('\n📦 Archived Increments:\n');
189
+
190
+ if (archived.length === 0) {
191
+ console.log('No archived increments found.');
192
+ return;
193
+ }
194
+
195
+ console.log('.specweave/increments/_archive/');
196
+ archived.forEach(inc => {
197
+ console.log(`├── ${inc}`);
198
+ });
199
+ console.log(`\nTotal: ${archived.length} archived increments`);
200
+ console.log('\nTo restore: /specweave:restore <increment-id>');
201
+ return;
202
+ }
203
+
204
+ // Restore mode
205
+ const incrementIds = args.filter(arg => !arg.startsWith('--'));
206
+
207
+ if (incrementIds.length === 0) {
208
+ console.error('❌ Error: No increment IDs provided');
209
+ console.log('\nUsage:');
210
+ console.log(' /specweave:restore <increment-id>');
211
+ console.log(' /specweave:restore --list');
212
+ return;
213
+ }
214
+
215
+ // Restore each increment
216
+ let restored = 0;
217
+ let errors = 0;
218
+
219
+ for (const id of incrementIds) {
220
+ try {
221
+ // Normalize ID to 4-digit format
222
+ const normalizedId = id.padStart(4, '0');
223
+
224
+ // Find archived increment
225
+ const archived = await archiver.listArchived();
226
+ const match = archived.find(inc => inc.startsWith(normalizedId));
227
+
228
+ if (!match) {
229
+ console.error(`❌ Increment ${normalizedId} not found in archive`);
230
+ errors++;
231
+ continue;
232
+ }
233
+
234
+ // Restore increment
235
+ await archiver.restore(match);
236
+ console.log(`✅ Restored: ${match}`);
237
+ restored++;
238
+ } catch (error) {
239
+ console.error(`❌ Failed to restore ${id}: ${error.message}`);
240
+ errors++;
241
+ }
242
+ }
243
+
244
+ // Show statistics
245
+ if (restored > 0 || errors > 0) {
246
+ console.log('\n📊 Restore Summary:');
247
+ if (restored > 0) {
248
+ console.log(` ✅ Restored: ${restored} increment${restored > 1 ? 's' : ''}`);
249
+ }
250
+ if (errors > 0) {
251
+ console.log(` ❌ Errors: ${errors} increment${errors > 1 ? 's' : ''}`);
252
+ }
253
+
254
+ // Show updated stats
255
+ const stats = await archiver.getStats();
256
+ console.log('\n📊 Archive Statistics:');
257
+ console.log(` Active: ${stats.active} increments`);
258
+ console.log(` Archived: ${stats.archived} increments`);
259
+ }
260
+ });
261
+
262
+ export default task;
263
+ ```
264
+
265
+ ## Important Notes
266
+
267
+ ### Archive is Not Deletion
268
+
269
+ **Archives are preserved history**, not deleted work. You can restore anytime:
270
+ - ✅ Full increment structure preserved
271
+ - ✅ All files, reports, and metadata intact
272
+ - ✅ Git history preserved (if committed)
273
+ - ✅ External tool links preserved in metadata
274
+
275
+ ### When to Restore
276
+
277
+ Common scenarios for restoring from archive:
278
+ - 🔍 **Reference old implementation** - Check how something was done
279
+ - 🔄 **Resume abandoned work** - Pick up where you left off
280
+ - 🐛 **Bug investigation** - Review completed increment for context
281
+ - 📝 **Documentation** - Update reports or completion summaries
282
+ - 🔗 **External sync recovery** - Re-sync to GitHub/JIRA if needed
283
+
284
+ ### After Restoring
285
+
286
+ Once restored, the increment is back in the active folder:
287
+ - ✅ Shows up in `/specweave:status`
288
+ - ✅ Can be resumed with `/specweave:do`
289
+ - ✅ Can be re-archived with `/specweave:archive`
290
+ - ✅ Included in increment counts and WIP limits
291
+
292
+ ---
293
+
294
+ **Best Practice**: Keep archives clean by only restoring when needed, then re-archiving when done.
295
+
296
+ **Recommended Workflow**:
297
+ ```bash
298
+ # 1. List archived increments
299
+ /specweave:restore --list
300
+
301
+ # 2. Restore specific increment
302
+ /specweave:restore 0031
303
+
304
+ # 3. Review or update the increment
305
+ cat .specweave/increments/0031-external-tool-status-sync/spec.md
306
+
307
+ # 4. Re-archive when done
308
+ /specweave:archive 0031
309
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: specweave:resume
3
- description: Resume a paused increment
3
+ description: Resume a paused or backlog increment
4
4
  usage: /specweave:resume <increment-id>
5
5
  ---
6
6
 
@@ -12,29 +12,41 @@ usage: /specweave:resume <increment-id>
12
12
 
13
13
  ## Purpose
14
14
 
15
- Resume a paused increment when:
16
- - **Blocker resolved** (API keys arrived, approval granted)
17
- - **Ready to continue** after deprioritization
18
- - **Prerequisite completed** (can now proceed)
15
+ Resume a paused or backlog increment when:
16
+ - **From Backlog**: Ready to start planned work
17
+ - **From Paused**: Blocker resolved (API keys arrived, approval granted)
18
+ - **From Paused**: Ready to continue after deprioritization
19
+ - **From Paused**: Prerequisite completed (can now proceed)
19
20
 
20
21
  ---
21
22
 
22
23
  ## Behavior
23
24
 
24
- 1. **Validates** increment exists and is "paused"
25
- 2. **Calculates** pause duration (days, hours)
25
+ 1. **Validates** increment exists and is "paused" or "backlog"
26
+ 2. **Calculates** pause/backlog duration (days, hours)
26
27
  3. **Updates** metadata.json:
27
- - `status`: "paused" → "active"
28
- - Clears `pausedReason` and `pausedAt`
28
+ - `status`: "paused" or "backlog" → "active"
29
+ - Clears `pausedReason` and `pausedAt` (if paused)
30
+ - Clears `backlogReason` and `backlogAt` (if backlog)
29
31
  - Updates `lastActivity` timestamp
30
- 4. **Displays** context (pause duration, last activity)
31
- 5. **Suggests** next actions (`/specweave:do` to continue work)
32
+ 4. **Displays** context (duration, last activity)
33
+ 5. **Suggests** next actions (`/specweave:do` to continue/start work)
32
34
 
33
35
  ---
34
36
 
35
37
  ## Examples
36
38
 
37
- ### Resume after a few days
39
+ ### Resume from backlog
40
+ ```bash
41
+ /specweave:resume 0032
42
+
43
+ ✅ Increment 0032 activated from backlog
44
+ 📦 Was in backlog for: 5 days
45
+ 💡 Reason: Low priority, focus on 0031 first
46
+ 📋 Start work with: /specweave:do
47
+ ```
48
+
49
+ ### Resume paused work after a few days
38
50
  ```bash
39
51
  /specweave:resume 0006
40
52
 
@@ -44,7 +56,7 @@ Resume a paused increment when:
44
56
  📋 Continue with: /specweave:do
45
57
  ```
46
58
 
47
- ### Resume after a few hours
59
+ ### Resume paused work after a few hours
48
60
  ```bash
49
61
  /specweave:resume 0007
50
62
 
@@ -114,14 +126,20 @@ if (metadata.status === IncrementStatus.COMPLETED) {
114
126
  throw new Error('Cannot resume completed increment');
115
127
  }
116
128
 
117
- // Calculate pause duration
118
- const pauseDuration = calculateDuration(metadata.pausedAt, new Date());
129
+ // Calculate duration based on status
130
+ let duration;
131
+ if (metadata.status === IncrementStatus.PAUSED && metadata.pausedAt) {
132
+ duration = calculateDuration(metadata.pausedAt, new Date());
133
+ console.log(`Was paused for: ${duration}`);
134
+ } else if (metadata.status === IncrementStatus.BACKLOG && metadata.backlogAt) {
135
+ duration = calculateDuration(metadata.backlogAt, new Date());
136
+ console.log(`Was in backlog for: ${duration}`);
137
+ }
119
138
 
120
- // Update status
139
+ // Update status to active
121
140
  MetadataManager.updateStatus(incrementId, IncrementStatus.ACTIVE);
122
141
 
123
142
  // Display context
124
- console.log(`Was paused for: ${pauseDuration}`);
125
143
  console.log(`Last activity: ${getLastActivity(incrementId)}`);
126
144
  ```
127
145
 
@@ -130,7 +148,9 @@ console.log(`Last activity: ${getLastActivity(incrementId)}`);
130
148
  ## Status Flow
131
149
 
132
150
  ```
133
- paused ──resume──> active
151
+ backlog ──resume──> active (start work)
152
+
153
+ paused ──resume──> active (continue work)
134
154
 
135
155
  abandoned ──resume──> active (with confirmation)
136
156
  ```
@@ -139,10 +159,12 @@ abandoned ──resume──> active (with confirmation)
139
159
 
140
160
  ## Related Commands
141
161
 
142
- - `/pause <id>` - Pause active increment
143
- - `/status` - Show all increment statuses
144
- - `/status --paused` - Show only paused increments
145
- - `/do` - Continue work after resuming
162
+ - `/specweave:pause <id>` - Pause active increment
163
+ - `/specweave:backlog <id>` - Move increment to backlog
164
+ - `/specweave:status` - Show all increment statuses
165
+ - `/specweave:status --paused` - Show only paused increments
166
+ - `/specweave:status --backlog` - Show only backlog increments
167
+ - `/specweave:do` - Continue/start work after resuming
146
168
 
147
169
  ---
148
170
 
@@ -164,11 +186,17 @@ abandoned ──resume──> active (with confirmation)
164
186
 
165
187
  ## Automatic Suggestions
166
188
 
167
- When you run `/specweave:status`, stale paused increments trigger suggestions:
189
+ When you run `/specweave:status`, stale paused/backlog increments trigger suggestions:
168
190
 
169
191
  ```bash
170
192
  /specweave:status
171
193
 
194
+ 🗂️ Backlog (2):
195
+ 📦 0032-feature-a [feature]
196
+ In backlog: 5 days
197
+ Reason: Low priority
198
+ 💡 Ready to start? → /specweave:resume 0032
199
+
172
200
  ⏸️ Paused (2):
173
201
  🔄 0006-stripe [feature]
174
202
  Paused: 3 days ago
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: specweave:status
3
- description: Show increment status overview with rich details (active, paused, completed, abandoned)
4
- usage: /specweave:status [--active|--paused|--completed|--abandoned|--stale]
3
+ description: Show increment status overview with rich details (active, backlog, paused, completed, abandoned)
4
+ usage: /specweave:status [--active|--backlog|--paused|--completed|--abandoned|--stale]
5
5
  ---
6
6
 
7
7
  # Increment Status Command
@@ -14,6 +14,7 @@ usage: /specweave:status [--active|--paused|--completed|--abandoned|--stale]
14
14
 
15
15
  Display comprehensive increment status overview:
16
16
  - **Active** increments (currently working)
17
+ - **Backlog** increments (planned but not started)
17
18
  - **Paused** increments (blocked/deprioritized)
18
19
  - **Completed** increments (done)
19
20
  - **Abandoned** increments (obsolete)
@@ -42,6 +43,15 @@ Display comprehensive increment status overview:
42
43
  Age: 2 days
43
44
  Last: Created translation pipeline
44
45
 
46
+ 🗂️ Backlog (2):
47
+ 📦 0032-feature-a [feature]
48
+ In backlog: 5 days
49
+ Reason: Low priority
50
+
51
+ 📦 0033-feature-b [feature]
52
+ In backlog: 3 days
53
+ Reason: Waiting for decisions
54
+
45
55
  ⏸️ Paused (1):
46
56
  🔄 0007-stripe-integration [feature]
47
57
  Progress: 30% (6/20 tasks)
@@ -57,6 +67,7 @@ Display comprehensive increment status overview:
57
67
 
58
68
  📊 Summary:
59
69
  - Active: 2 increments (1 hotfix, 1 feature)
70
+ - Backlog: 2 increments (planned for future)
60
71
  - Paused: 1 increment
61
72
  - Completed: 4 increments
62
73
  - Context switching: 20-40% cost (2 active)
@@ -122,6 +133,7 @@ const allIncrements = MetadataManager.getAll();
122
133
 
123
134
  // Group by status
124
135
  const active = allIncrements.filter(m => m.status === IncrementStatus.ACTIVE);
136
+ const backlog = allIncrements.filter(m => m.status === IncrementStatus.BACKLOG);
125
137
  const paused = allIncrements.filter(m => m.status === IncrementStatus.PAUSED);
126
138
  const completed = allIncrements.filter(m => m.status === IncrementStatus.COMPLETED);
127
139
  const abandoned = allIncrements.filter(m => m.status === IncrementStatus.ABANDONED);
@@ -148,6 +160,7 @@ if (active.length > 0) {
148
160
  // Summary with type limits (v0.7.0+)
149
161
  console.log('\n📊 Summary:');
150
162
  console.log(` - Active: ${active.length} increments`);
163
+ console.log(` - Backlog: ${backlog.length} increments`);
151
164
  console.log(` - Paused: ${paused.length} increments`);
152
165
  console.log(` - Completed: ${completed.length} increments`);
153
166
 
@@ -263,6 +276,26 @@ Show only active increments
263
276
  🔧 0006-i18n [feature] (50% done)
264
277
  ```
265
278
 
279
+ ### --backlog
280
+
281
+ Show only backlog increments
282
+
283
+ ```bash
284
+ /specweave:status --backlog
285
+
286
+ 🗂️ Backlog (3):
287
+ 📦 0032-feature-a [feature] (in backlog 5 days)
288
+ Reason: Low priority
289
+
290
+ 📦 0033-feature-b [feature] (in backlog 3 days)
291
+ Reason: Waiting for decisions
292
+
293
+ 📦 0034-feature-c [feature] (in backlog 1 day)
294
+ Reason: Multiple planned ideas
295
+
296
+ 💡 Start work: /specweave:resume <id>
297
+ ```
298
+
266
299
  ### --paused
267
300
 
268
301
  Show only paused increments
@@ -336,11 +369,12 @@ Show only stale increments (paused >7 days OR active >30 days)
336
369
 
337
370
  ## Related Commands
338
371
 
339
- - `/do` - Continue work on active increment
340
- - `/progress` - Detailed progress for current increment
341
- - `/pause <id>` - Pause active increment
342
- - `/resume <id>` - Resume paused increment
343
- - `/abandon <id>` - Abandon increment (move to _abandoned/)
372
+ - `/specweave:do` - Continue work on active increment
373
+ - `/specweave:progress` - Detailed progress for current increment
374
+ - `/specweave:backlog <id>` - Move increment to backlog
375
+ - `/specweave:pause <id>` - Pause active increment
376
+ - `/specweave:resume <id>` - Resume paused or backlog increment
377
+ - `/specweave:abandon <id>` - Abandon increment (move to _abandoned/)
344
378
 
345
379
  ---
346
380