specweave 0.24.11 → 0.26.2

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 (411) hide show
  1. package/CLAUDE.md +742 -26
  2. package/bin/specweave.js +14 -0
  3. package/dist/plugins/specweave-github/lib/CodeValidator.js +2 -2
  4. package/dist/plugins/specweave-github/lib/CodeValidator.js.map +1 -1
  5. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  6. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +1 -1
  7. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +28 -0
  8. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  9. package/dist/plugins/specweave-github/lib/github-client-v2.js +64 -1
  10. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  11. package/dist/plugins/specweave-github/lib/github-issue-updater.js +1 -1
  12. package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -1
  13. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  14. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
  15. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
  16. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -1
  17. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
  18. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +7 -6
  19. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
  20. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
  21. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -1
  22. package/dist/src/adapters/adapter-base.js +1 -1
  23. package/dist/src/adapters/adapter-base.js.map +1 -1
  24. package/dist/src/adapters/adapter-loader.js +1 -1
  25. package/dist/src/adapters/adapter-loader.js.map +1 -1
  26. package/dist/src/adapters/agents-md-generator.js +1 -1
  27. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  28. package/dist/src/adapters/claude/adapter.js +1 -1
  29. package/dist/src/adapters/claude/adapter.js.map +1 -1
  30. package/dist/src/adapters/claude-md-generator.js +1 -1
  31. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  32. package/dist/src/adapters/codex/adapter.js +1 -1
  33. package/dist/src/adapters/codex/adapter.js.map +1 -1
  34. package/dist/src/adapters/cursor/adapter.js +1 -1
  35. package/dist/src/adapters/cursor/adapter.js.map +1 -1
  36. package/dist/src/adapters/doc-generator.js +1 -1
  37. package/dist/src/adapters/doc-generator.js.map +1 -1
  38. package/dist/src/adapters/gemini/adapter.js +1 -1
  39. package/dist/src/adapters/gemini/adapter.js.map +1 -1
  40. package/dist/src/adapters/generic/adapter.js +1 -1
  41. package/dist/src/adapters/generic/adapter.js.map +1 -1
  42. package/dist/src/cli/commands/cicd-monitor.js +1 -1
  43. package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
  44. package/dist/src/cli/commands/delete-feature.d.ts +14 -0
  45. package/dist/src/cli/commands/delete-feature.d.ts.map +1 -0
  46. package/dist/src/cli/commands/delete-feature.js +87 -0
  47. package/dist/src/cli/commands/delete-feature.js.map +1 -0
  48. package/dist/src/cli/commands/detect-specs.js +1 -1
  49. package/dist/src/cli/commands/detect-specs.js.map +1 -1
  50. package/dist/src/cli/commands/import-external.js +1 -1
  51. package/dist/src/cli/commands/import-external.js.map +1 -1
  52. package/dist/src/cli/commands/init.d.ts.map +1 -1
  53. package/dist/src/cli/commands/init.js +45 -47
  54. package/dist/src/cli/commands/init.js.map +1 -1
  55. package/dist/src/cli/commands/install.js +1 -1
  56. package/dist/src/cli/commands/install.js.map +1 -1
  57. package/dist/src/cli/commands/list.js +1 -1
  58. package/dist/src/cli/commands/list.js.map +1 -1
  59. package/dist/src/cli/commands/migrate-to-multiproject.js +1 -1
  60. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  61. package/dist/src/cli/commands/migrate-to-profiles.js +1 -1
  62. package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
  63. package/dist/src/cli/commands/plan/agent-invoker.js +1 -1
  64. package/dist/src/cli/commands/repair-status-desync.js +1 -1
  65. package/dist/src/cli/commands/repair-status-desync.js.map +1 -1
  66. package/dist/src/cli/commands/revert-wip-limit.js +1 -1
  67. package/dist/src/cli/commands/revert-wip-limit.js.map +1 -1
  68. package/dist/src/cli/commands/sync-specs.js +1 -1
  69. package/dist/src/cli/commands/sync-specs.js.map +1 -1
  70. package/dist/src/cli/helpers/init/initial-increment-generator.js +1 -1
  71. package/dist/src/cli/helpers/init/initial-increment-generator.js.map +1 -1
  72. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -1
  73. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +15 -36
  74. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -1
  75. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  76. package/dist/src/cli/helpers/issue-tracker/index.js +12 -31
  77. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  78. package/dist/src/cli/helpers/issue-tracker/types.d.ts +6 -1
  79. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
  80. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
  81. package/dist/src/config/import-config.js +1 -1
  82. package/dist/src/config/import-config.js.map +1 -1
  83. package/dist/src/config/types.d.ts +203 -1208
  84. package/dist/src/config/types.d.ts.map +1 -1
  85. package/dist/src/core/ac-test-validator-cli.js +1 -1
  86. package/dist/src/core/ac-test-validator-cli.js.map +1 -1
  87. package/dist/src/core/ac-test-validator.js +1 -1
  88. package/dist/src/core/ac-test-validator.js.map +1 -1
  89. package/dist/src/core/brownfield/analyzer.js +1 -1
  90. package/dist/src/core/brownfield/analyzer.js.map +1 -1
  91. package/dist/src/core/brownfield/importer.js +1 -1
  92. package/dist/src/core/brownfield/importer.js.map +1 -1
  93. package/dist/src/core/cicd/config-loader.js +1 -1
  94. package/dist/src/core/cicd/config-loader.js.map +1 -1
  95. package/dist/src/core/cicd/notifier.js +1 -1
  96. package/dist/src/core/cicd/notifier.js.map +1 -1
  97. package/dist/src/core/cicd/parent-repo-validator.js +1 -1
  98. package/dist/src/core/cicd/parent-repo-validator.js.map +1 -1
  99. package/dist/src/core/cicd/state-manager.js +1 -1
  100. package/dist/src/core/cicd/state-manager.js.map +1 -1
  101. package/dist/src/core/config/types.d.ts +46 -12
  102. package/dist/src/core/config/types.d.ts.map +1 -1
  103. package/dist/src/core/config/types.js +0 -5
  104. package/dist/src/core/config/types.js.map +1 -1
  105. package/dist/src/core/config-manager.js +1 -1
  106. package/dist/src/core/config-manager.js.map +1 -1
  107. package/dist/src/core/cost-tracker.js +1 -1
  108. package/dist/src/core/cost-tracker.js.map +1 -1
  109. package/dist/src/core/deduplication/command-deduplicator.js +1 -1
  110. package/dist/src/core/deduplication/command-deduplicator.js.map +1 -1
  111. package/dist/src/core/feature-deleter/audit-logger.d.ts +30 -0
  112. package/dist/src/core/feature-deleter/audit-logger.d.ts.map +1 -0
  113. package/dist/src/core/feature-deleter/audit-logger.js +77 -0
  114. package/dist/src/core/feature-deleter/audit-logger.js.map +1 -0
  115. package/dist/src/core/feature-deleter/confirmation-manager.d.ts +39 -0
  116. package/dist/src/core/feature-deleter/confirmation-manager.d.ts.map +1 -0
  117. package/dist/src/core/feature-deleter/confirmation-manager.js +89 -0
  118. package/dist/src/core/feature-deleter/confirmation-manager.js.map +1 -0
  119. package/dist/src/core/feature-deleter/deletion-transaction.d.ts +51 -0
  120. package/dist/src/core/feature-deleter/deletion-transaction.d.ts.map +1 -0
  121. package/dist/src/core/feature-deleter/deletion-transaction.js +185 -0
  122. package/dist/src/core/feature-deleter/deletion-transaction.js.map +1 -0
  123. package/dist/src/core/feature-deleter/git-service.d.ts +43 -0
  124. package/dist/src/core/feature-deleter/git-service.d.ts.map +1 -0
  125. package/dist/src/core/feature-deleter/git-service.js +127 -0
  126. package/dist/src/core/feature-deleter/git-service.js.map +1 -0
  127. package/dist/src/core/feature-deleter/github-service.d.ts +36 -0
  128. package/dist/src/core/feature-deleter/github-service.d.ts.map +1 -0
  129. package/dist/src/core/feature-deleter/github-service.js +102 -0
  130. package/dist/src/core/feature-deleter/github-service.js.map +1 -0
  131. package/dist/src/core/feature-deleter/index.d.ts +35 -0
  132. package/dist/src/core/feature-deleter/index.d.ts.map +1 -0
  133. package/dist/src/core/feature-deleter/index.js +199 -0
  134. package/dist/src/core/feature-deleter/index.js.map +1 -0
  135. package/dist/src/core/feature-deleter/types.d.ts +179 -0
  136. package/dist/src/core/feature-deleter/types.d.ts.map +1 -0
  137. package/dist/src/core/feature-deleter/types.js +7 -0
  138. package/dist/src/core/feature-deleter/types.js.map +1 -0
  139. package/dist/src/core/feature-deleter/validator.d.ts +46 -0
  140. package/dist/src/core/feature-deleter/validator.d.ts.map +1 -0
  141. package/dist/src/core/feature-deleter/validator.js +231 -0
  142. package/dist/src/core/feature-deleter/validator.js.map +1 -0
  143. package/dist/src/core/hooks/HealthReporter.js +1 -1
  144. package/dist/src/core/hooks/HealthReporter.js.map +1 -1
  145. package/dist/src/core/hooks/HookAutoFixer.js +1 -1
  146. package/dist/src/core/hooks/HookAutoFixer.js.map +1 -1
  147. package/dist/src/core/hooks/HookScanner.js +1 -1
  148. package/dist/src/core/hooks/HookScanner.js.map +1 -1
  149. package/dist/src/core/i18n/language-manager.js +1 -1
  150. package/dist/src/core/i18n/language-manager.js.map +1 -1
  151. package/dist/src/core/i18n/locale-manager.js +1 -1
  152. package/dist/src/core/i18n/locale-manager.js.map +1 -1
  153. package/dist/src/core/i18n/system-prompt-injector.js +1 -1
  154. package/dist/src/core/i18n/system-prompt-injector.js.map +1 -1
  155. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -1
  156. package/dist/src/core/increment/ac-status-manager.js +18 -4
  157. package/dist/src/core/increment/ac-status-manager.js.map +1 -1
  158. package/dist/src/core/increment/active-increment-manager.js +1 -1
  159. package/dist/src/core/increment/active-increment-manager.js.map +1 -1
  160. package/dist/src/core/increment/completion-validator.js +1 -1
  161. package/dist/src/core/increment/completion-validator.js.map +1 -1
  162. package/dist/src/core/increment/conflict-resolver.js +1 -1
  163. package/dist/src/core/increment/conflict-resolver.js.map +1 -1
  164. package/dist/src/core/increment/desync-detector.js +1 -1
  165. package/dist/src/core/increment/desync-detector.js.map +1 -1
  166. package/dist/src/core/increment/discipline-checker.js +1 -1
  167. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  168. package/dist/src/core/increment/duplicate-detector.js +1 -1
  169. package/dist/src/core/increment/duplicate-detector.js.map +1 -1
  170. package/dist/src/core/increment/increment-archiver.js +1 -1
  171. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  172. package/dist/src/core/increment/increment-reopener.js +1 -1
  173. package/dist/src/core/increment/increment-reopener.js.map +1 -1
  174. package/dist/src/core/increment/metadata-manager.js +1 -1
  175. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  176. package/dist/src/core/increment/metadata-validator.js +1 -1
  177. package/dist/src/core/increment/metadata-validator.js.map +1 -1
  178. package/dist/src/core/increment/recent-work-scanner.js +1 -1
  179. package/dist/src/core/increment/recent-work-scanner.js.map +1 -1
  180. package/dist/src/core/increment/spec-frontmatter-updater.js +1 -1
  181. package/dist/src/core/increment/spec-frontmatter-updater.js.map +1 -1
  182. package/dist/src/core/increment/status-auto-transition.js +1 -1
  183. package/dist/src/core/increment/status-auto-transition.js.map +1 -1
  184. package/dist/src/core/increment-status.js +1 -1
  185. package/dist/src/core/increment-status.js.map +1 -1
  186. package/dist/src/core/living-docs/content-distributor.js +1 -1
  187. package/dist/src/core/living-docs/content-distributor.js.map +1 -1
  188. package/dist/src/core/living-docs/cross-linker.js +1 -1
  189. package/dist/src/core/living-docs/cross-linker.js.map +1 -1
  190. package/dist/src/core/living-docs/feature-archiver.js +1 -1
  191. package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
  192. package/dist/src/core/living-docs/feature-id-manager.js +1 -1
  193. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
  194. package/dist/src/core/living-docs/hierarchy-mapper.js +1 -1
  195. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  196. package/dist/src/core/living-docs/living-docs-sync.d.ts +14 -0
  197. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  198. package/dist/src/core/living-docs/living-docs-sync.js +72 -13
  199. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  200. package/dist/src/core/living-docs/project-detector.js +1 -1
  201. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  202. package/dist/src/core/living-docs/task-project-specific-generator.js +1 -1
  203. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -1
  204. package/dist/src/core/logging/prompt-logger.js +1 -1
  205. package/dist/src/core/logging/prompt-logger.js.map +1 -1
  206. package/dist/src/core/plugin-loader.js +1 -1
  207. package/dist/src/core/plugin-loader.js.map +1 -1
  208. package/dist/src/core/project-manager.js +1 -1
  209. package/dist/src/core/project-manager.js.map +1 -1
  210. package/dist/src/core/qa/qa-runner.js +1 -1
  211. package/dist/src/core/qa/qa-runner.js.map +1 -1
  212. package/dist/src/core/repo-structure/folder-detector.js +1 -1
  213. package/dist/src/core/repo-structure/folder-detector.js.map +1 -1
  214. package/dist/src/core/repo-structure/repo-bulk-discovery.d.ts.map +1 -1
  215. package/dist/src/core/repo-structure/repo-bulk-discovery.js +20 -5
  216. package/dist/src/core/repo-structure/repo-bulk-discovery.js.map +1 -1
  217. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  218. package/dist/src/core/repo-structure/repo-structure-manager.js +29 -14
  219. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  220. package/dist/src/core/repo-structure/setup-state-manager.js +1 -1
  221. package/dist/src/core/repo-structure/setup-state-manager.js.map +1 -1
  222. package/dist/src/core/spec-detector.js +1 -1
  223. package/dist/src/core/spec-detector.js.map +1 -1
  224. package/dist/src/core/specs/spec-metadata-manager.js +1 -1
  225. package/dist/src/core/specs/spec-metadata-manager.js.map +1 -1
  226. package/dist/src/core/status-line/status-line-updater.js +1 -1
  227. package/dist/src/core/status-line/status-line-updater.js.map +1 -1
  228. package/dist/src/core/status-line-validator.js +1 -1
  229. package/dist/src/core/status-line-validator.js.map +1 -1
  230. package/dist/src/core/sync/bidirectional-engine.js +1 -1
  231. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  232. package/dist/src/core/sync/profile-manager.js +1 -1
  233. package/dist/src/core/sync/profile-manager.js.map +1 -1
  234. package/dist/src/core/sync/project-context.js +1 -1
  235. package/dist/src/core/sync/project-context.js.map +1 -1
  236. package/dist/src/core/sync/sync-event-logger.js +1 -1
  237. package/dist/src/core/sync/sync-event-logger.js.map +1 -1
  238. package/dist/src/core/types/config.js +1 -1
  239. package/dist/src/core/types/config.js.map +1 -1
  240. package/dist/src/core/us-completion-detector.d.ts +124 -0
  241. package/dist/src/core/us-completion-detector.d.ts.map +1 -0
  242. package/dist/src/core/us-completion-detector.js +270 -0
  243. package/dist/src/core/us-completion-detector.js.map +1 -0
  244. package/dist/src/core/utils/permission-checker.js +1 -1
  245. package/dist/src/core/utils/permission-checker.js.map +1 -1
  246. package/dist/src/core/workflow/autonomous-executor.js +1 -1
  247. package/dist/src/core/workflow/autonomous-executor.js.map +1 -1
  248. package/dist/src/core/workflow/backlog-scanner.js +1 -1
  249. package/dist/src/core/workflow/backlog-scanner.js.map +1 -1
  250. package/dist/src/core/workflow/cost-estimator.js +1 -1
  251. package/dist/src/core/workflow/cost-estimator.js.map +1 -1
  252. package/dist/src/core/workflow/state-manager.js +1 -1
  253. package/dist/src/core/workflow/state-manager.js.map +1 -1
  254. package/dist/src/importers/duplicate-detector.js +1 -1
  255. package/dist/src/importers/duplicate-detector.js.map +1 -1
  256. package/dist/src/importers/item-converter.js +1 -1
  257. package/dist/src/importers/item-converter.js.map +1 -1
  258. package/dist/src/init/architecture/types.d.ts +33 -140
  259. package/dist/src/init/architecture/types.d.ts.map +1 -1
  260. package/dist/src/init/compliance/types.d.ts +30 -27
  261. package/dist/src/init/compliance/types.d.ts.map +1 -1
  262. package/dist/src/init/repo/types.d.ts +11 -34
  263. package/dist/src/init/repo/types.d.ts.map +1 -1
  264. package/dist/src/init/research/src/config/types.d.ts +15 -82
  265. package/dist/src/init/research/src/config/types.d.ts.map +1 -1
  266. package/dist/src/init/research/types.d.ts +38 -93
  267. package/dist/src/init/research/types.d.ts.map +1 -1
  268. package/dist/src/init/team/types.d.ts +4 -42
  269. package/dist/src/init/team/types.d.ts.map +1 -1
  270. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +1 -1
  271. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  272. package/dist/src/integrations/jira/jira-incremental-mapper.js +3 -3
  273. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  274. package/dist/src/living-docs/fs-id-allocator.js +1 -1
  275. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  276. package/dist/src/living-docs/id-registry.js +1 -1
  277. package/dist/src/living-docs/id-registry.js.map +1 -1
  278. package/dist/src/sync/external-item-sync-service.js +1 -1
  279. package/dist/src/sync/external-item-sync-service.js.map +1 -1
  280. package/dist/src/sync/format-preservation-sync.d.ts.map +1 -1
  281. package/dist/src/sync/format-preservation-sync.js +23 -5
  282. package/dist/src/sync/format-preservation-sync.js.map +1 -1
  283. package/dist/src/sync/frontmatter-updater.d.ts +57 -0
  284. package/dist/src/sync/frontmatter-updater.d.ts.map +1 -0
  285. package/dist/src/sync/frontmatter-updater.js +147 -0
  286. package/dist/src/sync/frontmatter-updater.js.map +1 -0
  287. package/dist/src/sync/sync-coordinator.d.ts +22 -1
  288. package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
  289. package/dist/src/sync/sync-coordinator.js +268 -21
  290. package/dist/src/sync/sync-coordinator.js.map +1 -1
  291. package/dist/src/sync/sync-metadata.js +1 -1
  292. package/dist/src/sync/sync-metadata.js.map +1 -1
  293. package/dist/src/types/living-docs-us-file.d.ts +18 -0
  294. package/dist/src/types/living-docs-us-file.d.ts.map +1 -1
  295. package/dist/src/types/living-docs-us-file.js.map +1 -1
  296. package/dist/src/utils/agents-md-compiler.js +1 -1
  297. package/dist/src/utils/agents-md-compiler.js.map +1 -1
  298. package/dist/src/utils/auto-install.js +1 -1
  299. package/dist/src/utils/auto-install.js.map +1 -1
  300. package/dist/src/utils/cost-reporter.js +1 -1
  301. package/dist/src/utils/cost-reporter.js.map +1 -1
  302. package/dist/src/utils/docs-preview/config-generator.js +1 -1
  303. package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
  304. package/dist/src/utils/docs-preview/docusaurus-setup.js +1 -1
  305. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
  306. package/dist/src/utils/docs-preview/package-installer.js +1 -1
  307. package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
  308. package/dist/src/utils/docs-preview/sidebar-builder.js +1 -1
  309. package/dist/src/utils/docs-preview/sidebar-builder.js.map +1 -1
  310. package/dist/src/utils/env-file-generator.js +1 -1
  311. package/dist/src/utils/env-file-generator.js.map +1 -1
  312. package/dist/src/utils/external-resource-validator.js +1 -1
  313. package/dist/src/utils/external-resource-validator.js.map +1 -1
  314. package/dist/src/utils/fs-native.d.ts +51 -5
  315. package/dist/src/utils/fs-native.d.ts.map +1 -1
  316. package/dist/src/utils/fs-native.js +100 -5
  317. package/dist/src/utils/fs-native.js.map +1 -1
  318. package/dist/src/utils/plugin-validator.js +1 -1
  319. package/dist/src/utils/plugin-validator.js.map +1 -1
  320. package/dist/src/utils/project-detection.js +1 -1
  321. package/dist/src/utils/project-detection.js.map +1 -1
  322. package/dist/src/utils/project-validator.js +1 -1
  323. package/dist/src/utils/project-validator.js.map +1 -1
  324. package/dist/src/utils/spec-parser.js +1 -1
  325. package/dist/src/utils/spec-parser.js.map +1 -1
  326. package/dist/src/utils/spec-splitter.js +1 -1
  327. package/dist/src/utils/spec-splitter.js.map +1 -1
  328. package/dist/src/validators/ac-coverage-validator.js +1 -1
  329. package/dist/src/validators/ac-coverage-validator.js.map +1 -1
  330. package/package.json +5 -6
  331. package/plugins/specweave/.claude-plugin/plugin.json +17 -11
  332. package/plugins/specweave/agents/architect/AGENT.md +115 -45
  333. package/plugins/specweave/agents/code-standards-detective/AGENT.md +47 -0
  334. package/plugins/specweave/agents/docs-writer/AGENT.md +134 -1
  335. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +1 -0
  336. package/plugins/specweave/agents/infrastructure/AGENT.md +48 -1
  337. package/plugins/specweave/agents/performance/AGENT.md +46 -0
  338. package/plugins/specweave/agents/pm/AGENT.md +115 -3
  339. package/plugins/specweave/agents/qa-lead/AGENT.md +40 -1
  340. package/plugins/specweave/agents/reflective-reviewer/AGENT.md +5 -0
  341. package/plugins/specweave/agents/security/AGENT.md +45 -0
  342. package/plugins/specweave/agents/tdd-orchestrator/AGENT.md +128 -1
  343. package/plugins/specweave/agents/tech-lead/AGENT.md +138 -1
  344. package/plugins/specweave/agents/test-aware-planner/AGENT.md +76 -6
  345. package/plugins/specweave/agents/translator/AGENT.md +132 -0
  346. package/plugins/specweave/commands/specweave-sync-progress.md +616 -0
  347. package/plugins/specweave/hooks/hooks.json +0 -9
  348. package/plugins/specweave/hooks/lib/update-status-line.sh +19 -0
  349. package/plugins/specweave/hooks/post-edit-write-consolidated.sh +335 -0
  350. package/plugins/specweave/hooks/post-increment-completion.sh +133 -0
  351. package/plugins/specweave/hooks/post-metadata-change.sh +58 -19
  352. package/plugins/specweave/hooks/post-task-completion.sh +100 -9
  353. package/plugins/specweave/hooks/pre-edit-spec.sh +0 -11
  354. package/plugins/specweave/hooks/pre-edit-write-consolidated.sh +225 -0
  355. package/plugins/specweave/hooks/pre-task-completion.sh +11 -0
  356. package/plugins/specweave/hooks/pre-write-spec.sh +0 -11
  357. package/plugins/specweave/hooks/shared/bulk-operation-detector.sh +167 -0
  358. package/plugins/specweave/lib/hooks/consolidated-sync.js +78 -3
  359. package/plugins/specweave/lib/hooks/us-completion-orchestrator.js +135 -0
  360. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js +18 -4
  361. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js.map +1 -1
  362. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +1 -1
  363. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -1
  364. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +1 -1
  365. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -1
  366. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +1 -1
  367. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  368. package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
  369. package/plugins/specweave/skills/progress-sync/SKILL.md +405 -0
  370. package/plugins/specweave-ado/lib/ado-project-detector.js +1 -1
  371. package/plugins/specweave-ado/lib/ado-project-detector.ts +1 -1
  372. package/plugins/specweave-ado/lib/conflict-resolver.js +1 -1
  373. package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
  374. package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +1 -1
  375. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +5 -0
  376. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -15
  377. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +480 -0
  378. package/plugins/specweave-github/hooks/README.md +34 -25
  379. package/plugins/specweave-github/lib/CodeValidator.js +1 -1
  380. package/plugins/specweave-github/lib/CodeValidator.ts +2 -2
  381. package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  382. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
  383. package/plugins/specweave-github/lib/github-client-v2.js +59 -1
  384. package/plugins/specweave-github/lib/github-client-v2.ts +82 -1
  385. package/plugins/specweave-github/lib/github-issue-updater.js +1 -1
  386. package/plugins/specweave-github/lib/github-issue-updater.ts +1 -1
  387. package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  388. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +1 -1
  389. package/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
  390. package/plugins/specweave-github/lib/github-sync-increment-changes.ts +1 -1
  391. package/plugins/specweave-github/lib/user-story-issue-builder.js +4 -4
  392. package/plugins/specweave-github/lib/user-story-issue-builder.ts +7 -6
  393. package/plugins/specweave-infrastructure/agents/devops/AGENT.md +48 -1
  394. package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +6 -1
  395. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +6 -1
  396. package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +6 -1
  397. package/plugins/specweave-infrastructure/agents/sre/AGENT.md +5 -0
  398. package/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
  399. package/plugins/specweave-jira/lib/jira-epic-sync.ts +1 -1
  400. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +5 -0
  401. package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +47 -2
  402. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +1 -1
  403. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +5 -0
  404. package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +6 -1
  405. package/plugins/specweave-payments/agents/payment-integration/AGENT.md +1 -1
  406. package/plugins/specweave-release/commands/specweave-release-npm.md +130 -2
  407. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +198 -0
  408. package/plugins/specweave-ado/hooks/hooks.json +0 -15
  409. package/plugins/specweave-github/hooks/hooks.json +0 -15
  410. package/plugins/specweave-jira/hooks/hooks.json +0 -15
  411. package/plugins/specweave-release/hooks/hooks.json +0 -15
