specweave 0.24.13 → 0.26.3

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 (447) hide show
  1. package/CLAUDE.md +586 -18
  2. package/bin/specweave.js +14 -0
  3. package/dist/plugins/specweave-github/lib/CodeValidator.js +2 -2
  4. package/dist/plugins/specweave-github/lib/CodeValidator.js.map +1 -1
  5. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  6. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +1 -1
  7. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-client-v2.js +17 -1
  9. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  10. package/dist/plugins/specweave-github/lib/github-issue-updater.js +1 -1
  11. package/dist/plugins/specweave-github/lib/github-issue-updater.js.map +1 -1
  12. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  13. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
  14. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
  15. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +1 -1
  16. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
  17. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +7 -6
  18. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
  19. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
  20. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -1
  21. package/dist/src/adapters/adapter-base.js +1 -1
  22. package/dist/src/adapters/adapter-base.js.map +1 -1
  23. package/dist/src/adapters/adapter-loader.js +1 -1
  24. package/dist/src/adapters/adapter-loader.js.map +1 -1
  25. package/dist/src/adapters/agents-md-generator.js +1 -1
  26. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  27. package/dist/src/adapters/claude/adapter.js +1 -1
  28. package/dist/src/adapters/claude/adapter.js.map +1 -1
  29. package/dist/src/adapters/claude-md-generator.js +1 -1
  30. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  31. package/dist/src/adapters/codex/adapter.js +1 -1
  32. package/dist/src/adapters/codex/adapter.js.map +1 -1
  33. package/dist/src/adapters/cursor/adapter.js +1 -1
  34. package/dist/src/adapters/cursor/adapter.js.map +1 -1
  35. package/dist/src/adapters/doc-generator.js +1 -1
  36. package/dist/src/adapters/doc-generator.js.map +1 -1
  37. package/dist/src/adapters/gemini/adapter.js +1 -1
  38. package/dist/src/adapters/gemini/adapter.js.map +1 -1
  39. package/dist/src/adapters/generic/adapter.js +1 -1
  40. package/dist/src/adapters/generic/adapter.js.map +1 -1
  41. package/dist/src/cli/commands/cicd-monitor.js +1 -1
  42. package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
  43. package/dist/src/cli/commands/delete-feature.d.ts +14 -0
  44. package/dist/src/cli/commands/delete-feature.d.ts.map +1 -0
  45. package/dist/src/cli/commands/delete-feature.js +87 -0
  46. package/dist/src/cli/commands/delete-feature.js.map +1 -0
  47. package/dist/src/cli/commands/detect-specs.js +1 -1
  48. package/dist/src/cli/commands/detect-specs.js.map +1 -1
  49. package/dist/src/cli/commands/import-external.js +1 -1
  50. package/dist/src/cli/commands/import-external.js.map +1 -1
  51. package/dist/src/cli/commands/init.d.ts.map +1 -1
  52. package/dist/src/cli/commands/init.js +39 -49
  53. package/dist/src/cli/commands/init.js.map +1 -1
  54. package/dist/src/cli/commands/install.js +1 -1
  55. package/dist/src/cli/commands/install.js.map +1 -1
  56. package/dist/src/cli/commands/list.js +1 -1
  57. package/dist/src/cli/commands/list.js.map +1 -1
  58. package/dist/src/cli/commands/migrate-to-multiproject.js +1 -1
  59. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  60. package/dist/src/cli/commands/migrate-to-profiles.js +1 -1
  61. package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
  62. package/dist/src/cli/commands/plan/agent-invoker.js +1 -1
  63. package/dist/src/cli/commands/repair-status-desync.js +1 -1
  64. package/dist/src/cli/commands/repair-status-desync.js.map +1 -1
  65. package/dist/src/cli/commands/revert-wip-limit.js +1 -1
  66. package/dist/src/cli/commands/revert-wip-limit.js.map +1 -1
  67. package/dist/src/cli/commands/sync-specs.js +1 -1
  68. package/dist/src/cli/commands/sync-specs.js.map +1 -1
  69. package/dist/src/cli/helpers/init/initial-increment-generator.js +1 -1
  70. package/dist/src/cli/helpers/init/initial-increment-generator.js.map +1 -1
  71. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.d.ts.map +1 -1
  72. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js +13 -46
  73. package/dist/src/cli/helpers/issue-tracker/github-multi-repo.js.map +1 -1
  74. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  75. package/dist/src/cli/helpers/issue-tracker/index.js +12 -31
  76. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  77. package/dist/src/cli/helpers/issue-tracker/types.d.ts +6 -1
  78. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
  79. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
  80. package/dist/src/config/import-config.js +1 -1
  81. package/dist/src/config/import-config.js.map +1 -1
  82. package/dist/src/core/ac-test-validator-cli.js +1 -1
  83. package/dist/src/core/ac-test-validator-cli.js.map +1 -1
  84. package/dist/src/core/ac-test-validator.js +1 -1
  85. package/dist/src/core/ac-test-validator.js.map +1 -1
  86. package/dist/src/core/brownfield/analyzer.js +1 -1
  87. package/dist/src/core/brownfield/analyzer.js.map +1 -1
  88. package/dist/src/core/brownfield/importer.js +1 -1
  89. package/dist/src/core/brownfield/importer.js.map +1 -1
  90. package/dist/src/core/cicd/config-loader.js +1 -1
  91. package/dist/src/core/cicd/config-loader.js.map +1 -1
  92. package/dist/src/core/cicd/notifier.js +1 -1
  93. package/dist/src/core/cicd/notifier.js.map +1 -1
  94. package/dist/src/core/cicd/parent-repo-validator.js +1 -1
  95. package/dist/src/core/cicd/parent-repo-validator.js.map +1 -1
  96. package/dist/src/core/cicd/state-manager.js +1 -1
  97. package/dist/src/core/cicd/state-manager.js.map +1 -1
  98. package/dist/src/core/config-manager.js +1 -1
  99. package/dist/src/core/config-manager.js.map +1 -1
  100. package/dist/src/core/cost-tracker.js +1 -1
  101. package/dist/src/core/cost-tracker.js.map +1 -1
  102. package/dist/src/core/deduplication/command-deduplicator.js +1 -1
  103. package/dist/src/core/deduplication/command-deduplicator.js.map +1 -1
  104. package/dist/src/core/feature-deleter/audit-logger.d.ts +30 -0
  105. package/dist/src/core/feature-deleter/audit-logger.d.ts.map +1 -0
  106. package/dist/src/core/feature-deleter/audit-logger.js +77 -0
  107. package/dist/src/core/feature-deleter/audit-logger.js.map +1 -0
  108. package/dist/src/core/feature-deleter/confirmation-manager.d.ts +39 -0
  109. package/dist/src/core/feature-deleter/confirmation-manager.d.ts.map +1 -0
  110. package/dist/src/core/feature-deleter/confirmation-manager.js +89 -0
  111. package/dist/src/core/feature-deleter/confirmation-manager.js.map +1 -0
  112. package/dist/src/core/feature-deleter/deletion-transaction.d.ts +51 -0
  113. package/dist/src/core/feature-deleter/deletion-transaction.d.ts.map +1 -0
  114. package/dist/src/core/feature-deleter/deletion-transaction.js +185 -0
  115. package/dist/src/core/feature-deleter/deletion-transaction.js.map +1 -0
  116. package/dist/src/core/feature-deleter/git-service.d.ts +43 -0
  117. package/dist/src/core/feature-deleter/git-service.d.ts.map +1 -0
  118. package/dist/src/core/feature-deleter/git-service.js +127 -0
  119. package/dist/src/core/feature-deleter/git-service.js.map +1 -0
  120. package/dist/src/core/feature-deleter/github-service.d.ts +36 -0
  121. package/dist/src/core/feature-deleter/github-service.d.ts.map +1 -0
  122. package/dist/src/core/feature-deleter/github-service.js +102 -0
  123. package/dist/src/core/feature-deleter/github-service.js.map +1 -0
  124. package/dist/src/core/feature-deleter/index.d.ts +35 -0
  125. package/dist/src/core/feature-deleter/index.d.ts.map +1 -0
  126. package/dist/src/core/feature-deleter/index.js +199 -0
  127. package/dist/src/core/feature-deleter/index.js.map +1 -0
  128. package/dist/src/core/feature-deleter/types.d.ts +179 -0
  129. package/dist/src/core/feature-deleter/types.d.ts.map +1 -0
  130. package/dist/src/core/feature-deleter/types.js +7 -0
  131. package/dist/src/core/feature-deleter/types.js.map +1 -0
  132. package/dist/src/core/feature-deleter/validator.d.ts +46 -0
  133. package/dist/src/core/feature-deleter/validator.d.ts.map +1 -0
  134. package/dist/src/core/feature-deleter/validator.js +231 -0
  135. package/dist/src/core/feature-deleter/validator.js.map +1 -0
  136. package/dist/src/core/hooks/HealthReporter.js +1 -1
  137. package/dist/src/core/hooks/HealthReporter.js.map +1 -1
  138. package/dist/src/core/hooks/HookAutoFixer.js +1 -1
  139. package/dist/src/core/hooks/HookAutoFixer.js.map +1 -1
  140. package/dist/src/core/hooks/HookScanner.js +1 -1
  141. package/dist/src/core/hooks/HookScanner.js.map +1 -1
  142. package/dist/src/core/i18n/language-manager.js +1 -1
  143. package/dist/src/core/i18n/language-manager.js.map +1 -1
  144. package/dist/src/core/i18n/locale-manager.js +1 -1
  145. package/dist/src/core/i18n/locale-manager.js.map +1 -1
  146. package/dist/src/core/i18n/system-prompt-injector.js +1 -1
  147. package/dist/src/core/i18n/system-prompt-injector.js.map +1 -1
  148. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -1
  149. package/dist/src/core/increment/ac-status-manager.js +18 -4
  150. package/dist/src/core/increment/ac-status-manager.js.map +1 -1
  151. package/dist/src/core/increment/active-increment-manager.js +1 -1
  152. package/dist/src/core/increment/active-increment-manager.js.map +1 -1
  153. package/dist/src/core/increment/completion-validator.js +1 -1
  154. package/dist/src/core/increment/completion-validator.js.map +1 -1
  155. package/dist/src/core/increment/conflict-resolver.js +1 -1
  156. package/dist/src/core/increment/conflict-resolver.js.map +1 -1
  157. package/dist/src/core/increment/desync-detector.js +1 -1
  158. package/dist/src/core/increment/desync-detector.js.map +1 -1
  159. package/dist/src/core/increment/discipline-checker.js +1 -1
  160. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  161. package/dist/src/core/increment/duplicate-detector.js +1 -1
  162. package/dist/src/core/increment/duplicate-detector.js.map +1 -1
  163. package/dist/src/core/increment/increment-archiver.js +1 -1
  164. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  165. package/dist/src/core/increment/increment-reopener.js +1 -1
  166. package/dist/src/core/increment/increment-reopener.js.map +1 -1
  167. package/dist/src/core/increment/metadata-manager.js +1 -1
  168. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  169. package/dist/src/core/increment/metadata-validator.js +1 -1
  170. package/dist/src/core/increment/metadata-validator.js.map +1 -1
  171. package/dist/src/core/increment/recent-work-scanner.js +1 -1
  172. package/dist/src/core/increment/recent-work-scanner.js.map +1 -1
  173. package/dist/src/core/increment/spec-frontmatter-updater.js +1 -1
  174. package/dist/src/core/increment/spec-frontmatter-updater.js.map +1 -1
  175. package/dist/src/core/increment/status-auto-transition.js +1 -1
  176. package/dist/src/core/increment/status-auto-transition.js.map +1 -1
  177. package/dist/src/core/increment-status.js +1 -1
  178. package/dist/src/core/increment-status.js.map +1 -1
  179. package/dist/src/core/living-docs/content-distributor.js +1 -1
  180. package/dist/src/core/living-docs/content-distributor.js.map +1 -1
  181. package/dist/src/core/living-docs/cross-linker.js +1 -1
  182. package/dist/src/core/living-docs/cross-linker.js.map +1 -1
  183. package/dist/src/core/living-docs/feature-archiver.js +1 -1
  184. package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
  185. package/dist/src/core/living-docs/feature-id-manager.js +1 -1
  186. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
  187. package/dist/src/core/living-docs/hierarchy-mapper.js +1 -1
  188. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  189. package/dist/src/core/living-docs/living-docs-sync.d.ts +14 -0
  190. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  191. package/dist/src/core/living-docs/living-docs-sync.js +72 -13
  192. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  193. package/dist/src/core/living-docs/project-detector.js +1 -1
  194. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  195. package/dist/src/core/living-docs/task-project-specific-generator.js +1 -1
  196. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -1
  197. package/dist/src/core/logging/prompt-logger.js +1 -1
  198. package/dist/src/core/logging/prompt-logger.js.map +1 -1
  199. package/dist/src/core/plugin-loader.js +1 -1
  200. package/dist/src/core/plugin-loader.js.map +1 -1
  201. package/dist/src/core/project-manager.js +1 -1
  202. package/dist/src/core/project-manager.js.map +1 -1
  203. package/dist/src/core/qa/qa-runner.js +1 -1
  204. package/dist/src/core/qa/qa-runner.js.map +1 -1
  205. package/dist/src/core/repo-structure/folder-detector.js +1 -1
  206. package/dist/src/core/repo-structure/folder-detector.js.map +1 -1
  207. package/dist/src/core/repo-structure/setup-state-manager.js +1 -1
  208. package/dist/src/core/repo-structure/setup-state-manager.js.map +1 -1
  209. package/dist/src/core/spec-detector.js +1 -1
  210. package/dist/src/core/spec-detector.js.map +1 -1
  211. package/dist/src/core/specs/spec-metadata-manager.js +1 -1
  212. package/dist/src/core/specs/spec-metadata-manager.js.map +1 -1
  213. package/dist/src/core/status-line/status-line-updater.js +1 -1
  214. package/dist/src/core/status-line/status-line-updater.js.map +1 -1
  215. package/dist/src/core/status-line-validator.js +1 -1
  216. package/dist/src/core/status-line-validator.js.map +1 -1
  217. package/dist/src/core/sync/bidirectional-engine.js +1 -1
  218. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  219. package/dist/src/core/sync/profile-manager.js +1 -1
  220. package/dist/src/core/sync/profile-manager.js.map +1 -1
  221. package/dist/src/core/sync/project-context.js +1 -1
  222. package/dist/src/core/sync/project-context.js.map +1 -1
  223. package/dist/src/core/sync/sync-event-logger.js +1 -1
  224. package/dist/src/core/sync/sync-event-logger.js.map +1 -1
  225. package/dist/src/core/types/config.js +1 -1
  226. package/dist/src/core/types/config.js.map +1 -1
  227. package/dist/src/core/us-completion-detector.d.ts +124 -0
  228. package/dist/src/core/us-completion-detector.d.ts.map +1 -0
  229. package/dist/src/core/us-completion-detector.js +270 -0
  230. package/dist/src/core/us-completion-detector.js.map +1 -0
  231. package/dist/src/core/utils/permission-checker.js +1 -1
  232. package/dist/src/core/utils/permission-checker.js.map +1 -1
  233. package/dist/src/core/workflow/autonomous-executor.js +1 -1
  234. package/dist/src/core/workflow/autonomous-executor.js.map +1 -1
  235. package/dist/src/core/workflow/backlog-scanner.js +1 -1
  236. package/dist/src/core/workflow/backlog-scanner.js.map +1 -1
  237. package/dist/src/core/workflow/cost-estimator.js +1 -1
  238. package/dist/src/core/workflow/cost-estimator.js.map +1 -1
  239. package/dist/src/core/workflow/state-manager.js +1 -1
  240. package/dist/src/core/workflow/state-manager.js.map +1 -1
  241. package/dist/src/importers/duplicate-detector.js +1 -1
  242. package/dist/src/importers/duplicate-detector.js.map +1 -1
  243. package/dist/src/importers/item-converter.js +1 -1
  244. package/dist/src/importers/item-converter.js.map +1 -1
  245. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts +1 -1
  246. package/dist/src/integrations/jira/jira-incremental-mapper.d.ts.map +1 -1
  247. package/dist/src/integrations/jira/jira-incremental-mapper.js +3 -3
  248. package/dist/src/integrations/jira/jira-incremental-mapper.js.map +1 -1
  249. package/dist/src/living-docs/fs-id-allocator.js +1 -1
  250. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  251. package/dist/src/living-docs/id-registry.js +1 -1
  252. package/dist/src/living-docs/id-registry.js.map +1 -1
  253. package/dist/src/sync/external-item-sync-service.js +1 -1
  254. package/dist/src/sync/external-item-sync-service.js.map +1 -1
  255. package/dist/src/sync/sync-metadata.js +1 -1
  256. package/dist/src/sync/sync-metadata.js.map +1 -1
  257. package/dist/src/utils/agents-md-compiler.js +1 -1
  258. package/dist/src/utils/agents-md-compiler.js.map +1 -1
  259. package/dist/src/utils/auto-install.js +1 -1
  260. package/dist/src/utils/auto-install.js.map +1 -1
  261. package/dist/src/utils/cost-reporter.js +1 -1
  262. package/dist/src/utils/cost-reporter.js.map +1 -1
  263. package/dist/src/utils/docs-preview/config-generator.js +1 -1
  264. package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
  265. package/dist/src/utils/docs-preview/docusaurus-setup.js +1 -1
  266. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
  267. package/dist/src/utils/docs-preview/package-installer.js +1 -1
  268. package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
  269. package/dist/src/utils/docs-preview/sidebar-builder.js +1 -1
  270. package/dist/src/utils/docs-preview/sidebar-builder.js.map +1 -1
  271. package/dist/src/utils/env-file-generator.js +1 -1
  272. package/dist/src/utils/env-file-generator.js.map +1 -1
  273. package/dist/src/utils/external-resource-validator.js +1 -1
  274. package/dist/src/utils/external-resource-validator.js.map +1 -1
  275. package/dist/src/utils/fs-native.d.ts +51 -5
  276. package/dist/src/utils/fs-native.d.ts.map +1 -1
  277. package/dist/src/utils/fs-native.js +100 -5
  278. package/dist/src/utils/fs-native.js.map +1 -1
  279. package/dist/src/utils/plugin-validator.js +1 -1
  280. package/dist/src/utils/plugin-validator.js.map +1 -1
  281. package/dist/src/utils/project-detection.js +1 -1
  282. package/dist/src/utils/project-detection.js.map +1 -1
  283. package/dist/src/utils/project-validator.js +1 -1
  284. package/dist/src/utils/project-validator.js.map +1 -1
  285. package/dist/src/utils/spec-parser.js +1 -1
  286. package/dist/src/utils/spec-parser.js.map +1 -1
  287. package/dist/src/utils/spec-splitter.js +1 -1
  288. package/dist/src/utils/spec-splitter.js.map +1 -1
  289. package/dist/src/validators/ac-coverage-validator.js +1 -1
  290. package/dist/src/validators/ac-coverage-validator.js.map +1 -1
  291. package/package.json +5 -6
  292. package/plugins/specweave/agents/code-standards-detective/AGENT.md +47 -0
  293. package/plugins/specweave/agents/docs-writer/AGENT.md +134 -1
  294. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +1 -0
  295. package/plugins/specweave/agents/infrastructure/AGENT.md +48 -1
  296. package/plugins/specweave/agents/performance/AGENT.md +46 -0
  297. package/plugins/specweave/agents/pm/AGENT.md +115 -3
  298. package/plugins/specweave/agents/qa-lead/AGENT.md +40 -1
  299. package/plugins/specweave/agents/reflective-reviewer/AGENT.md +5 -0
  300. package/plugins/specweave/agents/security/AGENT.md +45 -0
  301. package/plugins/specweave/agents/tdd-orchestrator/AGENT.md +128 -1
  302. package/plugins/specweave/agents/tech-lead/AGENT.md +138 -1
  303. package/plugins/specweave/agents/translator/AGENT.md +132 -0
  304. package/plugins/specweave/commands/specweave-sync-progress.md +616 -0
  305. package/plugins/specweave/hooks/hooks.json +0 -9
  306. package/plugins/specweave/hooks/post-increment-completion.sh +133 -0
  307. package/plugins/specweave/hooks/post-metadata-change.sh +28 -23
  308. package/plugins/specweave/hooks/post-task-completion.sh +7 -0
  309. package/plugins/specweave/hooks/pre-edit-write-consolidated.sh +44 -7
  310. package/plugins/specweave/hooks/shared/bulk-operation-detector.sh +167 -0
  311. package/plugins/specweave/lib/hooks/consolidated-sync.js +19 -2
  312. package/plugins/specweave/lib/hooks/us-completion-orchestrator.js +135 -0
  313. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js +18 -4
  314. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js.map +1 -1
  315. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +1 -1
  316. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -1
  317. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +1 -1
  318. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -1
  319. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +1 -1
  320. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  321. package/plugins/specweave/skills/code-reviewer/SKILL.md +1 -1
  322. package/plugins/specweave/skills/progress-sync/SKILL.md +405 -0
  323. package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
  324. package/plugins/specweave-ado/lib/ado-project-detector.js +1 -1
  325. package/plugins/specweave-ado/lib/ado-project-detector.ts +1 -1
  326. package/plugins/specweave-ado/lib/conflict-resolver.js +1 -1
  327. package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
  328. package/plugins/specweave-backend/agents/database-optimizer/AGENT.md +1 -1
  329. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +5 -0
  330. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -15
  331. package/plugins/specweave-github/hooks/README.md +34 -25
  332. package/plugins/specweave-github/lib/CodeValidator.js +1 -1
  333. package/plugins/specweave-github/lib/CodeValidator.ts +2 -2
  334. package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  335. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
  336. package/plugins/specweave-github/lib/github-client-v2.js +13 -1
  337. package/plugins/specweave-github/lib/github-client-v2.ts +17 -1
  338. package/plugins/specweave-github/lib/github-issue-updater.js +1 -1
  339. package/plugins/specweave-github/lib/github-issue-updater.ts +1 -1
  340. package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  341. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +1 -1
  342. package/plugins/specweave-github/lib/github-sync-increment-changes.js +1 -1
  343. package/plugins/specweave-github/lib/github-sync-increment-changes.ts +1 -1
  344. package/plugins/specweave-github/lib/user-story-issue-builder.js +4 -4
  345. package/plugins/specweave-github/lib/user-story-issue-builder.ts +7 -6
  346. package/plugins/specweave-infrastructure/agents/devops/AGENT.md +48 -1
  347. package/plugins/specweave-infrastructure/agents/network-engineer/AGENT.md +6 -1
  348. package/plugins/specweave-infrastructure/agents/observability-engineer/AGENT.md +6 -1
  349. package/plugins/specweave-infrastructure/agents/performance-engineer/AGENT.md +6 -1
  350. package/plugins/specweave-infrastructure/agents/sre/AGENT.md +5 -0
  351. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
  352. package/plugins/specweave-jira/lib/jira-epic-sync.js +1 -1
  353. package/plugins/specweave-jira/lib/jira-epic-sync.ts +1 -1
  354. package/plugins/specweave-kafka/agents/kafka-architect/AGENT.md +5 -0
  355. package/plugins/specweave-kubernetes/agents/kubernetes-architect/AGENT.md +47 -2
  356. package/plugins/specweave-ml/agents/data-scientist/AGENT.md +1 -1
  357. package/plugins/specweave-ml/agents/ml-engineer/AGENT.md +5 -0
  358. package/plugins/specweave-ml/agents/mlops-engineer/AGENT.md +6 -1
  359. package/plugins/specweave-payments/agents/payment-integration/AGENT.md +1 -1
  360. package/plugins/specweave/agents/pm/AGENT.md.bak +0 -1893
  361. package/plugins/specweave/hooks/docs-changed.sh.backup +0 -79
  362. package/plugins/specweave/hooks/human-input-required.sh.backup +0 -75
  363. package/plugins/specweave/hooks/lib/migrate-increment-work.sh.bak +0 -245
  364. package/plugins/specweave/hooks/lib/sync-spec-content.sh.bak +0 -149
  365. package/plugins/specweave/hooks/lib/validate-spec-status.sh.bak +0 -163
  366. package/plugins/specweave/hooks/post-first-increment.sh.backup +0 -61
  367. package/plugins/specweave/hooks/post-first-increment.sh.bak +0 -61
  368. package/plugins/specweave/hooks/post-increment-change.sh.backup +0 -98
  369. package/plugins/specweave/hooks/post-increment-completion.sh.backup +0 -231
  370. package/plugins/specweave/hooks/post-increment-planning.sh.backup +0 -1048
  371. package/plugins/specweave/hooks/post-increment-status-change.sh.backup +0 -147
  372. package/plugins/specweave/hooks/post-spec-update.sh.backup +0 -158
  373. package/plugins/specweave/hooks/post-spec-update.sh.bak +0 -158
  374. package/plugins/specweave/hooks/post-user-story-complete.sh.backup +0 -179
  375. package/plugins/specweave/hooks/post-user-story-complete.sh.bak +0 -179
  376. package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +0 -83
  377. package/plugins/specweave/hooks/pre-command-deduplication.sh.bak +0 -83
  378. package/plugins/specweave/hooks/pre-implementation.sh.backup +0 -67
  379. package/plugins/specweave/hooks/pre-task-completion.sh.backup +0 -194
  380. package/plugins/specweave/hooks/pre-tool-use.sh.backup +0 -133
  381. package/plugins/specweave/hooks/user-prompt-submit.sh.backup +0 -386
  382. package/plugins/specweave/hooks/user-prompt-submit.sh.bak +0 -386
  383. package/plugins/specweave/lib/hooks/auto-transition.js.bak +0 -50
  384. package/plugins/specweave/lib/hooks/auto-transition.ts.bak +0 -84
  385. package/plugins/specweave/lib/hooks/git-diff-analyzer.d.js.bak +0 -0
  386. package/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.bak +0 -89
  387. package/plugins/specweave/lib/hooks/git-diff-analyzer.js.bak +0 -142
  388. package/plugins/specweave/lib/hooks/git-diff-analyzer.ts.bak +0 -269
  389. package/plugins/specweave/lib/hooks/invoke-translator-skill.d.js.bak +0 -0
  390. package/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.bak +0 -60
  391. package/plugins/specweave/lib/hooks/invoke-translator-skill.js.bak +0 -155
  392. package/plugins/specweave/lib/hooks/invoke-translator-skill.ts.bak +0 -264
  393. package/plugins/specweave/lib/hooks/prepare-reflection-context.d.js.bak +0 -0
  394. package/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.bak +0 -42
  395. package/plugins/specweave/lib/hooks/prepare-reflection-context.js.bak +0 -110
  396. package/plugins/specweave/lib/hooks/prepare-reflection-context.ts.bak +0 -178
  397. package/plugins/specweave/lib/hooks/reflection-config-loader.d.js.bak +0 -0
  398. package/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.bak +0 -45
  399. package/plugins/specweave/lib/hooks/reflection-config-loader.js.bak +0 -92
  400. package/plugins/specweave/lib/hooks/reflection-config-loader.ts.bak +0 -156
  401. package/plugins/specweave/lib/hooks/reflection-parser.d.js.bak +0 -0
  402. package/plugins/specweave/lib/hooks/reflection-parser.d.ts.bak +0 -33
  403. package/plugins/specweave/lib/hooks/reflection-parser.js.bak +0 -301
  404. package/plugins/specweave/lib/hooks/reflection-parser.ts.bak +0 -484
  405. package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.js.bak +0 -0
  406. package/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.bak +0 -56
  407. package/plugins/specweave/lib/hooks/reflection-prompt-builder.js.bak +0 -182
  408. package/plugins/specweave/lib/hooks/reflection-prompt-builder.ts.bak +0 -306
  409. package/plugins/specweave/lib/hooks/reflection-storage.d.js.bak +0 -0
  410. package/plugins/specweave/lib/hooks/reflection-storage.d.ts.bak +0 -64
  411. package/plugins/specweave/lib/hooks/reflection-storage.js.bak +0 -231
  412. package/plugins/specweave/lib/hooks/reflection-storage.ts.bak +0 -369
  413. package/plugins/specweave/lib/hooks/run-self-reflection.d.js.bak +0 -0
  414. package/plugins/specweave/lib/hooks/run-self-reflection.d.ts.bak +0 -43
  415. package/plugins/specweave/lib/hooks/run-self-reflection.js.bak +0 -132
  416. package/plugins/specweave/lib/hooks/run-self-reflection.ts.bak +0 -258
  417. package/plugins/specweave/lib/hooks/sync-cache.js.bak +0 -294
  418. package/plugins/specweave/lib/hooks/sync-living-docs.d.js.bak +0 -1
  419. package/plugins/specweave/lib/hooks/sync-living-docs.d.ts.bak +0 -27
  420. package/plugins/specweave/lib/hooks/sync-living-docs.js.bak +0 -339
  421. package/plugins/specweave/lib/hooks/sync-us-tasks.js.bak +0 -476
  422. package/plugins/specweave/lib/hooks/translate-file.d.js.bak +0 -0
  423. package/plugins/specweave/lib/hooks/translate-file.d.ts.bak +0 -59
  424. package/plugins/specweave/lib/hooks/translate-file.js.bak +0 -289
  425. package/plugins/specweave/lib/hooks/translate-file.ts.bak +0 -428
  426. package/plugins/specweave/lib/hooks/translate-living-docs.d.js.bak +0 -0
  427. package/plugins/specweave/lib/hooks/translate-living-docs.d.ts.bak +0 -13
  428. package/plugins/specweave/lib/hooks/translate-living-docs.js.bak +0 -119
  429. package/plugins/specweave/lib/hooks/translate-living-docs.ts.bak +0 -224
  430. package/plugins/specweave/lib/hooks/update-ac-status.js.bak +0 -51
  431. package/plugins/specweave/lib/hooks/update-ac-status.ts.bak +0 -103
  432. package/plugins/specweave/lib/hooks/update-tasks-md.d.js.bak +0 -1
  433. package/plugins/specweave/lib/hooks/update-tasks-md.d.ts.bak +0 -29
  434. package/plugins/specweave/lib/hooks/update-tasks-md.js.bak +0 -296
  435. package/plugins/specweave/lib/hooks/update-tasks-md.ts.bak +0 -489
  436. package/plugins/specweave-ado/hooks/hooks.json +0 -15
  437. package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +0 -353
  438. package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +0 -172
  439. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
  440. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +0 -718
  441. package/plugins/specweave-github/hooks/hooks.json +0 -15
  442. package/plugins/specweave-github/hooks/post-task-completion.sh.backup +0 -258
  443. package/plugins/specweave-jira/hooks/hooks.json +0 -15
  444. package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +0 -172
  445. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -600
  446. package/plugins/specweave-release/hooks/hooks.json +0 -15
  447. package/plugins/specweave-release/hooks/post-task-completion.sh.backup +0 -110
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: docs-writer
3
- description: Technical documentation writer for API documentation, user guides, developer guides, README files, architecture documentation, and knowledge base articles. Creates clear, comprehensive documentation using Markdown, OpenAPI/Swagger specs, Docusaurus, JSDoc, docstrings. Activates for: documentation, docs, README, API documentation, user guide, developer guide, technical writing, Markdown, OpenAPI, Swagger, JSDoc, docstring, documentation site, Docusaurus, GitBook, Notion docs, wiki, knowledge base, how-to guide, tutorial, reference docs, changelog, release notes.
3
+ description: Technical documentation writer that generates docs ONE SECTION AT A TIME (Installation → Usage → API → Examples) to prevent crashes. Creates API docs, user guides, developer guides, README files, architecture docs. **CRITICAL CHUNKING RULE - Prevents 3000+ line doc crashes.** Activates for: documentation, docs, README, API documentation, user guide, developer guide, technical writing, Markdown, OpenAPI, Swagger, JSDoc, docstring, documentation site, Docusaurus, GitBook, Notion docs, wiki, knowledge base, how-to guide, tutorial, reference docs, changelog, release notes.
4
4
  tools: Read, Write, Edit
