maestro-flow 0.4.10 → 0.4.12

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 (354) hide show
  1. package/.agents/agents/cli-explore-agent.md +187 -0
  2. package/.agents/agents/cross-role-reviewer.md +173 -0
  3. package/.agents/agents/impeccable-agent.md +101 -0
  4. package/.agents/agents/role-design-author.md +218 -0
  5. package/.agents/agents/team-supervisor.md +145 -0
  6. package/.agents/agents/team-worker.md +239 -0
  7. package/.agents/agents/ui-design-agent.md +272 -0
  8. package/.agents/agents/workflow-analyzer.md +117 -0
  9. package/.agents/agents/workflow-codebase-mapper.md +79 -0
  10. package/.agents/agents/workflow-collab-planner.md +145 -0
  11. package/.agents/agents/workflow-debugger.md +105 -0
  12. package/.agents/agents/workflow-executor.md +134 -0
  13. package/.agents/agents/workflow-external-researcher.md +88 -0
  14. package/.agents/agents/workflow-integration-checker.md +85 -0
  15. package/.agents/agents/workflow-nyquist-auditor.md +87 -0
  16. package/.agents/agents/workflow-phase-researcher.md +87 -0
  17. package/.agents/agents/workflow-plan-checker.md +92 -0
  18. package/.agents/agents/workflow-planner.md +197 -0
  19. package/.agents/agents/workflow-project-researcher.md +76 -0
  20. package/.agents/agents/workflow-research-synthesizer.md +72 -0
  21. package/.agents/agents/workflow-reviewer.md +84 -0
  22. package/.agents/agents/workflow-roadmapper.md +83 -0
  23. package/.agents/agents/workflow-verifier.md +122 -0
  24. package/.agents/skills/codify-to-knowhow/SKILL.md +169 -0
  25. package/.agents/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  26. package/.agents/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  27. package/.agents/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  28. package/.agents/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  29. package/.agents/skills/learn-decompose/SKILL.md +118 -0
  30. package/.agents/skills/learn-follow/SKILL.md +129 -0
  31. package/.agents/skills/learn-investigate/SKILL.md +154 -0
  32. package/.agents/skills/learn-retro/SKILL.md +159 -0
  33. package/.agents/skills/learn-second-opinion/SKILL.md +124 -0
  34. package/.agents/skills/maestro/SKILL.md +258 -0
  35. package/.agents/skills/maestro-amend/SKILL.md +165 -0
  36. package/.agents/skills/maestro-analyze/SKILL.md +161 -0
  37. package/.agents/skills/maestro-blueprint/SKILL.md +132 -0
  38. package/.agents/skills/maestro-brainstorm/SKILL.md +134 -0
  39. package/.agents/skills/maestro-collab/SKILL.md +174 -0
  40. package/.agents/skills/maestro-composer/SKILL.md +181 -0
  41. package/.agents/skills/maestro-execute/SKILL.md +133 -0
  42. package/.agents/skills/maestro-fork/SKILL.md +88 -0
  43. package/.agents/skills/maestro-guard/SKILL.md +103 -0
  44. package/.agents/skills/maestro-help/SKILL.md +300 -0
  45. package/.agents/skills/maestro-help/index/catalog.json +202 -0
  46. package/.agents/skills/maestro-help/phases/01-parse-intent.md +122 -0
  47. package/.agents/skills/maestro-help/phases/02-search-present.md +183 -0
  48. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +213 -0
  49. package/.agents/skills/maestro-impeccable/SKILL.md +251 -0
  50. package/.agents/skills/maestro-init/SKILL.md +80 -0
  51. package/.agents/skills/maestro-learn/SKILL.md +142 -0
  52. package/.agents/skills/maestro-merge/SKILL.md +66 -0
  53. package/.agents/skills/maestro-milestone-audit/SKILL.md +72 -0
  54. package/.agents/skills/maestro-milestone-complete/SKILL.md +79 -0
  55. package/.agents/skills/maestro-milestone-release/SKILL.md +98 -0
  56. package/.agents/skills/maestro-overlay/SKILL.md +180 -0
  57. package/.agents/skills/maestro-plan/SKILL.md +182 -0
  58. package/.agents/skills/maestro-player/SKILL.md +177 -0
  59. package/.agents/skills/maestro-quick/SKILL.md +67 -0
  60. package/.agents/skills/maestro-ralph/SKILL.md +756 -0
  61. package/.agents/skills/maestro-ralph-execute/SKILL.md +273 -0
  62. package/.agents/skills/maestro-roadmap/SKILL.md +131 -0
  63. package/.agents/skills/maestro-tools-execute/SKILL.md +119 -0
  64. package/.agents/skills/maestro-tools-register/SKILL.md +159 -0
  65. package/.agents/skills/maestro-ui-codify/SKILL.md +82 -0
  66. package/.agents/skills/maestro-update/SKILL.md +178 -0
  67. package/.agents/skills/maestro-verify/SKILL.md +111 -0
  68. package/.agents/skills/manage-codebase-rebuild/SKILL.md +77 -0
  69. package/.agents/skills/manage-codebase-refresh/SKILL.md +59 -0
  70. package/.agents/skills/manage-harvest/SKILL.md +96 -0
  71. package/.agents/skills/manage-issue/SKILL.md +75 -0
  72. package/.agents/skills/manage-issue-discover/SKILL.md +83 -0
  73. package/.agents/skills/manage-knowhow/SKILL.md +79 -0
  74. package/.agents/skills/manage-knowhow-capture/SKILL.md +81 -0
  75. package/.agents/skills/manage-learn/SKILL.md +67 -0
  76. package/.agents/skills/manage-status/SKILL.md +54 -0
  77. package/.agents/skills/manage-wiki/SKILL.md +64 -0
  78. package/.agents/skills/quality-auto-test/SKILL.md +138 -0
  79. package/.agents/skills/quality-debug/SKILL.md +122 -0
  80. package/.agents/skills/quality-refactor/SKILL.md +69 -0
  81. package/.agents/skills/quality-retrospective/SKILL.md +79 -0
  82. package/.agents/skills/quality-review/SKILL.md +130 -0
  83. package/.agents/skills/quality-sync/SKILL.md +53 -0
  84. package/.agents/skills/quality-test/SKILL.md +119 -0
  85. package/.agents/skills/security-audit/SKILL.md +157 -0
  86. package/.agents/skills/skill-iter-tune/SKILL.md +384 -0
  87. package/.agents/skills/skill-iter-tune/phases/01-setup.md +144 -0
  88. package/.agents/skills/skill-iter-tune/phases/02-execute.md +292 -0
  89. package/.agents/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
  90. package/.agents/skills/skill-iter-tune/phases/04-improve.md +186 -0
  91. package/.agents/skills/skill-iter-tune/phases/05-report.md +166 -0
  92. package/.agents/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
  93. package/.agents/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
  94. package/.agents/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
  95. package/.agents/skills/spec-add/SKILL.md +70 -0
  96. package/.agents/skills/spec-load/SKILL.md +73 -0
  97. package/.agents/skills/spec-remove/SKILL.md +53 -0
  98. package/.agents/skills/spec-setup/SKILL.md +50 -0
  99. package/.agents/skills/team-coordinate/SKILL.md +268 -0
  100. package/.agents/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
  101. package/.agents/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
  102. package/.agents/skills/team-coordinate/roles/coordinator/commands/monitor.md +358 -0
  103. package/.agents/skills/team-coordinate/roles/coordinator/role.md +365 -0
  104. package/.agents/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
  105. package/.agents/skills/team-coordinate/specs/pipelines.md +97 -0
  106. package/.agents/skills/team-coordinate/specs/quality-gates.md +112 -0
  107. package/.agents/skills/team-coordinate/specs/role-spec-template.md +198 -0
  108. package/.agents/skills/team-executor/SKILL.md +191 -0
  109. package/.agents/skills/team-executor/roles/executor/commands/monitor.md +239 -0
  110. package/.agents/skills/team-executor/roles/executor/role.md +171 -0
  111. package/.agents/skills/team-executor/specs/session-schema.md +264 -0
  112. package/.agents/skills/team-lifecycle-v4/SKILL.md +211 -0
  113. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +96 -0
  114. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
  115. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
  116. package/.agents/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
  117. package/.agents/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
  118. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
  119. package/.agents/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
  120. package/.agents/skills/team-lifecycle-v4/roles/executor/role.md +69 -0
  121. package/.agents/skills/team-lifecycle-v4/roles/planner/role.md +87 -0
  122. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
  123. package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
  124. package/.agents/skills/team-lifecycle-v4/roles/reviewer/role.md +71 -0
  125. package/.agents/skills/team-lifecycle-v4/roles/supervisor/role.md +194 -0
  126. package/.agents/skills/team-lifecycle-v4/roles/tester/role.md +89 -0
  127. package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +97 -0
  128. package/.agents/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
  129. package/.agents/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
  130. package/.agents/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
  131. package/.agents/skills/team-lifecycle-v4/templates/architecture.md +254 -0
  132. package/.agents/skills/team-lifecycle-v4/templates/epics.md +196 -0
  133. package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
  134. package/.agents/skills/team-lifecycle-v4/templates/requirements.md +224 -0
  135. package/.agents/skills/team-quality-assurance/SKILL.md +149 -0
  136. package/.agents/skills/team-quality-assurance/roles/analyst/role.md +90 -0
  137. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
  138. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
  139. package/.agents/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +250 -0
  140. package/.agents/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
  141. package/.agents/skills/team-quality-assurance/roles/executor/role.md +68 -0
  142. package/.agents/skills/team-quality-assurance/roles/generator/role.md +70 -0
  143. package/.agents/skills/team-quality-assurance/roles/scout/role.md +77 -0
  144. package/.agents/skills/team-quality-assurance/roles/strategist/role.md +73 -0
  145. package/.agents/skills/team-quality-assurance/specs/pipelines.md +115 -0
  146. package/.agents/skills/team-quality-assurance/specs/team-config.json +131 -0
  147. package/.agents/skills/team-review/SKILL.md +149 -0
  148. package/.agents/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
  149. package/.agents/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
  150. package/.agents/skills/team-review/roles/coordinator/commands/monitor.md +224 -0
  151. package/.agents/skills/team-review/roles/coordinator/role.md +132 -0
  152. package/.agents/skills/team-review/roles/fixer/role.md +78 -0
  153. package/.agents/skills/team-review/roles/reviewer/role.md +70 -0
  154. package/.agents/skills/team-review/roles/scanner/role.md +81 -0
  155. package/.agents/skills/team-review/specs/dimensions.md +82 -0
  156. package/.agents/skills/team-review/specs/finding-schema.json +82 -0
  157. package/.agents/skills/team-review/specs/pipelines.md +102 -0
  158. package/.agents/skills/team-review/specs/team-config.json +27 -0
  159. package/.agents/skills/team-tech-debt/SKILL.md +130 -0
  160. package/.agents/skills/team-tech-debt/roles/assessor/role.md +79 -0
  161. package/.agents/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
  162. package/.agents/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
  163. package/.agents/skills/team-tech-debt/roles/coordinator/commands/monitor.md +209 -0
  164. package/.agents/skills/team-tech-debt/roles/coordinator/role.md +123 -0
  165. package/.agents/skills/team-tech-debt/roles/executor/role.md +78 -0
  166. package/.agents/skills/team-tech-debt/roles/planner/role.md +71 -0
  167. package/.agents/skills/team-tech-debt/roles/scanner/role.md +92 -0
  168. package/.agents/skills/team-tech-debt/roles/validator/role.md +80 -0
  169. package/.agents/skills/team-tech-debt/specs/pipelines.md +47 -0
  170. package/.agents/skills/team-tech-debt/specs/team-config.json +129 -0
  171. package/.agents/skills/team-testing/SKILL.md +145 -0
  172. package/.agents/skills/team-testing/roles/analyst/role.md +105 -0
  173. package/.agents/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
  174. package/.agents/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
  175. package/.agents/skills/team-testing/roles/coordinator/commands/monitor.md +257 -0
  176. package/.agents/skills/team-testing/roles/coordinator/role.md +134 -0
  177. package/.agents/skills/team-testing/roles/executor/role.md +101 -0
  178. package/.agents/skills/team-testing/roles/generator/role.md +100 -0
  179. package/.agents/skills/team-testing/roles/strategist/role.md +85 -0
  180. package/.agents/skills/team-testing/specs/pipelines.md +101 -0
  181. package/.agents/skills/team-testing/specs/team-config.json +93 -0
  182. package/.agents/skills/wiki-connect/SKILL.md +64 -0
  183. package/.agents/skills/wiki-digest/SKILL.md +70 -0
  184. package/.agents/skills/workflow-skill-designer/SKILL.md +498 -0
  185. package/.agents/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
  186. package/.agents/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
  187. package/.agents/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
  188. package/.agents/skills/workflow-skill-designer/phases/04-validation.md +471 -0
  189. package/.agy/agents/cli-explore-agent.md +1 -3
  190. package/.agy/agents/cross-role-reviewer.md +170 -0
  191. package/.agy/agents/role-design-author.md +215 -0
  192. package/.agy/agents/ui-design-agent.md +1 -18
  193. package/.agy/agents/workflow-analyzer.md +1 -1
  194. package/.agy/agents/workflow-external-researcher.md +1 -1
  195. package/.agy/skills/maestro/SKILL.md +63 -27
  196. package/.agy/skills/maestro-analyze/SKILL.md +30 -4
  197. package/.agy/skills/maestro-blueprint/SKILL.md +132 -0
  198. package/.agy/skills/maestro-brainstorm/SKILL.md +119 -103
  199. package/.agy/skills/maestro-help/SKILL.md +48 -14
  200. package/.agy/skills/maestro-help/index/catalog.json +29 -11
  201. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  202. package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
  203. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  204. package/.agy/skills/maestro-init/SKILL.md +3 -3
  205. package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
  206. package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
  207. package/.agy/skills/maestro-plan/SKILL.md +14 -4
  208. package/.agy/skills/maestro-ralph/SKILL.md +368 -162
  209. package/.agy/skills/maestro-ralph-execute/SKILL.md +81 -67
  210. package/.agy/skills/maestro-roadmap/SKILL.md +42 -81
  211. package/.agy/skills/quality-auto-test/SKILL.md +1 -1
  212. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  213. package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  214. package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  215. package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  216. package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
  217. package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  218. package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  219. package/.claude/agents/cli-explore-agent.md +1 -3
  220. package/.claude/agents/cross-role-reviewer.md +171 -0
  221. package/.claude/agents/role-design-author.md +216 -0
  222. package/.claude/agents/ui-design-agent.md +1 -18
  223. package/.claude/agents/workflow-analyzer.md +1 -1
  224. package/.claude/agents/workflow-external-researcher.md +1 -1
  225. package/.claude/commands/maestro-analyze.md +30 -4
  226. package/.claude/commands/maestro-blueprint.md +130 -0
  227. package/.claude/commands/maestro-brainstorm.md +132 -116
  228. package/.claude/commands/maestro-init.md +3 -3
  229. package/.claude/commands/maestro-milestone-audit.md +5 -3
  230. package/.claude/commands/maestro-milestone-complete.md +7 -5
  231. package/.claude/commands/maestro-plan.md +14 -4
  232. package/.claude/commands/maestro-ralph-execute.md +81 -67
  233. package/.claude/commands/maestro-ralph.md +368 -162
  234. package/.claude/commands/maestro-roadmap.md +42 -81
  235. package/.claude/commands/maestro.md +63 -27
  236. package/.claude/commands/quality-auto-test.md +1 -1
  237. package/.claude/skills/maestro-help/SKILL.md +48 -14
  238. package/.claude/skills/maestro-help/index/catalog.json +29 -11
  239. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  240. package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
  241. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
  242. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
  243. package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  244. package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  245. package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  246. package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
  247. package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  248. package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  249. package/.codex/skills/maestro/SKILL.md +84 -41
  250. package/.codex/skills/maestro-amend/SKILL.md +157 -0
  251. package/.codex/skills/maestro-analyze/SKILL.md +71 -23
  252. package/.codex/skills/maestro-blueprint/SKILL.md +122 -0
  253. package/.codex/skills/maestro-brainstorm/SKILL.md +135 -45
  254. package/.codex/skills/maestro-composer/SKILL.md +1 -1
  255. package/.codex/skills/maestro-execute/SKILL.md +13 -4
  256. package/.codex/skills/maestro-help/SKILL.md +28 -18
  257. package/.codex/skills/maestro-help/catalog.json +29 -11
  258. package/.codex/skills/maestro-init/SKILL.md +7 -7
  259. package/.codex/skills/maestro-plan/SKILL.md +27 -9
  260. package/.codex/skills/maestro-ralph/SKILL.md +740 -491
  261. package/.codex/skills/maestro-roadmap/SKILL.md +55 -72
  262. package/.codex/skills/maestro-update/SKILL.md +169 -0
  263. package/.codex/skills/maestro-verify/SKILL.md +11 -2
  264. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -2
  265. package/.codex/skills/manage-harvest/SKILL.md +10 -2
  266. package/.codex/skills/quality-retrospective/SKILL.md +9 -2
  267. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  268. package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
  269. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  270. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
  271. package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
  272. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
  273. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
  274. package/README.md +8 -8
  275. package/README.zh-CN.md +8 -8
  276. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
  277. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  278. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  279. package/dist/src/agents/cli-agent-runner.js +13 -7
  280. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  281. package/dist/src/commands/install-backend.d.ts +12 -0
  282. package/dist/src/commands/install-backend.d.ts.map +1 -1
  283. package/dist/src/commands/install-backend.js +144 -0
  284. package/dist/src/commands/install-backend.js.map +1 -1
  285. package/dist/src/commands/spec.d.ts.map +1 -1
  286. package/dist/src/commands/spec.js +8 -1
  287. package/dist/src/commands/spec.js.map +1 -1
  288. package/dist/src/core/component-defs.d.ts +6 -0
  289. package/dist/src/core/component-defs.d.ts.map +1 -1
  290. package/dist/src/core/component-defs.js +97 -0
  291. package/dist/src/core/component-defs.js.map +1 -1
  292. package/dist/src/tools/spec-init.d.ts +16 -2
  293. package/dist/src/tools/spec-init.d.ts.map +1 -1
  294. package/dist/src/tools/spec-init.js +58 -187
  295. package/dist/src/tools/spec-init.js.map +1 -1
  296. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  297. package/dist/src/tools/spec-loader.js +16 -16
  298. package/dist/src/tools/spec-loader.js.map +1 -1
  299. package/dist/src/tools/spec-seeds.d.ts +33 -0
  300. package/dist/src/tools/spec-seeds.d.ts.map +1 -0
  301. package/dist/src/tools/spec-seeds.js +200 -0
  302. package/dist/src/tools/spec-seeds.js.map +1 -0
  303. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  304. package/dist/src/tools/spec-writer.js +7 -9
  305. package/dist/src/tools/spec-writer.js.map +1 -1
  306. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts +11 -0
  307. package/dist/src/tui/install-ui/ExtraMcpConfig.d.ts.map +1 -0
  308. package/dist/src/tui/install-ui/ExtraMcpConfig.js +61 -0
  309. package/dist/src/tui/install-ui/ExtraMcpConfig.js.map +1 -0
  310. package/dist/src/tui/install-ui/InstallConfirm.d.ts +3 -0
  311. package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
  312. package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
  313. package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
  314. package/dist/src/tui/install-ui/InstallExecution.d.ts +2 -0
  315. package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
  316. package/dist/src/tui/install-ui/InstallExecution.js +14 -2
  317. package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
  318. package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
  319. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  320. package/dist/src/tui/install-ui/InstallFlow.js +16 -3
  321. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  322. package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
  323. package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
  324. package/dist/src/tui/install-ui/InstallHub.js +8 -0
  325. package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
  326. package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
  327. package/dist/src/tui/install-ui/InstallResult.js +3 -1
  328. package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
  329. package/dist/src/utils/update-notices.js +31 -0
  330. package/dist/src/utils/update-notices.js.map +1 -1
  331. package/package.json +5 -2
  332. package/templates/business-test-report.json +1 -1
  333. package/templates/index.json +1 -1
  334. package/templates/roadmap.md +15 -9
  335. package/templates/state.json +18 -17
  336. package/workflows/analyze.md +79 -11
  337. package/workflows/auto-test.md +6 -6
  338. package/workflows/blueprint.md +431 -0
  339. package/workflows/brainstorm.md +603 -496
  340. package/workflows/business-test.md +7 -7
  341. package/workflows/codebase-rebuild.md +4 -4
  342. package/workflows/harvest.md +184 -10
  343. package/workflows/init.md +9 -8
  344. package/workflows/maestro.md +1 -1
  345. package/workflows/milestone-audit.md +12 -4
  346. package/workflows/milestone-complete.md +11 -6
  347. package/workflows/plan.md +88 -22
  348. package/workflows/roadmap-common.md +1 -1
  349. package/workflows/roadmap.md +13 -3
  350. package/workflows/spec-generate.md +24 -13
  351. package/workflows/ui-design.md +2 -2
  352. package/workflows/ui-style.md +1 -1
  353. package/.agy/agents/conceptual-planning-agent.md +0 -244
  354. package/.claude/agents/conceptual-planning-agent.md +0 -245
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: maestro-merge
3
+ description: Merge milestone worktree branch back to main
4
+ argument-hint: "-m <milestone-number> [--force] [--dry-run] [--no-cleanup] [--continue]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - edit_file
9
+ - shell
10
+ - find_files
11
+ - search
12
+ - delegate_subagent
13
+ - ask_user
14
+ ---
15
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
16
+
17
+ <purpose>
18
+ Merge a completed milestone worktree branch back into the main branch, sync scratch artifacts, and reconcile the artifact registry. Uses a two-phase approach: git merge first (source code), artifact sync second (only after git succeeds). This prevents partial state corruption when merge conflicts occur.
19
+
20
+ Includes registry health check, pre-merge rebase (pull main into worktree to minimize conflicts), and atomic state reconciliation (merge artifact entries, don't overwrite).
21
+ </purpose>
22
+
23
+ <required_reading>
24
+ @~/.maestro/workflows/merge.md
25
+ </required_reading>
26
+
27
+ <context>
28
+ $ARGUMENTS -- milestone number and optional flags.
29
+
30
+ Flags (`-m`, `--force`, `--dry-run`, `--no-cleanup`, `--continue`), merge sequence, artifact sync detail, and conflict handling are defined in workflow `merge.md`.
31
+ </context>
32
+
33
+ <execution>
34
+ Follow '~/.maestro/workflows/merge.md' completely.
35
+
36
+ **Knowledge inquiry on completion:**
37
+ After successful merge, ask user once: "Record milestone learnings?" If yes, persist via `invoke_skill("spec-add", "learning \"<title>\" \"<insight>\" --keywords <kw1>,<kw2>")`.
38
+
39
+ **Next-step routing on completion:**
40
+ - View dashboard → invoke_skill({ skill: "manage-status" })
41
+ - Audit milestone → invoke_skill({ skill: "maestro-milestone-audit" })
42
+ </execution>
43
+
44
+ <error_codes>
45
+ | Code | Severity | Condition | Recovery |
46
+ |------|----------|-----------|----------|
47
+ | E001 | error | Running inside a worktree | Run from main worktree |
48
+ | E002 | error | No worktree registry found | Nothing to merge |
49
+ | E003 | error | --continue but no merge state | Start fresh merge |
50
+ | E004 | error | No milestone number provided | Provide `-m <N>` |
51
+ | W001 | warning | Stale registry entries found | Auto-cleaned |
52
+ | W002 | warning | Incomplete artifacts (without --force) | Confirm or use --force |
53
+ | W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
54
+ </error_codes>
55
+
56
+ <success_criteria>
57
+ - [ ] Registry health check passed (stale entries cleaned)
58
+ - [ ] Pre-merge rebase successful (worktree has latest main)
59
+ - [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
60
+ - [ ] All scratch artifacts synced to main `.workflow/scratch/`
61
+ - [ ] `state.json.artifacts[]` reconciled (worktree entries merged into main)
62
+ - [ ] Milestone `"forked"` flag removed in `state.json.milestones[]`
63
+ - [ ] `roadmap.md` completed phases marked
64
+ - [ ] Worktree removed and branch deleted (unless --no-cleanup)
65
+ - [ ] `worktrees.json` registry updated (entry removed)
66
+ </success_criteria>
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: maestro-milestone-audit
3
+ description: Audit current milestone for cross-phase integration gaps
4
+ argument-hint: "[<milestone>]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - shell
9
+ - find_files
10
+ - search
11
+ - delegate_subagent
12
+ - ask_user
13
+ ---
14
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
15
+
16
+
17
+ <purpose>
18
+ Audit milestone completion using the artifact registry. Checks:
19
+ 1. Phase coverage — every phase in roadmap has plan + execute artifacts (completed)
20
+ 2. Ad-hoc completeness — all adhoc artifacts are completed (or explicitly skipped)
21
+ 3. Execution completeness — all tasks in executed plans are completed
22
+ 4. Cross-artifact integration — interfaces, data contracts, configuration consistency
23
+
24
+ Data source: `state.json.artifacts[]` filtered by current milestone.
25
+ Produces audit report at `.workflow/milestones/{milestone}/audit-report.md`.
26
+ </purpose>
27
+
28
+ <required_reading>
29
+ @~/.maestro/workflows/milestone-audit.md
30
+ </required_reading>
31
+
32
+ <context>
33
+ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
34
+
35
+ **Requires:** All phases in the milestone should have completed execute artifacts.
36
+
37
+ **Data source:**
38
+ - `.workflow/state.json` — artifacts[], current_milestone, milestones[]
39
+ - `.workflow/roadmap.md` — milestone-to-phase mapping (standard milestones only)
40
+ - Plan scratch dirs — for task status verification
41
+
42
+ **Adhoc milestone support (D-008):** When the target milestone has `type == "adhoc"` (or `type` field is missing, defaulting to `"standard"`), the audit skips roadmap.md parsing and phase coverage checks. It only validates artifact chain completeness (PLN→EXC exists) and runs integration checks.
43
+ </context>
44
+
45
+ <execution>
46
+ Follow '~/.maestro/workflows/milestone-audit.md' completely.
47
+
48
+ Audit checklist steps (phase coverage, ad-hoc completeness, execution completeness, cross-artifact integration) are defined in workflow `milestone-audit.md`.
49
+
50
+ **Next-step routing on completion:**
51
+ - Verdict PASS → `/maestro-milestone-complete {milestone}`
52
+ - Verdict FAIL, integration gaps → `/maestro-plan --gaps`
53
+ - Verdict FAIL, incomplete execution → `/maestro-execute`
54
+ </execution>
55
+
56
+ <error_codes>
57
+ | Code | Severity | Condition | Recovery |
58
+ |------|----------|-----------|----------|
59
+ | E001 | error | Milestone identifier required | Check arguments format |
60
+ | E002 | error | Milestone not found in state.json | Check milestone ID |
61
+ | E003 | error | No execute artifacts found for milestone | Run maestro-execute first |
62
+ | W001 | warning | Some phases lack complete artifact chains | Review incomplete phases |
63
+ </error_codes>
64
+
65
+ <success_criteria>
66
+ - [ ] All phases in milestone identified from roadmap (standard) or milestone_obj.phases (adhoc)
67
+ - [ ] Artifact chains verified: ANL→PLN→EXC per phase (standard) or PLN→EXC exists (adhoc)
68
+ - [ ] Ad-hoc artifacts checked for completion
69
+ - [ ] Integration check completed (shared interfaces, data contracts)
70
+ - [ ] Audit report written with clear PASS/FAIL verdict
71
+ - [ ] Next-step routing provided
72
+ </success_criteria>
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: maestro-milestone-complete
3
+ description: Archive completed milestone and prepare for next
4
+ argument-hint: "[<milestone>]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - shell
9
+ - find_files
10
+ - search
11
+ - delegate_subagent
12
+ - ask_user
13
+ ---
14
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
15
+
16
+
17
+ <purpose>
18
+ Mark a milestone as complete after its audit has passed. Archives all scratch artifacts to `milestones/{M}/artifacts/`, moves artifact entries from `state.json.artifacts[]` to `milestone_history`, extracts final knowhow, and advances to the next milestone.
19
+ </purpose>
20
+
21
+ <required_reading>
22
+ @~/.maestro/workflows/milestone-complete.md
23
+ </required_reading>
24
+
25
+ <context>
26
+ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
27
+
28
+ **Requires:** `/maestro-milestone-audit` should have passed.
29
+
30
+ **State files:**
31
+ - `.workflow/state.json` — artifacts[], milestones[] (with `type` field: `"standard"` | `"adhoc"`), current_milestone, milestone_history[]
32
+ - `.workflow/roadmap.md` — milestone structure (standard milestones only; adhoc milestones may not have roadmap)
33
+ - `.workflow/milestones/{milestone}/audit-report.md` — audit results
34
+ </context>
35
+
36
+ <execution>
37
+ Follow '~/.maestro/workflows/milestone-complete.md' completely.
38
+
39
+ Archive flow steps (validation, directory archival, artifact history, knowhow extraction, state advancement, cleanup) are defined in workflow `milestone-complete.md`.
40
+
41
+ ### Knowledge Promotion Inquiry
42
+
43
+ After knowhow extraction (step 4), scan `learnings.md` for promotion candidates:
44
+
45
+ 1. **High-frequency pattern detection**: Scan all `<spec-entry>` entries with `roles="implement"` for keyword overlap (≥2 entries sharing keywords):
46
+ → Ask: "Keyword '{keyword}' appears in {N} knowhow entries. Should this be promoted to a formal coding convention? (`/spec-add coding`)"
47
+
48
+ 2. **Convention drift detection**: Compare executed task summaries against `coding-conventions.md` and `architecture-constraints.md`:
49
+ → Ask: "Were any established conventions bypassed during this milestone? Should conventions be updated?"
50
+
51
+ 3. **Wiki island check**: Auto-trigger `wiki-connect --fix` to link newly extracted knowledge.
52
+
53
+ If user confirms promotion, invoke `invoke_skill({ skill: "spec-add", args: "<category> <content>" })` with promoted content, preserving original date and source traceability.
54
+
55
+ **Next-step routing on completion:**
56
+ - Cut a release → `/maestro-milestone-release`
57
+ - Next milestone → `/maestro-analyze` or `/maestro-plan 1` (standard milestones only)
58
+ - View state → `/manage-status`
59
+
60
+ **Adhoc milestone (D-008):** When completing an adhoc milestone, skip roadmap snapshot and do not advance to next milestone. Set `current_milestone = null`, `status = "idle"`. Adhoc milestones are self-contained — no successor in roadmap chain.
61
+ </execution>
62
+
63
+ <error_codes>
64
+ | Code | Severity | Condition | Recovery |
65
+ |------|----------|-----------|----------|
66
+ | E001 | error | Milestone identifier required | Check arguments |
67
+ | E002 | error | Audit not passed | Run maestro-milestone-audit first |
68
+ | E003 | error | Incomplete artifacts remain | Complete remaining work first |
69
+ </error_codes>
70
+
71
+ <success_criteria>
72
+ - [ ] Audit report verified as PASS
73
+ - [ ] Scratch artifacts moved to milestones/{M}/artifacts/
74
+ - [ ] Artifact entries archived to milestone_history
75
+ - [ ] Knowhow extracted to specs/learnings.md
76
+ - [ ] state.json updated: next milestone as current (standard) or current_milestone=null (adhoc), artifacts[] cleared
77
+ - [ ] Roadmap snapshot saved (standard only; adhoc skips)
78
+ - [ ] project.md Context updated with milestone summary
79
+ </success_criteria>
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: maestro-milestone-release
3
+ description: Bump version, generate changelog, tag milestone
4
+ argument-hint: "[<version>] [--bump patch|minor|major] [--dry-run] [--no-tag] [--no-push]"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - edit_file
9
+ - shell
10
+ - find_files
11
+ - search
12
+ - delegate_subagent
13
+ - ask_user
14
+ ---
15
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
16
+
17
+
18
+ <purpose>
19
+ Package a completed milestone into a releasable version. Bumps the project version (e.g. `package.json`, `pyproject.toml`, or language-specific manifest), generates or appends a changelog entry from phase/milestone summaries and git log, creates an annotated git tag, and optionally pushes to the remote. Runs after `/maestro-milestone-complete` has archived the milestone; serves as the final delivery step in the SDLC loop.
20
+ </purpose>
21
+
22
+ <required_reading>
23
+ @~/.maestro/workflows/milestone-release.md
24
+ </required_reading>
25
+
26
+ <context>
27
+ $ARGUMENTS -- optional explicit version string and flags.
28
+
29
+ **Flags:**
30
+ - `<version>` -- explicit version (e.g. `1.2.0`). If omitted, version is derived from `--bump` or prompted.
31
+ - `--bump patch|minor|major` -- semver bump relative to the current version (default: `minor`)
32
+ - `--dry-run` -- compute the next version, changelog diff, and tag name without writing files or creating tags
33
+ - `--no-tag` -- skip git tag creation (version bump + changelog only)
34
+ - `--no-push` -- skip `git push --follow-tags` after tagging
35
+
36
+ **State files:**
37
+ - `.workflow/state.json` -- current_milestone, previous release version
38
+ - `.workflow/milestones/{milestone}/summary.md` -- milestone summary (from `maestro-milestone-complete`)
39
+ - `.workflow/milestones/{milestone}/audit-report.md` -- audit verdict (must be PASS)
40
+ - `CHANGELOG.md` -- release notes file (created if missing)
41
+ - Version manifest -- `package.json` / `pyproject.toml` / `Cargo.toml` / etc. (auto-detected)
42
+
43
+ **Preconditions:**
44
+ - Current milestone must be completed (audit PASS + `/maestro-milestone-complete` run)
45
+ - Working tree must be clean (no uncommitted changes) unless `--dry-run`
46
+ </context>
47
+
48
+ <execution>
49
+ Follow '~/.maestro/workflows/release.md' completely.
50
+
51
+ **High-level flow:**
52
+ 1. Validate preconditions (milestone completed, clean tree, audit PASS)
53
+ 2. Resolve target version from `<version>` or `--bump` against current manifest
54
+ 3. Collect changes since last release tag: milestone summary + phase summaries + git log between tags
55
+ 4. Generate `CHANGELOG.md` entry (grouped by phase / change type)
56
+ 5. Write version to manifest file(s) + commit with message `chore(release): v{version}`
57
+ 6. Create annotated git tag `v{version}` with release notes body (unless `--no-tag`)
58
+ 7. Push commit + tag to remote (unless `--no-push`)
59
+
60
+ **Report format on completion:**
61
+ ```
62
+ === RELEASE COMPLETE ===
63
+ Version: v{previous} → v{new}
64
+ Milestone: {milestone_name}
65
+ Tag: v{new} {pushed|local-only}
66
+ Changelog: {N} entries written to CHANGELOG.md
67
+ Manifest: {file_path} updated
68
+
69
+ Next steps:
70
+ /maestro-plan {next_phase} -- Start next milestone's first phase
71
+ /manage-status -- View project dashboard
72
+ ```
73
+
74
+ For `--dry-run`, print the computed version, changelog diff, and tag name without side effects.
75
+ </execution>
76
+
77
+ <error_codes>
78
+ | Code | Severity | Condition | Recovery |
79
+ |------|----------|-----------|----------|
80
+ | E001 | error | Current milestone not completed (no milestone-complete run) | Run `/maestro-milestone-complete` first |
81
+ | E002 | error | Audit verdict not PASS | Re-run `/maestro-milestone-audit` and resolve findings |
82
+ | E003 | error | Working tree not clean (uncommitted changes) | Commit or stash changes, then retry |
83
+ | E004 | error | Version manifest not found / unsupported | Add supported manifest or pass `<version>` explicitly with `--no-tag` |
84
+ | E005 | error | Target version not greater than current (would break semver monotonicity) | Choose a higher version or run with explicit `<version>` |
85
+ | W001 | warning | No changes detected since last release tag | Confirm whether release is still desired |
86
+ | W002 | warning | Remote push failed (network / auth) | Retry manually with `git push --follow-tags` |
87
+ </error_codes>
88
+
89
+ <success_criteria>
90
+ - [ ] Preconditions validated (milestone complete, audit PASS, clean tree)
91
+ - [ ] Target version computed and greater than previous
92
+ - [ ] Version manifest(s) updated with new version
93
+ - [ ] CHANGELOG.md contains new entry with milestone summary + grouped changes
94
+ - [ ] Release commit created with conventional message
95
+ - [ ] Annotated git tag created (unless `--no-tag`)
96
+ - [ ] Commit + tag pushed to remote (unless `--no-push` or push failed → W002)
97
+ - [ ] state.json updated with last_release_version + last_release_at timestamp
98
+ </success_criteria>
@@ -0,0 +1,180 @@
1
+ ---
2
+ name: maestro-overlay
3
+ description: Create or edit command overlays from natural language
4
+ argument-hint: "<intent> — 描述要添加的规则或步骤,如 'always verify after execute'"
5
+ allowed-tools:
6
+ - read_file
7
+ - write_file
8
+ - shell
9
+ - find_files
10
+ - search
11
+ - ask_user
12
+ ---
13
+ <!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
14
+
15
+ <purpose>
16
+ Turn a user's natural-language instruction into a command overlay — a JSON patch file that augments one or more `.claude/commands/*.md` files non-invasively. Overlays live at `~/.maestro/overlays/` and are auto-applied by every `maestro install` run, so injected steps survive reinstalls. Use this skill when the user says things like "always run CLI verification after `/maestro-execute`", "require reading doc X before `/maestro-plan`", or "add a `ccw cli` quality check at the end of every quality-review".
17
+ </purpose>
18
+
19
+ <required_reading>
20
+ @~/.maestro/workflows/overlays.md
21
+ @~/.maestro/cli-tools.json
22
+ </required_reading>
23
+
24
+ <context>
25
+ **Overlay model** — an overlay is a JSON file with a `name`, one or more `targets` (command names without `.md`), and a list of `patches`. Each patch targets an XML section (`execution`, `required_reading`, `context`, `success_criteria`, etc.), a mode (`append`, `prepend`, `replace`, `new-section`), and `content`. On apply, the patcher wraps the content in hashed HTML-comment markers so re-apply is idempotent and removal is surgical.
26
+
27
+ **Where overlays live**
28
+ - User overlays: `~/.maestro/overlays/*.json` — created by this skill
29
+ - Shared docs: `~/.maestro/overlays/docs/*.md` — referenced via `@~/.maestro/overlays/docs/*.md` inside patch content
30
+ - Shipped examples: `~/.maestro/overlays/_shipped/` — read-only, do not edit
31
+
32
+ **Management** — listing and removing overlays is handled by `maestro overlay list` (ink TUI with interactive delete). This skill focuses solely on creation.
33
+
34
+ **Available sections** (for `section:` in patches): `purpose`, `required_reading`, `deferred_reading`, `context`, `execution`, `error_codes`, `success_criteria`.
35
+ </context>
36
+
37
+ <execution>
38
+ ### 1. Parse user intent
39
+
40
+ Treat the argument as natural-language intent. If unclear, ask up to 2 questions with ask_user: (a) which command(s) to target, (b) where in the command flow the injection should happen.
41
+
42
+ ### 2. Identify targets, injection points, and visualize
43
+
44
+ For each likely target command, read the pristine source from `$PKG_ROOT/.claude/commands/<name>.md` (preferred — untouched by overlays) or fall back to `~/.claude/commands/<name>.md`. Inspect the XML sections and pick the right one:
45
+
46
+ - **New step after execution** → `section: execution`, `mode: append`
47
+ - **Required reading** → `section: required_reading`, `mode: append`
48
+ - **Preconditions / gating** → `section: context`, `mode: append`
49
+ - **Output quality gate** → `section: success_criteria`, `mode: append`
50
+
51
+ If the user wants a whole new section, use `mode: new-section` with `afterSection: execution` (or whichever anchor makes sense).
52
+
53
+ **Injection point preview** — after selecting section + mode, render the target command's section map showing existing overlays and the new injection point:
54
+
55
+ ```
56
+ === maestro-execute.md (1 overlay exists) ===
57
+
58
+ <purpose>
59
+ <required_reading>
60
+ <context>
61
+ <execution>
62
+ ├─ [existing] cli-verify #1 "CLI Verification step"
63
+ >>> NEW: append here (your overlay)
64
+ <success_criteria>
65
+ ```
66
+
67
+ Use ask_user to confirm:
68
+ - **"Confirm"** — proceed with this injection point
69
+ - **"Pick different section"** — re-select section/mode
70
+ - **"Cancel"** — abort
71
+
72
+ ### 2.5. Skill chain configuration
73
+
74
+ After confirming the injection point, ask whether this overlay should chain to another skill upon completion. This enables the overlay's injected content to hand off to a skill via ask_user at runtime — similar to how `/maestro` chains commands via `invoke_skill({ skill: "...", args: "..." })`.
75
+
76
+ Use ask_user:
77
+ - **"No chain"** — standard overlay, no skill handoff
78
+ - **"Chain to skill"** → ask for the target skill name (e.g., `quality-review`, `maestro-verify`, `quality-test`)
79
+ - **"Chain with alternatives"** → ask for primary skill + 1-2 alternative skills
80
+
81
+ If chain is selected, record the skill name(s) for use in Step 3.
82
+
83
+ ### 3. Draft the overlay JSON
84
+
85
+ Build a slug from the user's intent (kebab-case, lowercase). Write to `~/.maestro/overlays/<slug>.json`:
86
+
87
+ ```json
88
+ {
89
+ "name": "<slug>",
90
+ "description": "<short summary of what and why>",
91
+ "targets": ["maestro-execute"],
92
+ "priority": 50,
93
+ "enabled": true,
94
+ "patches": [
95
+ {
96
+ "section": "execution",
97
+ "mode": "append",
98
+ "content": "## CLI Verification (overlay)\n\nAfter execution, run:\n```\nccw cli -p \"PURPOSE: ...\" --mode analysis --rule analysis-review-code-quality\n```"
99
+ }
100
+ ]
101
+ }
102
+ ```
103
+
104
+ **Content guidelines**
105
+ - Lead the injected block with a heading that includes `(overlay)` so readers see it's machine-injected
106
+ - Keep content concise — overlays should add a step, not rewrite the command
107
+ - `@~/.maestro/...` references are encouraged for pointing at docs
108
+ - Escape `\n` in JSON strings; use a HEREDOC via Bash if content is long
109
+
110
+ **Skill chain content** — if a chain was configured in Step 2.5, append a Skill Handoff block at the end of the patch `content`. The handoff uses ask_user so the user controls whether to proceed:
111
+
112
+ ```markdown
113
+ ---
114
+
115
+ **Skill Handoff** (overlay)
116
+
117
+ After the above step completes, use ask_user:
118
+ - "Proceed to /quality-review" — Hand off to quality review
119
+ - "Skip" — Continue with current command flow
120
+ - "Alternative: /maestro-verify" — Run verification instead
121
+
122
+ On user selection:
123
+ - Proceed → invoke_skill({ skill: "quality-review", args: "{phase}" })
124
+ - Alternative → invoke_skill({ skill: "maestro-verify", args: "{phase}" })
125
+ - Skip → continue normally
126
+ ```
127
+
128
+ Handoff rules:
129
+ - Always include a **"Skip"** option — the user can always decline the chain
130
+ - Use `invoke_skill({ skill: "<name>", args: "..." })` syntax consistent with maestro.md chainMap
131
+ - Mark handoff heading with `(overlay)` tag
132
+ - Support runtime variable placeholders: `{phase}`, `{description}`, `{session_id}`
133
+ - Keep handoff block under 10 lines of markdown
134
+
135
+ ### 4. Install via `maestro overlay add`
136
+
137
+ Run:
138
+
139
+ ```bash
140
+ maestro overlay add ~/.maestro/overlays/<slug>.json
141
+ ```
142
+
143
+ This validates the overlay, copies it into place (idempotent), and applies it across all known install scopes. On validation failure, fix the JSON and re-run.
144
+
145
+ ### 5. Report
146
+
147
+ Show the user:
148
+ - Path of the saved overlay JSON
149
+ - Which targets were patched and which were skipped (missing/disabled)
150
+ - Skill chain info (if configured)
151
+ - A reminder that `maestro install` will auto-reapply on every run
152
+ - How to remove: `maestro overlay remove <slug>`
153
+
154
+ **Report format**
155
+
156
+ ```
157
+ === OVERLAY INSTALLED ===
158
+ Name: <slug>
159
+ Path: ~/.maestro/overlays/<slug>.json
160
+ Targets: maestro-execute (applied), maestro-plan (skipped: missing)
161
+ Chain: quality-review (via ask_user) | none
162
+ Scopes: [global]
163
+
164
+ Re-apply: maestro overlay apply
165
+ Remove: maestro overlay remove <slug>
166
+ Inspect: maestro overlay list
167
+ ```
168
+
169
+ After the report, remind the user they can run `maestro overlay list` for the interactive TUI showing section maps and overlay management.
170
+ </execution>
171
+
172
+ <success_criteria>
173
+ - [ ] Overlay JSON written to `~/.maestro/overlays/<slug>.json` and validates
174
+ - [ ] `maestro overlay add` exited successfully and applied to at least one scope
175
+ - [ ] Target command file(s) contain `<!-- maestro-overlay:<slug>#N hash=... -->` markers
176
+ - [ ] Re-running `maestro overlay apply` produces no file changes (idempotent)
177
+ - [ ] User shown the report with target list and removal instructions
178
+ - [ ] Injection point preview shown (with existing overlays + `>>>` marker) and confirmed before drafting
179
+ - [ ] If chain configured, `content` includes Skill Handoff block with ask_user + Skip option + `invoke_skill()` calls
180
+ </success_criteria>