@@ -0,0 +1,616 @@
1
+ ---
2
+ name: specweave:sync-progress
3
+ description: Comprehensive progress sync - tasks.md → living docs → external tools (GitHub/JIRA/ADO). Updates all systems with latest task completion status.
4
+ ---
5
+
6
+ # Sync Progress (Comprehensive Multi-System Sync)
7
+
8
+ You are executing the SpecWeave comprehensive progress synchronization command. This orchestrates the complete flow:
9
+
10
+ **tasks.md (source of truth) → living docs (ACs, user stories) → external tools (GitHub, JIRA, ADO)**
11
+
12
+ This is the **"single button"** to sync all progress across the entire SpecWeave ecosystem.
13
+
14
+ ---
15
+
16
+ ## STEP 1: Parse Arguments and Detect Active Increment
17
+
18
+ ```
19
+ Arguments provided: [user's arguments]
20
+ ```
21
+
22
+ **Parse the input**:
23
+ - Check for increment ID: `0053`, `0001`, etc., or none (auto-detect from active state)
24
+ - Check for flags: `--dry-run`, `--no-github`, `--no-jira`, `--no-ado`, `--force`
25
+
26
+ **Auto-detect active increment**:
27
+
28
+ ```bash
29
+ # Read active increment from state file
30
+ ACTIVE_STATE=".specweave/state/active-increment.json"
31
+ if [ -f "$ACTIVE_STATE" ]; then
32
+ INCREMENT_ID=$(jq -r '.ids[0]' "$ACTIVE_STATE" 2>/dev/null)
33
+
34
+ if [ "$INCREMENT_ID" != "null" ] && [ -n "$INCREMENT_ID" ]; then
35
+ echo "🔍 Auto-detected active increment: $INCREMENT_ID"
36
+ fi
37
+ fi
38
+
39
+ # If no increment ID found, prompt user
40
+ if [ -z "$INCREMENT_ID" ]; then
41
+ echo "❌ No active increment found."
42
+ echo "Usage: /specweave:sync-progress <increment-id>"
43
+ echo " or: /specweave:sync-progress (auto-detects active increment)"
44
+ exit 1
45
+ fi
46
+ ```
47
+
48
+ **Validate increment exists**:
49
+
50
+ ```bash
51
+ INCREMENT_DIR=".specweave/increments/$INCREMENT_ID"
52
+ if [ ! -d "$INCREMENT_DIR" ]; then
53
+ echo "❌ Increment $INCREMENT_ID not found at $INCREMENT_DIR"
54
+ exit 1
55
+ fi
56
+
57
+ echo "✅ Found increment: $INCREMENT_ID"
58
+ ```
59
+
60
+ **Output**:
61
+ ```
62
+ 🔍 Auto-detected active increment: 0053-safe-feature-deletion
63
+ ✅ Found increment: 0053-safe-feature-deletion
64
+
65
+ 📊 Starting comprehensive progress sync...
66
+ ```
67
+
68
+ ---
69
+
70
+ ## STEP 2: Sync Tasks → Living Docs (ACs and User Stories)
71
+
72
+ **Purpose**: Update living docs with task completion status
73
+
74
+ ### 2.1: Sync Acceptance Criteria (ACs)
75
+
76
+ Use the existing AC sync mechanism (post-task-completion hook logic):
77
+
78
+ ```bash
79
+ echo "📝 Step 1/4: Syncing ACs from tasks.md to spec.md..."
80
+
81
+ # Run AC sync (same logic as post-task-completion.sh hook)
82
+ bash plugins/specweave/hooks/post-task-completion.sh "$INCREMENT_DIR"
83
+
84
+ if [ $? -eq 0 ]; then
85
+ echo " ✅ AC sync complete"
86
+ else
87
+ echo " ⚠️ AC sync had warnings (check logs)"
88
+ fi
89
+ ```
90
+
91
+ **What this does**:
92
+ - Parses tasks.md to find completed tasks
93
+ - Finds linked ACs (via `**Satisfies ACs**: AC-US1-01, AC-US1-02`)
94
+ - Updates spec.md to mark ACs as complete: `- [ ]` → `- [x]`
95
+ - Updates metadata.json with AC completion count
96
+
97
+ ### 2.2: Sync to Living Docs (User Stories)
98
+
99
+ Call the existing `/specweave:sync-specs` command:
100
+
101
+ ```bash
102
+ echo "📚 Step 2/4: Syncing increment to living docs..."
103
+
104
+ # Sync increment specs to living docs structure
105
+ npx specweave sync-specs "$INCREMENT_ID"
106
+
107
+ if [ $? -eq 0 ]; then
108
+ echo " ✅ Living docs sync complete"
109
+ else
110
+ echo " ❌ Living docs sync failed"
111
+ exit 1
112
+ fi
113
+ ```
114
+
115
+ **What this does**:
116
+ - Syncs spec.md → living docs user stories
117
+ - Updates user story completion status
118
+ - Generates/updates feature ID if needed
119
+ - Updates README.md in feature folder
120
+
121
+ ---
122
+
123
+ ## STEP 3: Detect External Tool Configuration
124
+
125
+ **Check which external tools are configured**:
126
+
127
+ ```bash
128
+ echo "🔧 Step 3/4: Detecting external tool configuration..."
129
+
130
+ CONFIG_FILE=".specweave/config.json"
131
+ EXTERNAL_TOOLS=()
132
+
133
+ # Check GitHub
134
+ if grep -q '"provider":\s*"github"' "$CONFIG_FILE" 2>/dev/null; then
135
+ EXTERNAL_TOOLS+=("github")
136
+ echo " ✅ GitHub integration detected"
137
+ fi
138
+
139
+ # Check JIRA
140
+ if grep -q '"provider":\s*"jira"' "$CONFIG_FILE" 2>/dev/null; then
141
+ EXTERNAL_TOOLS+=("jira")
142
+ echo " ✅ JIRA integration detected"
143
+ fi
144
+
145
+ # Check Azure DevOps
146
+ if grep -q '"provider":\s*"azure-devops"' "$CONFIG_FILE" 2>/dev/null; then
147
+ EXTERNAL_TOOLS+=("ado")
148
+ echo " ✅ Azure DevOps integration detected"
149
+ fi
150
+
151
+ if [ ${#EXTERNAL_TOOLS[@]} -eq 0 ]; then
152
+ echo " ℹ️ No external tools configured (skip external sync)"
153
+ fi
154
+ ```
155
+
156
+ **Output**:
157
+ ```
158
+ 🔧 Step 3/4: Detecting external tool configuration...
159
+ ✅ GitHub integration detected
160
+ ℹ️ No JIRA integration
161
+ ℹ️ No Azure DevOps integration
162
+ ```
163
+
164
+ ---
165
+
166
+ ## STEP 4: Sync to External Tools
167
+
168
+ **For each detected external tool, sync progress**:
169
+
170
+ ### 4.1: Sync to GitHub (if enabled)
171
+
172
+ ```bash
173
+ if [[ " ${EXTERNAL_TOOLS[@]} " =~ " github " ]] && [ "$NO_GITHUB" != "true" ]; then
174
+ echo "🔗 Step 4/4: Syncing to GitHub..."
175
+
176
+ # Run GitHub sync command
177
+ if [ "$DRY_RUN" = "true" ]; then
178
+ echo " [DRY-RUN] Would sync to GitHub"
179
+ else
180
+ /specweave-github:sync "$INCREMENT_ID"
181
+
182
+ if [ $? -eq 0 ]; then
183
+ echo " ✅ GitHub sync complete"
184
+ else
185
+ echo " ⚠️ GitHub sync had warnings (check logs)"
186
+ fi
187
+ fi
188
+ else
189
+ echo "🔗 Step 4/4: Skipping GitHub sync (--no-github or not configured)"
190
+ fi
191
+ ```
192
+
193
+ **What GitHub sync does**:
194
+ - Reads completed user stories from living docs
195
+ - Closes GitHub issues for completed user stories
196
+ - Updates epic issue checklist with task progress
197
+ - Posts completion comments with stats
198
+ - Updates issue labels (in-progress → completed)
199
+
200
+ ### 4.2: Sync to JIRA (if enabled)
201
+
202
+ ```bash
203
+ if [[ " ${EXTERNAL_TOOLS[@]} " =~ " jira " ]] && [ "$NO_JIRA" != "true" ]; then
204
+ echo "🔗 Syncing to JIRA..."
205
+
206
+ if [ "$DRY_RUN" = "true" ]; then
207
+ echo " [DRY-RUN] Would sync to JIRA"
208
+ else
209
+ /specweave-jira:sync "$INCREMENT_ID"
210
+
211
+ if [ $? -eq 0 ]; then
212
+ echo " ✅ JIRA sync complete"
213
+ else
214
+ echo " ⚠️ JIRA sync had warnings"
215
+ fi
216
+ fi
217
+ fi
218
+ ```
219
+
220
+ ### 4.3: Sync to Azure DevOps (if enabled)
221
+
222
+ ```bash
223
+ if [[ " ${EXTERNAL_TOOLS[@]} " =~ " ado " ]] && [ "$NO_ADO" != "true" ]; then
224
+ echo "🔗 Syncing to Azure DevOps..."
225
+
226
+ if [ "$DRY_RUN" = "true" ]; then
227
+ echo " [DRY-RUN] Would sync to ADO"
228
+ else
229
+ /specweave-ado:sync "$INCREMENT_ID"
230
+
231
+ if [ $? -eq 0 ]; then
232
+ echo " ✅ ADO sync complete"
233
+ else
234
+ echo " ⚠️ ADO sync had warnings"
235
+ fi
236
+ fi
237
+ fi
238
+ ```
239
+
240
+ ---
241
+
242
+ ## STEP 5: Update Status Line Cache
243
+
244
+ **Refresh status line with latest completion data**:
245
+
246
+ ```bash
247
+ echo "📊 Updating status line cache..."
248
+
249
+ # Force update status line cache
250
+ /specweave:update-status
251
+
252
+ echo " ✅ Status line updated"
253
+ ```
254
+
255
+ ---
256
+
257
+ ## STEP 6: Generate Comprehensive Report
258
+
259
+ **Show detailed sync summary**:
260
+
261
+ ```bash
262
+ echo ""
263
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
264
+ echo " ✅ PROGRESS SYNC COMPLETE"
265
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
266
+ echo ""
267
+ echo "📦 Increment: $INCREMENT_ID"
268
+ echo ""
269
+ echo "✅ Synced:"
270
+ echo " • Tasks → ACs (spec.md)"
271
+ echo " • Spec → Living docs (user stories)"
272
+ if [[ " ${EXTERNAL_TOOLS[@]} " =~ " github " ]]; then
273
+ echo " • Living docs → GitHub issues"
274
+ fi
275
+ if [[ " ${EXTERNAL_TOOLS[@]} " =~ " jira " ]]; then
276
+ echo " • Living docs → JIRA stories"
277
+ fi
278
+ if [[ " ${EXTERNAL_TOOLS[@]} " =~ " ado " ]]; then
279
+ echo " • Living docs → Azure DevOps work items"
280
+ fi
281
+ echo " • Status line cache"
282
+ echo ""
283
+
284
+ # Show completion stats
285
+ METADATA="$INCREMENT_DIR/metadata.json"
286
+ if [ -f "$METADATA" ]; then
287
+ TOTAL_ACS=$(jq -r '.total_acs // 0' "$METADATA")
288
+ COMPLETED_ACS=$(jq -r '.completed_acs // 0' "$METADATA")
289
+ PERCENTAGE=0
290
+
291
+ if [ "$TOTAL_ACS" -gt 0 ]; then
292
+ PERCENTAGE=$((COMPLETED_ACS * 100 / TOTAL_ACS))
293
+ fi
294
+
295
+ echo "📊 Completion:"
296
+ echo " • ACs: $COMPLETED_ACS/$TOTAL_ACS ($PERCENTAGE%)"
297
+ fi
298
+
299
+ echo ""
300
+ echo "Next steps:"
301
+ echo " • Review status line for updated progress"
302
+ echo " • Check external tools (GitHub/JIRA/ADO) for synced updates"
303
+ echo " • Run /specweave:validate $INCREMENT_ID to validate quality"
304
+ echo " • Run /specweave:done $INCREMENT_ID when ready to close"
305
+ echo ""
306
+ ```
307
+
308
+ **Example Output**:
309
+
310
+ ```
311
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
312
+ ✅ PROGRESS SYNC COMPLETE
313
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
314
+
315
+ 📦 Increment: 0053-safe-feature-deletion
316
+
317
+ ✅ Synced:
318
+ • Tasks → ACs (spec.md)
319
+ • Spec → Living docs (user stories)
320
+ • Living docs → GitHub issues
321
+ • Status line cache
322
+
323
+ 📊 Completion:
324
+ • ACs: 70/70 (100%)
325
+
326
+ Next steps:
327
+ • Review status line for updated progress
328
+ • Check external tools (GitHub/JIRA/ADO) for synced updates
329
+ • Run /specweave:validate 0053 to validate quality
330
+ • Run /specweave:done 0053 when ready to close
331
+ ```
332
+
333
+ ---
334
+
335
+ ## STEP 7: Dry-Run Mode (If --dry-run flag)
336
+
337
+ **If dry-run mode is enabled, show what WOULD be synced without executing**:
338
+
339
+ ```bash
340
+ if [ "$DRY_RUN" = "true" ]; then
341
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
342
+ echo " 🔍 DRY-RUN MODE (No changes made)"
343
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
344
+ echo ""
345
+ echo "📦 Increment: $INCREMENT_ID"
346
+ echo ""
347
+ echo "Would sync:"
348
+ echo " • 37 completed tasks → 70 ACs in spec.md"
349
+ echo " • spec.md → 6 user stories in living docs"
350
+ echo " • Living docs → 6 GitHub issues (would close completed)"
351
+ echo " • Status line cache (would update completion %)"
352
+ echo ""
353
+ echo "Run without --dry-run to execute sync."
354
+ exit 0
355
+ fi
356
+ ```
357
+
358
+ ---
359
+
360
+ ## Error Handling
361
+
362
+ **Graceful error handling at each step**:
363
+
364
+ ```bash
365
+ # If any critical step fails, show error and exit
366
+ handle_error() {
367
+ local step="$1"
368
+ local error_msg="$2"
369
+
370
+ echo "❌ Error in $step: $error_msg"
371
+ echo ""
372
+ echo "Sync aborted. Manual recovery may be needed."
373
+ echo "Check logs for details."
374
+ exit 1
375
+ }
376
+
377
+ # Non-critical errors (external tools) → log warning, continue
378
+ handle_warning() {
379
+ local step="$1"
380
+ local warning_msg="$2"
381
+
382
+ echo "⚠️ Warning in $step: $warning_msg"
383
+ echo " Continuing with sync..."
384
+ }
385
+ ```
386
+
387
+ **Examples**:
388
+
389
+ ```bash
390
+ # Critical error (blocks sync)
391
+ if ! sync_acs; then
392
+ handle_error "AC sync" "Failed to update spec.md"
393
+ fi
394
+
395
+ # Non-critical error (logs warning, continues)
396
+ if ! sync_github; then
397
+ handle_warning "GitHub sync" "Rate limit exceeded, some issues not closed"
398
+ fi
399
+ ```
400
+
401
+ ---
402
+
403
+ ## Flags
404
+
405
+ **Supported flags**:
406
+
407
+ - `--dry-run`: Preview sync without executing (shows what would be synced)
408
+ - `--no-github`: Skip GitHub sync (even if configured)
409
+ - `--no-jira`: Skip JIRA sync (even if configured)
410
+ - `--no-ado`: Skip Azure DevOps sync (even if configured)
411
+ - `--force`: Force sync even if validation fails (use with caution)
412
+
413
+ **Examples**:
414
+
415
+ ```bash
416
+ # Dry-run mode (preview only)
417
+ /specweave:sync-progress 0053 --dry-run
418
+
419
+ # Skip GitHub sync
420
+ /specweave:sync-progress 0053 --no-github
421
+
422
+ # Skip all external tools
423
+ /specweave:sync-progress 0053 --no-github --no-jira --no-ado
424
+
425
+ # Auto-detect active increment
426
+ /specweave:sync-progress
427
+ ```
428
+
429
+ ---
430
+
431
+ ## Use Cases
432
+
433
+ ### Use Case 1: After Completing Tasks
434
+
435
+ **Scenario**: You've completed 5 tasks and marked them as done in tasks.md. Now you want to sync progress everywhere.
436
+
437
+ ```bash
438
+ # Single command syncs everything
439
+ /specweave:sync-progress
440
+ ```
441
+
442
+ **What happens**:
443
+ 1. ✅ ACs in spec.md marked complete (based on completed tasks)
444
+ 2. ✅ Living docs user stories updated
445
+ 3. ✅ GitHub issues closed for completed user stories
446
+ 4. ✅ Epic issue checklist updated with task progress
447
+ 5. ✅ Status line shows updated completion %
448
+
449
+ ### Use Case 2: Before Closing Increment
450
+
451
+ **Scenario**: All tasks complete, ready to close increment. Want to ensure all systems are in sync.
452
+
453
+ ```bash
454
+ # Final sync before /specweave:done
455
+ /specweave:sync-progress 0053
456
+
457
+ # Then close increment
458
+ /specweave:done 0053
459
+ ```
460
+
461
+ ### Use Case 3: Preview Sync (Dry-Run)
462
+
463
+ **Scenario**: Want to see what will be synced before executing.
464
+
465
+ ```bash
466
+ # Preview mode
467
+ /specweave:sync-progress 0053 --dry-run
468
+ ```
469
+
470
+ **Output**:
471
+ ```
472
+ 🔍 DRY-RUN MODE (No changes made)
473
+
474
+ Would sync:
475
+ • 37 completed tasks → 70 ACs in spec.md
476
+ • spec.md → 6 user stories in living docs
477
+ • Living docs → 6 GitHub issues (would close completed)
478
+ • Status line cache (would update completion %)
479
+ ```
480
+
481
+ ### Use Case 4: Local-Only Sync (No External Tools)
482
+
483
+ **Scenario**: Want to sync tasks → docs but NOT to GitHub/JIRA (offline work).
484
+
485
+ ```bash
486
+ # Skip all external tools
487
+ /specweave:sync-progress 0053 --no-github --no-jira --no-ado
488
+ ```
489
+
490
+ ---
491
+
492
+ ## Architecture
493
+
494
+ **Multi-System Sync Flow**:
495
+
496
+ ```
497
+ ┌─────────────────────────────────────────────────────────────┐
498
+ │ /specweave:sync-progress │
499
+ │ (Single Orchestrator Command) │
500
+ └────────────────────────┬────────────────────────────────────┘
501
+
502
+ ┌───────────────┼───────────────┐
503
+ │ │ │
504
+ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐
505
+ │ Tasks │ │ Living │ │ External│
506
+ │ → ACs │ │ Docs │ │ Tools │
507
+ │(spec.md)│ │(stories)│ │ (sync) │
508
+ └────┬────┘ └────┬────┘ └────┬────┘
509
+ │ │ │
510
+ │ │ ┌──────┼──────┐
511
+ │ │ │ │ │
512
+ │ │ ┌────▼─┐ ┌─▼──┐ ┌─▼──┐
513
+ │ │ │GitHub│ │JIRA│ │ADO │
514
+ │ │ └──────┘ └────┘ └────┘
515
+ │ │
516
+ ┌────▼───────────────▼────┐
517
+ │ Status Line Cache │
518
+ │ (Auto-Update Display) │
519
+ └─────────────────────────┘
520
+ ```
521
+
522
+ **Key Design Principles**:
523
+
524
+ 1. **Single Command, Multi-System**: One command orchestrates all sync operations
525
+ 2. **Graceful Degradation**: External tool failures don't block core sync
526
+ 3. **Dry-Run Support**: Preview changes before executing
527
+ 4. **Selective Sync**: Flags to skip specific external tools
528
+ 5. **Auto-Detection**: Finds active increment automatically
529
+ 6. **Comprehensive Reporting**: Shows exactly what was synced
530
+
531
+ ---
532
+
533
+ ## Integration with Existing Commands
534
+
535
+ **How this relates to other sync commands**:
536
+
537
+ | Command | Purpose | Scope |
538
+ |---------|---------|-------|
539
+ | `/specweave:sync-acs` | Sync tasks → ACs (spec.md) | Tasks to spec only |
540
+ | `/specweave:sync-specs` | Sync spec → living docs | Spec to docs only |
541
+ | `/specweave:sync-tasks` | Sync GitHub → tasks | External to tasks |
542
+ | `/specweave-github:sync` | Sync to GitHub | Living docs to GitHub |
543
+ | **`/specweave:sync-progress`** | **Comprehensive multi-system sync** | **Tasks → Docs → External** |
544
+
545
+ **When to use each**:
546
+
547
+ - Use `/specweave:sync-acs` when you only want to update ACs in spec.md
548
+ - Use `/specweave:sync-specs` when you only want to sync to living docs
549
+ - Use `/specweave-github:sync` when you only want to sync to GitHub
550
+ - **Use `/specweave:sync-progress` for complete end-to-end sync** ✅ (Recommended!)
551
+
552
+ ---
553
+
554
+ ## Troubleshooting
555
+
556
+ ### Issue: AC sync warnings
557
+
558
+ **Error**:
559
+ ```
560
+ ⚠️ AC sync had warnings: 5 ACs not found in spec.md
561
+ ```
562
+
563
+ **Fix**:
564
+ ```bash
565
+ # Embed ACs from living docs into spec.md
566
+ /specweave:embed-acs 0053
567
+
568
+ # Then retry sync
569
+ /specweave:sync-progress 0053
570
+ ```
571
+
572
+ ### Issue: GitHub sync failed (rate limit)
573
+
574
+ **Error**:
575
+ ```
576
+ ⚠️ GitHub sync had warnings: Rate limit exceeded
577
+ ```
578
+
579
+ **Fix**: GitHub sync is non-critical, increment still synced to docs. Retry later when rate limit resets, or manually close issues.
580
+
581
+ ### Issue: No active increment found
582
+
583
+ **Error**:
584
+ ```
585
+ ❌ No active increment found
586
+ ```
587
+
588
+ **Fix**:
589
+ ```bash
590
+ # Provide increment ID explicitly
591
+ /specweave:sync-progress 0053
592
+ ```
593
+
594
+ ---
595
+
596
+ ## Next Steps After Sync
597
+
598
+ **After successful sync, typical workflow**:
599
+
600
+ ```bash
601
+ # 1. Sync progress (this command)
602
+ /specweave:sync-progress 0053
603
+
604
+ # 2. Validate quality
605
+ /specweave:validate 0053 --quality
606
+
607
+ # 3. Close increment (PM validation)
608
+ /specweave:done 0053
609
+ ```
610
+
611
+ ---
612
+
613
+ **See**:
614
+ - ADR-0032 (Universal Hierarchy Mapping)
615
+ - Increment 0050 (External Tool Import Phase 1b)
616
+ - Increment 0051 (Automatic GitHub Sync)
@@ -15,15 +15,6 @@
15
15
  }
