specweave 0.24.13 → 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 (377) hide show
  1. package/CLAUDE.md +586 -18
  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.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-client-v2.js +17 -1
  9. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  10. package/dist/plugins/specweave-github/lib/github-issue-updater.js +1 -1
  11. package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -1
  12. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  13. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
  14. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
  15. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -1
  16. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
  17. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +7 -6
  18. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
  19. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
  20. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -1
  21. package/dist/src/adapters/adapter-base.js +1 -1
  22. package/dist/src/adapters/adapter-base.js.map +1 -1
  23. package/dist/src/adapters/adapter-loader.js +1 -1
  24. package/dist/src/adapters/adapter-loader.js.map +1 -1
  25. package/dist/src/adapters/agents-md-generator.js +1 -1
  26. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  27. package/dist/src/adapters/claude/adapter.js +1 -1
  28. package/dist/src/adapters/claude/adapter.js.map +1 -1
  29. package/dist/src/adapters/claude-md-generator.js +1 -1
  30. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  31. package/dist/src/adapters/codex/adapter.js +1 -1
  32. package/dist/src/adapters/codex/adapter.js.map +1 -1
  33. package/dist/src/adapters/cursor/adapter.js +1 -1
  34. package/dist/src/adapters/cursor/adapter.js.map +1 -1
  35. package/dist/src/adapters/doc-generator.js +1 -1
  36. package/dist/src/adapters/doc-generator.js.map +1 -1
  37. package/dist/src/adapters/gemini/adapter.js +1 -1
  38. package/dist/src/adapters/gemini/adapter.js.map +1 -1
  39. package/dist/src/adapters/generic/adapter.js +1 -1
  40. package/dist/src/adapters/generic/adapter.js.map +1 -1
  41. package/dist/src/cli/commands/cicd-monitor.js +1 -1
  42. package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
  43. package/dist/src/cli/commands/delete-feature.d.ts +14 -0
  44. package/dist/src/cli/commands/delete-feature.d.ts.map +1 -0
  45. package/dist/src/cli/commands/delete-feature.js +87 -0
  46. package/dist/src/cli/commands/delete-feature.js.map +1 -0
  47. package/dist/src/cli/commands/detect-specs.js +1 -1
  48. package/dist/src/cli/commands/detect-specs.js.map +1 -1
  49. package/dist/src/cli/commands/import-external.js +1 -1
  50. package/dist/src/cli/commands/import-external.js.map +1 -1
  51. package/dist/src/cli/commands/init.d.ts.map +1 -1
  52. package/dist/src/cli/commands/init.js +39 -49
  53. package/dist/src/cli/commands/init.js.map +1 -1
  54. package/dist/src/cli/commands/install.js +1 -1
  55. package/dist/src/cli/commands/install.js.map +1 -1
  56. package/dist/src/cli/commands/list.js +1 -1
  57. package/dist/src/cli/commands/list.js.map +1 -1
  58. package/dist/src/cli/commands/migrate-to-multiproject.js +1 -1
  59. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  60. package/dist/src/cli/commands/migrate-to-profiles.js +1 -1
  61. package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
  62. package/dist/src/cli/commands/plan/agent-invoker.js +1 -1
  63. package/dist/src/cli/commands/repair-status-desync.js +1 -1
  64. package/dist/src/cli/commands/repair-status-desync.js.map +1 -1
  65. package/dist/src/cli/commands/revert-wip-limit.js +1 -1
  66. package/dist/src/cli/commands/revert-wip-limit.js.map +1 -1
  67. package/dist/src/cli/commands/sync-specs.js +1 -1
  68. package/dist/src/cli/commands/sync-specs.js.map +1 -1
  69. package/dist/src/cli/helpers/init/initial-increment-generator.js +1 -1
  70. package/dist/src/cli/helpers/init/initial-increment-generator.js.map +1 -1
  71. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -1
  72. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +13 -46
  73. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -1
  74. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  75. package/dist/src/cli/helpers/issue-tracker/index.js +12 -31
  76. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  77. package/dist/src/cli/helpers/issue-tracker/types.d.ts +6 -1
  78. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
  79. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
  80. package/dist/src/config/import-config.js +1 -1
  81. package/dist/src/config/import-config.js.map +1 -1
  82. package/dist/src/config/types.d.ts +203 -1208
  83. package/dist/src/config/types.d.ts.map +1 -1
  84. package/dist/src/core/ac-test-validator-cli.js +1 -1
  85. package/dist/src/core/ac-test-validator-cli.js.map +1 -1
  86. package/dist/src/core/ac-test-validator.js +1 -1
  87. package/dist/src/core/ac-test-validator.js.map +1 -1
  88. package/dist/src/core/brownfield/analyzer.js +1 -1
  89. package/dist/src/core/brownfield/analyzer.js.map +1 -1
  90. package/dist/src/core/brownfield/importer.js +1 -1
  91. package/dist/src/core/brownfield/importer.js.map +1 -1
  92. package/dist/src/core/cicd/config-loader.js +1 -1
  93. package/dist/src/core/cicd/config-loader.js.map +1 -1
  94. package/dist/src/core/cicd/notifier.js +1 -1
  95. package/dist/src/core/cicd/notifier.js.map +1 -1
  96. package/dist/src/core/cicd/parent-repo-validator.js +1 -1
  97. package/dist/src/core/cicd/parent-repo-validator.js.map +1 -1
  98. package/dist/src/core/cicd/state-manager.js +1 -1
  99. package/dist/src/core/cicd/state-manager.js.map +1 -1
  100. package/dist/src/core/config-manager.js +1 -1
  101. package/dist/src/core/config-manager.js.map +1 -1
  102. package/dist/src/core/cost-tracker.js +1 -1
  103. package/dist/src/core/cost-tracker.js.map +1 -1
  104. package/dist/src/core/deduplication/command-deduplicator.js +1 -1
  105. package/dist/src/core/deduplication/command-deduplicator.js.map +1 -1
  106. package/dist/src/core/feature-deleter/audit-logger.d.ts +30 -0
  107. package/dist/src/core/feature-deleter/audit-logger.d.ts.map +1 -0
  108. package/dist/src/core/feature-deleter/audit-logger.js +77 -0
  109. package/dist/src/core/feature-deleter/audit-logger.js.map +1 -0
  110. package/dist/src/core/feature-deleter/confirmation-manager.d.ts +39 -0
  111. package/dist/src/core/feature-deleter/confirmation-manager.d.ts.map +1 -0
  112. package/dist/src/core/feature-deleter/confirmation-manager.js +89 -0
  113. package/dist/src/core/feature-deleter/confirmation-manager.js.map +1 -0
  114. package/dist/src/core/feature-deleter/deletion-transaction.d.ts +51 -0
  115. package/dist/src/core/feature-deleter/deletion-transaction.d.ts.map +1 -0
  116. package/dist/src/core/feature-deleter/deletion-transaction.js +185 -0
  117. package/dist/src/core/feature-deleter/deletion-transaction.js.map +1 -0
  118. package/dist/src/core/feature-deleter/git-service.d.ts +43 -0
  119. package/dist/src/core/feature-deleter/git-service.d.ts.map +1 -0
  120. package/dist/src/core/feature-deleter/git-service.js +127 -0
  121. package/dist/src/core/feature-deleter/git-service.js.map +1 -0
  122. package/dist/src/core/feature-deleter/github-service.d.ts +36 -0
  123. package/dist/src/core/feature-deleter/github-service.d.ts.map +1 -0
  124. package/dist/src/core/feature-deleter/github-service.js +102 -0
  125. package/dist/src/core/feature-deleter/github-service.js.map +1 -0
  126. package/dist/src/core/feature-deleter/index.d.ts +35 -0
  127. package/dist/src/core/feature-deleter/index.d.ts.map +1 -0
  128. package/dist/src/core/feature-deleter/index.js +199 -0
  129. package/dist/src/core/feature-deleter/index.js.map +1 -0
  130. package/dist/src/core/feature-deleter/types.d.ts +179 -0
  131. package/dist/src/core/feature-deleter/types.d.ts.map +1 -0
  132. package/dist/src/core/feature-deleter/types.js +7 -0
  133. package/dist/src/core/feature-deleter/types.js.map +1 -0
  134. package/dist/src/core/feature-deleter/validator.d.ts +46 -0
  135. package/dist/src/core/feature-deleter/validator.d.ts.map +1 -0
  136. package/dist/src/core/feature-deleter/validator.js +231 -0
  137. package/dist/src/core/feature-deleter/validator.js.map +1 -0
  138. package/dist/src/core/hooks/HealthReporter.js +1 -1
  139. package/dist/src/core/hooks/HealthReporter.js.map +1 -1
  140. package/dist/src/core/hooks/HookAutoFixer.js +1 -1
  141. package/dist/src/core/hooks/HookAutoFixer.js.map +1 -1
  142. package/dist/src/core/hooks/HookScanner.js +1 -1
  143. package/dist/src/core/hooks/HookScanner.js.map +1 -1
  144. package/dist/src/core/i18n/language-manager.js +1 -1
  145. package/dist/src/core/i18n/language-manager.js.map +1 -1
  146. package/dist/src/core/i18n/locale-manager.js +1 -1
  147. package/dist/src/core/i18n/locale-manager.js.map +1 -1
  148. package/dist/src/core/i18n/system-prompt-injector.js +1 -1
  149. package/dist/src/core/i18n/system-prompt-injector.js.map +1 -1
  150. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -1
  151. package/dist/src/core/increment/ac-status-manager.js +18 -4
  152. package/dist/src/core/increment/ac-status-manager.js.map +1 -1
  153. package/dist/src/core/increment/active-increment-manager.js +1 -1
  154. package/dist/src/core/increment/active-increment-manager.js.map +1 -1
  155. package/dist/src/core/increment/completion-validator.js +1 -1
  156. package/dist/src/core/increment/completion-validator.js.map +1 -1
  157. package/dist/src/core/increment/conflict-resolver.js +1 -1
  158. package/dist/src/core/increment/conflict-resolver.js.map +1 -1
  159. package/dist/src/core/increment/desync-detector.js +1 -1
  160. package/dist/src/core/increment/desync-detector.js.map +1 -1
  161. package/dist/src/core/increment/discipline-checker.js +1 -1
  162. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  163. package/dist/src/core/increment/duplicate-detector.js +1 -1
  164. package/dist/src/core/increment/duplicate-detector.js.map +1 -1
  165. package/dist/src/core/increment/increment-archiver.js +1 -1
  166. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  167. package/dist/src/core/increment/increment-reopener.js +1 -1
  168. package/dist/src/core/increment/increment-reopener.js.map +1 -1
  169. package/dist/src/core/increment/metadata-manager.js +1 -1
  170. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  171. package/dist/src/core/increment/metadata-validator.js +1 -1
  172. package/dist/src/core/increment/metadata-validator.js.map +1 -1
  173. package/dist/src/core/increment/recent-work-scanner.js +1 -1
  174. package/dist/src/core/increment/recent-work-scanner.js.map +1 -1
  175. package/dist/src/core/increment/spec-frontmatter-updater.js +1 -1
  176. package/dist/src/core/increment/spec-frontmatter-updater.js.map +1 -1
  177. package/dist/src/core/increment/status-auto-transition.js +1 -1
  178. package/dist/src/core/increment/status-auto-transition.js.map +1 -1
  179. package/dist/src/core/increment-status.js +1 -1
  180. package/dist/src/core/increment-status.js.map +1 -1
  181. package/dist/src/core/living-docs/content-distributor.js +1 -1
  182. package/dist/src/core/living-docs/content-distributor.js.map +1 -1
  183. package/dist/src/core/living-docs/cross-linker.js +1 -1
  184. package/dist/src/core/living-docs/cross-linker.js.map +1 -1
  185. package/dist/src/core/living-docs/feature-archiver.js +1 -1
  186. package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
  187. package/dist/src/core/living-docs/feature-id-manager.js +1 -1
  188. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
  189. package/dist/src/core/living-docs/hierarchy-mapper.js +1 -1
  190. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  191. package/dist/src/core/living-docs/living-docs-sync.d.ts +14 -0
  192. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  193. package/dist/src/core/living-docs/living-docs-sync.js +72 -13
  194. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  195. package/dist/src/core/living-docs/project-detector.js +1 -1
  196. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  197. package/dist/src/core/living-docs/task-project-specific-generator.js +1 -1
  198. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -1
  199. package/dist/src/core/logging/prompt-logger.js +1 -1
  200. package/dist/src/core/logging/prompt-logger.js.map +1 -1
  201. package/dist/src/core/plugin-loader.js +1 -1
  202. package/dist/src/core/plugin-loader.js.map +1 -1
  203. package/dist/src/core/project-manager.js +1 -1
  204. package/dist/src/core/project-manager.js.map +1 -1
  205. package/dist/src/core/qa/qa-runner.js +1 -1
  206. package/dist/src/core/qa/qa-runner.js.map +1 -1
  207. package/dist/src/core/repo-structure/folder-detector.js +1 -1
  208. package/dist/src/core/repo-structure/folder-detector.js.map +1 -1
  209. package/dist/src/core/repo-structure/setup-state-manager.js +1 -1
  210. package/dist/src/core/repo-structure/setup-state-manager.js.map +1 -1
  211. package/dist/src/core/spec-detector.js +1 -1
  212. package/dist/src/core/spec-detector.js.map +1 -1
  213. package/dist/src/core/specs/spec-metadata-manager.js +1 -1
  214. package/dist/src/core/specs/spec-metadata-manager.js.map +1 -1
  215. package/dist/src/core/status-line/status-line-updater.js +1 -1
  216. package/dist/src/core/status-line/status-line-updater.js.map +1 -1
  217. package/dist/src/core/status-line-validator.js +1 -1
  218. package/dist/src/core/status-line-validator.js.map +1 -1
  219. package/dist/src/core/sync/bidirectional-engine.js +1 -1
  220. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  221. package/dist/src/core/sync/profile-manager.js +1 -1
  222. package/dist/src/core/sync/profile-manager.js.map +1 -1
  223. package/dist/src/core/sync/project-context.js +1 -1
  224. package/dist/src/core/sync/project-context.js.map +1 -1
  225. package/dist/src/core/sync/sync-event-logger.js +1 -1
  226. package/dist/src/core/sync/sync-event-logger.js.map +1 -1
  227. package/dist/src/core/types/config.js +1 -1
  228. package/dist/src/core/types/config.js.map +1 -1
  229. package/dist/src/core/us-completion-detector.d.ts +124 -0
  230. package/dist/src/core/us-completion-detector.d.ts.map +1 -0
  231. package/dist/src/core/us-completion-detector.js +270 -0
  232. package/dist/src/core/us-completion-detector.js.map +1 -0
  233. package/dist/src/core/utils/permission-checker.js +1 -1
  234. package/dist/src/core/utils/permission-checker.js.map +1 -1
  235. package/dist/src/core/workflow/autonomous-executor.js +1 -1
  236. package/dist/src/core/workflow/autonomous-executor.js.map +1 -1
  237. package/dist/src/core/workflow/backlog-scanner.js +1 -1
  238. package/dist/src/core/workflow/backlog-scanner.js.map +1 -1
  239. package/dist/src/core/workflow/cost-estimator.js +1 -1
  240. package/dist/src/core/workflow/cost-estimator.js.map +1 -1
  241. package/dist/src/core/workflow/state-manager.js +1 -1
  242. package/dist/src/core/workflow/state-manager.js.map +1 -1
  243. package/dist/src/importers/duplicate-detector.js +1 -1
  244. package/dist/src/importers/duplicate-detector.js.map +1 -1
  245. package/dist/src/importers/item-converter.js +1 -1
  246. package/dist/src/importers/item-converter.js.map +1 -1
  247. package/dist/src/init/architecture/types.d.ts +33 -140
  248. package/dist/src/init/architecture/types.d.ts.map +1 -1
  249. package/dist/src/init/compliance/types.d.ts +30 -27
  250. package/dist/src/init/compliance/types.d.ts.map +1 -1
  251. package/dist/src/init/repo/types.d.ts +11 -34
  252. package/dist/src/init/repo/types.d.ts.map +1 -1
  253. package/dist/src/init/research/src/config/types.d.ts +15 -82
  254. package/dist/src/init/research/src/config/types.d.ts.map +1 -1
  255. package/dist/src/init/research/types.d.ts +38 -93
  256. package/dist/src/init/research/types.d.ts.map +1 -1
  257. package/dist/src/init/team/types.d.ts +4 -42
  258. package/dist/src/init/team/types.d.ts.map +1 -1
  259. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +1 -1
  260. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  261. package/dist/src/integrations/jira/jira-incremental-mapper.js +3 -3
  262. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  263. package/dist/src/living-docs/fs-id-allocator.js +1 -1
  264. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  265. package/dist/src/living-docs/id-registry.js +1 -1
  266. package/dist/src/living-docs/id-registry.js.map +1 -1
  267. package/dist/src/sync/external-item-sync-service.js +1 -1
  268. package/dist/src/sync/external-item-sync-service.js.map +1 -1
  269. package/dist/src/sync/sync-metadata.js +1 -1
  270. package/dist/src/sync/sync-metadata.js.map +1 -1
  271. package/dist/src/utils/agents-md-compiler.js +1 -1
  272. package/dist/src/utils/agents-md-compiler.js.map +1 -1
  273. package/dist/src/utils/auto-install.js +1 -1
  274. package/dist/src/utils/auto-install.js.map +1 -1
  275. package/dist/src/utils/cost-reporter.js +1 -1
  276. package/dist/src/utils/cost-reporter.js.map +1 -1
  277. package/dist/src/utils/docs-preview/config-generator.js +1 -1
  278. package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
  279. package/dist/src/utils/docs-preview/docusaurus-setup.js +1 -1
  280. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
  281. package/dist/src/utils/docs-preview/package-installer.js +1 -1
  282. package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
  283. package/dist/src/utils/docs-preview/sidebar-builder.js +1 -1
  284. package/dist/src/utils/docs-preview/sidebar-builder.js.map +1 -1
  285. package/dist/src/utils/env-file-generator.js +1 -1
  286. package/dist/src/utils/env-file-generator.js.map +1 -1
  287. package/dist/src/utils/external-resource-validator.js +1 -1
  288. package/dist/src/utils/external-resource-validator.js.map +1 -1
  289. package/dist/src/utils/fs-native.d.ts +51 -5
  290. package/dist/src/utils/fs-native.d.ts.map +1 -1
  291. package/dist/src/utils/fs-native.js +100 -5
  292. package/dist/src/utils/fs-native.js.map +1 -1
  293. package/dist/src/utils/plugin-validator.js +1 -1
  294. package/dist/src/utils/plugin-validator.js.map +1 -1
  295. package/dist/src/utils/project-detection.js +1 -1
  296. package/dist/src/utils/project-detection.js.map +1 -1
  297. package/dist/src/utils/project-validator.js +1 -1
  298. package/dist/src/utils/project-validator.js.map +1 -1
  299. package/dist/src/utils/spec-parser.js +1 -1
  300. package/dist/src/utils/spec-parser.js.map +1 -1
  301. package/dist/src/utils/spec-splitter.js +1 -1
  302. package/dist/src/utils/spec-splitter.js.map +1 -1
  303. package/dist/src/validators/ac-coverage-validator.js +1 -1
  304. package/dist/src/validators/ac-coverage-validator.js.map +1 -1
  305. package/package.json +5 -6
  306. package/plugins/specweave/agents/code-standards-detective/AGENT.md +47 -0
  307. package/plugins/specweave/agents/docs-writer/AGENT.md +134 -1
  308. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +1 -0
  309. package/plugins/specweave/agents/infrastructure/AGENT.md +48 -1
  310. package/plugins/specweave/agents/performance/AGENT.md +46 -0
  311. package/plugins/specweave/agents/pm/AGENT.md +115 -3
  312. package/plugins/specweave/agents/qa-lead/AGENT.md +40 -1
  313. package/plugins/specweave/agents/reflective-reviewer/AGENT.md +5 -0
  314. package/plugins/specweave/agents/security/AGENT.md +45 -0
  315. package/plugins/specweave/agents/tdd-orchestrator/AGENT.md +128 -1
  316. package/plugins/specweave/agents/tech-lead/AGENT.md +138 -1
  317. package/plugins/specweave/agents/translator/AGENT.md +132 -0
  318. package/plugins/specweave/commands/specweave-sync-progress.md +616 -0
  319. package/plugins/specweave/hooks/hooks.json +0 -9
  320. package/plugins/specweave/hooks/post-increment-completion.sh +133 -0
  321. package/plugins/specweave/hooks/post-metadata-change.sh +28 -23
  322. package/plugins/specweave/hooks/post-task-completion.sh +7 -0
  323. package/plugins/specweave/hooks/pre-edit-write-consolidated.sh +44 -7
  324. package/plugins/specweave/hooks/shared/bulk-operation-detector.sh +167 -0
  325. package/plugins/specweave/lib/hooks/consolidated-sync.js +19 -2
  326. package/plugins/specweave/lib/hooks/us-completion-orchestrator.js +135 -0
  327. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js +18 -4
  328. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js.map +1 -1
  329. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +1 -1
  330. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -1
  331. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +1 -1
  332. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -1
  333. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +1 -1
  334. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  335. package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
  336. package/plugins/specweave/skills/progress-sync/SKILL.md +405 -0
  337. package/plugins/specweave-ado/lib/ado-project-detector.js +1 -1
  338. package/plugins/specweave-ado/lib/ado-project-detector.ts +1 -1
  339. package/plugins/specweave-ado/lib/conflict-resolver.js +1 -1
  340. package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
  341. package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +1 -1
  342. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +5 -0
  343. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -15
  344. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +186 -0
  345. package/plugins/specweave-github/hooks/README.md +34 -25
  346. package/plugins/specweave-github/lib/CodeValidator.js +1 -1
  347. package/plugins/specweave-github/lib/CodeValidator.ts +2 -2
  348. package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  349. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
  350. package/plugins/specweave-github/lib/github-client-v2.js +13 -1
  351. package/plugins/specweave-github/lib/github-client-v2.ts +17 -1
  352. package/plugins/specweave-github/lib/github-issue-updater.js +1 -1
  353. package/plugins/specweave-github/lib/github-issue-updater.ts +1 -1
  354. package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  355. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +1 -1
  356. package/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
  357. package/plugins/specweave-github/lib/github-sync-increment-changes.ts +1 -1
  358. package/plugins/specweave-github/lib/user-story-issue-builder.js +4 -4
  359. package/plugins/specweave-github/lib/user-story-issue-builder.ts +7 -6
  360. package/plugins/specweave-infrastructure/agents/devops/AGENT.md +48 -1
  361. package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +6 -1
  362. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +6 -1
  363. package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +6 -1
  364. package/plugins/specweave-infrastructure/agents/sre/AGENT.md +5 -0
  365. package/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
  366. package/plugins/specweave-jira/lib/jira-epic-sync.ts +1 -1
  367. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +5 -0
  368. package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +47 -2
  369. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +1 -1
  370. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +5 -0
  371. package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +6 -1
  372. package/plugins/specweave-payments/agents/payment-integration/AGENT.md +1 -1
  373. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +138 -0
  374. package/plugins/specweave-ado/hooks/hooks.json +0 -15
  375. package/plugins/specweave-github/hooks/hooks.json +0 -15
  376. package/plugins/specweave-jira/hooks/hooks.json +0 -15
  377. package/plugins/specweave-release/hooks/hooks.json +0 -15
