specweave 0.18.1 → 0.20.1

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 (389) hide show
  1. package/CLAUDE.md +229 -1817
  2. package/README.md +68 -0
  3. package/bin/specweave.js +62 -6
  4. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
  5. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +3 -0
  6. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
  7. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +21 -0
  8. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +1 -0
  9. package/dist/plugins/specweave/lib/hooks/update-ac-status.js +162 -0
  10. package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +1 -0
  11. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.d.ts.map +1 -1
  12. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js +65 -6
  13. package/dist/plugins/specweave-ado/lib/ado-spec-content-sync.js.map +1 -1
  14. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts +112 -0
  15. package/dist/plugins/specweave-github/lib/completion-calculator.d.ts.map +1 -0
  16. package/dist/plugins/specweave-github/lib/completion-calculator.js +301 -0
  17. package/dist/plugins/specweave-github/lib/completion-calculator.js.map +1 -0
  18. package/dist/plugins/specweave-github/lib/duplicate-detector.d.ts +3 -3
  19. package/dist/plugins/specweave-github/lib/duplicate-detector.js +3 -3
  20. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts +7 -0
  21. package/dist/plugins/specweave-github/lib/epic-content-builder.d.ts.map +1 -1
  22. package/dist/plugins/specweave-github/lib/epic-content-builder.js +42 -0
  23. package/dist/plugins/specweave-github/lib/epic-content-builder.js.map +1 -1
  24. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +14 -0
  25. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  26. package/dist/plugins/specweave-github/lib/github-client-v2.js +51 -0
  27. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  28. package/dist/plugins/specweave-github/lib/github-epic-sync.js +1 -1
  29. package/dist/plugins/specweave-github/lib/github-epic-sync.js.map +1 -1
  30. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +87 -0
  31. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -0
  32. package/dist/plugins/specweave-github/lib/github-feature-sync.js +412 -0
  33. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -0
  34. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  35. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +64 -13
  36. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  37. package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts +78 -0
  38. package/dist/plugins/specweave-github/lib/progress-comment-builder.d.ts.map +1 -0
  39. package/dist/plugins/specweave-github/lib/progress-comment-builder.js +237 -0
  40. package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -0
  41. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts +97 -0
  42. package/dist/plugins/specweave-github/lib/user-story-content-builder.d.ts.map +1 -0
  43. package/dist/plugins/specweave-github/lib/user-story-content-builder.js +301 -0
  44. package/dist/plugins/specweave-github/lib/user-story-content-builder.js.map +1 -0
  45. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts +83 -0
  46. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -0
  47. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +386 -0
  48. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -0
  49. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +8 -6
  50. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +1 -1
  51. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +78 -117
  52. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +1 -1
  53. package/dist/src/cli/commands/import-docs.js +4 -4
  54. package/dist/src/cli/commands/import-docs.js.map +1 -1
  55. package/dist/src/cli/commands/init-multiproject.d.ts.map +1 -1
  56. package/dist/src/cli/commands/init-multiproject.js +17 -18
  57. package/dist/src/cli/commands/init-multiproject.js.map +1 -1
  58. package/dist/src/cli/commands/migrate-to-multiproject.d.ts.map +1 -1
  59. package/dist/src/cli/commands/migrate-to-multiproject.js +8 -4
  60. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  61. package/dist/src/cli/commands/switch-project.d.ts.map +1 -1
  62. package/dist/src/cli/commands/switch-project.js +9 -26
  63. package/dist/src/cli/commands/switch-project.js.map +1 -1
  64. package/dist/src/cli/commands/sync-spec-content.js +3 -0
  65. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  66. package/dist/src/core/deduplication/command-deduplicator.d.ts +166 -0
  67. package/dist/src/core/deduplication/command-deduplicator.d.ts.map +1 -0
  68. package/dist/src/core/deduplication/command-deduplicator.js +254 -0
  69. package/dist/src/core/deduplication/command-deduplicator.js.map +1 -0
  70. package/dist/src/core/increment/active-increment-manager.d.ts +42 -15
  71. package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -1
  72. package/dist/src/core/increment/active-increment-manager.js +113 -46
  73. package/dist/src/core/increment/active-increment-manager.js.map +1 -1
  74. package/dist/src/core/increment/conflict-resolver.d.ts +40 -0
  75. package/dist/src/core/increment/conflict-resolver.d.ts.map +1 -0
  76. package/dist/src/core/increment/conflict-resolver.js +219 -0
  77. package/dist/src/core/increment/conflict-resolver.js.map +1 -0
  78. package/dist/src/core/increment/discipline-checker.d.ts.map +1 -1
  79. package/dist/src/core/increment/discipline-checker.js +7 -1
  80. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  81. package/dist/src/core/increment/duplicate-detector.d.ts +52 -0
  82. package/dist/src/core/increment/duplicate-detector.d.ts.map +1 -0
  83. package/dist/src/core/increment/duplicate-detector.js +276 -0
  84. package/dist/src/core/increment/duplicate-detector.js.map +1 -0
  85. package/dist/src/core/increment/increment-archiver.d.ts +90 -0
  86. package/dist/src/core/increment/increment-archiver.d.ts.map +1 -0
  87. package/dist/src/core/increment/increment-archiver.js +368 -0
  88. package/dist/src/core/increment/increment-archiver.js.map +1 -0
  89. package/dist/src/core/increment/increment-reopener.d.ts +165 -0
  90. package/dist/src/core/increment/increment-reopener.d.ts.map +1 -0
  91. package/dist/src/core/increment/increment-reopener.js +390 -0
  92. package/dist/src/core/increment/increment-reopener.js.map +1 -0
  93. package/dist/src/core/increment/metadata-manager.d.ts +26 -1
  94. package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
  95. package/dist/src/core/increment/metadata-manager.js +143 -5
  96. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  97. package/dist/src/core/increment/recent-work-scanner.d.ts +121 -0
  98. package/dist/src/core/increment/recent-work-scanner.d.ts.map +1 -0
  99. package/dist/src/core/increment/recent-work-scanner.js +303 -0
  100. package/dist/src/core/increment/recent-work-scanner.js.map +1 -0
  101. package/dist/src/core/increment/types.d.ts +1 -0
  102. package/dist/src/core/increment/types.d.ts.map +1 -1
  103. package/dist/src/core/increment-utils.d.ts +112 -0
  104. package/dist/src/core/increment-utils.d.ts.map +1 -0
  105. package/dist/src/core/increment-utils.js +210 -0
  106. package/dist/src/core/increment-utils.js.map +1 -0
  107. package/dist/src/core/living-docs/ac-project-specific-generator.d.ts +65 -0
  108. package/dist/src/core/living-docs/ac-project-specific-generator.d.ts.map +1 -0
  109. package/dist/src/core/living-docs/ac-project-specific-generator.js +175 -0
  110. package/dist/src/core/living-docs/ac-project-specific-generator.js.map +1 -0
  111. package/dist/src/core/living-docs/feature-archiver.d.ts +130 -0
  112. package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -0
  113. package/dist/src/core/living-docs/feature-archiver.js +549 -0
  114. package/dist/src/core/living-docs/feature-archiver.js.map +1 -0
  115. package/dist/src/core/living-docs/feature-id-manager.d.ts +81 -0
  116. package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -0
  117. package/dist/src/core/living-docs/feature-id-manager.js +339 -0
  118. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -0
  119. package/dist/src/core/living-docs/hierarchy-mapper.d.ts +144 -83
  120. package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
  121. package/dist/src/core/living-docs/hierarchy-mapper.js +488 -270
  122. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  123. package/dist/src/core/living-docs/index.d.ts +6 -0
  124. package/dist/src/core/living-docs/index.d.ts.map +1 -1
  125. package/dist/src/core/living-docs/index.js +6 -0
  126. package/dist/src/core/living-docs/index.js.map +1 -1
  127. package/dist/src/core/living-docs/project-detector.d.ts +6 -0
  128. package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
  129. package/dist/src/core/living-docs/project-detector.js +35 -1
  130. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  131. package/dist/src/core/living-docs/spec-distributor.d.ts +100 -26
  132. package/dist/src/core/living-docs/spec-distributor.d.ts.map +1 -1
  133. package/dist/src/core/living-docs/spec-distributor.js +1275 -258
  134. package/dist/src/core/living-docs/spec-distributor.js.map +1 -1
  135. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +109 -0
  136. package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -0
  137. package/dist/src/core/living-docs/task-project-specific-generator.js +221 -0
  138. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -0
  139. package/dist/src/core/living-docs/types.d.ts +143 -0
  140. package/dist/src/core/living-docs/types.d.ts.map +1 -1
  141. package/dist/src/core/project-manager.d.ts +2 -17
  142. package/dist/src/core/project-manager.d.ts.map +1 -1
  143. package/dist/src/core/project-manager.js +68 -48
  144. package/dist/src/core/project-manager.js.map +1 -1
  145. package/dist/src/core/spec-content-sync.d.ts +1 -1
  146. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  147. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
  148. package/dist/src/core/sync/enhanced-content-builder.js +2 -1
  149. package/dist/src/core/sync/enhanced-content-builder.js.map +1 -1
  150. package/dist/src/core/sync/performance-optimizer.d.ts +153 -0
  151. package/dist/src/core/sync/performance-optimizer.d.ts.map +1 -0
  152. package/dist/src/core/sync/performance-optimizer.js +220 -0
  153. package/dist/src/core/sync/performance-optimizer.js.map +1 -0
  154. package/dist/src/core/sync/retry-handler.d.ts +98 -0
  155. package/dist/src/core/sync/retry-handler.d.ts.map +1 -0
  156. package/dist/src/core/sync/retry-handler.js +196 -0
  157. package/dist/src/core/sync/retry-handler.js.map +1 -0
  158. package/dist/src/core/types/config.d.ts +94 -0
  159. package/dist/src/core/types/config.d.ts.map +1 -1
  160. package/dist/src/core/types/config.js +16 -0
  161. package/dist/src/core/types/config.js.map +1 -1
  162. package/dist/src/core/types/increment-metadata.d.ts +6 -0
  163. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  164. package/dist/src/core/types/increment-metadata.js +10 -1
  165. package/dist/src/core/types/increment-metadata.js.map +1 -1
  166. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  167. package/dist/src/integrations/jira/jira-incremental-mapper.js +4 -8
  168. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  169. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
  170. package/dist/src/integrations/jira/jira-mapper.js +4 -8
  171. package/dist/src/integrations/jira/jira-mapper.js.map +1 -1
  172. package/package.json +1 -1
  173. package/plugins/specweave/COMMANDS.md +13 -4
  174. package/plugins/specweave/commands/specweave-abandon.md +22 -20
  175. package/plugins/specweave/commands/specweave-archive-features.md +121 -0
  176. package/plugins/specweave/commands/specweave-archive-increments.md +82 -0
  177. package/plugins/specweave/commands/specweave-archive.md +363 -0
  178. package/plugins/specweave/commands/specweave-backlog.md +211 -0
  179. package/plugins/specweave/commands/specweave-fix-duplicates.md +517 -0
  180. package/plugins/specweave/commands/specweave-increment.md +4 -3
  181. package/plugins/specweave/commands/specweave-progress.md +176 -27
  182. package/plugins/specweave/commands/specweave-reopen.md +391 -0
  183. package/plugins/specweave/commands/specweave-restore-feature.md +90 -0
  184. package/plugins/specweave/commands/specweave-restore.md +309 -0
  185. package/plugins/specweave/commands/specweave-resume.md +51 -23
  186. package/plugins/specweave/commands/specweave-status.md +41 -7
  187. package/plugins/specweave/commands/specweave-sync-specs.md +425 -0
  188. package/plugins/specweave/hooks/hooks.json +4 -0
  189. package/plugins/specweave/hooks/lib/sync-spec-content.sh +2 -2
  190. package/plugins/specweave/hooks/post-task-completion.sh +39 -0
  191. package/plugins/specweave/hooks/pre-command-deduplication.sh +83 -0
  192. package/plugins/specweave/hooks/user-prompt-submit.sh +1 -1
  193. package/plugins/specweave/lib/hooks/sync-living-docs.js +2 -0
  194. package/plugins/specweave/lib/hooks/sync-living-docs.ts +4 -0
  195. package/plugins/specweave/lib/hooks/update-ac-status.js +102 -0
  196. package/plugins/specweave/lib/hooks/update-ac-status.ts +192 -0
  197. package/plugins/specweave/skills/archive-increments/SKILL.md +198 -0
  198. package/plugins/specweave/skills/increment-planner/scripts/feature-utils.js +14 -0
  199. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +244 -0
  200. package/plugins/specweave-ado/lib/ado-spec-content-sync.js +49 -5
  201. package/plugins/specweave-ado/lib/ado-spec-content-sync.ts +72 -6
  202. package/plugins/specweave-confluent/.claude-plugin/plugin.json +23 -0
  203. package/plugins/specweave-confluent/README.md +375 -0
  204. package/plugins/specweave-confluent/agents/confluent-architect/AGENT.md +306 -0
  205. package/plugins/specweave-confluent/skills/confluent-kafka-connect/SKILL.md +453 -0
  206. package/plugins/specweave-confluent/skills/confluent-ksqldb/SKILL.md +470 -0
  207. package/plugins/specweave-confluent/skills/confluent-schema-registry/SKILL.md +316 -0
  208. package/plugins/specweave-github/agents/github-task-splitter/AGENT.md +2 -2
  209. package/plugins/specweave-github/agents/user-story-updater/AGENT.md +148 -0
  210. package/plugins/specweave-github/commands/specweave-github-cleanup-duplicates.md +1 -1
  211. package/plugins/specweave-github/commands/specweave-github-update-user-story.md +156 -0
  212. package/plugins/specweave-github/hooks/post-task-completion.sh +10 -9
  213. package/plugins/specweave-github/lib/completion-calculator.js +262 -0
  214. package/plugins/specweave-github/lib/completion-calculator.ts +434 -0
  215. package/plugins/specweave-github/lib/duplicate-detector.js +3 -3
  216. package/plugins/specweave-github/lib/duplicate-detector.ts +4 -4
  217. package/plugins/specweave-github/lib/epic-content-builder.js +38 -0
  218. package/plugins/specweave-github/lib/epic-content-builder.ts +59 -0
  219. package/plugins/specweave-github/lib/github-client-v2.js +49 -0
  220. package/plugins/specweave-github/lib/github-client-v2.ts +59 -0
  221. package/plugins/specweave-github/lib/github-epic-sync.ts +1 -1
  222. package/plugins/specweave-github/lib/github-feature-sync.js +381 -0
  223. package/plugins/specweave-github/lib/github-feature-sync.ts +568 -0
  224. package/plugins/specweave-github/lib/github-spec-content-sync.js +40 -10
  225. package/plugins/specweave-github/lib/github-spec-content-sync.ts +82 -14
  226. package/plugins/specweave-github/lib/progress-comment-builder.js +229 -0
  227. package/plugins/specweave-github/lib/progress-comment-builder.ts +324 -0
  228. package/plugins/specweave-github/lib/user-story-content-builder.js +299 -0
  229. package/plugins/specweave-github/lib/user-story-content-builder.ts +413 -0
  230. package/plugins/specweave-github/lib/user-story-issue-builder.js +344 -0
  231. package/plugins/specweave-github/lib/user-story-issue-builder.ts +543 -0
  232. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +189 -0
  233. package/plugins/{specweave-ado/lib/enhanced-ado-sync.js → specweave-jira/lib/enhanced-jira-sync.js} +25 -61
  234. package/plugins/specweave-jira/lib/{enhanced-jira-sync.ts.disabled → enhanced-jira-sync.ts} +26 -52
  235. package/plugins/specweave-kafka/.claude-plugin/plugin.json +26 -0
  236. package/plugins/specweave-kafka/IMPLEMENTATION-COMPLETE.md +483 -0
  237. package/plugins/specweave-kafka/README.md +242 -0
  238. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +235 -0
  239. package/plugins/specweave-kafka/agents/kafka-devops/AGENT.md +209 -0
  240. package/plugins/specweave-kafka/agents/kafka-observability/AGENT.md +266 -0
  241. package/plugins/specweave-kafka/commands/deploy.md +99 -0
  242. package/plugins/specweave-kafka/commands/dev-env.md +176 -0
  243. package/plugins/specweave-kafka/commands/mcp-configure.md +101 -0
  244. package/plugins/specweave-kafka/commands/monitor-setup.md +96 -0
  245. package/plugins/specweave-kafka/docker/kafka-local/docker-compose.yml +187 -0
  246. package/plugins/specweave-kafka/docker/redpanda/docker-compose.yml +199 -0
  247. package/plugins/specweave-kafka/docker/templates/consumer-nodejs.js +225 -0
  248. package/plugins/specweave-kafka/docker/templates/consumer-python.py +220 -0
  249. package/plugins/specweave-kafka/docker/templates/producer-nodejs.js +168 -0
  250. package/plugins/specweave-kafka/docker/templates/producer-python.py +167 -0
  251. package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.js +438 -0
  252. package/plugins/specweave-kafka/lib/adapters/apache-kafka-adapter.ts +541 -0
  253. package/plugins/specweave-kafka/lib/adapters/platform-adapter.js +47 -0
  254. package/plugins/specweave-kafka/lib/adapters/platform-adapter.ts +343 -0
  255. package/plugins/specweave-kafka/lib/cli/kcat-wrapper.js +258 -0
  256. package/plugins/specweave-kafka/lib/cli/kcat-wrapper.ts +298 -0
  257. package/plugins/specweave-kafka/lib/cli/types.js +10 -0
  258. package/plugins/specweave-kafka/lib/cli/types.ts +92 -0
  259. package/plugins/specweave-kafka/lib/connectors/connector-catalog.js +305 -0
  260. package/plugins/specweave-kafka/lib/connectors/connector-catalog.ts +528 -0
  261. package/plugins/specweave-kafka/lib/documentation/diagram-generator.js +114 -0
  262. package/plugins/specweave-kafka/lib/documentation/diagram-generator.ts +195 -0
  263. package/plugins/specweave-kafka/lib/documentation/exporter.js +210 -0
  264. package/plugins/specweave-kafka/lib/documentation/exporter.ts +338 -0
  265. package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.js +60 -0
  266. package/plugins/specweave-kafka/lib/documentation/schema-catalog-generator.ts +130 -0
  267. package/plugins/specweave-kafka/lib/documentation/topology-generator.js +143 -0
  268. package/plugins/specweave-kafka/lib/documentation/topology-generator.ts +290 -0
  269. package/plugins/specweave-kafka/lib/mcp/detector.js +298 -0
  270. package/plugins/specweave-kafka/lib/mcp/detector.ts +352 -0
  271. package/plugins/specweave-kafka/lib/mcp/types.js +21 -0
  272. package/plugins/specweave-kafka/lib/mcp/types.ts +77 -0
  273. package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.js +193 -0
  274. package/plugins/specweave-kafka/lib/multi-cluster/cluster-config-manager.ts +362 -0
  275. package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.js +188 -0
  276. package/plugins/specweave-kafka/lib/multi-cluster/cluster-switcher.ts +359 -0
  277. package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.js +195 -0
  278. package/plugins/specweave-kafka/lib/multi-cluster/health-aggregator.ts +380 -0
  279. package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.js +209 -0
  280. package/plugins/specweave-kafka/lib/observability/opentelemetry-kafka.ts +358 -0
  281. package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.js +354 -0
  282. package/plugins/specweave-kafka/lib/patterns/advanced-ksqldb-patterns.ts +563 -0
  283. package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.js +259 -0
  284. package/plugins/specweave-kafka/lib/patterns/circuit-breaker-resilience.ts +516 -0
  285. package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.js +233 -0
  286. package/plugins/specweave-kafka/lib/patterns/dead-letter-queue.ts +423 -0
  287. package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.js +266 -0
  288. package/plugins/specweave-kafka/lib/patterns/exactly-once-semantics.ts +445 -0
  289. package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.js +312 -0
  290. package/plugins/specweave-kafka/lib/patterns/flink-kafka-integration.ts +561 -0
  291. package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.js +289 -0
  292. package/plugins/specweave-kafka/lib/patterns/multi-dc-replication.ts +607 -0
  293. package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.js +264 -0
  294. package/plugins/specweave-kafka/lib/patterns/rate-limiting-backpressure.ts +498 -0
  295. package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.js +263 -0
  296. package/plugins/specweave-kafka/lib/patterns/stream-processing-optimization.ts +549 -0
  297. package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.js +205 -0
  298. package/plugins/specweave-kafka/lib/patterns/tiered-storage-compaction.ts +399 -0
  299. package/plugins/specweave-kafka/lib/performance/performance-optimizer.js +249 -0
  300. package/plugins/specweave-kafka/lib/performance/performance-optimizer.ts +427 -0
  301. package/plugins/specweave-kafka/lib/security/kafka-security.js +252 -0
  302. package/plugins/specweave-kafka/lib/security/kafka-security.ts +494 -0
  303. package/plugins/specweave-kafka/lib/utils/capacity-planner.js +203 -0
  304. package/plugins/specweave-kafka/lib/utils/capacity-planner.ts +469 -0
  305. package/plugins/specweave-kafka/lib/utils/config-validator.js +419 -0
  306. package/plugins/specweave-kafka/lib/utils/config-validator.ts +564 -0
  307. package/plugins/specweave-kafka/lib/utils/partitioning.js +329 -0
  308. package/plugins/specweave-kafka/lib/utils/partitioning.ts +473 -0
  309. package/plugins/specweave-kafka/lib/utils/sizing.js +221 -0
  310. package/plugins/specweave-kafka/lib/utils/sizing.ts +374 -0
  311. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-broker-metrics.json +628 -0
  312. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-cluster-overview.json +564 -0
  313. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-consumer-lag.json +509 -0
  314. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-jvm-metrics.json +674 -0
  315. package/plugins/specweave-kafka/monitoring/grafana/dashboards/kafka-topic-metrics.json +578 -0
  316. package/plugins/specweave-kafka/monitoring/grafana/provisioning/dashboards/kafka.yml +17 -0
  317. package/plugins/specweave-kafka/monitoring/grafana/provisioning/datasources/prometheus.yml +17 -0
  318. package/plugins/specweave-kafka/monitoring/prometheus/kafka-alerts.yml +415 -0
  319. package/plugins/specweave-kafka/monitoring/prometheus/kafka-jmx-exporter.yml +256 -0
  320. package/plugins/specweave-kafka/package.json +41 -0
  321. package/plugins/specweave-kafka/skills/kafka-architecture/SKILL.md +647 -0
  322. package/plugins/specweave-kafka/skills/kafka-cli-tools/SKILL.md +433 -0
  323. package/plugins/specweave-kafka/skills/kafka-iac-deployment/SKILL.md +449 -0
  324. package/plugins/specweave-kafka/skills/kafka-kubernetes/SKILL.md +667 -0
  325. package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +273 -0
  326. package/plugins/specweave-kafka/skills/kafka-observability/SKILL.md +576 -0
  327. package/plugins/specweave-kafka/templates/config/broker-production.properties +254 -0
  328. package/plugins/specweave-kafka/templates/config/consumer-low-latency.properties +112 -0
  329. package/plugins/specweave-kafka/templates/config/producer-high-throughput.properties +120 -0
  330. package/plugins/specweave-kafka/templates/migration/mirrormaker2-config.properties +234 -0
  331. package/plugins/specweave-kafka/templates/monitoring/grafana/multi-cluster-dashboard.json +686 -0
  332. package/plugins/specweave-kafka/terraform/apache-kafka/main.tf +347 -0
  333. package/plugins/specweave-kafka/terraform/apache-kafka/outputs.tf +107 -0
  334. package/plugins/specweave-kafka/terraform/apache-kafka/templates/kafka-broker-init.sh.tpl +216 -0
  335. package/plugins/specweave-kafka/terraform/apache-kafka/variables.tf +156 -0
  336. package/plugins/specweave-kafka/terraform/aws-msk/main.tf +362 -0
  337. package/plugins/specweave-kafka/terraform/aws-msk/outputs.tf +93 -0
  338. package/plugins/specweave-kafka/terraform/aws-msk/templates/server.properties.tpl +32 -0
  339. package/plugins/specweave-kafka/terraform/aws-msk/variables.tf +235 -0
  340. package/plugins/specweave-kafka/terraform/azure-event-hubs/main.tf +281 -0
  341. package/plugins/specweave-kafka/terraform/azure-event-hubs/outputs.tf +118 -0
  342. package/plugins/specweave-kafka/terraform/azure-event-hubs/variables.tf +148 -0
  343. package/plugins/specweave-kafka/tsconfig.json +21 -0
  344. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +23 -0
  345. package/plugins/specweave-kafka-streams/README.md +310 -0
  346. package/plugins/specweave-kafka-streams/skills/kafka-streams-topology/SKILL.md +539 -0
  347. package/plugins/specweave-n8n/.claude-plugin/plugin.json +22 -0
  348. package/plugins/specweave-n8n/README.md +354 -0
  349. package/plugins/specweave-n8n/skills/n8n-kafka-workflows/SKILL.md +504 -0
  350. package/plugins/specweave-release/commands/specweave-release-platform.md +1 -1
  351. package/plugins/specweave-release/hooks/post-task-completion.sh +2 -2
  352. package/src/templates/AGENTS.md.template +601 -7
  353. package/src/templates/CLAUDE.md.template +188 -88
  354. package/dist/locales/de/.gitkeep +0 -0
  355. package/dist/locales/de/cli.json +0 -108
  356. package/dist/locales/en/cli.json +0 -287
  357. package/dist/locales/en/errors.json +0 -7
  358. package/dist/locales/en/templates.json +0 -6
  359. package/dist/locales/es/.gitkeep +0 -0
  360. package/dist/locales/es/cli.json +0 -41
  361. package/dist/locales/fr/.gitkeep +0 -0
  362. package/dist/locales/fr/cli.json +0 -108
  363. package/dist/locales/ja/.gitkeep +0 -0
  364. package/dist/locales/ja/cli.json +0 -108
  365. package/dist/locales/ko/.gitkeep +0 -0
  366. package/dist/locales/ko/cli.json +0 -108
  367. package/dist/locales/pt/.gitkeep +0 -0
  368. package/dist/locales/pt/cli.json +0 -108
  369. package/dist/locales/ru/.gitkeep +0 -0
  370. package/dist/locales/ru/cli.json +0 -269
  371. package/dist/locales/zh/.gitkeep +0 -0
  372. package/dist/locales/zh/cli.json +0 -108
  373. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts +0 -25
  374. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.d.ts.map +0 -1
  375. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -191
  376. package/dist/plugins/specweave-ado/lib/enhanced-ado-sync.js.map +0 -1
  377. package/dist/spec-parser.js +0 -629
  378. package/dist/src/core/sync/spec-content-sync.d.ts +0 -88
  379. package/dist/src/core/sync/spec-content-sync.d.ts.map +0 -1
  380. package/dist/src/core/sync/spec-content-sync.js +0 -5
  381. package/dist/src/core/sync/spec-content-sync.js.map +0 -1
  382. package/dist/tsconfig.tsbuildinfo +0 -1
  383. package/plugins/specweave-ado/commands/specweave-ado-sync-spec.md +0 -255
  384. package/plugins/specweave-github/commands/specweave-github-sync-epic.md +0 -248
  385. package/plugins/specweave-github/commands/specweave-github-sync-from.md +0 -147
  386. package/plugins/specweave-github/commands/specweave-github-sync-spec.md +0 -208
  387. package/plugins/specweave-github/commands/specweave-github-sync-tasks.md +0 -530
  388. package/plugins/specweave-jira/commands/specweave-jira-sync-epic.md +0 -267
  389. package/plugins/specweave-jira/commands/specweave-jira-sync-spec.md +0 -240
