specweave 0.4.0 → 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 (411) hide show
  1. package/.claude-plugin/README.md +325 -0
  2. package/.claude-plugin/marketplace.json +210 -0
  3. package/CLAUDE.md +1000 -252
  4. package/README.md +273 -180
  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 +18 -0
  10. package/dist/adapters/adapter-base.d.ts +21 -0
  11. package/dist/adapters/adapter-base.d.ts.map +1 -1
  12. package/dist/adapters/adapter-base.js +28 -0
  13. package/dist/adapters/adapter-base.js.map +1 -1
  14. package/dist/adapters/adapter-interface.d.ts +41 -0
  15. package/dist/adapters/adapter-interface.d.ts.map +1 -1
  16. package/dist/adapters/claude/adapter.d.ts +85 -11
  17. package/dist/adapters/claude/adapter.d.ts.map +1 -1
  18. package/dist/adapters/claude/adapter.js +305 -37
  19. package/dist/adapters/claude/adapter.js.map +1 -1
  20. package/dist/adapters/copilot/adapter.d.ts +45 -2
  21. package/dist/adapters/copilot/adapter.d.ts.map +1 -1
  22. package/dist/adapters/copilot/adapter.js +226 -4
  23. package/dist/adapters/copilot/adapter.js.map +1 -1
  24. package/dist/adapters/cursor/adapter.d.ts +54 -0
  25. package/dist/adapters/cursor/adapter.d.ts.map +1 -1
  26. package/dist/adapters/cursor/adapter.js +192 -0
  27. package/dist/adapters/cursor/adapter.js.map +1 -1
  28. package/dist/adapters/generic/adapter.d.ts +43 -0
  29. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  30. package/dist/adapters/generic/adapter.js +163 -0
  31. package/dist/adapters/generic/adapter.js.map +1 -1
  32. package/dist/cli/commands/init.d.ts +1 -0
  33. package/dist/cli/commands/init.d.ts.map +1 -1
  34. package/dist/cli/commands/init.js +392 -123
  35. package/dist/cli/commands/init.js.map +1 -1
  36. package/dist/cli/commands/install.d.ts +2 -0
  37. package/dist/cli/commands/install.d.ts.map +1 -1
  38. package/dist/cli/commands/install.js +28 -25
  39. package/dist/cli/commands/install.js.map +1 -1
  40. package/dist/cli/commands/list.d.ts +2 -0
  41. package/dist/cli/commands/list.d.ts.map +1 -1
  42. package/dist/cli/commands/list.js +26 -24
  43. package/dist/cli/commands/list.js.map +1 -1
  44. package/dist/cli/commands/plugin.d.ts +43 -0
  45. package/dist/cli/commands/plugin.d.ts.map +1 -0
  46. package/dist/cli/commands/plugin.js +307 -0
  47. package/dist/cli/commands/plugin.js.map +1 -0
  48. package/dist/core/i18n/language-detector.d.ts +29 -0
  49. package/dist/core/i18n/language-detector.d.ts.map +1 -0
  50. package/dist/core/i18n/language-detector.js +143 -0
  51. package/dist/core/i18n/language-detector.js.map +1 -0
  52. package/dist/core/i18n/language-manager.d.ts +101 -0
  53. package/dist/core/i18n/language-manager.d.ts.map +1 -0
  54. package/dist/core/i18n/language-manager.js +232 -0
  55. package/dist/core/i18n/language-manager.js.map +1 -0
  56. package/dist/core/i18n/language-registry.d.ts +44 -0
  57. package/dist/core/i18n/language-registry.d.ts.map +1 -0
  58. package/dist/core/i18n/language-registry.js +234 -0
  59. package/dist/core/i18n/language-registry.js.map +1 -0
  60. package/dist/core/i18n/locale-manager.d.ts +62 -0
  61. package/dist/core/i18n/locale-manager.d.ts.map +1 -0
  62. package/dist/core/i18n/locale-manager.js +137 -0
  63. package/dist/core/i18n/locale-manager.js.map +1 -0
  64. package/dist/core/i18n/system-prompt-injector.d.ts +33 -0
  65. package/dist/core/i18n/system-prompt-injector.d.ts.map +1 -0
  66. package/dist/core/i18n/system-prompt-injector.js +131 -0
  67. package/dist/core/i18n/system-prompt-injector.js.map +1 -0
  68. package/dist/core/i18n/types.d.ts +151 -0
  69. package/dist/core/i18n/types.d.ts.map +1 -0
  70. package/dist/core/i18n/types.js +11 -0
  71. package/dist/core/i18n/types.js.map +1 -0
  72. package/dist/core/increment-status.d.ts +72 -0
  73. package/dist/core/increment-status.d.ts.map +1 -0
  74. package/dist/core/increment-status.js +227 -0
  75. package/dist/core/increment-status.js.map +1 -0
  76. package/dist/core/plugin-detector.d.ts +96 -0
  77. package/dist/core/plugin-detector.d.ts.map +1 -0
  78. package/dist/core/plugin-detector.js +349 -0
  79. package/dist/core/plugin-detector.js.map +1 -0
  80. package/dist/core/plugin-loader.d.ts +131 -0
  81. package/dist/core/plugin-loader.d.ts.map +1 -0
  82. package/dist/core/plugin-loader.js +421 -0
  83. package/dist/core/plugin-loader.js.map +1 -0
  84. package/dist/core/plugin-manager.d.ts +144 -0
  85. package/dist/core/plugin-manager.d.ts.map +1 -0
  86. package/dist/core/plugin-manager.js +393 -0
  87. package/dist/core/plugin-manager.js.map +1 -0
  88. package/dist/core/schemas/plugin-manifest.schema.json +253 -0
  89. package/dist/core/types/config.d.ts +51 -0
  90. package/dist/core/types/config.d.ts.map +1 -0
  91. package/dist/core/types/config.js +21 -0
  92. package/dist/core/types/config.js.map +1 -0
  93. package/dist/core/types/plugin.d.ts +283 -0
  94. package/dist/core/types/plugin.d.ts.map +1 -0
  95. package/dist/core/types/plugin.js +49 -0
  96. package/dist/core/types/plugin.js.map +1 -0
  97. package/dist/hooks/lib/sync-living-docs.d.ts +27 -0
  98. package/dist/hooks/lib/sync-living-docs.d.ts.map +1 -0
  99. package/dist/hooks/lib/sync-living-docs.js +116 -0
  100. package/dist/hooks/lib/sync-living-docs.js.map +1 -0
  101. package/dist/hooks/lib/translate-living-docs.d.ts +13 -0
  102. package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -0
  103. package/dist/hooks/lib/translate-living-docs.js +166 -0
  104. package/dist/hooks/lib/translate-living-docs.js.map +1 -0
  105. package/dist/hooks/lib/update-tasks-md.d.ts +29 -0
  106. package/dist/hooks/lib/update-tasks-md.d.ts.map +1 -0
  107. package/dist/hooks/lib/update-tasks-md.js +203 -0
  108. package/dist/hooks/lib/update-tasks-md.js.map +1 -0
  109. package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -1
  110. package/dist/integrations/jira/jira-mapper.d.ts +2 -2
  111. package/dist/integrations/jira/jira-mapper.js +2 -2
  112. package/dist/integrations/jira/jira-mapper.js.map +1 -1
  113. package/dist/locales/de/.gitkeep +0 -0
  114. package/dist/locales/de/cli.json +108 -0
  115. package/dist/locales/en/cli.json +269 -0
  116. package/dist/locales/en/errors.json +7 -0
  117. package/dist/locales/en/templates.json +6 -0
  118. package/dist/locales/es/.gitkeep +0 -0
  119. package/dist/locales/es/cli.json +41 -0
  120. package/dist/locales/fr/.gitkeep +0 -0
  121. package/dist/locales/fr/cli.json +108 -0
  122. package/dist/locales/ja/.gitkeep +0 -0
  123. package/dist/locales/ja/cli.json +108 -0
  124. package/dist/locales/ko/.gitkeep +0 -0
  125. package/dist/locales/ko/cli.json +108 -0
  126. package/dist/locales/pt/.gitkeep +0 -0
  127. package/dist/locales/pt/cli.json +108 -0
  128. package/dist/locales/ru/.gitkeep +0 -0
  129. package/dist/locales/ru/cli.json +269 -0
  130. package/dist/locales/zh/.gitkeep +0 -0
  131. package/dist/locales/zh/cli.json +108 -0
  132. package/dist/plugins/specweave-github/lib/github-client.d.ts +86 -0
  133. package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -0
  134. package/dist/plugins/specweave-github/lib/github-client.js +275 -0
  135. package/dist/plugins/specweave-github/lib/github-client.js.map +1 -0
  136. package/dist/plugins/specweave-github/lib/index.d.ts +10 -0
  137. package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -0
  138. package/dist/plugins/specweave-github/lib/index.js +10 -0
  139. package/dist/plugins/specweave-github/lib/index.js.map +1 -0
  140. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +51 -0
  141. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +1 -0
  142. package/dist/plugins/specweave-github/lib/subtask-sync.js +147 -0
  143. package/dist/plugins/specweave-github/lib/subtask-sync.js.map +1 -0
  144. package/dist/plugins/specweave-github/lib/task-parser.d.ts +37 -0
  145. package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +1 -0
  146. package/dist/plugins/specweave-github/lib/task-parser.js +211 -0
  147. package/dist/plugins/specweave-github/lib/task-parser.js.map +1 -0
  148. package/dist/plugins/specweave-github/lib/task-sync.d.ts +51 -0
  149. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -0
  150. package/dist/plugins/specweave-github/lib/task-sync.js +332 -0
  151. package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -0
  152. package/dist/plugins/specweave-github/lib/types.d.ts +80 -0
  153. package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -0
  154. package/dist/plugins/specweave-github/lib/types.js +5 -0
  155. package/dist/plugins/specweave-github/lib/types.js.map +1 -0
  156. package/dist/utils/agents-md-compiler.d.ts +68 -0
  157. package/dist/utils/agents-md-compiler.d.ts.map +1 -0
  158. package/dist/utils/agents-md-compiler.js +420 -0
  159. package/dist/utils/agents-md-compiler.js.map +1 -0
  160. package/dist/utils/generate-skills-index.js +4 -4
  161. package/dist/utils/generate-skills-index.js.map +1 -1
  162. package/package.json +24 -21
  163. package/plugins/specweave-ado/.claude-plugin/plugin.json +8 -0
  164. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +8 -0
  165. package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +626 -0
  166. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +318 -0
  167. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +208 -0
  168. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +1149 -0
  169. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +340 -0
  170. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +1010 -0
  171. package/plugins/specweave-backend/.claude-plugin/plugin.json +8 -0
  172. package/plugins/specweave-core/.claude-plugin/plugin.json +25 -0
  173. package/{src → plugins/specweave-core}/agents/pm/AGENT.md +80 -0
  174. package/plugins/specweave-core/agents/translator/AGENT.md +282 -0
  175. package/{src → plugins/specweave-core}/commands/README.md +11 -11
  176. package/{src → plugins/specweave-core}/commands/specweave.costs.md +7 -7
  177. package/{src → plugins/specweave-core}/commands/specweave.do.md +34 -7
  178. package/{src → plugins/specweave-core}/commands/specweave.increment.md +131 -22
  179. package/{src → plugins/specweave-core}/commands/specweave.md +49 -17
  180. package/{src → plugins/specweave-core}/commands/specweave.sync-docs.md +5 -5
  181. package/plugins/specweave-core/commands/specweave.translate.md +425 -0
  182. package/{src → plugins/specweave-core}/commands/specweave.validate.md +1 -1
  183. package/plugins/specweave-core/hooks/hooks.json +13 -0
  184. package/plugins/specweave-core/hooks/post-increment-plugin-detect.sh +142 -0
  185. package/plugins/specweave-core/hooks/post-task-completion.sh +265 -0
  186. package/plugins/specweave-core/hooks/pre-task-plugin-detect.sh +96 -0
  187. package/plugins/specweave-core/skills/SKILLS-INDEX.md +229 -0
  188. package/{src → plugins/specweave-core}/skills/brownfield-analyzer/SKILL.md +66 -24
  189. package/{src → plugins/specweave-core}/skills/context-loader/SKILL.md +1 -1
  190. package/plugins/specweave-core/skills/context-optimizer/SKILL.md +588 -0
  191. package/plugins/specweave-core/skills/docs-updater/SKILL.md +0 -0
  192. package/{src → plugins/specweave-core}/skills/increment-planner/SKILL.md +81 -4
  193. package/plugins/specweave-core/skills/plugin-detector/SKILL.md +211 -0
  194. package/{src → plugins/specweave-core}/skills/project-kickstarter/SKILL.md +7 -7
  195. package/plugins/specweave-core/skills/rfc-generator/SKILL.md +369 -0
  196. package/{src → plugins/specweave-core}/skills/specweave-detector/SKILL.md +2 -2
  197. package/plugins/specweave-core/skills/specweave-framework/SKILL.md +498 -0
  198. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-1-increment-naming.yaml +11 -0
  199. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-2-source-of-truth.yaml +11 -0
  200. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-3-increment-discipline.yaml +12 -0
  201. package/plugins/specweave-core/skills/specweave-framework/test-cases/test-4-file-placement.yaml +11 -0
  202. package/{src → plugins/specweave-core}/skills/tdd-workflow/SKILL.md +20 -20
  203. package/plugins/specweave-core/skills/translator/SKILL.md +172 -0
  204. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +8 -0
  205. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +8 -0
  206. package/plugins/specweave-docs/.claude-plugin/plugin.json +8 -0
  207. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +526 -0
  208. package/plugins/specweave-figma/.claude-plugin/.mcp.json +12 -0
  209. package/plugins/specweave-figma/.claude-plugin/plugin.json +8 -0
  210. package/plugins/specweave-figma/ARCHITECTURE.md +453 -0
  211. package/plugins/specweave-figma/README.md +728 -0
  212. package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +632 -0
  213. package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +29 -0
  214. package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +27 -0
  215. package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +28 -0
  216. package/plugins/specweave-frontend/.claude-plugin/plugin.json +8 -0
  217. package/plugins/specweave-github/.claude-plugin/plugin.json +8 -0
  218. package/plugins/specweave-github/agents/github-manager/AGENT.md +651 -0
  219. package/plugins/specweave-github/commands/github-close-issue.md +418 -0
  220. package/plugins/specweave-github/commands/github-create-issue.md +307 -0
  221. package/plugins/specweave-github/commands/github-status.md +533 -0
  222. package/plugins/specweave-github/commands/github-sync-tasks.md +530 -0
  223. package/plugins/specweave-github/commands/github-sync.md +443 -0
  224. package/plugins/specweave-github/lib/github-client.ts +330 -0
  225. package/plugins/specweave-github/lib/index.ts +10 -0
  226. package/plugins/specweave-github/lib/subtask-sync.ts +225 -0
  227. package/plugins/specweave-github/lib/task-parser.ts +246 -0
  228. package/plugins/specweave-github/lib/task-sync.ts +402 -0
  229. package/plugins/specweave-github/lib/types.ts +86 -0
  230. package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +497 -0
  231. package/plugins/specweave-github/skills/github-sync/SKILL.md +461 -0
  232. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +8 -0
  233. package/plugins/specweave-jira/.claude-plugin/plugin.json +8 -0
  234. package/{src → plugins/specweave-jira}/commands/specweave.sync-jira.md +18 -18
  235. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +8 -0
  236. package/plugins/specweave-ml/.claude-plugin/plugin.json +39 -0
  237. package/plugins/specweave-ml/README.md +885 -0
  238. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +402 -0
  239. package/plugins/specweave-ml/commands/ml-deploy.md +116 -0
  240. package/plugins/specweave-ml/commands/ml-evaluate.md +87 -0
  241. package/plugins/specweave-ml/commands/ml-explain.md +83 -0
  242. package/plugins/specweave-ml/skills/anomaly-detector/SKILL.md +559 -0
  243. package/plugins/specweave-ml/skills/automl-optimizer/SKILL.md +485 -0
  244. package/plugins/specweave-ml/skills/cv-pipeline-builder/SKILL.md +157 -0
  245. package/plugins/specweave-ml/skills/data-visualizer/SKILL.md +521 -0
  246. package/plugins/specweave-ml/skills/experiment-tracker/SKILL.md +535 -0
  247. package/plugins/specweave-ml/skills/feature-engineer/SKILL.md +566 -0
  248. package/plugins/specweave-ml/skills/ml-deployment-helper/SKILL.md +345 -0
  249. package/plugins/specweave-ml/skills/ml-pipeline-orchestrator/SKILL.md +518 -0
  250. package/plugins/specweave-ml/skills/model-evaluator/SKILL.md +155 -0
  251. package/plugins/specweave-ml/skills/model-explainer/SKILL.md +227 -0
  252. package/plugins/specweave-ml/skills/model-registry/SKILL.md +541 -0
  253. package/plugins/specweave-ml/skills/nlp-pipeline-builder/SKILL.md +180 -0
  254. package/plugins/specweave-ml/skills/time-series-forecaster/SKILL.md +569 -0
  255. package/plugins/specweave-payments/.claude-plugin/plugin.json +8 -0
  256. package/plugins/specweave-testing/.claude-plugin/plugin.json +8 -0
  257. package/plugins/specweave-tooling/.claude-plugin/plugin.json +8 -0
  258. package/plugins/specweave-ui/.claude-plugin/plugin.json +106 -0
  259. package/plugins/specweave-ui/.mcp.json +14 -0
  260. package/plugins/specweave-ui/README.md +386 -0
  261. package/src/adapters/adapter-base.ts +33 -0
  262. package/src/adapters/adapter-interface.ts +46 -0
  263. package/src/adapters/claude/adapter.ts +350 -39
  264. package/src/adapters/copilot/adapter.ts +267 -4
  265. package/src/adapters/cursor/adapter.ts +229 -0
  266. package/src/adapters/generic/adapter.ts +196 -0
  267. package/src/templates/AGENTS.md.template +170 -1
  268. package/src/templates/CLAUDE.md.template +122 -24
  269. package/src/templates/tasks.md.template +261 -0
  270. package/src/agents/ml-engineer/AGENT.md +0 -150
  271. package/src/commands/specweave.sync-github.md +0 -269
  272. package/src/hooks/post-task-completion.sh +0 -79
  273. package/src/skills/SKILLS-INDEX.md +0 -444
  274. package/src/skills/github-sync/SKILL.md +0 -234
  275. /package/{src → plugins/specweave-ado}/skills/ado-sync/README.md +0 -0
  276. /package/{src → plugins/specweave-ado}/skills/ado-sync/SKILL.md +0 -0
  277. /package/{src → plugins/specweave-ado}/skills/specweave-ado-mapper/SKILL.md +0 -0
  278. /package/{src → plugins/specweave-backend}/agents/database-optimizer/AGENT.md +0 -0
  279. /package/{src → plugins/specweave-backend}/skills/dotnet-backend/SKILL.md +0 -0
  280. /package/{src → plugins/specweave-backend}/skills/nodejs-backend/SKILL.md +0 -0
  281. /package/{src → plugins/specweave-backend}/skills/python-backend/SKILL.md +0 -0
  282. /package/{src → plugins/specweave-core}/agents/architect/AGENT.md +0 -0
  283. /package/{src → plugins/specweave-core}/agents/code-reviewer.md +0 -0
  284. /package/{src → plugins/specweave-core}/agents/docs-writer/AGENT.md +0 -0
  285. /package/{src → plugins/specweave-core}/agents/performance/AGENT.md +0 -0
  286. /package/{src → plugins/specweave-core}/agents/qa-lead/AGENT.md +0 -0
  287. /package/{src → plugins/specweave-core}/agents/security/AGENT.md +0 -0
  288. /package/{src → plugins/specweave-core}/agents/tdd-orchestrator/AGENT.md +0 -0
  289. /package/{src → plugins/specweave-core}/agents/tech-lead/AGENT.md +0 -0
  290. /package/{src → plugins/specweave-core}/commands/specweave.done.md +0 -0
  291. /package/{src → plugins/specweave-core}/commands/specweave.inc.md +0 -0
  292. /package/{src → plugins/specweave-core}/commands/specweave.list-increments.md +0 -0
  293. /package/{src → plugins/specweave-core}/commands/specweave.next.md +0 -0
  294. /package/{src → plugins/specweave-core}/commands/specweave.progress.md +0 -0
  295. /package/{src → plugins/specweave-core}/commands/specweave.tdd-cycle.md +0 -0
  296. /package/{src → plugins/specweave-core}/commands/specweave.tdd-green.md +0 -0
  297. /package/{src → plugins/specweave-core}/commands/specweave.tdd-red.md +0 -0
  298. /package/{src → plugins/specweave-core}/commands/specweave.tdd-refactor.md +0 -0
  299. /package/{src → plugins/specweave-core}/hooks/README.md +0 -0
  300. /package/{src → plugins/specweave-core}/hooks/docs-changed.sh +0 -0
  301. /package/{src → plugins/specweave-core}/hooks/human-input-required.sh +0 -0
  302. /package/{src → plugins/specweave-core}/hooks/pre-implementation.sh +0 -0
  303. /package/{src → plugins/specweave-core}/skills/brownfield-onboarder/SKILL.md +0 -0
  304. /package/{src → plugins/specweave-core}/skills/docs-updater/README.md +0 -0
  305. /package/{src → plugins/specweave-core}/skills/increment-planner/scripts/feature-utils.js +0 -0
  306. /package/{src → plugins/specweave-core}/skills/increment-quality-judge/SKILL.md +0 -0
  307. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +0 -0
  308. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +0 -0
  309. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +0 -0
  310. /package/{src → plugins/specweave-core}/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +0 -0
  311. /package/{src → plugins/specweave-core}/skills/role-orchestrator/README.md +0 -0
  312. /package/{src → plugins/specweave-core}/skills/role-orchestrator/SKILL.md +0 -0
  313. /package/{src → plugins/specweave-core}/skills/task-builder/README.md +0 -0
  314. /package/{src → plugins/specweave-cost-optimizer}/skills/cost-optimizer/SKILL.md +0 -0
  315. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/AGENT.md +0 -0
  316. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-component-template.mmd +0 -0
  317. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-container-template.mmd +0 -0
  318. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/c4-context-template.mmd +0 -0
  319. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/deployment-template.mmd +0 -0
  320. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/er-diagram-template.mmd +0 -0
  321. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/templates/sequence-template.mmd +0 -0
  322. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -0
  323. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-2-sequence.yaml +0 -0
  324. /package/{src → plugins/specweave-diagrams}/agents/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -0
  325. /package/{src → plugins/specweave-diagrams}/skills/diagrams-architect/SKILL.md +0 -0
  326. /package/{src → plugins/specweave-diagrams}/skills/diagrams-generator/SKILL.md +0 -0
  327. /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/README.md +0 -0
  328. /package/{src → plugins/specweave-docs}/skills/spec-driven-brainstorming/SKILL.md +0 -0
  329. /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/README.md +0 -0
  330. /package/{src → plugins/specweave-docs}/skills/spec-driven-debugging/SKILL.md +0 -0
  331. /package/{src → plugins/specweave-frontend}/skills/design-system-architect/SKILL.md +0 -0
  332. /package/{src → plugins/specweave-frontend}/skills/frontend/SKILL.md +0 -0
  333. /package/{src → plugins/specweave-frontend}/skills/nextjs/SKILL.md +0 -0
  334. /package/{src → plugins/specweave-infrastructure}/agents/devops/AGENT.md +0 -0
  335. /package/{src → plugins/specweave-infrastructure}/agents/network-engineer/AGENT.md +0 -0
  336. /package/{src → plugins/specweave-infrastructure}/agents/observability-engineer/AGENT.md +0 -0
  337. /package/{src → plugins/specweave-infrastructure}/agents/performance-engineer/AGENT.md +0 -0
  338. /package/{src → plugins/specweave-infrastructure}/agents/sre/AGENT.md +0 -0
  339. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/backend-diagnostics.md +0 -0
  340. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/database-diagnostics.md +0 -0
  341. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/infrastructure.md +0 -0
  342. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/monitoring.md +0 -0
  343. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/security-incidents.md +0 -0
  344. /package/{src → plugins/specweave-infrastructure}/agents/sre/modules/ui-diagnostics.md +0 -0
  345. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/01-high-cpu-usage.md +0 -0
  346. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/02-database-deadlock.md +0 -0
  347. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/03-memory-leak.md +0 -0
  348. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/04-slow-api-response.md +0 -0
  349. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/05-ddos-attack.md +0 -0
  350. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/06-disk-full.md +0 -0
  351. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/07-service-down.md +0 -0
  352. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/08-data-corruption.md +0 -0
  353. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/09-cascade-failure.md +0 -0
  354. /package/{src → plugins/specweave-infrastructure}/agents/sre/playbooks/10-rate-limit-exceeded.md +0 -0
  355. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/health-check.sh +0 -0
  356. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/log-analyzer.py +0 -0
  357. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/metrics-collector.sh +0 -0
  358. /package/{src → plugins/specweave-infrastructure}/agents/sre/scripts/trace-analyzer.js +0 -0
  359. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/incident-report.md +0 -0
  360. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/mitigation-plan.md +0 -0
  361. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/post-mortem.md +0 -0
  362. /package/{src → plugins/specweave-infrastructure}/agents/sre/templates/runbook-template.md +0 -0
  363. /package/{src → plugins/specweave-infrastructure}/commands/specweave.monitor-setup.md +0 -0
  364. /package/{src → plugins/specweave-infrastructure}/commands/specweave.slo-implement.md +0 -0
  365. /package/{src → plugins/specweave-infrastructure}/skills/distributed-tracing/SKILL.md +0 -0
  366. /package/{src → plugins/specweave-infrastructure}/skills/grafana-dashboards/SKILL.md +0 -0
  367. /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/README.md +0 -0
  368. /package/{src → plugins/specweave-infrastructure}/skills/hetzner-provisioner/SKILL.md +0 -0
  369. /package/{src → plugins/specweave-infrastructure}/skills/prometheus-configuration/SKILL.md +0 -0
  370. /package/{src → plugins/specweave-infrastructure}/skills/slo-implementation/SKILL.md +0 -0
  371. /package/{src → plugins/specweave-jira}/skills/jira-sync/README.md +0 -0
  372. /package/{src → plugins/specweave-jira}/skills/jira-sync/SKILL.md +0 -0
  373. /package/{src → plugins/specweave-jira}/skills/specweave-jira-mapper/SKILL.md +0 -0
  374. /package/{src → plugins/specweave-kubernetes}/agents/kubernetes-architect/AGENT.md +0 -0
  375. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/SKILL.md +0 -0
  376. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/argocd-setup.md +0 -0
  377. /package/{src → plugins/specweave-kubernetes}/skills/gitops-workflow/references/sync-policies.md +0 -0
  378. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/SKILL.md +0 -0
  379. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -0
  380. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -0
  381. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/references/chart-structure.md +0 -0
  382. /package/{src → plugins/specweave-kubernetes}/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -0
  383. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/SKILL.md +0 -0
  384. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/configmap-template.yaml +0 -0
  385. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/deployment-template.yaml +0 -0
  386. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/assets/service-template.yaml +0 -0
  387. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/deployment-spec.md +0 -0
  388. /package/{src → plugins/specweave-kubernetes}/skills/k8s-manifest-generator/references/service-spec.md +0 -0
  389. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/SKILL.md +0 -0
  390. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/assets/network-policy-template.yaml +0 -0
  391. /package/{src → plugins/specweave-kubernetes}/skills/k8s-security-policies/references/rbac-patterns.md +0 -0
  392. /package/{src → plugins/specweave-ml}/agents/data-scientist/AGENT.md +0 -0
  393. /package/{src → plugins/specweave-ml}/agents/mlops-engineer/AGENT.md +0 -0
  394. /package/{src → plugins/specweave-ml}/commands/specweave.ml-pipeline.md +0 -0
  395. /package/{src → plugins/specweave-ml}/skills/ml-pipeline-workflow/SKILL.md +0 -0
  396. /package/{src → plugins/specweave-payments}/agents/payment-integration/AGENT.md +0 -0
  397. /package/{src → plugins/specweave-payments}/skills/billing-automation/SKILL.md +0 -0
  398. /package/{src → plugins/specweave-payments}/skills/paypal-integration/SKILL.md +0 -0
  399. /package/{src → plugins/specweave-payments}/skills/pci-compliance/SKILL.md +0 -0
  400. /package/{src → plugins/specweave-payments}/skills/stripe-integration/SKILL.md +0 -0
  401. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/README.md +0 -0
  402. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/SKILL.md +0 -0
  403. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/execute.js +0 -0
  404. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/lib/utils.js +0 -0
  405. /package/{src → plugins/specweave-testing}/skills/e2e-playwright/package.json +0 -0
  406. /package/{src → plugins/specweave-tooling}/skills/skill-creator/LICENSE.txt +0 -0
  407. /package/{src → plugins/specweave-tooling}/skills/skill-creator/SKILL.md +0 -0
  408. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/init_skill.py +0 -0
  409. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/package_skill.py +0 -0
  410. /package/{src → plugins/specweave-tooling}/skills/skill-creator/scripts/quick_validate.py +0 -0
  411. /package/{src → plugins/specweave-tooling}/skills/skill-router/SKILL.md +0 -0
