specweave 1.0.350 → 1.0.352

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 (282) hide show
  1. package/bin/specweave.js +9 -0
  2. package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts +5 -0
  3. package/dist/plugins/specweave-ado/lib/ado-client-v2.d.ts.map +1 -1
  4. package/dist/plugins/specweave-ado/lib/ado-client-v2.js +61 -23
  5. package/dist/plugins/specweave-ado/lib/ado-client-v2.js.map +1 -1
  6. package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.d.ts.map +1 -1
  7. package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.js +3 -2
  8. package/dist/plugins/specweave-ado/lib/ado-duplicate-detector.js.map +1 -1
  9. package/dist/plugins/specweave-ado/lib/ado-profile-resolver.d.ts.map +1 -1
  10. package/dist/plugins/specweave-ado/lib/ado-profile-resolver.js +2 -1
  11. package/dist/plugins/specweave-ado/lib/ado-profile-resolver.js.map +1 -1
  12. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +1 -1
  13. package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -1
  14. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +25 -9
  15. package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -1
  16. package/dist/plugins/specweave-ado/lib/conflict-resolver.d.ts.map +1 -1
  17. package/dist/plugins/specweave-ado/lib/conflict-resolver.js +17 -1
  18. package/dist/plugins/specweave-ado/lib/conflict-resolver.js.map +1 -1
  19. package/dist/plugins/specweave-ado/lib/per-us-sync.d.ts +3 -0
  20. package/dist/plugins/specweave-ado/lib/per-us-sync.d.ts.map +1 -1
  21. package/dist/plugins/specweave-ado/lib/per-us-sync.js +14 -1
  22. package/dist/plugins/specweave-ado/lib/per-us-sync.js.map +1 -1
  23. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  24. package/dist/plugins/specweave-github/lib/github-client-v2.js +10 -7
  25. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  26. package/dist/plugins/specweave-github/lib/github-client.d.ts +1 -1
  27. package/dist/plugins/specweave-github/lib/github-client.d.ts.map +1 -1
  28. package/dist/plugins/specweave-github/lib/github-client.js +7 -5
  29. package/dist/plugins/specweave-github/lib/github-client.js.map +1 -1
  30. package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js +13 -3
  31. package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js.map +1 -1
  32. package/dist/plugins/specweave-github/lib/github-feature-sync-cli.d.ts +24 -1
  33. package/dist/plugins/specweave-github/lib/github-feature-sync-cli.d.ts.map +1 -1
  34. package/dist/plugins/specweave-github/lib/github-feature-sync-cli.js +36 -20
  35. package/dist/plugins/specweave-github/lib/github-feature-sync-cli.js.map +1 -1
  36. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +4 -2
  37. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  38. package/dist/plugins/specweave-github/lib/github-feature-sync.js +38 -9
  39. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  40. package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts +1 -0
  41. package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts.map +1 -1
  42. package/dist/plugins/specweave-github/lib/github-graphql-client.js +32 -22
  43. package/dist/plugins/specweave-github/lib/github-graphql-client.js.map +1 -1
  44. package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +144 -8
  45. package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js.map +1 -1
  46. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +8 -1
  47. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts.map +1 -1
  48. package/dist/plugins/specweave-github/lib/github-spec-sync.js +94 -24
  49. package/dist/plugins/specweave-github/lib/github-spec-sync.js.map +1 -1
  50. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts +1 -0
  51. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts.map +1 -1
  52. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js +2 -1
  53. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js.map +1 -1
  54. package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts.map +1 -1
  55. package/dist/plugins/specweave-github/lib/github-us-auto-closer.js +25 -0
  56. package/dist/plugins/specweave-github/lib/github-us-auto-closer.js.map +1 -1
  57. package/dist/plugins/specweave-github/lib/per-us-sync.d.ts +3 -0
  58. package/dist/plugins/specweave-github/lib/per-us-sync.d.ts.map +1 -1
  59. package/dist/plugins/specweave-github/lib/per-us-sync.js +29 -9
  60. package/dist/plugins/specweave-github/lib/per-us-sync.js.map +1 -1
  61. package/dist/plugins/specweave-jira/lib/content-format-adapter.d.ts +59 -0
  62. package/dist/plugins/specweave-jira/lib/content-format-adapter.d.ts.map +1 -0
  63. package/dist/plugins/specweave-jira/lib/content-format-adapter.js +159 -0
  64. package/dist/plugins/specweave-jira/lib/content-format-adapter.js.map +1 -0
  65. package/dist/plugins/specweave-jira/lib/jira-deployment-detector.d.ts +45 -0
  66. package/dist/plugins/specweave-jira/lib/jira-deployment-detector.d.ts.map +1 -0
  67. package/dist/plugins/specweave-jira/lib/jira-deployment-detector.js +92 -0
  68. package/dist/plugins/specweave-jira/lib/jira-deployment-detector.js.map +1 -0
  69. package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.d.ts.map +1 -1
  70. package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.js +13 -28
  71. package/dist/plugins/specweave-jira/lib/jira-duplicate-detector.js.map +1 -1
  72. package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts +2 -1
  73. package/dist/plugins/specweave-jira/lib/jira-epic-sync.d.ts.map +1 -1
  74. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js +19 -7
  75. package/dist/plugins/specweave-jira/lib/jira-epic-sync.js.map +1 -1
  76. package/dist/plugins/specweave-jira/lib/jira-field-discovery.d.ts +47 -0
  77. package/dist/plugins/specweave-jira/lib/jira-field-discovery.d.ts.map +1 -0
  78. package/dist/plugins/specweave-jira/lib/jira-field-discovery.js +110 -0
  79. package/dist/plugins/specweave-jira/lib/jira-field-discovery.js.map +1 -0
  80. package/dist/plugins/specweave-jira/lib/jira-paginated-search.d.ts +26 -0
  81. package/dist/plugins/specweave-jira/lib/jira-paginated-search.d.ts.map +1 -0
  82. package/dist/plugins/specweave-jira/lib/jira-paginated-search.js +77 -0
  83. package/dist/plugins/specweave-jira/lib/jira-paginated-search.js.map +1 -0
  84. package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.d.ts.map +1 -1
  85. package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.js +5 -3
  86. package/dist/plugins/specweave-jira/lib/jira-spec-commit-sync.js.map +1 -1
  87. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +17 -2
  88. package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -1
  89. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +103 -33
  90. package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -1
  91. package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +4 -0
  92. package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -1
  93. package/dist/plugins/specweave-jira/lib/jira-status-sync.js +19 -6
  94. package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -1
  95. package/dist/plugins/specweave-jira/lib/metadata-paths.d.ts +29 -0
  96. package/dist/plugins/specweave-jira/lib/metadata-paths.d.ts.map +1 -0
  97. package/dist/plugins/specweave-jira/lib/metadata-paths.js +73 -0
  98. package/dist/plugins/specweave-jira/lib/metadata-paths.js.map +1 -0
  99. package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts +15 -2
  100. package/dist/plugins/specweave-jira/lib/reorganization-detector.d.ts.map +1 -1
  101. package/dist/plugins/specweave-jira/lib/reorganization-detector.js +121 -33
  102. package/dist/plugins/specweave-jira/lib/reorganization-detector.js.map +1 -1
  103. package/dist/src/cli/commands/init.d.ts.map +1 -1
  104. package/dist/src/cli/commands/init.js +23 -18
  105. package/dist/src/cli/commands/init.js.map +1 -1
  106. package/dist/src/cli/commands/sync-progress.d.ts +6 -0
  107. package/dist/src/cli/commands/sync-progress.d.ts.map +1 -1
  108. package/dist/src/cli/commands/sync-progress.js +37 -0
  109. package/dist/src/cli/commands/sync-progress.js.map +1 -1
  110. package/dist/src/cli/commands/sync-task.d.ts +16 -0
  111. package/dist/src/cli/commands/sync-task.d.ts.map +1 -0
  112. package/dist/src/cli/commands/sync-task.js +42 -0
  113. package/dist/src/cli/commands/sync-task.js.map +1 -0
  114. package/dist/src/cli/helpers/init/instruction-file-merger.js +3 -3
  115. package/dist/src/cli/helpers/init/instruction-file-merger.js.map +1 -1
  116. package/dist/src/core/hooks/LifecycleHookDispatcher.d.ts +9 -1
  117. package/dist/src/core/hooks/LifecycleHookDispatcher.d.ts.map +1 -1
  118. package/dist/src/core/hooks/LifecycleHookDispatcher.js +26 -8
  119. package/dist/src/core/hooks/LifecycleHookDispatcher.js.map +1 -1
  120. package/dist/src/core/increment/metadata-manager.d.ts +13 -0
  121. package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
  122. package/dist/src/core/increment/metadata-manager.js +144 -17
  123. package/dist/src/core/increment/metadata-manager.js.map +1 -1
  124. package/dist/src/core/increment/status-change-sync-trigger.d.ts +1 -1
  125. package/dist/src/core/increment/status-change-sync-trigger.d.ts.map +1 -1
  126. package/dist/src/core/increment/status-change-sync-trigger.js +2 -1
  127. package/dist/src/core/increment/status-change-sync-trigger.js.map +1 -1
  128. package/dist/src/core/increment/status-commands.d.ts.map +1 -1
  129. package/dist/src/core/increment/status-commands.js +33 -11
  130. package/dist/src/core/increment/status-commands.js.map +1 -1
  131. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  132. package/dist/src/core/repo-structure/repo-structure-manager.js +2 -1
  133. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  134. package/dist/src/locales/de/cli.json +252 -77
  135. package/dist/src/locales/en/cli.json +7 -0
  136. package/dist/src/locales/es/cli.json +245 -3
  137. package/dist/src/locales/fr/cli.json +259 -84
  138. package/dist/src/locales/ja/cli.json +253 -78
  139. package/dist/src/locales/ko/cli.json +253 -78
  140. package/dist/src/locales/pt/cli.json +252 -77
  141. package/dist/src/locales/ru/cli.json +17 -3
  142. package/dist/src/locales/zh/cli.json +258 -83
  143. package/dist/src/sync/ado-reconciler.d.ts.map +1 -1
  144. package/dist/src/sync/ado-reconciler.js +5 -1
  145. package/dist/src/sync/ado-reconciler.js.map +1 -1
  146. package/dist/src/sync/base-reconciler.d.ts.map +1 -1
  147. package/dist/src/sync/base-reconciler.js +6 -1
  148. package/dist/src/sync/base-reconciler.js.map +1 -1
  149. package/dist/src/sync/config.d.ts +4 -0
  150. package/dist/src/sync/config.d.ts.map +1 -1
  151. package/dist/src/sync/config.js +6 -4
  152. package/dist/src/sync/config.js.map +1 -1
  153. package/dist/src/sync/external-issue-auto-creator.d.ts +3 -0
  154. package/dist/src/sync/external-issue-auto-creator.d.ts.map +1 -1
  155. package/dist/src/sync/external-issue-auto-creator.js +53 -17
  156. package/dist/src/sync/external-issue-auto-creator.js.map +1 -1
  157. package/dist/src/sync/external-item-sync-service.d.ts +9 -0
  158. package/dist/src/sync/external-item-sync-service.d.ts.map +1 -1
  159. package/dist/src/sync/external-item-sync-service.js +210 -9
  160. package/dist/src/sync/external-item-sync-service.js.map +1 -1
  161. package/dist/src/sync/github-reconciler.d.ts +30 -0
  162. package/dist/src/sync/github-reconciler.d.ts.map +1 -1
  163. package/dist/src/sync/github-reconciler.js +242 -3
  164. package/dist/src/sync/github-reconciler.js.map +1 -1
  165. package/dist/src/sync/jira-reconciler.d.ts.map +1 -1
  166. package/dist/src/sync/jira-reconciler.js +5 -1
  167. package/dist/src/sync/jira-reconciler.js.map +1 -1
  168. package/dist/src/sync/provider-router.d.ts.map +1 -1
  169. package/dist/src/sync/provider-router.js +2 -1
  170. package/dist/src/sync/provider-router.js.map +1 -1
  171. package/dist/src/sync/providers/ado.d.ts +4 -0
  172. package/dist/src/sync/providers/ado.d.ts.map +1 -1
  173. package/dist/src/sync/providers/ado.js +36 -11
  174. package/dist/src/sync/providers/ado.js.map +1 -1
  175. package/dist/src/sync/providers/github.d.ts.map +1 -1
  176. package/dist/src/sync/providers/github.js +48 -35
  177. package/dist/src/sync/providers/github.js.map +1 -1
  178. package/dist/src/sync/providers/jira.d.ts.map +1 -1
  179. package/dist/src/sync/providers/jira.js +42 -26
  180. package/dist/src/sync/providers/jira.js.map +1 -1
  181. package/dist/src/sync/status-mapper.d.ts +3 -1
  182. package/dist/src/sync/status-mapper.d.ts.map +1 -1
  183. package/dist/src/sync/status-mapper.js +10 -2
  184. package/dist/src/sync/status-mapper.js.map +1 -1
  185. package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
  186. package/dist/src/sync/sync-coordinator.js +29 -19
  187. package/dist/src/sync/sync-coordinator.js.map +1 -1
  188. package/package.json +1 -1
  189. package/plugins/specweave/hooks/v2/guards/task-ac-sync-guard.sh +31 -0
  190. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.d.ts +13 -0
  191. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +144 -17
  192. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -1
  193. package/plugins/specweave/lib/vendor/sync/github-reconciler.d.ts +30 -0
  194. package/plugins/specweave/lib/vendor/sync/github-reconciler.js +242 -3
  195. package/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -1
  196. package/plugins/specweave/skills/architect/SKILL.md +2 -0
  197. package/plugins/specweave/skills/grill/SKILL.md +2 -0
  198. package/plugins/specweave/skills/team-lead/SKILL.md +43 -320
  199. package/plugins/specweave/skills/team-lead/agents/backend.md +60 -0
  200. package/plugins/specweave/skills/team-lead/agents/database.md +51 -0
  201. package/plugins/specweave/skills/team-lead/agents/frontend.md +61 -0
  202. package/plugins/specweave/skills/team-lead/agents/security.md +52 -0
  203. package/plugins/specweave/skills/team-lead/agents/testing.md +57 -0
  204. package/plugins/specweave/skills/test-aware-planner/SKILL.md +2 -0
  205. package/plugins/specweave-ado/hooks/post-task-completion.sh +2 -2
  206. package/plugins/specweave-ado/lib/ado-client-v2.js +51 -21
  207. package/plugins/specweave-ado/lib/ado-client-v2.ts +62 -23
  208. package/plugins/specweave-ado/lib/ado-duplicate-detector.js +4 -4
  209. package/plugins/specweave-ado/lib/ado-duplicate-detector.ts +4 -3
  210. package/plugins/specweave-ado/lib/ado-hierarchical-sync.js +54 -12
  211. package/plugins/specweave-ado/lib/ado-hierarchical-sync.ts +88 -18
  212. package/plugins/specweave-ado/lib/ado-profile-resolver.js +1 -1
  213. package/plugins/specweave-ado/lib/ado-profile-resolver.ts +3 -1
  214. package/plugins/specweave-ado/lib/ado-spec-sync.js +22 -9
  215. package/plugins/specweave-ado/lib/ado-spec-sync.ts +27 -9
  216. package/plugins/specweave-ado/lib/conflict-resolver.js +17 -1
  217. package/plugins/specweave-ado/lib/conflict-resolver.ts +17 -1
  218. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +11 -1
  219. package/plugins/specweave-ado/lib/per-us-sync.js +8 -1
  220. package/plugins/specweave-ado/lib/per-us-sync.ts +17 -2
  221. package/plugins/specweave-github/hooks/github-auto-create-handler.sh +28 -2
  222. package/plugins/specweave-github/hooks/post-task-completion.sh +6 -3
  223. package/plugins/specweave-github/lib/enhanced-github-sync.js +35 -6
  224. package/plugins/specweave-github/lib/github-board-resolver.js +4 -4
  225. package/plugins/specweave-github/lib/github-board-resolver.ts +4 -4
  226. package/plugins/specweave-github/lib/github-client-v2.js +6 -6
  227. package/plugins/specweave-github/lib/github-client-v2.ts +11 -7
  228. package/plugins/specweave-github/lib/github-client.js +5 -4
  229. package/plugins/specweave-github/lib/github-client.ts +7 -5
  230. package/plugins/specweave-github/lib/github-cross-repo-sync.js +17 -3
  231. package/plugins/specweave-github/lib/github-cross-repo-sync.ts +16 -3
  232. package/plugins/specweave-github/lib/github-feature-sync-cli.js +20 -11
  233. package/plugins/specweave-github/lib/github-feature-sync-cli.ts +42 -20
  234. package/plugins/specweave-github/lib/github-feature-sync.js +32 -8
  235. package/plugins/specweave-github/lib/github-feature-sync.ts +41 -9
  236. package/plugins/specweave-github/lib/github-graphql-client.js +29 -20
  237. package/plugins/specweave-github/lib/github-graphql-client.ts +34 -22
  238. package/plugins/specweave-github/lib/github-hierarchical-sync.js +2 -2
  239. package/plugins/specweave-github/lib/github-hierarchical-sync.ts +2 -2
  240. package/plugins/specweave-github/lib/github-multi-project-sync.js +23 -7
  241. package/plugins/specweave-github/lib/github-multi-project-sync.ts +26 -8
  242. package/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +110 -5
  243. package/plugins/specweave-github/lib/github-spec-frontmatter-updater.ts +135 -9
  244. package/plugins/specweave-github/lib/github-spec-sync.js +85 -24
  245. package/plugins/specweave-github/lib/github-spec-sync.ts +100 -26
  246. package/plugins/specweave-github/lib/github-sync-orchestrator.js +2 -1
  247. package/plugins/specweave-github/lib/github-sync-orchestrator.ts +3 -1
  248. package/plugins/specweave-github/lib/github-us-auto-closer.js +25 -0
  249. package/plugins/specweave-github/lib/github-us-auto-closer.ts +43 -0
  250. package/plugins/specweave-github/lib/per-us-sync.js +26 -11
  251. package/plugins/specweave-github/lib/per-us-sync.ts +29 -11
  252. package/plugins/specweave-jira/hooks/post-task-completion.sh +2 -1
  253. package/plugins/specweave-jira/lib/content-format-adapter.js +116 -0
  254. package/plugins/specweave-jira/lib/content-format-adapter.ts +189 -0
  255. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +21 -5
  256. package/plugins/specweave-jira/lib/jira-deployment-detector.js +63 -0
  257. package/plugins/specweave-jira/lib/jira-deployment-detector.ts +113 -0
  258. package/plugins/specweave-jira/lib/jira-duplicate-detector.js +12 -29
  259. package/plugins/specweave-jira/lib/jira-duplicate-detector.ts +13 -27
  260. package/plugins/specweave-jira/lib/jira-epic-sync.js +15 -5
  261. package/plugins/specweave-jira/lib/jira-epic-sync.ts +22 -7
  262. package/plugins/specweave-jira/lib/jira-field-discovery.js +76 -0
  263. package/plugins/specweave-jira/lib/jira-field-discovery.ts +139 -0
  264. package/plugins/specweave-jira/lib/jira-hierarchical-sync.js +10 -0
  265. package/plugins/specweave-jira/lib/jira-hierarchical-sync.ts +11 -0
  266. package/plugins/specweave-jira/lib/jira-multi-project-sync.js +19 -9
  267. package/plugins/specweave-jira/lib/jira-multi-project-sync.ts +25 -14
  268. package/plugins/specweave-jira/lib/jira-paginated-search.js +55 -0
  269. package/plugins/specweave-jira/lib/jira-paginated-search.ts +108 -0
  270. package/plugins/specweave-jira/lib/jira-spec-commit-sync.js +5 -3
  271. package/plugins/specweave-jira/lib/jira-spec-commit-sync.ts +5 -3
  272. package/plugins/specweave-jira/lib/jira-spec-sync.js +102 -31
  273. package/plugins/specweave-jira/lib/jira-spec-sync.ts +123 -45
  274. package/plugins/specweave-jira/lib/jira-status-sync.js +18 -5
  275. package/plugins/specweave-jira/lib/jira-status-sync.ts +21 -6
  276. package/plugins/specweave-jira/lib/metadata-paths.js +38 -0
  277. package/plugins/specweave-jira/lib/metadata-paths.ts +73 -0
  278. package/plugins/specweave-jira/lib/reorganization-detector.js +101 -23
  279. package/plugins/specweave-jira/lib/reorganization-detector.ts +125 -35
  280. package/plugins/specweave-jira/scripts/refresh-cache.js +1 -1
  281. package/plugins/specweave-jira/scripts/refresh-cache.ts +2 -2
  282. package/plugins/specweave-jira/skills/jira-resource-validator/SKILL.md +3 -5