package/CLAUDE.md CHANGED
@@ -26,8 +26,6 @@ Users receive a different CLAUDE.md via the template system.
26
26
  /ANALYSIS-MULTI-TOOL-COMPARISON.md # NO! Goes to increment reports/
27
27
  /migration-helper.sh # NO! Goes to increment scripts/
28
28
  /execution.log # NO! Goes to increment logs/
29
- /specweave-0.5.1.tgz # NO! Build artifact, should be in .gitignore
30
- /yolov8n.pt # NO! ML model, should be in .gitignore
31
29
 
32
30
  ✅ CORRECT - INCREMENT FOLDERS:
33
31
  .specweave/increments/0004-plugin-architecture/
@@ -48,478 +46,62 @@ Users receive a different CLAUDE.md via the template system.
48
46
  └── 0006-deep-analysis.md # ✅ Architecture decisions
49
47
  ```
50
48
 
51
- **Why**: Traceability, easy cleanup, clear context. See [File Organization Guide](https://spec-weave.com/docs/learn/file-organization).
52
-
53
- ### ⚠️ CRITICAL: reports/ Folder is MANDATORY!
54
-
55
- **EVERY increment MUST have a reports/ subfolder for ALL analysis and summary files:**
56
-
57
- ```bash
58
- # ✅ CORRECT Structure:
59
- .specweave/increments/0017-sync-fix/
60
- ├── spec.md # Core: What we're building
61
- ├── plan.md # Core: How we'll build it
62
- ├── tasks.md # Core: Task checklist (REQUIRED for status line!)
63
- ├── reports/ # 📁 ALL reports and analysis go here!
64
- │ ├── STATUS-LINE-DEBUG.md # ✅ Analysis files
65
- │ ├── TEST-REPORT-COMPLETE.md # ✅ Test reports
66
- │ ├── IMPLEMENTATION-SUMMARY.md # ✅ Implementation summaries
67
- │ ├── CODE-REVIEW-*.md # ✅ Code review reports
68
- │ └── SESSION-SUMMARY-*.md # ✅ Session notes
69
- ├── scripts/ # Optional: Helper scripts
70
- └── logs/ # Optional: Execution logs
71
-
72
- # ❌ WRONG - Files in root will BREAK status line!
73
- .specweave/increments/0017-sync-fix/
74
- ├── spec.md
75
- ├── plan.md
76
- ├── tasks.md
77
- ├── TEST-REPORT-COMPLETE.md # ❌ NO! Breaks status line parsing
78
- ├── ANALYSIS-*.md # ❌ NO! Confuses file parsers
79
- └── SESSION-SUMMARY.md # ❌ NO! Should be in reports/
80
- ```
81
-
82
- **Rule**: Only 3 core files in increment root: `spec.md`, `plan.md`, `tasks.md`. Everything else → subfolders (reports/, scripts/, logs/). Required for status line parsing.
83
-
84
- ### What IS Allowed in Root?
85
-
86
- **ONLY these files belong in root**:
87
- - ✅ `CLAUDE.md` (this file - contributor guide)
88
- - ✅ `README.md`, `CHANGELOG.md`, `LICENSE` (project documentation)
89
- - ✅ `package.json`, `tsconfig.json`, `.gitignore` (config files)
90
- - ✅ Directories: `src/`, `tests/`, `plugins/`, `.specweave/`, etc. (source code)
91
-
92
- **Everything else goes in increment folders or `.gitignore`!**
93
-
94
- ### Build Artifacts (Add to .gitignore)
95
-
96
- These should NEVER be committed:
97
- - ❌ `*.tgz`, `*.tar.gz` - NPM package archives
98
- - ❌ `*.pt`, `*.pth` - ML model files (download on demand)
99
- - ❌ `dist/`, `build/` - Compiled outputs (already in .gitignore)
100
- - ❌ `*.log` - Log files (already in .gitignore)
101
-
102
49
  **Before committing, ALWAYS check**: `git status` - If you see `.md` files in root, MOVE THEM!
103
50
 
104
51
  ---
105
52
 
106
53
  ## Tool Support
107
54
 
108
- Claude Code-first (native hooks, plugins, MCP). See [Why Claude Code?](https://spec-weave.com/docs/overview/why-claude-code).
109
-
110
- ---
111
-
112
- ## Increment Naming Convention
113
-
114
- **CRITICAL**: All increments MUST use descriptive names, not just numbers.
115
-
116
- **Format**: `####-descriptive-kebab-case-name`
117
-
118
- **Examples**:
119
- - ✅ `0001-core-framework` ← Clear what it does
120
- - ✅ `0003-intelligent-model-selection` ← Searchable
121
- - ❌ `0003` ← Too generic (rejected!)
122
-
123
- **Why**: Clear intent, better git history, searchable, self-documenting.
124
-
125
- **For complete naming rules**: See `increment-planner` skill (auto-loads when using `/specweave:increment`)
126
-
127
- ---
128
-
129
- ## Increment Discipline
130
-
131
- **⛔ THE IRON RULE**: You CANNOT start increment N+1 until increment N is DONE.
132
-
133
- **Core Philosophy**:
134
- - ✅ **Default**: 1 active increment (maximum productivity)
135
- - ✅ **Emergency ceiling**: 2 active max (hotfix/bug can interrupt)
136
- - ✅ **Hard cap**: Never >2 active (enforced)
137
-
138
- **Why**: Focus = Quality. Research shows 1 task = 100% productivity, 2 tasks = 20% slower, 3+ = 40% slower + more bugs.
139
-
140
- **For complete discipline rules**: See [Increment Lifecycle Guide](.specweave/docs/internal/delivery/guides/increment-lifecycle.md#increment-discipline-the-iron-rule)
141
-
142
- This guide auto-loads when using increment commands (progressive disclosure pattern).
55
+ SpecWeave supports multiple AI coding tools with varying automation levels:
56
+ - **Claude Code** (Recommended): Native support via plugins, hooks, MCP
57
+ - **Cursor**: Partial support via AGENTS.md compilation
58
+ - **Other tools** (Copilot, ChatGPT, Gemini): Basic support via AGENTS.md
143
59
 
144
- **Quick Reference**:
145
- - Complete work: `/specweave:do`
146
- - Close increments: `/specweave:close` (3 options: adjust scope, move scope, extend)
147
- - Check status: `/specweave:status`
148
- - Emergency bypass: `--force` (use sparingly!)
149
-
150
- **What "DONE" means**: All P1 tasks completed OR completion report exists OR explicit closure via `/specweave:done`.
60
+ For adapter implementation details, see "Multi-Tool Support via Adapters" section below.
151
61
 
152
62
  ---
153
63
 
154
- ## Test-Aware Planning
155
-
156
- Tests embedded in tasks.md (no separate tests.md).
157
-
158
- **Architecture**:
159
- - **spec.md**: User stories with AC-IDs (AC-US1-01, AC-US1-02)
160
- - **plan.md**: Technical design + test strategy
161
- - **tasks.md**: Tasks with embedded test plans (BDD format)
162
-
163
- **Example Task with Tests**:
164
- ```markdown
165
- ## T-001: Implement Authentication Service
166
-
167
- **AC**: AC-US1-01, AC-US1-02, AC-US1-03
168
-
169
- **Test Plan** (BDD):
170
- - **Given** valid credentials → **When** login → **Then** receive JWT token
171
-
172
- **Test Cases**:
173
- - Unit (`auth.test.ts`): validLogin, invalidPassword → 90% coverage
174
- - Integration (`auth-flow.test.ts`): loginEndpoint → 85% coverage
175
-
176
- **Implementation**: AuthService.ts, bcrypt, JWT, Redis rate limiting
177
- ```
178
-
179
- **Key Benefits**:
180
- - ✅ Single source of truth (no sync issues)
181
- - ✅ AC-ID traceability (spec → tasks → tests)
182
- - ✅ BDD format (Given/When/Then - clear intent)
183
- - ✅ TDD support (set `test_mode: TDD` in frontmatter)
184
- - ✅ Realistic coverage (80-90%, not 100%)
185
-
186
- **For complete workflow**: The `increment-planner` skill contains comprehensive test-aware planning guide (auto-loads when using `/specweave:increment`)
187
-
188
- **Validation**: `/specweave:check-tests` shows AC-ID coverage and missing tests
189
-
190
- ---
191
-
192
- ## Bidirectional Task ↔ User Story Linking
193
-
194
- **CRITICAL FEATURE**: SpecWeave automatically creates bidirectional links between tasks and user stories during living docs sync.
195
-
196
- ### How It Works
197
-
198
- **AC-ID Based Mapping**: Uses acceptance criteria IDs from tasks to map back to user stories.
199
-
200
- **Example Task** (WITH bidirectional link):
201
- ```markdown
202
- ### T-001: Implement Authentication Service
203
-
204
- **User Story**: [US-001: User Authentication](../../docs/internal/specs/default/auth-service/us-001-user-authentication.md)
205
-
206
- **AC**: AC-US1-01, AC-US1-02, AC-US1-03
207
-
208
- **Test Plan** (BDD):
209
- - **Given** valid credentials → **When** login → **Then** receive JWT token
210
- ```
211
-
212
- ### Traceability Flow
213
-
214
- **Complete Bidirectional Navigation**:
215
- ```
216
- User Story (US-001) ←――――――――――┐
217
- ↓ |
218
- ↓ Links to Tasks (forward) | Link to User Story (reverse)
219
- ↓ |
220
- Tasks (T-001, T-002, T-003) ――┘
221
- ```
222
-
223
- **Forward Links** (US → Tasks):
224
- - User story files contain **Implementation** section
225
- - Lists all tasks that implement the user story
226
- - Example: `[T-001: Implement Auth](../../../../../increments/0031/tasks.md#t-001-implement-auth)`
227
-
228
- **Reverse Links** (Tasks → US) - **AUTOMATIC**:
229
- - Added during living docs sync (`/specweave:done` or manual distribution)
230
- - Uses AC-IDs from **AC**: field to map task → user story
231
- - Mapping: `AC-US1-01` → `US-001` → User story file
232
- - Injected as `**User Story**: [US-XXX: Title](path)` after task heading
233
-
234
- ### Multi-Project Support
235
-
236
- **Project Detection** (automatic):
237
- ```typescript
238
- // Detects from config or path
239
- projectId = "default" | "backend" | "frontend" | "mobile" | ...
240
-
241
- // Paths adapt automatically
242
- ../../docs/internal/specs/${projectId}/${featureFolder}/us-001-*.md
243
- ```
244
-
245
- **Example Paths**:
246
- - **Default**: `../../docs/internal/specs/default/auth-service/us-001-*.md`
247
- - **Backend**: `../../docs/internal/specs/backend/auth-service/us-001-*.md`
248
- - **Frontend**: `../../docs/internal/specs/frontend/dashboard/us-001-*.md`
64
+ ## Development Workflow
249
65
 
250
- ### When Links Are Created
66
+ ### Core SpecWeave Commands
251
67
 
252
- **Automatic** (during living docs sync):
253
- 1. Complete increment: `/specweave:done 0031`
254
- 2. System automatically:
255
- - Extracts user stories from spec.md
256
- - Writes user story files with forward links (US → Tasks)
257
- - Parses tasks.md for **AC**: fields
258
- - Creates task → user story mapping
259
- - **Injects reverse links** (Tasks → US) into tasks.md
68
+ **Note**: Detailed rules (naming, discipline, archiving) are in skills that auto-load when you use these commands.
260
69
 
261
- **Manual** (if needed):
70
+ **Primary Workflow**:
262
71
  ```bash
263
- node -e "import('./dist/src/core/living-docs/spec-distributor.js').then(async ({ SpecDistributor }) => {
264
- const dist = new SpecDistributor(process.cwd());
265
- await dist.distribute('0031-external-tool-status-sync');
266
- });"
72
+ /specweave:increment "feature name" # Plan new work (increment-planner skill)
73
+ /specweave:do # Execute tasks
74
+ /specweave:progress # Check status
75
+ /specweave:done # Close increment
267
76
  ```
268
77
 
269
- ### Requirements for Bidirectional Links
270
-
271
- **Must Have**:
272
- - ✅ **AC**: field in tasks with AC-IDs (e.g., `AC-US1-01, AC-US1-02`)
273
- - ✅ User stories in spec.md with matching IDs (e.g., `### US-001:` or `#### US-001:`)
274
- - ✅ Living docs sync enabled
275
-
276
- **Optional**:
277
- - No configuration needed (works out of the box)
278
- - Can disable with `livingDocs.intelligent.bidirectionalLinks: false`
279
-
280
- ### Key Benefits
281
-
282
- - ✅ **Complete Traceability**: Navigate from tasks to user stories and back
283
- - ✅ **LLM-Friendly**: AI can understand relationships bidirectionally
284
- - ✅ **Zero Manual Work**: Links created automatically during sync
285
- - ✅ **Multi-Project Aware**: Paths adapt to project structure
286
- - ✅ **Idempotent**: Safe to run sync multiple times
287
-
288
- ### Implementation Details
289
-
290
- **Code**: `src/core/living-docs/spec-distributor.ts`
291
- - `updateTasksWithUserStoryLinks()` - Adds links to tasks.md
292
- - `mapTasksToUserStories()` - Creates AC-ID based mapping
293
-
294
- **Pattern Support**:
295
- - Task headings: Both `## T-001:` and `### T-001:`
296
- - User story headings: Both `### US-001:` and `#### US-001:`
297
-
298
- **For complete technical details**: See `.specweave/increments/0030-intelligent-living-docs/reports/BIDIRECTIONAL-LINKING-COMPLETE.md`
299
-
300
- ---
301
-
302
- ## Root-Level .specweave/ Folder (MANDATORY)
303
-
304
- **CRITICAL ARCHITECTURE RULE**: SpecWeave ONLY supports root-level `.specweave/` folders. Nested `.specweave/` folders are NOT supported and MUST be prevented.
305
-
306
- ### The Rule: ONE Source of Truth
307
-
308
- ```
309
- ✅ CORRECT - Root-level only:
310
- my-project/
311
- ├── .specweave/ ← ONE source of truth
312
- │ ├── increments/
313
- │ ├── docs/
314
- │ └── logs/
315
- ├── frontend/
316
- ├── backend/
317
- └── infrastructure/
318
-
319
- ❌ WRONG - Nested .specweave/ (NOT SUPPORTED):
320
- my-project/
321
- ├── .specweave/ ← Root level
322
- │ └── ...
323
- ├── backend/
324
- │ └── .specweave/ ← ❌ NESTED - PREVENTS THIS!
325
- └── frontend/
326
- └── .specweave/ ← ❌ NESTED - PREVENTS THIS!
327
- ```
328
-
329
- ### Why Root-Level Only?
330
-
331
- Single source of truth, cross-cutting features, simpler sync. Prevents duplication and conflicts. See [Multi-Repo Setup Guide](https://spec-weave.com/docs/learn/multi-repo-setup).
332
-
333
- ### Multi-Repo & Microservices Pattern
334
-
335
- Create parent folder with ONE `.specweave/`. Three options: GitHub parent (teams), local parent (solo), or per-repo (not recommended). Works for polyrepo, microservices, monorepo. See [Multi-Repo Setup Guide](https://spec-weave.com/docs/learn/multi-repo-setup).
336
-
337
- **Setup**: `mkdir parent && cd parent && npx specweave init .` → Select option during init. See guide for full examples.
338
-
339
- ### Enforcement
340
-
341
- `init.ts` detects parent `.specweave/` and prevents nested init. Code review rejects nested folders.
342
-
343
- ---
344
-
345
- ## Project Scale - Plugin Architecture
346
-
347
- ### Core Plugin (Always Auto-Loaded)
348
-
349
- **Plugin**: `specweave` - The essential SpecWeave plugin loaded in every project:
350
- - **Skills**: 9 skills (increment-planner, tdd-workflow, spec-generator, context-loader, project-kickstarter, brownfield-analyzer, brownfield-onboarder, increment-quality-judge, context-optimizer)
351
- - **Agents**: 22 agents (PM, Architect, Tech Lead, + 19 specialized including tdd-orchestrator)
352
- - **Commands**: 22 commands (/specweave:increment, /specweave:do, /specweave:next, /specweave:done, /specweave:progress, /specweave:validate, /specweave:sync-docs, + 15 specialized)
353
- - **Hooks**: 8 lifecycle hooks
354
- - **Size**: ~12K tokens
355
-
356
- **Result**: **75%+ context reduction** out of the box!
357
-
358
- **Why So Small?**
359
- - External sync (GitHub, Jira) = separate plugins
360
- - Tech stacks (React, K8s) = separate plugins
361
- - Domain expertise (ML, payments) = separate plugins
362
- - Core plugin = only increment lifecycle + living docs automation
363
-
364
- ### Available Plugins (All Auto-Installed)
365
-
366
- **Implemented Plugins**:
367
-
368
- | Plugin | Skills | Agents | Commands | Status |
369
- |--------|--------|--------|----------|--------|
370
- | **specweave-github** | 2 | 1 | 4 | ✅ COMPLETE |
371
-
372
- **GitHub Plugin Features:**
373
- - github-sync: Bidirectional increment ↔ issue sync
374
- - github-issue-tracker: Task-level progress tracking
375
- - github-manager agent: AI specialist for GitHub CLI
376
- - Commands: create-issue, sync, close-issue, status
377
- - Auto-detects: `.git/`, `github.com` remote, `GITHUB_TOKEN`
378
-
379
- **Available Plugins**: See `plugins/` directory or `/plugin list --installed`
380
- **Plugin Roadmap**: See [Roadmap](https://spec-weave.com/docs/overview/roadmap) for planned plugins and release timeline
381
-
382
- ### Context Efficiency
383
-
384
- **All plugins are installed, but only relevant skills activate based on context**. Claude Code's native skill system ensures:
385
- - Skills only activate when their description keywords match the conversation
386
- - Agents only load when explicitly invoked
387
- - Commands only appear when relevant
388
-
389
- **Example**: Working on a React frontend:
390
- - ✅ `specweave-frontend` skills activate (React, Next.js, design systems)
391
- - ✅ `specweave-github` skills activate (if mentioning GitHub)
392
- - ❌ `specweave-ml` skills stay dormant (ML keywords not detected)
393
- - ❌ `specweave-payments` skills stay dormant (Stripe not mentioned)
394
-
395
- **Result**: Even with 19+ plugins installed, you only "pay" (in tokens) for what you're actively using in the conversation.
396
-
397
- ### How Plugins Are Loaded (All Plugins Installed Upfront)
398
-
399
- **SpecWeave's plugin system is designed to be intelligent and non-intrusive:**
400
-
401
- #### Phase 1: Initialize (FULLY AUTOMATED!)
402
-
403
- When you run `specweave init`:
404
-
405
- 1. ✅ **GitHub Marketplace Registration** (CLI-Only, GLOBAL)
406
- - Registers marketplace via CLI: `claude plugin marketplace add anton-abyzov/specweave`
407
- - **Marketplace is GLOBAL** - persists across ALL projects, not per-project
408
- - **No `.claude/settings.json` created** - redundant because CLI registration is global
409
- - Installation process:
410
- 1. Removes existing marketplace (if present)
411
- 2. Re-adds marketplace from GitHub (always fresh)
412
- 3. Reads marketplace.json to get list of all plugins
413
- 4. Installs each plugin via `claude plugin install {name}`
414
- 5. Reports success/failure for each plugin
415
- - All slash commands available IMMEDIATELY - no manual install needed!
416
- - Success message: "✔ Installed: 19/19 plugins"
417
- - Graceful fallback: If CLI unavailable, shows manual install instructions
418
- - **No selective loading**: Everything installed upfront for full capabilities
419
-
420
- **Key Architectural Change**:
421
- - ❌ Old: Copied `.claude-plugin/` + `plugins/` to every project (~2MB bloat)
422
- - ✅ New: CLI-based GLOBAL marketplace registration (zero per-project files, always up-to-date)
423
-
424
- #### Phase 2: Implementation (All Plugins Ready)
425
-
426
- After `specweave init`, ALL plugins are already installed. No additional steps needed!
427
-
428
- 1. **Skills Auto-Activate**
429
- - Based on description keywords (Claude Code native behavior)
430
- - No manual invocation needed
431
- - Example: Mention "GitHub" → github-sync skill activates
432
-
433
- 2. **All Capabilities Available**
434
- - GitHub integration: `/specweave-github:sync`
435
- - JIRA integration: `/specweave-jira:sync`
436
- - Frontend tools: React, Next.js, design systems
437
- - Backend tools: Node.js, Python, .NET
438
- - Infrastructure: Kubernetes, Helm, monitoring
439
- - ...and 19+ more plugins ready to use!
440
-
441
- ### Plugin Management
442
-
443
- **All 19+ plugins are automatically installed during `specweave init`**. You rarely need to manage plugins manually, but Claude Code's native commands are available if needed:
444
-
78
+ **State Management**:
445
79
  ```bash
446
- # List installed plugins (should show all 19+ SpecWeave plugins)
447
- /plugin list --installed
448
-
449
- # Uninstall a plugin (not recommended - breaks functionality)
450
- /plugin uninstall specweave-kubernetes
451
-
452
- # Reinstall all plugins (if you uninstalled something by mistake)
453
- specweave init . # Re-runs full installation
454
- ```
455
-
456
- **Key Insight**: SpecWeave uses **ONLY** Claude Code's native plugin system:
457
- - ALL plugins installed automatically during init (no manual selection)
458
- - Plugins install globally via `/plugin install specweave-{name}`
459
- - Work across ALL projects (like VS Code extensions)
460
- - Auto-activate based on skills' description keywords
461
- - Managed by Claude Code (updates handled via `specweave init` re-run)
462
-
463
- ### Development vs Production Setup
464
-
465
- **Two different scenarios with different marketplace configurations:**
466
-
467
- #### SpecWeave Repo (Development)
468
-
469
- ```
470
- specweave/ (GitHub repo - Contributors)
471
- ├── .claude/
472
- │ └── settings.json # Empty or minimal (no local paths supported)
473
- ├── .claude-plugin/
474
- │ └── marketplace.json # Marketplace definition
475
- └── plugins/
476
- ├── specweave/ # Core plugin SOURCE CODE
477
- └── specweave-github/ # Plugin SOURCE CODE
80
+ /specweave:pause 0002 --reason="..." # Pause increment
81
+ /specweave:resume 0002 # Resume paused
82
+ /specweave:abandon 0002 # Abandon incomplete
478
83
  ```
479
84
 
480
- **Marketplace setup for development** (use CLI, NOT settings.json):
481
-
482
- Local paths are **NOT supported** in `extraKnownMarketplaces` in settings.json. Use CLI instead:
483
-
85
+ **Archiving** (MANUAL ONLY):
484
86
  ```bash
485
- # Add local marketplace (only way for development)
486
- /plugin marketplace add ./.claude-plugin
487
-
488
- # Then install plugins
489
- /plugin install specweave
87
+ /specweave:archive 0031 # Archive specific
88
+ /specweave:archive --keep-last 10 # Archive old work
89
+ /specweave:restore 0031 # Restore from archive
490
90
  ```
491
91
 
492
- **Why CLI-only?** Claude Code's `extraKnownMarketplaces` in settings.json only supports remote sources (GitHub, Git). Local paths must be added via CLI commands.
493
-
494
- #### User Projects (Production)
495
-
496
- ```
497
- my-saas-app/ (User's project)
498
- ├── .specweave/ # SpecWeave data ONLY
499
- │ └── increments/
500
- └── src/
92
+ **Quality**:
93
+ ```bash
94
+ /specweave:validate 0001 # Rule-based validation
95
+ /specweave:qa 0001 # AI quality assessment
501
96
  ```
502
97
 
503
- **NO `.claude/` folder created!** Marketplace registration is GLOBAL via CLI, not per-project.
504
-
505
- **Marketplace Registration** (via `specweave init`):
98
+ **Documentation**:
506
99
  ```bash
507
- # Registers marketplace GLOBALLY (persists across all projects)
508
- claude plugin marketplace add anton-abyzov/specweave
509
-
510
- # Check registration (works from ANY project)
511
- claude plugin marketplace list
512
- # Output: ❯ specweave (Source: GitHub anton-abyzov/specweave)
100
+ /specweave:sync-docs update # Sync living docs
101
+ /specweave:sync-tasks # Sync task status
513
102
  ```
514
103
 
515
- **Key Differences**:
516
- - ✅ **Development**: Local `.claude-plugin/` and `plugins/` in repo (for editing)
517
- - ✅ **Production**: GLOBAL CLI registration (zero per-project files)
518
- - ✅ **Development**: Use CLI `/plugin marketplace add ./.claude-plugin`
519
- - ✅ **Production**: Use CLI `claude plugin marketplace add anton-abyzov/specweave`
520
- - ✅ **Both**: Marketplace persists across projects and IDE restarts
521
-
522
- No per-project installation needed!
104
+ **For complete command reference**: See "Quick Reference" section below.
523
105
 
524
106
  ---
525
107
 
@@ -527,8 +109,6 @@ No per-project installation needed!
527
109
 
528
110
  ### Source of Truth Principle
529
111
 
530
- **CRITICAL**: SpecWeave follows a strict source-of-truth pattern:
531
-
532
112
  ```
533
113
  src/ # TypeScript code ONLY (compiled to dist/)
534
114
  plugins/ # ALL Claude Code components (skills, agents, commands, hooks)
@@ -544,1301 +124,235 @@ plugins/ # ALL Claude Code components (skills, agents, commands,
544
124
  - ❌ NEVER mix `*.ts` and `SKILL.md` in same directory
545
125
  - ❌ NEVER create new files in project root (use increment folders)
546
126
 
547
- ### Tech Stack
548
-
549
- **Core**: TypeScript 5.x, Node.js 18+, Commander.js, Inquirer.js
550
- **Testing**: Playwright (E2E), Jest (unit/integration)
551
- **Docs**: Docusaurus 3.x, Mermaid diagrams
552
- **Distribution**: NPM package, install script
553
-
554
- **For complete directory structure**: See `README.md` or browse the repository
127
+ **For complete structure**: See `README.md`
555
128
 
556
129
  ---
557
130
 
558
- ## File Organization Rules
559
-
560
- ### ✅ ALLOWED in Root
561
-
562
- - `CLAUDE.md`, `README.md`, `CHANGELOG.md`, `LICENSE`
563
- - Config files (`package.json`, `tsconfig.json`, `.gitignore`)
564
- - Build artifacts (`dist/`, only if needed temporarily)
565
-
566
- ### ❌ NEVER Create in Root
567
-
568
- **See comprehensive rules at top**: [🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!](#-critical-never-pollute-project-root)
569
-
570
- **Quick summary**:
571
- - ✅ ALL AI-generated files → `.specweave/increments/####/reports/`
572
- - ✅ Architecture decisions → `.specweave/docs/internal/architecture/adr/`
573
- - ❌ NEVER create `.md` files, scripts, or logs in project root
574
-
575
- ### Runtime Artifacts (NOT Source Controlled)
576
-
577
- ```
578
- ❌ NEVER COMMIT:
579
- .specweave/logs/ # Runtime logs
580
- .specweave/increments/*/logs/ # Increment logs
581
- .specweave/cache/ # Temporary cache
582
- ```
583
-
584
- **Why?** Logs are execution artifacts, not source code. They cause merge conflicts and bloat the repo.
585
-
586
- **Enforcement**: `.gitignore` excludes these automatically.
587
-
588
-
589
- ## Internal Documentation Structure
131
+ ## Plugin Architecture
590
132
 
591
- **Location**: `.specweave/docs/internal/` - Cross-project folders + multi-project organization
592
-
593
- ### Cross-Project Documentation (Top-Level)
594
-
595
- **Five cross-project folders** apply to the entire system:
596
-
597
- | Folder | Purpose | Use When | Examples |
598
- |--------|---------|----------|----------|
599
- | **strategy/** | Business rationale (Why?) | Defining business case for features | `prd-user-auth.md` |
600
- | **architecture/** | System-wide technical design | Architecture affecting all projects | `hld-system.md`, `adr/0001-postgres.md` |
601
- | **delivery/** | Build & release (How we build) | Git workflow, DORA metrics, CI/CD | `branch-strategy.md`, `dora-metrics.md` |
602
- | **operations/** | Production ops (How we run) | Runbooks, incidents, performance | `runbook-api.md`, `performance-tuning.md` |
603
- | **governance/** | Policies (Guardrails) | Security, compliance, coding standards | `security-policy.md`, `coding-standards.md` |
604
-
605
- ### Multi-Project Organization
606
-
607
- **FLATTENED STRUCTURE**: Simpler, cleaner paths with document-type-first organization
608
-
609
- ```
610
- .specweave/docs/internal/
611
- ├── strategy/ # Cross-project (unchanged)
612
- ├── architecture/ # System-wide ADRs (unchanged)
613
- ├── delivery/ # Cross-project (unchanged)
614
- ├── operations/ # Cross-project (unchanged)
615
- ├── governance/ # Cross-project (unchanged)
616
-
617
- ├── specs/ # ✨ FLATTENED: Living docs specs
618
- │ ├── default/ # Default project (single-project mode)
619
- │ ├── backend/ # Backend project
620
- │ ├── frontend/ # Frontend project
621
- │ └── _parent/ # Parent repository (multi-repo setups)
622
-
623
- ├── modules/ # ✨ FLATTENED: Module documentation
624
- │ ├── default/
625
- │ ├── backend/
626
- │ └── frontend/
627
-
628
- ├── team/ # ✨ FLATTENED: Team playbooks
629
- │ ├── default/
630
- │ ├── backend/
631
- │ └── frontend/
632
-
633
- ├── project-arch/ # ✨ RENAMED: Project-specific ADRs
634
- │ ├── backend/ # (Renamed to avoid conflict with top-level architecture/)
635
- │ └── frontend/
636
-
637
- └── legacy/ # ✨ FLATTENED: Brownfield imports
638
- ├── default/
639
- └── backend/
640
- ```
641
-
642
- **Benefits of Flattened Structure**:
643
- - ✅ Simpler paths (no extra `projects/` nesting)
644
- - ✅ Consistent with cross-project folders (all at same level)
645
- - ✅ Clearer parent repo naming (`_parent` for multi-repo)
646
- - ✅ Easier GitHub sync (shorter paths)
647
- - ✅ Document-type-first organization (group by specs/, modules/, etc.)
648
-
649
- **Five Documentation Types Per Project**:
650
-
651
- 1. **specs/{project-id}/** - Living documentation specs (user stories, acceptance criteria)
652
- - Permanent, feature-level knowledge base
653
- - ALL user stories for a feature area
654
- - 3-digit numbers: `spec-001-user-auth.md`
133
+ ### Core Plugin (Always Auto-Loaded)
655
134
 
656
- 2. **modules/{project-id}/** - Module/component documentation
657
- - Architecture, API contracts, integration guides
658
- - Created when module >1000 lines or has security implications
659
- - Example: `auth-module.md`, `payment-module.md`
135
+ **Plugin**: `specweave` - The essential SpecWeave plugin loaded in every project:
136
+ - **Skills**: 9 skills (increment-planner, tdd-workflow, spec-generator, etc.)
137
+ - **Agents**: 22 agents (PM, Architect, Tech Lead, + 19 specialized)
138
+ - **Commands**: 22 commands (/specweave:increment, /specweave:do, etc.)
139
+ - **Hooks**: 8 lifecycle hooks
140
+ - **Size**: ~12K tokens
660
141
 
661
- 3. **team/{project-id}/** - Team playbooks
662
- - Onboarding, conventions, workflows, contacts
663
- - Team-specific processes and practices
664
- - Example: `onboarding.md`, `conventions.md`, `workflows.md`
142
+ ### Available Plugins
665
143
 
666
- 4. **project-arch/{project-id}/** - Project-specific ADRs (optional)
667
- - Decisions affecting only this project
668
- - Use top-level `architecture/` for system-wide decisions
669
- - Example: `adr/0001-use-postgres.md`
144
+ All plugins are auto-installed during `specweave init`. Skills activate based on context keywords.
670
145
 
671
- 5. **legacy/{project-id}/** - Brownfield imports (temporary)
672
- - Imported from Notion, Confluence, Wiki
673
- - Migration report + classified files
674
- - Clean up after migration complete
146
+ **Plugin List**: `ls plugins/` or `/plugin list --installed`
675
147
 
676
- **Key Architecture Principle**: Single project = multi-project with 1 project called "default" (NO special cases!)
148
+ **Example plugins**:
149
+ - `specweave` - Core (increment lifecycle, living docs)
150
+ - `specweave-github` - GitHub Issues sync
151
+ - `specweave-{frontend|backend|infrastructure}` - Tech stacks
152
+ - `specweave-{ml|payments}` - Domain-specific
677
153
 
678
- **Document Flow**: `PRD → Spec → Architecture → Delivery → Operations`
154
+ ### Plugin Installation
679
155
 
680
- **See**:
681
- - [Internal Docs README](.specweave/docs/internal/README.md) for complete guidance
682
- - [Multi-Project Setup Guide](.specweave/docs/public/guides/multi-project-setup.md) for usage
683
- - [ADR-0017](/.specweave/docs/internal/architecture/adr/0017-multi-project-internal-structure.md) for architecture decisions
156
+ `specweave init` automatically:
157
+ 1. Registers marketplace: `claude plugin marketplace add anton-abyzov/specweave`
158
+ 2. Installs all plugins via Claude CLI
159
+ 3. Marketplace is GLOBAL (persists across projects)
684
160
 
685
- ---
161
+ After init, all plugins are ready. Skills auto-activate based on keywords.
686
162
 
687
- ## Specs: Two Locations
163
+ ### Local Development Setup (Contributors Only)
688
164
 
689
- 1. **Living Docs** (`.specweave/docs/internal/specs/`): Permanent, feature-level, 20+ user stories (3-digit: spec-001)
690
- 2. **Increment Specs** (`.specweave/increments/####/`): Temporary, focused, 3-5 user stories (4-digit: 0001)
165
+ **🚨 CRITICAL for SpecWeave Contributors:**
691
166
 
692
- **Relationship**: One living docs spec Many increment specs.
167
+ When developing SpecWeave itself, you MUST use a **symlink** from the marketplace to your local repository. This ensures:
168
+ - ✅ All code/hook/skill changes are immediately reflected
169
+ - ✅ No need to reinstall plugins after every change
170
+ - ✅ Real-time testing of hooks, skills, and commands
693
171
 
694
- See [SPECS-ARCHITECTURE-CLARIFICATION.md](.specweave/increments/0007-smart-increment-discipline/reports/SPECS-ARCHITECTURE-CLARIFICATION.md) for full explanation.
172
+ **Setup Instructions:**
695
173
 
696
- ---
174
+ ```bash
175
+ # 1. Remove any existing marketplace installation
176
+ rm -rf ~/.claude/plugins/marketplaces/specweave
697
177
 
698
- ## Living Docs Sync (Universal Hierarchy)
178
+ # 2. Create symlink to your local SpecWeave repository
179
+ ln -s /path/to/your/specweave/repo ~/.claude/plugins/marketplaces/specweave
699
180
 
700
- **CRITICAL**: SpecWeave uses Universal Hierarchy architecture for living docs. This section explains the structure and automatic sync process.
181
+ # Example:
182
+ ln -s ~/Projects/github/specweave ~/.claude/plugins/marketplaces/specweave
701
183
 
702
- ### Structure (Standard Level)
184
+ # 3. Register the local marketplace with Claude Code
185
+ cd /path/to/your/specweave/repo
186
+ claude plugin marketplace add ./.
703
187
 
704
- **Location**: `.specweave/docs/internal/specs/{project-id}/`
188
+ # 4. Verify the marketplace is registered
189
+ claude plugin marketplace list
190
+ # Should show: specweave (Source: Directory /path/to/your/repo)
705
191
 
706
- Each FS-* (Feature Spec / Epic) folder contains:
707
- - **README.md** - Epic overview (high-level feature summary, business value, implementation history)
708
- - **us-\*.md** - User story files DIRECTLY in epic folder (NOT in subfolder)
192
+ # 5. Update marketplace to discover all plugins
193
+ claude plugin marketplace update specweave
709
194
 
710
- **Correct Structure**:
711
- ```
712
- .specweave/docs/internal/specs/
713
- └── default/ ← Project: default
714
- ├── README.md ← Project overview
715
- ├── FS-024-bidirectional-spec-sync/
716
- │ ├── README.md ← Epic overview
717
- │ ├── us-001-*.md ← User stories
718
- │ ├── us-002-*.md
719
- │ └── us-003-*.md
720
- ├── FS-030-intelligent-living-docs/
721
- │ ├── README.md
722
- │ ├── us-001-*.md
723
- │ └── (more user stories...)
724
- └── FS-031-external-tool-status-synchronization/
725
- ├── README.md
726
- ├── us-001-rich-external-issue-content.md
727
- ├── us-002-task-level-mapping.md
728
- └── (5 more user stories...)
195
+ # 6. Verify hooks are accessible
196
+ test -f ~/.claude/plugins/marketplaces/specweave/plugins/specweave/hooks/user-prompt-submit.sh && \
197
+ echo "✅ Hooks accessible" || echo "❌ Setup failed"
729
198
  ```
730
199
 
731
- **❌ WRONG - Do NOT create**:
732
- - `spec.md` files (use README.md instead)
733
- - `user-stories/` subfolders (user stories go directly in FS-* folder)
734
- - Root-level `user-stories/` folder
735
-
736
- ### Hierarchy Mapping
737
-
738
- | SpecWeave | GitHub | Jira | ADO | Description |
739
- |-----------|--------|------|-----|-------------|
740
- | **FS-* (Epic)** | Project/Milestone | Epic | Epic | Strategic feature (20+ user stories) |
741
- | **US-* (User Story)** | Issue | Story | User Story | Detailed requirement (5-10 AC) |
742
- | **T-* (Task)** | Checkbox | Sub-task | Task | Implementation unit (1-4 hours) |
200
+ **If you see "Plugin not found" errors:**
743
201
 
744
- ### Automatic Sync Process
745
-
746
- **When**: After completing an increment with `/specweave:done`
747
-
748
- **How It Works**:
749
- 1. **HierarchyMapper** detects which FS-* folder the increment belongs to:
750
- - **Method 1 (Frontmatter)**: Checks `epic: FS-031` in increment's `spec.md` (100% confidence)
751
- - **Method 2 (Increment ID)**: Maps `0031-feature` → `FS-031` (90% confidence)
752
- - **Method 3 (Config)**: Checks explicit mapping in `config.json` (100% confidence)
753
- - **Fallback**: Auto-creates new FS-* folder if needed (50% confidence)
754
-
755
- 2. **SpecDistributor** writes files:
756
- - Epic overview → `FS-031/README.md` (high-level summary, business value, implementation history)
757
- - User stories → `FS-031/us-001-*.md`, `FS-031/us-002-*.md`, etc. (directly in folder)
758
-
759
- **ID Normalization**: Handles both `0031` and `31` → `FS-031` (removes leading zeros, pads to 3 digits)
760
-
761
- ### Manual Sync (If Needed)
762
-
763
- If automatic sync doesn't trigger, run manually:
202
+ This means the plugin registry is out of sync. Fix it:
764
203
 
765
204
  ```bash
766
- # From project root
767
- node -e "import('./dist/src/core/living-docs/spec-distributor.js').then(async ({ SpecDistributor }) => {
768
- const distributor = new SpecDistributor(process.cwd());
769
- await distributor.distribute('0031-external-tool-status-sync');
770
- });"
771
- ```
205
+ # 1. Backup current registry
206
+ cp ~/.claude/plugins/installed_plugins.json ~/.claude/plugins/installed_plugins.json.backup
772
207
 
773
- ### Key Implementation Files
208
+ # 2. Clear registry (forces rediscovery)
209
+ echo '{"version": 1, "plugins": {}}' > ~/.claude/plugins/installed_plugins.json
774
210
 
775
- - **`src/core/living-docs/hierarchy-mapper.ts`** - Detects epic folder (400+ lines)
776
- - **`src/core/living-docs/spec-distributor.ts`** - Distributes content to FS-* folders
777
- - **`.specweave/docs/internal/specs/default/README.md`** - Project overview with sync instructions
778
-
779
- ### User Story Format
780
-
781
- Each `us-*.md` file contains:
782
- - **Frontmatter**: `id`, `epic`, `title`, `status`, `priority`, `created`, `completed`
783
- - **Epic Link**: `[SPEC-0031](./README.md)` (links to README.md in same folder)
784
- - **User Story**: "As a... I want... So that..."
785
- - **Acceptance Criteria**: AC-US1-01, AC-US1-02, etc. (with P1/P2 priorities)
786
- - **Implementation**: Links to increment and tasks
787
- - **Business Rationale**: Why this user story matters
788
- - **Related Stories**: Cross-links to other US-*.md files
789
-
790
- ### Epic Overview Format (README.md)
791
-
792
- Each `README.md` contains:
793
- - **Frontmatter**: `id`, `title`, `type: epic`, `status`, `priority`, `created`, `last_updated`, `external_tools`
794
- - **Epic Overview**: High-level feature description
795
- - **Business Value**: Key benefits (bullet points)
796
- - **Implementation History**: Table showing which increments implemented which stories
797
- - **User Stories**: Links to all us-*.md files (grouped by phase)
798
- - **External Tool Integration**: GitHub/Jira/ADO links
799
-
800
- ### Troubleshooting
801
-
802
- **Problem**: Sync creates wrong folder (e.g., FS-0031 instead of FS-031)
803
- **Solution**: ID normalization is already implemented. Rebuild: `npm run build`
804
-
805
- **Problem**: Files go to wrong location (root level or wrong subfolder)
806
- **Solution**: Check `userStoriesSubdir` is empty string in HierarchyMapper
807
-
808
- **Problem**: Epic not detected
809
- **Solution**: Add `epic: FS-031` to increment's `spec.md` frontmatter
810
-
811
- ---
812
-
813
- ## Enterprise Specs Organization
814
-
815
- Living docs organized by feature domain (core-framework, integrations, infrastructure, etc.). Six domains, rich YAML metadata, auto-generated indices (by-status, by-domain, by-release, by-priority, by-team). Migration scripts available. See [Organization Strategy](.specweave/docs/internal/specs/ORGANIZATION-STRATEGY.md).
816
-
817
- ---
211
+ # 3. Update marketplace
212
+ claude plugin marketplace update specweave
818
213
 
819
- ## Living Completion Reports
820
-
821
- Update reports during work (not at end) for complete audit trail. Log scope changes with `/specweave:update-scope`. Commands: `/specweave:increment` (init), `/specweave:update-scope` (log changes), `/specweave:done` (finalize). See [update-scope.md](plugins/specweave/commands/update-scope.md).
822
-
823
- ---
824
-
825
- ## Development Workflow
826
-
827
- ### Making Changes
828
-
829
- **ALL components belong to plugins** (following [Claude Code's plugin system](https://docs.claude.com/en/docs/claude-code/plugins)).
830
-
831
- **1. Editing Skills** (any plugin):
832
- ```bash
833
- # Core plugin (auto-loaded):
834
- vim plugins/specweave/skills/spec-generator/SKILL.md
835
-
836
- # Other plugins (opt-in):
837
- vim plugins/specweave-github/skills/github-sync/SKILL.md
838
-
839
- # Skills auto-activate based on description keywords
214
+ # 4. Restart Claude Code
215
+ # All 25 plugins will be rediscovered from your local repo
840
216
  ```
841
217
 
842
- **2. Editing Agents** (any plugin):
843
- ```bash
844
- # Core plugin (auto-loaded):
845
- vim plugins/specweave/agents/pm/AGENT.md
846
-
847
- # Other plugins (opt-in):
848
- vim plugins/specweave-github/agents/github-manager/AGENT.md
849
-
850
- # Test by invoking via Task tool
851
- ```
218
+ **Verification:**
852
219
 
853
- **3. Editing Commands** (any plugin):
854
220
  ```bash
855
- # Core plugin (auto-loaded):
856
- vim plugins/specweave/commands/do.md
857
-
858
- # Other plugins (opt-in):
859
- vim plugins/specweave-github/commands/github-sync.md
221
+ # Check symlink target
222
+ readlink ~/.claude/plugins/marketplaces/specweave
223
+ # Should output: /path/to/your/specweave/repo
860
224
 
861
- # Test via /command-name
225
+ # Check all plugins are accessible
226
+ ls ~/.claude/plugins/marketplaces/specweave/plugins/
227
+ # Should list: specweave, specweave-github, specweave-jira, etc.
862
228
  ```
863
229
 
864
- **4. Creating New Plugins** (see "Plugins" section below for complete instructions)
865
-
866
- **5. Editing Framework Code** (`src/core/`, `src/cli/`):
867
- ```bash
868
- # Edit TypeScript (config manager, plugin loader, etc.)
869
- vim src/core/config-manager.ts
230
+ **Why This Matters:**
870
231
 
871
- # Build and test
872
- npm run build && npm test
232
+ Without the symlink, Claude Code will try to execute hooks from a non-existent location:
873
233
  ```
874
-
875
- ### Testing Strategy
876
-
877
- **Four Levels of Testing** (mirroring SpecWeave's philosophy):
878
-
879
- 1. **Specification Tests** (`.specweave/docs/internal/strategy/`)
880
- - Acceptance criteria in PRDs
881
- - Manual validation
882
-
883
- 2. **Embedded Tests** (`.specweave/increments/####/tasks.md`)
884
- - Test plans embedded in tasks (BDD format)
885
- - AC-ID traceability (AC-US1-01, AC-US1-02, etc.)
886
-
887
- 3. **Integration Tests** (`tests/integration/{skill-name}/`)
888
- - Tests for plugin and skill functionality
889
- - Tool sync (github, ado, jira)
890
- - Brownfield detection and other integrations
891
- - Run via: `npm run test:integration`
892
-
893
- 4. **Code Tests** (`tests/`)
894
- - **E2E (Playwright)**: MANDATORY for UI features
895
- - `tests/e2e/specweave-smoke.spec.ts`
896
- - Run: `npm run test:e2e`
897
- - **Integration**: Tool sync, brownfield detection
898
- - `tests/integration/`
899
- - Run: `npm run test:integration`
900
- - **Unit**: Core logic, config parsing
901
- - `tests/unit/`
902
- - Run: `npm test`
903
-
904
- **Coverage Requirements**:
905
- - Critical paths: 90%+
906
- - Overall: 80%+
907
- - Tests MUST tell the truth (no false positives)
908
-
909
- ### Hooks and Automation
910
-
911
- ## Hooks (Automated Workflows)
912
-
913
- Hooks live in plugins (`plugins/specweave/hooks/`), auto-discovered via `plugin.json`. No `.claude/` folder needed (global CLI registration). Configure behavior in `.specweave/config.json`. See [Plugin Hook Docs](plugins/specweave/hooks/README.md) and [Claude Code Hooks](https://code.claude.com/docs/en/hooks).
914
-
915
- ---
916
-
917
- **Key Hooks**:
918
- - **post-task-completion**: Smart session-end detection (15s inactivity), sound notification, living docs sync, external tool sync
919
- - **pre-tool-use**: Immediate sound on AskUserQuestion (before task completion)
920
- - **Living docs sync**: Auto-syncs increment specs to `.specweave/docs/internal/specs/` (permanent archive)
921
-
922
- Configure via `.specweave/config.json` → `hooks.post_task_completion`. Manual sync: `/specweave:sync-docs`.
923
-
924
- **Intelligent Living Docs Sync**: Two modes - Simple (single file) or Intelligent (parses, classifies, distributes by category+project). 9 categories, multi-project support. Enable in `.specweave/config.json` → `livingDocs.intelligent.enabled`. See [Intelligent Living Docs Guide](.specweave/docs/public/guides/intelligent-living-docs-sync.md).
925
-
926
- **Enable Intelligent Mode** (`.specweave/config.json`):
927
- ```json
928
- {
929
- "hooks": {
930
- "post_task_completion": {
931
- "sync_living_docs": true
932
- }
933
- },
934
- "livingDocs": {
935
- "intelligent": {
936
- "enabled": true,
937
- "splitByCategory": true,
938
- "generateCrossLinks": true,
939
- "preserveOriginal": true,
940
- "classificationConfidenceThreshold": 0.6,
941
- "fallbackProject": "default"
942
- }
943
- }
944
- }
234
+ ❌ Plugin hook error: /bin/sh:
235
+ ~/.claude/plugins/marketplaces/specweave/plugins/specweave/hooks/user-prompt-submit.sh:
236
+ No such file or directory
945
237
  ```
946
238
 
947
- **Result** (Intelligent Mode):
948
- ```
949
- ✅ BEFORE (Simple Mode):
950
- .specweave/docs/internal/specs/spec-0016-authentication.md (5,000 lines, mixed content)
951
-
952
- ✅ AFTER (Intelligent Mode):
953
- .specweave/docs/internal/
954
- ├── specs/backend/
955
- │ ├── us-001-backend-api-auth.md (User Story + Docusaurus frontmatter)
956
- │ ├── us-002-session-management.md (User Story + Cross-links)
957
- │ ├── _archive/spec-0016-authentication.md (Original preserved)
958
- │ └── README.md (Auto-generated project index)
959
- ├── architecture/
960
- │ ├── authentication-flow.md (HLD)
961
- │ └── adr/0001-oauth-vs-jwt.md (ADR)
962
- ├── operations/
963
- │ ├── runbook-auth-service.md (Runbook)
964
- │ └── slo-auth-availability.md (SLO)
965
- ├── delivery/
966
- │ └── test-strategy-authentication.md (Test Strategy)
967
- └── strategy/
968
- └── auth-business-requirements.md (Business Requirements)
969
- ```
239
+ **Troubleshooting:**
970
240
 
971
- **Classification System** (9 Categories):
972
-
973
- | Category | Detects | Goes To |
974
- |----------|---------|---------|
975
- | **User Story** | US-XXX pattern, "As a" format, AC | `specs/{project}/` |
976
- | **NFR** | NFR-XXX pattern, metrics, SLAs | `specs/{project}/nfr/` |
977
- | **Architecture** | HLD, LLD, diagrams | `architecture/` |
978
- | **ADR** | ADR-XXX pattern, decision structure | `architecture/adr/` |
979
- | **Operations** | Runbooks, SLOs | `operations/` |
980
- | **Delivery** | Test strategy, release plans | `delivery/` |
981
- | **Strategy** | Business requirements, PRDs | `strategy/` |
982
- | **Governance** | Security, compliance | `governance/` |
983
- | **Overview** | Summaries | `specs/{project}/` |
984
-
985
- **Project Detection** (Multi-Project Support):
986
-
987
- Intelligent sync detects which project (backend/frontend/mobile) via:
988
- - Increment name contains project ID (e.g., `0016-backend-auth`) → +10 points
989
- - Frontmatter `project:` field → +20 points (highest)
990
- - Team name match → +5 points
991
- - Keyword match → +3 points each
992
- - Tech stack match → +2 points each
993
-
994
- **Example**:
995
- ```yaml
996
- ---
997
- title: User Authentication
998
- project: backend # ← Explicit project (100% confidence)
999
- ---
1000
-
1001
- # User Authentication
1002
-
1003
- Quick overview: Implement OAuth for **backend services** using Node.js...
1004
- # Keywords: backend, service, Node.js → detected!
1005
- ```
1006
-
1007
- **Multi-Project Setup** (`.specweave/config.json`):
1008
- ```json
1009
- {
1010
- "multiProject": {
1011
- "projects": {
1012
- "backend": {
1013
- "name": "Backend Services",
1014
- "keywords": ["api", "backend", "service"],
1015
- "techStack": ["Node.js", "PostgreSQL"]
1016
- },
1017
- "frontend": {
1018
- "name": "Frontend App",
1019
- "keywords": ["ui", "frontend", "react"],
1020
- "techStack": ["React", "Next.js"]
1021
- }
1022
- }
1023
- }
1024
- }
1025
- ```
241
+ If you see "Plugin not found in marketplace 'specweave'" errors:
242
+ 1. Check symlink exists: `ls -la ~/.claude/plugins/marketplaces/specweave`
243
+ 2. Verify it points to your repo: `readlink ~/.claude/plugins/marketplaces/specweave`
244
+ 3. Recreate symlink if needed (see setup instructions above)
1026
245
 
1027
- **Result**: Content distributed to `specs/backend/` and `specs/frontend/` automatically!
246
+ **What NOT to Do:**
1028
247
 
1029
- **Docusaurus Frontmatter** (Auto-Generated):
248
+ - Don't copy the repository - use a symlink
249
+ - ❌ Don't use relative paths in symlink - use absolute paths
250
+ - ❌ Don't register the marketplace via `claude plugin marketplace add` - symlink is enough for local dev
1030
251
 
1031
- Every distributed file gets rich frontmatter for LLM context:
1032
-
1033
- ```yaml
1034
- ---
1035
- id: us-001-user-login
1036
- title: "US-001: User Login"
1037
- sidebar_label: "User Login"
1038
- description: "User can log in with email and password"
1039
- tags: ["user-story", "backend", "authentication"]
1040
- increment: "0016-authentication"
1041
- project: "backend" # ← LLM knows which project
1042
- category: "user-story" # ← LLM knows document type
1043
- last_updated: "2025-11-10"
1044
- status: "planning"
1045
- priority: "P1"
1046
252
  ---
1047
- ```
1048
253
 
1049
- **Cross-Linking** (Bidirectional):
254
+ ## Multi-Tool Support via Adapters
1050
255
 
1051
- Intelligent sync generates "Related Documents" sections:
256
+ SpecWeave supports multiple AI coding tools through an adapter system. Tool selection happens during `specweave init`.
1052
257
 
1053
- ```markdown
1054
- ## Related Documents
258
+ **Adapter Architecture**:
259
+ - **Location**: `src/adapters/` (interface, loader, tool-specific implementations)
260
+ - **Selection**: Auto-detected or via `--adapter` flag
261
+ - **Files**: Tool-specific files (`.cursorrules`, `AGENTS.md`, etc.)
1055
262
 
1056
- ### Implements
1057
- - [Authentication Architecture](../../architecture/auth-flow.md)
1058
-
1059
- ### References
1060
- - [ADR-001: OAuth vs JWT](../../architecture/adr/0001-oauth-vs-jwt.md)
1061
-
1062
- ### Defined In
1063
- - [Business Requirements](../../strategy/auth-requirements.md)
1064
- ```
263
+ **Supported Tools**:
1065
264
 
1066
- **Benefits of Intelligent Mode**:
1067
- - ✅ **Better organization**: Content organized by type and project
1068
- - **Easier navigation**: Find docs quickly (specs vs architecture vs operations)
1069
- - **LLM-friendly**: Rich context (project, category, tags) for AI assistants
1070
- - **Cross-linked**: Related documents automatically connected
1071
- - ✅ **Docusaurus-ready**: Frontmatter works out-of-the-box
1072
- - ✅ **Multi-project**: Separate docs for backend/frontend/mobile
1073
- - ✅ **Traceability**: Footer shows source increment and last updated
265
+ | Tool | Automation Level | Implementation | Status |
266
+ |------|------------------|----------------|--------|
267
+ | **Claude Code** | Full | Native plugins (no adapter) | Recommended |
268
+ | **Cursor** | Partial | AGENTS.md compilation | Supported |
269
+ | **Generic** | Basic | AGENTS.md static file | ✅ Supported |
1074
270
 
1075
- **Performance**:
1076
- - Fast: ~10-50ms to parse, classify, and distribute
1077
- - Async: Runs in background (non-blocking)
1078
- - Fallback: Falls back to simple mode on error
271
+ **Key Differences**:
272
+ - **Claude Code**: No adapter needed - uses native plugin system
273
+ - **Cursor/Generic**: Require compilation step to generate AGENTS.md
274
+ - **All tools**: Share same `.specweave/` data structure
1079
275
 
1080
- **User Guide**: `.specweave/docs/public/guides/intelligent-living-docs-sync.md`
1081
- **Architecture**: `.specweave/docs/internal/architecture/adr/0030-intelligent-living-docs-sync.md`
276
+ **For contributors**: Adapter code is in `src/adapters/`. Tests in `tests/unit/adapter-loader.test.ts`.
1082
277
 
1083
278
  ---
1084
279
 
1085
- **🔧 HOOKS ARCHITECTURE CHANGES (v0.13.0)**
1086
-
1087
- **What Changed**: External tool sync logic (GitHub, JIRA, Azure DevOps) has been **moved from core plugin to respective plugin hooks** to follow Claude Code's native plugin architecture.
1088
-
1089
- **Before (v0.12.x)**:
1090
- ```
1091
- Core hook: plugins/specweave/hooks/post-task-completion.sh (452 lines)
1092
- ├── Core concerns (sound, living docs, translation)
1093
- ├── GitHub sync (107 lines) ← Embedded in core!
1094
- ├── JIRA sync (11 lines) ← Embedded in core!
1095
- └── Azure DevOps sync (11 lines) ← Embedded in core!
1096
- ```
1097
-
1098
- **After**:
1099
- ```
1100
- Core hook: plugins/specweave/hooks/post-task-completion.sh (330 lines)
1101
- ├── Core concerns ONLY (sound, living docs, translation, reflection)
1102
-
1103
- GitHub plugin: plugins/specweave-github/hooks/post-task-completion.sh (241 lines)
1104
- ├── GitHub API calls, issue updates, progress comments
1105
-
1106
- JIRA plugin: plugins/specweave-jira/hooks/post-task-completion.sh (150 lines)
1107
- ├── JIRA API calls, issue status updates
1108
-
1109
- ADO plugin: plugins/specweave-ado/hooks/post-task-completion.sh (150 lines)
1110
- ├── Azure DevOps API calls, work item updates
1111
- ```
1112
-
1113
- **Benefits**:
1114
- - ✅ **27% smaller core hook** (452 → 330 lines)
1115
- - ✅ **No external tool dependencies** in core plugin (no gh CLI, JIRA API, ADO API)
1116
- - ✅ **Optional plugins** (GitHub sync only runs if `specweave-github` installed)
1117
- - ✅ **Independent testing** (test each hook in isolation)
1118
- - ✅ **Parallel execution** (Claude Code runs all hooks concurrently)
1119
-
1120
- **How Claude Code's Hook System Works**:
1121
- 1. Task completes → `TodoWrite` tool fires
1122
- 2. Claude Code triggers `PostToolUse` event
1123
- 3. **ALL registered plugin hooks fire in parallel**:
1124
- - Core hook: Sound + Living docs + Translation + Reflection
1125
- - GitHub hook: Update issue checkboxes (if installed)
1126
- - JIRA hook: Update issue status (if installed)
1127
- - ADO hook: Update work item (if installed)
1128
-
1129
- **Key Insight**: Each plugin registers its own hooks via `hooks.json`, enabling clean modularity and separation of concerns.
280
+ ## Development Principles
1130
281
 
1131
- **Migration**: No action needed! Existing increments with GitHub/JIRA/ADO links will continue to sync automatically.
1132
-
1133
- **Documentation**:
1134
- - **Architecture Analysis**: `.specweave/increments/0018-strict-increment-discipline-enforcement/reports/HOOKS-ARCHITECTURE-ANALYSIS.md`
1135
- - **Core Plugin Hooks**: `plugins/specweave/hooks/README.md`
1136
- - **GitHub Plugin Hooks**: `plugins/specweave-github/hooks/README.md`
1137
- - **JIRA Plugin Hooks**: `plugins/specweave-jira/hooks/README.md`
1138
- - **ADO Plugin Hooks**: `plugins/specweave-ado/hooks/README.md`
282
+ See [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md#core-development-principles) for:
283
+ - Source of Truth Discipline
284
+ - Documentation = Code
285
+ - Testing Requirements
286
+ - Incremental Development
287
+ - Multi-Tool Support
1139
288
 
1140
289
  ---
1141
290
 
1142
- **Post-Increment-Planning Hook** (AUTOMATIC after `/specweave:increment`):
1143
-
1144
- **GitHub Issue Auto-Creation**:
1145
-
1146
- **The Critical Problem**: Without automatic GitHub issue creation, increments don't sync to GitHub automatically. This requires manual `/specweave-github:create-issue` calls, which are often forgotten.
1147
-
1148
- **The Solution**: The `post-increment-planning.sh` hook now auto-creates GitHub issues immediately after increment planning completes.
1149
-
1150
- **Issue Title Format** (IMPORTANT):
1151
-
1152
- SpecWeave uses **date-based naming** for GitHub issues to match the Epic folder structure:
1153
-
1154
- | Context | Format | Example | Code Location |
1155
- |---------|--------|---------|---------------|
1156
- | **Increment Issue** | `[FS-YY-MM-DD] Title` | `[FS-25-11-12] External Tool Status Sync` | `post-increment-planning.sh` (line 409) |
1157
- | **Epic/Spec Issue** | `[FS-NNN] Title` | `[FS-031] External Tool Status Sync` | `github-epic-sync.ts` (line 540) |
1158
-
1159
- **Legacy Format** (deprecated): `[INC-0031]` - No longer used in codebase!
1160
-
1161
- The date format (`FS-YY-MM-DD`) is extracted from `metadata.json` creation date and matches the Epic folder naming convention in `.specweave/docs/internal/specs/default/FS-YY-MM-DD-feature-name/`.
1162
-
1163
- **How It Works** (Automatic):
1164
- 1. **Hook Triggers**: After `/specweave:increment` completes planning (spec.md, plan.md, tasks.md created)
1165
- 2. **Auto-Create Check**: Checks if `config.sync.settings.autoCreateIssue` is enabled
1166
- 3. **GitHub CLI Available**: Verifies `gh` CLI is installed and authenticated
1167
- 4. **Issue Creation**:
1168
- - Extracts title from spec.md frontmatter (`title: "..."`)
1169
- - Extracts summary from "Quick Overview" section
1170
- - Generates task checklist from tasks.md (all tasks as GitHub checkboxes)
1171
- - Calls `gh issue create` with proper labels (`specweave`, `increment`)
1172
- - Parses output to get issue number
1173
- 5. **Metadata Update**: Creates/updates `.metadata.json` with GitHub issue number and URL
1174
- 6. **Result**: Increment is now linked to GitHub issue for bidirectional sync!
1175
-
1176
- **Configuration** (`.specweave/config.json`):
1177
- ```json
1178
- {
1179
- "sync": {
1180
- "settings": {
1181
- "autoCreateIssue": true, // ✅ Enable auto-creation!
1182
- "syncDirection": "bidirectional"
1183
- },
1184
- "activeProfile": "specweave-dev",
1185
- "profiles": {
1186
- "specweave-dev": {
1187
- "provider": "github",
1188
- "config": {
1189
- "owner": "anton-abyzov",
1190
- "repo": "specweave"
1191
- }
1192
- }
1193
- }
1194
- }
1195
- }
1196
- ```
291
+ ## Recent Architectural Enhancements (v0.18.3+)
1197
292
 
1198
- **What Gets Created**:
1199
- ```markdown
1200
- # [INC-0016] AI Self-Reflection System
293
+ ### Project-Specific Tasks in User Stories
1201
294
 
1202
- **Status**: Planning Implementation
1203
- **Priority**: P1
1204
- **Increment**: 0016-self-reflection-system
295
+ **New in v0.18.3**: User stories now include project-specific checkable task lists instead of just links to increment tasks.
1205
296
 
1206
- ## Summary
1207
-
1208
- Add AI self-reflection capabilities inspired by Kimi model...
297
+ **Key Changes**:
298
+ 1. **TaskProjectSpecificGenerator** (`src/core/living-docs/task-project-specific-generator.ts`):
299
+ - Filters increment tasks by User Story ID (via AC-IDs)
300
+ - Optional project keyword filtering (backend vs frontend)
301
+ - Preserves completion status from increment tasks.md
1209
302
 
303
+ 2. **User Story File Format** - New `## Tasks` section:
304
+ ```markdown
1210
305
  ## Tasks
1211
306
 
1212
- Progress: 0/30 tasks (0%)
1213
-
1214
- - [ ] T-001: Create Reflection Configuration Schema
1215
- - [ ] T-002: Create Configuration Loader
1216
- - [ ] T-003: Create Git Diff Analyzer
1217
- ... (all 30 tasks)
307
+ - [ ] **T-001**: Setup API endpoint
308
+ - [x] **T-003**: Add DB migration (completed)
1218
309
 
1219
- ## Links
1220
-
1221
- - **Spec**: `spec.md`
1222
- - **Plan**: `plan.md`
1223
- - **Tasks**: `tasks.md`
1224
-
1225
- ---
1226
-
1227
- 🤖 Auto-created by SpecWeave | Updates automatically on task completion
1228
- ```
1229
-
1230
- **Error Handling** (Robust):
1231
- - ✅ **Missing files**: Graceful fallback if spec.md or tasks.md missing
1232
- - ✅ **Title extraction**: Multiple fallbacks (frontmatter → heading → increment ID)
1233
- - ✅ **Overview extraction**: Tries "Quick Overview", "Summary", or first paragraph
1234
- - ✅ **Task count**: Extracts from frontmatter or counts tasks
1235
- - ✅ **GitHub CLI failures**: Non-blocking (logs error, continues)
1236
- - ✅ **Duplicate prevention**: Checks metadata.json for existing issue number
1237
- - ✅ **Repository detection**: Auto-detects from git remote or config
1238
-
1239
- **Manual Override** (When Needed):
1240
- ```bash
1241
- # Disable auto-create for one increment
1242
- # Just don't set autoCreateIssue in config
1243
-
1244
- # Or create manually if auto-create failed
1245
- /specweave-github:create-issue 0016
1246
-
1247
- # Check if issue was created
1248
- cat .specweave/increments/0016-self-reflection-system/metadata.json
1249
- # Should show: "github": {"issue": 30, "url": "..."}
1250
- ```
1251
-
1252
- **Why This Matters**:
1253
- - ✅ **Zero manual work**: Issues auto-create on every increment
1254
- - ✅ **Immediate tracking**: Increment linked to GitHub from start
1255
- - ✅ **Bidirectional sync**: Task completion updates GitHub automatically
1256
- - ✅ **Team visibility**: Stakeholders see progress in GitHub without asking
1257
- - ✅ **Audit trail**: All increments tracked in one place
1258
- - ✅ **DORA metrics**: Automatic deployment frequency tracking
1259
-
1260
- **Workflow Example**:
1261
- ```bash
1262
- # 1. Create increment
1263
- /specweave:increment "AI self-reflection system"
1264
-
1265
- # 2. Hook auto-fires:
1266
- # 🔗 Checking GitHub issue auto-creation...
1267
- # 📦 Auto-create enabled, checking for GitHub CLI...
1268
- # ✓ GitHub CLI found
1269
- # 🚀 Creating GitHub issue for 0016-self-reflection-system...
1270
- # 📝 Issue #30 created
1271
- # 🔗 https://github.com/anton-abyzov/specweave/issues/30
1272
- # ✅ metadata.json updated
1273
-
1274
- # 3. Start work
1275
- /specweave:do
1276
-
1277
- # 4. Complete tasks → GitHub updates automatically via post-task-completion hook!
310
+ > **Note**: Tasks are project-specific. See increment tasks.md for full list
1278
311
  ```
1279
312
 
1280
- **Requirements**:
1281
- - GitHub CLI (`gh`) installed and authenticated (`gh auth login`)
1282
- - Repository with GitHub remote configured
1283
- - `autoCreateIssue: true` in config.json
1284
- - Write permissions to repository
1285
-
1286
- ---
1287
-
1288
- **✅ Metadata Validation & Fallback Creation**:
1289
-
1290
- **The Problem**: Hook failures (no GitHub CLI, network issues, permission problems) left increments without metadata.json, breaking status line, WIP limits, and external sync.
1291
-
1292
- **The Solution**: Multi-layer validation ensures 100% metadata.json coverage.
1293
-
1294
- **How It Works**:
1295
-
1296
- **Layer 1: Hook Fallback** (Automatic)
1297
- - After GitHub issue creation (success or fail)
1298
- - Hook validates metadata.json exists
1299
- - If missing → creates minimal metadata automatically
1300
- - User sees warning + manual fix instructions
1301
-
1302
- ```bash
1303
- # Hook output example (GitHub CLI not found):
1304
- 🔗 Checking GitHub issue auto-creation...
1305
- ⚠️ GitHub CLI (gh) not found, skipping issue creation
1306
-
1307
- 🔍 Validating metadata.json existence...
1308
- ⚠️ metadata.json not found (hook may have failed)
1309
- 📝 Creating minimal metadata as fallback...
1310
- ✅ Created minimal metadata.json
1311
- ⚠️ Note: No GitHub issue linked
1312
- 💡 Run /specweave-github:create-issue 0023-feature to create one manually
1313
- ```
1314
-
1315
- **Layer 2: PM Agent Validation** (Automatic)
1316
- - PM agent checks metadata.json after creating spec/plan/tasks
1317
- - If missing → creates minimal metadata + warns user
1318
- - Shows GitHub issue status (linked or not)
1319
-
1320
- ```markdown
1321
- ✅ Increment validation passed - metadata.json exists
1322
- ✅ GitHub issue #45 linked
1323
- 🔗 https://github.com/anton-abyzov/specweave/issues/45
1324
- ```
1325
-
1326
- **Layer 3: Lazy Initialization** (Fallback)
1327
- - `MetadataManager.read()` creates metadata on first access
1328
- - Used by `/specweave:status`, `/pause`, `/resume` commands
1329
- - Creates basic metadata but WITHOUT GitHub info
1330
-
1331
- **Minimal Metadata Format** (when GitHub fails):
1332
- ```json
1333
- {
1334
- "id": "0023-release-management-enhancements",
1335
- "status": "active",
1336
- "type": "feature",
1337
- "created": "2025-11-11T15:43:00Z",
1338
- "lastActivity": "2025-11-11T15:43:00Z"
1339
- }
1340
- ```
1341
-
1342
- **Full Metadata Format** (when GitHub succeeds):
1343
- ```json
1344
- {
1345
- "id": "0016-self-reflection-system",
1346
- "status": "active",
1347
- "type": "feature",
1348
- "created": "2025-11-10T12:00:00Z",
1349
- "lastActivity": "2025-11-10T12:00:00Z",
1350
- "github": {
1351
- "issue": 30,
1352
- "url": "https://github.com/anton-abyzov/specweave/issues/30",
1353
- "synced": "2025-11-10T12:00:00Z"
1354
- },
1355
- "githubProfile": "specweave-dev"
1356
- }
1357
- ```
313
+ 3. **GitHub Sync** - Issues now have checkable task lists:
314
+ - Stakeholders can tick/untick tasks in GitHub
315
+ - Task completion syncs from user story files
316
+ - Backward compatible (falls back to legacy extraction)
1358
317
 
1359
318
  **Benefits**:
1360
- - **100% coverage**: Every increment gets metadata.json (no silent failures)
1361
- - **Immediate feedback**: User knows if GitHub issue creation failed
1362
- - **Graceful degradation**: Creates minimal metadata as fallback
1363
- - **Clear next steps**: Shows manual fix command if needed
1364
- - ✅ **Status line works**: Even without GitHub integration
1365
- - ✅ **WIP limits work**: Counts active increments correctly
1366
-
1367
- **Configuration Note**:
1368
-
1369
- The old config key `hooks.post_increment_planning.auto_create_github_issue` is **deprecated**.
1370
-
1371
- ```json
1372
- {
1373
- "hooks": {
1374
- "post_increment_planning": {
1375
- // ❌ REMOVED (deprecated)
1376
- // "auto_create_github_issue": false
1377
- }
1378
- },
1379
- "sync": {
1380
- "settings": {
1381
- "autoCreateIssue": true // ✅ Use this instead
1382
- }
1383
- }
1384
- }
1385
- ```
1386
-
1387
- **Single source of truth**: `sync.settings.autoCreateIssue`
1388
-
1389
- ---
1390
-
1391
- ## Status Line Feature
1392
-
1393
- <1ms render, auto-updates after tasks, multi-window support, external edit detection. Shows most recent increment progress. See [Status Line Guide](https://spec-weave.com/docs/learn/status-line).
1394
-
1395
- ---
1396
-
1397
- ## Plugins
1398
-
1399
- **SpecWeave is built 100% on [Claude Code's native plugin system](https://docs.claude.com/en/docs/claude-code/plugins)**.
1400
-
1401
- ### Architecture: Everything is a Plugin
1402
-
1403
- **Critical Understanding**: SpecWeave doesn't have a "core framework" separate from plugins. Instead:
1404
-
1405
- ```
1406
- SpecWeave = Collection of Claude Code Plugins
1407
- ├── specweave (auto-installed) ← The "framework" IS a plugin
1408
- ├── specweave-github (auto-installed)
1409
- ├── specweave-figma (auto-installed)
1410
- └── ...all 19+ plugins (auto-installed)
1411
- ```
1412
-
1413
- **What this means**:
1414
- - ✅ `specweave` is a Claude Code plugin (happens to auto-load)
1415
- - ✅ All plugins follow identical structure (`.claude-plugin/plugin.json`, `skills/`, `agents/`, `commands/`)
1416
- - ✅ Adding a skill = adding it to a plugin (always)
1417
- - ❌ There are NO "core framework components" outside plugins
1418
-
1419
- **Why this matters**:
1420
- - Uniform architecture (no special cases)
1421
- - All plugins discoverable via Claude Code's plugin system
1422
- - Easy to extend (just add another plugin)
1423
- - Future-proof (follows Anthropic's standards)
1424
-
1425
- **Further reading**:
1426
- - 📖 [Claude Code Plugin Docs](https://docs.claude.com/en/docs/claude-code/plugins)
1427
- - 📖 [Plugin Reference](https://docs.claude.com/en/docs/claude-code/plugins-reference)
1428
- - 📖 [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)
1429
-
1430
- ### Available SpecWeave Plugins
1431
-
1432
- **Location**: `plugins/` (root level)
1433
-
1434
- **Discovery**:
1435
- - Browse all plugins: `ls plugins/` or check [.claude-plugin/marketplace.json](/.claude-plugin/marketplace.json)
1436
- - Live catalog: See `.claude-plugin/README.md` for current marketplace contents
1437
- - **All plugins automatically installed** during `specweave init` (no manual selection needed)
1438
-
1439
- **Plugin Structure** (all follow same pattern):
1440
- ```
1441
- plugins/specweave-{name}/
1442
- ├── .claude-plugin/plugin.json # Claude native manifest
1443
- ├── skills/ # Auto-activating capabilities (SKILL.md files)
1444
- ├── agents/ # Specialized AI agents (AGENT.md files)
1445
- ├── commands/ # Slash commands (.md files)
1446
- └── lib/ # TypeScript utilities (optional)
1447
- ```
1448
-
1449
- **Key Plugins** (for reference - all auto-installed):
1450
- - `specweave` - Framework essentials
1451
- - `specweave-github` - GitHub Issues integration
1452
- - `specweave-{frontend|backend|infrastructure}` - Tech stack plugins
1453
-
1454
- **For complete list**: Check `plugins/` directory or marketplace.json
1455
-
1456
- ### Plugin Decision Tree
1457
-
1458
- **Key Insight**: In Claude Code's plugin system, EVERYTHING is a plugin. The only question is: **Which plugin does this belong to?**
1459
-
1460
- **Decision**: Which plugin should contain this feature?
1461
-
1462
- ```
1463
- Is this feature...
1464
- ├─ Used by EVERY project? → specweave (auto-loaded)
1465
- │ Examples: increment-planner, spec-generator, tdd-workflow, PM/Architect agents
1466
-
1467
- ├─ Part of increment lifecycle? → specweave (auto-loaded)
1468
- │ Examples: /specweave:increment, /specweave:do, living docs hooks
1469
-
1470
- ├─ Tech stack specific? → New plugin: specweave-{stack}
1471
- │ Examples: specweave-frontend (React, Next.js), specweave-kubernetes
1472
-
1473
- ├─ Domain expertise? → New plugin: specweave-{domain}
1474
- │ Examples: specweave-ml (TensorFlow), specweave-payments (Stripe)
1475
-
1476
- ├─ External integration? → New plugin: specweave-{tool}
1477
- │ Examples: specweave-github, specweave-jira, specweave-figma
1478
-
1479
- └─ Optional enhancement? → New plugin: specweave-{feature}
1480
- Examples: specweave-diagrams, specweave-cost-optimizer
1481
- ```
1482
-
1483
- **Plugin Structure** (all follow Claude Code's standard):
1484
- ```
1485
- plugins/specweave-{name}/
1486
- ├── .claude-plugin/plugin.json # Required
1487
- ├── skills/ # Optional
1488
- ├── agents/ # Optional
1489
- ├── commands/ # Optional
1490
- └── hooks/ # Optional
1491
- ```
1492
-
1493
- **Result**: Core plugin stayed at ~12K tokens (75% smaller than v0.3.7!)
1494
-
1495
- ### Plugin Manifest Validation Rules
1496
-
1497
- **CRITICAL**: Claude Code enforces strict validation on plugin.json manifests. Follow these rules to avoid loading errors:
1498
-
1499
- #### Required Format
319
+ - **Project Isolation**: Backend tasks Frontend tasks
320
+ - **Traceability**: Each user story explicitly lists its tasks
321
+ - **GitHub UX**: Checkable task lists in issues
322
+ - **Completion Tracking**: Status preserved from increment
1500
323
 
1501
- ```json
1502
- {
1503
- "name": "specweave-plugin-name",
1504
- "description": "What it does and when to use it",
1505
- "version": "1.0.0",
1506
- "author": {
1507
- "name": "Author Name",
1508
- "url": "https://example.com"
1509
- },
1510
- "repository": "https://github.com/owner/repo",
1511
- "homepage": "https://example.com",
1512
- "license": "MIT",
1513
- "keywords": ["keyword1", "keyword2"]
1514
- }
324
+ **Data Flow**:
1515
325
  ```
1516
-
1517
- #### Validation Rules
1518
-
1519
- | Field | Type | Rules | Example |
1520
- |-------|------|-------|---------|
1521
- | **name** | string | Required, lowercase, hyphens only | `"specweave-github"` |
1522
- | **description** | string | Required, max 1024 chars | `"GitHub integration..."` |
1523
- | **version** | string | Required, semver format | `"1.0.0"` |
1524
- | **author** | object | Required, with name field | `{"name": "Team"}` |
1525
- | **repository** | string | Must be string, NOT object | `"https://github.com/..."` ✅ |
1526
- | **keywords** | array | Optional, array of strings | `["github", "sync"]` |
1527
- | **homepage** | string | Optional, URL | `"https://spec-weave.com"` |
1528
- | **license** | string | Optional, SPDX identifier | `"MIT"` |
1529
-
1530
- #### Common Validation Errors
1531
-
1532
- **❌ repository: Expected string, received object**
1533
- ```json
1534
- // WRONG
1535
- "repository": {
1536
- "type": "git",
1537
- "url": "https://github.com/..."
1538
- }
1539
-
1540
- // CORRECT
1541
- "repository": "https://github.com/..."
1542
- ```
1543
-
1544
- **❌ Unrecognized key(s): 'engines', 'dependencies'**
1545
- ```json
1546
- // WRONG - These are NPM fields, not Claude plugin fields
1547
- "engines": {"node": ">=18.0.0"},
1548
- "dependencies": {"specweave": ">=0.14.0"}
1549
-
1550
- // CORRECT - Omit these fields entirely
1551
- // Claude plugins don't support dependency declaration
326
+ Increment tasks.md (All tasks, source of truth)
327
+
328
+ TaskProjectSpecificGenerator (Filters by US + Project)
329
+
330
+ User Story ## Tasks Section (Project-specific checkboxes)
331
+
332
+ GitHub Issue (Checkable task list for stakeholders)
1552
333
  ```
1553
334
 
1554
- **❌ skills/agents/commands: Invalid input**
1555
- ```json
1556
- // WRONG - Directory references not supported in plugin.json
1557
- "skills": "skills",
1558
- "agents": "agents",
1559
- "commands": "commands"
1560
-
1561
- // CORRECT - Omit these fields entirely
1562
- // Claude Code auto-discovers skills/, agents/, commands/ by convention
1563
- ```
1564
-
1565
- #### Auto-Discovery vs Explicit Declaration
1566
-
1567
- **Claude Code auto-discovers components by directory convention**:
1568
- - `skills/` directory → auto-discovered (no plugin.json field needed)
1569
- - `agents/` directory → auto-discovered (no plugin.json field needed)
1570
- - `commands/` directory → auto-discovered (no plugin.json field needed)
1571
- - `hooks/hooks.json` → auto-discovered (no plugin.json field needed)
1572
-
1573
- **Example: Working plugin.json**
1574
- ```json
1575
- {
1576
- "name": "specweave-github",
1577
- "description": "GitHub integration",
1578
- "version": "1.0.0",
1579
- "author": {"name": "SpecWeave Team"},
1580
- "repository": "https://github.com/anton-abyzov/specweave",
1581
- "license": "MIT",
1582
- "keywords": ["github", "sync"]
1583
- }
1584
- ```
1585
-
1586
- **Directory structure** (auto-discovered):
1587
- ```
1588
- plugins/specweave-github/
1589
- ├── .claude-plugin/
1590
- │ └── plugin.json ← Plugin metadata only
1591
- ├── skills/ ← Auto-discovered
1592
- │ └── github-sync/
1593
- ├── agents/ ← Auto-discovered
1594
- │ └── github-manager/
1595
- ├── commands/ ← Auto-discovered
1596
- │ └── github-sync.md
1597
- └── hooks/
1598
- ├── hooks.json ← Auto-discovered
1599
- └── post-task-completion.sh
1600
- ```
1601
-
1602
- #### Quick Validation Checklist
1603
-
1604
- Before committing a new plugin:
1605
- - [ ] repository is a string, not an object
1606
- - [ ] No NPM-specific fields (engines, dependencies)
1607
- - [ ] No directory references in plugin.json (skills, agents, commands, hooks)
1608
- - [ ] Valid JSON syntax (use `jq . < plugin.json` to validate)
1609
- - [ ] Test with: `/plugin marketplace add ./.claude-plugin && /plugin install plugin-name`
1610
-
1611
- ### Adding a New Plugin (Contributors)
1612
-
1613
- **Create New Plugin**:
1614
- ```bash
1615
- # 1. Create plugin structure
1616
- mkdir -p plugins/specweave-myplugin/{.claude-plugin,skills,agents,commands,lib}
1617
-
1618
- # 2. Create plugin.json (Claude native format)
1619
- cat > plugins/specweave-myplugin/.claude-plugin/plugin.json << 'EOF'
1620
- {
1621
- "name": "specweave-myplugin",
1622
- "description": "What it does and when to use it",
1623
- "version": "1.0.0",
1624
- "author": {"name": "Your Name"},
1625
- "repository": "https://github.com/anton-abyzov/specweave",
1626
- "homepage": "https://spec-weave.com",
1627
- "license": "MIT",
1628
- "keywords": ["specweave", "plugin"]
1629
- }
1630
- EOF
1631
-
1632
- # 3. Add components (see Claude docs for format):
1633
- # - skills/my-skill/SKILL.md
1634
- # - agents/my-agent/AGENT.md
1635
- # - commands/my-command.md
1636
- # - lib/my-utility.ts (optional)
1637
-
1638
- # 4. Add to marketplace
1639
- vim .claude-plugin/marketplace.json
1640
- # Add entry:
1641
- # {
1642
- # "name": "specweave-myplugin",
1643
- # "description": "What it does and when to use it",
1644
- # "source": "../plugins/specweave-myplugin"
1645
- # }
1646
-
1647
- # 5. Test locally
1648
- /plugin marketplace add ./.claude-plugin
1649
- /plugin install specweave-myplugin
1650
- ```
1651
-
1652
- **See**: [.claude-plugin/README.md](/.claude-plugin/README.md) for marketplace documentation
1653
-
1654
- ---
1655
-
1656
- ## Multi-Project Sync Architecture
1657
-
1658
- **SpecWeave supports syncing increments to unlimited external repositories** (GitHub, JIRA, Azure DevOps) with intelligent rate limiting and time range filtering.
1659
-
1660
- **Quick Summary**:
1661
- - ✅ **Local is source of truth** - `.specweave/` → External tools (mirrors)
1662
- - ✅ **3-layer architecture** - Credentials → Profiles → Per-increment metadata
1663
- - ✅ **Unlimited profiles** - Frontend → repo-A, Backend → repo-B, Client-C → repo-C
1664
- - ✅ **Smart project detection** - Auto-selects profile based on keywords
1665
- - ✅ **Time range filtering** - 1W/1M/3M/6M/ALL (prevents rate limit issues)
1666
- - ✅ **Rate limit protection** - Pre-flight validation, safe thresholds
1667
-
1668
- **Example**:
1669
- ```bash
1670
- # Interactive sync (selects time range)
1671
- /specweave-github:sync 0004
1672
-
1673
- # Specify time range (recommended: 1M)
1674
- /specweave-github:sync 0004 --time-range 1M
1675
- ```
1676
-
1677
- **For complete architecture, configuration, profiles, project contexts, and time range filtering**: See [Multi-Project Sync Architecture](https://spec-weave.com/docs/integrations/multi-project-sync) (comprehensive guide with 3-layer architecture, rate limiting, smart detection, and migration guide)
1678
-
1679
- ---
1680
-
1681
- ## Key SpecWeave Principles (for Contributors)
1682
-
1683
- ### 1. Source of Truth Discipline
1684
- - `src/` is ALWAYS the source of truth
1685
- - `.claude/` is ALWAYS installed/generated (never edit directly)
1686
- - Keep root folder clean (use increment folders)
1687
-
1688
- ### 2. Documentation = Code
1689
- - All changes must update relevant documentation
1690
- - ADRs for architecture decisions
1691
- - RFCs for feature proposals
1692
- - Inline code comments for complex logic
1693
-
1694
- ### 3. Testing is Non-Negotiable
1695
- - E2E tests MANDATORY for UI features (Playwright)
1696
- - 80%+ coverage for critical paths
1697
- - Tests must tell the truth (no false positives)
1698
-
1699
- ### 4. Incremental Development
1700
- - Work in small, measurable increments
1701
- - Use SpecWeave's own workflow (`/specweave:increment`, `/specweave:do`, etc.)
1702
- - All work traces back to specs
1703
-
1704
- ### 5. Adapter-First Design
1705
- - Core framework must be tool-agnostic
1706
- - Tool-specific features in adapters only
1707
- - Plain Markdown + YAML = maximum portability
335
+ **See Also**:
336
+ - Implementation: `.specweave/increments/0034-github-ac-checkboxes-fix/reports/PROJECT-SPECIFIC-TASKS-IMPLEMENTATION-COMPLETE.md`
337
+ - Architecture: `.specweave/increments/0034-github-ac-checkboxes-fix/reports/ULTRATHINK-PROJECT-SPECIFIC-TASKS-ARCHITECTURE.md`
1708
338
 
1709
339
  ---
1710
340
 
1711
- ## Release Process
1712
-
1713
- ### Versioning Strategy
1714
-
1715
- **IMPORTANT**: SpecWeave follows semantic versioning (semver), but version bumps are **MANUAL** and controlled:
1716
-
1717
- **The Rules**:
1718
- - ✅ **Patch version** (0.7.X) - Increment ONLY when explicitly requested by maintainer
1719
- - ✅ **Minor version** (0.X.0) - Increment ONLY when maintainer says to
1720
- - ✅ **Major version** (X.0.0) - Increment ONLY when maintainer says to
1721
- - ❌ **NEVER auto-increment** versions after each increment completion
1722
-
1723
- **Why Manual Control?**
1724
- - Multiple increments may be part of the same release (e.g., 0.7.0 = increments 0006 + 0007 + 0008)
1725
- - Version bumps signal user-facing releases, not internal development progress
1726
- - Maintainer decides when features are ready to ship
1727
- - Prevents version number inflation (e.g., jumping from 0.7.0 to 0.12.0 in one day)
1728
-
1729
- **When Completing Increments**:
1730
- ```bash
1731
- # ❌ WRONG - Don't auto-bump version
1732
- git commit -m "feat: complete increment 0008"
1733
- npm version patch # ❌ NO! Wait for maintainer approval
1734
-
1735
- # ✅ CORRECT - Just commit the work
1736
- git commit -m "feat: complete increment 0008"
1737
- # Version stays at 0.7.0 until maintainer says to bump
1738
- ```
341
+ ## Build & Test
1739
342
 
1740
- **When Maintainer Requests Version Bump**:
1741
343
  ```bash
1742
- # Maintainer says: "Bump to 0.7.1"
1743
- npm version patch # ✅ Now bump
1744
- npm publish # ✅ And publish
344
+ # Build
345
+ npm run build
1745
346
 
1746
- # Maintainer says: "Bump to 0.8.0"
1747
- npm version minor # New minor version
1748
- npm publish
347
+ # Test
348
+ npm test # Unit tests
349
+ npm run test:e2e # E2E tests (Playwright)
350
+ npm run test:integration # Integration tests
1749
351
  ```
1750
352
 
1751
- **Summary**: Complete increments → commit code → maintainer decides when to bump version and publish.
1752
-
1753
- ---
1754
-
1755
- ### Release Process (Automated via GitHub Actions)
1756
-
1757
- **CRITICAL**: GitHub releases and NPM versions MUST ALWAYS be in sync!
1758
-
1759
- **Automated Release Workflow** (`.github/workflows/release.yml`):
1760
-
1761
- The release process is fully automated via GitHub Actions. To publish a new version:
1762
-
1763
- 1. **Update CHANGELOG.md** first (manually):
1764
- ```bash
1765
- vim CHANGELOG.md
1766
- # Add new version section with release notes
1767
- # Commit: git commit -m "docs: update changelog for v0.8.19"
1768
- ```
1769
-
1770
- 2. **Trigger GitHub Actions Workflow**:
1771
- - Go to: https://github.com/anton-abyzov/specweave/actions/workflows/release.yml
1772
- - Click "Run workflow"
1773
- - Select branch: `develop`
1774
- - Enter version: e.g., `0.8.19`
1775
- - Select version type: `patch`, `minor`, or `major`
1776
- - Click "Run workflow"
1777
-
1778
- 3. **What the workflow does automatically**:
1779
- - ✅ Runs tests (`npm test`)
1780
- - ✅ Builds project (`npm run build`)
1781
- - ✅ Bumps version in `package.json`
1782
- - ✅ Verifies version matches input
1783
- - ✅ Extracts release notes from CHANGELOG.md
1784
- - ✅ Commits version bump
1785
- - ✅ Creates and pushes git tag (`v0.8.19`)
1786
- - ✅ **Publishes to NPM** (with provenance)
1787
- - ✅ **Creates GitHub Release** (with CHANGELOG notes)
1788
- - ✅ Notifies success/failure
1789
-
1790
- **Result**: NPM package and GitHub release are created together atomically.
1791
-
1792
- **Manual Release (Emergency Only)**:
1793
- ```bash
1794
- # Only if GitHub Actions is down or fails
1795
- # 1. Update version
1796
- npm version patch|minor|major
1797
-
1798
- # 2. Build and test
1799
- npm run build && npm test && npm run test:e2e
1800
-
1801
- # 3. Publish to NPM
1802
- npm publish --provenance --access public
1803
-
1804
- # 4. Create GitHub release
1805
- gh release create v$(node -p "require('./package.json').version") \
1806
- --title "v$(node -p "require('./package.json').version")" \
1807
- --notes-file /tmp/release-notes.md
1808
-
1809
- # 5. Push tags
1810
- git push origin develop --tags
1811
- ```
1812
-
1813
- **Installation Methods**:
1814
- 1. **NPM**: `npm install -g specweave`
1815
- 2. **Script**: `curl -fsSL https://spec-weave.com/install.sh | bash`
1816
- 3. **Manual**: Clone repo, `npm install`, `npm run build`
1817
-
1818
- ---
1819
-
1820
- ## Adapter System (Legacy)
1821
-
1822
- **SpecWeave is Claude Code-first** - The framework is designed specifically for Claude Code's native capabilities.
1823
-
1824
- **Primary Tool**:
1825
- - ✅ **Claude Code** - Native support (slash commands, agents, skills, hooks, MCP)
1826
-
1827
- **Legacy Multi-Tool Support** (may be removed):
1828
- - ⚠️ Cursor (via `.cursorrules` + AGENTS.md compilation)
1829
- - ⚠️ Generic (via AGENTS.md, for Copilot/ChatGPT/Gemini/etc.)
1830
-
1831
- **Why Claude-First?**
1832
- The adapter system was originally designed to support multiple tools, but this added significant complexity without meaningful benefit. Claude Code provides:
1833
- - ✅ **Native plugin marketplace** - No compilation needed
1834
- - ✅ **Auto-activating skills** - No manual @ mentions
1835
- - ✅ **Isolated agent contexts** - True role separation
1836
- - ✅ **Pre/post lifecycle hooks** - Automated living docs sync
1837
- - ✅ **MCP protocol** - Industry standard for context management
1838
-
1839
- Other tools simply can't match these capabilities. The adapters remain in the codebase for now but are considered legacy and may be removed in a future version.
1840
-
1841
- **See**: "Why Claude Code is Best-in-Class" section above for detailed comparison
353
+ **Coverage Requirements**:
354
+ - Critical paths: 90%+
355
+ - Overall: 80%+
1842
356
 
1843
357
  ---
1844
358
 
@@ -1846,152 +360,52 @@ Other tools simply can't match these capabilities. The adapters remain in the co
1846
360
 
1847
361
  ### Adding Skills, Agents, or Commands
1848
362
 
1849
- **All components go into plugins** (see "Plugins" section above for complete instructions).
1850
-
1851
- **Quick reference**:
363
+ **All components go into plugins**:
1852
364
  - **Core components**: `plugins/specweave/{skills|agents|commands|hooks}/`
1853
365
  - **Plugin components**: `plugins/specweave-{name}/{skills|agents|commands}/`
1854
366
  - **Tests**: `tests/integration/{component-name}/` or `tests/unit/`
1855
367
 
1856
- **For detailed instructions**: See "Adding a New Plugin (Contributors)" section above
368
+ **See**: `.github/CONTRIBUTING.md` for complete instructions
1857
369
 
1858
- ### Update Documentation
370
+ ### Updating Documentation
1859
371
 
1860
372
  ```bash
1861
- # Internal docs (architecture, ADRs, RFCs)
373
+ # Internal docs (architecture, ADRs)
1862
374
  vim .specweave/docs/internal/architecture/hld-system.md
1863
375
 
1864
- # Public docs (user-facing guides, can be published)
376
+ # Public docs (user-facing guides)
1865
377
  vim .specweave/docs/public/guides/user-guide.md
1866
- vim docs-site/docs/guides/getting-started.md
1867
378
 
1868
379
  # Build docs site
1869
380
  cd docs-site && npm run build
1870
381
  ```
1871
382
 
1872
- ### Translation Workflow
1873
-
1874
- Two-phase post-generation: Phase 1 (increment files), Phase 2 (ADRs/HLDs). 9 languages, ~$0.02/increment, 100% auto. See [Translation Guide](https://spec-weave.com/docs/learn/translation).
1875
-
1876
383
  ---
1877
384
 
1878
385
  ## Troubleshooting
1879
386
 
1880
387
  **Skills not activating?**
1881
- 1. Check plugin is installed: `/plugin list --installed`
1882
- 2. Verify YAML frontmatter in `plugins/{plugin}/skills/{skill}/SKILL.md`
388
+ 1. Check plugin installed: `/plugin list --installed`
389
+ 2. Verify YAML frontmatter in skill SKILL.md
1883
390
  3. Restart Claude Code
1884
- 4. Check description has clear trigger keywords
391
+ 4. Check description has trigger keywords
1885
392
 
1886
393
  **Commands not working?**
1887
- 1. Check plugin is installed: `/plugin list --installed`
1888
- 2. Verify command exists: `plugins/{plugin}/commands/{command}.md`
1889
- 3. Check YAML frontmatter
1890
- 4. Restart Claude Code
394
+ 1. Check plugin installed: `/plugin list --installed`
395
+ 2. Verify command exists in plugin
396
+ 3. Restart Claude Code
1891
397
 
1892
398
  **Tests failing?**
1893
399
  1. Run `npm run build` first
1894
- 2. Check test output for specific errors
400
+ 2. Check test output
1895
401
  3. Verify test data in `tests/fixtures/`
1896
- 4. Check Playwright browser install: `npx playwright install`
1897
402
 
1898
403
  **Root folder polluted?**
1899
- 1. Identify which increment created the files
1900
- 2. Move to `.specweave/increments/####/reports/`
1901
- 3. Update `.gitignore` if needed
1902
-
1903
- **Plugin hooks not working? (Development Setup)**
1904
-
1905
- **Symptom 1**: Errors like `"post-task-completion.sh: No such file or directory"` after TodoWrite
1906
- **Symptom 2**: `✘ Plugin 'specweave' not found in marketplace 'specweave'`
1907
-
1908
- **Root Cause**: Two common issues:
1909
- 1. **No symlink**: Directory doesn't exist at `~/.claude/plugins/marketplaces/specweave`
1910
- 2. **No registration**: Marketplace not registered with Claude Code (common after updates/restarts)
1911
-
1912
- **The Key Insight**:
1913
- - ✅ **Symlink**: Creates directory structure for hooks
1914
- - ✅ **Registration**: Tells Claude Code where to find plugins
1915
- - ⚠️ **Both required**: Having one without the other breaks functionality!
1916
-
1917
- **🚀 Automated Setup (Recommended)**:
1918
-
1919
- ```bash
1920
- # Run smart setup script (auto-detects and fixes BOTH issues)
1921
- ./scripts/setup-dev-plugins.sh
1922
-
1923
- # What it does:
1924
- # 1. Detects environment (local vs VM)
1925
- # 2. Creates/verifies symlink
1926
- # 3. ✨ NEW: Checks marketplace registration
1927
- # 4. ✨ NEW: Auto-registers if missing
1928
- # 5. Installs core plugins
1929
- # 6. Verifies everything works
1930
- ```
1931
-
1932
- **Environment Detection**:
1933
- - **Local machine** → Symlink + Registration (instant updates)
1934
- - **claude.ai/code VM** → GitHub marketplace (reliable, auto-clones)
1935
- - **Codespaces/Gitpod** → GitHub marketplace (cloud-friendly)
404
+ 1. Move files to `.specweave/increments/####/reports/`
405
+ 2. Update `.gitignore` if needed
1936
406
 
1937
- **Manual Fix (If Script Fails)**:
1938
-
1939
- **Step 1: Check Registration**
1940
- ```bash
1941
- # See if marketplace is registered
1942
- claude plugin marketplace list
1943
-
1944
- # If empty or no "specweave" → Need to register!
1945
- ```
1946
-
1947
- **Step 2: Fix Registration**
1948
- ```bash
1949
- # Register marketplace (use PROJECT ROOT, not .claude-plugin!)
1950
- claude plugin marketplace add /Users/antonabyzov/Projects/github/specweave
1951
-
1952
- # OR from within project:
1953
- cd /path/to/specweave
1954
- claude plugin marketplace add $(pwd)
1955
-
1956
- # Verify it worked
1957
- claude plugin marketplace list
1958
- # Should show: ❯ specweave (Source: Directory /path/to/specweave)
1959
- ```
1960
-
1961
- **Step 3: Install Plugins**
1962
- ```bash
1963
- # Now plugins should install successfully
1964
- claude plugin install specweave
1965
- claude plugin install specweave-github
1966
- claude plugin install specweave-jira
1967
- claude plugin install specweave-ado
1968
- ```
1969
-
1970
- **Alternative: Use GitHub Marketplace** (VM/Cloud)
1971
- ```bash
1972
- # Remove local marketplace
1973
- claude plugin marketplace remove specweave
1974
-
1975
- # Add from GitHub (like production users)
1976
- claude plugin marketplace add anton-abyzov/specweave
1977
-
1978
- # Install plugins (should work immediately)
1979
- claude plugin install specweave
1980
- claude plugin install specweave-github
1981
- ```
1982
-
1983
- **Benefits**:
1984
- - ✅ **Local + Registration**: Instant updates + Plugin installation works
1985
- - ✅ **VM (GitHub)**: Always reliable, no registration issues
1986
- - ✅ **Automated script**: Handles both symlink AND registration
1987
- - ✅ **Self-healing**: Re-running script fixes broken registrations
1988
-
1989
- **Why This Matters**:
1990
- - **Production users**: No issue (GitHub marketplace via `specweave init`)
1991
- - **Contributors**: Need both symlink AND registration (script handles it)
1992
- - **After Claude Code updates**: Registration can be lost (script detects and fixes)
1993
-
1994
- **Documentation**: See `.specweave/increments/0030-intelligent-living-docs/reports/MARKETPLACE-REGISTRATION-FIX.md` for complete analysis
407
+ **Plugin hooks not working? (Development)**
408
+ See `.claude/CONTRIBUTING.md` for plugin marketplace setup.
1995
409
 
1996
410
  ---
1997
411
 
@@ -2007,69 +421,67 @@ claude plugin install specweave-github
2007
421
  - Discussions: https://github.com/anton-abyzov/specweave/discussions
2008
422
 
2009
423
  **Current Increment**:
2010
- - Spec: `.specweave/increments/0002-core-enhancements/spec.md`
2011
- - Plan: `.specweave/increments/0002-core-enhancements/plan.md`
2012
- - Tasks: `.specweave/increments/0002-core-enhancements/tasks.md`
424
+ ```bash
425
+ /specweave:status # Show all increments
426
+ ```
2013
427
 
2014
428
  ---
2015
429
 
2016
430
  ## Quick Reference
2017
431
 
2018
- **Commands (for SpecWeave development)**:
432
+ **Commands** (all use `/specweave:*` namespace):
2019
433
 
2020
- **IMPORTANT**: All commands MUST use the `/specweave:*` namespace prefix to avoid conflicts with Claude Code's native commands.
2021
-
2022
- *Primary commands*:
434
+ *Primary*:
2023
435
  - `/specweave:increment "feature"` - Plan new increment
2024
- - `/specweave:do` - Execute tasks (smart resume)
436
+ - `/specweave:do` - Execute tasks
2025
437
  - `/specweave:done 0002` - Close increment
2026
438
  - `/specweave:validate 0002` - Validate increment
2027
- - `/specweave:qa 0002` - Quality assessment with risk scoring
2028
- - `/specweave:status` - Show increment status overview
2029
- - `/specweave:progress` - Check current increment progress
2030
- - `/specweave:check-tests` - Validate test coverage (NEW format)
2031
-
2032
- *State management (mostly automatic)*:
2033
- - `/specweave:pause 0002 --reason="..."` - Pause active increment
2034
- - `/specweave:resume 0002` - Resume paused increment
2035
- - `/specweave:abandon 0002 --reason="..."` - Abandon increment
2036
-
2037
- *Documentation sync*:
2038
- - `/specweave:sync-docs update` - Sync living docs after implementation
2039
- - `/specweave:sync-tasks` - Sync tasks with completion status
2040
-
2041
- *Other commands*:
2042
- - `/specweave:costs` - Show AI cost dashboard
439
+ - `/specweave:qa 0002` - Quality assessment
440
+ - `/specweave:status` - Show status
441
+ - `/specweave:progress` - Check progress
442
+
443
+ *State management*:
444
+ - `/specweave:pause 0002 --reason="..."` - Pause
445
+ - `/specweave:resume 0002` - Resume
446
+ - `/specweave:abandon 0002 --reason="..."` - Abandon
447
+
448
+ *Archiving (MANUAL ONLY)*:
449
+ - `/specweave:archive 0031` - Archive specific
450
+ - `/specweave:archive --keep-last 10` - Archive old
451
+ - `/specweave:restore 0031` - Restore
452
+ - `/specweave:fix-duplicates` - Resolve duplicates
453
+
454
+ *Documentation*:
455
+ - `/specweave:sync-docs update` - Sync living docs
456
+ - `/specweave:sync-tasks` - Sync task status
457
+
458
+ *Other*:
459
+ - `/specweave:costs` - AI cost dashboard
2043
460
  - `/specweave:translate` - Translate content
2044
461
  - `/specweave:update-scope` - Log scope changes
2045
- - `/specweave:next` - Smart increment transition
2046
-
2047
- **NO SHORTCUTS**: Do NOT use shortcuts like `/inc`, `/do`, `/pause`, `/resume` etc. They conflict with Claude Code's native commands and will break functionality.
2048
-
2049
- **File naming**: All commands are `specweave-{name}.md` (e.g., `specweave-increment.md`)
462
+ - `/specweave:next` - Smart transition
2050
463
 
2051
464
  **Build & Test**:
2052
465
  - `npm run build` - Compile TypeScript
2053
- - `npm test` - Run unit tests (includes skill tests in `tests/unit/`, `tests/integration/`)
2054
- - `npm run test:e2e` - Run Playwright E2E tests
2055
- - `npm run test:integration` - Run integration tests
466
+ - `npm test` - Unit tests
467
+ - `npm run test:e2e` - E2E tests
468
+ - `npm run test:integration` - Integration tests
2056
469
 
2057
470
  **File Structure**:
2058
- - Source of truth: `src/` (TypeScript) and `plugins/` (skills/agents/commands)
2059
- - Marketplace: GLOBAL (via CLI, not per-project files)
471
+ - Source: `src/` (TypeScript) and `plugins/` (skills/agents/commands)
472
+ - Marketplace: GLOBAL (via CLI)
2060
473
  - Increments: `.specweave/increments/`
2061
- - Internal Docs: `.specweave/docs/internal/` (strategy, architecture, ADRs)
2062
- - Public Docs: `.specweave/docs/public/` and `docs-site/` (user guides, API docs)
2063
- - Tests: `tests/` (unit, integration, E2E, skill tests)
474
+ - Docs: `.specweave/docs/internal/` and `.specweave/docs/public/`
475
+ - Tests: `tests/` (unit, integration, E2E)
2064
476
 
2065
477
  ---
2066
478
 
2067
479
  **Remember**:
2068
- 1. Edit source files in `src/`, not `.claude/`
480
+ 1. Edit source files in `src/` and `plugins/`, not `.claude/`
2069
481
  2. Keep root folder clean (use increment folders)
2070
482
  3. Test before committing (E2E + unit + integration)
2071
- 4. Update docs when structure changes
2072
- 5. Follow increment-based workflow
483
+ 4. Skills/agents/commands auto-activate when needed
484
+ 5. All detailed rules are in skills (progressive disclosure)
2073
485
 
2074
486
  **SpecWeave Documentation**: https://spec-weave.com
2075
- **Last Updated**: 2025-11-04
487
+ **Last Updated**: 2025-11-15