maestro-flow 0.4.8 → 0.4.10

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 (280) hide show
  1. package/.agy/agents/cli-explore-agent.md +186 -0
  2. package/.agy/agents/conceptual-planning-agent.md +244 -0
  3. package/.agy/agents/impeccable-agent.md +97 -0
  4. package/.agy/agents/team-supervisor.md +142 -0
  5. package/.agy/agents/team-worker.md +236 -0
  6. package/.agy/agents/ui-design-agent.md +286 -0
  7. package/.agy/agents/workflow-analyzer.md +114 -0
  8. package/.agy/agents/workflow-codebase-mapper.md +76 -0
  9. package/.agy/agents/workflow-collab-planner.md +142 -0
  10. package/.agy/agents/workflow-debugger.md +102 -0
  11. package/.agy/agents/workflow-executor.md +131 -0
  12. package/.agy/agents/workflow-external-researcher.md +86 -0
  13. package/.agy/agents/workflow-integration-checker.md +82 -0
  14. package/.agy/agents/workflow-nyquist-auditor.md +84 -0
  15. package/.agy/agents/workflow-phase-researcher.md +84 -0
  16. package/.agy/agents/workflow-plan-checker.md +89 -0
  17. package/.agy/agents/workflow-planner.md +194 -0
  18. package/.agy/agents/workflow-project-researcher.md +73 -0
  19. package/.agy/agents/workflow-research-synthesizer.md +70 -0
  20. package/.agy/agents/workflow-reviewer.md +81 -0
  21. package/.agy/agents/workflow-roadmapper.md +81 -0
  22. package/.agy/agents/workflow-verifier.md +119 -0
  23. package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
  24. package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  25. package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  26. package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  27. package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  28. package/.agy/skills/learn-decompose/SKILL.md +118 -0
  29. package/.agy/skills/learn-follow/SKILL.md +129 -0
  30. package/.agy/skills/learn-investigate/SKILL.md +154 -0
  31. package/.agy/skills/learn-retro/SKILL.md +159 -0
  32. package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
  33. package/.agy/skills/maestro/SKILL.md +221 -0
  34. package/.agy/skills/maestro-amend/SKILL.md +162 -0
  35. package/.agy/skills/maestro-analyze/SKILL.md +135 -0
  36. package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
  37. package/.agy/skills/maestro-collab/SKILL.md +174 -0
  38. package/.agy/skills/maestro-composer/SKILL.md +180 -0
  39. package/.agy/skills/maestro-execute/SKILL.md +133 -0
  40. package/.agy/skills/maestro-fork/SKILL.md +88 -0
  41. package/.agy/skills/maestro-guard/SKILL.md +101 -0
  42. package/.agy/skills/maestro-help/SKILL.md +267 -0
  43. package/.agy/skills/maestro-help/index/catalog.json +184 -0
  44. package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
  45. package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
  46. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  47. package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
  48. package/.agy/skills/maestro-init/SKILL.md +80 -0
  49. package/.agy/skills/maestro-learn/SKILL.md +142 -0
  50. package/.agy/skills/maestro-merge/SKILL.md +66 -0
  51. package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
  52. package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
  53. package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
  54. package/.agy/skills/maestro-overlay/SKILL.md +177 -0
  55. package/.agy/skills/maestro-plan/SKILL.md +172 -0
  56. package/.agy/skills/maestro-player/SKILL.md +176 -0
  57. package/.agy/skills/maestro-quick/SKILL.md +67 -0
  58. package/.agy/skills/maestro-ralph/SKILL.md +546 -0
  59. package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
  60. package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
  61. package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
  62. package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
  63. package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
  64. package/.agy/skills/maestro-update/SKILL.md +175 -0
  65. package/.agy/skills/maestro-verify/SKILL.md +111 -0
  66. package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
  67. package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
  68. package/.agy/skills/manage-harvest/SKILL.md +96 -0
  69. package/.agy/skills/manage-issue/SKILL.md +72 -0
  70. package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
  71. package/.agy/skills/manage-knowhow/SKILL.md +76 -0
  72. package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
  73. package/.agy/skills/manage-learn/SKILL.md +64 -0
  74. package/.agy/skills/manage-status/SKILL.md +51 -0
  75. package/.agy/skills/manage-wiki/SKILL.md +61 -0
  76. package/.agy/skills/quality-auto-test/SKILL.md +135 -0
  77. package/.agy/skills/quality-debug/SKILL.md +122 -0
  78. package/.agy/skills/quality-refactor/SKILL.md +69 -0
  79. package/.agy/skills/quality-retrospective/SKILL.md +79 -0
  80. package/.agy/skills/quality-review/SKILL.md +130 -0
  81. package/.agy/skills/quality-sync/SKILL.md +53 -0
  82. package/.agy/skills/quality-test/SKILL.md +119 -0
  83. package/.agy/skills/security-audit/SKILL.md +157 -0
  84. package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
  85. package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
  86. package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
  87. package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  88. package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
  89. package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
  90. package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  91. package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  92. package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  93. package/.agy/skills/spec-add/SKILL.md +67 -0
  94. package/.agy/skills/spec-load/SKILL.md +70 -0
  95. package/.agy/skills/spec-remove/SKILL.md +50 -0
  96. package/.agy/skills/spec-setup/SKILL.md +47 -0
  97. package/.agy/skills/team-coordinate/SKILL.md +267 -0
  98. package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  99. package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  100. package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
  101. package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
  102. package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  103. package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
  104. package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
  105. package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
  106. package/.agy/skills/team-executor/SKILL.md +180 -0
  107. package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
  108. package/.agy/skills/team-executor/roles/executor/role.md +171 -0
  109. package/.agy/skills/team-executor/specs/session-schema.md +264 -0
  110. package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
  111. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
  112. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  113. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  114. package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  115. package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  116. package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  117. package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  118. package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
  119. package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
  120. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  121. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  122. package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
  123. package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
  124. package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
  125. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
  126. package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  127. package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  128. package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  129. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  130. package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
  131. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  132. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  133. package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
  134. package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
  135. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  136. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  137. package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
  138. package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  139. package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
  140. package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
  141. package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
  142. package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
  143. package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
  144. package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
  145. package/.agy/skills/team-review/SKILL.md +149 -0
  146. package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  147. package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  148. package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
  149. package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
  150. package/.agy/skills/team-review/roles/fixer/role.md +74 -0
  151. package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
  152. package/.agy/skills/team-review/roles/scanner/role.md +77 -0
  153. package/.agy/skills/team-review/specs/dimensions.md +82 -0
  154. package/.agy/skills/team-review/specs/finding-schema.json +82 -0
  155. package/.agy/skills/team-review/specs/pipelines.md +102 -0
  156. package/.agy/skills/team-review/specs/team-config.json +27 -0
  157. package/.agy/skills/team-tech-debt/SKILL.md +133 -0
  158. package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
  159. package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  160. package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  161. package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
  162. package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  163. package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
  164. package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
  165. package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
  166. package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
  167. package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
  168. package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
  169. package/.agy/skills/team-testing/SKILL.md +144 -0
  170. package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
  171. package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  172. package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  173. package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
  174. package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
  175. package/.agy/skills/team-testing/roles/executor/role.md +95 -0
  176. package/.agy/skills/team-testing/roles/generator/role.md +95 -0
  177. package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
  178. package/.agy/skills/team-testing/specs/pipelines.md +101 -0
  179. package/.agy/skills/team-testing/specs/team-config.json +93 -0
  180. package/.agy/skills/wiki-connect/SKILL.md +64 -0
  181. package/.agy/skills/wiki-digest/SKILL.md +70 -0
  182. package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
  183. package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  184. package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  185. package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  186. package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  187. package/dashboard/dist/assets/{ArtifactsPage-CVh0Z2I2.js → ArtifactsPage-BLvAqQlQ.js} +1 -1
  188. package/dashboard/dist/assets/{ChatInput-CBI3qHQQ.js → ChatInput-DU9YGZKX.js} +1 -1
  189. package/dashboard/dist/assets/{ChatPage-BjJ9CYox.js → ChatPage-DYHfheXC.js} +1 -1
  190. package/dashboard/dist/assets/{CollabPage-CprGGO9y.js → CollabPage-CSlmvEa-.js} +1 -1
  191. package/dashboard/dist/assets/{ExecutionPanel-CClxD7cH.js → ExecutionPanel-RYWf0dYC.js} +1 -1
  192. package/dashboard/dist/assets/{KanbanPage-copqjdPg.js → KanbanPage-N55Iv0-X.js} +1 -1
  193. package/dashboard/dist/assets/{MaestroCoordinatePage-CioZjQ9N.js → MaestroCoordinatePage-BxwZ6yy5.js} +1 -1
  194. package/dashboard/dist/assets/{MarkdownRenderer-CtUhoxCT.js → MarkdownRenderer-ZGtOY7Ti.js} +1 -1
  195. package/dashboard/dist/assets/{McpPage-BcPPcJpr.js → McpPage-Im6s4pGR.js} +1 -1
  196. package/dashboard/dist/assets/{MeetingRoomPage-BgmAKxU-.js → MeetingRoomPage-CxHRn1xx.js} +1 -1
  197. package/dashboard/dist/assets/{OutputPanel-DgT3gMyp.js → OutputPanel-DaL8c1i5.js} +1 -1
  198. package/dashboard/dist/assets/{ProblemsPanel-BmG7rxoG.js → ProblemsPanel-BQTd5812.js} +1 -1
  199. package/dashboard/dist/assets/{RequirementBoardPage-k8YoeQ0r.js → RequirementBoardPage-22y9u1qh.js} +1 -1
  200. package/dashboard/dist/assets/{RequirementPage-Da2354px.js → RequirementPage-_mO743Xm.js} +1 -1
  201. package/dashboard/dist/assets/{RoomsPage-BtqDiYaU.js → RoomsPage-CExTbOGr.js} +1 -1
  202. package/dashboard/dist/assets/{SpecsPage-ByPVH_M3.js → SpecsPage-gr4KX51-.js} +1 -1
  203. package/dashboard/dist/assets/{TeamsPage-sFDLN30L.js → TeamsPage-BxEXLb5g.js} +1 -1
  204. package/dashboard/dist/assets/{TreeBrowser-oEx8YJXV.js → TreeBrowser-CVtPF5C9.js} +1 -1
  205. package/dashboard/dist/assets/{WorkflowPage-JrX7CVHh.js → WorkflowPage-BoN18Lhs.js} +1 -1
  206. package/dashboard/dist/assets/{arrow-left-DYvgSdIH.js → arrow-left-C5ROg97G.js} +1 -1
  207. package/dashboard/dist/assets/{check-jcgYBWVR.js → check-Bs8PM0tQ.js} +1 -1
  208. package/dashboard/dist/assets/{chevron-right-DvZ5sMOg.js → chevron-right-SmErd_1F.js} +1 -1
  209. package/dashboard/dist/assets/{circle-DYT-zoRZ.js → circle-CjpslL_D.js} +1 -1
  210. package/dashboard/dist/assets/{circle-alert-Bfbv3gt4.js → circle-alert-CuzAg2fd.js} +1 -1
  211. package/dashboard/dist/assets/{circle-check-D82WnpbI.js → circle-check-BIkDU5D5.js} +1 -1
  212. package/dashboard/dist/assets/{circle-check-big-CPVD1GKF.js → circle-check-big-CYctV8bK.js} +1 -1
  213. package/dashboard/dist/assets/{code-B3bKFGI4.js → code-DoB7rfxt.js} +1 -1
  214. package/dashboard/dist/assets/{columns-3-BeMAQCix.js → columns-3-Ch5KIyRa.js} +1 -1
  215. package/dashboard/dist/assets/{download-BCtpoWYB.js → download-DadtG2Nr.js} +1 -1
  216. package/dashboard/dist/assets/{folder-CTj6SNNu.js → folder-B8ODoZfb.js} +1 -1
  217. package/dashboard/dist/assets/{index-BxR_3IbJ.js → index-BL4h1OKY.js} +1 -1
  218. package/dashboard/dist/assets/{index-DpcPd-UG.js → index-DQIlX2w_.js} +4 -4
  219. package/dashboard/dist/assets/{index-CWBJLu42.js → index-DaFwSmVJ.js} +10 -10
  220. package/dashboard/dist/assets/{list-BMv8pIQn.js → list-CI-XIPZh.js} +1 -1
  221. package/dashboard/dist/assets/{loader-DdM4VOgF.js → loader-DpdMoQvh.js} +1 -1
  222. package/dashboard/dist/assets/{minus-D15s2E__.js → minus-BVbfXGrC.js} +1 -1
  223. package/dashboard/dist/assets/{pen-line-DO6o4xWz.js → pen-line-CR8GaHt-.js} +1 -1
  224. package/dashboard/dist/assets/{pencil-qGxg9jOe.js → pencil-I7GE0y29.js} +1 -1
  225. package/dashboard/dist/assets/{proxy-DOffTzwA.js → proxy-CcYyZZWI.js} +1 -1
  226. package/dashboard/dist/assets/{refresh-cw-C9UNdLCy.js → refresh-cw-BG9V_T4R.js} +1 -1
  227. package/dashboard/dist/assets/{rows-2-CifAA5SL.js → rows-2-DP6NjQFk.js} +1 -1
  228. package/dashboard/dist/assets/{search-pe7pU1YN.js → search-b78eLlw2.js} +1 -1
  229. package/dashboard/dist/assets/{shallow-r7YynQYA.js → shallow-CJEesgtu.js} +1 -1
  230. package/dashboard/dist/assets/{table-Bh772iIw.js → table-B_lk-a1d.js} +1 -1
  231. package/dashboard/dist/assets/{team-types-C_HqX2p2.js → team-types-Se7f9LfJ.js} +1 -1
  232. package/dashboard/dist/assets/{terminal-EpmtGBlw.js → terminal-DXx4tvzq.js} +1 -1
  233. package/dashboard/dist/assets/{trash-2-Xen46iNQ.js → trash-2-CVh9mnRj.js} +1 -1
  234. package/dashboard/dist/assets/{users-BLueDPxF.js → users-Da9zGME5.js} +1 -1
  235. package/dashboard/dist/assets/{zap-DsQCPF61.js → zap-C0zaC7gJ.js} +1 -1
  236. package/dashboard/dist/index.html +1 -1
  237. package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js +4 -0
  238. package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js.map +1 -1
  239. package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.d.ts +39 -0
  240. package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js +423 -0
  241. package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js.map +1 -0
  242. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.d.ts +6 -0
  243. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +109 -0
  244. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  245. package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
  246. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  247. package/dashboard/dist-server/shared/agent-types.d.ts +1 -1
  248. package/dist/shared/agent-types.d.ts +1 -1
  249. package/dist/shared/agent-types.d.ts.map +1 -1
  250. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  251. package/dist/src/agents/cli-agent-runner.js +3 -0
  252. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  253. package/dist/src/commands/hooks.d.ts +64 -0
  254. package/dist/src/commands/hooks.d.ts.map +1 -1
  255. package/dist/src/commands/hooks.js +107 -0
  256. package/dist/src/commands/hooks.js.map +1 -1
  257. package/dist/src/commands/install.d.ts.map +1 -1
  258. package/dist/src/commands/install.js +17 -3
  259. package/dist/src/commands/install.js.map +1 -1
  260. package/dist/src/commands/update.d.ts.map +1 -1
  261. package/dist/src/commands/update.js +53 -0
  262. package/dist/src/commands/update.js.map +1 -1
  263. package/dist/src/config/cli-tools-config.d.ts +19 -5
  264. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  265. package/dist/src/config/cli-tools-config.js +77 -32
  266. package/dist/src/config/cli-tools-config.js.map +1 -1
  267. package/dist/src/config/cli-tools-defaults.json +2 -1
  268. package/dist/src/core/component-defs.d.ts.map +1 -1
  269. package/dist/src/core/component-defs.js +53 -0
  270. package/dist/src/core/component-defs.js.map +1 -1
  271. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  272. package/dist/src/tui/install-ui/InstallExecution.js +5 -3
  273. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  274. package/dist/src/utils/update-notices.d.ts +62 -0
  275. package/dist/src/utils/update-notices.d.ts.map +1 -0
  276. package/dist/src/utils/update-notices.js +178 -0
  277. package/dist/src/utils/update-notices.js.map +1 -0
  278. package/package.json +84 -82
  279. package/shared/agent-types.ts +1 -1
  280. package/workflows/agy-instructions.md +124 -0