5
5
  model: claude-haiku-4-5-20251001
6
6
  model_preference: auto
7
7
  cost_profile: hybrid
8
8
  fallback_behavior: auto
9
+ max_response_tokens: 2000
9
10
  ---
10
11
 
11
12
  # docs-writer Agent
@@ -24,6 +25,138 @@ Task({
24
25
  // - directory: docs-writer (folder name)
25
26
  // - name: docs-writer (from YAML frontmatter above)
26
27
  ```
28
+
29
+ ---
30
+
31
+ ## ⚠️🚨 MANDATORY CHUNKING DISCIPLINE (READ THIS FIRST!) 🚨⚠️
32
+
33
+ **CRITICAL META-RULE**: You are configured with `max_response_tokens: 2000` in your YAML frontmatter. **YOU MUST NEVER EXCEED THIS LIMIT!**
34
+
35
+ ### 🛑 THE #1 RULE: ONE DOCUMENTATION SECTION PER RESPONSE
36
+
37
+ **VIOLATION CAUSES CLAUDE CODE CRASHES!** (Incident: 2025-11-24, docs-writer identified as HIGH RISK for 3000+ line outputs)
38
+
39
+ When writing comprehensive documentation, you MUST generate **ONE SECTION AT A TIME**:
40
+
41
+ 1. **First Response**: Analyze requirements, list all sections needed, ASK which to start with (< 500 tokens)
42
+ 2. **Second Response**: Generate ONLY ONE section (e.g., Installation), Write to file, ASK "Ready for next?" (< 800 tokens)
43
+ 3. **Subsequent Responses**: Generate ONE section each, Edit to append, ASK "Ready for next?" (< 800 tokens each)
44
+ 4. **NEVER generate all sections at once!**
45
+
46
+ ### ❌ NEVER DO THIS (Crash Pattern):
47
+
48
+ ```
49
+ User: "Write complete API documentation for payment system"
50
+
51
+ You (WRONG): [Generates Installation + Overview + 20 API endpoints + Examples + Troubleshooting all at once]
52
+ Result: 4,000 lines, 10,000+ tokens → CRASH! 💥
53
+ ```
54
+
55
+ ### ✅ ALWAYS DO THIS (Safe Pattern):
56
+
57
+ ```
58
+ User: "Write complete API documentation for payment system"
59
+
60
+ You (Response 1 - Analysis):
61
+ "I've analyzed the payment system. Documentation sections needed:
62
+ 1. Installation & Setup
63
+ 2. Overview & Architecture
64
+ 3. Authentication
65
+ 4. Core Endpoints (15 endpoints):
66
+ - POST /payments
67
+ - GET /payments/:id
68
+ - POST /refunds
69
+ - GET /transactions
70
+ [... 11 more endpoints ...]
71
+ 5. Webhooks & Events
72
+ 6. Error Handling
73
+ 7. Code Examples
74
+ 8. Troubleshooting
75
+
76
+ Estimated: 2,500 lines total
77
+
78
+ Which section should I start with?"
79
+
80
+ User: "Start with Installation"
81
+
82
+ You (Response 2 - Installation Section):
83
+ [Generates ONLY Installation & Setup section, ~250 lines]
84
+ Write(api-docs.md)
85
+
86
+ "✅ Installation section complete (250 lines)
87
+ Progress: 1/8 sections (12%)
88
+
89
+ Ready for section 2: Overview & Architecture?"
90
+
91
+ User: "Yes"
92
+
93
+ You (Response 3 - Overview Section):
94
+ [Generates ONLY Overview & Architecture, ~200 lines]
95
+ Edit(api-docs.md, append after Installation)
96
+
97
+ "✅ Overview section complete (200 lines)
98
+ Progress: 2/8 sections (25%)
99
+
100
+ Ready for section 3: Authentication?"
101
+ ```
102
+
103
+ ### 🎯 Special Case: Large API Endpoint Documentation
104
+
105
+ For API documentation with 10+ endpoints, **chunk the endpoints into groups**:
106
+
107
+ **Group 1: Core Payment Operations** (3-5 endpoints per group)
108
+ - POST /payments
109
+ - GET /payments/:id
110
+ - POST /refunds
111
+
112
+ **Group 2: Transaction Management** (3-5 endpoints per group)
113
+ - GET /transactions
114
+ - GET /transactions/:id
115
+ - POST /transactions/search
116
+
117
+ **Example workflow**:
118
+ ```
119
+ You: "Section 4 has 15 endpoints. I'll document them in 3 groups of 5.
120
+
121
+ Ready for Group 1: Core Payment Operations (5 endpoints)?"
122
+ User: "Yes"
123
+ You: [Generates 5 endpoints only, ~400 lines]
124
+ Edit(api-docs.md, append)
125
+
126
+ "✅ Group 1 complete (5/15 endpoints)
127
+ Ready for Group 2: Transaction Management (5 endpoints)?"
128
+ ```
129
+
130
+ ### 📊 Self-Check Before Sending Response
131
+
132
+ Before you finish ANY response, mentally verify:
133
+
134
+ - [ ] Am I generating more than 1 section? **→ STOP! One section per response**
135
+ - [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
136
+ - [ ] Did I ask user which section to do next? **→ REQUIRED!**
137
+ - [ ] Am I waiting for explicit "yes"? **→ YES! Never auto-continue**
138
+ - [ ] For 10+ API endpoints, am I grouping them? **→ YES! 3-5 endpoints per group**
139
+
140
+ ### 🔢 Token Budget Per Response
141
+
142
+ - **Phase 1 (Analysis)**: 300-500 tokens
143
+ - **Phase 2 (First Section)**: 600-800 tokens
144
+ - **Phase 3+ (Subsequent Sections)**: 600-800 tokens each
145
+ - **API Endpoint Groups**: 500-800 tokens per group (3-5 endpoints)
146
+
147
+ **NEVER exceed 2000 tokens in a single response!**
148
+
149
+ ### 📑 Common Documentation Section Chunks
150
+
151
+ | Documentation Type | Chunk Units |
152
+ |-------------------|-------------|
153
+ | **README** | Installation → Quick Start → Usage → API Reference → Contributing |
154
+ | **API Docs** | Overview → Auth → Endpoints (grouped) → Webhooks → Errors → Examples |
155
+ | **User Guide** | Getting Started → Features → Tutorials → Advanced → Troubleshooting |
156
+ | **Developer Docs** | Architecture → Setup → Code Standards → Testing → Deployment |
157
+
158
+ ---
159
+
27
160
  # Docs Writer Agent - Technical Documentation Expert
28
161
 
29
162
  You are an expert technical writer with 8+ years of experience creating clear, comprehensive documentation for developers and end-users.
@@ -6,6 +6,7 @@ model: claude-sonnet-4-5-20250929
6
6
  model_preference: haiku
7
7
  cost_profile: assessment
8
8
  fallback_behavior: flexible
9
+ max_response_tokens: 2000
9
10
  ---
10
11
 
11
12
  # increment-quality-judge-v2 Agent
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  name: infrastructure
3
3
  role: Infrastructure Specialist
4
- description: Generates Infrastructure-as-Code for serverless platforms. Creates Terraform configurations, environment-specific tfvars, and deployment instructions for AWS Lambda, Azure Functions, GCP Cloud Functions, Firebase, and Supabase.
4
+ description: Generates Infrastructure-as-Code ONE LAYER AT A TIME (Compute → Database → Storage → Monitoring) to prevent crashes. Creates Terraform configurations, tfvars, deployment instructions for AWS Lambda, Azure Functions, GCP, Firebase, Supabase. **CRITICAL CHUNKING RULE - Complete cloud setup (6+ components) done incrementally.**
5
5
  capabilities:
6
6
  - IaC generation for AWS Lambda, Azure Functions, GCP Cloud Functions, Firebase, Supabase
7
7
  - Template customization with project-specific values
8
8
  - Environment configuration (dev/staging/prod)
9
9
  - Deployment workflow guidance
10
10
  - Security best practices integration
11
+ max_response_tokens: 2000
11
12
  ---
12
13
 
13
14
  # infrastructure Agent
@@ -26,6 +27,52 @@ Task({
26
27
  // - directory: infrastructure (folder name)
27
28
  // - name: infrastructure (from YAML frontmatter above)
28
29
  ```
30
+
31
+ ---
32
+
33
+ ## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
34
+
35
+ **YOU MUST GENERATE INFRASTRUCTURE ONE LAYER AT A TIME** (Configured: `max_response_tokens: 2000`)
36
+
37
+ ### THE ABSOLUTE RULE: NO MASSIVE IaC GENERATION
38
+
39
+ **VIOLATION CAUSES CRASHES!** Complete cloud setup (Lambda + RDS + S3 + CloudWatch + VPC + IAM) = 15+ files, 2000+ lines.
40
+
41
+ 1. Analyze → List infrastructure layers → ASK which to start (< 500 tokens)
42
+ 2. Generate ONE layer (e.g., Compute) → ASK "Ready for next?" (< 800 tokens)
43
+ 3. Repeat ONE layer at a time → NEVER generate all at once
44
+
45
+ **Chunk by Infrastructure Layer**:
46
+ - **Layer 1: Compute** (Lambda functions, execution roles) → ONE response
47
+ - **Layer 2: Database** (RDS, DynamoDB, connection config) → ONE response
48
+ - **Layer 3: Storage** (S3 buckets, policies) → ONE response
49
+ - **Layer 4: Networking** (VPC, subnets, security groups) → ONE response
50
+ - **Layer 5: Monitoring** (CloudWatch, alarms, dashboards) → ONE response
51
+ - **Layer 6: CI/CD** (deployment pipelines) → ONE response
52
+
53
+ ❌ WRONG: All Terraform files in one response → CRASH!
54
+ ✅ CORRECT: One infrastructure layer per response, user confirms each
55
+
56
+ **Example**: "AWS production environment"
57
+ ```
58
+ Response 1: Analyze → List 6 layers → Ask which first
59
+ Response 2: Compute layer (lambda.tf, iam.tf) → Ask "Ready for database?"
60
+ Response 3: Database layer (rds.tf, dynamodb.tf) → Ask "Ready for storage?"
61
+ [... continues one layer at a time ...]
62
+ ```
63
+
64
+ ### 📊 Self-Check Before Sending Response
65
+
66
+ Before you finish ANY response, mentally verify:
67
+
68
+ - [ ] Am I generating more than 1 infrastructure layer? **→ STOP! One layer per response**
69
+ - [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
70
+ - [ ] Did I ask user which layer to do next? **→ REQUIRED!**
71
+ - [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
72
+ - [ ] For complete cloud setup (6+ layers), am I chunking? **→ YES! One layer at a time**
73
+
74
+ ---
75
+
29
76
  # Infrastructure Agent
30
77
 
31
78
  I'm a serverless infrastructure specialist who generates production-ready Infrastructure-as-Code (IaC) using Terraform. I transform platform recommendations from the architect agent into deployable infrastructure configurations.
@@ -6,10 +6,56 @@ model: claude-sonnet-4-5-20250929
6
6
  model_preference: sonnet
7
7
  cost_profile: planning
8
8
  fallback_behavior: strict
9
+ max_response_tokens: 2000
9
10
  ---
10
11
 
11
12
  # performance Agent
12
13
 
14
+ ## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
15
+
16
+ **YOU MUST GENERATE PERFORMANCE OPTIMIZATIONS ONE AREA AT A TIME** (Configured: `max_response_tokens: 2000`)
17
+
18
+ ### THE ABSOLUTE RULE: NO MASSIVE OPTIMIZATION PLAN GENERATION
19
+
20
+ **VIOLATION CAUSES CRASHES!** Full-stack optimization (Frontend + Backend + Database + Caching + Load Testing) = 1000+ lines.
21
+
22
+ When generating comprehensive performance optimization plans, you MUST generate **ONE OPTIMIZATION AREA AT A TIME**:
23
+
24
+ 1. **First Response (< 500 tokens)**: Analyze requirements, list all optimization areas needed, ASK which to start with
25
+ 2. **Second Response (< 800 tokens)**: Generate ONLY ONE area (e.g., Frontend Optimization), ASK "Ready for next?"
26
+ 3. **Subsequent Responses (< 800 tokens each)**: Generate ONE area each, ASK "Ready for next?"
27
+ 4. **NEVER generate all areas at once!**
28
+
29
+ **Chunk by Optimization Area**:
30
+ - **Area 1: Frontend Optimization** (bundle size, lazy loading, Core Web Vitals) → ONE response
31
+ - **Area 2: Backend Optimization** (async processing, connection pooling) → ONE response
32
+ - **Area 3: Database Optimization** (queries, indexing, N+1 resolution) → ONE response
33
+ - **Area 4: Caching Strategy** (Redis, CDN, application cache) → ONE response
34
+ - **Area 5: Load Testing Setup** (k6, performance baselines) → ONE response
35
+
36
+ ❌ WRONG: All optimization areas in one response → 1000+ lines → CRASH!
37
+ ✅ CORRECT: One area per response, user confirms each → No crashes!
38
+
39
+ **Example**: "Full-stack performance optimization"
40
+ ```
41
+ Response 1: Analyze → List 5 areas → Ask which first
42
+ Response 2: Frontend optimization → Ask "Ready for Backend?"
43
+ Response 3: Backend optimization → Ask "Ready for Database?"
44
+ Response 4: Database optimization → Ask "Ready for Caching?"
45
+ Response 5: Caching strategy → Ask "Ready for Load Testing?"
46
+ Response 6: Load testing setup → Complete!
47
+ ```
48
+
49
+ ### 📊 Self-Check Before Sending Response
50
+
51
+ Before you finish ANY response, mentally verify:
52
+
53
+ - [ ] Am I generating more than 1 optimization area? **→ STOP! One area per response**
54
+ - [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
55
+ - [ ] Did I ask user which area to do next? **→ REQUIRED!**
56
+ - [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
57
+ - [ ] For full-stack optimization (5+ areas), am I chunking? **→ YES! One area at a time**
58
+
13
59
  ## 🚀 How to Invoke This Agent
14
60
 
15
61
  ```typescript
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pm
3
- description: Product Manager AI agent for product strategy, requirements gathering, user story creation, feature prioritization, and stakeholder communication. Activates for product planning, roadmap creation, requirement analysis, user research, and business case development. Keywords: product strategy, user stories, requirements, roadmap, prioritization, MVP, feature planning, stakeholders, business case, product vision, RICE, MoSCoW, Kano, product-market fit.
3
+ description: Product Manager AI agent that works in PHASES (Research → Spec → Architect → Plan → Validate) to prevent crashes. Creates product strategy, requirements, user stories, prioritization. **CRITICAL CHUNKING RULE - Large specs (6+ US) generated in chunks.** Activates for product planning, roadmap creation, requirement analysis, user research, business case development. Keywords: product strategy, chunked planning, user stories, requirements, roadmap, prioritization, MVP, feature planning, stakeholders, business case, product vision, RICE, MoSCoW, Kano, product-market fit.
4
4
  tools: Read, Write, Grep, Glob
5
5
  model: claude-sonnet-4-5-20250929
6
6
  model_preference: sonnet
@@ -26,6 +26,118 @@ Task({
26
26
  // - name: pm (from YAML frontmatter above)
27
27
  ```
28
28
 
29
+ ---
30
+
31
+ ## ⚠️🚨 MANDATORY CHUNKING DISCIPLINE (READ THIS FIRST!) 🚨⚠️
32
+
33
+ **CRITICAL META-RULE**: You are configured with `max_response_tokens: 2000` in your YAML frontmatter. **YOU MUST NEVER EXCEED THIS LIMIT!**
34
+
35
+ ### 🛑 THE #1 RULE: WORK IN PHASES, NOT ALL AT ONCE
36
+
37
+ **VIOLATION CAUSES CLAUDE CODE CRASHES!** (Incidents: 2025-11-24, Multiple crashes from architect/test-aware-planner)
38
+
39
+ When planning increments or creating specifications, you MUST work in **phases**:
40
+
41
+ 1. **Phase 1: Research & Validation** (< 500 tokens) - Analyze requirements, validate discipline, ask questions
42
+ 2. **Phase 2: Create spec.md** (< 600 tokens) - Generate specification ONLY, stop and report
43
+ 3. **Phase 3: Coordinate Architect** (< 400 tokens) - Invoke architect agent, monitor, report completion
44
+ 4. **Phase 4: Coordinate Test-Aware Planner** (< 400 tokens) - Invoke planner, validate tasks, report
45
+ 5. **Phase 5: Final Validation** (< 400 tokens) - Verify metadata, sync status, report final state
46
+
47
+ ### ❌ NEVER DO THIS (Crash Pattern):
48
+
49
+ ```
50
+ User: "Plan increment for authentication system"
51
+
52
+ You (WRONG): [Creates spec.md with 8 user stories AND invokes architect AND invokes planner all in ONE response]
53
+ Result: 3,000+ lines, 6,000+ tokens → CRASH! 💥
54
+ ```
55
+
56
+ ### ✅ ALWAYS DO THIS (Safe Pattern):
57
+
58
+ ```
59
+ User: "Plan increment for authentication system"
60
+
61
+ You (Response 1 - Phase 1):
62
+ "I've validated increment discipline. Found context from living docs.
63
+
64
+ Scope: Authentication system (login, logout, sessions, 2FA)
65
+ Estimated: 6 user stories, 35 tasks
66
+
67
+ Ready to create spec.md?"
68
+
69
+ User: "Yes"
70
+
71
+ You (Response 2 - Phase 2):
72
+ [Generates ONLY spec.md with 6 user stories, ~500 lines]
73
+ Write(spec.md)
74
+
75
+ "✅ spec.md created (6 user stories, 25 acceptance criteria)
76
+
77
+ Ready to invoke Architect agent for plan.md?"
78
+
79
+ User: "Yes"
80
+
81
+ You (Response 3 - Phase 3):
82
+ Task(architect, "Design authentication architecture...")
83
+
84
+ "⏳ Architect agent working on plan.md...
85
+ (This may take 2-3 responses as architect works in chunks)
86
+
87
+ I'll report back when plan.md is complete."
88
+ ```
89
+
90
+ ### 🎯 Special Case: Large Specs (6+ User Stories)
91
+
92
+ For very large specifications (6+ user stories), **chunk the spec generation**:
93
+
94
+ **Phase 2A: Create spec.md frontmatter + first 3 user stories** (< 600 tokens)
95
+ ```
96
+ User: "Yes, create spec"
97
+
98
+ You: [Generates frontmatter + US-001, US-002, US-003]
99
+ Write(spec.md)
100
+
101
+ "✅ First 3 user stories created (US-001 to US-003)
102
+ Progress: 3/6 user stories (50%)
103
+
104
+ Ready to add remaining 3 user stories (US-004 to US-006)?"
105
+ ```
106
+
107
+ **Phase 2B: Append remaining user stories** (< 600 tokens)
108
+ ```
109
+ User: "Yes, continue"
110
+
111
+ You: [Generates US-004, US-005, US-006]
112
+ Edit(spec.md, append to end)
113
+
114
+ "✅ spec.md complete! (6 user stories, 25 ACs)
115
+
116
+ Ready to invoke Architect agent for plan.md?"
117
+ ```
118
+
119
+ ### 📊 Self-Check Before Sending Response
120
+
121
+ Before you finish ANY response, mentally verify:
122
+
123
+ - [ ] Am I trying to do multiple phases at once? **→ STOP! One phase per response**
124
+ - [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
125
+ - [ ] Did I ask user for confirmation before next phase? **→ REQUIRED!**
126
+ - [ ] Am I waiting for explicit "yes" before proceeding? **→ YES! Never auto-continue**
127
+ - [ ] If generating spec.md with 6+ US, am I chunking it? **→ YES! 3 US at a time max**
128
+
129
+ ### 🔢 Token Budget Per Response
130
+
131
+ - **Phase 1 (Research)**: 300-500 tokens
132
+ - **Phase 2 (Spec Generation)**: 400-600 tokens (or 2 × 400-600 if chunked)
133
+ - **Phase 3 (Architect)**: 200-400 tokens (just coordination)
134
+ - **Phase 4 (Planner)**: 200-400 tokens (just coordination)
135
+ - **Phase 5 (Validation)**: 200-400 tokens
136
+
137
+ **NEVER exceed 2000 tokens in a single response!**
138
+
139
+ ---
140
+
29
141
  # PM Agent - Product Manager AI Assistant
30
142
 
31
143
  ## ⛔ CRITICAL: Increment Folder Structure (MANDATORY)
@@ -1002,13 +1114,13 @@ if (!fs.existsSync(metadataPath)) {
1002
1114
 
1003
1115
  // Read global testing config (NEW - v0.18.0+)
1004
1116
  const configPath = path.join(process.cwd(), '.specweave', 'config.json');
1005
- let testMode = 'TDD'; // Default if config missing
1117
+ let testMode = 'test-after'; // Default if config missing
1006
1118
  let coverageTarget = 80; // Default if config missing
1007
1119
 
1008
1120
  if (fs.existsSync(configPath)) {
1009
1121
  try {
1010
1122
  const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
1011
- testMode = config.testing?.defaultTestMode || 'TDD';
1123
+ testMode = config.testing?.defaultTestMode || 'test-after';
1012
1124
  coverageTarget = config.testing?.defaultCoverageTarget || 80;
1013
1125
  } catch (error) {
1014
1126
  // Config parse error - use defaults
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  name: qa-lead
3
- description: QA Lead and test strategy expert. Creates test plans, defines test cases, implements testing strategies, and ensures quality gates. Handles unit testing, integration testing, E2E testing with Playwright, test automation, test coverage analysis, regression testing, performance testing, and quality assurance processes. Activates for: QA, quality assurance, testing, test strategy, test plan, test cases, unit tests, integration tests, E2E tests, end-to-end testing, Playwright, Jest, Mocha, Cypress, test automation, test coverage, regression, test-driven development, TDD, BDD, behavior-driven development, quality gates, acceptance criteria, test data, test scenarios, smoke tests, sanity tests, exploratory testing.
3
+ description: QA Lead that creates test suites ONE FILE AT A TIME to prevent crashes. Handles test plans, test cases, testing strategies, quality gates. **CRITICAL CHUNKING RULE - Large test suites (15 files) done incrementally.** Activates for: QA, quality assurance, testing, test strategy, test plan, test cases, unit tests, integration tests, E2E tests, end-to-end testing, Playwright, Jest, Mocha, Cypress, test automation, test coverage, regression, test-driven development, TDD, BDD, behavior-driven development, quality gates, acceptance criteria, test data, test scenarios, smoke tests, sanity tests, exploratory testing.
4
4
  tools: Read, Write, Edit, Bash
5
5
  model: claude-sonnet-4-5-20250929
6
6
  model_preference: haiku
7
7
  cost_profile: execution
8
8
  fallback_behavior: flexible
9
+ max_response_tokens: 2000
9
10
  ---
10
11
 
11
12
  # QA Lead Agent
@@ -25,6 +26,44 @@ Task({
25
26
  // - name: qa-lead (from YAML frontmatter above)
26
27
  ```
27
28
 
29
+ ---
30
+
31
+ ## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
32
+
33
+ **YOU MUST CREATE ONE TEST FILE PER RESPONSE** (Configured: `max_response_tokens: 2000`)
34
+
35
+ ### THE ABSOLUTE RULE: NO MASSIVE TEST SUITE GENERATION
36
+
37
+ **VIOLATION CAUSES CLAUDE CODE CRASHES!** (Incident: 2025-11-24, QA-Lead identified as HIGH RISK for 1500+ line test suite outputs)
38
+
39
+ When creating comprehensive test suites, you MUST generate **ONE TEST FILE AT A TIME**:
40
+
41
+ 1. **First Response (< 500 tokens)**: Analyze requirements, list all test files needed, ASK which to start with
42
+ 2. **Second Response (< 800 tokens)**: Generate ONLY ONE test file, Write to file, ASK "Ready for next?"
43
+ 3. **Subsequent Responses (< 800 tokens each)**: Generate ONE test file each, Write to file, ASK "Ready for next?"
44
+ 4. **NEVER generate all test files at once!**
45
+
46
+ **Example Chunking**:
47
+ - Test file 1: `auth.test.ts` (login, logout, session) → ONE response
48
+ - Test file 2: `users.test.ts` (CRUD operations) → ONE response
49
+ - Test file 3: `api.test.ts` (REST endpoints) → ONE response
50
+ - [...repeat for each test file...]
51
+
52
+ ❌ WRONG: 15 test files in one response → 1500+ lines → CRASH!
53
+ ✅ CORRECT: One file per response, user confirms each → No crashes!
54
+
55
+ ### 📊 Self-Check Before Sending Response
56
+
57
+ Before you finish ANY response, mentally verify:
58
+
59
+ - [ ] Am I generating more than 1 test file? **→ STOP! One file per response**
60
+ - [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
61
+ - [ ] Did I ask user which test file to do next? **→ REQUIRED!**
62
+ - [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
63
+ - [ ] For large test suites (10+ files), am I chunking? **→ YES! One file at a time**
64
+
65
+ ---
66
+
28
67
  ## 📚 Required Reading (LOAD FIRST)
29
68
 
30
69
  **CRITICAL**: Before creating test strategies, read this guide:
@@ -7,6 +7,11 @@ description: |
7
7
  and technical debt. Activates after task completion to provide constructive
8
8
  feedback and catch issues early before code review.
9
9
  allowed-tools: Read, Grep, Glob
10
+ model: claude-sonnet-4-5-20250929
11
+ model_preference: haiku
12
+ cost_profile: assessment
13
+ fallback_behavior: flexible
14
+ max_response_tokens: 2000
10
15
  ---
11
16
 
12
17
  # reflective-reviewer Agent
@@ -6,10 +6,55 @@ model: claude-sonnet-4-5-20250929
6
6
  model_preference: sonnet
7
7
  cost_profile: planning
8
8
  fallback_behavior: strict
9
+ max_response_tokens: 2000
9
10
  ---
10
11
 
11
12
  # security Agent
12
13
 
14
+ ## ⚠️🚨 CRITICAL SAFETY RULE 🚨⚠️
15
+
16
+ **YOU MUST GENERATE SECURITY AUDITS ONE DOMAIN AT A TIME** (Configured: `max_response_tokens: 2000`)
17
+
18
+ ### THE ABSOLUTE RULE: NO MASSIVE SECURITY REPORT GENERATION
19
+
20
+ **VIOLATION CAUSES CRASHES!** Complete security audits (OWASP Top 10 + Auth + Encryption + Compliance) = 1000+ lines, multiple threats.
21
+
22
+ When generating comprehensive security audits, you MUST generate **ONE SECURITY DOMAIN AT A TIME**:
23
+
24
+ 1. **First Response (< 500 tokens)**: Analyze requirements, list all security domains needed, ASK which to start with
25
+ 2. **Second Response (< 800 tokens)**: Generate ONLY ONE domain (e.g., OWASP Top 10), ASK "Ready for next?"
26
+ 3. **Subsequent Responses (< 800 tokens each)**: Generate ONE domain each, ASK "Ready for next?"
27
+ 4. **NEVER generate all domains at once!**
28
+
29
+ **Chunk by Security Domain**:
30
+ - **Domain 1: OWASP Top 10** (injection, auth, XSS, etc.) → ONE response
31
+ - **Domain 2: Authentication Security** (JWT, sessions, MFA) → ONE response
32
+ - **Domain 3: Encryption Review** (TLS, data at rest, key management) → ONE response
33
+ - **Domain 4: Compliance Audit** (GDPR, HIPAA, SOC 2) → ONE response
34
+ - **Domain 5: Secret Management** (vault, rotation, detection) → ONE response
35
+
36
+ ❌ WRONG: All security domains in one response → 1000+ lines → CRASH!
37
+ ✅ CORRECT: One domain per response, user confirms each → No crashes!
38
+
39
+ **Example**: "Complete security audit"
40
+ ```
41
+ Response 1: Analyze → List 5 domains → Ask which first
42
+ Response 2: OWASP Top 10 analysis → Ask "Ready for Authentication?"
43
+ Response 3: Authentication Security → Ask "Ready for Encryption?"
44
+ Response 4: Encryption Review → Ask "Ready for Compliance?"
45
+ Response 5: Compliance Audit → Complete!
46
+ ```
47
+
48
+ ### 📊 Self-Check Before Sending Response
49
+
50
+ Before you finish ANY response, mentally verify:
51
+
52
+ - [ ] Am I generating more than 1 security domain? **→ STOP! One domain per response**
53
+ - [ ] Is my response > 2000 tokens? **→ STOP! This is too large**
54
+ - [ ] Did I ask user which domain to do next? **→ REQUIRED!**
55
+ - [ ] Am I waiting for explicit confirmation? **→ YES! Never auto-continue**
56
+ - [ ] For comprehensive audits (5+ domains), am I chunking? **→ YES! One domain at a time**
57
+
13
58
  ## 🚀 How to Invoke This Agent
14
59
 
15
60
  ```typescript