specweave 0.22.13 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/.claude-plugin/README.md +2 -2
  2. package/CLAUDE.md +447 -52
  3. package/README.md +33 -10
  4. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +1 -1
  5. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  6. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
  7. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  9. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +4 -1
  10. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  11. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +1 -1
  12. package/dist/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  13. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +9 -0
  14. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -1
  15. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +10 -1
  16. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
  17. package/dist/plugins/specweave-github/lib/progress-comment-builder.js +2 -2
  18. package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -1
  19. package/dist/plugins/specweave-github/lib/types.d.ts +1 -1
  20. package/dist/src/cli/commands/import-external.d.ts +22 -0
  21. package/dist/src/cli/commands/import-external.d.ts.map +1 -0
  22. package/dist/src/cli/commands/import-external.js +282 -0
  23. package/dist/src/cli/commands/import-external.js.map +1 -0
  24. package/dist/src/cli/commands/init.d.ts.map +1 -1
  25. package/dist/src/cli/commands/init.js +359 -1
  26. package/dist/src/cli/commands/init.js.map +1 -1
  27. package/dist/src/cli/helpers/github-repo-selector.d.ts +59 -0
  28. package/dist/src/cli/helpers/github-repo-selector.d.ts.map +1 -0
  29. package/dist/src/cli/helpers/github-repo-selector.js +265 -0
  30. package/dist/src/cli/helpers/github-repo-selector.js.map +1 -0
  31. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  32. package/dist/src/cli/helpers/issue-tracker/index.js +41 -24
  33. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  34. package/dist/src/config/import-config.d.ts +69 -0
  35. package/dist/src/config/import-config.d.ts.map +1 -0
  36. package/dist/src/config/import-config.js +136 -0
  37. package/dist/src/config/import-config.js.map +1 -0
  38. package/dist/src/config/types.d.ts +26 -26
  39. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -1
  40. package/dist/src/core/increment/ac-status-manager.js +4 -2
  41. package/dist/src/core/increment/ac-status-manager.js.map +1 -1
  42. package/dist/src/core/increment/completion-validator.d.ts +30 -1
  43. package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
  44. package/dist/src/core/increment/completion-validator.js +151 -3
  45. package/dist/src/core/increment/completion-validator.js.map +1 -1
  46. package/dist/src/core/increment/increment-archiver.d.ts +25 -0
  47. package/dist/src/core/increment/increment-archiver.d.ts.map +1 -1
  48. package/dist/src/core/increment/increment-archiver.js +130 -3
  49. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  50. package/dist/src/core/living-docs/feature-archiver.d.ts +37 -0
  51. package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -1
  52. package/dist/src/core/living-docs/feature-archiver.js +262 -18
  53. package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
  54. package/dist/src/core/living-docs/feature-id-manager.d.ts +17 -0
  55. package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -1
  56. package/dist/src/core/living-docs/feature-id-manager.js +25 -0
  57. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
  58. package/dist/src/core/living-docs/living-docs-sync.d.ts +16 -0
  59. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  60. package/dist/src/core/living-docs/living-docs-sync.js +56 -1
  61. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  62. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +2 -2
  63. package/dist/src/core/living-docs/task-project-specific-generator.js +2 -2
  64. package/dist/src/core/repo-structure/prompt-consolidator.d.ts +2 -2
  65. package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
  66. package/dist/src/core/repo-structure/prompt-consolidator.js +3 -15
  67. package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
  68. package/dist/src/core/repo-structure/repo-structure-manager.d.ts +1 -1
  69. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  70. package/dist/src/core/repo-structure/repo-structure-manager.js +3 -6
  71. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  72. package/dist/src/core/spec-content-sync.d.ts +4 -1
  73. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  74. package/dist/src/core/spec-content-sync.js +139 -4
  75. package/dist/src/core/spec-content-sync.js.map +1 -1
  76. package/dist/src/core/spec-task-mapper.d.ts.map +1 -1
  77. package/dist/src/core/spec-task-mapper.js +9 -8
  78. package/dist/src/core/spec-task-mapper.js.map +1 -1
  79. package/dist/src/core/status-line-validator.d.ts +63 -0
  80. package/dist/src/core/status-line-validator.d.ts.map +1 -0
  81. package/dist/src/core/status-line-validator.js +253 -0
  82. package/dist/src/core/status-line-validator.js.map +1 -0
  83. package/dist/src/core/sync/bidirectional-engine.d.ts +10 -1
  84. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
  85. package/dist/src/core/sync/bidirectional-engine.js +10 -1
  86. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  87. package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
  88. package/dist/src/core/sync/profile-manager.js +3 -0
  89. package/dist/src/core/sync/profile-manager.js.map +1 -1
  90. package/dist/src/core/sync/project-context.d.ts.map +1 -1
  91. package/dist/src/core/sync/project-context.js +3 -0
  92. package/dist/src/core/sync/project-context.js.map +1 -1
  93. package/dist/src/core/sync/status-sync-engine.d.ts +1 -1
  94. package/dist/src/core/sync/status-sync-engine.js +1 -1
  95. package/dist/src/core/sync/sync-event-logger.d.ts +15 -1
  96. package/dist/src/core/sync/sync-event-logger.d.ts.map +1 -1
  97. package/dist/src/core/sync/sync-event-logger.js +39 -1
  98. package/dist/src/core/sync/sync-event-logger.js.map +1 -1
  99. package/dist/src/core/types/origin-metadata.d.ts +153 -0
  100. package/dist/src/core/types/origin-metadata.d.ts.map +1 -0
  101. package/dist/src/core/types/origin-metadata.js +166 -0
  102. package/dist/src/core/types/origin-metadata.js.map +1 -0
  103. package/dist/src/core/types/sync-config-validator.d.ts +57 -0
  104. package/dist/src/core/types/sync-config-validator.d.ts.map +1 -0
  105. package/dist/src/core/types/sync-config-validator.js +116 -0
  106. package/dist/src/core/types/sync-config-validator.js.map +1 -0
  107. package/dist/src/core/types/sync-profile.d.ts +8 -2
  108. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  109. package/dist/src/core/types/sync-profile.js.map +1 -1
  110. package/dist/src/core/types/sync-settings.d.ts +73 -0
  111. package/dist/src/core/types/sync-settings.d.ts.map +1 -0
  112. package/dist/src/core/types/sync-settings.js +90 -0
  113. package/dist/src/core/types/sync-settings.js.map +1 -0
  114. package/dist/src/core/utils/permission-checker.d.ts +100 -0
  115. package/dist/src/core/utils/permission-checker.d.ts.map +1 -0
  116. package/dist/src/core/utils/permission-checker.js +166 -0
  117. package/dist/src/core/utils/permission-checker.js.map +1 -0
  118. package/dist/src/generators/spec/spec-parser.js +3 -3
  119. package/dist/src/generators/spec/spec-parser.js.map +1 -1
  120. package/dist/src/generators/spec/task-parser.js +4 -4
  121. package/dist/src/generators/spec/task-parser.js.map +1 -1
  122. package/dist/src/id-generators/task-id-generator.d.ts +96 -0
  123. package/dist/src/id-generators/task-id-generator.d.ts.map +1 -0
  124. package/dist/src/id-generators/task-id-generator.js +143 -0
  125. package/dist/src/id-generators/task-id-generator.js.map +1 -0
  126. package/dist/src/id-generators/us-id-generator.d.ts +96 -0
  127. package/dist/src/id-generators/us-id-generator.d.ts.map +1 -0
  128. package/dist/src/id-generators/us-id-generator.js +143 -0
  129. package/dist/src/id-generators/us-id-generator.js.map +1 -0
  130. package/dist/src/importers/ado-importer.d.ts +43 -0
  131. package/dist/src/importers/ado-importer.d.ts.map +1 -0
  132. package/dist/src/importers/ado-importer.js +234 -0
  133. package/dist/src/importers/ado-importer.js.map +1 -0
  134. package/dist/src/importers/duplicate-detector.d.ts +107 -0
  135. package/dist/src/importers/duplicate-detector.d.ts.map +1 -0
  136. package/dist/src/importers/duplicate-detector.js +189 -0
  137. package/dist/src/importers/duplicate-detector.js.map +1 -0
  138. package/dist/src/importers/external-importer.d.ts +96 -0
  139. package/dist/src/importers/external-importer.d.ts.map +1 -0
  140. package/dist/src/importers/external-importer.js +13 -0
  141. package/dist/src/importers/external-importer.js.map +1 -0
  142. package/dist/src/importers/github-importer.d.ts +37 -0
  143. package/dist/src/importers/github-importer.d.ts.map +1 -0
  144. package/dist/src/importers/github-importer.js +161 -0
  145. package/dist/src/importers/github-importer.js.map +1 -0
  146. package/dist/src/importers/import-coordinator.d.ts +105 -0
  147. package/dist/src/importers/import-coordinator.d.ts.map +1 -0
  148. package/dist/src/importers/import-coordinator.js +224 -0
  149. package/dist/src/importers/import-coordinator.js.map +1 -0
  150. package/dist/src/importers/item-converter.d.ts +96 -0
  151. package/dist/src/importers/item-converter.d.ts.map +1 -0
  152. package/dist/src/importers/item-converter.js +246 -0
  153. package/dist/src/importers/item-converter.js.map +1 -0
  154. package/dist/src/importers/jira-importer.d.ts +42 -0
  155. package/dist/src/importers/jira-importer.d.ts.map +1 -0
  156. package/dist/src/importers/jira-importer.js +221 -0
  157. package/dist/src/importers/jira-importer.js.map +1 -0
  158. package/dist/src/importers/rate-limiter.d.ts +128 -0
  159. package/dist/src/importers/rate-limiter.d.ts.map +1 -0
  160. package/dist/src/importers/rate-limiter.js +200 -0
  161. package/dist/src/importers/rate-limiter.js.map +1 -0
  162. package/dist/src/init/compliance/types.d.ts +2 -2
  163. package/dist/src/init/repo/types.d.ts +2 -2
  164. package/dist/src/integrations/ado/ado-client.d.ts +6 -0
  165. package/dist/src/integrations/ado/ado-client.d.ts.map +1 -1
  166. package/dist/src/integrations/ado/ado-client.js +23 -0
  167. package/dist/src/integrations/ado/ado-client.js.map +1 -1
  168. package/dist/src/integrations/jira/jira-client.d.ts +6 -0
  169. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  170. package/dist/src/integrations/jira/jira-client.js +38 -0
  171. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  172. package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
  173. package/dist/src/integrations/jira/jira-mapper.js +1 -1
  174. package/dist/src/living-docs/fs-id-allocator.d.ts +149 -0
  175. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -0
  176. package/dist/src/living-docs/fs-id-allocator.js +325 -0
  177. package/dist/src/living-docs/fs-id-allocator.js.map +1 -0
  178. package/dist/src/living-docs/id-registry.d.ts +124 -0
  179. package/dist/src/living-docs/id-registry.d.ts.map +1 -0
  180. package/dist/src/living-docs/id-registry.js +230 -0
  181. package/dist/src/living-docs/id-registry.js.map +1 -0
  182. package/dist/src/progress/us-progress-tracker.d.ts +68 -0
  183. package/dist/src/progress/us-progress-tracker.d.ts.map +1 -0
  184. package/dist/src/progress/us-progress-tracker.js +120 -0
  185. package/dist/src/progress/us-progress-tracker.js.map +1 -0
  186. package/dist/src/sync/external-item-sync-service.d.ts +150 -0
  187. package/dist/src/sync/external-item-sync-service.d.ts.map +1 -0
  188. package/dist/src/sync/external-item-sync-service.js +241 -0
  189. package/dist/src/sync/external-item-sync-service.js.map +1 -0
  190. package/dist/src/sync/format-preservation-sync.d.ts +90 -0
  191. package/dist/src/sync/format-preservation-sync.d.ts.map +1 -0
  192. package/dist/src/sync/format-preservation-sync.js +173 -0
  193. package/dist/src/sync/format-preservation-sync.js.map +1 -0
  194. package/dist/src/sync/index.d.ts +8 -0
  195. package/dist/src/sync/index.d.ts.map +1 -0
  196. package/dist/src/sync/index.js +6 -0
  197. package/dist/src/sync/index.js.map +1 -0
  198. package/dist/src/sync/sync-coordinator.d.ts +49 -0
  199. package/dist/src/sync/sync-coordinator.d.ts.map +1 -0
  200. package/dist/src/sync/sync-coordinator.js +248 -0
  201. package/dist/src/sync/sync-coordinator.js.map +1 -0
  202. package/dist/src/sync/sync-metadata.d.ts +75 -0
  203. package/dist/src/sync/sync-metadata.d.ts.map +1 -0
  204. package/dist/src/sync/sync-metadata.js +100 -0
  205. package/dist/src/sync/sync-metadata.js.map +1 -0
  206. package/dist/src/types/living-docs-us-file.d.ts +63 -0
  207. package/dist/src/types/living-docs-us-file.d.ts.map +1 -0
  208. package/dist/src/types/living-docs-us-file.js +27 -0
  209. package/dist/src/types/living-docs-us-file.js.map +1 -0
  210. package/dist/src/validators/format-preservation-validator.d.ts +127 -0
  211. package/dist/src/validators/format-preservation-validator.d.ts.map +1 -0
  212. package/dist/src/validators/format-preservation-validator.js +187 -0
  213. package/dist/src/validators/format-preservation-validator.js.map +1 -0
  214. package/package.json +3 -2
  215. package/plugins/specweave/.claude-plugin/plugin.json +36 -2
  216. package/plugins/specweave/agents/architect/AGENT.md +11 -2
  217. package/plugins/specweave/agents/test-aware-planner/AGENT.md +81 -25
  218. package/plugins/specweave/commands/specweave-archive-features.md +11 -1
  219. package/plugins/specweave/commands/specweave-import-external.md +407 -0
  220. package/plugins/specweave/commands/specweave-progress.md +45 -97
  221. package/plugins/specweave/hooks/post-edit-spec.sh +41 -0
  222. package/plugins/specweave/hooks/post-increment-completion.sh +168 -26
  223. package/plugins/specweave/hooks/post-increment-planning.sh +148 -4
  224. package/plugins/specweave/hooks/post-spec-update.sh +0 -0
  225. package/plugins/specweave/hooks/post-task-completion.sh +75 -5
  226. package/plugins/specweave/hooks/post-write-spec.sh +37 -0
  227. package/plugins/specweave/lib/hooks/auto-transition.js +1 -1
  228. package/plugins/specweave/lib/hooks/auto-transition.ts +1 -1
  229. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +1 -1
  230. package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +1 -1
  231. package/plugins/specweave/lib/hooks/sync-cache.js +294 -0
  232. package/plugins/specweave/lib/hooks/sync-living-docs.js +67 -2
  233. package/plugins/specweave/lib/hooks/sync-us-tasks.js +200 -14
  234. package/plugins/specweave/lib/hooks/translate-file.js +1 -1
  235. package/plugins/specweave/lib/hooks/translate-file.ts +1 -1
  236. package/plugins/specweave/lib/hooks/update-ac-status.js +1 -1
  237. package/plugins/specweave/lib/hooks/update-ac-status.ts +1 -1
  238. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.d.ts +115 -0
  239. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js +345 -0
  240. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js.map +1 -0
  241. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.d.ts +106 -0
  242. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +220 -0
  243. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -0
  244. package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.d.ts +60 -0
  245. package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js +192 -0
  246. package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js.map +1 -0
  247. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.d.ts +52 -0
  248. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +276 -0
  249. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -0
  250. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.d.ts +163 -0
  251. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +541 -0
  252. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -0
  253. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +157 -0
  254. package/plugins/specweave/lib/vendor/core/types/increment-metadata.js +191 -0
  255. package/plugins/specweave/lib/vendor/core/types/increment-metadata.js.map +1 -0
  256. package/plugins/specweave/lib/vendor/generators/spec/task-parser.d.ts +95 -0
  257. package/plugins/specweave/lib/vendor/generators/spec/task-parser.js +301 -0
  258. package/plugins/specweave/lib/vendor/generators/spec/task-parser.js.map +1 -0
  259. package/plugins/specweave/lib/vendor/utils/logger.d.ts +48 -0
  260. package/plugins/specweave/lib/vendor/utils/logger.js +53 -0
  261. package/plugins/specweave/lib/vendor/utils/logger.js.map +1 -0
  262. package/plugins/specweave/lib/vendor/utils/translation.d.ts +187 -0
  263. package/plugins/specweave/lib/vendor/utils/translation.js +414 -0
  264. package/plugins/specweave/lib/vendor/utils/translation.js.map +1 -0
  265. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  266. package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
  267. package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
  268. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
  269. package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
  270. package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
  271. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
  272. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  273. package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
  274. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  275. package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
  276. package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
  277. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  278. package/plugins/specweave-github/commands/specweave-github-update-user-story.md +1 -1
  279. package/plugins/specweave-github/hooks/post-task-completion.sh +37 -22
  280. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
  281. package/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
  282. package/plugins/specweave-github/lib/enhanced-github-sync.ts +1 -1
  283. package/plugins/specweave-github/lib/github-spec-content-sync.js +2 -1
  284. package/plugins/specweave-github/lib/github-spec-content-sync.ts +4 -1
  285. package/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  286. package/plugins/specweave-github/lib/github-spec-sync.ts +1 -1
  287. package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  288. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +10 -1
  289. package/plugins/specweave-github/lib/progress-comment-builder.js +1 -1
  290. package/plugins/specweave-github/lib/progress-comment-builder.ts +2 -2
  291. package/plugins/specweave-github/lib/types.ts +1 -1
  292. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +1 -1
  293. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  294. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  295. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
  296. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  297. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  298. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
  299. package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
  300. package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
  301. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  302. package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
  303. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  304. package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
  305. package/plugins/specweave-tooling/.claude-plugin/plugin.json +1 -1
  306. package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
  307. package/src/templates/.env.example +5 -0
  308. package/src/templates/config-permissions-guide.md +413 -0
  309. package/src/templates/config.json.template +68 -0
  310. package/src/templates/tasks.md.template +180 -201
  311. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
  312. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -5442