16
16
  ],
17
17
  "PostToolUse": [
18
- {
19
- "matcher": "TodoWrite",
20
- "hooks": [
21
- {
22
- "type": "command",
23
- "command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-task-completion.sh"
24
- }
25
- ]
26
- },
27
18
  {
28
19
  "matcher": "Write",
29
20
  "matcher_content": "\\.specweave/increments/[0-9]{4}-.+/(spec|plan|tasks)\\.md",
@@ -35,6 +35,25 @@ find_project_root() {
35
35
  }
36
36
 
37
37
  PROJECT_ROOT=$(find_project_root)
38
+
39
+ # ============================================================================
40
+ # RECURSION PREVENTION (CRITICAL - v0.26.0 - FILE-BASED GUARD)
41
+ # ============================================================================
42
+ # FIX: Don't update status line from within hook chain
43
+ # WHY: Status line writes status-line.json which triggers post-edit-write hook
44
+ # which tries to update status line AGAIN → infinite recursion!
45
+ #
46
+ # This is a CRITICAL part of Fix #4 in the root cause analysis:
47
+ # See: .specweave/increments/0051-*/reports/GITHUB-COMMENT-RECURSION-ROOT-CAUSE-2025-11-24.md
48
+
49
+ RECURSION_GUARD_FILE="$PROJECT_ROOT/.specweave/state/.hook-recursion-guard"
50
+
51
+ if [[ -f "$RECURSION_GUARD_FILE" ]]; then
52
+ # We're inside a hook chain - skip status line update to prevent recursion
53
+ # This is NORMAL behavior (not an error!)
54
+ exit 0
55
+ fi
56
+
38
57
  CACHE_FILE="$PROJECT_ROOT/.specweave/state/status-line.json"
39
58
  INCREMENTS_DIR="$PROJECT_ROOT/.specweave/increments"
40
59
  TMP_FILE="$PROJECT_ROOT/.specweave/state/.status-line-tmp.txt"