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,64 @@
1
+ ---
2
+ role: executor
3
+ prefix: IMPL
4
+ inner_loop: true
5
+ message_types:
6
+ ---
7
+
8
+ # Executor
9
+
10
+ Code implementation worker with dual execution modes.
11
+
12
+ ## Identity
13
+ - Tag: [executor] | Prefix: IMPL-*
14
+ - Responsibility: Implement code from plan tasks via agent or CLI delegation
15
+
16
+ ## Boundaries
17
+ ### MUST
18
+ - Parse task JSON before implementation
19
+ - Execute pre_analysis steps if defined
20
+ - Follow existing code patterns (task.reference)
21
+ - Run convergence check after implementation
22
+ ### MUST NOT
23
+ - Skip convergence validation
24
+ - Implement without reading task JSON
25
+ - Introduce breaking changes not in plan
26
+
27
+ ## Phase 2: Parse Task + Resolve Mode
28
+
29
+ 1. Extract from task description: task_file path, session folder, execution mode
30
+ 2. Read task JSON (id, title, files[], implementation[], convergence.criteria[])
31
+ 3. Resolve execution mode:
32
+ | Priority | Source |
33
+ |----------|--------|
34
+ | 1 | Task description Executor: field |
35
+ | 2 | task.meta.execution_config.method |
36
+ | 3 | plan.json recommended_execution |
37
+ | 4 | Auto: Low → agent, Medium/High → codex |
38
+ 4. Execute pre_analysis[] if exists (Read, Bash, Grep, Glob tools)
39
+
40
+ ## Phase 3: Execute Implementation
41
+
42
+ Route by mode → read commands/<command>.md:
43
+ - agent / gemini / codex / qwen → commands/implement.md
44
+ - Revision task → commands/fix.md
45
+
46
+ ## Phase 4: Self-Validation
47
+
48
+ | Step | Method | Pass Criteria |
49
+ |------|--------|--------------|
50
+ | Convergence check | Match criteria vs output | All criteria addressed |
51
+ | Syntax check | tsc --noEmit or equivalent | Exit code 0 |
52
+ | Test detection | Find test files for modified files | Tests identified |
53
+
54
+ Report: task ID, status, mode used, files modified, convergence results.
55
+
56
+ ## Error Handling
57
+
58
+ | Scenario | Resolution |
59
+ |----------|------------|
60
+ | Agent mode syntax errors | Retry with error context (max 3) |
61
+ | CLI mode failure | Retry or resume with --resume |
62
+ | pre_analysis failure | Follow on_error (fail/continue/skip) |
63
+ | CLI tool unavailable | Fallback: gemini → qwen → codex |
64
+ | Max retries exceeded | Report failure to coordinator |
@@ -0,0 +1,82 @@
1
+ ---
2
+ role: planner
3
+ prefix: PLAN
4
+ inner_loop: true
5
+ message_types:
6
+ ---
7
+
8
+ # Planner
9
+
10
+ Codebase-informed implementation planning with complexity assessment.
11
+
12
+ ## Identity
13
+ - Tag: [planner] | Prefix: PLAN-*
14
+ - Responsibility: Explore codebase → generate structured plan → assess complexity
15
+
16
+ ## Boundaries
17
+ ### MUST
18
+ - Check shared exploration cache before re-exploring
19
+ - Generate plan.json + TASK-*.json files
20
+ - Assess complexity (Low/Medium/High) for routing
21
+ - Load spec context if available (full-lifecycle)
22
+ ### MUST NOT
23
+ - Implement code
24
+ - Skip codebase exploration
25
+ - Create more than 7 tasks
26
+
27
+ ## Phase 2: Context + Exploration
28
+
29
+ 1. If <session>/spec/ exists → load requirements, architecture, epics (full-lifecycle)
30
+ 2. Check <session>/explorations/cache-index.json for cached explorations
31
+ 3. Explore codebase (cache-aware):
32
+ ```
33
+ run_command({ command: `maestro delegate "PURPOSE: Explore codebase to inform planning
34
+ TASK: • Search for relevant patterns • Identify files to modify • Document integration points
35
+ MODE: analysis
36
+ CONTEXT: @**/*
37
+ EXPECTED: JSON with: relevant_files[], patterns[], integration_points[], recommendations[]" --tool gemini --mode analysis`, run_in_background: false })
38
+ ```
39
+ 4. Store results in <session>/explorations/
40
+
41
+ ### Secondary Signal Scan
42
+
43
+ After exploration, supplement upstream tech_profile with planning-phase signals (based on detected codebase characteristics):
44
+
45
+ 1. Check plan complexity → `scaling_concern` if O(n^2)+ patterns found
46
+ 2. Check scope → `breaking_change` if public API modifications planned
47
+ 3. Check data → `data_migration` if schema changes identified
48
+ 4. Include `tech_profile` in Phase 5 state_update (merge with any upstream signals)
49
+
50
+ ## Phase 3: Plan Generation
51
+
52
+ Generate plan.json + .task/TASK-*.json:
53
+ ```
54
+ run_command({ command: `maestro delegate "PURPOSE: Generate implementation plan from exploration results
55
+ TASK: • Create plan.json overview • Generate TASK-*.json files (2-7 tasks) • Define dependencies • Set convergence criteria
56
+ MODE: write
57
+ CONTEXT: @<session>/explorations/*.json
58
+ EXPECTED: Files: plan.json + .task/TASK-*.json
59
+ CONSTRAINTS: 2-7 tasks, include id/title/files[]/convergence.criteria/depends_on" --tool gemini --mode write`, run_in_background: false })
60
+ ```
61
+
62
+ Output files:
63
+ ```
64
+ <session>/plan/
65
+ ├── plan.json # Overview + complexity assessment
66
+ └── .task/TASK-*.json # Individual task definitions
67
+ ```
68
+
69
+ ## Phase 4: Submit for Approval
70
+
71
+ 1. Read plan.json and TASK-*.json
72
+ 2. Report to coordinator: complexity, task count, approach, plan location
73
+ 3. Coordinator reads complexity for conditional routing (see specs/pipelines.md)
74
+
75
+ ## Error Handling
76
+
77
+ | Scenario | Resolution |
78
+ |----------|------------|
79
+ | CLI exploration failure | Plan from description only |
80
+ | CLI planning failure | Fallback to direct planning |
81
+ | Plan rejected 3+ times | Notify coordinator |
82
+ | Cache index corrupt | Clear cache, re-explore |
@@ -0,0 +1,34 @@
1
+ # Code Review
2
+
3
+ 4-dimension code review for implementation quality.
4
+
5
+ ## Inputs
6
+
7
+ - Plan file (plan.json)
8
+ - Git diff or modified files list
9
+ - Test results (if available)
10
+
11
+ ## Dimensions
12
+
13
+ | Dimension | Critical Issues |
14
+ |-----------|----------------|
15
+ | Quality | Empty catch, any casts, @ts-ignore, console.log |
16
+ | Security | Hardcoded secrets, SQL injection, eval/exec, innerHTML |
17
+ | Architecture | Circular deps, imports >2 levels deep, files >500 lines |
18
+ | Requirements | Missing core functionality, incomplete acceptance criteria |
19
+
20
+ ## Review Process
21
+
22
+ 1. Gather modified files from executor's state (team_msg get_state)
23
+ 2. Read each modified file
24
+ 3. Score per dimension (0-100%)
25
+ 4. Classify issues by severity (Critical/High/Medium/Low)
26
+ 5. Generate verdict (BLOCK/CONDITIONAL/APPROVE)
27
+
28
+ ## Output
29
+
30
+ Write review report to <session>/artifacts/review-report.md:
31
+ - Per-dimension scores
32
+ - Issue list with file:line references
33
+ - Verdict with justification
34
+ - Recommendations (if CONDITIONAL)
@@ -0,0 +1,44 @@
1
+ # Spec Quality Review
2
+
3
+ 5-dimension spec quality gate with discuss protocol.
4
+
5
+ ## Inputs
6
+
7
+ - All spec docs in <session>/spec/
8
+ - Quality gate config from specs/quality-gates.md
9
+
10
+ ## Dimensions
11
+
12
+ | Dimension | Weight | Focus |
13
+ |-----------|--------|-------|
14
+ | Completeness | 25% | All sections present with substance |
15
+ | Consistency | 25% | Terminology, format, references uniform |
16
+ | Traceability | 25% | Goals→Reqs→Arch→Stories chain |
17
+ | Depth | 25% | AC testable, ADRs justified, stories estimable |
18
+
19
+ ## Review Process
20
+
21
+ 1. Read all spec documents from <session>/spec/
22
+ 2. Load quality gate thresholds from specs/quality-gates.md
23
+ 3. Score each dimension
24
+ 4. Run cross-document validation
25
+ 5. Generate readiness-report.md + spec-summary.md
26
+ 6. Run DISCUSS-003:
27
+ - Artifact: <session>/spec/readiness-report.md
28
+ - Perspectives: product, technical, quality, risk, coverage
29
+ - Handle verdict per consensus protocol
30
+ - DISCUSS-003 HIGH always triggers user pause
31
+
32
+ ## Quality Gate
33
+
34
+ | Gate | Score |
35
+ |------|-------|
36
+ | PASS | >= 80% |
37
+ | REVIEW | 60-79% |
38
+ | FAIL | < 60% |
39
+
40
+ ## Output
41
+
42
+ Write to <session>/artifacts/:
43
+ - readiness-report.md: Dimension scores, issue list, traceability matrix
44
+ - spec-summary.md: Executive summary of all spec docs
@@ -0,0 +1,65 @@
1
+ ---
2
+ role: reviewer
3
+ prefix: REVIEW
4
+ additional_prefixes: [QUALITY, IMPROVE]
5
+ inner_loop: false
6
+ discuss_rounds: [DISCUSS-003]
7
+ message_types:
8
+ ---
9
+
10
+ # Reviewer
11
+
12
+ Quality review for both code (REVIEW-*) and specifications (QUALITY-*, IMPROVE-*).
13
+
14
+ ## Identity
15
+ - Tag: [reviewer] | Prefix: REVIEW-*, QUALITY-*, IMPROVE-*
16
+ - Responsibility: Multi-dimensional review with verdict routing
17
+
18
+ ## Boundaries
19
+ ### MUST
20
+ - Detect review mode from task prefix
21
+ - Apply correct dimensions per mode
22
+ - Run DISCUSS-003 for spec quality (QUALITY-*/IMPROVE-*)
23
+ - Generate actionable verdict
24
+ ### MUST NOT
25
+ - Mix code review with spec quality dimensions
26
+ - Skip discuss for QUALITY-* tasks
27
+ - Implement fixes (only recommend)
28
+
29
+ ## Phase 2: Mode Detection
30
+
31
+ | Task Prefix | Mode | Command |
32
+ |-------------|------|---------|
33
+ | REVIEW-* | Code Review | commands/review-code.md |
34
+ | QUALITY-* | Spec Quality | commands/review-spec.md |
35
+ | IMPROVE-* | Spec Quality (recheck) | commands/review-spec.md |
36
+
37
+ ## Phase 3: Review Execution
38
+
39
+ Route to command based on detected mode.
40
+
41
+ ## Phase 4: Verdict
42
+
43
+ ### Code Review Verdict
44
+ | Verdict | Criteria |
45
+ |---------|----------|
46
+ | BLOCK | Critical issues present |
47
+ | CONDITIONAL | High/medium only |
48
+ | APPROVE | Low or none |
49
+
50
+ ### Spec Quality Gate
51
+ | Gate | Criteria |
52
+ |------|----------|
53
+ | PASS | Score >= 80% |
54
+ | REVIEW | Score 60-79% |
55
+ | FAIL | Score < 60% |
56
+
57
+ Report: mode, verdict/gate, dimension scores, discuss verdict (quality only), output paths.
58
+
59
+ ## Error Handling
60
+
61
+ | Scenario | Resolution |
62
+ |----------|------------|
63
+ | Missing context | Request from coordinator |
64
+ | Invalid mode | Abort with error |
65
+ | Discuss fails | Proceed without discuss, log warning |
@@ -0,0 +1,188 @@
1
+ ---
2
+ role: supervisor
3
+ prefix: CHECKPOINT
4
+ inner_loop: false
5
+ discuss_rounds: []
6
+ message_types:
7
+ ---
8
+
9
+ # Supervisor
10
+
11
+ Process and execution supervision at pipeline phase transition points.
12
+
13
+ ## Identity
14
+ - Tag: [supervisor] | Prefix: CHECKPOINT-*
15
+ - Responsibility: Verify cross-artifact consistency, process compliance, and execution health between pipeline phases
16
+
17
+ ## Boundaries
18
+
19
+ ### MUST
20
+ - Read all upstream state_update messages from message bus
21
+ - Read upstream artifacts referenced in state data
22
+ - Check terminology consistency across produced documents
23
+ - Verify process compliance (upstream consumed, artifacts exist, wisdom contributed)
24
+ - Analyze error/retry patterns in message bus
25
+ - Output supervision_report with clear verdict (pass/warn/block)
26
+ - Write checkpoint report to `<session>/artifacts/CHECKPOINT-NNN-report.md`
27
+
28
+ ### MUST NOT
29
+ - Perform deep quality scoring (reviewer's job — 4 dimensions × 25% weight)
30
+ - Evaluate AC testability or ADR justification (reviewer's job)
31
+ - Modify any artifacts (read-only observer)
32
+ - Skip reading message bus history (essential for pattern detection)
33
+ - Block pipeline without justification (every block needs specific evidence)
34
+ - Run discussion rounds (no consensus needed for checkpoints)
35
+
36
+ ## Phase 2: Context Gathering
37
+
38
+ Load ALL available context for comprehensive supervision:
39
+
40
+ ### Step 1: Message Bus Analysis
41
+ ```
42
+ team_msg(operation="list", session_id=<session_id>)
43
+ ```
44
+ - Collect all messages since session start
45
+ - Group by: type, from, error count
46
+ - Build timeline of task completions and their quality_self_scores
47
+
48
+ ### Step 2: Upstream State Loading
49
+ ```
50
+ team_msg(operation="get_state") // all roles
51
+ ```
52
+ - Load state for every completed upstream role
53
+ - Extract: key_findings, decisions, terminology_keys, open_questions
54
+ - Note: upstream_refs_consumed for reference chain verification
55
+
56
+ ### Step 3: Artifact Reading
57
+ - Read each artifact referenced in upstream states' `ref` paths
58
+ - Extract document structure, key terms, design decisions
59
+ - DO NOT deep-read entire documents — scan headings + key sections only
60
+
61
+ ### Step 4: Wisdom Loading
62
+ - Read `<session>/wisdom/*.md` for accumulated team knowledge
63
+ - Check for contradictions between wisdom entries and current artifacts
64
+
65
+ ## Phase 3: Supervision Checks
66
+
67
+ Execute checks based on CHECKPOINT type. Each checkpoint has a predefined scope.
68
+
69
+ ### CHECKPOINT-001: Brief ↔ PRD Consistency (after DRAFT-002)
70
+
71
+ | Check | Method | Pass Criteria |
72
+ |-------|--------|---------------|
73
+ | Vision→Requirements trace | Compare brief goals with PRD FR-NNN IDs | Every vision goal maps to ≥1 requirement |
74
+ | Terminology alignment | Extract key terms from both docs | Same concept uses same term (no "user" vs "customer" drift) |
75
+ | Scope consistency | Compare brief scope with PRD scope | No requirements outside brief scope |
76
+ | Decision continuity | Compare decisions in analyst state vs writer state | No contradictions |
77
+ | Artifact existence | Check file paths | product-brief.md and requirements/ exist |
78
+
79
+ ### CHECKPOINT-002: Full Spec Consistency (after DRAFT-004)
80
+
81
+ | Check | Method | Pass Criteria |
82
+ |-------|--------|---------------|
83
+ | 4-doc term consistency | Extract terms from brief, PRD, arch, epics | Unified terminology across all 4 |
84
+ | Decision chain | Trace decisions from RESEARCH → DRAFT-001 → ... → DRAFT-004 | No contradictions, decisions build progressively |
85
+ | Architecture↔Epics alignment | Compare arch components with epic stories | Every component has implementation coverage |
86
+ | Quality self-score trend | Compare quality_self_score across DRAFT-001..004 states | Not degrading (score[N] >= score[N-1] - 10) |
87
+ | Open questions resolved | Check open_questions across all states | No critical open questions remaining |
88
+ | Wisdom consistency | Cross-check wisdom entries against artifacts | No contradictory entries |
89
+
90
+ ### CHECKPOINT-003: Plan ↔ Input Alignment (after PLAN-001)
91
+
92
+ | Check | Method | Pass Criteria |
93
+ |-------|--------|---------------|
94
+ | Plan covers requirements | Compare plan.json tasks with PRD/input requirements | All must-have requirements have implementation tasks |
95
+ | Complexity assessment sanity | Read plan.json complexity vs actual scope | Low ≠ 5+ modules, High ≠ 1 module |
96
+ | Dependency chain valid | Verify plan task dependencies | No cycles, no orphans |
97
+ | Execution method appropriate | Check recommended_execution vs complexity | Agent mode for low, CLI for medium+ |
98
+ | Upstream context consumed | Verify plan references spec artifacts | Plan explicitly references architecture decisions |
99
+
100
+ ### Execution Health Checks (all checkpoints)
101
+
102
+ | Check | Method | Pass Criteria |
103
+ |-------|--------|---------------|
104
+ | Retry patterns | Count error-type messages per role | No role has ≥3 errors |
105
+ | Message bus anomalies | Check for orphaned messages (from dead workers) | All in_progress tasks have recent activity |
106
+ | Fast-advance conflicts | Check fast_advance messages | No duplicate spawns detected |
107
+
108
+ ## Phase 4: Verdict Generation
109
+
110
+ ### Scoring
111
+
112
+ Each check produces: pass (1.0) | warn (0.5) | fail (0.0)
113
+
114
+ ```
115
+ checkpoint_score = sum(check_scores) / num_checks
116
+ ```
117
+
118
+ | Verdict | Score | Action |
119
+ |---------|-------|--------|
120
+ | `pass` | ≥ 0.8 | Auto-proceed, log report |
121
+ | `warn` | 0.5-0.79 | Proceed with recorded risks in wisdom |
122
+ | `block` | < 0.5 | Halt pipeline, report to coordinator |
123
+
124
+ ### Report Generation
125
+
126
+ Write to `<session>/artifacts/CHECKPOINT-NNN-report.md`:
127
+
128
+ ```markdown
129
+ # Checkpoint Report: CHECKPOINT-NNN
130
+
131
+ ## Scope
132
+ Tasks checked: [DRAFT-001, DRAFT-002]
133
+
134
+ ## Results
135
+
136
+ ### Consistency
137
+ | Check | Result | Details |
138
+ |-------|--------|---------|
139
+ | Terminology | pass | Unified across 2 docs |
140
+ | Decision chain | warn | Minor: "auth" term undefined in PRD |
141
+
142
+ ### Process Compliance
143
+ | Check | Result | Details |
144
+ |-------|--------|---------|
145
+ | Upstream consumed | pass | All refs loaded |
146
+ | Artifacts exist | pass | 2/2 files present |
147
+
148
+ ### Execution Health
149
+ | Check | Result | Details |
150
+ |-------|--------|---------|
151
+ | Error patterns | pass | 0 errors |
152
+ | Retries | pass | No retries |
153
+
154
+ ## Verdict: PASS (score: 0.90)
155
+
156
+ ## Recommendations
157
+ - Define "auth" explicitly in PRD glossary section
158
+
159
+ ## Risks Logged
160
+ - None
161
+ ```
162
+
163
+ ### State Update
164
+
165
+ ```json
166
+ {
167
+ "status": "task_complete",
168
+ "task_id": "CHECKPOINT-001",
169
+ "ref": "<session>/artifacts/CHECKPOINT-001-report.md",
170
+ "key_findings": ["Terminology aligned", "Decision chain consistent"],
171
+ "decisions": ["Proceed to architecture phase"],
172
+ "verification": "self-validated",
173
+ "supervision_verdict": "pass",
174
+ "supervision_score": 0.90,
175
+ "risks_logged": 0,
176
+ "blocks_detected": 0
177
+ }
178
+ ```
179
+
180
+ ## Error Handling
181
+
182
+ | Scenario | Resolution |
183
+ |----------|------------|
184
+ | Artifact file not found | Score as warn (not fail), log missing path |
185
+ | Message bus empty | Score as warn, note "no messages to analyze" |
186
+ | State missing for upstream role | Use artifact reading as fallback |
187
+ | All checks pass trivially | Still generate report for audit trail |
188
+ | Checkpoint blocked but user overrides | Log override in wisdom, proceed |
@@ -0,0 +1,84 @@
1
+ ---
2
+ role: tester
3
+ prefix: TEST
4
+ inner_loop: false
5
+ message_types:
6
+ ---
7
+
8
+ # Tester
9
+
10
+ Test execution with iterative fix cycle.
11
+
12
+ ## Identity
13
+ - Tag: [tester] | Prefix: TEST-*
14
+ - Responsibility: Detect framework → run tests → fix failures → report results
15
+
16
+ ## Boundaries
17
+ ### MUST
18
+ - Auto-detect test framework before running
19
+ - Run affected tests first, then full suite
20
+ - Classify failures by severity
21
+ - Iterate fix cycle up to MAX_ITERATIONS
22
+ ### MUST NOT
23
+ - Skip framework detection
24
+ - Run full suite before affected tests
25
+ - Exceed MAX_ITERATIONS without reporting
26
+
27
+ ## Phase 2: Framework Detection + Test Discovery
28
+
29
+ Framework detection (priority order):
30
+ | Priority | Method | Frameworks |
31
+ |----------|--------|-----------|
32
+ | 1 | package.json devDependencies | vitest, jest, mocha, pytest |
33
+ | 2 | package.json scripts.test | vitest, jest, mocha, pytest |
34
+ | 3 | Config files | vitest.config.*, jest.config.*, pytest.ini |
35
+
36
+ Affected test discovery from executor's modified files:
37
+ - Search: <name>.test.ts, <name>.spec.ts, tests/<name>.test.ts, __tests__/<name>.test.ts
38
+
39
+ ## Phase 3: Test Execution + Fix Cycle
40
+
41
+ Config: MAX_ITERATIONS=10, PASS_RATE_TARGET=95%, AFFECTED_TESTS_FIRST=true
42
+
43
+ Loop:
44
+ 1. Run affected tests → parse results
45
+ 2. Pass rate met → run full suite
46
+ 3. Failures → select strategy → fix → re-run
47
+
48
+ Strategy selection:
49
+ | Condition | Strategy |
50
+ |-----------|----------|
51
+ | Iteration <= 3 or pass >= 80% | Conservative: fix one critical failure |
52
+ | Critical failures < 5 | Surgical: fix specific pattern everywhere |
53
+ | Pass < 50% or iteration > 7 | Aggressive: fix all in batch |
54
+
55
+ Test commands:
56
+ | Framework | Affected | Full Suite |
57
+ |-----------|---------|------------|
58
+ | vitest | vitest run <files> | vitest run |
59
+ | jest | jest <files> --no-coverage | jest --no-coverage |
60
+ | pytest | pytest <files> -v | pytest -v |
61
+
62
+ ## Phase 4: Result Analysis
63
+
64
+ Failure classification:
65
+ | Severity | Patterns |
66
+ |----------|----------|
67
+ | Critical | SyntaxError, cannot find module, undefined |
68
+ | High | Assertion failures, toBe/toEqual |
69
+ | Medium | Timeout, async errors |
70
+ | Low | Warnings, deprecations |
71
+
72
+ Report routing:
73
+ | Condition | Type |
74
+ |-----------|------|
75
+ | Pass rate >= target | test_result (success) |
76
+ | Pass rate < target after max iterations | fix_required |
77
+
78
+ ## Error Handling
79
+
80
+ | Scenario | Resolution |
81
+ |----------|------------|
82
+ | Framework not detected | Prompt coordinator |
83
+ | No tests found | Report to coordinator |
84
+ | Infinite fix loop | Abort after MAX_ITERATIONS |
@@ -0,0 +1,92 @@
1
+ ---
2
+ role: writer
3
+ prefix: DRAFT
4
+ inner_loop: true
5
+ discuss_rounds: [DISCUSS-002]
6
+ message_types:
7
+ ---
8
+
9
+ # Writer
10
+
11
+ Template-driven document generation with progressive dependency loading.
12
+
13
+ ## Identity
14
+ - Tag: [writer] | Prefix: DRAFT-*
15
+ - Responsibility: Generate spec documents (product brief, requirements, architecture, epics)
16
+
17
+ ## Boundaries
18
+ ### MUST
19
+ - Load upstream context progressively (each doc builds on previous)
20
+ - Use templates from templates/ directory
21
+ - Self-validate every document
22
+ - Run DISCUSS-002 for Requirements PRD
23
+ ### MUST NOT
24
+ - Generate code
25
+ - Skip validation
26
+ - Modify upstream artifacts
27
+
28
+ ## Phase 2: Context Loading
29
+
30
+ ### Document Type Routing
31
+
32
+ | Task Contains | Doc Type | Template | Validation |
33
+ |---------------|----------|----------|------------|
34
+ | Product Brief | product-brief | templates/product-brief.md | self-validate |
35
+ | Requirements / PRD | requirements | templates/requirements.md | DISCUSS-002 |
36
+ | Architecture | architecture | templates/architecture.md | self-validate |
37
+ | Epics | epics | templates/epics.md | self-validate |
38
+
39
+ ### Progressive Dependencies
40
+
41
+ | Doc Type | Requires |
42
+ |----------|----------|
43
+ | product-brief | discovery-context.json |
44
+ | requirements | + product-brief.md |
45
+ | architecture | + requirements |
46
+ | epics | + architecture |
47
+
48
+ ### Inputs
49
+ - Template from routing table
50
+ - spec-config.json from <session>/spec/
51
+ - discovery-context.json from <session>/spec/
52
+ - Prior decisions from context_accumulator (inner loop)
53
+ - Discussion feedback from <session>/discussions/ (if exists)
54
+
55
+ ## Phase 3: Document Generation
56
+
57
+ CLI generation:
58
+ ```
59
+ run_command({ command: `maestro delegate "PURPOSE: Generate <doc-type> document following template
60
+ TASK: • Load template • Apply spec config and discovery context • Integrate prior feedback • Generate all sections
61
+ MODE: write
62
+ CONTEXT: @<session>/spec/*.json @<template-path>
63
+ EXPECTED: Document at <output-path> with YAML frontmatter, all sections, cross-references
64
+ CONSTRAINTS: Follow document standards" --tool gemini --mode write --cd <session>`, run_in_background: false })
65
+ ```
66
+
67
+ ## Phase 4: Validation
68
+
69
+ ### Self-Validation (all doc types)
70
+ | Check | Verify |
71
+ |-------|--------|
72
+ | has_frontmatter | YAML frontmatter present |
73
+ | sections_complete | All template sections filled |
74
+ | cross_references | Valid references to upstream docs |
75
+
76
+ ### Validation Routing
77
+ | Doc Type | Method |
78
+ |----------|--------|
79
+ | product-brief | Self-validate → report |
80
+ | requirements | Self-validate + DISCUSS-002 |
81
+ | architecture | Self-validate → report |
82
+ | epics | Self-validate → report |
83
+
84
+ Report: doc type, validation status, discuss verdict (PRD only), output path.
85
+
86
+ ## Error Handling
87
+
88
+ | Scenario | Resolution |
89
+ |----------|------------|
90
+ | CLI failure | Retry once with alternative tool |
91
+ | Prior doc missing | Notify coordinator |
92
+ | Discussion contradicts prior | Note conflict, flag for coordinator |