@@ -101,7 +101,7 @@ SpecWeave's marketplace.json follows Claude's official schema format. Here's the
101
101
  "plugins": [
102
102
  {
103
103
  "name": "specweave-github",
104
- "description": "GitHub integration - bidirectional sync",
104
+ "description": "GitHub integration - full sync (all permissions)",
105
105
  "source": "../plugins/specweave-github",
106
106
  "category": "productivity",
107
107
  "version": "1.0.0",
@@ -173,7 +173,7 @@ SpecWeave's marketplace.json follows Claude's official schema format. Here's the
173
173
  - `status` - Show GitHub sync status
174
174
 
175
175
  **Skills**:
176
- - `github-sync` - Bidirectional sync
176
+ - `github-sync` - Full sync (all permissions)
177
177
  - `github-issue-tracker` - Task-level tracking
178
178
 
179
179
  **Agents**:
package/CLAUDE.md CHANGED
@@ -10,77 +10,114 @@ For **contributors to SpecWeave itself** (not users).
10
10
 
11
11
  ## 🚨 CRITICAL SAFETY RULES
12
12
 
13
- ### 1. Dual-Mode Development Setup (MANDATORY for Contributors)
13
+ ### 1. Local Development Setup
14
14
 
15
- **Context**: SpecWeave contributors need TWO modes:
16
- 1. **Development Mode**: Local repo symlink (for iterating on SpecWeave itself)
17
- 2. **NPM Testing Mode**: Global npm installation (for testing end-user experience)
15
+ **SpecWeave uses Claude Code's GitHub marketplace** for plugin management. This is the **cross-platform, simple approach** that works on macOS, Linux, and Windows.
18
16
 
19
- #### Development Mode (Default for Contributors)
17
+ #### Quick Start (Recommended - All Platforms)
20
18
 
21
- **Problem**: Claude Code executes hooks from `~/.claude/plugins/marketplaces/specweave/`. If this is a **directory** (not symlink), hooks fail with "No such file or directory".
22
-
23
- **Quick Setup**:
24
19
  ```bash
25
- # Switch to development mode (creates symlink)
26
- bash scripts/dev-mode.sh
20
+ # 1. Clone and install
21
+ git clone https://github.com/YOUR_USERNAME/specweave.git
22
+ cd specweave
23
+ npm install
27
24
 
28
- # Verify symlink:
29
- ls -ld ~/.claude/plugins/marketplaces/specweave
30
- # Must show: lrwxr-xr-x ... -> /path/to/repo (SYMLINK, not drwxr-xr-x)
25
+ # 2. Build TypeScript
26
+ npm run rebuild
27
+
28
+ # 3. That's it! Claude Code auto-installs from GitHub marketplace
29
+ # Hooks execute from: ~/.claude/plugins/marketplaces/specweave/
31
30
  ```
32
31
 
33
- **Manual Setup** (if scripts fail):
32
+ #### Development Workflow
33
+
34
+ **How it works**: Claude Code automatically pulls your latest code from GitHub every 5-10 seconds.
35
+
34
36
  ```bash
35
- # Verify symlink exists:
36
- ls -ld ~/.claude/plugins/marketplaces/specweave
37
+ # 1. Make changes in local repo
38
+ vim src/core/task-parser.ts
37
39
 
38
- # If directory or missing, fix it:
39
- rm -rf ~/.claude/plugins/marketplaces/specweave
40
- ln -s "$(pwd)" ~/.claude/plugins/marketplaces/specweave
40
+ # 2. Build TypeScript changes
41
+ npm run rebuild
41
42
 
42
- # Verify:
43
- bash .specweave/increments/0043-spec-md-desync-fix/scripts/verify-dev-setup.sh
43
+ # 3. Test locally
44
+ npm test
45
+
46
+ # 4. Commit and push to your branch
47
+ git add . && git commit -m "feat: new feature"
48
+ git push origin develop
49
+
50
+ # 5. Wait 5-10 seconds → Claude Code auto-updates marketplace
51
+
52
+ # 6. Test in Claude Code
53
+ /specweave:increment "test feature"
54
+ # Your latest hooks now execute automatically!
44
55
  ```
45
56
 
46
- **Without symlink**: Hooks fail, status line broken, living docs don't sync.
47
- **Protection**: Pre-commit hook verifies symlink before each commit.
57
+ **For hook-only changes** (no TypeScript build needed):
58
+ ```bash
59
+ vim plugins/specweave/hooks/post-task-completion.sh
60
+ git add . && git commit -m "fix: improve hook logic"
61
+ git push origin develop
62
+ # Wait 5-10 seconds → hooks updated!
63
+ ```
48
64
 
49
- #### NPM Testing Mode (For End-User Testing)
65
+ **Key Benefits**:
66
+ - ✅ **Cross-platform** (works on Windows, no admin privileges needed)
67
+ - ✅ **Simple** (standard git workflow, no scripts)
68
+ - ✅ **Reliable** (Claude Code manages updates, no symlink race conditions)
69
+ - ✅ **Team-friendly** (everyone gets updates automatically)
50
70
 
51
- **When to use**: Testing the npm-installed version as end-users would experience it.
71
+ #### Testing Unpushed Changes (Advanced)
52
72
 
53
- **Setup**:
73
+ **Option 1: Temporary Branch** (Recommended)
54
74
  ```bash
55
- # 1. Install global npm package (if not already)
56
- npm install -g specweave
75
+ # Create throwaway test branch
76
+ git checkout -b temp-test-$(date +%s)
77
+ git add . && git commit -m "temp: testing unpushed changes"
78
+ git push origin temp-test-1234567890
57
79
 
58
- # 2. Switch to npm mode (removes symlink)
59
- bash scripts/npm-mode.sh
80
+ # Claude Code pulls from your test branch (5-10 seconds)
81
+ # Test your changes...
60
82
 
61
- # 3. Test as end-user
62
- specweave init test-project
63
- cd test-project
64
- # ... test commands ...
83
+ # Clean up when done
84
+ git push origin --delete temp-test-1234567890
85
+ git checkout develop && git branch -D temp-test-1234567890
86
+ ```
65
87
 
66
- # 4. Switch back to dev mode when done
67
- cd /path/to/specweave/repo
68
- bash scripts/dev-mode.sh
88
+ **Option 2: Fork-Based Development**
89
+ ```bash
90
+ # One-time: Point Claude Code to your fork
91
+ claude plugin marketplace remove specweave
92
+ claude plugin marketplace add github:YOUR_USERNAME/specweave
93
+
94
+ # Now push to your fork's branch
95
+ git push origin develop
96
+ # Claude Code pulls from YOUR fork, not upstream
69
97
  ```
70
98
 
71
- **Key Differences**:
72
- | Aspect | Development Mode | NPM Testing Mode |
73
- |--------|------------------|------------------|
74
- | Symlink | Points to local repo | ❌ Removed |
75
- | Changes | Instant (after rebuild) | 📦 Requires npm publish |
76
- | Use Case | Contributing to SpecWeave | Testing end-user experience |
77
- | Hooks | Use local `plugins/` | Use npm `node_modules/specweave/plugins/` |
99
+ **Option 3: Symlink Mode** (Advanced, Unix-Only)
100
+ If you need **instant updates** without pushing (e.g., rapid hook iteration):
101
+ - See: `.specweave/docs/internal/advanced/symlink-dev-mode.md`
102
+ - ⚠️ **Warning**: Only works on macOS/Linux, not Windows
103
+ - ⚠️ Requires bash scripts, registry manipulation, ongoing maintenance
104
+
105
+ #### NPM Testing Mode (End-User Experience)
106
+
107
+ To test the published npm package as end-users experience it:
78
108
 
79
- **Quick Toggle**:
80
109
  ```bash
81
- # Switch modes anytime:
82
- ./scripts/dev-mode.sh # Development (symlink)
83
- ./scripts/npm-mode.sh # → NPM testing (global install)
110
+ # 1. Install global npm package
111
+ npm install -g specweave
112
+
113
+ # 2. Test in fresh directory
114
+ cd /tmp && mkdir test-project && cd test-project
115
+ specweave init .
116
+ # ... test end-user workflows ...
117
+
118
+ # 3. Resume development
119
+ cd /path/to/specweave/repo
120
+ # Claude Code automatically switches back to marketplace mode
84
121
  ```
85
122
 
86
123
  ### 2. NEVER Pollute Increment Folders
@@ -222,6 +259,61 @@ grep -c "^- \[x\] \*\*AC-" spec.md
222
259
 
223
260
  **Incident Reference**: 2025-11-19 - Increment 0044 was incorrectly closed with tasks.md showing `[ ] pending` while internal TODO showed "completed". This violated SpecWeave's core principle. See `.specweave/increments/0044-integration-testing-status-hooks/reports/INCIDENT-SOURCE-OF-TRUTH-VIOLATION.md` for full post-mortem.
224
261
 
262
+ ### 7a. Status Line Synchronization (AUTOMATIC & ENFORCED!)
263
+
264
+ **CRITICAL**: Status line MUST ALWAYS reflect current task completion status.
265
+
266
+ **How It Works** (Automatic):
267
+ 1. Every TodoWrite call → `post-task-completion.sh` hook fires
268
+ 2. Hook calls `update-status-line.sh` → cache updates
269
+ 3. Status line displays updated progress immediately
270
+
271
+ **The ONLY Way to Complete Tasks**:
272
+ ```
273
+ ALWAYS use TodoWrite when working on increment tasks!
274
+ - TodoWrite triggers hooks automatically
275
+ - Hooks update status line cache
276
+ - Status line stays synchronized
277
+ ```
278
+
279
+ **❌ NEVER Complete Tasks Without TodoWrite**:
280
+ ```typescript
281
+ // ❌ WRONG: Direct Edit without TodoWrite
282
+ Edit("tasks.md", "**Status**: [ ] pending", "**Status**: [x] completed");
283
+ // Status line will NOT update! Hook never fires!
284
+
285
+ // ✅ CORRECT: TodoWrite triggers automatic update
286
+ TodoWrite([{task: "T-001", status: "in_progress"}]);
287
+ // ... do the work ...
288
+ TodoWrite([{task: "T-001", status: "completed"}]);
289
+ Edit("tasks.md", "**Status**: [ ] pending", "**Status**: [x] completed");
290
+ // Hook fires → status line updates automatically!
291
+ ```
292
+
293
+ **Validation Commands**:
294
+ ```bash
295
+ # Check if status line is in sync
296
+ /specweave:validate-status
297
+
298
+ # Manual update (emergency only)
299
+ bash plugins/specweave/hooks/lib/update-status-line.sh
300
+
301
+ # Validate all increments
302
+ npx tsx src/core/status-line-validator.ts
303
+ ```
304
+
305
+ **Detection & Recovery**:
306
+ - Pre-commit hook validates sync (blocks commit if desync detected)
307
+ - `/specweave:done` validates before closing (blocks if desync)
308
+ - Automatic tests verify hook fires correctly
309
+
310
+ **Why This Matters**:
311
+ - Status line is visible to user at ALL times
312
+ - Stale status = broken trust
313
+ - Hooks ensure atomic updates (task complete → status updates together)
314
+
315
+ **Incident Reference**: 2025-11-20 - Status line showed 21/52 tasks when actually 26/52 were complete (10% desync). Root cause: Tasks marked complete without using TodoWrite, so hooks never fired. Added validation layer and tests to prevent future occurrences.
316
+
225
317
  ### 8. NEVER Use `console.*` in Production Code
226
318
 
227
319
  **Rule**: ALL `src/` code MUST use logger abstraction, NEVER `console.log/error/warn`.
@@ -320,7 +412,71 @@ export async function myCommand(options: CommandOptions = {}) {
320
412
 
321
413
  **Note**: Most standards are enforced by ESLint/Prettier. This list focuses on SpecWeave-specific rules and patterns that can't be auto-fixed by linters.
322
414
 
323
- ### 10. Task Format with US-Task Linkage (v0.23.0+)
415
+ ### 10. GitHub Issue Format Policy (v0.24.0+)
416
+
417
+ **CRITICAL**: ALL GitHub issues MUST use User Story-level format.
418
+
419
+ **ONLY Correct Format**:
420
+ ```
421
+ [FS-XXX][US-YYY] User Story Title
422
+ ```
423
+
424
+ **Examples**:
425
+ - ✅ `[FS-043][US-001] Status Line Shows Correct Active Increment`
426
+ - ✅ `[FS-047][US-002] AC-Task Mapping`
427
+
428
+ **Incorrect Formats** (NEVER use):
429
+ - ❌ `[FS-047]` (Feature-only, missing US-ID)
430
+ - ❌ `[SP-US-006]` (SP prefix, missing Feature ID)
431
+ - ❌ `[SP-FS-047-specweave]` (SP prefix, project name)
432
+ - ❌ `[INC-0047]` (Increment-only)
433
+
434
+ **How to Create Issues**:
435
+ ```bash
436
+ # CORRECT way (creates [FS-XXX][US-YYY] issues)
437
+ node -e "
438
+ const { GitHubFeatureSync } = require('./dist/plugins/specweave-github/lib/github-feature-sync.js');
439
+ const { GitHubClientV2 } = require('./dist/plugins/specweave-github/lib/github-client-v2.js');
440
+
441
+ const client = GitHubClientV2.fromRepo('anton-abyzov', 'specweave');
442
+ const sync = new GitHubFeatureSync(client, '.specweave/docs/internal/specs', process.cwd());
443
+ sync.syncFeatureToGitHub('FS-047').then(console.log).catch(console.error);
444
+ "
445
+
446
+ # WRONG way (deprecated, creates [FS-XXX] issues)
447
+ /specweave:increment "feature" # ← This no longer creates GitHub issues
448
+ ```
449
+
450
+ **Why This Matters**:
451
+ - **Features** are tracked via GitHub **Milestones** (not Issues)
452
+ - **User Stories** are tracked via GitHub **Issues**
453
+ - **Tasks** are tracked as **checkboxes** in User Story issue body
454
+
455
+ **Architecture**:
456
+ ```
457
+ Feature (FS-047)
458
+ ↓ GitHub Milestone #13
459
+ ├─ User Story (US-001) → GitHub Issue #638: [FS-047][US-001] Title
460
+ ├─ User Story (US-002) → GitHub Issue #639: [FS-047][US-002] Title
461
+ └─ User Story (US-003) → GitHub Issue #640: [FS-047][US-003] Title
462
+ ```
463
+
464
+ **Deprecated Mechanisms**:
465
+ - ❌ `post-increment-planning.sh` hook (disabled by default)
466
+ - ❌ `update-epic-github-issue.sh` script (deprecated)
467
+ - ❌ `generate-epic-issue-body.ts` script (deprecated)
468
+
469
+ These created Feature-only issues with format `[FS-XXX]` which is INCORRECT.
470
+
471
+ **Hooks Disabled**:
472
+ - Increment-level GitHub sync in `post-increment-planning.sh` (disabled unless `SPECWEAVE_ENABLE_INCREMENT_GITHUB_SYNC=true`)
473
+ - Epic sync in `post-task-completion.sh` (disabled unless `SPECWEAVE_ENABLE_EPIC_SYNC=true`)
474
+
475
+ **See Also**:
476
+ - `.specweave/increments/0047-us-task-linkage/reports/GITHUB-TITLE-FORMAT-FIX-PLAN.md`
477
+ - `plugins/specweave-github/lib/user-story-issue-builder.ts:94`
478
+
479
+ ### 11. Task Format with US-Task Linkage (v0.23.0+)
324
480
 
325
481
  **CRITICAL**: ALL tasks MUST include User Story linkage fields for proper traceability.
326
482
 
@@ -397,6 +553,115 @@ When task marked completed in tasks.md:
397
553
  - Proposal: `.specweave/increments/0046-console-elimination/reports/US-TASK-LINKAGE-PROPOSAL.md`
398
554
  - Living Docs: `.specweave/docs/public/guides/bidirectional-linking.md`
399
555
 
556
+ ### 12. ADR Naming Convention (CRITICAL!)
557
+
558
+ **Architecture Decision Records (ADRs) MUST follow strict naming convention**:
559
+
560
+ **Correct Format**:
561
+ - **Filename**: `XXXX-decision-title.md` (4-digit number, kebab-case, NO `adr-` prefix)
562
+ - **Header**: `# ADR-XXXX: Decision Title` (includes `ADR-` prefix for document clarity)
563
+ - **Location**: `.specweave/docs/internal/architecture/adr/`
564
+
565
+ **Examples**:
566
+ ```
567
+ ✅ CORRECT:
568
+ Filename: 0007-github-first-task-sync.md
569
+ Header: # ADR-0007: GitHub-First Task-Level Synchronization
570
+
571
+ ✅ CORRECT:
572
+ Filename: 0032-universal-hierarchy-mapping.md
573
+ Header: # ADR-0032: Universal Hierarchy Mapping
574
+
575
+ ❌ WRONG:
576
+ Filename: adr-0007-github-first-task-sync.md (NO adr- prefix!)
577
+ Reason: Redundant (already in /adr/ directory)
578
+
579
+ ❌ WRONG:
580
+ Filename: ADR-0007-github-first-task-sync.md (uppercase)
581
+ Reason: Filenames must be lowercase
582
+
583
+ ❌ WRONG:
584
+ Filename: 007-github-first-task-sync.md (3-digit)
585
+ Reason: MUST be 4-digit (0001-9999)
586
+ ```
587
+
588
+ **Why This Matters**:
589
+ - **Consistency**: All ADRs follow same pattern (sortable, predictable)
590
+ - **Clarity**: File location indicates type (in `/adr/` directory)
591
+ - **Tooling**: Scripts expect 4-digit format for auto-numbering
592
+ - **Cross-references**: Links use `adr/XXXX-name.md` format
593
+
594
+ **Enforcement**:
595
+ - Architect agent validates format before creating ADRs
596
+ - Pre-commit hook checks for `adr-XXXX-*.md` pattern and rejects
597
+ - `/specweave:validate` command verifies ADR naming
598
+
599
+ **Common Mistakes**:
600
+ 1. Adding `adr-` prefix to filename (copying from header)
601
+ 2. Using 3-digit numbers instead of 4-digit (001 vs 0001)
602
+ 3. Uppercase filenames (ADR-0007 vs 0007)
603
+ 4. Missing kebab-case (spaces or underscores instead of hyphens)
604
+
605
+ **Auto-Numbering**:
606
+ To find next available ADR number (handles duplicates correctly):
607
+ ```bash
608
+ ls .specweave/docs/internal/architecture/adr/*.md | \
609
+ grep -E '/[0-9]{4}-' | \
610
+ sed 's/.*\/\([0-9][0-9][0-9][0-9]\)-.*/\1/' | \
611
+ sort -u | \
612
+ tail -1 | \
613
+ awk '{printf "Next ADR: %04d\n", $1 + 1}'
614
+ # Output: Next ADR: 0049
615
+ # (Extracts unique numbers only, finds max, adds 1)
616
+ ```
617
+
618
+ ### 13. Archiving Logic Anti-Patterns (CRITICAL!)
619
+
620
+ **NEVER use string search or substring matching for structured data matching**
621
+
622
+ #### Anti-Pattern #1: String Search for Frontmatter Fields
623
+
624
+ ```typescript
625
+ // ❌ WRONG: Matches ANYWHERE in file (false positives!)
626
+ const content = await fs.readFile('spec.md', 'utf-8');
627
+ if (content.includes('FS-039')) {
628
+ // This matches:
629
+ // - feature_id: FS-039 ✓ (correct)
630
+ // - "See FS-039 for details" ✗ (FALSE POSITIVE!)
631
+ // - [Related](FS-039) ✗ (FALSE POSITIVE!)
632
+ }
633
+
634
+ // ✅ CORRECT: Parse frontmatter explicitly
635
+ const featureIdMatch = content.match(/^feature_id:\s*["']?([^"'\n]+)["']?$/m);
636
+ if (featureIdMatch && featureIdMatch[1].trim() === 'FS-039') {
637
+ // Only matches actual frontmatter field
638
+ }
639
+ ```
640
+
641
+ #### Anti-Pattern #2: Substring Matching for IDs
642
+
643
+ ```typescript
644
+ // ❌ WRONG: Substring matching (false positives!)
645
+ const isArchived = archivedList.some(item => item.includes(searchId));
646
+ // "0039-ultra-smart-v2".includes("0039-ultra-smart") → TRUE (WRONG!)
647
+
648
+ // ✅ CORRECT: Exact equality
649
+ const isArchived = archivedList.some(item => item === searchId);
650
+ ```
651
+
652
+ **Why This Matters**:
653
+ - **Incident 2025-11-20**: String search caused 11 features to be incorrectly archived
654
+ - Features that merely REFERENCED another feature appeared to BELONG to it
655
+ - Substring matching confused similar IDs as identical
656
+
657
+ **Prevention**:
658
+ 1. Always parse structured data (YAML frontmatter, JSON) explicitly
659
+ 2. Use exact equality (`===`) for ID matching, never `.includes()`
660
+ 3. Add comprehensive logging to show matching decisions
661
+ 4. Test with edge cases: references, links, partial matches
662
+
663
+ **See Also**: `.specweave/increments/0047-us-task-linkage/reports/CRITICAL-ARCHIVING-BUGS-FIX.md`
664
+
400
665
  ---
401
666
 
402
667
  ## Project Structure
@@ -418,6 +683,123 @@ plugins/ # Claude Code components (skills, agents, commands, hook
418
683
 
419
684
  ---
420
685
 
686
+ ## Plugin Hook Registration (CRITICAL!)
687
+
688
+ **When**: Adding or modifying hooks that respond to Claude Code tool events
689
+
690
+ **Hook Schema Rules** (v0.22.14+):
691
+ 1. ✅ **ONLY use valid Claude Code hook events** (e.g., PostToolUse, PreToolUse, SessionStart)
692
+ 2. ❌ **NEVER use custom hook names** (e.g., "TodoWrite") as hook events
693
+ 3. ✅ **Use matchers** to filter which tool calls trigger the hook
694
+
695
+ ### Valid Claude Code Hook Events
696
+
697
+ Claude Code supports **only these 10 hook events**:
698
+ - `PostToolUse` - After a tool completes (use this for TodoWrite, Write, Edit, etc.)
699
+ - `PreToolUse` - Before a tool executes
700
+ - `PermissionRequest` - When permission dialogs appear
701
+ - `Notification` - When notifications are sent
702
+ - `UserPromptSubmit` - When users submit prompts
703
+ - `Stop` - When the main agent finishes
704
+ - `SubagentStop` - When subagents finish
705
+ - `PreCompact` - Before compaction operations
706
+ - `SessionStart` - At session initialization
707
+ - `SessionEnd` - When sessions terminate
708
+
709
+ ### Correct Hook Registration Format
710
+
711
+ **File**: `plugins/*/. claude-plugin/plugin.json`
712
+
713
+ ```json
714
+ {
715
+ "name": "specweave",
716
+ "version": "0.22.14",
717
+ "hooks": {
718
+ "PostToolUse": [
719
+ {
720
+ "matcher": "TodoWrite",
721
+ "hooks": [
722
+ {
723
+ "type": "command",
724
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-task-completion.sh",
725
+ "timeout": 10
726
+ }
727
+ ]
728
+ }
729
+ ]
730
+ }
731
+ }
732
+ ```
733
+
734
+ **Schema Breakdown**:
735
+ | Field | Type | Purpose |
736
+ |-------|------|---------|
737
+ | `PostToolUse` | array | Hook event (one of 10 valid events above) |
738
+ | `matcher` | string | Tool name pattern (e.g., "TodoWrite", "Write\|Edit") |
739
+ | `type` | string | Always "command" for shell scripts |
740
+ | `command` | string | Script path (use `${CLAUDE_PLUGIN_ROOT}` for plugin directory) |
741
+ | `timeout` | number | Seconds before timeout (default: 30) |
742
+
743
+ ### Common Mistakes (v0.22.13 Bug)
744
+
745
+ ❌ **WRONG** (Invalid hook event):
746
+ ```json
747
+ {
748
+ "hooks": {
749
+ "TodoWrite": {
750
+ "post": "./hooks/post-task-completion.sh"
751
+ }
752
+ }
753
+ }
754
+ ```
755
+ **Error**: `"TodoWrite"` is not a valid Claude Code hook event
756
+
757
+ ✅ **CORRECT** (Use PostToolUse with matcher):
758
+ ```json
759
+ {
760
+ "hooks": {
761
+ "PostToolUse": [
762
+ {
763
+ "matcher": "TodoWrite",
764
+ "hooks": [{"type": "command", "command": "..."}]
765
+ }
766
+ ]
767
+ }
768
+ }
769
+ ```
770
+
771
+ ### Testing Hook Registration
772
+
773
+ ```bash
774
+ # 1. Update plugin.json with correct schema
775
+ vim plugins/specweave/.claude-plugin/plugin.json
776
+
777
+ # 2. Commit and push
778
+ git add plugins/specweave/.claude-plugin/plugin.json
779
+ git commit -m "fix: correct hook registration schema"
780
+ git push origin develop
781
+
782
+ # 3. Wait 5-10 seconds for marketplace auto-update
783
+
784
+ # 4. Force refresh marketplace (if needed)
785
+ cd ~/.claude/plugins/marketplaces
786
+ rm -rf specweave
787
+ git clone https://github.com/YOUR_USERNAME/specweave.git
788
+
789
+ # 5. Restart Claude Code
790
+
791
+ # 6. Verify no plugin loading errors
792
+ # Should NOT see: "hooks: Invalid input" error
793
+ ```
794
+
795
+ ### Documentation References
796
+
797
+ - **Claude Code Plugin Hooks**: https://code.claude.com/docs/en/hooks.md
798
+ - **Hooks Reference**: https://code.claude.com/docs/en/hooks-reference.md
799
+ - **Fix History**: See CHANGELOG.md v0.22.14 for the hook schema bug fix
800
+
801
+ ---
802
+
421
803
  ## Development Workflow
422
804
 
423
805
  ### Core Commands
@@ -477,10 +859,23 @@ claude plugin marketplace update specweave
477
859
 
478
860
  ```bash
479
861
  npm run rebuild # Clean + build (use this during development)
480
- npm run build # Compile TypeScript
862
+ npm run build # Compile TypeScript + copy hook dependencies
481
863
  npm run clean # Remove dist/
482
864
  ```
483
865
 
866
+ **Build Architecture**:
867
+ 1. `tsc` compiles `src/**/*.ts` → `dist/src/**/*.js`
868
+ 2. `copy:locales` copies translation files
869
+ 3. `copy:plugins` compiles plugin TypeScript with esbuild
870
+ 4. `copy:hook-deps` **NEW**: Copies hook dependencies to vendor/
871
+
872
+ **Hook Dependencies** (NEW in v0.22.15):
873
+ - Problem: Hooks imported from `../../../../dist/src/...` (failed in marketplace)
874
+ - Solution: Copy compiled files to `plugins/*/lib/vendor/`
875
+ - Hooks now import from `../vendor/...` (self-contained)
876
+ - Script: `scripts/copy-hook-dependencies.js`
877
+ - Auto-detect deps: `scripts/find-hook-dependencies.js`
878
+
484
879
  **Critical**: Always import with `.js` extensions:
485
880
  ```typescript
486
881
  // ✅ CORRECT
@@ -613,7 +1008,7 @@ vim .specweave/docs/public/guides/user-guide.md
613
1008
  **Commands not working**: Verify plugin installed, restart Claude Code
614
1009
  **Tests failing**: Run `npm run rebuild`, check test output
615
1010
  **Root folder polluted**: Move files to `.specweave/increments/####/reports/`
616
- **Hooks failing**: Verify symlink (see "Symlink Setup" above)
1011
+ **Hooks failing**: Ensure changes are pushed to GitHub (Claude Code auto-updates marketplace every 5-10s). For symlink mode, see `.specweave/docs/internal/advanced/symlink-dev-mode.md`
617
1012
 
618
1013
  ---
619
1014
 
@@ -644,7 +1039,7 @@ vim .specweave/docs/public/guides/user-guide.md
644
1039
  - Tests: `tests/` (unit, integration, E2E)
645
1040
 
646
1041
  **Remember**:
647
- 1. Symlink setup is MANDATORY for contributors
1042
+ 1. Push changes to GitHub Claude Code auto-updates marketplace (5-10s)
648
1043
  2. Keep root clean (use increment folders)
649
1044
  3. Test before committing
650
1045
  4. Never delete .specweave/ directories
package/README.md CHANGED
@@ -137,7 +137,30 @@ You → Manual → Write docs ❌ (4 hours/week wasted)
137
137
 
138
138
  **Total waste**: 9 hours/week = $35K/year per developer
139
139
 
140
- ### The SpecWeave Solution: Bidirectional AI Integration
140
+ ### The SpecWeave Solution: AI with Three-Permission Sync
141
+
142
+ **Control EXACTLY what Claude updates with three simple questions**:
143
+
144
+ ```mermaid
145
+ graph TB
146
+ A[👤 You + Claude] -->|"Plan feature:\n/specweave:increment"| B{Q1: Can Claude CREATE\nand UPDATE work items\nit created?}
147
+ B -->|"✅ Yes"| C[📝 Create GitHub Issue #142]
148
+ B -->|"❌ No"| D[💻 Local Mode Only]
149
+
150
+ E[✅ Task Complete] -->|"Update content?"| F{Q2: Can Claude UPDATE\nwork items created\nexternally?}
151
+ F -->|"✅ Yes"| G[📤 Update PM-Created Issues]
152
+ F -->|"❌ No"| H[📋 Living Docs Only]
153
+
154
+ I[🔔 Issue Closed] -->|"Sync status?"| J{Q3: Can Claude UPDATE\nstatus of work items?}
155
+ J -->|"✅ Yes"| K[✅ Sync Status]
156
+ J -->|"❌ No"| L[👤 Manual Management]
157
+
158
+ style B fill:#339af0,stroke:#1971c2,stroke-width:3px,color:#fff
159
+ style F fill:#51cf66,stroke:#2f9e44,stroke-width:3px,color:#fff
160
+ style J fill:#ff8c42,stroke:#e8590c,stroke-width:3px,color:#fff
161
+ ```
162
+
163
+ **Answer 3 questions during `specweave init`, Claude handles everything else**:
141
164
 
142
165
  ```
143
166
  You → Claude → EVERYTHING (automatic!)
@@ -146,20 +169,20 @@ You → Claude → EVERYTHING (automatic!)
146
169
 
147
170
  Claude creates:
148
171
  ✅ Spec.md (user stories, acceptance criteria)
149
- ✅ JIRA Epic + 5 Stories (auto-created in your JIRA!)
150
- ✅ GitHub Issue #142 (auto-created in your repo!)
172
+ ✅ JIRA Epic + 5 Stories (auto-created if Q1=Yes)
173
+ ✅ GitHub Issue #142 (auto-created if Q1=Yes)
151
174
  ✅ Tasks with embedded tests (BDD format)
152
175
 
153
176
  /specweave:do
154
177
 
155
178
  Claude implements Task 1:
156
179
  ✅ Code (AuthService.ts, tests, 92% coverage)
157
- ✅ JIRA Story → "Done" (updated automatically!)
158
- ✅ GitHub checkbox → ✓ (updated automatically!)
180
+ ✅ JIRA Story → "Done" (if Q2=Yes, updated automatically!)
181
+ ✅ GitHub checkbox → ✓ (if Q2=Yes, updated automatically!)
159
182
  ✅ Docs synced (ADRs, architecture, runbooks)
160
183
  ```
161
184
 
162
- **Your team/client/manager sees updates in real-time. You never touched JIRA.**
185
+ **Your team/client/manager sees updates in real-time. Zero manual work.**
163
186
 
164
187
  ### What This Means in Practice
165
188
 
@@ -187,9 +210,9 @@ Claude implements Task 1:
187
210
 
188
211
  | Platform | Status | Capabilities |
189
212
  |----------|--------|--------------|
190
- | **GitHub Issues** | ✅ Production | Bidirectional sync, task tracking, auto-close, multi-repo |
191
- | **JIRA** | ✅ Production | Epic/Story sync, status updates, comments, unlimited projects |
192
- | **Azure DevOps** | ✅ Production | Work items, hierarchy, area paths, team-based organization |
213
+ | **GitHub Issues** | ✅ Production | Three-permission sync, task tracking, auto-close, multi-repo |
214
+ | **JIRA** | ✅ Production | Three-permission sync, Epic/Story sync, status updates, comments |
215
+ | **Azure DevOps** | ✅ Production | Three-permission sync, Work items, hierarchy, area paths |
193
216
  | **Linear** | 🔄 Coming Q1 2026 | Full integration planned |
194
217
  | **Asana** | 🔄 Coming Q2 2026 | Full integration planned |
195
218
 
@@ -326,7 +349,7 @@ specweave init .
326
349
 
327
350
  ### Production Features
328
351
 
329
- - 🤖 **AI-Native Enterprise Sync** - Claude updates JIRA/GitHub/ADO automatically (bidirectional!)
352
+ - 🤖 **AI-Native Enterprise Sync** - Claude updates JIRA/GitHub/ADO automatically (three-permission control)
330
353
  - 📚 **Living Documentation** - Auto-updates after every task (no manual sync!)
331
354
  - 🧪 **Test-Aware Planning** - Embedded tests in BDD format (Given/When/Then)
332
355
  - 🎯 **Disciplined Progress** - Can't start increment N+1 until N is DONE
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Three-Layer Bidirectional Sync Manager
2
+ * Three-Layer Full Sync Manager (All Permissions Enabled)
3
3
  *
4
4
  * Handles synchronization across three layers:
5
5
  * - Layer 1: GitHub Issue (stakeholder UI)