package/CLAUDE.md CHANGED
@@ -61,13 +61,31 @@ git push origin develop
61
61
  **Solution**: Use the automated refresh script!
62
62
 
63
63
  ```bash
64
- # LOCAL DEVELOPMENT (default) - Uses your local changes
64
+ # FROM GITHUB (default, recommended) - Pulls latest from GitHub
65
65
  bash scripts/refresh-marketplace.sh
66
66
 
67
- # FROM GITHUB - Pulls latest from GitHub
68
- bash scripts/refresh-marketplace.sh --github
67
+ # LOCAL DEVELOPMENT - Uses your local changes (ONLY for active development!)
68
+ bash scripts/refresh-marketplace.sh --local
69
69
  ```
70
70
 
71
+ **🚨 CRITICAL: Always Use GitHub Mode Unless Actively Developing!**
72
+
73
+ **Why GitHub mode is mandatory:**
74
+ - ✅ **Separate Installation**: Creates proper copy at `~/.claude/plugins/marketplaces/specweave/`
75
+ - ✅ **Stable Source**: Pulls from committed GitHub code, not unstable local changes
76
+ - ✅ **No Path Coupling**: Clear separation between source and runtime
77
+ - ✅ **Production-Ready**: What end users will experience
78
+
79
+ **Why local mode is dangerous:**
80
+ - ❌ **Filesystem Coupling**: `installLocation` = source directory (no separate copy!)
81
+ - ❌ **Stale Hook Risk**: Any git operations, file deletions, or uncommitted changes affect "installed" plugins
82
+ - ❌ **Path Confusion**: Claude Code expects hooks at `~/.claude/plugins/marketplaces/` but they're in your working directory
83
+ - ❌ **Instability**: Leads to "hook not found" errors like you just experienced
84
+
85
+ **Rule of thumb:**
86
+ - **Development workflow**: Commit → Push → `bash scripts/refresh-marketplace.sh` (GitHub mode) → Test
87
+ - **Emergency local testing**: Use `--local` ONLY when you need to test uncommitted changes, then immediately switch back to GitHub mode
88
+
71
89
  **What it does**:
72
90
  1. ✅ Removes existing marketplace
73
91
  2. ✅ Clears all plugin caches
@@ -78,22 +96,22 @@ bash scripts/refresh-marketplace.sh --github
78
96
  **Output Example**:
79
97
  ```
80
98
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
81
- SpecWeave Marketplace Refresh (local mode)
99
+ SpecWeave Marketplace Refresh (github mode)
82
100
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
101
 
84
102
  📦 Step 1: Removing existing marketplace...
85
103
  ✓ Marketplace removed
86
104
 
87
105
  🧹 Step 2: Clearing plugin caches...
88
- ✓ Marketplace cache cleared
89
106
  ✓ Installed plugins cache backed up
90
107
 
91
108
  📥 Step 3: Adding marketplace...
92
- Using local development version: /Users/antonabyzov/Projects/github/specweave
93
- Local marketplace added
109
+ Pulling latest from GitHub: anton-abyzov/specweave
110
+ Cloning via SSH: git@github.com:anton-abyzov/specweave.git
111
+ ✓ GitHub marketplace added
94
112
 
95
113
  📋 Step 4: Reading plugin list...
96
- ✓ Found 19 plugins
114
+ ✓ Found 27 plugins
97
115
 
98
116
  ⚙️ Step 5: Installing all plugins...
99
117
  Installing specweave...
@@ -120,14 +138,23 @@ Next steps:
120
138
  ```