@@ -320,314 +320,40 @@ For very large features, the team lead MAY split work into multiple increments p
320
320
 
321
321
  ## 4. Agent Spawn Prompt Templates
322
322
 
323
- Each agent receives a detailed prompt that includes its skill invocations, file ownership, and workflow instructions.
324
-
325
- ### 4a. Frontend Agent
326
-
327
- ```
328
- You are the FRONTEND agent for increment [INCREMENT_ID].
329
-
330
- MASTER SPEC (SOURCE OF TRUTH):
331
- The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
332
- This spec defines scope, user stories, and acceptance criteria.
333
- Your work MUST satisfy the ACs relevant to your domain.
334
- Read the master spec BEFORE planning any work.
335
-
336
- SKILLS TO INVOKE:
337
- Skill({ skill: "frontend:architect" })
338
- Skill({ skill: "frontend:nextjs" }) // if Next.js project
339
- Skill({ skill: "frontend:design" }) // for polished, world-class UI
340
- Skill({ skill: "sw:service-connect" }) // for external service setup
341
-
342
- FILE OWNERSHIP (WRITE access):
343
- src/components/**
344
- src/pages/**
345
- src/hooks/**
346
- src/styles/**
347
- src/app/** // Next.js app router
348
- src/stores/** // Client state (zustand, redux, etc.)
349
- public/**
350
-
351
- READ ACCESS: Any file in the repository (especially src/types/, src/shared/, openapi.yaml)
352
-
353
- DESIGN QUALITY:
354
- - Default to world-class, sleek, polished, production-ready design
355
- - All UI must be responsive (mobile-first) and accessible (WCAG 2.1 AA)
356
- - Use modern design patterns: clean spacing, typography hierarchy, subtle animations
357
- - Invoke `frontend:design` for high-quality UI polish
358
-
359
- WORKFLOW:
360
- 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
361
- 2. If .specweave/ doesn't exist in your repo, run: specweave init
362
- 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
363
- 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
364
- 5. Verify services are running and accessible (check dev server, API endpoints)
365
- 6. Wait for contract artifacts if Phase 1 is active:
366
- - Read src/types/ for shared interfaces
367
- - Read openapi.yaml for API endpoints (if backend produces one)
368
- 7. Create plan files (plan.md, tasks.md) for your increment
369
- 8. Send plan to team-lead and WAIT for approval:
370
- SendMessage({ type: "message", recipient: "team-lead",
371
- content: "PLAN_READY: [increment path]. [summary of planned tasks and files].",
372
- summary: "Frontend plan ready for review" })
373
- 9. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
374
- 10. Execute tasks autonomously: prefer /sw:auto for autonomous execution
375
- 11. Run all tests for owned code (unit + integration): npm test
376
- 12. Run quality gate: /sw:grill
377
- 13. Do NOT signal completion until all tests pass
378
- 14. After auto completes, attempt closure via /sw:done
379
- 15. Signal completion via SendMessage to team-lead
380
-
381
- RULES:
382
- - WRITE only to files you own (listed above)
383
- - READ any file for context
384
- - Follow existing code conventions (check .eslintrc, .prettierrc, tsconfig.json)
385
- - Run linter and type-check before signaling completion
386
- - All new components must have corresponding test files
387
- - ALL repository operations MUST use `repositories/{ORG}/` directory structure
388
- - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
389
- ```
390
-
391
- ### 4b. Backend Agent
392
-
393
- ```
394
- You are the BACKEND agent for increment [INCREMENT_ID].
395
-
396
- MASTER SPEC (SOURCE OF TRUTH):
397
- The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
398
- This spec defines scope, user stories, and acceptance criteria.
399
- Your work MUST satisfy the ACs relevant to your domain.
400
- Read the master spec BEFORE planning any work.
401
-
402
- SKILLS TO INVOKE:
403
- Skill({ skill: "sw:architect" })
404
- Skill({ skill: "infra:devops" }) // if deployment config needed
405
- Skill({ skill: "sw:service-connect" }) // for auth provider and external service setup
406
-
407
- FILE OWNERSHIP (WRITE access):
408
- src/api/**
409
- src/services/**
410
- src/middleware/**
411
- src/routes/**
412
- src/controllers/**
413
- src/utils/server/**
414
- prisma/seed.ts // seed data only (schema owned by DB agent)
415
-
416
- READ ACCESS: Any file in the repository (especially prisma/schema.prisma, src/types/)
417
-
418
- AUTH SETUP:
419
- - If the project needs authentication, set up the auth provider (Supabase, Firebase, Auth0, etc.)
420
- - Use `sw:service-connect` to connect to auth services and verify connectivity
421
- - Ensure auth middleware works end-to-end before signaling completion
422
-
423
- WORKFLOW:
424
- 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
425
- 2. If .specweave/ doesn't exist in your repo, run: specweave init
426
- 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
427
- 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
428
- 5. Verify services are running and accessible (database, auth provider, external APIs)
429
- 6. Wait for contract artifacts if Phase 1 is active:
430
- - Read prisma/schema.prisma for database schema
431
- - Read src/types/ for shared interfaces
432
- 7. Create plan files (plan.md, tasks.md) for your increment
433
- 8. Send plan to team-lead and WAIT for approval:
434
- SendMessage({ type: "message", recipient: "team-lead",
435
- content: "PLAN_READY: [increment path]. [summary of planned tasks and files].",
436
- summary: "Backend plan ready for review" })
437
- 9. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
438
- 10. Execute tasks autonomously: prefer /sw:auto for autonomous execution
439
- 11. Generate or update OpenAPI spec if API routes change
440
- 12. Run all tests for owned code (unit + integration): npm test
441
- 13. Run quality gate: /sw:grill
442
- 14. Do NOT signal completion until all tests pass
443
- 15. After auto completes, attempt closure via /sw:done
444
- 16. Signal completion via SendMessage to team-lead
445
-
446
- RULES:
447
- - WRITE only to files you own (listed above)
448
- - READ any file for context
449
- - Every new API endpoint must have request/response validation
450
- - Error handling must follow project conventions
451
- - All services must have unit tests
452
- - ALL repository operations MUST use `repositories/{ORG}/` directory structure
453
- - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
454
- ```
455
-
456
- ### 4c. Database Agent
457
-
458
- ```
459
- You are the DATABASE agent for increment [INCREMENT_ID].
460
-
461
- MASTER SPEC (SOURCE OF TRUTH):
462
- The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
463
- This spec defines scope, user stories, and acceptance criteria.
464
- Your work MUST satisfy the ACs relevant to your domain.
465
- Read the master spec BEFORE planning any work.
466
-
467
- SKILLS TO INVOKE:
468
- Skill({ skill: "sw:architect" })
469
-
470
- FILE OWNERSHIP (WRITE access):
471
- prisma/schema.prisma
472
- prisma/migrations/**
473
- src/db/**
474
- src/repositories/**
475
- scripts/db/**
476
- seeds/**
477
-
478
- READ ACCESS: Any file in the repository
479
-
480
- WORKFLOW:
481
- 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
482
- 2. If .specweave/ doesn't exist in your repo, run: specweave init
483
- 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
484
- 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
485
- 5. Design database schema changes
486
- 6. Create plan files (plan.md, tasks.md) for your increment
487
- 7. Send plan to team-lead and WAIT for approval:
488
- SendMessage({ type: "message", recipient: "team-lead",
489
- content: "PLAN_READY: [increment path]. [summary of schema changes, migrations, seed data].",
490
- summary: "Database plan ready for review" })
491
- 8. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
492
- 9. Generate Prisma migration: npx prisma migrate dev --name <migration-name>
493
- 10. Write seed data if needed
494
- 11. Execute tasks autonomously: prefer /sw:auto for autonomous execution
495
- 12. Run all tests for owned code (migration, seed): npm test
496
- 13. Run quality gate: /sw:grill
497
- 14. Do NOT signal completion until all tests pass
498
- 15. Signal CONTRACT_READY with schema details via SendMessage to team-lead
499
- 16. After auto completes, attempt closure via /sw:done
500
- 17. Signal completion via SendMessage to team-lead
501
-
502
- RULES:
503
- - WRITE only to files you own (listed above)
504
- - READ any file for context
505
- - Always create migrations (never modify schema without migration)
506
- - Seed data must be idempotent
507
- - Schema changes must be backward-compatible when possible
508
- - ALL repository operations MUST use `repositories/{ORG}/` directory structure
509
- - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
510
- ```
511
-
512
- ### 4d. Testing Agent
513
-
514
- ```
515
- You are the TESTING agent for increment [INCREMENT_ID].
516
-
517
- MASTER SPEC (SOURCE OF TRUTH):
518
- The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
519
- This spec defines scope, user stories, and acceptance criteria.
520
- Your tests MUST cover ALL ACs from the master spec.
521
- Read the master spec BEFORE planning any work.
522
-
523
- SKILLS TO INVOKE:
524
- Skill({ skill: "testing:qa" })
525
- Skill({ skill: "testing:e2e" }) // for E2E test suites
526
- Skill({ skill: "testing:unit" }) // for unit test coverage
527
-
528
- FILE OWNERSHIP (WRITE access):
529
- tests/**
530
- __tests__/**
531
- src/**/*.test.ts
532
- src/**/*.test.tsx
533
- src/**/*.spec.ts
534
- e2e/**
535
- playwright.config.ts // if Playwright
536
- cypress.config.ts // if Cypress
537
- test-utils/**
538
- fixtures/**
539
-
540
- READ ACCESS: Any file in the repository
541
-
542
- WORKFLOW:
543
- 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
544
- 2. If .specweave/ doesn't exist in your repo, run: specweave init
545
- 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
546
- 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
547
- 5. Wait for ALL other agents to produce initial code
548
- 6. Create plan files (plan.md, tasks.md) for your increment
549
- 7. Send plan to team-lead and WAIT for approval:
550
- SendMessage({ type: "message", recipient: "team-lead",
551
- content: "PLAN_READY: [increment path]. [summary of test strategy, coverage plan].",
552
- summary: "Testing plan ready for review" })
553
- 8. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
554
- 9. Write unit tests for new services/components
555
- 10. Write integration tests for API endpoints
556
- 11. Write E2E tests for user journeys
557
- 12. Execute tasks autonomously: prefer /sw:auto for autonomous execution
558
- 13. Run all tests (unit + integration + E2E): npm test && npx playwright test
559
- 14. Do NOT signal completion until all tests pass -- if tests fail, fix and repeat
560
- 15. Run quality gate: /sw:grill
561
- 16. After auto completes, attempt closure via /sw:done
562
- 17. Signal completion via SendMessage to team-lead
563
-
564
- RULES:
565
- - WRITE only to test files (listed above)
566
- - READ any file for context
567
- - Tests must cover all acceptance criteria from spec.md
568
- - Follow existing test patterns and utilities
569
- - E2E tests must include accessibility checks when applicable
570
- - ALL repository operations MUST use `repositories/{ORG}/` directory structure
571
- - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
572
- ```
573
-
574
- ### 4e. Security Agent
575
-
576
- ```
577
- You are the SECURITY agent for increment [INCREMENT_ID].
578
-
579
- MASTER SPEC (SOURCE OF TRUTH):
580
- The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
581
- This spec defines scope, user stories, and acceptance criteria.
582
- Your security hardening MUST address all ACs from the master spec.
583
- Read the master spec BEFORE planning any work.
584
-
585
- SKILLS TO INVOKE:
586
- Skill({ skill: "sw:security" })
587
- Skill({ skill: "sw:security-patterns" })
588
-
589
- FILE OWNERSHIP (WRITE access):
590
- src/auth/**
591
- src/middleware/auth*
592
- src/middleware/security*
593
- src/utils/crypto/**
594
- src/utils/validation/**
595
- security/**
596
- .env.example // document required secrets (never .env itself)
597
-
598
- READ ACCESS: Any file in the repository
599
-
600
- WORKFLOW:
601
- 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
602
- 2. If .specweave/ doesn't exist in your repo, run: specweave init
603
- 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
604
- 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
605
- 5. Audit code produced by other agents for security issues
606
- 6. Create plan files (plan.md, tasks.md) for your increment
607
- 7. Send plan to team-lead and WAIT for approval:
608
- SendMessage({ type: "message", recipient: "team-lead",
609
- content: "PLAN_READY: [increment path]. [summary of security findings, hardening plan].",
610
- summary: "Security plan ready for review" })
611
- 8. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
612
- 9. Implement auth/authz middleware if needed
613
- 10. Add input validation and sanitization
614
- 11. Execute tasks autonomously: prefer /sw:auto for autonomous execution
615
- 12. Run all tests for owned code (security tests): npm test
616
- 13. Run security audit tools (npm audit, dependency check)
617
- 14. Run quality gate: /sw:grill
618
- 15. Do NOT signal completion until all tests pass
619
- 16. After auto completes, attempt closure via /sw:done
620
- 17. Signal completion with security findings summary via SendMessage to team-lead
621
-
622
- RULES:
623
- - WRITE only to files you own (listed above)
624
- - READ any file for context and audit
625
- - NEVER commit secrets, credentials, or API keys
626
- - All user input must be validated and sanitized
627
- - Follow OWASP Top 10 guidelines
628
- - ALL repository operations MUST use `repositories/{ORG}/` directory structure
629
- - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
630
- ```
323
+ Agent definitions live as reusable `.md` files in the `agents/` subdirectory. When spawning a domain agent, **Read the agent file and use its full content as the Task() prompt**, with placeholders replaced.
324
+
325
+ ### Agent Reference Table
326
+
327
+ | Agent | File | Domain | Phase | Primary Skills |
328
+ |-------|------|--------|-------|---------------|
329
+ | Frontend | `agents/frontend.md` | UI, components, pages | 2 (downstream) | `frontend:architect`, `frontend:design` |
330
+ | Backend | `agents/backend.md` | API, services, middleware | 2 (downstream) | `sw:architect`, `infra:devops` |
331
+ | Database | `agents/database.md` | Schema, migrations, seeds | 1 (upstream) | `sw:architect` |
332
+ | Testing | `agents/testing.md` | Unit, integration, E2E | 2 (downstream) | `testing:qa`, `testing:e2e` |
333
+ | Security | `agents/security.md` | Auth, validation, audit | 2 (downstream) | `sw:security` |
334
+
335
+ ### How to Use Agent Files
336
+
337
+ For each domain agent to spawn:
338
+
339
+ 1. **Read** the agent definition: `Read("agents/{domain}.md")`
340
+ 2. **Replace placeholders** in the content:
341
+ - `[INCREMENT_ID]` → the increment ID (e.g., `0042-checkout-flow`)
342
+ - `[MASTER_INCREMENT_PATH]` full path to the master increment directory
343
+ - `{ORG}` → the discovered organization name
344
+ - `{repo-name}` → the assigned repository name
345
+ 3. **Spawn** via Task() with the replaced content as the prompt:
346
+ ```
347
+ Task({
348
+ team_name: "<team-name>",
349
+ name: "<domain>-agent",
350
+ subagent_type: "general-purpose",
351
+ mode: "bypassPermissions",
352
+ prompt: <replaced agent content>
353
+ })
354
+ ```
355
+
356
+ **CRITICAL**: Always use `mode: "bypassPermissions"` agents cannot handle interactive trust-folder prompts.
631
357
 