@@ -0,0 +1,265 @@
1
+ #!/bin/bash
2
+
3
+ # SpecWeave Post-Task-Completion Hook
4
+ # Runs automatically after ANY task is marked complete via TodoWrite
5
+ #
6
+ # SMART SESSION-END DETECTION (v2.0):
7
+ # =====================================
8
+ # Problem: Claude creates multiple todo lists in one conversation
9
+ # - List 1: [A, B, C] → completes → sound plays
10
+ # - List 2: [D, E] → completes 30s later → sound plays again
11
+ # - User hears sounds while Claude is still working!
12
+ #
13
+ # Solution: Inactivity-based detection
14
+ # - Track time gaps BETWEEN TodoWrite calls
15
+ # - If all tasks complete AND gap > INACTIVITY_THRESHOLD (15s)
16
+ # → Session is winding down → Play sound
17
+ # - If rapid completions (gap < threshold)
18
+ # → Claude still actively working → Skip sound
19
+ #
20
+ # Example:
21
+ # 10:00:00 - Task done (gap: 5s) → skip sound
22
+ # 10:00:05 - Task done (gap: 5s) → skip sound
23
+ # 10:00:10 - All done (gap: 5s) → skip sound (rapid work)
24
+ # ...
25
+ # 10:01:00 - All done (gap: 50s) → PLAY SOUND! (session ending)
26
+ #
27
+ # DEBOUNCING: Prevents duplicate fires (Claude Code calls hooks twice)
28
+
29
+ set -e
30
+
31
+ PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
32
+ cd "$PROJECT_ROOT" 2>/dev/null || true
33
+
34
+ # ============================================================================
35
+ # CONFIGURATION
36
+ # ============================================================================
37
+
38
+ # Debounce window to prevent duplicate hook fires
39
+ DEBOUNCE_SECONDS=2
40
+
41
+ # Inactivity threshold to detect session end
42
+ # If gap between TodoWrite calls > this value, assume session is ending
43
+ INACTIVITY_THRESHOLD=15 # seconds (configurable)
44
+
45
+ # File paths
46
+ LOGS_DIR=".specweave/logs"
47
+ LAST_FIRE_FILE="$LOGS_DIR/last-hook-fire"
48
+ LAST_TODOWRITE_FILE="$LOGS_DIR/last-todowrite-time"
49
+ DEBUG_LOG="$LOGS_DIR/hooks-debug.log"
50
+ TASKS_LOG="$LOGS_DIR/tasks.log"
51
+
52
+ mkdir -p "$LOGS_DIR" 2>/dev/null || true
53
+
54
+ # ============================================================================
55
+ # DEBOUNCING
56
+ # ============================================================================
57
+
58
+ CURRENT_TIME=$(date +%s)
59
+
60
+ # Skip if hook fired within last N seconds (prevents duplicates)
61
+ if [ -f "$LAST_FIRE_FILE" ]; then
62
+ LAST_FIRE=$(cat "$LAST_FIRE_FILE" 2>/dev/null || echo "0")
63
+ TIME_DIFF=$((CURRENT_TIME - LAST_FIRE))
64
+
65
+ if [ "$TIME_DIFF" -lt "$DEBOUNCE_SECONDS" ]; then
66
+ echo "[$(date)] ⏭️ Debounced (last fire: ${TIME_DIFF}s ago)" >> "$DEBUG_LOG" 2>/dev/null || true
67
+ cat <<EOF
68
+ {
69
+ "continue": true
70
+ }
71
+ EOF
72
+ exit 0
73
+ fi
74
+ fi
75
+
76
+ echo "$CURRENT_TIME" > "$LAST_FIRE_FILE"
77
+
78
+ # ============================================================================
79
+ # CAPTURE INPUT
80
+ # ============================================================================
81
+
82
+ STDIN_DATA=$(mktemp)
83
+ cat > "$STDIN_DATA"
84
+
85
+ echo "[$(date)] 📋 TodoWrite hook fired" >> "$DEBUG_LOG" 2>/dev/null || true
86
+ echo "[$(date)] Input JSON:" >> "$DEBUG_LOG" 2>/dev/null || true
87
+ cat "$STDIN_DATA" >> "$DEBUG_LOG" 2>/dev/null || true
88
+ echo "" >> "$DEBUG_LOG" 2>/dev/null || true
89
+
90
+ # ============================================================================
91
+ # INACTIVITY DETECTION
92
+ # ============================================================================
93
+
94
+ INACTIVITY_GAP=0
95
+ PREVIOUS_TODOWRITE_TIME=0
96
+
97
+ if [ -f "$LAST_TODOWRITE_FILE" ]; then
98
+ PREVIOUS_TODOWRITE_TIME=$(cat "$LAST_TODOWRITE_FILE" 2>/dev/null || echo "0")
99
+ INACTIVITY_GAP=$((CURRENT_TIME - PREVIOUS_TODOWRITE_TIME))
100
+ echo "[$(date)] ⏱️ Inactivity gap: ${INACTIVITY_GAP}s (threshold: ${INACTIVITY_THRESHOLD}s)" >> "$DEBUG_LOG" 2>/dev/null || true
101
+ else
102
+ echo "[$(date)] 🆕 First TodoWrite in session" >> "$DEBUG_LOG" 2>/dev/null || true
103
+ fi
104
+
105
+ # Save current timestamp for next call
106
+ echo "$CURRENT_TIME" > "$LAST_TODOWRITE_FILE"
107
+
108
+ # ============================================================================
109
+ # PARSE TASK COMPLETION STATE
110
+ # ============================================================================
111
+
112
+ ALL_COMPLETED=false
113
+
114
+ if command -v jq >/dev/null 2>&1; then
115
+ # Use jq if available (more reliable)
116
+ PENDING_COUNT=$(jq -r '.tool_input.todos // [] | map(select(.status != "completed")) | length' "$STDIN_DATA" 2>/dev/null || echo "1")
117
+ TOTAL_COUNT=$(jq -r '.tool_input.todos // [] | length' "$STDIN_DATA" 2>/dev/null || echo "0")
118
+
119
+ echo "[$(date)] 📊 Tasks: $((TOTAL_COUNT - PENDING_COUNT))/$TOTAL_COUNT completed" >> "$DEBUG_LOG" 2>/dev/null || true
120
+
121
+ if [ "$PENDING_COUNT" = "0" ] && [ "$TOTAL_COUNT" != "0" ]; then
122
+ ALL_COMPLETED=true
123
+ fi
124
+ else
125
+ # Fallback: Simple grep check (less reliable but works without jq)
126
+ if grep -q '"status":"pending"\|"status":"in_progress"' "$STDIN_DATA" 2>/dev/null; then
127
+ ALL_COMPLETED=false
128
+ else
129
+ ALL_COMPLETED=true
130
+ fi
131
+ fi
132
+
133
+ rm -f "$STDIN_DATA"
134
+
135
+ # ============================================================================
136
+ # SESSION-END DETECTION LOGIC
137
+ # ============================================================================
138
+
139
+ SESSION_ENDING=false
140
+ DECISION_REASON=""
141
+
142
+ if [ "$ALL_COMPLETED" = "true" ]; then
143
+ if [ "$INACTIVITY_GAP" -ge "$INACTIVITY_THRESHOLD" ]; then
144
+ SESSION_ENDING=true
145
+ DECISION_REASON="All tasks complete + ${INACTIVITY_GAP}s inactivity ≥ ${INACTIVITY_THRESHOLD}s threshold"
146
+ echo "[$(date)] 🎉 SESSION ENDING DETECTED! ($DECISION_REASON)" >> "$DEBUG_LOG" 2>/dev/null || true
147
+ else
148
+ DECISION_REASON="All tasks complete, but rapid activity (${INACTIVITY_GAP}s < ${INACTIVITY_THRESHOLD}s) - Claude likely creating more work"
149
+ echo "[$(date)] ⚡ $DECISION_REASON (no sound)" >> "$DEBUG_LOG" 2>/dev/null || true
150
+ fi
151
+ else
152
+ DECISION_REASON="Tasks remaining in current list"
153
+ echo "[$(date)] 🔄 $DECISION_REASON (no sound)" >> "$DEBUG_LOG" 2>/dev/null || true
154
+ fi
155
+
156
+ # ============================================================================
157
+ # UPDATE TASKS.MD (NEW in v0.6.1)
158
+ # ============================================================================
159
+
160
+ if command -v node &> /dev/null; then
161
+ # Detect current increment (latest non-backlog increment)
162
+ CURRENT_INCREMENT=$(ls -t .specweave/increments/ 2>/dev/null | grep -v "_backlog" | head -1)
163
+
164
+ if [ -n "$CURRENT_INCREMENT" ] && [ -f ".specweave/increments/$CURRENT_INCREMENT/tasks.md" ]; then
165
+ echo "[$(date)] 📝 Updating tasks.md for $CURRENT_INCREMENT" >> "$DEBUG_LOG" 2>/dev/null || true
166
+
167
+ # Run task updater (non-blocking, best-effort)
168
+ node dist/hooks/lib/update-tasks-md.js "$CURRENT_INCREMENT" 2>&1 | tee -a "$DEBUG_LOG" >/dev/null || {
169
+ echo "[$(date)] ⚠️ Failed to update tasks.md (non-blocking)" >> "$DEBUG_LOG" 2>/dev/null || true
170
+ }
171
+ else
172
+ echo "[$(date)] ℹ️ No current increment or tasks.md found, skipping tasks.md update" >> "$DEBUG_LOG" 2>/dev/null || true
173
+ fi
174
+ else
175
+ echo "[$(date)] ⚠️ Node.js not found, skipping tasks.md update" >> "$DEBUG_LOG" 2>/dev/null || true
176
+ fi
177
+
178
+ # ============================================================================
179
+ # SYNC LIVING DOCS (NEW in v0.6.1)
180
+ # ============================================================================
181
+
182
+ if command -v node &> /dev/null; then
183
+ if [ -n "$CURRENT_INCREMENT" ]; then
184
+ echo "[$(date)] 📚 Checking living docs sync for $CURRENT_INCREMENT" >> "$DEBUG_LOG" 2>/dev/null || true
185
+
186
+ # Run living docs sync (non-blocking, best-effort)
187
+ node dist/hooks/lib/sync-living-docs.js "$CURRENT_INCREMENT" 2>&1 | tee -a "$DEBUG_LOG" >/dev/null || {
188
+ echo "[$(date)] ⚠️ Failed to sync living docs (non-blocking)" >> "$DEBUG_LOG" 2>/dev/null || true
189
+ }
190
+ fi
191
+ fi
192
+
193
+ # ============================================================================
194
+ # TRANSLATE LIVING DOCS (NEW in v0.6.0 - i18n)
195
+ # ============================================================================
196
+
197
+ if command -v node &> /dev/null; then
198
+ if [ -n "$CURRENT_INCREMENT" ]; then
199
+ echo "[$(date)] 🌐 Checking if living docs translation is needed for $CURRENT_INCREMENT" >> "$DEBUG_LOG" 2>/dev/null || true
200
+
201
+ # Run living docs translation (non-blocking, best-effort)
202
+ node dist/hooks/lib/translate-living-docs.js "$CURRENT_INCREMENT" 2>&1 | tee -a "$DEBUG_LOG" >/dev/null || {
203
+ echo "[$(date)] ⚠️ Failed to translate living docs (non-blocking)" >> "$DEBUG_LOG" 2>/dev/null || true
204
+ }
205
+ fi
206
+ fi
207
+
208
+ # ============================================================================
209
+ # PLAY SOUND (only if session is truly ending)
210
+ # ============================================================================
211
+
212
+ play_sound() {
213
+ case "$(uname -s)" in
214
+ Darwin)
215
+ afplay /System/Library/Sounds/Glass.aiff 2>/dev/null || true
216
+ ;;
217
+ Linux)
218
+ paplay /usr/share/sounds/freedesktop/stereo/complete.oga 2>/dev/null || \
219
+ aplay /usr/share/sounds/alsa/Front_Center.wav 2>/dev/null || true
220
+ ;;
221
+ MINGW*|MSYS*|CYGWIN*)
222
+ powershell -c "(New-Object Media.SoundPlayer 'C:\Windows\Media\chimes.wav').PlaySync();" 2>/dev/null || true
223
+ ;;
224
+ esac
225
+ }
226
+
227
+ if [ "$SESSION_ENDING" = "true" ]; then
228
+ echo "[$(date)] 🔔 Playing completion sound" >> "$DEBUG_LOG" 2>/dev/null || true
229
+ play_sound
230
+ fi
231
+
232
+ # ============================================================================
233
+ # LOGGING
234
+ # ============================================================================
235
+
236
+ echo "[$(date)] Status: All_completed=$ALL_COMPLETED, Session_ending=$SESSION_ENDING, Inactivity=${INACTIVITY_GAP}s" >> "$TASKS_LOG" 2>/dev/null || true
237
+ echo "[$(date)] Reason: $DECISION_REASON" >> "$TASKS_LOG" 2>/dev/null || true
238
+ echo "---" >> "$DEBUG_LOG" 2>/dev/null || true
239
+
240
+ # ============================================================================
241
+ # OUTPUT TO CLAUDE
242
+ # ============================================================================
243
+
244
+ if [ "$SESSION_ENDING" = "true" ]; then
245
+ cat <<EOF
246
+ {
247
+ "continue": true,
248
+ "systemMessage": "🎉 ALL WORK COMPLETED! Session ending detected (${INACTIVITY_GAP}s inactivity). Remember to update documentation with inline edits to CLAUDE.md and README.md as needed."
249
+ }
250
+ EOF
251
+ elif [ "$ALL_COMPLETED" = "true" ]; then
252
+ cat <<EOF
253
+ {
254
+ "continue": true,
255
+ "systemMessage": "✅ Task batch completed (${INACTIVITY_GAP}s since last activity). Continuing work..."
256
+ }
257
+ EOF
258
+ else
259
+ cat <<EOF
260
+ {
261
+ "continue": true,
262
+ "systemMessage": "✅ Task completed. More tasks remaining - keep going!"
263
+ }
264
+ EOF
265
+ fi
@@ -0,0 +1,96 @@
1
+ #!/bin/bash
2
+
3
+ #
4
+ # Pre-Task Plugin Detection Hook (T-020)
5
+ #
6
+ # Runs BEFORE task execution to suggest plugins based on task description
7
+ # This is Phase 3 of the 4-phase plugin detection system
8
+ #
9
+ # Trigger: Before executing any task via `/specweave.do`
10
+ # Output: Non-blocking plugin suggestions
11
+ #
12
+
13
+ # Exit on error
14
+ set -e
15
+
16
+ # Get project root (assumes hook runs from project directory)
17
+ PROJECT_ROOT=$(pwd)
18
+
19
+ # Colors for output
20
+ GREEN='\033[0;32m'
21
+ YELLOW='\033[1;33m'
22
+ CYAN='\033[0;36m'
23
+ GRAY='\033[0;37m'
24
+ NC='\033[0m' # No Color
25
+
26
+ # Check if SpecWeave is installed
27
+ if ! command -v specweave &> /dev/null; then
28
+ # Silent exit if SpecWeave not installed (development mode)
29
+ exit 0
30
+ fi
31
+
32
+ # Get current task being executed (passed as argument)
33
+ TASK_FILE="$1"
34
+
35
+ if [ -z "$TASK_FILE" ] || [ ! -f "$TASK_FILE" ]; then
36
+ # No task file provided, skip detection
37
+ exit 0
38
+ fi
39
+
40
+ # Extract task description
41
+ TASK_DESCRIPTION=$(grep -A 5 "^### T-[0-9]" "$TASK_FILE" | head -1 || echo "")
42
+
43
+ if [ -z "$TASK_DESCRIPTION" ]; then
44
+ # No description found, skip
45
+ exit 0
46
+ fi
47
+
48
+ # Keyword-based plugin detection
49
+ declare -A PLUGIN_KEYWORDS=(
50
+ ["specweave-github"]="github|gh|issue|pull request|pr"
51
+ ["specweave-kubernetes"]="kubernetes|k8s|kubectl|helm|pod|deployment"
52
+ ["specweave-frontend-stack"]="react|vue|angular|nextjs|frontend|ui|component"
53
+ ["specweave-backend-stack"]="express|fastapi|django|flask|nestjs|backend|api|server"
54
+ ["specweave-ml-ops"]="tensorflow|pytorch|sklearn|ml|machine learning|model|training"
55
+ ["specweave-payment-processing"]="stripe|paypal|payment|billing|subscription"
56
+ ["specweave-figma"]="figma|design|mockup|prototype"
57
+ ["specweave-jira"]="jira|atlassian|ticket"
58
+ ["specweave-observability"]="prometheus|grafana|datadog|monitoring|metrics|tracing"
59
+ )
60
+
61
+ # Detect plugins based on keywords
62
+ SUGGESTED_PLUGINS=()
63
+
64
+ for plugin in "${!PLUGIN_KEYWORDS[@]}"; do
65
+ keywords="${PLUGIN_KEYWORDS[$plugin]}"
66
+
67
+ # Check if any keyword matches (case-insensitive)
68
+ if echo "$TASK_DESCRIPTION" | grep -qi -E "$keywords"; then
69
+ # Check if plugin is already enabled
70
+ if ! specweave plugin list --enabled 2>/dev/null | grep -q "$plugin"; then
71
+ SUGGESTED_PLUGINS+=("$plugin")
72
+ fi
73
+ fi
74
+ done
75
+
76
+ # Output suggestions if any found
77
+ if [ ${#SUGGESTED_PLUGINS[@]} -gt 0 ]; then
78
+ echo ""
79
+ echo -e "${CYAN}💡 Plugin Detection${NC}"
80
+ echo ""
81
+ echo -e "${GRAY}Task mentions: ${TASK_DESCRIPTION}${NC}"
82
+ echo ""
83
+ echo -e "${YELLOW}Suggested plugins:${NC}"
84
+
85
+ for plugin in "${SUGGESTED_PLUGINS[@]}"; do
86
+ echo -e " • ${GREEN}${plugin}${NC}"
87
+ done
88
+
89
+ echo ""
90
+ echo -e "${GRAY}This task might benefit from these plugins.${NC}"
91
+ echo -e "${GRAY}Run: ${CYAN}specweave plugin enable <name>${GRAY} to install${NC}"
92
+ echo ""
93
+ fi
94
+
95
+ # Always exit successfully (non-blocking)
96
+ exit 0
@@ -0,0 +1,229 @@
1
+ # SpecWeave Skills Index
2
+
3
+ **Purpose**: Quick reference for all available skills. Read this file BEFORE starting any task.
4
+
5
+ **Last Updated**: 2025-11-03T04:18:05.042Z (auto-generated, do not edit manually)
6
+
7
+ **Total Skills**: 12
8
+
9
+ ---
10
+
11
+ ## 🚀 Quick Start (Progressive Disclosure)
12
+
13
+ **MANDATORY**: Skills are your expert manuals. Always check for relevant skills BEFORE starting implementation.
14
+
15
+ ### Progressive Disclosure Pattern
16
+
17
+ 1. **Scan this index** to find skills matching your task
18
+ 2. **Match activation keywords** to your current request
19
+ 3. **Load full SKILL.md** for matching skills
20
+ 4. **Follow the workflow** in SKILL.md precisely
21
+
22
+ ### Example Workflow
23
+
24
+ ```
25
+ User asks: "Plan a new feature for user authentication"
26
+
27
+ Step 1: Scan this index → Find "increment-planner" skill
28
+ Step 2: Check keywords → Matches "feature planning", "create increment"
29
+ Step 3: Load skill → cat .claude/skills/increment-planner/SKILL.md
30
+ Step 4: Execute → Follow the increment planning workflow
31
+ ```
32
+
33
+ ---
34
+
35
+ ## 📚 All Available Skills
36
+
37
+
38
+ ### Framework Core
39
+
40
+ #### context-loader
41
+
42
+ **Description**: Explains how SpecWeave achieves context efficiency through Claude's native progressive disclosure mechanism and sub-agent parallelization. Skills load only when relevant, sub-agents isolate context. Activates when users ask about context loading, token usage, or how SpecWeave scales. Keywords: context loading, progressive disclosure, token efficiency, sub-agents, context management.
43
+
44
+ **Location**: `.claude/skills/context-loader/SKILL.md`
45
+
46
+ ---
47
+
48
+ #### context-optimizer
49
+
50
+ **Description**: Second-pass context optimization that analyzes user prompts and removes irrelevant specs, agents, and skills from loaded context. Achieves 80%+ token reduction through smart cleanup. Activates for optimize context, reduce tokens, clean context, smart context, precision loading.
51
+
52
+ **Location**: `.claude/skills/context-optimizer/SKILL.md`
53
+
54
+ **Allowed tools**: Read, Grep, Glob
55
+
56
+ ---
57
+
58
+ #### increment-planner
59
+
60
+ **Description**: Creates comprehensive implementation plans for SpecWeave increments (aka features - both terms are interchangeable). This skill should be used when planning new increments/features, creating specifications, or organizing implementation work. Activates for: increment planning, feature planning, implementation plan, create increment, create feature, plan increment, plan feature, organize work, break down increment, break down feature, new product, build project, MVP, SaaS, app development, product description, tech stack planning, feature list.
61
+
62
+ **Activates for**: increment planning, feature planning, implementation plan, create increment, create feature, plan increment, plan feature, organize work, break down increment, break down feature, new product, build project, MVP, SaaS, app development, product description, tech stack planning, feature list
63
+
64
+ **Location**: `.claude/skills/increment-planner/SKILL.md`
65
+
66
+ ---
67
+
68
+ #### increment-quality-judge
69
+
70
+ **Description**: Optional AI-powered quality assessment for specifications, plans, and tests. Goes beyond rule-based validation to evaluate clarity, testability, edge cases, and architecture soundness. Activates for validate quality, quality check, assess spec, evaluate increment, spec review, quality score.
71
+
72
+ **Location**: `.claude/skills/increment-quality-judge/SKILL.md`
73
+
74
+ **Allowed tools**: Read, Grep, Glob
75
+
76
+ ---
77
+
78
+ #### specweave-detector
79
+
80
+ **Description**: Detects SpecWeave context (.specweave/ directory exists) and provides workflow documentation. v0.3.8+ features PROACTIVE auto-detection - when in SpecWeave folder, product descriptions automatically trigger increment planning. Explicit slash commands still work (/inc, /do, /progress, /validate, /done, /sync-docs, /sync-github). Keywords slash commands, /inc, /increment, /do, /progress, /validate, /done, specweave commands, smart workflow, auto-detection, specweave folder.
81
+
82
+ **Location**: `.claude/skills/specweave-detector/SKILL.md`
83
+
84
+ ---
85
+
86
+ #### specweave-framework
87
+
88
+ **Description**: Expert knowledge of SpecWeave framework structure, rules, conventions, and increment lifecycle. Deep understanding of source-of-truth discipline, increment naming, hook system, and plugin architecture. Activates for: specweave rules, how does specweave work, framework structure, increment lifecycle, what is specweave, specweave conventions, specweave discipline, specweave architecture, where do files go, source of truth, increment naming, tasks.md format, spec.md structure, living docs sync, hook system, plugin architecture, how to use specweave, specweave best practices.
89
+
90
+ **Activates for**: specweave rules, how does specweave work, framework structure, increment lifecycle, what is specweave, specweave conventions, specweave discipline, specweave architecture, where do files go, source of truth, increment naming, tasks
91
+
92
+ **Location**: `.claude/skills/specweave-framework/SKILL.md`
93
+
94
+ **Allowed tools**: Read, Grep, Glob
95
+
96
+ ---
97
+
98
+
99
+ ### Orchestration & Planning
100
+
101
+ #### role-orchestrator
102
+
103
+ **Description**: Multi-agent orchestration system that coordinates specialized agents (PM, Architect, DevOps, QA, Tech Lead, Security) to work together on complex tasks. Implements hierarchical orchestrator-worker pattern. Activates for complex multi-step requests requiring multiple roles/skills. Keywords: build product, create SaaS, full implementation, end-to-end, multi-agent, orchestrate, coordinate roles, complex project.
104
+
105
+ **Location**: `.claude/skills/role-orchestrator/SKILL.md`
106
+
107
+ ---
108
+
109
+
110
+ ### Documentation
111
+
112
+ #### brownfield-analyzer
113
+
114
+ **Description**: Analyzes existing brownfield projects to map documentation structure to SpecWeave's PRD/HLD/RFC/Runbook pattern. Scans folders, classifies documents, detects external tools (Jira, ADO, GitHub), and generates migration plan. Activates for brownfield, existing project, migrate, analyze structure, legacy documentation.
115
+
116
+ **Location**: `.claude/skills/brownfield-analyzer/SKILL.md`
117
+
118
+ ---
119
+
120
+ #### translator
121
+
122
+ **Description**: LLM-native translation skill for SpecWeave content. Activates when translation is needed for CLI messages, templates, documentation, or living docs. Uses the current LLM session for zero-cost translation. Keywords: translate, translation, language, multilingual, i18n, internationalization, Russian, Spanish, Chinese, German, French, localization, translate to.
123
+
124
+ **Location**: `.claude/skills/translator/SKILL.md`
125
+
126
+ **Allowed tools**: Read, Write, Edit, Grep, Glob
127
+
128
+ ---
129
+
130
+
131
+ ### Other
132
+
133
+ #### brownfield-onboarder
134
+
135
+ **Description**: Intelligently onboards brownfield projects by merging existing CLAUDE.md backups into SpecWeave structure. Extracts project-specific knowledge, domain context, team conventions, and technical details from backup CLAUDE.md files, then distributes content to appropriate SpecWeave folders without bloating CLAUDE.md. Activates for: merge docs, merge claude, onboard brownfield, import existing docs, claude backup, specweave merge-docs.
136
+
137
+ **Activates for**: merge docs, merge claude, onboard brownfield, import existing docs, claude backup, specweave merge-docs
138
+
139
+ **Location**: `.claude/skills/brownfield-onboarder/SKILL.md`
140
+
141
+ ---
142
+
143
+ #### project-kickstarter
144
+
145
+ **Description**: Proactively detects product/project descriptions and guides users through SpecWeave increment planning. Activates when user provides product name, features, tech stack, timeline, or problem description. Keywords: project, product, SaaS, app, MVP, build, new project, features, tech stack, core functionality, monetization, timeline, I want to build, let's build, quick build, core features.
146
+
147
+ **Location**: `.claude/skills/project-kickstarter/SKILL.md`
148
+
149
+ ---
150
+
151
+ #### tdd-workflow
152
+
153
+ **Description**: Test-Driven Development workflow coordinator. Detects TDD intent and offers guided red-green-refactor cycle. Activates for TDD, test-driven, red-green-refactor, write tests first, test-first development, Kent Beck, TDD cycle.
154
+
155
+ **Location**: `.claude/skills/tdd-workflow/SKILL.md`
156
+
157
+ ---
158
+
159
+
160
+ ## 💡 How Skills Work
161
+
162
+ **Level 1 - Discovery (this file)**:
163
+ - Scan activation keywords
164
+ - Match to your current task
165
+ - Identify 1-3 relevant skills
166
+
167
+ **Level 2 - Deep Dive (SKILL.md)**:
168
+ - Load full skill documentation
169
+ - Read required prerequisites
170
+ - Follow step-by-step workflow
171
+
172
+ **Level 3 - Execution**:
173
+ - Apply skill's instructions
174
+ - Use recommended tools
175
+ - Follow SpecWeave best practices
176
+
177
+ ---
178
+
179
+ ## 🎯 Task → Skill Matching Guide
180
+
181
+ | Your Task | Relevant Skill | Keywords |
182
+ |-----------|---------------|----------|
183
+ | "Plan a new feature" | `increment-planner` | "feature planning", "create increment" |
184
+ | "Sync to JIRA" | `jira-sync` | "JIRA sync", "create JIRA issue" |
185
+ | "Create diagram" | `diagrams-architect` | "architecture diagram", "C4 diagram" |
186
+ | "Build React UI" | `frontend` | "React", "components", "UI" |
187
+ | "Deploy to cloud" | `hetzner-provisioner` | "deploy", "infrastructure" |
188
+ | "Quality check" | `increment-quality-judge` | "quality check", "assess spec" |
189
+ | "E2E testing" | `e2e-playwright` | "E2E test", "browser test" |
190
+ | "Generate docs site" | `docusaurus` | "documentation site", "docs" |
191
+
192
+ ---
193
+
194
+ ## ⚡ Why Skills Matter
195
+
196
+ **Without skills**:
197
+ - ❌ Reinvent workflows every session
198
+ - ❌ Inconsistent increment structure
199
+ - ❌ Miss SpecWeave conventions
200
+ - ❌ Waste tokens on irrelevant docs
201
+
202
+ **With skills**:
203
+ - ✅ Proven workflows ready to use
204
+ - ✅ Consistent high-quality output
205
+ - ✅ SpecWeave best practices enforced
206
+ - ✅ Efficient token usage (load only what's needed)
207
+
208
+ ---
209
+
210
+ ## 🔧 For AI Tool Developers
211
+
212
+ This index simulates Claude Code's native progressive disclosure:
213
+ - Claude pre-loads skill metadata at startup (name + description)
214
+ - Other tools read this index file for same benefit
215
+ - Single file read replaces 12 individual file scans
216
+ - Token savings: ~97% (1 file vs 12 files)
217
+
218
+ **How to use in your AI tool**:
219
+ 1. Load this file at session start
220
+ 2. Parse activation keywords
221
+ 3. Match user requests to keywords
222
+ 4. Load full SKILL.md when matched
223
+ 5. Execute skill workflow
224
+
225
+ ---
226
+
227
+ **Generated by**: `src/utils/generate-skills-index.ts`
228
+
229
+ **Regenerate with**: `npm run generate-skills-index`