121
139
 
122
140
  **When to use**:
123
- - ✅ After adding new plugins
124
- - ✅ After modifying plugin commands/agents/skills
125
- - ✅ After pulling latest from GitHub
126
- - ✅ When plugins aren't loading correctly
127
- - To test local changes before pushing
141
+ - ✅ After pushing changes to GitHub (GitHub mode - default)
142
+ - ✅ After pulling latest from GitHub (GitHub mode)
143
+ - ✅ When plugins aren't loading correctly (GitHub mode)
144
+ - ✅ After adding new plugins (commit push → refresh with GitHub mode)
145
+ - ⚠️ To test uncommitted local changes (local mode - use sparingly!)
128
146
 
129
147
  **Time**: ~30 seconds (vs 5-10 minutes manual)
130
148
 
149
+ **Verification after refresh**:
150
+ ```bash
151
+ # Check marketplace source (should be "github")
152
+ cat ~/.claude/plugins/known_marketplaces.json | jq -r '.specweave.source'
153
+
154
+ # Should output: {"source": "github", "repo": "anton-abyzov/specweave"}
155
+ # NOT: {"source": "directory", "path": "/Users/..."}
156
+ ```
157
+
131
158
  **Requirements**: `jq` installed (`brew install jq`)
132
159
 
133
160
  ---
@@ -204,15 +231,34 @@ Note: Published via direct push (bypassed GitHub Actions)
204
231
 
205
232
  ### 2. Increment Folder Structure
206
233
 