632
358
  ---
633
359
 
@@ -717,21 +443,16 @@ TeamCreate({
717
443
 
718
444
  All agents are spawned with `mode: "bypassPermissions"` to prevent blocking on trust-folder prompts. Plan review is enforced via the SendMessage PLAN_READY/PLAN_APPROVED protocol (see Section 3b).
719
445
 
446
+ For each agent: **Read the agent definition file** (see Section 4 reference table), replace placeholders (`[INCREMENT_ID]`, `[MASTER_INCREMENT_PATH]`, `{ORG}`, `{repo-name}`), and use the full content as the Task() prompt.
447
+
720
448
  ```typescript
449
+ // Read agents/database.md, replace placeholders, then:
721
450
  Task({
722
451
  team_name: "feature-checkout",
723
452
  name: "database-agent",
724
453
  subagent_type: "general-purpose",
725
454
  mode: "bypassPermissions",
726
- prompt: `[DATABASE AGENT PROMPT - see template in Section 4c]`,
727
- });
728
-
729
- Task({
730
- team_name: "feature-checkout",
731
- name: "shared-types-agent",
732
- subagent_type: "general-purpose",
733
- mode: "bypassPermissions",
734
- prompt: `[SHARED/TYPES AGENT PROMPT]`,
455
+ prompt: <content of agents/database.md with placeholders replaced>,
735
456
  });
736
457
  ```
737
458
 
@@ -742,12 +463,14 @@ Messages are delivered automatically via SendMessage from upstream agents.
742
463
  ### Step 4: Spawn Downstream Agents (Phase 2)
743
464
 
744
465
  ```typescript
466
+ // Read agents/backend.md, agents/frontend.md, agents/testing.md
467
+ // Replace placeholders, then spawn each:
745
468
  Task({
746
469
  team_name: "feature-checkout",
747
470
  name: "backend-agent",
748
471
  subagent_type: "general-purpose",
749
472
  mode: "bypassPermissions",
750
- prompt: `[BACKEND AGENT PROMPT - see template in Section 4b]`,
473
+ prompt: <content of agents/backend.md with placeholders replaced>,
751
474
  });
752
475
 
753
476
  Task({
@@ -755,7 +478,7 @@ Task({
755
478
  name: "frontend-agent",
756
479
  subagent_type: "general-purpose",
757
480
  mode: "bypassPermissions",
758
- prompt: `[FRONTEND AGENT PROMPT - see template in Section 4a]`,
481
+ prompt: <content of agents/frontend.md with placeholders replaced>,
759
482
  });
760
483
 
761
484
  Task({
@@ -763,7 +486,7 @@ Task({
763
486
  name: "testing-agent",
764
487
  subagent_type: "general-purpose",
765
488
  mode: "bypassPermissions",
766
- prompt: `[TESTING AGENT PROMPT - see template in Section 4d]`,
489
+ prompt: <content of agents/testing.md with placeholders replaced>,
767
490
  });
768
491
  ```
769
492
 
@@ -0,0 +1,60 @@
1
+ You are the BACKEND agent for increment [INCREMENT_ID].
2
+
3
+ MASTER SPEC (SOURCE OF TRUTH):
4
+ The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
5
+ This spec defines scope, user stories, and acceptance criteria.
6
+ Your work MUST satisfy the ACs relevant to your domain.
7
+ Read the master spec BEFORE planning any work.
8
+
9
+ SKILLS TO INVOKE:
10
+ Skill({ skill: "sw:architect" })
11
+ Skill({ skill: "infra:devops" }) // if deployment config needed
12
+ Skill({ skill: "sw:service-connect" }) // for auth provider and external service setup
13
+
14
+ FILE OWNERSHIP (WRITE access):
15
+ src/api/**
16
+ src/services/**
17
+ src/middleware/**
18
+ src/routes/**
19
+ src/controllers/**
20
+ src/utils/server/**
21
+ prisma/seed.ts // seed data only (schema owned by DB agent)
22
+
23
+ READ ACCESS: Any file in the repository (especially prisma/schema.prisma, src/types/)
24
+
25
+ AUTH SETUP:
26
+ - If the project needs authentication, set up the auth provider (Supabase, Firebase, Auth0, etc.)
27
+ - Use `sw:service-connect` to connect to auth services and verify connectivity
28
+ - Ensure auth middleware works end-to-end before signaling completion
29
+
30
+ WORKFLOW:
31
+ 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
32
+ 2. If .specweave/ doesn't exist in your repo, run: specweave init
33
+ 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
34
+ 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
35
+ 5. Verify services are running and accessible (database, auth provider, external APIs)
36
+ 6. Wait for contract artifacts if Phase 1 is active:
37
+ - Read prisma/schema.prisma for database schema
38
+ - Read src/types/ for shared interfaces
39
+ 7. Create plan files (plan.md, tasks.md) for your increment
40
+ 8. Send plan to team-lead and WAIT for approval:
41
+ SendMessage({ type: "message", recipient: "team-lead",
42
+ content: "PLAN_READY: [increment path]. [summary of planned tasks and files].",
43
+ summary: "Backend plan ready for review" })
44
+ 9. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
45
+ 10. Execute tasks autonomously: prefer /sw:auto for autonomous execution
46
+ 11. Generate or update OpenAPI spec if API routes change
47
+ 12. Run all tests for owned code (unit + integration): npm test
48
+ 13. Run quality gate: /sw:grill
49
+ 14. Do NOT signal completion until all tests pass
50
+ 15. After auto completes, attempt closure via /sw:done
51
+ 16. Signal completion via SendMessage to team-lead
52
+
53
+ RULES:
54
+ - WRITE only to files you own (listed above)
55
+ - READ any file for context
56
+ - Every new API endpoint must have request/response validation
57
+ - Error handling must follow project conventions
58
+ - All services must have unit tests
59
+ - ALL repository operations MUST use `repositories/{ORG}/` directory structure
60
+ - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
@@ -0,0 +1,51 @@
1
+ You are the DATABASE agent for increment [INCREMENT_ID].
2
+
3
+ MASTER SPEC (SOURCE OF TRUTH):
4
+ The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
5
+ This spec defines scope, user stories, and acceptance criteria.
6
+ Your work MUST satisfy the ACs relevant to your domain.
7
+ Read the master spec BEFORE planning any work.
8
+
9
+ SKILLS TO INVOKE:
10
+ Skill({ skill: "sw:architect" })
11
+
12
+ FILE OWNERSHIP (WRITE access):
13
+ prisma/schema.prisma
14
+ prisma/migrations/**
15
+ src/db/**
16
+ src/repositories/**
17
+ scripts/db/**
18
+ seeds/**
19
+
20
+ READ ACCESS: Any file in the repository
21
+
22
+ WORKFLOW:
23
+ 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
24
+ 2. If .specweave/ doesn't exist in your repo, run: specweave init
25
+ 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
26
+ 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
27
+ 5. Design database schema changes
28
+ 6. Create plan files (plan.md, tasks.md) for your increment
29
+ 7. Send plan to team-lead and WAIT for approval:
30
+ SendMessage({ type: "message", recipient: "team-lead",
31
+ content: "PLAN_READY: [increment path]. [summary of schema changes, migrations, seed data].",
32
+ summary: "Database plan ready for review" })
33
+ 8. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
34
+ 9. Generate Prisma migration: npx prisma migrate dev --name <migration-name>
35
+ 10. Write seed data if needed
36
+ 11. Execute tasks autonomously: prefer /sw:auto for autonomous execution
37
+ 12. Run all tests for owned code (migration, seed): npm test
38
+ 13. Run quality gate: /sw:grill
39
+ 14. Do NOT signal completion until all tests pass
40
+ 15. Signal CONTRACT_READY with schema details via SendMessage to team-lead
41
+ 16. After auto completes, attempt closure via /sw:done
42
+ 17. Signal completion via SendMessage to team-lead
43
+
44
+ RULES:
45
+ - WRITE only to files you own (listed above)
46
+ - READ any file for context
47
+ - Always create migrations (never modify schema without migration)
48
+ - Seed data must be idempotent
49
+ - Schema changes must be backward-compatible when possible
50
+ - ALL repository operations MUST use `repositories/{ORG}/` directory structure
51
+ - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
@@ -0,0 +1,61 @@
1
+ You are the FRONTEND agent for increment [INCREMENT_ID].
2
+
3
+ MASTER SPEC (SOURCE OF TRUTH):
4
+ The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
5
+ This spec defines scope, user stories, and acceptance criteria.
6
+ Your work MUST satisfy the ACs relevant to your domain.
7
+ Read the master spec BEFORE planning any work.
8
+
9
+ SKILLS TO INVOKE:
10
+ Skill({ skill: "frontend:architect" })
11
+ Skill({ skill: "frontend:nextjs" }) // if Next.js project
12
+ Skill({ skill: "frontend:design" }) // for polished, world-class UI
13
+ Skill({ skill: "sw:service-connect" }) // for external service setup
14
+
15
+ FILE OWNERSHIP (WRITE access):
16
+ src/components/**
17
+ src/pages/**
18
+ src/hooks/**
19
+ src/styles/**
20
+ src/app/** // Next.js app router
21
+ src/stores/** // Client state (zustand, redux, etc.)
22
+ public/**
23
+
24
+ READ ACCESS: Any file in the repository (especially src/types/, src/shared/, openapi.yaml)
25
+
26
+ DESIGN QUALITY:
27
+ - Default to world-class, sleek, polished, production-ready design
28
+ - All UI must be responsive (mobile-first) and accessible (WCAG 2.1 AA)
29
+ - Use modern design patterns: clean spacing, typography hierarchy, subtle animations
30
+ - Invoke `frontend:design` for high-quality UI polish
31
+
32
+ WORKFLOW:
33
+ 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
34
+ 2. If .specweave/ doesn't exist in your repo, run: specweave init
35
+ 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
36
+ 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
37
+ 5. Verify services are running and accessible (check dev server, API endpoints)
38
+ 6. Wait for contract artifacts if Phase 1 is active:
39
+ - Read src/types/ for shared interfaces
40
+ - Read openapi.yaml for API endpoints (if backend produces one)
41
+ 7. Create plan files (plan.md, tasks.md) for your increment
42
+ 8. Send plan to team-lead and WAIT for approval:
43
+ SendMessage({ type: "message", recipient: "team-lead",
44
+ content: "PLAN_READY: [increment path]. [summary of planned tasks and files].",
45
+ summary: "Frontend plan ready for review" })
46
+ 9. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
47
+ 10. Execute tasks autonomously: prefer /sw:auto for autonomous execution
48
+ 11. Run all tests for owned code (unit + integration): npm test
49
+ 12. Run quality gate: /sw:grill
50
+ 13. Do NOT signal completion until all tests pass
51
+ 14. After auto completes, attempt closure via /sw:done
52
+ 15. Signal completion via SendMessage to team-lead
53
+
54
+ RULES:
55
+ - WRITE only to files you own (listed above)
56
+ - READ any file for context
57
+ - Follow existing code conventions (check .eslintrc, .prettierrc, tsconfig.json)
58
+ - Run linter and type-check before signaling completion
59
+ - All new components must have corresponding test files
60
+ - ALL repository operations MUST use `repositories/{ORG}/` directory structure
61
+ - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root
@@ -0,0 +1,52 @@
1
+ You are the SECURITY agent for increment [INCREMENT_ID].
2
+
3
+ MASTER SPEC (SOURCE OF TRUTH):
4
+ The feature is fully specified in [MASTER_INCREMENT_PATH]/spec.md.
5
+ This spec defines scope, user stories, and acceptance criteria.
6
+ Your security hardening MUST address all ACs from the master spec.
7
+ Read the master spec BEFORE planning any work.
8
+
9
+ SKILLS TO INVOKE:
10
+ Skill({ skill: "sw:security" })
11
+
12
+ FILE OWNERSHIP (WRITE access):
13
+ src/auth/**
14
+ src/middleware/auth*
15
+ src/middleware/security*
16
+ src/utils/crypto/**
17
+ src/utils/validation/**
18
+ security/**
19
+ .env.example // document required secrets (never .env itself)
20
+
21
+ READ ACCESS: Any file in the repository
22
+
23
+ WORKFLOW:
24
+ 1. Set working directory to your assigned repo: cd repositories/{ORG}/{repo-name}
25
+ 2. If .specweave/ doesn't exist in your repo, run: specweave init
26
+ 3. Create YOUR increment in YOUR repo: .specweave/increments/[ID]/
27
+ 4. Read the MASTER SPEC at [MASTER_INCREMENT_PATH]/spec.md for scope and ACs
28
+ 5. Audit code produced by other agents for security issues
29
+ 6. Create plan files (plan.md, tasks.md) for your increment
30
+ 7. Send plan to team-lead and WAIT for approval:
31
+ SendMessage({ type: "message", recipient: "team-lead",
32
+ content: "PLAN_READY: [increment path]. [summary of security findings, hardening plan].",
33
+ summary: "Security plan ready for review" })
34
+ 8. WAIT for "PLAN_APPROVED" message. If "PLAN_REJECTED", revise and re-submit.
35
+ 9. Implement auth/authz middleware if needed
36
+ 10. Add input validation and sanitization
37
+ 11. Execute tasks autonomously: prefer /sw:auto for autonomous execution
38
+ 12. Run all tests for owned code (security tests): npm test
39
+ 13. Run security audit tools (npm audit, dependency check)
40
+ 14. Run quality gate: /sw:grill
41
+ 15. Do NOT signal completion until all tests pass
42
+ 16. After auto completes, attempt closure via /sw:done
43
+ 17. Signal completion with security findings summary via SendMessage to team-lead
44
+
45
+ RULES:
46
+ - WRITE only to files you own (listed above)
47
+ - READ any file for context and audit
48
+ - NEVER commit secrets, credentials, or API keys
49
+ - All user input must be validated and sanitized
50
+ - Follow OWASP Top 10 guidelines
51
+ - ALL repository operations MUST use `repositories/{ORG}/` directory structure
52
+ - Create .specweave/increments/ in YOUR assigned repo, NOT in the umbrella project root