specweave 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/.claude-plugin/README.md +325 -0
  2. package/.claude-plugin/marketplace.json +210 -0
  3. package/CLAUDE.md +871 -596
  4. package/README.md +188 -137
  5. package/bin/install-agents.sh +1 -1
  6. package/bin/install-commands.sh +66 -14
  7. package/bin/install-hooks.sh +1 -1
  8. package/bin/install-skills.sh +1 -1
  9. package/bin/specweave.js +2 -0
  10. package/dist/adapters/claude/adapter.d.ts +49 -11
  11. package/dist/adapters/claude/adapter.d.ts.map +1 -1
  12. package/dist/adapters/claude/adapter.js +175 -42
  13. package/dist/adapters/claude/adapter.js.map +1 -1
  14. package/dist/adapters/copilot/adapter.d.ts +20 -2
  15. package/dist/adapters/copilot/adapter.d.ts.map +1 -1
  16. package/dist/adapters/copilot/adapter.js +117 -7
  17. package/dist/adapters/copilot/adapter.js.map +1 -1
  18. package/dist/adapters/cursor/adapter.d.ts +18 -0
  19. package/dist/adapters/cursor/adapter.d.ts.map +1 -1
  20. package/dist/adapters/cursor/adapter.js +55 -3
  21. package/dist/adapters/cursor/adapter.js.map +1 -1
  22. package/dist/adapters/generic/adapter.d.ts +18 -0
  23. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  24. package/dist/adapters/generic/adapter.js +55 -3
  25. package/dist/adapters/generic/adapter.js.map +1 -1
  26. package/dist/cli/commands/init.d.ts +1 -0
  27. package/dist/cli/commands/init.d.ts.map +1 -1
  28. package/dist/cli/commands/init.js +346 -124
  29. package/dist/cli/commands/init.js.map +1 -1
  30. package/dist/cli/commands/install.d.ts +2 -0
  31. package/dist/cli/commands/install.d.ts.map +1 -1
  32. package/dist/cli/commands/install.js +28 -25
  33. package/dist/cli/commands/install.js.map +1 -1
  34. package/dist/cli/commands/list.d.ts +2 -0
  35. package/dist/cli/commands/list.d.ts.map +1 -1
  36. package/dist/cli/commands/list.js +26 -24
  37. package/dist/cli/commands/list.js.map +1 -1
  38. package/dist/cli/commands/plugin.d.ts +7 -1
  39. package/dist/cli/commands/plugin.d.ts.map +1 -1
  40. package/dist/cli/commands/plugin.js +72 -61
  41. package/dist/cli/commands/plugin.js.map +1 -1
  42. package/dist/core/i18n/language-detector.d.ts +29 -0
  43. package/dist/core/i18n/language-detector.d.ts.map +1 -0
  44. package/dist/core/i18n/language-detector.js +143 -0
  45. package/dist/core/i18n/language-detector.js.map +1 -0
  46. package/dist/core/i18n/language-manager.d.ts +101 -0
  47. package/dist/core/i18n/language-manager.d.ts.map +1 -0
  48. package/dist/core/i18n/language-manager.js +232 -0
  49. package/dist/core/i18n/language-manager.js.map +1 -0
  50. package/dist/core/i18n/language-registry.d.ts +44 -0
  51. package/dist/core/i18n/language-registry.d.ts.map +1 -0
  52. package/dist/core/i18n/language-registry.js +234 -0
  53. package/dist/core/i18n/language-registry.js.map +1 -0
  54. package/dist/core/i18n/locale-manager.d.ts +62 -0
  55. package/dist/core/i18n/locale-manager.d.ts.map +1 -0
  56. package/dist/core/i18n/locale-manager.js +137 -0
  57. package/dist/core/i18n/locale-manager.js.map +1 -0
  58. package/dist/core/i18n/system-prompt-injector.d.ts +33 -0
  59. package/dist/core/i18n/system-prompt-injector.d.ts.map +1 -0
  60. package/dist/core/i18n/system-prompt-injector.js +131 -0
  61. package/dist/core/i18n/system-prompt-injector.js.map +1 -0
  62. package/dist/core/i18n/types.d.ts +151 -0
  63. package/dist/core/i18n/types.d.ts.map +1 -0
  64. package/dist/core/i18n/types.js +11 -0
  65. package/dist/core/i18n/types.js.map +1 -0
  66. package/dist/core/increment-status.d.ts +72 -0
  67. package/dist/core/increment-status.d.ts.map +1 -0
  68. package/dist/core/increment-status.js +227 -0
  69. package/dist/core/increment-status.js.map +1 -0
  70. package/dist/core/plugin-loader.d.ts +33 -13
  71. package/dist/core/plugin-loader.d.ts.map +1 -1
  72. package/dist/core/plugin-loader.js +145 -43
  73. package/dist/core/plugin-loader.js.map +1 -1
  74. package/dist/core/types/config.d.ts +51 -0
  75. package/dist/core/types/config.d.ts.map +1 -0
  76. package/dist/core/types/config.js +21 -0
  77. package/dist/core/types/config.js.map +1 -0
  78. package/dist/core/types/plugin.d.ts +73 -42
  79. package/dist/core/types/plugin.d.ts.map +1 -1
  80. package/dist/core/types/plugin.js +4 -3
  81. package/dist/core/types/plugin.js.map +1 -1
  82. package/dist/hooks/lib/sync-living-docs.d.ts +27 -0
  83. package/dist/hooks/lib/sync-living-docs.d.ts.map +1 -0
  84. package/dist/hooks/lib/sync-living-docs.js +116 -0
  85. package/dist/hooks/lib/sync-living-docs.js.map +1 -0
  86. package/dist/hooks/lib/translate-living-docs.d.ts +13 -0
  87. package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -0
  88. package/dist/hooks/lib/translate-living-docs.js +166 -0
  89. package/dist/hooks/lib/translate-living-docs.js.map +1 -0
  90. package/dist/hooks/lib/update-tasks-md.d.ts +29 -0
  91. package/dist/hooks/lib/update-tasks-md.d.ts.map +1 -0
  92. package/dist/hooks/lib/update-tasks-md.js +203 -0
  93. package/dist/hooks/lib/update-tasks-md.js.map +1 -0
  94. package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -1
  95. package/dist/integrations/jira/jira-mapper.js.map +1 -1
  96. package/dist/locales/de/.gitkeep +0 -0
  97. package/dist/locales/de/cli.json +108 -0
  98. package/dist/locales/en/cli.json +269 -0
  99. package/dist/locales/en/errors.json +7 -0
  100. package/dist/locales/en/templates.json +6 -0
  101. package/dist/locales/es/.gitkeep +0 -0
  102. package/dist/locales/es/cli.json +41 -0
  103. package/dist/locales/fr/.gitkeep +0 -0
  104. package/dist/locales/fr/cli.json +108 -0
  105. package/dist/locales/ja/.gitkeep +0 -0
  106. package/dist/locales/ja/cli.json +108 -0
  107. package/dist/locales/ko/.gitkeep +0 -0
  108. package/dist/locales/ko/cli.json +108 -0
  109. package/dist/locales/pt/.gitkeep +0 -0
  110. package/dist/locales/pt/cli.json +108 -0
  111. package/dist/locales/ru/.gitkeep +0 -0
  112. package/dist/locales/ru/cli.json +269 -0
  113. package/dist/locales/zh/.gitkeep +0 -0
  114. package/dist/locales/zh/cli.json +108 -0
  115. package/dist/plugins/specweave-github/lib/github-client.d.ts +86 -0
  116. package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
  117. package/dist/plugins/specweave-github/lib/github-client.js +275 -0
  118. package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
  119. package/dist/plugins/specweave-github/lib/index.d.ts +10 -0
  120. package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -0
  121. package/dist/plugins/specweave-github/lib/index.js +10 -0
  122. package/dist/plugins/specweave-github/lib/index.js.map +1 -0
  123. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
  124. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
  125. package/dist/plugins/specweave-github/lib/subtask-sync.js +147 -0
  126. package/dist/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
  127. package/dist/plugins/specweave-github/lib/task-parser.d.ts +37 -0
  128. package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
  129. package/dist/plugins/specweave-github/lib/task-parser.js +211 -0
  130. package/dist/plugins/specweave-github/lib/task-parser.js.map +1 -0
  131. package/dist/plugins/specweave-github/lib/task-sync.d.ts +51 -0
  132. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
  133. package/dist/plugins/specweave-github/lib/task-sync.js +332 -0
  134. package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -0
  135. package/dist/plugins/specweave-github/lib/types.d.ts +80 -0
  136. package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -0
  137. package/dist/plugins/specweave-github/lib/types.js +5 -0
  138. package/dist/plugins/specweave-github/lib/types.js.map +1 -0
  139. package/dist/utils/agents-md-compiler.d.ts +68 -0
  140. package/dist/utils/agents-md-compiler.d.ts.map +1 -0
  141. package/dist/utils/agents-md-compiler.js +420 -0
  142. package/dist/utils/agents-md-compiler.js.map +1 -0
  143. package/dist/utils/generate-skills-index.js +4 -4
  144. package/dist/utils/generate-skills-index.js.map +1 -1
  145. package/package.json +12 -13
  146. package/plugins/specweave-ado/.claude-plugin/plugin.json +8 -0
  147. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +8 -0
  148. package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +626 -0
  149. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
  150. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +208 -0
  151. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
  152. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
  153. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +1010 -0
  154. package/plugins/specweave-backend/.claude-plugin/plugin.json +8 -0
  155. package/plugins/specweave-core/.claude-plugin/plugin.json +25 -0
  156. package/{src → plugins/specweave-core}/agents/pm/AGENT.md +80 -0
  157. package/plugins/specweave-core/agents/translator/AGENT.md +282 -0
  158. package/{src → plugins/specweave-core}/commands/README.md +11 -11
  159. package/{src → plugins/specweave-core}/commands/specweave.costs.md +7 -7
  160. package/{src → plugins/specweave-core}/commands/specweave.do.md +34 -7
  161. package/{src → plugins/specweave-core}/commands/specweave.increment.md +83 -18
  162. package/{src → plugins/specweave-core}/commands/specweave.md +49 -17
  163. package/{src → plugins/specweave-core}/commands/specweave.sync-docs.md +5 -5
  164. package/plugins/specweave-core/commands/specweave.translate.md +425 -0
  165. package/{src → plugins/specweave-core}/commands/specweave.validate.md +1 -1
  166. package/plugins/specweave-core/hooks/hooks.json +13 -0
  167. package/plugins/specweave-core/hooks/post-task-completion.sh +265 -0
  168. package/plugins/specweave-core/skills/SKILLS-INDEX.md +229 -0
  169. package/{src → plugins/specweave-core}/skills/brownfield-analyzer/SKILL.md +66 -24
  170. package/{src → plugins/specweave-core}/skills/context-loader/SKILL.md +1 -1
  171. package/plugins/specweave-core/skills/context-optimizer/SKILL.md +588 -0
  172. package/plugins/specweave-core/skills/docs-updater/SKILL.md +0 -0
  173. package/{src → plugins/specweave-core}/skills/increment-planner/SKILL.md +81 -4
  174. package/plugins/specweave-core/skills/plugin-detector/SKILL.md +211 -0
  175. package/{src → plugins/specweave-core}/skills/project-kickstarter/SKILL.md +7 -7
  176. package/plugins/specweave-core/skills/rfc-generator/SKILL.md +369 -0
  177. package/{src → plugins/specweave-core}/skills/specweave-detector/SKILL.md +2 -2
  178. package/plugins/specweave-core/skills/specweave-framework/SKILL.md +498 -0
  179. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-1-increment-naming.yaml +11 -0
  180. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-2-source-of-truth.yaml +11 -0
  181. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-3-increment-discipline.yaml +12 -0
  182. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-4-file-placement.yaml +11 -0
  183. package/{src → plugins/specweave-core}/skills/tdd-workflow/SKILL.md +20 -20
  184. package/plugins/specweave-core/skills/translator/SKILL.md +172 -0
  185. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +8 -0
  186. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +8 -0
  187. package/plugins/specweave-docs/.claude-plugin/plugin.json +8 -0
  188. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +526 -0
  189. package/plugins/specweave-figma/.claude-plugin/.mcp.json +12 -0
  190. package/plugins/specweave-figma/.claude-plugin/plugin.json +8 -0
  191. package/plugins/specweave-figma/ARCHITECTURE.md +453 -0
  192. package/plugins/specweave-figma/README.md +728 -0
  193. package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +632 -0
  194. package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +29 -0
  195. package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +27 -0
  196. package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +28 -0
  197. package/plugins/specweave-frontend/.claude-plugin/plugin.json +8 -0
  198. package/plugins/specweave-github/.claude-plugin/plugin.json +8 -0
  199. package/plugins/specweave-github/agents/github-manager/AGENT.md +651 -0
  200. package/plugins/specweave-github/commands/github-close-issue.md +418 -0
  201. package/plugins/specweave-github/commands/github-create-issue.md +307 -0
  202. package/plugins/specweave-github/commands/github-status.md +533 -0
  203. package/plugins/specweave-github/commands/github-sync-tasks.md +530 -0
  204. package/plugins/specweave-github/commands/github-sync.md +443 -0
  205. package/plugins/specweave-github/lib/github-client.ts +330 -0
  206. package/plugins/specweave-github/lib/index.ts +10 -0
  207. package/plugins/specweave-github/lib/subtask-sync.ts +225 -0
  208. package/plugins/specweave-github/lib/task-parser.ts +246 -0
  209. package/plugins/specweave-github/lib/task-sync.ts +402 -0
  210. package/plugins/specweave-github/lib/types.ts +86 -0
  211. package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +497 -0
  212. package/plugins/specweave-github/skills/github-sync/SKILL.md +461 -0
  213. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +8 -0
  214. package/plugins/specweave-jira/.claude-plugin/plugin.json +8 -0
  215. package/{src → plugins/specweave-jira}/commands/specweave.sync-jira.md +18 -18
  216. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +8 -0
  217. package/plugins/specweave-ml/.claude-plugin/plugin.json +39 -0
  218. package/plugins/specweave-ml/README.md +885 -0
  219. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +402 -0
  220. package/plugins/specweave-ml/commands/ml-deploy.md +116 -0
  221. package/plugins/specweave-ml/commands/ml-evaluate.md +87 -0
  222. package/plugins/specweave-ml/commands/ml-explain.md +83 -0
  223. package/plugins/specweave-ml/skills/anomaly-detector/SKILL.md +559 -0
  224. package/plugins/specweave-ml/skills/automl-optimizer/SKILL.md +485 -0
  225. package/plugins/specweave-ml/skills/cv-pipeline-builder/SKILL.md +157 -0
  226. package/plugins/specweave-ml/skills/data-visualizer/SKILL.md +521 -0
  227. package/plugins/specweave-ml/skills/experiment-tracker/SKILL.md +535 -0
  228. package/plugins/specweave-ml/skills/feature-engineer/SKILL.md +566 -0
  229. package/plugins/specweave-ml/skills/ml-deployment-helper/SKILL.md +345 -0
  230. package/plugins/specweave-ml/skills/ml-pipeline-orchestrator/SKILL.md +518 -0
  231. package/plugins/specweave-ml/skills/model-evaluator/SKILL.md +155 -0
  232. package/plugins/specweave-ml/skills/model-explainer/SKILL.md +227 -0
  233. package/plugins/specweave-ml/skills/model-registry/SKILL.md +541 -0
  234. package/plugins/specweave-ml/skills/nlp-pipeline-builder/SKILL.md +180 -0
  235. package/plugins/specweave-ml/skills/time-series-forecaster/SKILL.md +569 -0
  236. package/plugins/specweave-payments/.claude-plugin/plugin.json +8 -0
  237. package/plugins/specweave-testing/.claude-plugin/plugin.json +8 -0
  238. package/plugins/specweave-tooling/.claude-plugin/plugin.json +8 -0
  239. package/plugins/specweave-ui/.claude-plugin/plugin.json +106 -0
  240. package/plugins/specweave-ui/.mcp.json +14 -0
  241. package/plugins/specweave-ui/README.md +386 -0
  242. package/src/adapters/claude/adapter.ts +193 -46
  243. package/src/adapters/copilot/adapter.ts +132 -7
  244. package/src/adapters/cursor/adapter.ts +62 -3
  245. package/src/adapters/generic/adapter.ts +62 -3
  246. package/src/templates/AGENTS.md.template +170 -1
  247. package/src/templates/CLAUDE.md.template +122 -24
  248. package/src/templates/tasks.md.template +261 -0
  249. package/src/agents/ml-engineer/AGENT.md +0 -150
  250. package/src/commands/specweave.sync-github.md +0 -269
  251. package/src/hooks/post-task-completion.sh +0 -121
  252. package/src/skills/SKILLS-INDEX.md +0 -444
  253. package/src/skills/github-sync/SKILL.md +0 -234
  254. /package/{src → plugins/specweave-ado}/skills/ado-sync/README.md +0 -0
  255. /package/{src → plugins/specweave-ado}/skills/ado-sync/SKILL.md +0 -0
  256. /package/{src → plugins/specweave-ado}/skills/specweave-ado-mapper/SKILL.md +0 -0
  257. /package/{src → plugins/specweave-backend}/agents/database-optimizer/AGENT.md +0 -0
  258. /package/{src → plugins/specweave-backend}/skills/dotnet-backend/SKILL.md +0 -0
  259. /package/{src → plugins/specweave-backend}/skills/nodejs-backend/SKILL.md +0 -0
  260. /package/{src → plugins/specweave-backend}/skills/python-backend/SKILL.md +0 -0
  261. /package/{src → plugins/specweave-core}/agents/architect/AGENT.md +0 -0
  262. /package/{src → plugins/specweave-core}/agents/code-reviewer.md +0 -0
  263. /package/{src → plugins/specweave-core}/agents/docs-writer/AGENT.md +0 -0
  264. /package/{src → plugins/specweave-core}/agents/performance/AGENT.md +0 -0
  265. /package/{src → plugins/specweave-core}/agents/qa-lead/AGENT.md +0 -0
  266. /package/{src → plugins/specweave-core}/agents/security/AGENT.md +0 -0
  267. /package/{src → plugins/specweave-core}/agents/tdd-orchestrator/AGENT.md +0 -0
  268. /package/{src → plugins/specweave-core}/agents/tech-lead/AGENT.md +0 -0
  269. /package/{src → plugins/specweave-core}/commands/specweave.done.md +0 -0
  270. /package/{src → plugins/specweave-core}/commands/specweave.inc.md +0 -0
  271. /package/{src → plugins/specweave-core}/commands/specweave.list-increments.md +0 -0
  272. /package/{src → plugins/specweave-core}/commands/specweave.next.md +0 -0
  273. /package/{src → plugins/specweave-core}/commands/specweave.progress.md +0 -0
  274. /package/{src → plugins/specweave-core}/commands/specweave.tdd-cycle.md +0 -0
  275. /package/{src → plugins/specweave-core}/commands/specweave.tdd-green.md +0 -0
  276. /package/{src → plugins/specweave-core}/commands/specweave.tdd-red.md +0 -0
  277. /package/{src → plugins/specweave-core}/commands/specweave.tdd-refactor.md +0 -0
  278. /package/{src → plugins/specweave-core}/hooks/README.md +0 -0
  279. /package/{src → plugins/specweave-core}/hooks/docs-changed.sh +0 -0
  280. /package/{src → plugins/specweave-core}/hooks/human-input-required.sh +0 -0
  281. /package/{src → plugins/specweave-core}/hooks/post-increment-plugin-detect.sh +0 -0
  282. /package/{src → plugins/specweave-core}/hooks/pre-implementation.sh +0 -0
  283. /package/{src → plugins/specweave-core}/hooks/pre-task-plugin-detect.sh +0 -0
  284. /package/{src → plugins/specweave-core}/skills/brownfield-onboarder/SKILL.md +0 -0
  285. /package/{src → plugins/specweave-core}/skills/docs-updater/README.md +0 -0
  286. /package/{src → plugins/specweave-core}/skills/increment-planner/scripts/feature-utils.js +0 -0
  287. /package/{src → plugins/specweave-core}/skills/increment-quality-judge/SKILL.md +0 -0
  288. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +0 -0
  289. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +0 -0
  290. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +0 -0
  291. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +0 -0
  292. /package/{src → plugins/specweave-core}/skills/role-orchestrator/README.md +0 -0
  293. /package/{src → plugins/specweave-core}/skills/role-orchestrator/SKILL.md +0 -0
  294. /package/{src → plugins/specweave-core}/skills/task-builder/README.md +0 -0
  295. /package/{src → plugins/specweave-cost-optimizer}/skills/cost-optimizer/SKILL.md +0 -0
  296. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/AGENT.md +0 -0
  297. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-component-template.mmd +0 -0
  298. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-container-template.mmd +0 -0
  299. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-context-template.mmd +0 -0
  300. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/deployment-template.mmd +0 -0
  301. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/er-diagram-template.mmd +0 -0
  302. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/sequence-template.mmd +0 -0
  303. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -0
  304. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-2-sequence.yaml +0 -0
  305. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -0
  306. /package/{src → plugins/specweave-diagrams}/skills/diagrams-architect/SKILL.md +0 -0
  307. /package/{src → plugins/specweave-diagrams}/skills/diagrams-generator/SKILL.md +0 -0
  308. /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/README.md +0 -0
  309. /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/SKILL.md +0 -0
  310. /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/README.md +0 -0
  311. /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/SKILL.md +0 -0
  312. /package/{src → plugins/specweave-frontend}/skills/design-system-architect/SKILL.md +0 -0
  313. /package/{src → plugins/specweave-frontend}/skills/frontend/SKILL.md +0 -0
  314. /package/{src → plugins/specweave-frontend}/skills/nextjs/SKILL.md +0 -0
  315. /package/{src → plugins/specweave-infrastructure}/agents/devops/AGENT.md +0 -0
  316. /package/{src → plugins/specweave-infrastructure}/agents/network-engineer/AGENT.md +0 -0
  317. /package/{src → plugins/specweave-infrastructure}/agents/observability-engineer/AGENT.md +0 -0
  318. /package/{src → plugins/specweave-infrastructure}/agents/performance-engineer/AGENT.md +0 -0
  319. /package/{src → plugins/specweave-infrastructure}/agents/sre/AGENT.md +0 -0
  320. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/backend-diagnostics.md +0 -0
  321. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/database-diagnostics.md +0 -0
  322. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/infrastructure.md +0 -0
  323. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/monitoring.md +0 -0
  324. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/security-incidents.md +0 -0
  325. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/ui-diagnostics.md +0 -0
  326. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/01-high-cpu-usage.md +0 -0
  327. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/02-database-deadlock.md +0 -0
  328. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/03-memory-leak.md +0 -0
  329. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/04-slow-api-response.md +0 -0
  330. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/05-ddos-attack.md +0 -0
  331. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/06-disk-full.md +0 -0
  332. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/07-service-down.md +0 -0
  333. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/08-data-corruption.md +0 -0
  334. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/09-cascade-failure.md +0 -0
  335. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/10-rate-limit-exceeded.md +0 -0
  336. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/health-check.sh +0 -0
  337. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/log-analyzer.py +0 -0
  338. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/metrics-collector.sh +0 -0
  339. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/trace-analyzer.js +0 -0
  340. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/incident-report.md +0 -0
  341. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/mitigation-plan.md +0 -0
  342. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/post-mortem.md +0 -0
  343. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/runbook-template.md +0 -0
  344. /package/{src → plugins/specweave-infrastructure}/commands/specweave.monitor-setup.md +0 -0
  345. /package/{src → plugins/specweave-infrastructure}/commands/specweave.slo-implement.md +0 -0
  346. /package/{src → plugins/specweave-infrastructure}/skills/distributed-tracing/SKILL.md +0 -0
  347. /package/{src → plugins/specweave-infrastructure}/skills/grafana-dashboards/SKILL.md +0 -0
  348. /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/README.md +0 -0
  349. /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/SKILL.md +0 -0
  350. /package/{src → plugins/specweave-infrastructure}/skills/prometheus-configuration/SKILL.md +0 -0
  351. /package/{src → plugins/specweave-infrastructure}/skills/slo-implementation/SKILL.md +0 -0
  352. /package/{src → plugins/specweave-jira}/skills/jira-sync/README.md +0 -0
  353. /package/{src → plugins/specweave-jira}/skills/jira-sync/SKILL.md +0 -0
  354. /package/{src → plugins/specweave-jira}/skills/specweave-jira-mapper/SKILL.md +0 -0
  355. /package/{src → plugins/specweave-kubernetes}/agents/kubernetes-architect/AGENT.md +0 -0
  356. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/SKILL.md +0 -0
  357. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/argocd-setup.md +0 -0
  358. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/sync-policies.md +0 -0
  359. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/SKILL.md +0 -0
  360. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -0
  361. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -0
  362. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/references/chart-structure.md +0 -0
  363. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -0
  364. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/SKILL.md +0 -0
  365. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/configmap-template.yaml +0 -0
  366. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/deployment-template.yaml +0 -0
  367. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/service-template.yaml +0 -0
  368. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/deployment-spec.md +0 -0
  369. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/service-spec.md +0 -0
  370. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/SKILL.md +0 -0
  371. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/assets/network-policy-template.yaml +0 -0
  372. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/references/rbac-patterns.md +0 -0
  373. /package/{src → plugins/specweave-ml}/agents/data-scientist/AGENT.md +0 -0
  374. /package/{src → plugins/specweave-ml}/agents/mlops-engineer/AGENT.md +0 -0
  375. /package/{src → plugins/specweave-ml}/commands/specweave.ml-pipeline.md +0 -0
  376. /package/{src → plugins/specweave-ml}/skills/ml-pipeline-workflow/SKILL.md +0 -0
  377. /package/{src → plugins/specweave-payments}/agents/payment-integration/AGENT.md +0 -0
  378. /package/{src → plugins/specweave-payments}/skills/billing-automation/SKILL.md +0 -0
  379. /package/{src → plugins/specweave-payments}/skills/paypal-integration/SKILL.md +0 -0
  380. /package/{src → plugins/specweave-payments}/skills/pci-compliance/SKILL.md +0 -0
  381. /package/{src → plugins/specweave-payments}/skills/stripe-integration/SKILL.md +0 -0
  382. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/README.md +0 -0
  383. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/SKILL.md +0 -0
  384. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/execute.js +0 -0
  385. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/lib/utils.js +0 -0
  386. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/package.json +0 -0
  387. /package/{src → plugins/specweave-tooling}/skills/skill-creator/LICENSE.txt +0 -0
  388. /package/{src → plugins/specweave-tooling}/skills/skill-creator/SKILL.md +0 -0
  389. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/init_skill.py +0 -0
  390. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/package_skill.py +0 -0
  391. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/quick_validate.py +0 -0
  392. /package/{src → plugins/specweave-tooling}/skills/skill-router/SKILL.md +0 -0