207
- **ONLY 4 files in `.specweave/increments/####/` root**: `spec.md`, `plan.md`, `tasks.md`, `metadata.json`
234
+ **CRITICAL RULES**:
235
+
236
+ **At `.specweave/increments/` root - ONLY 3 things allowed**:
237
+ 1. Numbered increment folders: `####-increment-name/` (e.g., `0053-safe-feature-deletion/`)
238
+ 2. Archive folder: `_archive/`
239
+ 3. README.md (optional documentation)
240
+
241
+ **❌ NOT ALLOWED at root**: `_working/`, `reports/`, `logs/`, `scripts/`, or ANY other folders/files
242
+
243
+ **Inside each increment folder - ONLY 4 files at root**: `spec.md`, `plan.md`, `tasks.md`, `metadata.json`
208
244
 
209
245
  **Everything else → subfolders**: `reports/`, `scripts/`, `logs/`
210
246
 
211
247
  ```bash
248
+ # ❌ WRONG: .specweave/increments/_working/fix/
249
+ # ❌ WRONG: .specweave/increments/reports/
212
250
  # ❌ WRONG: .specweave/increments/0046/analysis-report.md
213
251
  # ✅ CORRECT: .specweave/increments/0046/reports/analysis-report.md
214
252
  ```
215
253
 
254
+ **Validation**:
255
+ ```bash
256
+ # Check for violations at root (should output NOTHING)
257
+ ls -1 .specweave/increments/ | grep -v "^[0-9]" | grep -v "^_archive" | grep -v "^README.md"
258
+ ```
259
+
260
+ **See**: `.specweave/docs/internal/governance/increment-folder-structure.md` (complete standard)
261
+
216
262
  ---
217
263
 
218
264
  ### 3. Protected Directories
@@ -351,6 +397,109 @@ Edit("spec.md", "...", "...\n\n## Acceptance Criteria\n\n...")
351
397
 
352
398
  ---
353
399
 
400
+ ### 7b. AC Sync Parser - Task Status Format (CRITICAL - v0.25.2+) 🔥
401
+
402
+ **CRITICAL BUG FIXED 2025-11-24**: AC sync hook was only detecting list format checkboxes, missing field format entirely!
403
+
404
+ **The Bug**: Parser in `ac-status-manager.ts` only looked for `- [x]` list items, completely missing `**Status**: [x] completed` field format introduced in v0.23.0. This caused ALL 70 ACs in increment 0053 to show false "0% tasks complete" even though tasks.md showed 37/37 completed!
405
+
406
+ **Impact**:
407
+ - ❌ Data integrity violation (metadata.json polluted with false conflicts)
408
+ - ❌ Violated Source of Truth principle (tasks.md said "done", hook said "0%")
409
+ - ❌ Potential for closing increments with incomplete work (hook gave false positives)
410
+
411
+ **Root Cause** (before fix):
412
+ ```typescript
413
+ // ac-status-manager.ts:137 (BROKEN - only detected list format!)
414
+ if (currentTaskId && line.includes('- [')) { // ❌ MISSED FIELD FORMAT!
415
+ if (line.includes('- [ ]')) {
416
+ hasUncheckedBoxes = true;
417
+ } else if (line.includes('- [x]')) {
418
+ hasCheckedBoxes = true;
419
+ }
420
+ }
421
+ ```
422
+
423
+ **The Fix** (v0.25.2):
424
+ ```typescript
425
+ // Now supports BOTH formats!
426
+ if (currentTaskId) {
427
+ // 1. List format: - [x] or - [ ]
428
+ if (line.includes('- [')) {
429
+ if (line.includes('- [ ]')) {
430
+ hasUncheckedBoxes = true;
431
+ } else if (line.includes('- [x]')) {
432
+ hasCheckedBoxes = true;
433
+ }
434
+ }
435
+ // 2. Field format: **Status**: [x] completed (NEW!)
436
+ else if (line.match(/\*\*Status\*\*:\s*\[x\]/i)) {
437
+ hasCheckedBoxes = true;
438
+ }
439
+ // 3. Field format: **Status**: [ ] pending (NEW!)
440
+ else if (line.match(/\*\*Status\*\*:\s*\[\s\]/i)) {
441
+ hasUncheckedBoxes = true;
442
+ }
443
+ }
444
+ ```
445
+
446
+ **Supported Task Formats** (both work now):
447
+
448
+ **Format 1: List items** (legacy, still supported):
449
+ ```markdown
450
+ ### T-001: Task Title
451
+ **Satisfies ACs**: AC-US1-01
452
+ - [x] Completed
453
+ - [x] Done
454
+ ```
455
+
456
+ **Format 2: Field format** (v0.23.0+, NOW WORKS!):
457
+ ```markdown
458
+ ### T-001: Task Title
459
+ **User Story**: US-001
460
+ **Satisfies ACs**: AC-US1-01
461
+ **Priority**: P1
462
+ **Status**: [x] completed ← THIS NOW WORKS!
463
+ ```
464
+
465
+ **Validation** (ensure fix is present):
466
+ ```bash
467
+ # Check parser supports field format
468
+ grep -A 5 "Check for field format" src/core/increment/ac-status-manager.ts
469
+
470
+ # Should see: line.match(/\*\*Status\*\*:\s*\[x\]/i)
471
+ ```
472
+
473
+ **Regression Tests** (5 new tests added):
474
+ ```bash
475
+ npm test -- ac-status-manager.test.ts -t "Task status field format"
476
+
477
+ # Tests:
478
+ # 1. Field format detection (completed)
479
+ # 2. Field format detection (incomplete)
480
+ # 3. Mixed format support (field + list)
481
+ # 4. Case-insensitive matching
482
+ # 5. Real-world increment 0053 format
483
+ ```
484
+
485
+ **Incident** (2025-11-24, Increment 0053):
486
+ - All 70 ACs showed "AC-USXX-YY: [x] but only 0/1 tasks complete (0%)"
487
+ - tasks.md clearly showed 37/37 tasks with `**Status**: [x] completed`
488
+ - Hook logged 280 conflict messages (4 acSyncEvents × 70 conflicts each)
489
+ - Fix: Updated parser → rebuilt → verified 0 conflicts
490
+
491
+ **Prevention**:
492
+ - ✅ 5 comprehensive regression tests (tests/unit/ac-status-manager.test.ts:855-1051)
493
+ - ✅ Tests include real-world increment 0053 format
494
+ - ✅ CI/CD runs all 43 AC status manager tests on every commit
495
+ - ✅ Emergency recovery guide: `.specweave/docs/internal/emergency-procedures/AC-SYNC-CONFLICT-FIX-2025-11-24.md`
496
+
497
+ **CRITICAL**: When introducing new task formats, ALWAYS update ALL parsers and add regression tests!
498
+
499
+ **See**: Emergency fix report (AC-SYNC-CONFLICT-FIX-2025-11-24.md), increment 0053 metadata.json (acSyncEvents)
500
+
501
+ ---
502
+
354
503
  ### 8. Logger Abstraction (NEVER `console.*`)
355
504
 
356
505
  **Rule**: ALL `src/` code uses logger injection, NEVER `console.log/error/warn`
@@ -711,8 +860,10 @@ await provider.createRepository({ owner, name, description, visibility }, token)
711
860
 
712
861
  **Platform Support**:
713
862
  - ✅ GitHub (fully supported): `github-provider.ts`
714
- - GitLab (stub): `gitlab-provider.ts` (throws "coming soon" error)
715
- - Bitbucket (stub): `bitbucket-provider.ts` (throws "coming soon" error)
863
+ - GitLab (fully supported): `gitlab-provider.ts`
864
+ - Bitbucket (fully supported): `bitbucket-provider.ts`
865
+ - ✅ Azure DevOps (fully supported): `azure-devops-provider.ts`
866
+ - ✅ Local Git (fully supported): `local-provider.ts`
716
867
 