@@ -0,0 +1,108 @@
1
+ # Dispatch Tasks
2
+
3
+ Create testing task chains with correct dependencies. Supports targeted, standard, and comprehensive pipelines.
4
+
5
+ ## Workflow
6
+
7
+ 1. Read task-analysis.json -> extract pipeline_mode and dependency_graph
8
+ 2. Read specs/pipelines.md -> get task registry for selected pipeline
9
+ 3. Topological sort tasks (respect blockedBy)
10
+ 4. Validate all owners exist in role registry (SKILL.md)
11
+ 5. For each task (in order):
12
+ - TaskCreate with structured description (see template below)
13
+ - TaskUpdate with blockedBy + owner assignment
14
+ 6. Update session.json with pipeline.tasks_total
15
+ 7. Validate chain (no orphans, no cycles, all refs valid)
16
+
17
+ ## Task Description Template
18
+
19
+ ```
20
+ PURPOSE: <goal> | Success: <criteria>
21
+ TASK:
22
+ - <step 1>
23
+ - <step 2>
24
+ CONTEXT:
25
+ - Session: <session-folder>
26
+ - Scope: <scope>
27
+ - Layer: <L1-unit|L2-integration|L3-e2e>
28
+ - Upstream artifacts: <artifact-1>, <artifact-2>
29
+ - Shared memory: <session>/wisdom/.msg/meta.json
30
+ EXPECTED: <deliverable path> + <quality criteria>
31
+ CONSTRAINTS: <scope limits, focus areas>
32
+ ---
33
+ InnerLoop: <true|false>
34
+ RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
35
+ ```
36
+
37
+ ## Pipeline Task Registry
38
+
39
+ ### Targeted Pipeline
40
+ ```
41
+ STRATEGY-001 (strategist): Analyze change scope, define test strategy
42
+ blockedBy: []
43
+ TESTGEN-001 (generator): Generate L1 unit tests
44
+ blockedBy: [STRATEGY-001], meta: layer=L1-unit
45
+ TESTRUN-001 (executor): Execute L1 tests, collect coverage
46
+ blockedBy: [TESTGEN-001], inner_loop: true, meta: layer=L1-unit, coverage_target=80%
47
+ ```
48
+
49
+ ### Standard Pipeline
50
+ ```
51
+ STRATEGY-001 (strategist): Analyze change scope, define test strategy
52
+ blockedBy: []
53
+ TESTGEN-001 (generator): Generate L1 unit tests
54
+ blockedBy: [STRATEGY-001], meta: layer=L1-unit
55
+ TESTRUN-001 (executor): Execute L1 tests, collect coverage
56
+ blockedBy: [TESTGEN-001], inner_loop: true, meta: layer=L1-unit, coverage_target=80%
57
+ TESTGEN-002 (generator): Generate L2 integration tests
58
+ blockedBy: [TESTRUN-001], meta: layer=L2-integration
59
+ TESTRUN-002 (executor): Execute L2 tests, collect coverage
60
+ blockedBy: [TESTGEN-002], inner_loop: true, meta: layer=L2-integration, coverage_target=60%
61
+ TESTANA-001 (analyst): Defect pattern analysis, quality report
62
+ blockedBy: [TESTRUN-002]
63
+ ```
64
+
65
+ ### Comprehensive Pipeline
66
+ ```
67
+ STRATEGY-001 (strategist): Analyze change scope, define test strategy
68
+ blockedBy: []
69
+ TESTGEN-001 (generator-1): Generate L1 unit tests
70
+ blockedBy: [STRATEGY-001], meta: layer=L1-unit
71
+ TESTGEN-002 (generator-2): Generate L2 integration tests
72
+ blockedBy: [STRATEGY-001], meta: layer=L2-integration
73
+ TESTRUN-001 (executor-1): Execute L1 tests, collect coverage
74
+ blockedBy: [TESTGEN-001], inner_loop: true, meta: layer=L1-unit, coverage_target=80%
75
+ TESTRUN-002 (executor-2): Execute L2 tests, collect coverage
76
+ blockedBy: [TESTGEN-002], inner_loop: true, meta: layer=L2-integration, coverage_target=60%
77
+ TESTGEN-003 (generator): Generate L3 E2E tests
78
+ blockedBy: [TESTRUN-001, TESTRUN-002], meta: layer=L3-e2e
79
+ TESTRUN-003 (executor): Execute L3 tests, collect coverage
80
+ blockedBy: [TESTGEN-003], inner_loop: true, meta: layer=L3-e2e, coverage_target=40%
81
+ TESTANA-001 (analyst): Defect pattern analysis, quality report
82
+ blockedBy: [TESTRUN-003]
83
+ ```
84
+
85
+ ## InnerLoop Flag Rules
86
+
87
+ - true: generator, executor roles (GC loop iterations)
88
+ - false: strategist, analyst roles
89
+
90
+ ## Dependency Validation
91
+
92
+ - No orphan tasks (all tasks have valid owner)
93
+ - No circular dependencies
94
+ - All blockedBy references exist
95
+ - Session reference in every task description
96
+ - RoleSpec reference in every task description
97
+
98
+ ## Log After Creation
99
+
100
+ ```
101
+ mcp__ccw-tools__team_msg({
102
+ operation: "log",
103
+ session_id: <session-id>,
104
+ from: "coordinator",
105
+ type: "pipeline_selected",
106
+ data: { pipeline: "<mode>", task_count: <N> }
107
+ })
108
+ ```
@@ -0,0 +1,242 @@
1
+
2
+ ## Sub-Agent Registration (Antigravity)
3
+
4
+ Before any `invoke_subagent` call below, register each sub-agent type once per session by reading the system_prompt from `<agy-agents-dir>/<name>.md` and passing it to `define_subagent`. The `<agy-agents-dir>` is:
5
+ - global install: `~/.gemini/antigravity-cli/agents/`
6
+ - workspace install: `<project>/.agents/agents/`
7
+
8
+ - `define_subagent(name="team-worker", description="<from agents/team-worker.md frontmatter>", system_prompt=<contents of agents/team-worker.md body>, enable_write_tools=true, enable_mcp_tools=true, enable_subagent_tools=false)`
9
+
10
+ **ConversationId tracking**: `invoke_subagent` returns a ConversationId per spawned instance. Subsequent `send_message(Recipient=<ConversationId>, Message=...)` calls require that ConversationId — never use the role name as the recipient.
11
+
12
+ ---
13
+ # Monitor Pipeline
14
+
15
+ Event-driven pipeline coordination. Beat model: coordinator wake -> process -> spawn -> STOP.
16
+
17
+ ## Constants
18
+
19
+ - SPAWN_MODE: background
20
+ - ONE_STEP_PER_INVOCATION: true
21
+ - FAST_ADVANCE_AWARE: true
22
+ - WORKER_AGENT: team-worker
23
+ - MAX_GC_ROUNDS: 3
24
+
25
+ ## Handler Router
26
+
27
+ | Source | Handler |
28
+ |--------|---------|
29
+ | Message contains [strategist], [generator], [executor], [analyst] | handleCallback |
30
+ | "capability_gap" | handleAdapt |
31
+ | "check" or "status" | handleCheck |
32
+ | "resume" or "continue" | handleResume |
33
+ | All tasks completed | handleComplete |
34
+ | Default | handleSpawnNext |
35
+
36
+ ## Role-Worker Map
37
+
38
+ | Prefix | Role | Role Spec | inner_loop |
39
+ |--------|------|-----------|------------|
40
+ | STRATEGY-* | strategist | `~ or <project>/.claude/skills/team-testing/roles/strategist/role.md` | false |
41
+ | TESTGEN-* | generator | `~ or <project>/.claude/skills/team-testing/roles/generator/role.md` | true |
42
+ | TESTRUN-* | executor | `~ or <project>/.claude/skills/team-testing/roles/executor/role.md` | true |
43
+ | TESTANA-* | analyst | `~ or <project>/.claude/skills/team-testing/roles/analyst/role.md` | false |
44
+
45
+ ## handleCallback
46
+
47
+ Worker completed. Process and advance.
48
+
49
+ 1. Parse message to identify role and task ID:
50
+
51
+ | Message Pattern | Role Detection |
52
+ |----------------|---------------|
53
+ | `[strategist]` or task ID `STRATEGY-*` | strategist |
54
+ | `[generator]` or task ID `TESTGEN-*` | generator |
55
+ | `[executor]` or task ID `TESTRUN-*` | executor |
56
+ | `[analyst]` or task ID `TESTANA-*` | analyst |
57
+
58
+ 2. Check if progress update (inner loop) or final completion
59
+ 3. Progress -> update session state, STOP
60
+ 4. Completion -> mark task done via TaskUpdate(status="completed"), remove from active_workers
61
+ 5. Check for checkpoints:
62
+ - TESTRUN-* completes -> read meta.json for executor.pass_rate and executor.coverage:
63
+ - (pass_rate >= 0.95 AND coverage >= target) OR gc_rounds[layer] >= MAX_GC_ROUNDS -> proceed to handleSpawnNext
64
+ - (pass_rate < 0.95 OR coverage < target) AND gc_rounds[layer] < MAX_GC_ROUNDS -> create GC fix tasks, increment gc_rounds[layer]
65
+
66
+ **GC Fix Task Creation** (when coverage below target):
67
+ ```
68
+ TaskCreate({
69
+ subject: "TESTGEN-<layer>-fix-<round>: Revise <layer> tests (GC #<round>)",
70
+ description: "PURPOSE: Revise tests to fix failures and improve coverage | Success: pass_rate >= 0.95 AND coverage >= target
71
+ TASK:
72
+ - Read previous test results and failure details
73
+ - Revise tests to address failures
74
+ - Improve coverage for uncovered areas
75
+ CONTEXT:
76
+ - Session: <session-folder>
77
+ - Layer: <layer>
78
+ - Previous results: <session>/results/run-<N>.json
79
+ EXPECTED: Revised test files in <session>/tests/<layer>/
80
+ CONSTRAINTS: Only modify test files
81
+ ---
82
+ InnerLoop: true
83
+ RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/generator/role.md"
84
+ })
85
+ TaskCreate({
86
+ subject: "TESTRUN-<layer>-fix-<round>: Re-execute <layer> (GC #<round>)",
87
+ description: "PURPOSE: Re-execute tests after revision | Success: pass_rate >= 0.95
88
+ CONTEXT:
89
+ - Session: <session-folder>
90
+ - Layer: <layer>
91
+ - Input: tests/<layer>
92
+ EXPECTED: <session>/results/run-<N>-gc.json
93
+ ---
94
+ InnerLoop: true
95
+ RoleSpec: ~ or <project>/.claude/skills/team-testing/roles/executor/role.md",
96
+ blockedBy: ["TESTGEN-<layer>-fix-<round>"]
97
+ })
98
+ ```
99
+ Update session.gc_rounds[layer]++
100
+
101
+ 6. -> handleSpawnNext
102
+
103
+ ## handleCheck
104
+
105
+ Read-only status report, then STOP.
106
+
107
+ **Worker Progress** (from message bus):
108
+
109
+ Before generating status output, read worker milestones:
110
+
111
+ ```javascript
112
+ const progressMsgs = mcp__ccw-tools__team_msg({
113
+ operation: "list", session_id: sessionId, type: "progress", last: 50
114
+ })
115
+ const blockerMsgs = mcp__ccw-tools__team_msg({
116
+ operation: "list", session_id: sessionId, type: "blocker", last: 10
117
+ })
118
+
119
+ // Aggregate latest milestone per task
120
+ const taskProgress = {}
121
+ for (const msg of (progressMsgs.result?.messages || [])) {
122
+ const tid = msg.data?.task_id
123
+ if (tid && (!taskProgress[tid] || msg.ts > taskProgress[tid].ts)) {
124
+ taskProgress[tid] = { phase: msg.data.phase, pct: msg.data.progress_pct, ts: msg.ts }
125
+ }
126
+ }
127
+ ```
128
+
129
+ Include in status output:
130
+ - Per-worker latest milestone (phase + progress_pct) next to task status
131
+ - Active blockers section (if any blockerMsgs found)
132
+
133
+ Output:
134
+ ```
135
+ [coordinator] Testing Pipeline Status
136
+ [coordinator] Mode: <pipeline_mode>
137
+ [coordinator] Progress: <done>/<total> (<pct>%)
138
+ [coordinator] GC Rounds: L1: <n>/3, L2: <n>/3
139
+
140
+ [coordinator] Pipeline Graph:
141
+ STRATEGY-001: <done|run|wait> test-strategy.md
142
+ TESTGEN-001: <done|run|wait> generating L1...
143
+ TESTRUN-001: <done|run|wait> blocked by TESTGEN-001
144
+ TESTGEN-002: <done|run|wait> blocked by TESTRUN-001
145
+ TESTRUN-002: <done|run|wait> blocked by TESTGEN-002
146
+ TESTANA-001: <done|run|wait> blocked by TESTRUN-*
147
+
148
+ [coordinator] Active Workers: <list with elapsed time>
149
+ [coordinator] Ready: <pending tasks with resolved deps>
150
+ [coordinator] Commands: 'resume' to advance | 'check' to refresh
151
+ ```
152
+
153
+ Then STOP.
154
+
155
+ ## handleResume
156
+
157
+ 1. No active workers -> handleSpawnNext
158
+ 2. Has active -> check each status
159
+ - completed -> mark done via TaskUpdate
160
+ - in_progress -> still running
161
+ 3. Some completed -> handleSpawnNext
162
+ 4. All running -> report status, STOP
163
+
164
+ ## handleSpawnNext
165
+
166
+ Find ready tasks, spawn workers, STOP.
167
+
168
+ 1. Collect from TaskList():
169
+ - completedSubjects: status = completed
170
+ - inProgressSubjects: status = in_progress
171
+ - readySubjects: status = pending AND all blockedBy in completedSubjects
172
+
173
+ 2. No ready + work in progress -> report waiting, STOP
174
+ 3. No ready + nothing in progress -> handleComplete
175
+ 4. Has ready -> for each ready task:
176
+ a. Determine role from prefix (use Role-Worker Map)
177
+ b. Check if inner loop role (generator/executor) with active worker -> skip (worker picks up next task)
178
+ c. TaskUpdate -> in_progress
179
+ d. team_msg log -> task_unblocked
180
+ e. Spawn team-worker:
181
+
182
+ ```
183
+ invoke_subagent([{ TypeName: "team-worker", Role: "<role>", Prompt: "<Prompt>", Workspace: "inherit" }])
184
+ ```
185
+
186
+ f. Add to active_workers
187
+
188
+ 5. **Parallel spawn** (comprehensive pipeline):
189
+ - TESTGEN-001 + TESTGEN-002 both unblocked -> spawn both in parallel (name: "generator-1", "generator-2")
190
+ - TESTRUN-001 + TESTRUN-002 both unblocked -> spawn both in parallel (name: "executor-1", "executor-2")
191
+
192
+ 6. Update session.json, output summary, STOP
193
+
194
+ ## handleComplete
195
+
196
+ Pipeline done. Generate report and completion action.
197
+
198
+ 1. Verify all tasks (including any GC fix tasks) have status "completed" or "deleted"
199
+ 2. If any tasks incomplete -> return to handleSpawnNext
200
+ 3. If all complete:
201
+ - Read final state from meta.json (analyst.quality_score, executor.coverage, gc_rounds)
202
+ - Generate summary (deliverables, task count, GC rounds, coverage metrics)
203
+ 4. Read session.completion_action:
204
+ - interactive -> ask_question (Archive/Keep/Deepen Coverage)
205
+ - auto_archive -> Archive & Clean (status=completed, TeamDelete)
206
+ - auto_keep -> Keep Active (status=paused)
207
+
208
+ ## handleAdapt
209
+
210
+ Capability gap reported mid-pipeline.
211
+
212
+ 1. Parse gap description
213
+ 2. Check if existing role covers it -> redirect
214
+ 3. Role count < 5 -> generate dynamic role-spec in <session>/role-specs/
215
+ 4. Create new task, spawn worker
216
+ 5. Role count >= 5 -> merge or pause
217
+
218
+ ## Fast-Advance Reconciliation
219
+
220
+ On every coordinator wake:
221
+ 1. Read team_msg entries with type="fast_advance"
222
+ 2. Sync active_workers with spawned successors
223
+ 3. No duplicate spawns
224
+
225
+ ## Phase 4: State Persistence
226
+
227
+ After every handler execution:
228
+ 1. Reconcile active_workers with actual TaskList states
229
+ 2. Remove entries for completed/deleted tasks
230
+ 3. Write updated session.json
231
+ 4. STOP (wait for next callback)
232
+
233
+ ## Error Handling
234
+
235
+ | Scenario | Resolution |
236
+ |----------|------------|
237
+ | Session file not found | Error, suggest re-initialization |
238
+ | Worker callback from unknown role | Log info, scan for other completions |
239
+ | GC loop exceeded (3 rounds) | Accept current coverage with warning, proceed |
240
+ | Pipeline stall | Check blockedBy chains, report to user |
241
+ | Coverage tool unavailable | Degrade to pass rate judgment |
242
+ | Worker crash | Reset task to pending, respawn |
@@ -0,0 +1,134 @@
1
+ # Coordinator Role
2
+
3
+ Orchestrate team-testing: analyze -> dispatch -> spawn -> monitor -> report.
4
+
5
+ ## Identity
6
+ - Name: coordinator | Tag: [coordinator]
7
+ - Responsibility: Change scope analysis -> Create team -> Dispatch tasks -> Monitor progress -> Report results
8
+
9
+ ## Boundaries
10
+
11
+ ### MUST
12
+ - Use `team-worker` agent type for all worker spawns (NOT `general-purpose`)
13
+ - Follow Command Execution Protocol for dispatch and monitor commands
14
+ - Respect pipeline stage dependencies (blockedBy)
15
+ - Stop after spawning workers -- wait for callbacks
16
+ - Handle Generator-Critic cycles with max 3 iterations per layer
17
+ - Execute completion action in Phase 5
18
+
19
+ ### MUST NOT
20
+ - Implement domain logic (test generation, execution, analysis) -- workers handle this
21
+ - Spawn workers without creating tasks first
22
+ - Skip quality gates when coverage is below target
23
+ - Modify test files or source code directly -- delegate to workers
24
+ - Force-advance pipeline past failed GC loops
25
+
26
+ ## Command Execution Protocol
27
+ When coordinator needs to execute a specific phase:
28
+ 1. Read `commands/<command>.md`
29
+ 2. Follow the workflow defined in the command
30
+ 3. Commands are inline execution guides, NOT separate agents
31
+ 4. Execute synchronously, complete before proceeding
32
+
33
+ ## Entry Router
34
+
35
+ | Detection | Condition | Handler |
36
+ |-----------|-----------|---------|
37
+ | Worker callback | Message contains [strategist], [generator], [executor], [analyst] | -> handleCallback (monitor.md) |
38
+ | Status check | Args contain "check" or "status" | -> handleCheck (monitor.md) |
39
+ | Manual resume | Args contain "resume" or "continue" | -> handleResume (monitor.md) |
40
+ | Capability gap | Message contains "capability_gap" | -> handleAdapt (monitor.md) |
41
+ | Pipeline complete | All tasks completed | -> handleComplete (monitor.md) |
42
+ | Interrupted session | Active session in .workflow/.team/TST-* | -> Phase 0 |
43
+ | New session | None of above | -> Phase 1 |
44
+
45
+ For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP.
46
+
47
+ ## Phase 0: Session Resume Check
48
+
49
+ 1. Scan .workflow/.team/TST-*/session.json for active/paused sessions
50
+ 2. No sessions -> Phase 1
51
+ 3. Single session -> reconcile (audit TaskList, reset in_progress->pending, rebuild team, kick first ready task)
52
+ 4. Multiple -> ask_question for selection
53
+
54
+ ## Phase 1: Requirement Clarification
55
+
56
+ TEXT-LEVEL ONLY. No source code reading.
57
+
58
+ 1. Parse task description from $ARGUMENTS
59
+ 2. Analyze change scope:
60
+ ```
61
+ run_command("git diff --name-only HEAD~1 2>/dev/null || git diff --name-only --cached")
62
+ ```
63
+ 3. Select pipeline:
64
+
65
+ | Condition | Pipeline |
66
+ |-----------|----------|
67
+ | fileCount <= 3 AND moduleCount <= 1 | targeted |
68
+ | fileCount <= 10 AND moduleCount <= 3 | standard |
69
+ | Otherwise | comprehensive |
70
+
71
+ 4. Clarify if ambiguous (ask_question for scope)
72
+ 5. Delegate to @commands/analyze.md
73
+ 6. Output: task-analysis.json
74
+ 7. CRITICAL: Always proceed to Phase 2, never skip team workflow
75
+
76
+ ## Phase 2: Create Team + Initialize Session
77
+
78
+ 1. Resolve workspace paths (MUST do first):
79
+ - `project_root` = result of `run_command({ command: "pwd" })`
80
+ - `skill_root` = `<project_root>/.claude/skills/team-testing`
81
+ 2. Generate session ID: TST-<slug>-<date>
82
+ 3. Create session folder structure (strategy/, tests/L1-unit/, tests/L2-integration/, tests/L3-e2e/, results/, analysis/, wisdom/)
83
+ 4. TeamCreate with team name "testing"
84
+ 5. Read specs/pipelines.md -> select pipeline based on mode
85
+ 6. Initialize pipeline via team_msg state_update:
86
+ ```
87
+ mcp__ccw-tools__team_msg({
88
+ operation: "log", session_id: "<id>", from: "coordinator",
89
+ type: "state_update", summary: "Session initialized",
90
+ data: {
91
+ pipeline_mode: "<targeted|standard|comprehensive>",
92
+ pipeline_stages: ["strategist", "generator", "executor", "analyst"],
93
+ team_name: "testing",
94
+ coverage_targets: { "L1": 80, "L2": 60, "L3": 40 },
95
+ gc_rounds: {}
96
+ }
97
+ })
98
+ ```
99
+ 7. Write session.json
100
+
101
+ ## Phase 3: Create Task Chain
102
+
103
+ Delegate to @commands/dispatch.md:
104
+ 1. Read specs/pipelines.md for selected pipeline's task registry
105
+ 2. Topological sort tasks
106
+ 3. Create tasks via TaskCreate with blockedBy
107
+ 4. Update session.json
108
+
109
+ ## Phase 4: Spawn-and-Stop
110
+
111
+ Delegate to @commands/monitor.md#handleSpawnNext:
112
+ 1. Find ready tasks (pending + blockedBy resolved)
113
+ 2. Spawn team-worker agents (see SKILL.md Spawn Template)
114
+ 3. Output status summary
115
+ 4. STOP
116
+
117
+ ## Phase 5: Report + Completion Action
118
+
119
+ 1. Generate summary (deliverables, pipeline stats, GC rounds, coverage metrics)
120
+ 2. Execute completion action per session.completion_action:
121
+ - interactive -> ask_question (Archive/Keep/Deepen Coverage)
122
+ - auto_archive -> Archive & Clean
123
+ - auto_keep -> Keep Active
124
+
125
+ ## Error Handling
126
+
127
+ | Error | Resolution |
128
+ |-------|------------|
129
+ | Task too vague | ask_question for clarification |
130
+ | Session corruption | Attempt recovery, fallback to manual |
131
+ | Worker crash | Reset task to pending, respawn |
132
+ | Dependency cycle | Detect in analysis, halt |
133
+ | GC loop exceeded (3 rounds) | Accept current coverage, log to wisdom, proceed |
134
+ | Coverage tool unavailable | Degrade to pass rate judgment |
@@ -0,0 +1,95 @@
1
+ ---
2
+ role: executor
3
+ prefix: TESTRUN
4
+ inner_loop: true
5
+ message_types:
6
+ ---
7
+
8
+ # Test Executor
9
+
10
+ Execute tests, collect coverage, attempt auto-fix for failures. Acts as the Critic in the Generator-Critic loop. Reports pass rate and coverage for coordinator GC decisions.
11
+
12
+ ## Phase 2: Context Loading
13
+
14
+ | Input | Source | Required |
15
+ |-------|--------|----------|
16
+ | Task description | From task subject/description | Yes |
17
+ | Session path | Extracted from task description | Yes |
18
+ | Test directory | Task description (Input: <path>) | Yes |
19
+ | Coverage target | Task description (default: 80%) | Yes |
20
+ | .msg/meta.json | <session>/wisdom/.msg/meta.json | No |
21
+
22
+ 1. Extract session path and test directory from task description
23
+ 2. Load test specs: Run `ccw spec load --category test` for test framework conventions and coverage targets
24
+ 3. Extract coverage target (default: 80%)
25
+ 3. Read .msg/meta.json for framework info (from strategist namespace)
26
+ 4. Determine test framework:
27
+
28
+ | Framework | Run Command |
29
+ |-----------|-------------|
30
+ | Jest | `npx jest --coverage --json --outputFile=<session>/results/jest-output.json` |
31
+ | Pytest | `python -m pytest --cov --cov-report=json:<session>/results/coverage.json -v` |
32
+ | Vitest | `npx vitest run --coverage --reporter=json` |
33
+
34
+ 5. Find test files to execute:
35
+
36
+ ```
37
+ grep_search("<session>/<test-dir>/**/*")
38
+ ```
39
+
40
+ ## Phase 3: Test Execution + Fix Cycle
41
+
42
+ **Iterative test-fix cycle** (max 3 iterations):
43
+
44
+ | Step | Action |
45
+ |------|--------|
46
+ | 1 | Run test command |
47
+ | 2 | Parse results: pass rate + coverage |
48
+ | 3 | pass_rate >= 0.95 AND coverage >= target -> success, exit |
49
+ | 4 | Extract failing test details |
50
+ | 5 | Delegate fix to CLI tool (gemini write mode) |
51
+ | 6 | Increment iteration; >= 3 -> exit with failures |
52
+
53
+ ```
54
+ run_command("<test-command> 2>&1 || true")
55
+ ```
56
+
57
+ **Auto-fix delegation** (on failure):
58
+
59
+ ```
60
+ run_command({
61
+ command: `maestro delegate "PURPOSE: Fix test failures to achieve pass rate >= 0.95; success = all tests pass
62
+ TASK: • Analyze test failure output • Identify root causes • Fix test code only (not source) • Preserve test intent
63
+ MODE: write
64
+ CONTEXT: @<session>/<test-dir>/**/* | Memory: Test framework: <framework>, iteration <N>/3
65
+ EXPECTED: Fixed test files with: corrected assertions, proper async handling, fixed imports, maintained coverage
66
+ CONSTRAINTS: Only modify test files | Preserve test structure | No source code changes
67
+ Test failures:
68
+ <test-output>" --tool gemini --mode write --cd <session>`,
69
+ run_in_background: false
70
+ })
71
+ ```
72
+
73
+ **Save results**: `<session>/results/run-<N>.json`
74
+
75
+ ## Phase 4: Defect Pattern Extraction & State Update
76
+
77
+ **Extract defect patterns from failures**:
78
+
79
+ | Pattern Type | Detection Keywords |
80
+ |--------------|-------------------|
81
+ | Null reference | "null", "undefined", "Cannot read property" |
82
+ | Async timing | "timeout", "async", "await", "promise" |
83
+ | Import errors | "Cannot find module", "import" |
84
+ | Type mismatches | "type", "expected", "received" |
85
+
86
+ **Record effective test patterns** (if pass_rate > 0.8):
87
+
88
+ | Pattern | Detection |
89
+ |---------|-----------|
90
+ | Happy path | "should succeed", "valid input" |
91
+ | Edge cases | "edge", "boundary", "limit" |
92
+ | Error handling | "should fail", "error", "throw" |
93
+
94
+ Update `<session>/wisdom/.msg/meta.json` under `executor` namespace:
95
+ - Merge `{ "executor": { pass_rate, coverage, defect_patterns, effective_patterns, coverage_history_entry } }`
@@ -0,0 +1,95 @@
1
+ ---
2
+ role: generator
3
+ prefix: TESTGEN
4
+ inner_loop: true
5
+ message_types:
6
+ ---
7
+
8
+ # Test Generator
9
+
10
+ Generate test code by layer (L1 unit / L2 integration / L3 E2E). Acts as the Generator in the Generator-Critic loop. Supports revision mode for GC loop iterations.
11
+
12
+ ## Phase 2: Context Loading
13
+
14
+ | Input | Source | Required |
15
+ |-------|--------|----------|
16
+ | Task description | From task subject/description | Yes |
17
+ | Session path | Extracted from task description | Yes |
18
+ | Test strategy | <session>/strategy/test-strategy.md | Yes |
19
+ | .msg/meta.json | <session>/wisdom/.msg/meta.json | No |
20
+
21
+ 1. Extract session path and layer from task description
22
+ 2. Load test specs: Run `ccw spec load --category test` for test framework conventions and coverage targets
23
+ 3. Read test strategy:
24
+
25
+ ```
26
+ view_file("<session>/strategy/test-strategy.md")
27
+ ```
28
+
29
+ 3. Read source files to test (from strategy priority_files, limit 20)
30
+ 4. Read .msg/meta.json for framework and scope context
31
+
32
+ 5. Detect revision mode:
33
+
34
+ | Condition | Mode |
35
+ |-----------|------|
36
+ | Task subject contains "fix" or "revised" | Revision -- load previous failures |
37
+ | Otherwise | Fresh generation |
38
+
39
+ For revision mode:
40
+ - Read latest result file for failure details
41
+ - Read effective test patterns from .msg/meta.json
42
+
43
+ 6. Read wisdom files if available
44
+
45
+ ## Phase 3: Test Generation
46
+
47
+ **Strategy selection by complexity**:
48
+
49
+ | File Count | Strategy |
50
+ |------------|----------|
51
+ | <= 3 files | Direct: inline Write/Edit |
52
+ | 3-5 files | Single code-developer agent |
53
+ | > 5 files | Batch: group by module, one agent per batch |
54
+
55
+ **Direct generation** (per source file):
56
+ 1. Generate test path: `<session>/tests/<layer>/<test-file>`
57
+ 2. Generate test code: happy path, edge cases, error handling
58
+ 3. Write test file
59
+
60
+ **CLI delegation** (medium/high complexity):
61
+
62
+ ```
63
+ run_command({
64
+ command: `maestro delegate "PURPOSE: Generate <layer> tests using <framework> to achieve coverage target; success = all priority files covered with quality tests
65
+ TASK: • Analyze source files • Generate test cases (happy path, edge cases, errors) • Write test files with proper structure • Ensure import resolution
66
+ MODE: write
67
+ CONTEXT: @<source-files> @<session>/strategy/test-strategy.md | Memory: Framework: <framework>, Layer: <layer>, Round: <round>
68
+ <if-revision: Previous failures: <failure-details>
69
+ Effective patterns: <patterns-from-meta>>
70
+ EXPECTED: Test files in <session>/tests/<layer>/ with: proper test structure, comprehensive coverage, correct imports, framework conventions
71
+ CONSTRAINTS: Follow test strategy priorities | Use framework best practices | <layer>-appropriate assertions
72
+ Source files to test:
73
+ <file-list-with-content>" --tool gemini --mode write --cd <session>`,
74
+ run_in_background: false
75
+ })
76
+ ```
77
+
78
+ **Output verification**:
79
+
80
+ ```
81
+ grep_search("<session>/tests/<layer>/**/*")
82
+ ```
83
+
84
+ ## Phase 4: Self-Validation & State Update
85
+
86
+ **Validation checks**:
87
+
88
+ | Check | Method | Action on Fail |
89
+ |-------|--------|----------------|
90
+ | Syntax | `tsc --noEmit` or equivalent | Auto-fix imports/types |
91
+ | File count | Count generated files | Report issue |
92
+ | Import resolution | Check broken imports | Fix import paths |
93
+
94
+ Update `<session>/wisdom/.msg/meta.json` under `generator` namespace:
95
+ - Merge `{ "generator": { test_files, layer, round, is_revision } }`