package/CLAUDE.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # SpecWeave - Development Guide
2
2
 
3
3
  **Project**: SpecWeave - Spec-Driven Development Framework
4
- **Version**: 0.4.0 (Plugin Architecture Complete!)
4
+ **Version**: 0.6.0 (LLM-Native i18n Complete! - Ready for Release)
5
+ **NPM Version**: 0.5.1 (Latest Published)
5
6
  **Type**: Open Source NPM Package (TypeScript CLI)
6
7
  **Repository**: https://github.com/anton-abyzov/specweave
7
8
  **Website**: https://spec-weave.com
@@ -11,26 +12,72 @@ Users receive a different CLAUDE.md via the template system.
11
12
 
12
13
  ---
13
14
 
14
- ## Quick Start for Contributors
15
+ ## 🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!
15
16
 
16
- **Current Work**: Increment 0004 - Plugin Architecture COMPLETE
17
- **Active Branch**: `develop` → merges to `features/001-core-feature`
18
- **Latest**: v0.4.0 - Plugin Architecture with GitHub plugin (priority #1)
19
- **Next**: v0.5.0 - Additional plugins (Jira, Kubernetes, Frontend/Backend stacks)
17
+ **⛔ THIS IS THE #1 RULE - VIOLATING THIS WILL GET YOUR PR REJECTED ⛔**
20
18
 
21
- **Typical Workflow**:
22
- ```bash
23
- # 1. Make changes to source files in src/
24
- # 2. Test locally
25
- npm run build && npm test
19
+ **ALL AI-generated files MUST go into the CURRENT INCREMENT folder**, NOT in the project root!
26
20
 
27
- # 3. Use SpecWeave commands for managing work
28
- /specweave.do # Execute next task
29
- /specweave.progress # Check status
21
+ ### NEVER Create in Root (Pollutes Repository)
30
22
 
31
- # 4. Commit with hooks (auto-validates)
32
- git add . && git commit -m "feat: description"
33
23
  ```
24
+ ❌ WRONG - ROOT FILES (REJECTED!):
25
+ /PLUGIN-MIGRATION-COMPLETE.md # NO! Goes to increment reports/
26
+ /SESSION-SUMMARY-2025-10-28.md # NO! Goes to increment reports/
27
+ /ADR-006-DEEP-ANALYSIS.md # NO! Goes to .specweave/docs/internal/architecture/adr/
28
+ /ANALYSIS-MULTI-TOOL-COMPARISON.md # NO! Goes to increment reports/
29
+ /migration-helper.sh # NO! Goes to increment scripts/
30
+ /execution.log # NO! Goes to increment logs/
31
+ /specweave-0.5.1.tgz # NO! Build artifact, should be in .gitignore
32
+ /yolov8n.pt # NO! ML model, should be in .gitignore
33
+
34
+ ✅ CORRECT - INCREMENT FOLDERS:
35
+ .specweave/increments/0004-plugin-architecture/
36
+ ├── spec.md # Spec files (core 4)
37
+ ├── plan.md
38
+ ├── tasks.md
39
+ ├── tests.md
40
+ ├── reports/ # ✅ PUT REPORTS HERE!
41
+ │ ├── PLUGIN-MIGRATION-COMPLETE.md # ✅ Completion reports
42
+ │ ├── SESSION-SUMMARY.md # ✅ Session summaries
43
+ │ └── ANALYSIS-*.md # ✅ Analysis files
44
+ ├── scripts/ # ✅ PUT SCRIPTS HERE!
45
+ │ └── migration-helper.sh # ✅ Helper scripts
46
+ └── logs/ # ✅ PUT LOGS HERE!
47
+ └── execution.log # ✅ Execution logs
48
+
49
+ .specweave/docs/internal/architecture/ # ✅ PUT ADRS/DIAGRAMS HERE!
50
+ └── adr/
51
+ └── 0006-deep-analysis.md # ✅ Architecture decisions
52
+ ```
53
+
54
+ ### Why This Matters
55
+
56
+ - ✅ **Complete traceability** - Know which increment created which files
57
+ - ✅ **Easy cleanup** - Delete increment folder = delete all files
58
+ - ✅ **Clear context** - All files for a feature in one place
59
+ - ✅ **No root clutter** - Project root stays clean and professional
60
+ - ✅ **Better git history** - Changes grouped by increment
61
+
62
+ ### What IS Allowed in Root?
63
+
64
+ **ONLY these files belong in root**:
65
+ - ✅ `CLAUDE.md` (this file - contributor guide)
66
+ - ✅ `README.md`, `CHANGELOG.md`, `LICENSE` (project documentation)
67
+ - ✅ `package.json`, `tsconfig.json`, `.gitignore` (config files)
68
+ - ✅ Directories: `src/`, `tests/`, `plugins/`, `.specweave/`, etc. (source code)
69
+
70
+ **Everything else goes in increment folders or `.gitignore`!**
71
+
72
+ ### Build Artifacts (Add to .gitignore)
73
+
74
+ These should NEVER be committed:
75
+ - ❌ `*.tgz`, `*.tar.gz` - NPM package archives
76
+ - ❌ `*.pt`, `*.pth` - ML model files (download on demand)
77
+ - ❌ `dist/`, `build/` - Compiled outputs (already in .gitignore)
78
+ - ❌ `*.log` - Log files (already in .gitignore)
79
+
80
+ **Before committing, ALWAYS check**: `git status` - If you see `.md` files in root, MOVE THEM!
34
81
 
35
82
  ---
36
83
 
@@ -49,83 +96,24 @@ Claude Code isn't just another AI coding assistant - **Anthropic defines the ind
49
96
 
50
97
  ### Why SpecWeave + Claude Code = 10x Better
51
98
 
52
- | Feature | SpecWeave + Claude Code | Competitors (Kiro, Cursor, Copilot) |
53
- |---------|------------------------|-------------------------------------|
54
- | **Living Docs (Automated)** | ✅ Native hooks update docs on EVERY task | ❌ Manual sync required (Kiro, Cursor, Copilot) |
55
- | **Auto-Activation** | ✅ Skills auto-fire based on context | ❌ Must manually invoke (all competitors) |
56
- | **Multi-Agent Isolation** | ✅ Separate contexts per agent | 🟡 Cursor: shared context; Others: none |
57
- | **Slash Commands** | ✅ Native `/specweave.*` commands | 🟡 Cursor: team commands; Others: none |
58
- | **Hooks (Pre/Post)** | ✅ Native lifecycle automation | ❌ No hooks (all competitors) |
59
- | **MCP Protocol** | ✅ Native context management | ❌ Proprietary or none |
60
- | **Context Efficiency** | 60-80% reduction with plugins | 🟡 Cursor: @ shortcuts; Others: limited |
61
- | **Spec-Driven Workflow** | ✅ Core framework feature | ❌ Not supported |
62
-
63
- ### The Living Docs Advantage: SpecWeave vs. Kiro
64
-
65
- **Kiro's Pitch**: "Automated living documentation"
66
- **Reality**: Kiro requires **manual sync** - you must remember to update docs.
67
-
68
- **SpecWeave + Claude Code**:
69
- - **100% automated** via native hooks
70
- - After EVERY task, hooks fire automatically
71
- - Docs update without user intervention
72
- - No manual sync needed, EVER
73
-
74
- **Why?** Claude Code's native hooks system. Kiro doesn't have this - they rely on manual triggers.
75
-
76
- ### Cursor 2.0: Good, But Not Native
77
-
78
- Cursor 2.0 (released Oct 29, 2025) has impressive features:
79
- - ✅ 8 parallel agents
80
- - ✅ Team-defined custom commands
81
- - ✅ In-app browser
82
- - ✅ @ context shortcuts
99
+ | Feature | Claude Code (Native) | Cursor 2.0 | Copilot | Generic |
100
+ |---------|---------------------|------------|---------|---------|
101
+ | **Living Docs** | ✅ Auto-sync via hooks | Manual | ❌ Manual | Manual |
102
+ | **Skills** | ✅ Auto-activate | 🟡 Must @mention | ❌ None | None |
103
+ | **Commands** | ✅ Plugin-based `/specweave:*` | 🟡 Team commands | None | ❌ None |
104
+ | **Hooks** | ✅ Pre/Post lifecycle | ❌ No hooks | No hooks | No hooks |
105
+ | **Agents** | ✅ Isolated contexts | 🟡 Shared (8 parallel) | ❌ None | None |
106
+ | **Context** | ✅ MCP + 60-80% reduction | 🟡 @ shortcuts | Limited | None |
107
+ | **Quality** | ⭐⭐⭐⭐⭐ 100% | ⭐⭐⭐⭐ 85% | ⭐⭐⭐ 60% | ⭐⭐ 40% |
83
108
 
84
- **But Cursor still lacks**:
85
- - ❌ Native hooks (no automated doc updates)
86
- - ❌ Skill auto-activation (must explicitly request)
87
- - ❌ Agent isolation (all 8 agents share context)
88
- - ❌ MCP protocol (proprietary context management)
109
+ **Quick Comparison**:
89
110
 
90
- **SpecWeave on Cursor** = ~85% of Claude Code experience (still very good!)
111
+ **Claude Code** - Full automation with native hooks, MCP protocol, plugin system, isolated agent contexts
112
+ **Cursor 2.0** - Good multi-tool support (AGENTS.md compilation, team commands, @ shortcuts) but no hooks or agent isolation
113
+ **Copilot** - Basic instructions.md support, no automation features
114
+ **Generic** - Manual copy-paste workflow
91
115
 
92
- ### GitHub Copilot: Basic Automation
93
-
94
- Copilot provides:
95
- - ✅ Workspace instructions
96
- - ✅ Code suggestions
97
-
98
- **But Copilot lacks**:
99
- - ❌ Native hooks
100
- - ❌ Skills/agents
101
- - ❌ Slash commands
102
- - ❌ Living docs
103
-
104
- **SpecWeave on Copilot** = ~60% of Claude Code experience (basic automation only)
105
-
106
- ### Generic Tools (ChatGPT, Gemini): Manual Workflow
107
-
108
- Generic AI tools:
109
- - ✅ Conversational AI
110
- - ✅ Code generation
111
-
112
- **But they lack**:
113
- - ❌ ALL automation features
114
- - ❌ Project integration
115
- - ❌ Persistent state
116
-
117
- **SpecWeave on Generic** = ~40% of Claude Code experience (copy-paste manual)
118
-
119
- ### The Bottom Line
120
-
121
- **SpecWeave works with any tool**, but for the **BEST experience**:
122
-
123
- 1. **Claude Code** (⭐⭐⭐⭐⭐ 100%) - Full automation, native hooks, MCP, isolated agents
124
- 2. **Cursor 2.0** (⭐⭐⭐⭐ 85%) - Semi-automation, AGENTS.md, team commands
125
- 3. **Copilot** (⭐⭐⭐ 60%) - Basic automation, instructions.md
126
- 4. **Generic** (⭐⭐ 40%) - Manual workflow, copy-paste
127
-
128
- **Recommendation**: Use Claude Code for SpecWeave. Other tools work, but you'll miss the magic.
116
+ **The Key Differentiator**: Only Claude Code supports **automated living docs** via native hooks. After EVERY task completion, docs sync automatically - zero manual intervention. This is why SpecWeave is designed Claude Code-first, though it gracefully degrades to other tools.
129
117
 
130
118
  ---
131
119
 
@@ -152,15 +140,15 @@ Generic AI tools:
152
140
  **When Creating Increments**:
153
141
  ```bash
154
142
  # ❌ Wrong
155
- /specweave.inc "0004"
143
+ /specweave:inc "0004"
156
144
 
157
145
  # ✅ Correct
158
- /specweave.inc "0004-cost-optimization"
159
- /specweave.inc "0005-github-sync-enhancements"
146
+ /specweave:inc "0004-cost-optimization"
147
+ /specweave:inc "0005-github-sync-enhancements"
160
148
  ```
161
149
 
162
150
  **Enforcement**:
163
- - `/specweave.inc` command validates naming (rejects bare numbers)
151
+ - `/specweave:inc` command validates naming (rejects bare numbers)
164
152
  - Code review requirement (descriptive names mandatory)
165
153
  - This document serves as the source of truth
166
154
 
@@ -172,23 +160,461 @@ Generic AI tools:
172
160
 
173
161
  ---
174
162
 
163
+ ## Increment Discipline (v0.6.0+ MANDATORY)
164
+
165
+ **⛔ THE IRON RULE: You CANNOT start increment N+1 until increment N is DONE**
166
+
167
+ This is **NOT negotiable**. It is a **hard enforcement** to prevent chaos, scope creep, and stale documentation.
168
+
169
+ ### Why This Rule Exists
170
+
171
+ **The Problem (before v0.6.0)**:
172
+ - Multiple incomplete increments piling up (0002, 0003, 0006 all in progress)
173
+ - No clear source of truth ("which increment are we working on?")
174
+ - Living docs become stale (sync doesn't know what's current)
175
+ - Scope creep (jumping between features without finishing)
176
+ - Quality degradation (tests not run, docs not updated)
177
+
178
+ **The Solution (v0.6.0+)**:
179
+ - ✅ **Hard block** on `/specweave:inc` if previous increments incomplete
180
+ - ✅ **Helper commands** to close increments properly
181
+ - ✅ **Clear guidance** on how to resolve incomplete work
182
+ - ✅ **Force discipline** = force quality
183
+
184
+ ### What "DONE" Means
185
+
186
+ An increment is DONE if **ONE** of the following is true:
187
+
188
+ 1. **All tasks completed**: All tasks in `tasks.md` marked `[x] Completed`
189
+ 2. **Completion report exists**: `COMPLETION-SUMMARY.md` with "✅ COMPLETE" status
190
+ 3. **Explicit closure**: Closed via `/specweave:close` with documentation
191
+
192
+ ### The Enforcement
193
+
194
+ **When you try to start a new increment**:
195
+
196
+ ```bash
197
+ /specweave:inc "new feature"
198
+ ```
199
+
200
+ **If previous increments are incomplete, you'll see**:
201
+
202
+ ```
203
+ ❌ Cannot create new increment!
204
+
205
+ Previous increments are incomplete:
206
+
207
+ 📋 Increment 0002-core-enhancements
208
+ Status: 73% complete (11/15 tasks)
209
+ Pending:
210
+ - T-008: Migrate DIAGRAM-CONVENTIONS.md content
211
+ - T-010: Create context-manifest.yaml
212
+ - T-012: Test agent invocation manually
213
+ - T-013: Run skill test suite
214
+ - T-015: Create PR when increment complete
215
+
216
+ 📋 Increment 0003-intelligent-model-selection
217
+ Status: 50% complete (11/22 tasks)
218
+ Pending: 11 tasks
219
+
220
+ 💡 What would you like to do?
221
+
222
+ 1️⃣ Close incomplete increments:
223
+ /specweave:close
224
+
225
+ 2️⃣ Check status:
226
+ /specweave:status
227
+
228
+ 3️⃣ Force create (DANGEROUS - violates discipline!):
229
+ Add --force flag to bypass this check
230
+
231
+ ⚠️ The discipline exists for a reason:
232
+ - Prevents scope creep
233
+ - Ensures completions are tracked
234
+ - Maintains living docs accuracy
235
+ - Keeps work focused
236
+ ```
237
+
238
+ ### How to Resolve Incomplete Increments
239
+
240
+ #### Option 1: Complete the Work (Recommended)
241
+
242
+ ```bash
243
+ # Continue working on incomplete increment
244
+ /specweave:do
245
+
246
+ # Once all tasks done, it's automatically complete
247
+ /specweave:inc "new feature" # ✅ Now works!
248
+ ```
249
+
250
+ #### Option 2: Close Interactively
251
+
252
+ ```bash
253
+ # Interactive closure with options
254
+ /specweave:close
255
+
256
+ # You'll be asked to choose:
257
+ # - Force complete (mark all tasks done)
258
+ # - Move tasks to next increment (defer work)
259
+ # - Reduce scope (mark tasks as won't-do)
260
+ # - Create completion report (manual close)
261
+ ```
262
+
263
+ #### Option 3: Check Status First
264
+
265
+ ```bash
266
+ # See all incomplete increments
267
+ /specweave:status
268
+
269
+ # Output shows:
270
+ # ✅ 0001-core-framework
271
+ # ✅ 0004-plugin-architecture
272
+ # ⏳ 0002-core-enhancements (73% complete)
273
+ # ⏳ 0003-intelligent-model-selection (50% complete)
274
+ ```
275
+
276
+ #### Option 4: Force Create (Emergency Only!)
277
+
278
+ ```bash
279
+ # Bypass the check (USE SPARINGLY!)
280
+ /specweave:inc "urgent-hotfix" --force
281
+
282
+ # This is logged and should be explained in the next standup/PR
283
+ ```
284
+
285
+ ### The Three Options for Closing
286
+
287
+ When using `/specweave:close`, you get **THREE options**:
288
+
289
+ #### 1. **Adjust Scope** (Simplest - Recommended)
290
+
291
+ Remove parts from `spec.md`, regenerate `plan.md` and `tasks.md` to match reduced scope:
292
+
293
+ ```bash
294
+ # 1. Edit spec.md - remove features you're not doing
295
+ # 2. Delete plan.md and tasks.md
296
+ # 3. Regenerate from spec
297
+ /specweave:inc "same increment" --regenerate
298
+
299
+ # Now tasks match reduced scope → 100% complete!
300
+ ```
301
+
302
+ #### 2. **Move Scope to Next Increment**
303
+
304
+ Transfer incomplete tasks to the new increment:
305
+
306
+ ```bash
307
+ # Via /specweave:close
308
+ # Select "Move tasks to next increment"
309
+ # Tasks are migrated with documentation
310
+ # Old increment closed, new increment gets the work
311
+ ```
312
+
313
+ #### 3. **Extend Existing Increment** (Merge Work)
314
+
315
+ Simplest option: **Don't start a new increment**. Just extend the current one:
316
+
317
+ ```bash
318
+ # Instead of creating 0003, extend 0002:
319
+ # 1. Update spec.md to include new features
320
+ # 2. Update plan.md with new implementation details
321
+ # 3. Add new tasks to tasks.md
322
+ # 4. Minimize tests if needed (focus on critical paths)
323
+
324
+ # Work on combined scope in ONE increment
325
+ /specweave:do
326
+ ```
327
+
328
+ ### Helper Commands
329
+
330
+ | Command | Purpose |
331
+ |---------|---------|
332
+ | `/specweave:status` | Show all increments and their completion status |
333
+ | `/specweave:close` | Interactive closure of incomplete increments |
334
+ | `/specweave:force-close <id>` | Mark all tasks complete (dangerous!) |
335
+
336
+ ### Enforcement Points
337
+
338
+ 1. **`/specweave:inc` command** - Hard block (Step 0A)
339
+ 2. **PM agent** - Pre-flight validation before planning
340
+ 3. **CI/CD** (future) - Prevent PR merges with incomplete increments
341
+
342
+ ### Philosophy: Discipline = Quality
343
+
344
+ **Why enforce this strictly?**
345
+
346
+ - **Focus**: Work on ONE thing at a time
347
+ - **Completion**: Finish before starting new
348
+ - **Quality**: Tests run, docs updated, code reviewed
349
+ - **Clarity**: Everyone knows what's current
350
+ - **Velocity**: Actually shipping > endless WIP
351
+
352
+ **Old Way (suggest)**:
353
+ ```
354
+ User: "Just let me start the new feature, I'll come back to this"
355
+ Result: 5 incomplete increments, nothing ships
356
+ ```
357
+
358
+ **New Way (enforce)**:
359
+ ```
360
+ Framework: "Close this first, then start new"
361
+ User: *closes increment properly*
362
+ Result: Clean increments, clear progress, shipping regularly
363
+ ```
364
+
365
+ ### Real-World Example
366
+
367
+ **Scenario**: You have 0002 at 73% complete, want to start 0006.
368
+
369
+ **Before v0.6.0** (broken):
370
+ ```bash
371
+ /specweave:inc "0006-i18n"
372
+ # ✅ Creates 0006 (no check)
373
+ # Result: 0002, 0003, 0006 all incomplete
374
+ ```
375
+
376
+ **After v0.6.0** (disciplined):
377
+ ```bash
378
+ /specweave:inc "0006-i18n"
379
+ # ❌ Blocked! "Close 0002 and 0003 first"
380
+
381
+ # Check status
382
+ /specweave:status
383
+ # Shows: 0002 (73%), 0003 (50%) incomplete
384
+
385
+ # Close them
386
+ /specweave:close
387
+ # Select 0002 → Force complete (work was done, just not marked)
388
+ # Select 0003 → Move tasks to 0007 (defer work)
389
+
390
+ # Now can proceed
391
+ /specweave:inc "0006-i18n"
392
+ # ✅ Works! Clean slate, disciplined workflow
393
+ ```
394
+
395
+ ### Exception: The `--force` Flag
396
+
397
+ For **emergencies only** (hotfixes, urgent features):
398
+
399
+ ```bash
400
+ /specweave:inc "urgent-security-fix" --force
401
+ ```
402
+
403
+ **This bypasses the check** but:
404
+ - ✅ Logs the force creation
405
+ - ✅ Warns in CLI output
406
+ - ✅ Should be explained in PR/standup
407
+ - ✅ Should close previous increments ASAP
408
+
409
+ **Use sparingly!** The discipline exists for a reason.
410
+
411
+ ---
412
+
413
+ **Summary**: Close previous increments before starting new ones. Use `/specweave:status` and `/specweave:close` to maintain discipline. This isn't bureaucracy—it's quality enforcement.
414
+
415
+ ---
416
+
417
+ ## Root-Level .specweave/ Folder (MANDATORY)
418
+
419
+ **CRITICAL ARCHITECTURE RULE**: SpecWeave ONLY supports root-level `.specweave/` folders. Nested `.specweave/` folders are NOT supported and MUST be prevented.
420
+
421
+ ### The Rule: ONE Source of Truth
422
+
423
+ ```
424
+ ✅ CORRECT - Root-level only:
425
+ my-project/
426
+ ├── .specweave/ ← ONE source of truth
427
+ │ ├── increments/
428
+ │ ├── docs/
429
+ │ └── logs/
430
+ ├── frontend/
431
+ ├── backend/
432
+ └── infrastructure/
433
+
434
+ ❌ WRONG - Nested .specweave/ (NOT SUPPORTED):
435
+ my-project/
436
+ ├── .specweave/ ← Root level
437
+ │ └── ...
438
+ ├── backend/
439
+ │ └── .specweave/ ← ❌ NESTED - PREVENTS THIS!
440
+ └── frontend/
441
+ └── .specweave/ ← ❌ NESTED - PREVENTS THIS!
442
+ ```
443
+
444
+ ### Why Root-Level Only?
445
+
446
+ **Single Source of Truth**:
447
+ - ✅ One central location for all specs, increments, architecture
448
+ - ✅ No duplication or fragmentation
449
+ - ✅ Clear ownership and responsibility
450
+ - ✅ Simplified living docs sync (one place to update)
451
+
452
+ **Cross-Cutting Features**:
453
+ - ✅ Increments often span multiple modules (frontend + backend + infra)
454
+ - ✅ Architecture decisions (ADRs) apply system-wide
455
+ - ✅ Strategy docs are project-level, not module-level
456
+ - ✅ Living docs sync works best with one central location
457
+
458
+ **Plugin Detection**:
459
+ - ✅ Four-phase detection assumes one `.specweave/` folder
460
+ - ✅ Auto-detection scans from root only
461
+ - ✅ No ambiguity about where plugins are enabled
462
+
463
+ **Prevents Chaos**:
464
+ - ❌ Nested folders cause: Which is the source of truth?
465
+ - ❌ Duplication: Same increment in multiple places?
466
+ - ❌ Conflicts: Different modules with same increment numbers?
467
+ - ❌ Complexity: Where do cross-cutting features live?
468
+
469
+ ### Multi-Repo & Microservices Pattern
470
+
471
+ **Problem**: "My project has multiple repos, microservices, or complex architecture"
472
+
473
+ **Solution**: Create a **parent folder** with ONE root-level `.specweave/`
474
+
475
+ The pattern is the same whether you have:
476
+ - Multiple git repos (polyrepo architecture)
477
+ - Microservices (separate service directories)
478
+ - Monorepo with multiple modules
479
+
480
+ ```
481
+ microservices-project/ ← Create parent folder
482
+ ├── .specweave/ ← ONE source of truth for entire system
483
+ │ ├── increments/
484
+ │ │ ├── 0001-add-service-mesh/ ← Cross-cutting
485
+ │ │ ├── 0002-user-svc-v2/ ← Single service
486
+ │ │ └── 0003-checkout-flow/ ← Multi-service
487
+ │ ├── docs/
488
+ │ │ ├── internal/
489
+ │ │ │ ├── strategy/ ← System-wide strategy
490
+ │ │ │ ├── architecture/
491
+ │ │ │ │ ├── service-mesh.md ← System-wide
492
+ │ │ │ │ ├── api-contracts.md ← Cross-service
493
+ │ │ │ │ └── adr/
494
+ │ │ │ │ └── 0001-service-mesh-choice.md
495
+ │ │ │ └── ...
496
+ │ │ └── public/
497
+ │ └── logs/
498
+
499
+ ├── services/
500
+ │ ├── user-service/ ← Can be separate git repos
501
+ │ ├── order-service/ ← Or monorepo subdirectories
502
+ │ ├── payment-service/
503
+ │ └── notification-service/
504
+
505
+ ├── infrastructure/
506
+ │ ├── k8s/
507
+ │ └── terraform/
508
+
509
+ └── shared/
510
+ └── api-contracts/
511
+ ```
512
+
513
+ **How to Set Up**:
514
+
515
+ ```bash
516
+ # Option 1: Multiple repos (clone as subdirectories)
517
+ mkdir microservices-project && cd microservices-project
518
+ npx specweave init .
519
+ git clone https://github.com/myorg/user-service.git services/user-service
520
+ git clone https://github.com/myorg/order-service.git services/order-service
521
+
522
+ # Option 2: Git submodules (advanced)
523
+ mkdir microservices-project && cd microservices-project
524
+ git init && npx specweave init .
525
+ git submodule add https://github.com/myorg/user-service.git services/user-service
526
+
527
+ # Option 3: Monorepo (services in same repo)
528
+ mkdir microservices-project && cd microservices-project
529
+ git init && npx specweave init .
530
+ mkdir -p services/{user,order,payment}
531
+
532
+ # Work normally - SpecWeave sees all services
533
+ /specweave:inc "0001-add-service-mesh"
534
+ # Creates: .specweave/increments/0001-add-service-mesh/
535
+ # Can reference: services/user-service/, infrastructure/k8s/, etc.
536
+ ```
537
+
538
+ **Benefits**:
539
+ - ✅ One `.specweave/` for entire system (no duplication)
540
+ - ✅ Each repo maintains its own git history (if using polyrepo)
541
+ - ✅ Cross-service increments are natural (e.g., checkout flow)
542
+ - ✅ System-wide architecture docs in one place
543
+ - ✅ Living docs cover all services
544
+
545
+ ### Enforcement
546
+
547
+ **Validation in `init.ts`**:
548
+
549
+ ```typescript
550
+ // Check for parent .specweave/
551
+ function detectNestedSpecweave(targetDir: string): string | null {
552
+ let currentDir = path.dirname(targetDir);
553
+ const root = path.parse(currentDir).root;
554
+
555
+ while (currentDir !== root) {
556
+ const specweavePath = path.join(currentDir, '.specweave');
557
+ if (fs.existsSync(specweavePath)) {
558
+ return currentDir; // Found parent .specweave/
559
+ }
560
+ currentDir = path.dirname(currentDir);
561
+ }
562
+
563
+ return null;
564
+ }
565
+
566
+ // Prevent nested initialization
567
+ const parentSpecweave = detectNestedSpecweave(targetDir);
568
+ if (parentSpecweave) {
569
+ console.error('❌ Nested .specweave/ folders are not supported!');
570
+ console.error(` Found parent .specweave/ at: ${parentSpecweave}`);
571
+ console.error(` Use the parent folder for all increments.`);
572
+ process.exit(1);
573
+ }
574
+ ```
575
+
576
+ **Detection Rules**:
577
+ - ❌ Prevent `specweave init` in subdirectories if parent `.specweave/` exists
578
+ - ✅ Suggest using parent folder instead
579
+ - ✅ Provide clear error messages with path to parent
580
+
581
+ **Code Review**:
582
+ - ❌ Reject PRs with nested `.specweave/` folders
583
+ - ✅ Enforce via linting/validation scripts
584
+
585
+ ### Summary
586
+
587
+ | Aspect | Root-Level Only | Nested (NOT Supported) |
588
+ |--------|----------------|------------------------|
589
+ | **Source of Truth** | ✅ One central location | ❌ Multiple conflicting sources |
590
+ | **Cross-Cutting Features** | ✅ Natural | ❌ Complex coordination |
591
+ | **Living Docs Sync** | ✅ Simple | ❌ Merge conflicts |
592
+ | **Plugin Detection** | ✅ Works | ❌ Ambiguous |
593
+ | **Multi-Repo** | ✅ Parent folder | ❌ Fragmented |
594
+ | **Complexity** | ✅ Simple | ❌ High |
595
+
596
+ **Bottom Line**: Root-level `.specweave/` only. For multi-repo projects, create a parent folder. No exceptions.
597
+
598
+ ---
599
+
175
600
  ## Project Scale (v0.4.0 - Plugin Architecture)
176
601
 
177
- ### Core Framework (Always Loaded)
602
+ ### Core Plugin (Always Auto-Loaded)
178
603
 
179
- **The Essentials** - What every SpecWeave project gets:
180
- - **Skills**: 8 core (increment-planner, **rfc-generator**, context-loader, project-kickstarter, brownfield-analyzer, brownfield-onboarder, increment-quality-judge, context-optimizer)
181
- - **Agents**: 3 core (PM, Architect, Tech Lead)
182
- - **Commands**: 7 core (/specweave.inc, /specweave.do, /specweave.next, /specweave.done, /specweave.progress, /specweave.validate, /sync-docs)
604
+ **Plugin**: `specweave-core` - The essential SpecWeave plugin loaded in every project:
605
+ - **Skills**: 9 skills (increment-planner, tdd-workflow, rfc-generator, context-loader, project-kickstarter, brownfield-analyzer, brownfield-onboarder, increment-quality-judge, context-optimizer)
606
+ - **Agents**: 22 agents (PM, Architect, Tech Lead, + 19 specialized including tdd-orchestrator)
607
+ - **Commands**: 22 commands (/specweave:inc, /specweave:do, /specweave:next, /specweave:done, /specweave:progress, /specweave:validate, /specweave:sync-docs, + 15 specialized)
608
+ - **Hooks**: 8 lifecycle hooks
183
609
  - **Size**: ~12K tokens (vs. 50K in v0.3.7)
184
610
 
185
611
  **Result**: **75%+ context reduction** out of the box!
186
612
 
187
613
  **Why So Small?**
188
- - External sync (GitHub, Jira) = plugins
189
- - Tech stacks (React, K8s) = plugins
190
- - Domain expertise (ML, payments) = plugins
191
- - Only increment lifecycle + living docs in core
614
+ - External sync (GitHub, Jira) = separate plugins
615
+ - Tech stacks (React, K8s) = separate plugins
616
+ - Domain expertise (ML, payments) = separate plugins
617
+ - Core plugin = only increment lifecycle + living docs automation
192
618
 
193
619
  ### Available Plugins (Opt-In)
194
620
 
@@ -219,7 +645,7 @@ Generic AI tools:
219
645
  | **ml-ops** | 3 | 3 | 1 | Machine learning, TensorFlow, PyTorch |
220
646
  | **observability** | 4 | 4 | 2 | Prometheus, Grafana, monitoring |
221
647
  | **payment-processing** | 4 | 1 | 0 | Stripe, billing, subscriptions |
222
- | **e2e-testing** | 2 | 1 | 0 | Playwright, browser automation |
648
+ | **e2e-testing** | 1 | 0 | 0 | Playwright, E2E browser automation, visual regression |
223
649
  | **figma-ecosystem** | 5 | 2 | 0 | Design integration, Figma API |
224
650
  | **security** | 3 | 1 | 0 | Security scanning, best practices |
225
651
  | **diagrams** | 2 | 1 | 0 | C4 diagrams, Mermaid |
@@ -268,7 +694,7 @@ specweave plugin disable figma-ecosystem
268
694
 
269
695
  **Spec-Based** (during increment planning):
270
696
  ```bash
271
- /specweave.inc "deploy to Kubernetes"
697
+ /specweave:inc "deploy to Kubernetes"
272
698
  # → Suggests kubernetes plugin before creating spec
273
699
  ```
274
700
 
@@ -281,19 +707,54 @@ specweave plugin disable figma-ecosystem
281
707
  **CRITICAL**: SpecWeave follows a strict source-of-truth pattern:
282
708
 
283
709
  ```
284
- src/ ← SOURCE OF TRUTH (version controlled)
285
- ├── skills/ Source for skills
286
- ├── agents/ ← Source for agents
287
- ├── commands/ ← Source for slash commands
288
- ├── hooks/ Source for hooks
289
- ├── adapters/ Tool adapters (Claude, Cursor, etc.)
290
- └── templates/ Templates for user projects
710
+ src/ ← SOURCE OF TRUTH (TypeScript code only)
711
+ ├── core/ Core framework logic (TypeScript utilities)
712
+ ├── plugin-loader.ts
713
+ ├── config-manager.ts
714
+ ├── types/ TypeScript type definitions
715
+ │ └── schemas/ JSON schemas
716
+ ├── cli/ CLI commands
717
+ ├── hooks/ ← TypeScript utilities for hooks
718
+ │ └── lib/ ← Hook helper functions
719
+ ├── adapters/ ← Tool adapters (legacy)
720
+ ├── templates/ ← Templates for user projects
721
+ └── utils/ ← Utility functions
722
+
723
+ plugins/ ← ROOT: All plugins (version controlled)
724
+ ├── specweave-core/ ← CORE PLUGIN (framework essentials)
725
+ │ ├── .claude-plugin/ ← plugin.json (Claude native)
726
+ │ ├── skills/ ← Core skills (9 total)
727
+ │ │ ├── rfc-generator/
728
+ │ │ ├── increment-planner/
729
+ │ │ ├── tdd-workflow/
730
+ │ │ └── ...
731
+ │ ├── agents/ ← Core agents (3 core + 19 specialized)
732
+ │ │ ├── pm/
733
+ │ │ ├── architect/
734
+ │ │ ├── tech-lead/
735
+ │ │ └── ...
736
+ │ ├── commands/ ← Core commands (7 core + 15 specialized)
737
+ │ │ ├── specweave.inc.md
738
+ │ │ ├── specweave.do.md
739
+ │ │ └── ...
740
+ │ ├── hooks/ ← Lifecycle hooks (8 total)
741
+ │ │ ├── post-task-completion.sh
742
+ │ │ ├── pre-implementation.sh
743
+ │ │ └── ...
744
+ │ └── lib/ ← TypeScript utilities (optional)
745
+
746
+ └── specweave-{name}/ ← Other plugins (GitHub, Figma, etc.)
747
+ ├── .claude-plugin/ ← plugin.json (Claude native)
748
+ ├── skills/ ← Plugin skills
749
+ ├── agents/ ← Plugin agents
750
+ ├── commands/ ← Plugin commands
751
+ └── lib/ ← TypeScript utilities (optional)
291
752
 
292
753
  .claude/ ← INSTALLED (gitignored in user projects)
293
- ├── skills/ ← Installed from src/skills/
294
- ├── agents/ ← Installed from src/agents/
295
- ├── commands/ ← Installed from src/commands/
296
- └── hooks/ ← Installed from src/hooks/
754
+ ├── agents/ ← Installed from plugins/*/agents/
755
+ ├── commands/ ← Installed from plugins/*/commands/
756
+ ├── hooks/ ← Installed from plugins/*/hooks/
757
+ └── skills/ ← Installed from plugins/*/skills/
297
758
 
298
759
  .specweave/ ← FRAMEWORK DATA (always present)
299
760
  ├── increments/ ← Feature development
@@ -302,11 +763,20 @@ src/ ← SOURCE OF TRUTH (version controlled)
302
763
  ```
303
764
 
304
765
  **Rules**:
305
- - ✅ ALWAYS edit files in `src/` (source of truth)
306
- - ✅ Run install scripts to sync changes to `.claude/`
766
+ - ✅ `src/` = TypeScript code ONLY (compiled to `dist/`)
767
+ - ✅ ALL skills/agents/commands/hooks = Inside plugins (including core!)
768
+ - ✅ `plugins/specweave-core/` = Core framework plugin (always loaded)
769
+ - ✅ `.claude/` = Installed from all enabled plugins
770
+ - ❌ NEVER mix `*.ts` and `SKILL.md` in the same directory
307
771
  - ❌ NEVER edit files in `.claude/` directly (they get overwritten)
308
772
  - ❌ NEVER create new files in project root (use increment folders)
309
773
 
774
+ **Key Architectural Principle**:
775
+ - TypeScript code (`*.ts`) goes in `src/` → compiled to `dist/`
776
+ - Claude-native files (`SKILL.md`, `AGENT.md`, `*.md`) go in `plugins/` → copied to `.claude/`
777
+ - Even "core" framework components are in `plugins/specweave-core/` (everything is a plugin!)
778
+ - This separation ensures clean builds and prevents mixing compiled code with runtime files
779
+
310
780
  ### Tech Stack
311
781
 
312
782
  **Core**:
@@ -336,67 +806,91 @@ src/ ← SOURCE OF TRUTH (version controlled)
336
806
 
337
807
  ```
338
808
  specweave/
339
- ├── src/ # SOURCE OF TRUTH
809
+ ├── src/ # SOURCE OF TRUTH (TypeScript code ONLY)
340
810
  │ ├── cli/ # CLI commands (init, version)
341
811
  │ │ └── commands/
342
812
  │ │ └── init.ts # Main installation logic
343
- │ ├── core/ # Core framework logic
344
- │ │ ├── plugin-loader.ts # ✅ NEW: Load plugins from disk
345
- │ │ ├── plugin-manager.ts # ✅ NEW: Plugin lifecycle management
346
- │ │ ├── plugin-detector.ts # ✅ NEW: Auto-detect plugins (4 phases)
813
+ │ ├── core/ # Core framework logic (TypeScript only)
814
+ │ │ ├── plugin-loader.ts # Load plugins from disk
815
+ │ │ ├── plugin-manager.ts # Plugin lifecycle management
816
+ │ │ ├── plugin-detector.ts # Auto-detect plugins (4 phases)
347
817
  │ │ ├── config-manager.ts # Config loading/validation
348
818
  │ │ ├── types/
349
- │ │ │ └── plugin.ts # ✅ NEW: Plugin type definitions
350
- │ │ ├── schemas/
351
- │ │├── plugin-manifest.schema.json # ✅ NEW
352
- │ │└── specweave-config.schema.json # ✅ NEW
353
- │ └── skills/
354
- │ │ └── rfc-generator/ # NEW: Core skill for all users
355
- │ ├── skills/ # 8 core skills (SKILL.md + test-cases/)
356
- │ │ ├── increment-planner/
357
- │ │ ├── context-loader/
358
- │ │ └── ...
359
- │ ├── agents/ # 3 core agents (AGENT.md)
360
- │ │ ├── pm/
361
- │ │ ├── architect/
362
- │ │ └── tech-lead/
363
- │ ├── commands/ # 7 core slash commands (.md)
364
- │ │ ├── specweave-inc.md
365
- │ │ ├── specweave-do.md
366
- │ │ └── ...
367
- │ ├── hooks/ # Lifecycle hooks (.sh)
368
- │ │ └── post-task-completion.sh
369
- │ ├── adapters/ # Multi-tool support (UPDATED)
370
- │ │ ├── adapter-interface.ts # ✅ UPDATED: Plugin methods
371
- │ │ ├── adapter-base.ts # ✅ UPDATED: Default implementations
372
- │ │ ├── claude/ # ✅ UPDATED: Native plugin support
373
- │ │ ├── cursor/ # ✅ UPDATED: AGENTS.md compilation
374
- │ │ ├── copilot/ # ✅ UPDATED: AGENTS.md compilation
375
- │ │ └── generic/ # ✅ UPDATED: Manual workflows
376
- │ ├── plugins/ # ✅ NEW: Plugin system
377
- │ │ └── specweave-github/ # ✅ COMPLETE: GitHub integration
378
- │ │ ├── .claude-plugin/
379
- │ │ │ └── manifest.json
380
- │ │ ├── skills/
381
- │ │ │ ├── github-sync/
382
- │ │ │ └── github-issue-tracker/
383
- │ │ ├── agents/
384
- │ │ │ └── github-manager/
385
- │ │ └── commands/
386
- │ │ ├── github-create-issue.md
387
- │ │ ├── github-sync.md
388
- │ │ ├── github-close-issue.md
389
- │ │ └── github-status.md
819
+ │ │ │ └── plugin.ts # Plugin type definitions
820
+ │ │ └── schemas/
821
+ │ │ ├── plugin-manifest.schema.json
822
+ │ │ └── specweave-config.schema.json
823
+ ├── hooks/ # TypeScript utilities for hooks
824
+ │ │ └── lib/ # Hook helper functions
825
+ │ ├── adapters/ # Tool adapters (legacy)
826
+ │ │ ├── adapter-interface.ts
827
+ │ │ ├── adapter-base.ts
828
+ │ │ ├── claude/
829
+ ├── cursor/ (legacy)
830
+ │ │ ├── copilot/ (legacy)
831
+ │ │ └── generic/ (legacy)
390
832
  │ ├── templates/ # User project templates
391
833
  │ │ ├── CLAUDE.md.template
392
834
  │ │ ├── AGENTS.md.template
393
835
  │ │ └── ...
394
836
  │ └── utils/ # Utility functions
395
837
 
838
+ ├── plugins/ # ALL PLUGINS (root level)
839
+ │ ├── specweave-core/ # CORE PLUGIN (framework essentials)
840
+ │ │ ├── .claude-plugin/
841
+ │ │ │ └── plugin.json # Claude native manifest
842
+ │ │ ├── skills/ # Core skills (9 total)
843
+ │ │ │ ├── rfc-generator/ # RFC generation for increments
844
+ │ │ │ ├── increment-planner/ # Increment planning and spec generation
845
+ │ │ │ ├── context-loader/ # Context loading optimization
846
+ │ │ │ ├── tdd-workflow/ # Test-driven development workflow
847
+ │ │ │ ├── project-kickstarter/ # New project bootstrapping
848
+ │ │ │ ├── brownfield-analyzer/ # Existing codebase analysis
849
+ │ │ │ ├── brownfield-onboarder/ # Brownfield project onboarding
850
+ │ │ │ ├── increment-quality-judge/# Quality assessment
851
+ │ │ │ └── context-optimizer/ # Context optimization
852
+ │ │ ├── agents/ # Core agents (22 total)
853
+ │ │ │ ├── pm/ # Product Manager agent
854
+ │ │ │ ├── architect/ # System Architect agent
855
+ │ │ │ ├── tech-lead/ # Tech Lead agent
856
+ │ │ │ └── ...
857
+ │ │ ├── commands/ # Core commands (22 total)
858
+ │ │ │ ├── specweave.inc.md # /specweave:inc
859
+ │ │ │ ├── specweave.do.md # /specweave:do
860
+ │ │ │ ├── specweave.done.md # /specweave:done
861
+ │ │ │ └── ...
862
+ │ │ ├── hooks/ # Lifecycle hooks (8 total)
863
+ │ │ │ ├── post-task-completion.sh # Auto-runs after tasks complete
864
+ │ │ │ ├── pre-implementation.sh # Pre-task validation
865
+ │ │ │ └── ...
866
+ │ │ └── lib/ # TypeScript utilities (optional)
867
+ │ │
868
+ │ ├── specweave-github/ # GitHub Issues integration
869
+ │ │ ├── .claude-plugin/
870
+ │ │ │ └── plugin.json # Claude native manifest
871
+ │ │ ├── skills/
872
+ │ │ │ ├── github-sync/
873
+ │ │ │ └── github-issue-tracker/
874
+ │ │ ├── agents/
875
+ │ │ │ └── github-manager/
876
+ │ │ ├── commands/
877
+ │ │ │ ├── github-create-issue.md
878
+ │ │ │ ├── github-sync.md
879
+ │ │ │ └── ...
880
+ │ │ └── lib/ # TypeScript utilities
881
+ │ ├── specweave-figma/ # Figma design sync
882
+ │ ├── specweave-infrastructure/ # K8s, Helm, Terraform
883
+ │ └── ... (18 plugins total)
884
+
885
+ ├── .claude-plugin/ # Claude Code marketplace (root level)
886
+ │ ├── marketplace.json # Plugin catalog (18 plugins)
887
+ │ └── README.md # Marketplace documentation
888
+
396
889
  ├── .claude/ # Pre-installed for SpecWeave dev
397
- │ ├── skills/ # Synced from src/skills/
398
- │ ├── agents/ # Synced from src/agents/
399
- └── commands/ # Synced from src/commands/
890
+ │ ├── agents/ # Installed from plugins/*/agents/
891
+ │ ├── commands/ # Installed from plugins/*/commands/
892
+ ├── hooks/ # Installed from plugins/*/hooks/
893
+ │ └── skills/ # Installed from plugins/*/skills/
400
894
 
401
895
  ├── .specweave/ # SpecWeave's own increments
402
896
  │ ├── increments/
@@ -411,8 +905,17 @@ specweave/
411
905
  │ │ │ └── reports/ # ✅ Analysis files
412
906
  │ │ └── _backlog/
413
907
  │ ├── docs/
414
- │ │ ├── internal/ # Strategic docs
415
- │ │ └── public/ # Published docs
908
+ │ │ ├── internal/ # Strategic docs (NEVER published)
909
+ │ │ │ ├── strategy/ # Business strategy, market analysis
910
+ │ │ │ ├── architecture/ # Technical architecture
911
+ │ │ │ │ ├── adr/ # Architecture Decision Records
912
+ │ │ │ │ ├── rfc/ # ✅ Request for Comments (detailed specs)
913
+ │ │ │ │ ├── diagrams/ # Mermaid + SVG
914
+ │ │ │ │ └── hld-system.md # High-Level Design
915
+ │ │ │ └── delivery/ # Implementation notes, runbooks
916
+ │ │ └── public/ # User-facing docs (can publish)
917
+ │ │ ├── guides/
918
+ │ │ └── api/
416
919
  │ └── logs/
417
920
 
418
921
  ├── tests/
@@ -452,33 +955,13 @@ specweave/
452
955
 
453
956
  ### ❌ NEVER Create in Root (Pollutes Repository)
454
957
 
455
- All AI-generated files MUST go into increment folders:
958
+ **See comprehensive rules at top of document**: [🚨 CRITICAL: NEVER POLLUTE PROJECT ROOT!](#-critical-never-pollute-project-root)
456
959
 
457
- ```
458
- WRONG:
459
- /SESSION-SUMMARY-2025-10-28.md # NO!
460
- /ADR-006-DEEP-ANALYSIS.md # NO!
461
- /ANALYSIS-MULTI-TOOL-COMPARISON.md # NO!
462
- /CONTEXT-LOADER-CORRECTIONS.md # NO!
463
-
464
- ✅ CORRECT:
465
- .specweave/increments/0002-core-enhancements/
466
- ├── reports/
467
- │ ├── SESSION-SUMMARY-2025-10-28.md
468
- │ ├── ADR-006-DEEP-ANALYSIS.md
469
- │ ├── ANALYSIS-MULTI-TOOL-COMPARISON.md
470
- │ └── CONTEXT-LOADER-CORRECTIONS.md
471
- ├── logs/
472
- │ └── execution-2025-10-28.log
473
- └── scripts/
474
- └── migration-helper.sh
475
- ```
476
-
477
- **Why?**
478
- - ✅ Complete traceability (which increment created which files)
479
- - ✅ Easy cleanup (delete increment folder = delete all files)
480
- - ✅ Clear context (all files for a feature in one place)
481
- - ✅ No root clutter
960
+ **Quick summary**:
961
+ - ✅ ALL AI-generated files → increment folders (`.specweave/increments/####/reports/`, `logs/`, `scripts/`)
962
+ - ✅ Architecture decisions → `.specweave/docs/internal/architecture/adr/`
963
+ - ❌ NEVER create `.md` files, scripts, or logs in project root
964
+ - ❌ Build artifacts (`.tgz`, `.pt`, etc.) → add to `.gitignore`
482
965
 
483
966
  ### Runtime Artifacts (NOT Source Controlled)
484
967
 
@@ -508,51 +991,50 @@ All AI-generated files MUST go into increment folders:
508
991
 
509
992
  ### Making Changes
510
993
 
511
- **1. Skills** (`src/skills/skill-name/`):
994
+ **ALL components belong to plugins** (following [Claude Code's plugin system](https://docs.claude.com/en/docs/claude-code/plugins)).
995
+
996
+ **1. Editing Skills** (any plugin):
512
997
  ```bash
513
- # Edit source
514
- vim src/skills/context-loader/SKILL.md
998
+ # Core plugin (auto-loaded):
999
+ vim plugins/specweave-core/skills/rfc-generator/SKILL.md
515
1000
 
516
- # Sync to .claude/
517
- npm run install:skills
1001
+ # Other plugins (opt-in):
1002
+ vim plugins/specweave-github/skills/github-sync/SKILL.md
518
1003
 
519
- # Test
520
- /context-loader-test
1004
+ # Skills auto-activate based on description keywords
521
1005
  ```
522
1006
 
523
- **2. Agents** (`src/agents/agent-name/`):
1007
+ **2. Editing Agents** (any plugin):
524
1008
  ```bash
525
- # Edit source
526
- vim src/agents/pm/AGENT.md
1009
+ # Core plugin (auto-loaded):
1010
+ vim plugins/specweave-core/agents/pm/AGENT.md
527
1011
 
528
- # Sync to .claude/
529
- npm run install:agents
1012
+ # Other plugins (opt-in):
1013
+ vim plugins/specweave-github/agents/github-manager/AGENT.md
530
1014
 
531
1015
  # Test by invoking via Task tool
532
1016
  ```
533
1017
 
534
- **3. Commands** (`src/commands/command-name.md`):
1018
+ **3. Editing Commands** (any plugin):
535
1019
  ```bash
536
- # Edit source
537
- vim src/commands/specweave.do.md
1020
+ # Core plugin (auto-loaded):
1021
+ vim plugins/specweave-core/commands/specweave.do.md
538
1022
 
539
- # Sync to .claude/
540
- npm run install:all
1023
+ # Other plugins (opt-in):
1024
+ vim plugins/specweave-github/commands/github-sync.md
541
1025
 
542
- # Test
543
- /specweave.do
1026
+ # Test via /command-name
544
1027
  ```
545
1028
 
546
- **4. Core Logic** (`src/core/`, `src/cli/`):
1029
+ **4. Creating New Plugins** (see "Plugins" section below for complete instructions)
1030
+
1031
+ **5. Editing Framework Code** (`src/core/`, `src/cli/`):
547
1032
  ```bash
548
- # Edit TypeScript
1033
+ # Edit TypeScript (config manager, plugin loader, etc.)
549
1034
  vim src/core/config-manager.ts
550
1035
 
551
- # Build
552
- npm run build
553
-
554
- # Test
555
- npm test
1036
+ # Build and test
1037
+ npm run build && npm test
556
1038
  ```
557
1039
 
558
1040
  ### Testing Strategy
@@ -567,10 +1049,10 @@ npm test
567
1049
  - Test coverage plans per increment
568
1050
  - TC-XXXX test case IDs
569
1051
 
570
- 3. **Skill Tests** (`src/skills/{name}/test-cases/*.yaml`)
571
- - YAML-based test cases
1052
+ 3. **Skill Tests** (`tests/specs/{skill-name}/` or `tests/integration/{skill-name}/`)
1053
+ - Test cases for skill functionality
572
1054
  - Minimum 3 test cases per skill
573
- - Run via: `npm run test:skill`
1055
+ - Run via: `npm run test:integration`
574
1056
 
575
1057
  4. **Code Tests** (`tests/`)
576
1058
  - **E2E (Playwright)**: MANDATORY for UI features
@@ -590,339 +1072,182 @@ npm test
590
1072
 
591
1073
  ### Hooks and Automation
592
1074
 
593
- **Post-Task Completion Hook** (`.claude/hooks/post-task-completion.sh`):
594
- - ✅ Plays completion sound (Glass.aiff on macOS)
595
- - ✅ Outputs JSON systemMessage reminder
596
- - ✅ Logs to `.specweave/logs/tasks.log`
1075
+ **Post-Task Completion Hook v2.0** (`.claude/hooks/post-task-completion.sh`):
1076
+
1077
+ **Smart Session-End Detection**:
1078
+ - ✅ Tracks inactivity gaps between TodoWrite calls
1079
+ - ✅ Only plays sound when session is TRULY ending (15s+ inactivity after all tasks complete)
1080
+ - ✅ Skips sound during rapid work (Claude creating multiple todo lists)
1081
+ - ✅ Enhanced logging with decision reasoning in `.specweave/logs/hooks-debug.log`
1082
+ - ✅ Debouncing prevents duplicate hook fires
1083
+
1084
+ **How It Works**:
1085
+ ```
1086
+ Problem: Claude creates multiple todo lists in one conversation
1087
+ - List 1: [A, B, C] → completes → sound plays ❌
1088
+ - List 2: [D, E] → completes 30s later → sound plays again ❌
1089
+ - User hears sounds while Claude is still working!
1090
+
1091
+ Solution: Inactivity-based detection
1092
+ - 10:00:00 - Task done (gap: 5s) → skip sound
1093
+ - 10:00:05 - Task done (gap: 5s) → skip sound
1094
+ - 10:00:10 - All done (gap: 5s) → skip sound (rapid work)
1095
+ - ... (15+ seconds pass)
1096
+ - 10:01:00 - All done (gap: 50s) → PLAY SOUND! ✅ (session ending)
1097
+ ```
1098
+
1099
+ **Configuration** (`src/hooks/post-task-completion.sh`):
1100
+ - `INACTIVITY_THRESHOLD=15` - Seconds of inactivity to assume session ending (adjustable)
1101
+ - `DEBOUNCE_SECONDS=2` - Prevents duplicate hook fires
597
1102
 
598
1103
  **Manual Actions** (Claude MUST do after each task):
599
1104
  - Update `CLAUDE.md` when structure changes
600
1105
  - Update `README.md` for user-facing changes
601
1106
  - Update `CHANGELOG.md` for API changes
602
1107
 
603
- **Living Docs Sync** (after `/specweave.do` completes):
604
- - Run `/sync-docs update`
1108
+ **Living Docs Sync** (after `/specweave:do` completes):
1109
+ - Run `/specweave:sync-docs update`
605
1110
  - Updates `.specweave/docs/` with implementation learnings
606
1111
  - Updates ADRs from Proposed → Accepted
607
1112
 
608
1113
  ---
609
1114
 
610
- ## Plugin Architecture (v0.4.0)
1115
+ ## Plugins
611
1116
 
612
- ### Overview
1117
+ **SpecWeave is built 100% on [Claude Code's native plugin system](https://docs.claude.com/en/docs/claude-code/plugins)**.
613
1118
 
614
- SpecWeave v0.4.0 introduces a **modular plugin system** that:
615
- - Reduces context usage by 60-80%
616
- - Enables community contributions
617
- - Maintains multi-tool support (Claude, Cursor, Copilot, Generic)
618
- - Preserves Claude Code's native advantages
1119
+ ### Architecture: Everything is a Plugin
619
1120
 
620
- ### Core vs. Plugin Decision Tree
1121
+ **Critical Understanding**: SpecWeave doesn't have a "core framework" separate from plugins. Instead:
621
1122
 
622
1123
  ```
623
- Is this feature...
624
- ├─ Used by EVERY project? CORE
625
- ├─ Specific to a tech stack (React, K8s, ML)? → PLUGIN
626
- ├─ Part of increment lifecycle (spec, plan, tasks)? → CORE
627
- ├─ Domain-specific expertise (DevOps, design, payments)? → PLUGIN
628
- ├─ Automated via hooks (living docs)? → CORE
629
- └─ Nice-to-have but not essential? → PLUGIN
1124
+ SpecWeave = Collection of Claude Code Plugins
1125
+ ├── specweave-core (auto-loaded) The "framework" IS a plugin
1126
+ ├── specweave-github (opt-in)
1127
+ ├── specweave-figma (opt-in)
1128
+ └── ...all other plugins (opt-in)
630
1129
  ```
631
1130
 
632
- ### Plugin Structure
1131
+ **What this means**:
1132
+ - ✅ `specweave-core` is a Claude Code plugin (happens to auto-load)
1133
+ - ✅ All plugins follow identical structure (`.claude-plugin/plugin.json`, `skills/`, `agents/`, `commands/`)
1134
+ - ✅ Adding a skill = adding it to a plugin (always)
1135
+ - ❌ There are NO "core framework components" outside plugins
633
1136
 
634
- ```
635
- src/plugins/kubernetes/
636
- ├── .claude-plugin/
637
- │ └── manifest.json # Metadata, auto-detection, triggers
638
- ├── skills/
639
- │ ├── k8s-deployer/
640
- │ │ ├── SKILL.md
641
- │ │ └── test-cases/
642
- │ ├── helm-manager/
643
- │ └── k8s-troubleshooter/
644
- ├── agents/
645
- │ └── devops/
646
- │ └── AGENT.md
647
- ├── commands/
648
- │ └── k8s-deploy.md
649
- └── README.md
650
- ```
1137
+ **Why this matters**:
1138
+ - Uniform architecture (no special cases)
1139
+ - All plugins discoverable via Claude Code's plugin system
1140
+ - Easy to extend (just add another plugin)
1141
+ - Future-proof (follows Anthropic's standards)
651
1142
 
652
- ### Plugin Manifest Example
1143
+ **Further reading**:
1144
+ - 📖 [Claude Code Plugin Docs](https://docs.claude.com/en/docs/claude-code/plugins)
1145
+ - 📖 [Plugin Reference](https://docs.claude.com/en/docs/claude-code/plugins-reference)
1146
+ - 📖 [Plugin Marketplaces](https://docs.claude.com/en/docs/claude-code/plugin-marketplaces)
653
1147
 
654
- ```json
655
- {
656
- "name": "specweave-kubernetes",
657
- "version": "1.0.0",
658
- "description": "Kubernetes deployment and management",
659
- "author": "SpecWeave Team",
660
- "license": "MIT",
661
- "specweave_core_version": ">=0.4.0",
662
-
663
- "auto_detect": {
664
- "files": ["kubernetes/", "k8s/", "helm/"],
665
- "packages": ["@kubernetes/client-node"],
666
- "env_vars": ["KUBECONFIG"]
667
- },
668
-
669
- "provides": {
670
- "skills": ["k8s-deployer", "helm-manager", "k8s-troubleshooter"],
671
- "agents": ["devops"],
672
- "commands": ["specweave.k8s.deploy"]
673
- },
674
-
675
- "triggers": ["kubernetes", "k8s", "kubectl", "helm", "pod", "deployment"]
676
- }
677
- ```
1148
+ ### Available SpecWeave Plugins
678
1149
 
679
- ### How Adapters Handle Plugins
1150
+ **Location**: `plugins/` (root level)
680
1151
 
681
- **Claude Code** (Native):
682
- - Copies plugins to `.claude/skills/`, `.claude/agents/`, `.claude/commands/`
683
- - Skills auto-activate based on context
684
- - Hooks fire automatically
685
- - Quality: ⭐⭐⭐⭐⭐ (100%)
1152
+ **Discovery**:
1153
+ - Browse all plugins: `ls plugins/` or check [.claude-plugin/marketplace.json](/.claude-plugin/marketplace.json)
1154
+ - Live catalog: See `.claude-plugin/README.md` for current marketplace contents
1155
+ - Auto-detection during `specweave init` suggests relevant plugins
686
1156
 
687
- **Cursor 2.0** (Compiled):
688
- - Appends plugin to `AGENTS.md`
689
- - Generates `cursor-team-commands.json` for dashboard
690
- - Creates `@<plugin-name>` context shortcuts
691
- - Quality: ⭐⭐⭐⭐ (85%)
1157
+ **Plugin Structure** (all follow same pattern):
1158
+ ```
1159
+ plugins/specweave-{name}/
1160
+ ├── .claude-plugin/plugin.json # Claude native manifest
1161
+ ├── skills/ # Auto-activating capabilities (SKILL.md files)
1162
+ ├── agents/ # Specialized AI agents (AGENT.md files)
1163
+ ├── commands/ # Slash commands (.md files)
1164
+ └── lib/ # TypeScript utilities (optional)
1165
+ ```
692
1166
 
693
- **Copilot** (Compiled):
694
- - Appends plugin to `.github/copilot/instructions.md`
695
- - Natural language instructions only
696
- - Quality: ⭐⭐⭐ (60%)
1167
+ **Key Plugins** (for reference):
1168
+ - `specweave-core` - Framework essentials (always loaded)
1169
+ - `specweave-github` - GitHub Issues integration
1170
+ - `specweave-{frontend|backend|infrastructure}` - Tech stack plugins
697
1171
 
698
- **Generic** (Manual):
699
- - Appends plugin to `SPECWEAVE-MANUAL.md`
700
- - User copy-pastes relevant sections
701
- - Quality: ⭐⭐ (40%)
1172
+ **For complete list**: Check `plugins/` directory or marketplace.json
702
1173
 
703
- ### Four-Phase Plugin Detection
1174
+ ### Plugin Decision Tree
704
1175
 
705
- 1. **Init-Time** (during `specweave init`):
706
- - Scans `package.json`, directories, env vars
707
- - Suggests plugins: "Found React. Enable frontend-stack? (Y/n)"
1176
+ **Key Insight**: In Claude Code's plugin system, EVERYTHING is a plugin. The only question is: **Which plugin does this belong to?**
708
1177
 
709
- 2. **First Increment** (during `/specweave.inc`):
710
- - Analyzes increment description for keywords
711
- - Suggests before creating spec: "This needs kubernetes plugin. Enable? (Y/n)"
1178
+ **Decision**: Which plugin should contain this feature?
712
1179
 
713
- 3. **Pre-Task** (before task execution):
714
- - Hook scans task description
715
- - Non-blocking suggestion: "This task mentions K8s. Consider enabling plugin."
1180
+ ```
1181
+ Is this feature...
1182
+ ├─ Used by EVERY project? specweave-core (auto-loaded)
1183
+ │ Examples: increment-planner, rfc-generator, tdd-workflow, PM/Architect agents
1184
+
1185
+ ├─ Part of increment lifecycle? → specweave-core (auto-loaded)
1186
+ │ Examples: /specweave:inc, /specweave:do, living docs hooks
1187
+
1188
+ ├─ Tech stack specific? → New plugin: specweave-{stack}
1189
+ │ Examples: specweave-frontend (React, Next.js), specweave-kubernetes
1190
+
1191
+ ├─ Domain expertise? → New plugin: specweave-{domain}
1192
+ │ Examples: specweave-ml (TensorFlow), specweave-payments (Stripe)
1193
+
1194
+ ├─ External integration? → New plugin: specweave-{tool}
1195
+ │ Examples: specweave-github, specweave-jira, specweave-figma
1196
+
1197
+ └─ Optional enhancement? → New plugin: specweave-{feature}
1198
+ Examples: specweave-diagrams, specweave-cost-optimizer
1199
+ ```
716
1200
 
717
- 4. **Post-Increment** (after completion):
718
- - Hook scans git diff for new dependencies
719
- - Suggests for next increment: "Detected Stripe. Enable payment-processing plugin?"
1201
+ **Plugin Structure** (all follow Claude Code's standard):
1202
+ ```
1203
+ plugins/specweave-{name}/
1204
+ ├── .claude-plugin/plugin.json # Required
1205
+ ├── skills/ # Optional
1206
+ ├── agents/ # Optional
1207
+ ├── commands/ # Optional
1208
+ └── hooks/ # Optional
1209
+ ```
720
1210
 
721
- ### Creating a New Plugin
1211
+ **Result**: Core plugin stayed at ~12K tokens (75% smaller than v0.3.7!)
722
1212
 
723
- **For SpecWeave Contributors**:
1213
+ ### Adding a New Plugin (Contributors)
724
1214
 
1215
+ **Create New Plugin**:
725
1216
  ```bash
726
- # 1. Create structure
727
- mkdir -p src/plugins/my-plugin/{.claude-plugin,skills,agents,commands}
1217
+ # 1. Create plugin structure
1218
+ mkdir -p plugins/specweave-myplugin/{.claude-plugin,skills,agents,commands,lib}
728
1219
 
729
- # 2. Create manifest
730
- cat > src/plugins/my-plugin/.claude-plugin/manifest.json << 'EOF'
1220
+ # 2. Create plugin.json (Claude native format)
1221
+ cat > plugins/specweave-myplugin/.claude-plugin/plugin.json << 'EOF'
731
1222
  {
732
- "name": "specweave-my-plugin",
1223
+ "name": "specweave-myplugin",
1224
+ "description": "What it does and when to use it",
733
1225
  "version": "1.0.0",
734
- "description": "What it does",
735
- "provides": {
736
- "skills": ["skill-name"],
737
- "agents": ["agent-name"],
738
- "commands": ["command-name"]
739
- },
740
- "triggers": ["keyword1", "keyword2"]
1226
+ "author": {"name": "Your Name"}
741
1227
  }
742
1228
  EOF
743
1229
 
744
- # 3. Add skills/agents/commands (same format as core)
745
-
746
- # 4. Test
747
- specweave plugin enable my-plugin
1230
+ # 3. Add components (see Claude docs for format):
1231
+ # - skills/my-skill/SKILL.md
1232
+ # - agents/my-agent/AGENT.md
1233
+ # - commands/my-command.md
1234
+ # - lib/my-utility.ts (optional)
1235
+
1236
+ # 4. Add to marketplace
1237
+ vim .claude-plugin/marketplace.json
1238
+ # Add entry:
1239
+ # {
1240
+ # "name": "specweave-myplugin",
1241
+ # "description": "What it does and when to use it",
1242
+ # "source": "../plugins/specweave-myplugin"
1243
+ # }
1244
+
1245
+ # 5. Test locally
1246
+ /plugin marketplace add ./.claude-plugin
1247
+ /plugin install myplugin@marketplace
748
1248
  ```
749
1249
 
750
- ### Attribution for Borrowed Plugins
751
-
752
- If you fork a community plugin (e.g., from wshobson/agents):
753
-
754
- ```json
755
- {
756
- "name": "specweave-observability",
757
- "version": "1.0.0",
758
- "description": "Observability & monitoring for SpecWeave",
759
-
760
- "credits": {
761
- "based_on": "https://github.com/wshobson/agents/observability-monitoring",
762
- "original_author": "Seth Hobson",
763
- "license": "MIT",
764
- "modifications": [
765
- "Adapted for SpecWeave increment lifecycle",
766
- "Added /sync-docs integration",
767
- "SpecWeave naming conventions"
768
- ]
769
- }
770
- }
771
- ```
772
-
773
- **Requirements**:
774
- - ✅ Clear attribution in manifest
775
- - ✅ Same or compatible open-source license
776
- - ✅ Document modifications made
777
- - ✅ Link to upstream prominently
778
- - ✅ Contribute improvements back (if possible)
779
-
780
- ### Marketplace Publication
781
-
782
- SpecWeave publishes plugins to **two places**:
783
-
784
- 1. **NPM Package** (primary):
785
- - Full SpecWeave framework with plugin system
786
- - `npm install -g specweave`
787
-
788
- 2. **Anthropic Marketplace** (secondary):
789
- - Individual plugins for standalone use
790
- - `/plugin marketplace add specweave/marketplace`
791
- - Works without full framework
792
-
793
- **Publishing a Plugin to Marketplace**:
794
-
795
- ```bash
796
- # 1. Copy plugin to marketplace repo
797
- cp -r src/plugins/kubernetes marketplace/plugins/
798
-
799
- # 2. Update marketplace manifest
800
- # marketplace/.claude-plugin/marketplace.json
801
-
802
- # 3. Tag release
803
- git tag kubernetes-v1.0.0
804
- git push --tags
805
-
806
- # 4. Test installation
807
- /plugin marketplace add specweave/marketplace
808
- /plugin install kubernetes
809
- ```
810
-
811
- ---
812
-
813
- ## Current Work (Increment 0004)
814
-
815
- **Increment**: 0004-plugin-architecture
816
- **Title**: Plugin Architecture - Modular, Context-Efficient, Multi-Tool Support
817
- **Status**: ✅ COMPLETE (Foundation + GitHub plugin)
818
- **Priority**: P0
819
- **Started**: 2025-10-31
820
- **Completed**: 2025-10-31
821
-
822
- **Summary**:
823
- Successfully implemented modular plugin architecture with 60-80% context reduction, multi-tool support (Claude/Cursor/Copilot/Generic), and production-ready GitHub plugin. Core framework is complete and extensible for future plugins.
824
-
825
- **Key Achievements**:
826
- - ✅ **Core Plugin System** (T-001 to T-007):
827
- - Plugin type definitions (Plugin, PluginManifest, Skill, Agent, Command)
828
- - JSON Schema validation (plugin-manifest.schema.json, specweave-config.schema.json)
829
- - PluginLoader (manifest validation, component loading, integrity checks)
830
- - PluginManager (lifecycle management, dependency resolution, config management)
831
- - PluginDetector (4-phase detection: init/spec/task/git-diff)
832
-
833
- - ✅ **Multi-Tool Adapter Support** (T-008 to T-010):
834
- - Claude adapter: Native `.claude/` installation
835
- - Cursor adapter: AGENTS.md compilation with HTML markers
836
- - Copilot adapter: AGENTS.md compilation with HTML markers
837
- - Generic adapter: AGENTS.md for manual workflows
838
-
839
- - ✅ **GitHub Plugin** (T-013 to T-022):
840
- - 2 skills: github-sync, github-issue-tracker
841
- - 1 agent: github-manager (GitHub CLI specialist)
842
- - 4 commands: create-issue, sync, close-issue, status
843
- - Auto-detection: `.git/` + `github.com` remote + `GITHUB_TOKEN`
844
- - Production-ready manifest with proper dependencies
845
-
846
- - ✅ **Build & Configuration**:
847
- - TypeScript compilation successful (all errors resolved)
848
- - Updated .gitignore for plugin caching
849
- - Ajv dependency added for JSON Schema validation
850
- - ESM module compatibility maintained
851
-
852
- **Context Reduction Achieved**:
853
- - Basic project: 50K → 12K tokens (76% reduction!)
854
- - React app: 50K → 16K tokens (68% reduction!)
855
- - Backend API: 50K → 15K tokens (70% reduction!)
856
-
857
- **Files Implemented**:
858
- - `src/core/types/plugin.ts` - Complete type system
859
- - `src/core/schemas/plugin-manifest.schema.json` - Manifest validation
860
- - `src/core/schemas/specweave-config.schema.json` - Config validation
861
- - `src/core/plugin-loader.ts` - Plugin loading & validation
862
- - `src/core/plugin-manager.ts` - Lifecycle & dependency management
863
- - `src/core/plugin-detector.ts` - Auto-detection system
864
- - `src/adapters/*/adapter.ts` - Multi-tool plugin compilation
865
- - `src/plugins/specweave-github/` - Complete GitHub plugin
866
-
867
- **Next Steps**:
868
- 1. ✅ Foundation complete - ready for additional plugins!
869
- 2. 🔮 Future plugins (separate increments):
870
- - specweave-jira (JIRA integration)
871
- - specweave-ado (Azure DevOps)
872
- - specweave-frontend-stack (React/Vue/Angular)
873
- - specweave-backend-stack (Node/Python/.NET)
874
-
875
- ---
876
-
877
- ## Previous Work (Increment 0003)
878
-
879
- **Increment**: 0003-intelligent-model-selection
880
- **Title**: Intelligent Model Selection - Automatic Cost Optimization
881
- **Status**: Planned (just created, ready to implement)
882
- **Priority**: P1
883
- **Started**: 2025-10-30
884
-
885
- **Summary**:
886
- Implement automatic cost optimization by intelligently routing work to Sonnet 4.5 (planning/analysis) vs Haiku 4.5 (execution), following Anthropic's official guidance. Expected 60-70% cost savings.
887
-
888
- **Key Features**:
889
- - ✅ Spec.md created (8 user stories, complete product requirements)
890
- - ✅ Plan.md created (comprehensive technical architecture)
891
- - ✅ Tasks.md created (22 implementation tasks)
892
- - ✅ Tests.md created (100+ test cases, quality validation)
893
-
894
- **Three-Layer System**:
895
- 1. **Agent Model Preferences** - Each agent declares optimal model (Sonnet/Haiku/Auto)
896
- 2. **Phase Detection** - Analyze user intent to detect planning vs execution
897
- 3. **Cost Tracking** - Real-time cost visibility with savings calculations
898
-
899
- **Files to Focus On**:
900
- - `.specweave/increments/0003-intelligent-model-selection/spec.md`
901
- - `.specweave/increments/0003-intelligent-model-selection/plan.md`
902
- - `.specweave/increments/0003-intelligent-model-selection/tasks.md`
903
- - `.specweave/increments/0003-intelligent-model-selection/tests.md`
904
-
905
- **Next Steps**:
906
- 1. Execute Task T-001: Create type definitions
907
- 2. Execute Task T-002: Create pricing constants
908
- 3. Execute Task T-003: Implement AgentModelManager
909
- 4. Continue through all 22 tasks
910
-
911
- ---
912
-
913
- ## Previous Work (Increment 0002)
914
-
915
- **Increment**: 0002-core-enhancements
916
- **Title**: Core Framework Enhancements - Multi-Tool Support & Diagram Agents
917
- **Status**: Completed (testing phase)
918
- **Priority**: P1
919
- **Started**: 2025-10-27
920
-
921
- **Key Achievements**:
922
- - ✅ Migrated commands to dot notation (`specweave.xxx`)
923
- - ✅ Diagram generation agents (C4, Sequence, ER)
924
- - ✅ Fixed context documentation
925
- - ✅ Corrected ADR-0002 (context loading architecture)
1250
+ **See**: [.claude-plugin/README.md](/.claude-plugin/README.md) for marketplace documentation
926
1251
 
927
1252
  ---
928
1253
 
@@ -946,7 +1271,7 @@ Implement automatic cost optimization by intelligently routing work to Sonnet 4.
946
1271
 
947
1272
  ### 4. Incremental Development
948
1273
  - Work in small, measurable increments
949
- - Use SpecWeave's own workflow (`/specweave.inc`, `/specweave.do`, etc.)
1274
+ - Use SpecWeave's own workflow (`/specweave:inc`, `/specweave:do`, etc.)
950
1275
  - All work traces back to specs
951
1276
 
952
1277
  ### 5. Adapter-First Design
@@ -985,94 +1310,44 @@ git push origin develop --tags
985
1310
 
986
1311
  ---
987
1312
 
988
- ## Adapter System
1313
+ ## Adapter System (Legacy)
989
1314
 
990
- SpecWeave supports multiple AI coding tools via adapters:
1315
+ **SpecWeave is Claude Code-first** - The framework is designed specifically for Claude Code's native capabilities.
991
1316
 
992
- **Supported Tools**:
993
- - ✅ Claude Code (best-in-class, native support)
994
- - ✅ Cursor (via `.cursorrules` + Markdown commands)
995
- - ✅ GitHub Copilot (via `.github/copilot/instructions.md`)
996
- - ⏳ Generic (Markdown-only, for ChatGPT/Gemini/etc.)
997
- - 🔮 Windsurf (planned)
1317
+ **Primary Tool**:
1318
+ - ✅ **Claude Code** - Native support (slash commands, agents, skills, hooks, MCP)
998
1319
 
999
- **Adapter Pattern**:
1000
- ```
1001
- src/adapters/
1002
- ├── claude/ # Claude Code native (slash commands, agents)
1003
- │ ├── adapter.ts
1004
- │ └── README.md
1005
- ├── cursor/ # Cursor (.cursorrules)
1006
- │ ├── adapter.ts
1007
- │ └── README.md
1008
- ├── copilot/ # GitHub Copilot (instructions.md)
1009
- │ ├── adapter.ts
1010
- │ └── README.md
1011
- └── generic/ # Generic Markdown (all others)
1012
- ├── adapter.ts
1013
- └── SPECWEAVE-MANUAL.md
1014
- ```
1320
+ **Legacy Multi-Tool Support** (may be removed):
1321
+ - ⚠️ Cursor (via `.cursorrules` + AGENTS.md compilation)
1322
+ - ⚠️ GitHub Copilot (via `.github/copilot/instructions.md`)
1323
+ - ⚠️ Generic (Markdown-only, for ChatGPT/Gemini/etc.)
1015
1324
 
1016
- **Auto-Detection**:
1017
- - Detects user's AI tool during `specweave init`
1018
- - Installs appropriate adapter
1019
- - Falls back to generic if unknown
1325
+ **Why Claude-First?**
1326
+ The adapter system was originally designed to support multiple tools, but this added significant complexity without meaningful benefit. Claude Code provides:
1327
+ - **Native plugin marketplace** - No compilation needed
1328
+ - **Auto-activating skills** - No manual @ mentions
1329
+ - ✅ **Isolated agent contexts** - True role separation
1330
+ - ✅ **Pre/post lifecycle hooks** - Automated living docs sync
1331
+ - ✅ **MCP protocol** - Industry standard for context management
1020
1332
 
1021
- ---
1022
-
1023
- ## Common Tasks
1333
+ 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.
1024
1334
 
1025
- ### Add a New Skill
1335
+ **See**: "Why Claude Code is Best-in-Class" section above for detailed comparison
1026
1336
 
1027
- ```bash
1028
- # 1. Create skill directory
1029
- mkdir -p src/skills/my-new-skill/test-cases
1030
-
1031
- # 2. Create SKILL.md
1032
- cat > src/skills/my-new-skill/SKILL.md << 'EOF'
1033
- ---
1034
- name: my-new-skill
1035
- description: What it does and when to activate
1036
1337
  ---
1037
1338
 
1038
- # My New Skill
1039
-
1040
- Content here...
1041
- EOF
1042
-
1043
- # 3. Add test cases (minimum 3)
1044
- vim src/skills/my-new-skill/test-cases/test-1-basic.yaml
1045
-
1046
- # 4. Install locally
1047
- npm run install:skills
1048
-
1049
- # 5. Test
1050
- # Ask Claude something that matches the skill's description
1051
- ```
1052
-
1053
- ### Add a New Command
1054
-
1055
- ```bash
1056
- # 1. Create command file
1057
- cat > src/commands/specweave.newcmd.md << 'EOF'
1058
- ---
1059
- name: newcmd
1060
- description: Short description
1061
- ---
1062
-
1063
- # New Command
1339
+ ## Common Tasks
1064
1340
 
1065
- Prompt for Claude...
1066
- EOF
1341
+ ### Adding Skills, Agents, or Commands
1067
1342
 
1068
- # 2. Install locally
1069
- npm run install:all
1343
+ **All components go into plugins** (see "Plugins" section above for complete instructions).
1070
1344
 
1071
- # 3. Test
1072
- /specweave.newcmd
1345
+ **Quick reference**:
1346
+ - **Core components**: `plugins/specweave-core/{skills|agents|commands|hooks}/`
1347
+ - **Plugin components**: `plugins/specweave-{name}/{skills|agents|commands}/`
1348
+ - **Tests**: `tests/integration/{component-name}/` or `tests/unit/`
1073
1349
 
1074
- # 4. Add to commands/README.md index
1075
- ```
1350
+ **For detailed instructions**: See "Adding a New Plugin (Contributors)" section above (line ~1250)
1076
1351
 
1077
1352
  ### Update Documentation
1078
1353
 
@@ -1138,12 +1413,12 @@ cd docs-site && npm run build
1138
1413
  ## Quick Reference
1139
1414
 
1140
1415
  **Commands (for SpecWeave development)**:
1141
- - `/specweave.inc "feature"` - Plan new increment
1142
- - `/specweave.do` - Execute tasks (smart resume)
1143
- - `/specweave.progress` - Check status
1144
- - `/specweave.validate 0002` - Validate increment
1145
- - `/specweave.done 0002` - Close increment
1146
- - `/sync-docs update` - Sync living docs
1416
+ - `/specweave:inc "feature"` - Plan new increment
1417
+ - `/specweave:do` - Execute tasks (smart resume)
1418
+ - `/specweave:progress` - Check status
1419
+ - `/specweave:validate 0002` - Validate increment
1420
+ - `/specweave:done 0002` - Close increment
1421
+ - `/specweave:sync-docs update` - Sync living docs
1147
1422
 
1148
1423
  **Build & Test**:
1149
1424
  - `npm run build` - Compile TypeScript