717
868
  **Adding new platform**:
718
869
  1. Create `src/core/repo-structure/providers/{platform}-provider.ts`
@@ -776,9 +927,12 @@ plugins/ # Skills, agents, commands, hooks
776
927
  **Critical incidents**:
777
928
  - 2025-11-22 - Multiple Claude Code crashes due to hook overhead
778
929
  - 2025-11-23 - Hook process storm (6 hooks per Edit/Write → 300 processes/min)
779
- - 2025-11-24 - PROJECT_ROOT order bug (recursion guard at wrong path → crashes)
930
+ - 2025-11-24 (AM) - PROJECT_ROOT order bug (recursion guard at wrong path → crashes)
931
+ - **2025-11-24 (PM) - TodoWrite crash: US sync triggers unguarded external tool cascade → infinite recursion** ⚠️
780
932
 
781
- **Root cause**: Process exhaustion from spawning 6 bash processes per Edit/Write operation
933
+ **Root cause**:
934
+ - **Original**: Process exhaustion from spawning 6 bash processes per Edit/Write operation
935
+ - **NEW (v0.25.1)**: US completion orchestrator triggers `livingDocsSync.syncIncrement()` which calls `syncToExternalTools()` without checking `SKIP_GITHUB_SYNC` → Edit/Write operations → new hook chains → infinite recursion → crash
782
936
 
783
937
  **LONG-TERM FIX (v0.25.0)**: Hook Consolidation
784
938
  - **Reduced from 6 → 4 hooks per Edit/Write** (33% reduction)
@@ -981,6 +1135,93 @@ echo "RECURSION_GUARD_FILE: line $guard_line"
981
1135
 
982
1136
  ---
983
1137
 
1138
+ ### TodoWrite Crash (v0.25.1 - EMERGENCY FIX) ⚠️
1139
+
1140
+ **CRITICAL BUG**: Marking tasks complete via TodoWrite crashes Claude Code due to unguarded external tool sync cascade.
1141
+
1142
+ **Incident** (2025-11-24 PM): User reported Claude Code crash when marking tasks complete in increment 0053-safe-feature-deletion.
1143
+
1144
+ **Root Cause**:
1145
+ 1. US completion orchestrator (`us-completion-orchestrator.js`) detects all 6 USs as "newly complete" (perfect storm when last task marked)
1146
+ 2. Calls `livingDocsSync.syncIncrement()` without checking `SKIP_US_SYNC` flag
1147
+ 3. Living docs sync calls `syncToExternalTools()` without checking `SKIP_GITHUB_SYNC` flag
1148
+ 4. External tool sync creates/updates GitHub issues (Edit/Write operations)
1149
+ 5. Edit/Write hooks trigger NEW hook chains (recursion guard doesn't protect Edit/Write events)
1150
+ 6. **Infinite recursion** → Process exhaustion → Claude Code crash
1151
+
1152
+ **Crash Flow**:
1153
+ ```
1154
+ TodoWrite → post-task-completion.sh
1155
+ → consolidated-sync.js (operation 5/6)
1156
+ → us-completion-orchestrator.js
1157
+ → livingDocsSync.syncIncrement()
1158
+ → syncToExternalTools() ← NO GUARD!
1159
+ → syncToGitHub()
1160
+ → Edit/Write operations
1161
+ → NEW HOOK CHAIN
1162
+ → INFINITE RECURSION
1163
+ → 💥 CRASH
1164
+ ```
1165
+
1166
+ **Emergency Hotfix** (v0.25.1 - ✅ DEPLOYED):
1167
+ ```bash
1168
+ # File: plugins/specweave/hooks/post-task-completion.sh (line 463)
1169
+ export SKIP_US_SYNC=true
1170
+ ```
1171
+
1172
+ **Impact**:
1173
+ - ✅ **NO MORE CRASHES**: TodoWrite is now safe
1174
+ - ⚠️ **Manual sync required**: Must run `/specweave:sync-progress` after completing tasks
1175
+ - ✅ **Living docs still work**: AC sync, tasks.md updates, status line all function
1176
+
1177
+ **Verification**:
1178
+ ```bash
1179
+ # 1. Check hotfix applied
1180
+ grep "SKIP_US_SYNC=true" plugins/specweave/hooks/post-task-completion.sh
1181
+
1182
+ # 2. Test task completion
1183
+ TodoWrite([{ content: "T-001", status: "completed" }])
1184
+
1185
+ # 3. Verify no crash
1186
+ tail -50 .specweave/logs/hooks-debug.log | grep "SKIP_US_SYNC"
1187
+ # Expected: ℹ️ User story sync skipped (SKIP_US_SYNC=true)
1188
+
1189
+ # 4. Manual sync when ready
1190
+ /specweave:sync-progress 0053
1191
+ ```
1192
+
1193
+ **Long-Term Fix** (v0.26.0 - PLANNED):
1194
+ - **Tier 1**: Add `SKIP_EXTERNAL_SYNC` check in `LivingDocsSync.syncIncrement()`
1195
+ - **Tier 2**: Universal recursion guard (ALL hooks check same guard file)
1196
+ - **Tier 3**: Smart throttling (60-second window for US sync)
1197
+ - **Result**: Restore automatic US sync (now safe with guard rails!)
1198
+
1199
+ **Recovery** (If crash occurs):
1200
+ ```bash
1201
+ # 1. Kill stuck processes
1202
+ ps aux | grep -E "consolidated-sync|us-completion" | awk '{print $2}' | xargs kill -9
1203
+
1204
+ # 2. Disable hooks
1205
+ export SPECWEAVE_DISABLE_HOOKS=1
1206
+
1207
+ # 3. Clean locks
1208
+ rm -rf .specweave/state/.hook-*.lock
1209
+ rm -f .specweave/state/.hook-recursion-guard
1210
+
1211
+ # 4. Apply hotfix (see above)
1212
+
1213
+ # 5. Re-enable hooks
1214
+ unset SPECWEAVE_DISABLE_HOOKS
1215
+ ```
1216
+
1217
+ **See**:
1218
+ - `.specweave/increments/0053-safe-feature-deletion/reports/EXECUTIVE-SUMMARY-CRASH-FIX-2025-11-24.md` (Executive summary)
1219
+ - `.specweave/increments/0053-safe-feature-deletion/reports/ROOT-CAUSE-ANALYSIS-TODOWRITE-CRASH-2025-11-24.md` (Detailed analysis)
1220
+ - `.specweave/docs/internal/emergency-procedures/TODOWRITE-CRASH-RECOVERY.md` (Recovery guide)
1221
+ - `.specweave/docs/internal/architecture/adr/0129-us-sync-guard-rails.md` (ADR-0129)
1222
+
1223
+ ---
1224
+
984
1225
  ## Development Workflow
985
1226
 
986
1227
  **Core commands**:
@@ -988,10 +1229,19 @@ echo "RECURSION_GUARD_FILE: line $guard_line"
988
1229
  /specweave:increment "feature" # Plan
989
1230
  /specweave:do # Execute
990
1231
  /specweave:progress # Status
1232
+ /specweave:sync-progress # Comprehensive sync (tasks → docs → external tools)
991
1233
  /specweave:done 0002 # Close (validates)
992
1234
  /specweave:validate 0001 # Validate
993
1235
  /specweave:qa 0001 # Quality check
994
1236
  /specweave:pause/resume/abandon # State management
1237
+
1238
+ # Feature deletion
1239
+ specweave delete-feature FS-042 --dry-run # Preview deletion
1240
+ specweave delete-feature FS-042 # Safe deletion (requires confirmation)
1241
+ specweave delete-feature FS-042 --force # Force delete (orphans active increments)
1242
+ specweave delete-feature FS-042 --no-git # Skip git operations
1243
+ specweave delete-feature FS-042 --no-github # Skip GitHub issue cleanup
1244
+ specweave delete-feature FS-042 --yes # Skip confirmations (except elevated)
995
1245
  ```
996
1246
 
997
1247
  **Local setup**:
@@ -1131,6 +1381,324 @@ await configManager.update({ issueTracker: { provider: 'jira', domain: 'example.
1131
1381
 
1132
1382
  ---
1133
1383
 
1384
+ ## Comprehensive Progress Sync (v0.25.0+)
1385
+
1386
+ **Command**: `/specweave:sync-progress`
1387
+
1388
+ **Purpose**: Single-button multi-system synchronization. Orchestrates complete flow from task completion → living docs → external tools (GitHub/JIRA/ADO).
1389
+
1390
+ ### What It Does
1391
+
1392
+ **Comprehensive Sync Flow**:
1393
+ ```
1394
+ tasks.md (source of truth)
1395
+
1396
+ spec.md ACs (marked complete)
1397
+
1398
+ Living docs (user stories updated)
1399
+
1400
+ External tools (GitHub/JIRA/ADO synced)
1401
+
1402
+ Status line cache (updated display)
1403
+ ```
1404
+
1405
+ **One command replaces 4 manual steps**:
1406
+ ```bash
1407
+ # OLD: Manual multi-step sync (error-prone)
1408
+ /specweave:sync-acs 0053
1409
+ /specweave:sync-specs 0053
1410
+ /specweave-github:sync 0053
1411
+ /specweave:update-status
1412
+
1413
+ # NEW: Single comprehensive sync ✅
1414
+ /specweave:sync-progress 0053
1415
+ ```
1416
+
1417
+ ### Usage
1418
+
1419
+ ```bash
1420
+ # Auto-detect active increment
1421
+ /specweave:sync-progress
1422
+
1423
+ # Explicit increment ID
1424
+ /specweave:sync-progress 0053
1425
+
1426
+ # Dry-run mode (preview without executing)
1427
+ /specweave:sync-progress 0053 --dry-run
1428
+
1429
+ # Skip external tools (local-only sync)
1430
+ /specweave:sync-progress 0053 --no-github --no-jira --no-ado
1431
+ ```
1432
+
1433
+ ### When to Use
1434
+
1435
+ **✅ Use /specweave:sync-progress when**:
1436
+ 1. After completing tasks in tasks.md
1437
+ 2. Before closing increment (`/specweave:done`)
1438
+ 3. Want to update status line with latest progress
1439
+ 4. Need to sync to external tools (GitHub/JIRA/ADO)
1440
+ 5. After bulk task completion
1441
+
1442
+ **❌ Don't use when**:
1443
+ 1. Only need to sync ACs → Use `/specweave:sync-acs`
1444
+ 2. Only need to sync docs → Use `/specweave:sync-specs`
1445
+ 3. Only need to sync GitHub → Use `/specweave-github:sync`
1446
+
1447
+ ### Multi-Phase Orchestration
1448
+
1449
+ **Phase 1: Tasks → ACs (spec.md)**
1450
+ - Reads completed tasks from tasks.md
1451
+ - Finds linked ACs via `**Satisfies ACs**` field
1452
+ - Marks ACs as complete: `[ ]` → `[x]`
1453
+ - Updates metadata.json with AC count
1454
+
1455
+ **Phase 2: Spec → Living Docs**
1456
+ - Syncs spec.md to living docs structure
1457
+ - Updates user story completion status
1458
+ - Generates/updates feature ID if needed
1459
+
1460
+ **Phase 3: Living Docs → External Tools**
1461
+ - **GitHub**: Closes completed user story issues, updates epic checklist
1462
+ - **JIRA**: Updates story status, transitions workflow
1463
+ - **Azure DevOps**: Updates work item state, adds comments
1464
+
1465
+ **Phase 4: Status Line Cache**
1466
+ - Updates status line with latest completion %
1467
+
1468
+ ### Flags
1469
+
1470
+ | Flag | Purpose | Example |
1471
+ |------|---------|---------|
1472
+ | `--dry-run` | Preview without executing | `--dry-run` |
1473
+ | `--no-github` | Skip GitHub sync | `--no-github` |
1474
+ | `--no-jira` | Skip JIRA sync | `--no-jira` |
1475
+ | `--no-ado` | Skip Azure DevOps sync | `--no-ado` |
1476
+ | `--force` | Force sync even if validation fails | `--force` |
1477
+
1478
+ ### Error Handling
1479
+
1480
+ **Graceful Degradation**:
1481
+ - **Critical errors** (AC sync, docs sync): Abort entire sync
1482
+ - **Non-critical errors** (GitHub, JIRA, ADO): Log warning, continue
1483
+
1484
+ **Philosophy**: Core sync (tasks → docs) must succeed. External tool sync is best-effort.
1485
+
1486
+ ### Example Workflow
1487
+
1488
+ **Typical increment workflow with progress sync**:
1489
+
1490
+ ```bash
1491
+ # 1. Plan increment
1492
+ /specweave:increment "Safe feature deletion"
1493
+
1494
+ # 2. Execute tasks
1495
+ /specweave:do
1496
+
1497
+ # [Complete 5 tasks...]
1498
+
1499
+ # 3. Sync progress after batch
1500
+ /specweave:sync-progress
1501
+
1502
+ # [Complete remaining 32 tasks...]
1503
+
1504
+ # 4. Final sync before closure
1505
+ /specweave:sync-progress 0053
1506
+
1507
+ # 5. Validate quality
1508
+ /specweave:validate 0053 --quality
1509
+
1510
+ # 6. Close increment
1511
+ /specweave:done 0053
1512
+ ```
1513
+
1514
+ ### External Tool Auto-Detection
1515
+
1516
+ **Automatic detection** from `.specweave/config.json`:
1517
+ - GitHub: `"provider": "github"`
1518
+ - JIRA: `"provider": "jira"`
1519
+ - Azure DevOps: `"provider": "azure-devops"`
1520
+
1521
+ **Only configured tools are synced**:
1522
+ ```
1523
+ ✅ GitHub integration detected → Will sync
1524
+ ℹ️ No JIRA integration → Skip
1525
+ ℹ️ No ADO integration → Skip
1526
+ ```
1527
+
1528
+ ### Troubleshooting
1529
+
1530
+ **"No active increment found"**:
1531
+ ```bash
1532
+ # Provide increment ID explicitly
1533
+ /specweave:sync-progress 0053
1534
+ ```
1535
+
1536
+ **"AC sync had warnings: 5 ACs not found"**:
1537
+ ```bash
1538
+ # Embed ACs from living docs into spec.md
1539
+ /specweave:embed-acs 0053
1540
+
1541
+ # Then retry sync
1542
+ /specweave:sync-progress 0053
1543
+ ```
1544
+
1545
+ **"GitHub rate limit exceeded"** (non-critical):
1546
+ - Docs are synced successfully
1547
+ - Retry GitHub sync later when rate limit resets:
1548
+ ```bash
1549
+ /specweave-github:sync 0053
1550
+ ```
1551
+
1552
+ **See**:
1553
+ - Skill: `progress-sync` (comprehensive guide)
1554
+ - Increment 0053 (added in this increment)
1555
+
1556
+ ---
1557
+
1558
+ ## Safe Feature Deletion (v0.25.0+)
1559
+
1560
+ **Command**: `specweave delete-feature <feature-id>`
1561
+
1562
+ Safe deletion of features with multi-gate validation, automatic cleanup, and audit logging.
1563
+
1564
+ ### Usage
1565
+
1566
+ ```bash
1567
+ # Preview deletion (recommended first step)
1568
+ specweave delete-feature FS-042 --dry-run
1569
+
1570
+ # Safe deletion (requires confirmation)
1571
+ specweave delete-feature FS-042
1572
+
1573
+ # Force deletion (bypasses active increment validation)
1574
+ specweave delete-feature FS-042 --force
1575
+
1576
+ # Skip git operations
1577
+ specweave delete-feature FS-042 --no-git
1578
+
1579
+ # Skip GitHub issue cleanup
1580
+ specweave delete-feature FS-042 --no-github
1581
+
1582
+ # Skip confirmations (except elevated confirmation in force mode)
1583
+ specweave delete-feature FS-042 --yes
1584
+ ```
1585
+
1586
+ ### Safety Features
1587
+
1588
+ **4-Tier Validation**:
1589
+ 1. **Feature Detection**: Scans living docs and user stories
1590
+ 2. **Active Increment Check**: Blocks deletion if active increments reference feature (safe mode)
1591
+ 3. **Git Status Check**: Ensures clean working directory
1592
+ 4. **GitHub Issue Scan**: Finds related issues for cleanup
1593
+
1594
+ **3-Phase Commit Pattern**:
1595
+ 1. **Validation Phase**: All safety checks
1596
+ 2. **Staging Phase**: Reversible (file backup, git staging)
1597
+ 3. **Commit Phase**: Irreversible (git commit, GitHub cleanup, audit log)
1598
+
1599
+ **Multi-Gate Confirmation**:
1600
+ - Primary Confirmation: y/N prompt for all deletions
1601
+ - Elevated Confirmation: Type "delete" for force mode (orphans active increments)
1602
+ - GitHub Confirmation: Separate prompt for closing GitHub issues
1603
+
1604
+ ### What Gets Deleted
1605
+
1606
+ ✅ Living docs: `.specweave/docs/internal/specs/_features/FS-XXX/FEATURE.md`
1607
+ ✅ User stories: `.specweave/docs/internal/specs/{project}/FS-XXX/us-*.md`
1608
+ ✅ README files: `.specweave/docs/internal/specs/{project}/FS-XXX/README.md`
1609
+ ✅ GitHub issues: Issues matching `[FS-XXX][US-YYY]` pattern (optional)
1610
+
1611
+ ❌ NOT deleted: Increments (only metadata.json updated if orphaned)
1612
+
1613
+ ### Modes
1614
+
1615
+ **Safe Mode (default)**:
1616
+ - Blocks deletion if active increments reference feature
1617
+ - Requires clean git working directory
1618
+ - Requires explicit confirmation
1619
+
1620
+ **Force Mode (`--force`)**:
1621
+ - Allows deletion with active increments
1622
+ - Updates orphaned increment metadata.json (removes feature_id)
1623
+ - Requires elevated confirmation (type "delete")
1624
+
1625
+ **Dry-Run Mode (`--dry-run`)**:
1626
+ - Preview deletion without executing
1627
+ - Shows all files to be deleted
1628
+ - Shows git operations
1629
+ - Shows GitHub issues to be closed
1630
+
1631
+ ### Audit Logging
1632
+
1633
+ All deletions logged to `.specweave/logs/feature-deletions.log` (JSON Lines format):
1634
+
1635
+ ```json
1636
+ {
1637
+ "featureId": "FS-042",
1638
+ "timestamp": "2025-11-24T01:45:00.000Z",
1639
+ "user": "john-doe",
1640
+ "mode": "safe",
1641
+ "filesDeleted": 6,
1642
+ "commitSha": "abc123def",
1643
+ "githubIssuesClosed": 3,
1644
+ "orphanedIncrements": [],
1645
+ "status": "success"
1646
+ }
1647
+ ```
1648
+
1649
+ **Log rotation**: Automatically rotates at 10MB threshold.
1650
+
1651
+ ### Error Handling
1652
+
1653
+ **Non-blocking errors** (logged as warnings):
1654
+ - GitHub API rate limits (exponential backoff retry)
1655
+ - GitHub issue cleanup failures
1656
+ - Audit log write failures
1657
+
1658
+ **Blocking errors** (prevent deletion):
1659
+ - Feature not found
1660
+ - Active increments in safe mode
1661
+ - Git working directory not clean (without `--no-git`)
1662
+ - Invalid feature ID format (must be FS-XXX)
1663
+
1664
+ ### Examples
1665
+
1666
+ ```bash
1667
+ # Recommended workflow
1668
+ specweave delete-feature FS-042 --dry-run # Preview
1669
+ specweave delete-feature FS-042 # Execute (with confirmation)
1670
+
1671
+ # Force delete feature with active increment 0050
1672
+ specweave delete-feature FS-042 --force # Requires typing "delete"
1673
+
1674
+ # Delete without git commit (manual git workflow)
1675
+ specweave delete-feature FS-042 --no-git
1676
+
1677
+ # Delete with auto-yes (CI/CD pipelines)
1678
+ specweave delete-feature FS-042 --yes --dry-run # Still shows preview
1679
+ ```
1680
+
1681
+ ### Important Notes
1682
+
1683
+ **GitHub Integration**:
1684
+ - Owner/repo auto-detected from `git remote get-url origin`
1685
+ - If no GitHub remote → GitHub cleanup silently skipped (non-blocking)
1686
+ - Pattern detection: `https://github.com/owner/repo.git` or `git@github.com:owner/repo.git`
1687
+
1688
+ **No Undo**:
1689
+ - Deletion is permanent (files deleted from filesystem)
1690
+ - Recovery: `git log --all --full-history -- path/to/deleted/file` → `git checkout <commit> -- path`
1691
+ - Audit log: `.specweave/logs/feature-deletions.log` (includes commit SHA)
1692
+
1693
+ **Force Mode Risk**:
1694
+ - Orphaned increments lose `feature_id` in metadata.json
1695
+ - Breaking change: `/specweave:sync-specs` won't sync orphaned increments
1696
+ - Recovery: Manually restore `feature_id` in metadata.json
1697
+
1698
+ **See**: Increment 0053-safe-feature-deletion for implementation details.
1699
+
1700
+ ---
1701
+
1134
1702
  ## Quick Reference
1135
1703
 
1136
1704
  **Commands**: `/specweave:increment`, `/specweave:do`, `/specweave:done`, `/specweave:progress`, `/specweave:validate`, `/specweave:qa`