maestro-flow 0.5.34 → 0.5.36

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 (325) hide show
  1. package/.agents/agents/cli-explore-agent.md +71 -68
  2. package/.agents/agents/workflow-analyzer.md +1 -0
  3. package/.agents/agents/workflow-collab-planner.md +1 -0
  4. package/.agents/agents/workflow-debugger.md +1 -0
  5. package/.agents/agents/workflow-executor.md +1 -0
  6. package/.agents/agents/workflow-planner.md +2 -0
  7. package/.agents/skills/domain-add/SKILL.md +71 -0
  8. package/.agents/skills/maestro/SKILL.md +7 -6
  9. package/.agents/skills/maestro-amend/SKILL.md +0 -2
  10. package/.agents/skills/maestro-analyze/SKILL.md +9 -0
  11. package/.agents/skills/maestro-brainstorm/SKILL.md +10 -1
  12. package/.agents/skills/maestro-collab/SKILL.md +14 -1
  13. package/.agents/skills/maestro-help/SKILL.md +1 -1
  14. package/.agents/skills/maestro-help/index/catalog.json +0 -1
  15. package/.agents/skills/maestro-help/phases/01-parse-intent.md +1 -1
  16. package/.agents/skills/maestro-next/SKILL.md +15 -4
  17. package/.agents/skills/maestro-overlay/SKILL.md +4 -3
  18. package/.agents/skills/maestro-plan/SKILL.md +15 -4
  19. package/.agents/skills/maestro-ralph/SKILL.md +135 -31
  20. package/.agents/skills/maestro-ralph-execute/SKILL.md +51 -10
  21. package/.agents/skills/maestro-tools-register/SKILL.md +0 -6
  22. package/.agents/skills/maestro-ui-codify/SKILL.md +0 -2
  23. package/.agents/skills/manage-kg-extractors/SKILL.md +0 -2
  24. package/.agents/skills/quality-test/SKILL.md +25 -1
  25. package/.agents/skills/spec-load/SKILL.md +0 -1
  26. package/.agents/skills/spec-setup/SKILL.md +0 -1
  27. package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +13 -7
  28. package/.agents/skills/team-quality-assurance/roles/scout/role.md +15 -11
  29. package/.agents/skills/team-tech-debt/roles/scanner/role.md +1 -1
  30. package/.agents/skills/team-ultra-analyze/roles/explorer/role.md +23 -16
  31. package/.agy/agents/cli-explore-agent.md +71 -68
  32. package/.agy/agents/workflow-analyzer.md +1 -0
  33. package/.agy/agents/workflow-collab-planner.md +1 -0
  34. package/.agy/agents/workflow-debugger.md +1 -0
  35. package/.agy/agents/workflow-executor.md +1 -0
  36. package/.agy/agents/workflow-planner.md +2 -0
  37. package/.agy/skills/domain-add/SKILL.md +68 -0
  38. package/.agy/skills/maestro/SKILL.md +7 -6
  39. package/.agy/skills/maestro-amend/SKILL.md +0 -2
  40. package/.agy/skills/maestro-analyze/SKILL.md +9 -0
  41. package/.agy/skills/maestro-brainstorm/SKILL.md +10 -1
  42. package/.agy/skills/maestro-collab/SKILL.md +14 -1
  43. package/.agy/skills/maestro-help/SKILL.md +1 -1
  44. package/.agy/skills/maestro-help/index/catalog.json +0 -1
  45. package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
  46. package/.agy/skills/maestro-next/SKILL.md +15 -4
  47. package/.agy/skills/maestro-overlay/SKILL.md +4 -3
  48. package/.agy/skills/maestro-plan/SKILL.md +15 -4
  49. package/.agy/skills/maestro-ralph/SKILL.md +135 -31
  50. package/.agy/skills/maestro-ralph-execute/SKILL.md +51 -10
  51. package/.agy/skills/maestro-tools-register/SKILL.md +0 -6
  52. package/.agy/skills/maestro-ui-codify/SKILL.md +0 -2
  53. package/.agy/skills/manage-kg-extractors/SKILL.md +0 -2
  54. package/.agy/skills/quality-test/SKILL.md +25 -1
  55. package/.agy/skills/spec-load/SKILL.md +0 -1
  56. package/.agy/skills/spec-setup/SKILL.md +0 -1
  57. package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +13 -7
  58. package/.agy/skills/team-quality-assurance/roles/scout/role.md +15 -11
  59. package/.agy/skills/team-tech-debt/roles/scanner/role.md +1 -1
  60. package/.agy/skills/team-ultra-analyze/roles/explorer/role.md +23 -16
  61. package/.claude/agents/cli-explore-agent.md +71 -68
  62. package/.claude/agents/workflow-analyzer.md +1 -0
  63. package/.claude/agents/workflow-collab-planner.md +1 -0
  64. package/.claude/agents/workflow-debugger.md +1 -0
  65. package/.claude/agents/workflow-executor.md +1 -0
  66. package/.claude/agents/workflow-planner.md +2 -0
  67. package/.claude/commands/domain-add.md +69 -0
  68. package/.claude/commands/maestro-amend.md +0 -2
  69. package/.claude/commands/maestro-analyze.md +9 -0
  70. package/.claude/commands/maestro-brainstorm.md +10 -1
  71. package/.claude/commands/maestro-collab.md +14 -1
  72. package/.claude/commands/maestro-next.md +15 -4
  73. package/.claude/commands/maestro-overlay.md +4 -3
  74. package/.claude/commands/maestro-plan.md +15 -4
  75. package/.claude/commands/maestro-ralph-execute.md +51 -10
  76. package/.claude/commands/maestro-ralph.md +135 -31
  77. package/.claude/commands/maestro-tools-register.md +0 -6
  78. package/.claude/commands/maestro-ui-codify.md +0 -2
  79. package/.claude/commands/maestro.md +7 -6
  80. package/.claude/commands/manage-kg-extractors.md +0 -2
  81. package/.claude/commands/quality-test.md +25 -1
  82. package/.claude/commands/spec-load.md +0 -1
  83. package/.claude/commands/spec-setup.md +0 -1
  84. package/.claude/skills/maestro-help/SKILL.md +1 -1
  85. package/.claude/skills/maestro-help/index/catalog.json +0 -1
  86. package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
  87. package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +13 -7
  88. package/.claude/skills/team-quality-assurance/roles/scout/role.md +15 -11
  89. package/.claude/skills/team-tech-debt/roles/scanner/role.md +1 -1
  90. package/.claude/skills/team-ultra-analyze/roles/explorer/role.md +23 -16
  91. package/.codex/skills/domain-add/SKILL.md +79 -0
  92. package/.codex/skills/domain-discover/SKILL.md +43 -0
  93. package/.codex/skills/domain-list/SKILL.md +38 -0
  94. package/.codex/skills/learn-follow/SKILL.md +0 -3
  95. package/.codex/skills/learn-investigate/SKILL.md +0 -3
  96. package/.codex/skills/learn-retro/SKILL.md +0 -2
  97. package/.codex/skills/maestro/SKILL.md +34 -13
  98. package/.codex/skills/maestro-amend/SKILL.md +0 -2
  99. package/.codex/skills/maestro-analyze/SKILL.md +36 -6
  100. package/.codex/skills/maestro-blueprint/SKILL.md +0 -4
  101. package/.codex/skills/maestro-brainstorm/SKILL.md +46 -6
  102. package/.codex/skills/maestro-collab/SKILL.md +14 -1
  103. package/.codex/skills/maestro-companion/SKILL.md +0 -2
  104. package/.codex/skills/maestro-execute/SKILL.md +25 -3
  105. package/.codex/skills/maestro-fork/SKILL.md +0 -2
  106. package/.codex/skills/maestro-grill/SKILL.md +9 -1
  107. package/.codex/skills/maestro-next/SKILL.md +12 -5
  108. package/.codex/skills/maestro-plan/SKILL.md +43 -5
  109. package/.codex/skills/maestro-ralph/SKILL.md +10 -3
  110. package/.codex/skills/maestro-ralph-execute/SKILL.md +51 -10
  111. package/.codex/skills/maestro-roadmap/SKILL.md +30 -3
  112. package/.codex/skills/manage-wiki/SKILL.md +0 -2
  113. package/.codex/skills/odyssey-debug/SKILL.md +0 -2
  114. package/.codex/skills/odyssey-improve/SKILL.md +0 -6
  115. package/.codex/skills/odyssey-review-test-fix/SKILL.md +0 -3
  116. package/.codex/skills/odyssey-ui/SKILL.md +0 -3
  117. package/.codex/skills/quality-review/SKILL.md +9 -0
  118. package/.codex/skills/spec-setup/SKILL.md +0 -2
  119. package/.codex/skills/team-coordinate/SKILL.md +0 -3
  120. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +0 -2
  121. package/README.md +28 -5
  122. package/README.zh-CN.md +28 -5
  123. package/chains/_intent-map.json +36 -0
  124. package/chains/blueprint-driven.json +49 -0
  125. package/chains/grill-driven.json +51 -0
  126. package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js +4 -0
  127. package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js.map +1 -1
  128. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.d.ts +6 -0
  129. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js +36 -0
  130. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js.map +1 -0
  131. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.d.ts +1 -1
  132. package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
  133. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +82 -0
  134. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +444 -0
  135. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -0
  136. package/dashboard/dist-server/dashboard/src/server/wiki/search.d.ts +47 -1
  137. package/dashboard/dist-server/dashboard/src/server/wiki/search.js +426 -19
  138. package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
  139. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +16 -0
  140. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  141. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +11 -0
  142. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +492 -1
  143. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
  144. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +18 -0
  145. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +192 -9
  146. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  147. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +42 -0
  148. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
  149. package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
  150. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  151. package/dashboard/dist-server/shared/agent-types.d.ts +1 -1
  152. package/dashboard/dist-server/src/commands/hooks.d.ts +3 -0
  153. package/dashboard/dist-server/src/commands/hooks.js +60 -9
  154. package/dashboard/dist-server/src/commands/hooks.js.map +1 -1
  155. package/dashboard/dist-server/src/graph/kg/extraction/code/code-extractor.js +1 -1
  156. package/dashboard/dist-server/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
  157. package/dashboard/dist-server/src/graph/kg/extraction/knowledge/domain-extractor.js +4 -2
  158. package/dashboard/dist-server/src/graph/kg/extraction/knowledge/domain-extractor.js.map +1 -1
  159. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.js +6 -1
  160. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.js.map +1 -1
  161. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +2 -6
  162. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
  163. package/dashboard/dist-server/src/hooks/session-context.js +37 -1
  164. package/dashboard/dist-server/src/hooks/session-context.js.map +1 -1
  165. package/dashboard/dist-server/src/search/daemon.d.ts +42 -0
  166. package/dashboard/dist-server/src/search/daemon.js +180 -0
  167. package/dashboard/dist-server/src/search/daemon.js.map +1 -0
  168. package/dashboard/dist-server/src/tools/domain-loader.d.ts +4 -1
  169. package/dashboard/dist-server/src/tools/domain-loader.js +56 -25
  170. package/dashboard/dist-server/src/tools/domain-loader.js.map +1 -1
  171. package/dashboard/dist-server/src/tools/domain-schema.d.ts +1 -1
  172. package/dashboard/dist-server/src/tools/domain-schema.js +1 -1
  173. package/dist/shared/agent-types.d.ts +1 -1
  174. package/dist/shared/agent-types.d.ts.map +1 -1
  175. package/dist/src/agents/api-explore/agent-loop.d.ts +14 -0
  176. package/dist/src/agents/api-explore/agent-loop.d.ts.map +1 -0
  177. package/dist/src/agents/api-explore/agent-loop.js +86 -0
  178. package/dist/src/agents/api-explore/agent-loop.js.map +1 -0
  179. package/dist/src/agents/api-explore/config.d.ts +42 -0
  180. package/dist/src/agents/api-explore/config.d.ts.map +1 -0
  181. package/dist/src/agents/api-explore/config.js +99 -0
  182. package/dist/src/agents/api-explore/config.js.map +1 -0
  183. package/dist/src/agents/api-explore/index.d.ts +2 -0
  184. package/dist/src/agents/api-explore/index.d.ts.map +1 -0
  185. package/dist/src/agents/api-explore/index.js +102 -0
  186. package/dist/src/agents/api-explore/index.js.map +1 -0
  187. package/dist/src/agents/api-explore/llm.d.ts +28 -0
  188. package/dist/src/agents/api-explore/llm.d.ts.map +1 -0
  189. package/dist/src/agents/api-explore/llm.js +48 -0
  190. package/dist/src/agents/api-explore/llm.js.map +1 -0
  191. package/dist/src/agents/api-explore/prompt-parser.d.ts +23 -0
  192. package/dist/src/agents/api-explore/prompt-parser.d.ts.map +1 -0
  193. package/dist/src/agents/api-explore/prompt-parser.js +73 -0
  194. package/dist/src/agents/api-explore/prompt-parser.js.map +1 -0
  195. package/dist/src/agents/api-explore/runner.d.ts +65 -0
  196. package/dist/src/agents/api-explore/runner.d.ts.map +1 -0
  197. package/dist/src/agents/api-explore/runner.js +196 -0
  198. package/dist/src/agents/api-explore/runner.js.map +1 -0
  199. package/dist/src/agents/api-explore/session.d.ts +23 -0
  200. package/dist/src/agents/api-explore/session.d.ts.map +1 -0
  201. package/dist/src/agents/api-explore/session.js +57 -0
  202. package/dist/src/agents/api-explore/session.js.map +1 -0
  203. package/dist/src/agents/api-explore/stream-json-emitter.d.ts +10 -0
  204. package/dist/src/agents/api-explore/stream-json-emitter.d.ts.map +1 -0
  205. package/dist/src/agents/api-explore/stream-json-emitter.js +19 -0
  206. package/dist/src/agents/api-explore/stream-json-emitter.js.map +1 -0
  207. package/dist/src/agents/api-explore/system-prompt.d.ts +2 -0
  208. package/dist/src/agents/api-explore/system-prompt.d.ts.map +1 -0
  209. package/dist/src/agents/api-explore/system-prompt.js +31 -0
  210. package/dist/src/agents/api-explore/system-prompt.js.map +1 -0
  211. package/dist/src/agents/api-explore/tools.d.ts +11 -0
  212. package/dist/src/agents/api-explore/tools.d.ts.map +1 -0
  213. package/dist/src/agents/api-explore/tools.js +168 -0
  214. package/dist/src/agents/api-explore/tools.js.map +1 -0
  215. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  216. package/dist/src/agents/cli-agent-runner.js +3 -0
  217. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  218. package/dist/src/cli.js +4 -0
  219. package/dist/src/cli.js.map +1 -1
  220. package/dist/src/commands/domain.d.ts.map +1 -1
  221. package/dist/src/commands/domain.js +5 -4
  222. package/dist/src/commands/domain.js.map +1 -1
  223. package/dist/src/commands/explore.d.ts +7 -0
  224. package/dist/src/commands/explore.d.ts.map +1 -0
  225. package/dist/src/commands/explore.js +201 -0
  226. package/dist/src/commands/explore.js.map +1 -0
  227. package/dist/src/commands/hooks.d.ts +3 -0
  228. package/dist/src/commands/hooks.d.ts.map +1 -1
  229. package/dist/src/commands/hooks.js +60 -9
  230. package/dist/src/commands/hooks.js.map +1 -1
  231. package/dist/src/commands/install.d.ts.map +1 -1
  232. package/dist/src/commands/install.js +42 -9
  233. package/dist/src/commands/install.js.map +1 -1
  234. package/dist/src/commands/search.d.ts +26 -4
  235. package/dist/src/commands/search.d.ts.map +1 -1
  236. package/dist/src/commands/search.js +359 -93
  237. package/dist/src/commands/search.js.map +1 -1
  238. package/dist/src/commands/update.d.ts.map +1 -1
  239. package/dist/src/commands/update.js +37 -21
  240. package/dist/src/commands/update.js.map +1 -1
  241. package/dist/src/commands/workspace.d.ts.map +1 -1
  242. package/dist/src/commands/workspace.js +9 -3
  243. package/dist/src/commands/workspace.js.map +1 -1
  244. package/dist/src/config/cli-tools-defaults.json +2 -1
  245. package/dist/src/core/install-executor.d.ts.map +1 -1
  246. package/dist/src/core/install-executor.js +6 -3
  247. package/dist/src/core/install-executor.js.map +1 -1
  248. package/dist/src/graph/kg/extraction/code/code-extractor.js +1 -1
  249. package/dist/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
  250. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.d.ts.map +1 -1
  251. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.js +4 -2
  252. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.js.map +1 -1
  253. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.d.ts.map +1 -1
  254. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.js +6 -1
  255. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.js.map +1 -1
  256. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  257. package/dist/src/graph/kg/extraction/orchestrator.js +2 -6
  258. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  259. package/dist/src/graph/kg/surface/cli.d.ts.map +1 -1
  260. package/dist/src/graph/kg/surface/cli.js +5 -2
  261. package/dist/src/graph/kg/surface/cli.js.map +1 -1
  262. package/dist/src/hooks/session-context.d.ts.map +1 -1
  263. package/dist/src/hooks/session-context.js +37 -1
  264. package/dist/src/hooks/session-context.js.map +1 -1
  265. package/dist/src/ralph/cmd-next.d.ts.map +1 -1
  266. package/dist/src/ralph/cmd-next.js +66 -4
  267. package/dist/src/ralph/cmd-next.js.map +1 -1
  268. package/dist/src/ralph/status-schema.d.ts +1 -0
  269. package/dist/src/ralph/status-schema.d.ts.map +1 -1
  270. package/dist/src/search/daemon.d.ts +43 -0
  271. package/dist/src/search/daemon.d.ts.map +1 -0
  272. package/dist/src/search/daemon.js +180 -0
  273. package/dist/src/search/daemon.js.map +1 -0
  274. package/dist/src/tools/__tests__/domain-search-debug.js +3 -1
  275. package/dist/src/tools/__tests__/domain-search-debug.js.map +1 -1
  276. package/dist/src/tools/domain-loader.d.ts +4 -1
  277. package/dist/src/tools/domain-loader.d.ts.map +1 -1
  278. package/dist/src/tools/domain-loader.js +56 -25
  279. package/dist/src/tools/domain-loader.js.map +1 -1
  280. package/dist/src/tools/domain-schema.d.ts +1 -1
  281. package/dist/src/tools/domain-schema.js +1 -1
  282. package/dist/src/utils/update-notices.js +12 -0
  283. package/dist/src/utils/update-notices.js.map +1 -1
  284. package/package.json +5 -1
  285. package/shared/agent-types.ts +1 -1
  286. package/templates/search-tools.md +22 -6
  287. package/workflows/agy-instructions.md +0 -4
  288. package/workflows/analyze.md +2 -2
  289. package/workflows/boundary-grill.md +50 -0
  290. package/workflows/brainstorm.md +6 -5
  291. package/workflows/claude-instructions.md +29 -2
  292. package/workflows/codebase-rebuild.md +0 -1
  293. package/workflows/codex-instructions.md +97 -14
  294. package/workflows/command-authoring.md +1 -1
  295. package/workflows/debug.md +0 -4
  296. package/workflows/domain-add.md +115 -0
  297. package/workflows/execute.md +7 -0
  298. package/workflows/explore-usage.md +128 -0
  299. package/workflows/finish-work.md +2 -6
  300. package/workflows/fork.md +0 -4
  301. package/workflows/grill.md +14 -1
  302. package/workflows/harvest.md +0 -3
  303. package/workflows/impeccable/audit.md +0 -2
  304. package/workflows/impeccable/codex.md +0 -4
  305. package/workflows/init.md +9 -0
  306. package/workflows/interview-mechanics.md +3 -2
  307. package/workflows/issue-analyze.md +0 -5
  308. package/workflows/issue-gaps-analyze.codex.md +0 -6
  309. package/workflows/knowledge-audit.md +0 -4
  310. package/workflows/learn.md +0 -6
  311. package/workflows/maestro.codex.md +0 -4
  312. package/workflows/maestro.md +31 -18
  313. package/workflows/merge.md +0 -4
  314. package/workflows/milestone-complete.md +0 -4
  315. package/workflows/overlays.md +0 -10
  316. package/workflows/plan.md +2 -3
  317. package/workflows/roadmap-common.md +0 -4
  318. package/workflows/tdd.md +0 -2
  319. package/workflows/tools-spec.md +1 -7
  320. package/workflows/ui-codify-extract.md +0 -2
  321. package/workflows/ui-codify-package.md +0 -2
  322. package/.agents/skills/maestro-ralph-beta/SKILL.md +0 -882
  323. package/.agy/skills/maestro-ralph-beta/SKILL.md +0 -878
  324. package/.claude/commands/maestro-ralph-beta.md +0 -880
  325. package/.codex/skills/maestro-ralph-beta/SKILL.md +0 -883
@@ -132,19 +132,44 @@ S_FALLBACK:
132
132
  | maestro-brainstorm | topic | `"{intent}"` |
133
133
  | maestro-roadmap | description | `"{intent}"` |
134
134
  | maestro-analyze | phase or topic | `{phase}` or `"{intent}"` |
135
- | maestro-plan | phase or --dir | `{phase}`, or `--dir {scratch_dir}` |
136
- | maestro-execute | phase or --dir | `{phase}`, or `--dir {scratch_dir}` |
135
+ | maestro-plan | phase, --from, or --dir | see --from auto-injection below |
136
+ | maestro-execute | phase or --dir | see --from auto-injection below |
137
137
  | quality-debug | gap context | Read previous step's error/gap |
138
138
  | quality-* | phase | `{phase}` |
139
139
 
140
- **Artifact dir resolution for --dir:**
140
+ **--from auto-injection (phase-level artifact chaining):**
141
+
142
+ Phase-level steps 在 build 阶段无法预知前序 artifact ID。A_RESOLVE_ARGS 运行时从 state.json 查找并注入显式引用,打通 analyze→plan→execute 数据管道:
143
+
141
144
  ```
142
- Read state.json filter artifacts by milestone + phase
143
- plan commands: latest type=="analyze" --dir .workflow/scratch/{path}
144
- execute commands: latest type=="plan" → --dir .workflow/scratch/{path}
145
+ Read state.json.artifacts(含 milestone_history 内归档 artifacts
146
+ filter by milestone={session.milestone} + phase={session.phase} + status=="completed"
147
+
148
+ plan step(含 {phase} 占位符,args 无 --from 且无 --dir):
149
+ 1. 查同 phase+milestone 最新 completed type=="analyze" artifact → id = ANL-xxx
150
+ 2. 命中 → args 追加 --from analyze:{id}
151
+ 3. 写 step.source_artifact_ref = "analyze:{id}"
152
+
153
+ execute step(含 {phase} 占位符,args 无 --dir):
154
+ 1. 查同 phase+milestone 最新 completed type=="plan" artifact → id = PLN-xxx, path = scratch/...
155
+ 2. 命中 → args 追加 --dir .workflow/scratch/{path}
156
+ 3. 写 step.source_artifact_ref = "plan:{id}"
145
157
  ```
146
158
 
147
- Write enriched args back to status.json.
159
+ 兜底:查询无结果 不注入,由命令自身 discovery 逻辑处理。已有 `--from` 或 `--dir` 的 step 不覆盖。
160
+
161
+ **Goal context injection:**
162
+
163
+ 当 step.goal_ref 非空且 session.task_decomposition 存在时:
164
+ ```
165
+ goal = session.task_decomposition.find(g => g.id == step.goal_ref)
166
+ if goal:
167
+ goal_snippet = { id: goal.id, goal: goal.goal, done_when: goal.done_when,
168
+ boundary: goal.boundary, evidence: goal.evidence }
169
+ → 传递给 A_EXEC_STEP 用于 inline execution 前注入(见 step 2 goal context pre-injection)
170
+ ```
171
+
172
+ Write enriched args + source_artifact_ref back to status.json.
148
173
 
149
174
  ### A_EXEC_DECISION
150
175
 
@@ -160,13 +185,24 @@ Write enriched args back to status.json.
160
185
  - 退出码 2 → 交给 S_LOCATE
161
186
  - 退出码 3 → active_step_index 已被占用
162
187
  - 退出码 1 → pause session
163
- 2. **Inline execution** — stdout 执行;deferred_reading 按需 Read
164
- 3. **Complete**:
188
+ 2. **Goal context pre-injection** — A_RESOLVE_ARGS 产出了 `goal_snippet`(step.goal_ref 非空),在 ralph next stdout prompt **顶部前置**以下 block,使执行命令感知当前子目标和执行约束:
189
+ ```
190
+ <goal_context>
191
+ Sub-goal: {goal.id} — {goal.goal}
192
+ Done when: {goal.done_when}
193
+ Boundary: {goal.boundary}
194
+ Evidence target: {goal.evidence}
195
+ Execution criteria: {session.execution_criteria joined by '; '}
196
+ </goal_context>
197
+ ```
198
+ 无 goal_snippet 时跳过此步。goal_context block 不替换 ralph next 的 stdout 内容,仅在其前方拼接。
199
+ 3. **Inline execution** — 按 stdout(含 goal_context 前置)执行;deferred_reading 按需 Read
200
+ 4. **Complete**:
165
201
  - `run_command("maestro ralph complete N --status DONE [--evidence <path>]")`
166
202
  - `run_command("maestro ralph complete N --status DONE_WITH_CONCERNS --concerns \"...\"")`
167
203
  - `run_command("maestro ralph retry N")`
168
204
  - `run_command("maestro ralph complete N --status BLOCKED --reason \"...\"")`
169
- 4. **Propagate context signals** — 关键信号 (`PHASE: N` / `scratch_dir: path` / `BLP-xxx`) 写入 `status.json.context`
205
+ 5. **Propagate context signals** — 关键信号 (`PHASE: N` / `scratch_dir: path` / `BLP-xxx`) 写入 `status.json.context`
170
206
 
171
207
  完成后 S_LOCATE 触发 `view_file(AbsolutePath="<agy-skills-dir>/maestro-ralph-execute/SKILL.md") + execute inline` 自调用。
172
208
 
@@ -242,5 +278,10 @@ Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。/maestro
242
278
  - [ ] Context signals 由执行 step 显式写回 status.json.context(非 ralph-execute 内嵌扫描)
243
279
  - [ ] Auto mode: retry 一次后 pause;interactive 提供 retry/skip/abort
244
280
  - [ ] 自调用持续到全部 completion_confirmed 或 paused
281
+ - [ ] --from auto-injection:phase-level plan step 运行时从 state.json 查找同 phase+milestone 最新 completed analyze artifact → 注入 `--from analyze:{id}`,写 `source_artifact_ref`
282
+ - [ ] --from auto-injection:phase-level execute step 运行时查找同 phase+milestone 最新 completed plan artifact → 注入 `--dir`,写 `source_artifact_ref`
283
+ - [ ] Goal context injection:step.goal_ref 非空时从 task_decomposition 提取 goal_snippet,A_EXEC_STEP 在 ralph next stdout 顶部前置 `<goal_context>` block
284
+ - [ ] Goal context 包含 sub-goal description、done_when、boundary、evidence、execution_criteria
285
+ - [ ] 已有 `--from` 或 `--dir` 的 step 不被 auto-injection 覆盖
245
286
 
246
287
  </appendix>
@@ -70,12 +70,8 @@ Parse $ARGUMENTS to determine mode:
70
70
  - Update frontmatter via: `maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "<summary>"}'`
71
71
  - Do NOT recreate the document — modify in place
72
72
 
73
- **For all modes** — identify the usage timing: when should an agent or user invoke this tool? This becomes the first line of the entry description (see Step 5).
74
-
75
73
  ### Step 3: Determine Category
76
74
 
77
- **Core principle**: `category` = **who consumes this tool** (which agent type discovers and uses it), not what the content is about.
78
-
79
75
  | Category | Consumer Agent | Decision Question | Signal Words |
80
76
  |---|---|---|---|
81
77
  | `coding` | code-developer, workflow-executor | 开发者实现时需要这个流程吗? | build, deploy, integrate, configure, setup, migrate, api-contract |
@@ -89,8 +85,6 @@ Parse $ARGUMENTS to determine mode:
89
85
  - API verification steps (how to test) → `category: test` (RCP-*, tool: true)
90
86
  - Ask user when ambiguous: "This tool content serves both developers and testers. Split into separate documents?"
91
87
 
92
- **Ambiguous cases**: Choose the **primary consumer** — the agent that would fail without this knowledge.
93
-
94
88
  ### Step 4: Decide Inline vs Ref
95
89
 
96
90
  - Steps <10 and no code blocks → **inline mode**
@@ -44,8 +44,6 @@ Load project UI conventions before extracting design system:
44
44
  maestro spec load --category ui
45
45
  ```
46
46
 
47
- If specs not initialized, continue without — the workflow still produces valid output.
48
-
49
47
  ## 2. Execute Workflow
50
48
 
51
49
  Route to `~/.maestro/workflows/ui-codify.md` and follow completely.
@@ -17,8 +17,6 @@ allowed-tools:
17
17
 
18
18
  <purpose>
19
19
  Analyze current repository's code patterns to auto-generate `.workflow/kg/extractors.yaml` — a declarative config that teaches MaestroGraph's codegraph extractor to recognize project-specific symbols beyond standard function/class/method declarations.
20
-
21
- Detects: builder/factory API registrations, domain constant patterns, custom decorator conventions, framework-specific patterns, module-level constants.
22
20
  </purpose>
23
21
 
24
22
  <context>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: quality-test
3
3
  description: Use when implementation needs user acceptance testing with interactive verification and gap closure
4
- argument-hint: [phase] [--smoke] [--auto-fix]
4
+ argument-hint: [phase] [--smoke] [--auto-fix] [--frontend-verify]
5
5
  allowed-tools:
6
6
  - ask_question
7
7
  - define_subagent
@@ -29,6 +29,29 @@ Flags, artifact context resolution, and output directory format defined in workf
29
29
  </context>
30
30
 
31
31
  <execution>
32
+ **Mode select:** `--frontend-verify` → 走下方 **Frontend Verify Mode**(确定性浏览器 smoke,**不是**对话式 UAT);否则 Follow '~/.maestro/workflows/test.md' completely.
33
+
34
+ ### Frontend Verify Mode (`--frontend-verify`)
35
+
36
+ 1. **Resolve targets**: 读 phase 的 `plan.json` / `.task/TASK-*.json`,提取所有 `[UI-observable]` convergence.criteria(plan 阶段产出);缺失则枚举后端写端点(POST/PUT/PATCH/DELETE)作为待验证清单。
37
+ 2. **Start app**: `next start`(或从 dashboard/package.json 解析的既有启动脚本);启动失败 → E003。
38
+ 3. **Drive browser**: 用 chrome-devtools MCP(`mcp__claude_dms3-chrome-devtools__*`:navigate / click / fill / take_snapshot / list_network_requests)逐条执行每个 `[UI-observable]` 流程,断言:UI 入口存在且可触发 → 对应写请求返回 2xx → DOM 出现预期结果。
39
+ 4. **Write evidence**: 产出 `e2e-results.json`(结构见下),逐条记 pass/fail + 证据(网络状态码、快照引用)。**确定性断言,禁止"无人应答=全过"**。
40
+ 5. **Verdict**: 任一 `[UI-observable]` fail 或写端点无 UI 入口 → STATUS=NEEDS_RETRY(ralph 经 post-frontend-verify 触发 Fix-Loop);全过 → DONE。
41
+
42
+ ```json
43
+ // e2e-results.json
44
+ { "phase": "{phase}", "app_url": "http://localhost:3000",
45
+ "checks": [ { "criterion": "[UI-observable] ...", "ui_entry": "<selector/route>",
46
+ "request": "POST /api/notes", "status": 201, "dom_assert": "list shows new item",
47
+ "passed": true } ],
48
+ "summary": { "total": 0, "passed": 0, "failed": 0 }, "verdict": "pass|fail" }
49
+ ```
50
+
51
+ Ralph-invoked 完成:`maestro ralph complete <idx> --status {STATUS} --evidence e2e-results.json`。
52
+
53
+ ---
54
+
32
55
  Follow '~/.maestro/workflows/test.md' completely.
33
56
 
34
57
  ### Phase Gates (MANDATORY, BLOCKING)
@@ -146,4 +169,5 @@ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
146
169
  - [ ] Gaps updated with root_cause, fix_direction, affected_files
147
170
  - [ ] Gap-fix loop triggered if --auto-fix (max 2 iterations)
148
171
  - [ ] Next step routed (phase-transition if pass, verify if auto-fix success, debug --from-uat if issues, test-gen if low coverage)
172
+ - [ ] `--frontend-verify`: 每条 [UI-observable] criterion 经真实浏览器断言,产出 e2e-results.json;任一 fail → NEEDS_RETRY(不放行)
149
173
  </success_criteria>
@@ -74,4 +74,3 @@ Follow '~/.maestro/workflows/specs-load.md' completely.
74
74
  - [ ] Legacy entries filtered by text grep fallback
75
75
  - [ ] Results displayed with file:category references
76
76
  </success_criteria>
77
- </output>
@@ -45,4 +45,3 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
45
45
  - [ ] Workflow recipe knowhow created in `.workflow/knowhow/` for each detected operational workflow (test / debug / build / dev / lint). Each recipe matches the `recipe` schema in `~/.maestro/workflows/knowhow.md` Part B and contains at least one runnable command.
46
46
  - [ ] Report displayed grouped by destination (specs / recipes / skipped / deferred), with `.proposed.md` files surfaced when an existing recipe slug was preserved.
47
47
  </success_criteria>
48
- </output>
@@ -48,15 +48,21 @@ Research and codebase exploration for context gathering.
48
48
  | package.json / Cargo.toml / pyproject.toml / go.mod exists | Explore |
49
49
  | No project files | Skip (codebase_context = null) |
50
50
 
51
- When project detected:
52
- ```
53
- run_command({ command: `maestro delegate "PURPOSE: Explore codebase for context
54
- TASK: • Identify tech stack Map architecture patterns • Document conventions • List integration points
55
- MODE: analysis
56
- CONTEXT: @**/*
57
- EXPECTED: JSON with: tech_stack[], architecture_patterns[], conventions[], integration_points[]" --tool gemini --mode analysis`, run_in_background: false })
51
+ When project detected — prefer `maestro explore` multi-prompt:
52
+ ```bash
53
+ maestro explore \
54
+ "FIND: tech stack and framework detection
55
+ SCOPE: package.json, Cargo.toml, pyproject.toml, go.mod, src/
56
+ EXPECTED: tech_stack list with versions" \
57
+ "FIND: architecture patterns and conventions
58
+ SCOPE: src/
59
+ EXCLUDE: tests, node_modules
60
+ EXPECTED: patterns list with file:line evidence" \
61
+ --max-turns 3 --json
58
62
  ```
59
63
 
64
+ **Fallback**: `maestro delegate "PURPOSE: Explore codebase for context ..." --tool gemini --mode analysis`
65
+
60
66
  ### Tech Profile Scan
61
67
 
62
68
  After codebase exploration, scan results for context-aware trigger signals (based on detected codebase characteristics):
@@ -36,18 +36,22 @@ Scan codebase from multiple perspectives (bug, security, test-coverage, code-qua
36
36
 
37
37
  **Low complexity**: Use `` for quick pattern-based scan.
38
38
 
39
- **Medium/High complexity**: CLI fan-out -- one `maestro delegate --mode analysis` per perspective:
40
-
41
- For each active perspective, build prompt:
42
- ```
43
- PURPOSE: Scan code from <perspective> perspective to discover potential issues
44
- TASK: Analyze code patterns for <perspective> problems, identify anti-patterns, check for common issues
45
- MODE: analysis
46
- CONTEXT: @<scan-scope>
47
- EXPECTED: List of findings with severity (critical/high/medium/low), file:line references, description
48
- CONSTRAINTS: Focus on actionable findings only
39
+ **Medium/High complexity**: Multi-prompt `maestro explore` (preferred for read-only scan):
40
+
41
+ Build one prompt per active perspective:
42
+ ```bash
43
+ maestro explore \
44
+ "FIND: <perspective1> issues and anti-patterns
45
+ SCOPE: <scan-scope>
46
+ ATTENTION: common <perspective1> problems
47
+ EXPECTED: severity + file:line + description" \
48
+ "FIND: <perspective2> issues and anti-patterns
49
+ SCOPE: <scan-scope>
50
+ EXPECTED: severity + file:line + description" \
51
+ --max-turns 3 --json
49
52
  ```
50
- Execute via: `maestro delegate "<prompt>" --role analyze --mode analysis`
53
+
54
+ **Fallback** (when deeper analysis needed per perspective): `maestro delegate "<prompt>" --role analyze --mode analysis`
51
55
 
52
56
  After all perspectives complete:
53
57
  - Parse CLI outputs into structured findings
@@ -55,7 +55,7 @@ Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, arch
55
55
  - Classify findings into dimensions
56
56
 
57
57
  **Medium/High Complexity** (Fan-out):
58
- - Fan-out A: CLI exploration (structure, patterns, dependencies angles) via `maestro delegate --role explore --mode analysis`
58
+ - Fan-out A: `maestro explore` multi-prompt parallel (structure, patterns, dependencies angles) preferred over delegate for exploration
59
59
  - Fan-out B: CLI dimension analysis (parallel per dimension -- code, architecture, testing, dependency, documentation) via `--role analyze`
60
60
  - Fan-out C (High only): Multi-perspective analysis (security, performance, code-quality, architecture) via `--role analyze`
61
61
  - Fan-in: Merge results, cross-deduplicate by file:line, boost severity for multi-source findings
@@ -39,24 +39,31 @@ Explore codebase structure through cli-explore-agent, collecting structured cont
39
39
 
40
40
  ## Phase 3: Codebase Exploration
41
41
 
42
- Use CLI tool for codebase exploration:
43
-
44
- ```javascript
45
- run_command({
46
- command: `maestro delegate "PURPOSE: Explore codebase for <topic> from <perspective> perspective; success = structured findings with relevant files and patterns
47
- TASK: • Run module depth analysis • Search for topic-related patterns • Identify key files and their relationships • Extract architectural insights
48
- MODE: analysis
49
- CONTEXT: @**/* | Memory: Session <session-folder>, perspective <perspective>
50
- EXPECTED: JSON output with: relevant_files (path, relevance, summary), patterns, key_findings, module_map, questions_for_analysis, _metadata (perspective, search_queries, timestamp)
51
- CONSTRAINTS: Focus on <perspective> angle - <strategy.focus> | Write to <session>/explorations/exploration-<num>.json
52
- " --tool gemini --mode analysis --rule analysis-analyze-code-patterns`,
53
- run_in_background: false
54
- })
42
+ **Primary: `maestro explore`** (structured multi-prompt):
43
+
44
+ ```bash
45
+ maestro explore \
46
+ "FIND: <topic> patterns and implementations
47
+ SCOPE: src/
48
+ ATTENTION: <perspective>-specific concerns
49
+ EXPECTED: file:line evidence with relevance" \
50
+ "FIND: module boundaries and relationships for <topic>
51
+ SCOPE: src/
52
+ EXCLUDE: tests, generated code
53
+ EXPECTED: dependency pairs and architectural insights" \
54
+ --max-turns 3 --json
55
55
  ```
56
56
 
57
- **ACE fallback** (when CLI produces no output):
58
- ```javascript
59
- ({ project_root_path: ".", query: "<topic> <perspective>" })
57
+ Parse JSON results extract relevant_files, patterns, key_findings.
58
+
59
+ **Fallback: `maestro delegate`** (when explore results insufficient):
60
+
61
+ ```bash
62
+ maestro delegate "PURPOSE: Explore codebase for <topic> from <perspective> perspective
63
+ TASK: Search for topic-related patterns | Identify key files and relationships | Extract architectural insights
64
+ EXPECTED: JSON with relevant_files, patterns, key_findings
65
+ CONSTRAINTS: Focus on <perspective> angle
66
+ " --tool gemini --mode analysis --rule analysis-analyze-code-patterns
60
67
  ```
61
68
 
62
69
  ## Phase 4: Result Validation
@@ -11,96 +11,103 @@ allowed-tools:
11
11
  # CLI Explore Agent
12
12
 
13
13
  ## Role
14
- You are a specialized CLI exploration agent that autonomously analyzes codebases and generates structured outputs. You perform read-only code exploration using dual-source analysis (Bash structural scan + CLI semantic analysis), validate outputs against schemas, and produce structured JSON results.
14
+ Specialized CLI exploration agent. Autonomously analyzes codebases and generates structured outputs. Read-only.
15
15
 
16
16
  **CRITICAL: Mandatory Initial Read**
17
17
  When spawned with `<files_to_read>`, read ALL listed files before any analysis.
18
18
 
19
19
  **Core responsibilities:**
20
- 1. **Structural Analysis** - Module discovery, file patterns, symbol inventory via Bash tools
21
- 2. **Semantic Understanding** - Design intent, architectural patterns via CLI analysis
22
- 3. **Dependency Mapping** - Import/export graphs, circular detection, coupling analysis
23
- 4. **Structured Output** - Schema-compliant JSON generation with validation
20
+ 1. **Structural Analysis** Module discovery, file patterns, symbol inventory
21
+ 2. **Semantic Understanding** Design intent, architectural patterns via CLI analysis
22
+ 3. **Dependency Mapping** Import/export graphs, circular detection, coupling analysis
23
+ 4. **Structured Output** Schema-compliant JSON generation with validation
24
24
 
25
25
  **Analysis Modes**:
26
- - `quick-scan` → Bash only (fast)
27
- - `deep-scan` → Bash + CLI dual-source (thorough)
28
- - `dependency-map` → Graph construction (comprehensive)
26
+ - `quick-scan` → `maestro explore` single prompt (fast)
27
+ - `deep-scan` → `maestro explore` multi-prompt parallel (thorough)
28
+ - `dependency-map` → Multi-prompt + Bash graph construction (comprehensive)
29
29
 
30
30
  ## 4-Phase Execution Workflow
31
31
 
32
32
  ```
33
- Phase 1: Task Understanding
34
- Parse prompt for: analysis scope, output requirements, schema path
35
- Phase 2: Analysis Execution
36
- Bash structural scan + CLI semantic analysis (based on mode)
37
- Phase 3: Schema Validation (MANDATORY if schema specified)
38
- ↓ Read schema → Extract EXACT field names → Validate structure
39
- Phase 4: Output Generation
40
- ↓ Agent report + File output (strictly schema-compliant)
33
+ Phase 1: Task Understanding → parse scope, output requirements, schema
34
+ Phase 2: Analysis Execution maestro explore + Bash structural scan
35
+ Phase 3: Schema Validation → read schema, validate structure
36
+ Phase 4: Output Generation agent report + file output
41
37
  ```
42
38
 
43
39
  ## Phase 1: Task Understanding
44
40
 
45
- ### Autonomous Initialization (execute before any analysis)
46
-
47
41
  1. **Project Structure Discovery**:
48
42
  - Glob `src/**` and top-level directories to map module structure
49
43
  - Read `package.json` / `Cargo.toml` / `go.mod` / `pyproject.toml` for tech stack
50
44
 
51
45
  2. **Output Schema Loading** (if output file path specified in prompt):
52
- - Read schema file and memorize requirements BEFORE any analysis begins
46
+ - Read schema file and memorize requirements BEFORE any analysis
53
47
 
54
48
  3. **Project Context Loading** (from spec system):
55
49
  - Load exploration specs: `maestro spec load --category arch`
56
- - Extract: tech_stack, architecture, key_components, overview
57
- - If no specs returned, proceed with fresh analysis
58
50
 
59
- 4. **Task Keyword Search** (initial file discovery):
60
- - Extract keywords from prompt, detect primary language, run targeted Grep
61
- - Store results as `keyword_files` for Phase 2 scoping
51
+ 4. **Determine analysis depth from prompt keywords**:
52
+ - Quick lookup, structure overview quick-scan
53
+ - Deep analysis, design intent, architecture deep-scan
54
+ - Dependencies, impact analysis, coupling → dependency-map
62
55
 
63
- **Extract from prompt**:
64
- - Analysis target and scope
65
- - Analysis mode (quick-scan / deep-scan / dependency-map)
66
- - Output file path and schema file path (if specified)
56
+ ## Phase 2: Analysis Execution
67
57
 
68
- **Determine analysis depth from prompt keywords**:
69
- - Quick lookup, structure overview → quick-scan
70
- - Deep analysis, design intent, architecture → deep-scan
71
- - Dependencies, impact analysis, coupling → dependency-map
58
+ ### Primary: `maestro explore` (preferred)
72
59
 
73
- ## Phase 2: Analysis Execution
60
+ **Quick-scan** single targeted prompt:
74
61
 
75
- ### Bash Structural Scan
62
+ ```bash
63
+ maestro explore "FIND: <target from prompt>
64
+ SCOPE: src/
65
+ EXCLUDE: test files, node_modules, generated code
66
+ EXPECTED: file:line evidence list" --max-turns 3
67
+ ```
68
+
69
+ **Deep-scan** — multi-prompt parallel for multi-angle coverage:
76
70
 
77
71
  ```bash
78
- # Pattern discovery (adapt based on language)
79
- rg "^export (class|interface|function) " --type ts -n
80
- rg "^(class|def) \w+" --type py -n
81
- rg "^import .* from " -n | head -30
72
+ maestro explore \
73
+ "FIND: <structural patterns>
74
+ SCOPE: src/
75
+ EXPECTED: file:line list" \
76
+ "FIND: <design intent / architecture>
77
+ SCOPE: src/
78
+ EXPECTED: pattern descriptions with file evidence" \
79
+ --max-turns 3 --json
80
+ ```
81
+
82
+ **Dependency-map** — combine explore + Bash:
83
+
84
+ ```bash
85
+ maestro explore "FIND: import/export relationships
86
+ SCOPE: src/
87
+ ATTENTION: circular dependencies, tight coupling
88
+ EXPECTED: dependency pairs with file:line" --max-turns 4 --json
82
89
  ```
83
90
 
84
- ### CLI Semantic Analysis (deep-scan, dependency-map)
91
+ ### Secondary: Bash structural scan (supplement only)
85
92
 
86
93
  ```bash
87
- maestro delegate "
88
- PURPOSE: {from prompt}
89
- TASK: {from prompt}
90
- MODE: analysis
91
- CONTEXT: @**/*
92
- EXPECTED: {from prompt}
93
- " --role explore --mode analysis --cd {dir}
94
+ rg "^export (class|interface|function) " --type ts -n | head -30
95
+ rg "^import .* from " -n | head -30
94
96
  ```
95
97
 
96
- **Fallback Chain**: config-driven via `cli-tools.json` role mappings Bash-only
98
+ Use Bash only when `maestro explore` results need structural verification.
99
+
100
+ ### Fallback: `maestro delegate` (only when explore unavailable)
101
+
102
+ ```bash
103
+ maestro delegate "PURPOSE: {from prompt} TASK: {from prompt} MODE: analysis" --role explore --mode analysis
104
+ ```
97
105
 
98
106
  ### Dual-Source Synthesis
99
107
 
100
- 1. Bash results: Precise file:line locations → `discovery_source: "bash-scan"`
101
- 2. CLI results: Semantic understanding, design intent → `discovery_source: "cli-analysis"`
102
- 3. Dependency tracing: Import/export graph `discovery_source: "dependency-trace"`
103
- 4. Merge with source attribution and generate for each file:
108
+ 1. Explore results: Semantic findings → `discovery_source: "explore"`
109
+ 2. Bash results: Precise file:line locations → `discovery_source: "bash-scan"`
110
+ 3. Merge with source attribution and generate for each file:
104
111
  - `rationale`: WHY the file was selected (specific, >10 chars)
105
112
  - `topic_relation`: HOW the file connects to the exploration angle/topic
106
113
  - `key_code`: Detailed descriptions of key symbols with locations (for relevance >= 0.7)
@@ -112,39 +119,35 @@ EXPECTED: {from prompt}
112
119
  **Step 1: Read Schema FIRST** before generating any output
113
120
 
114
121
  **Step 2: Extract Schema Requirements**
115
- 1. Root structure - Is it array `[...]` or object `{...}`?
116
- 2. Required fields - List all `"required": [...]` arrays
117
- 3. Field names EXACTLY - Copy character-by-character (case-sensitive)
118
- 4. Enum values - Copy exact strings (case-sensitive)
119
- 5. Nested structures - Note flat vs nested requirements
122
+ 1. Root structure array `[...]` or object `{...}`?
123
+ 2. Required fields list all `"required": [...]` arrays
124
+ 3. Field names EXACTLY copy character-by-character (case-sensitive)
125
+ 4. Enum values copy exact strings (case-sensitive)
126
+ 5. Nested structures note flat vs nested requirements
120
127
 
121
128
  **Step 3: File Rationale Validation** (MANDATORY for relevant_files / affected_files)
122
129
 
123
130
  Every file entry MUST have:
124
131
  - `rationale` (required, minLength 10): Specific reason tied to the exploration topic
125
- - GOOD: "Contains AuthService.login() which is the entry point for JWT token generation"
126
- - BAD: "Related to auth"
127
132
  - `role` (required, enum): modify_target / dependency / pattern_reference / test_target / type_definition / integration_point / config / context_only
128
- - `discovery_source` (recommended): bash-scan / cli-analysis / dependency-trace / manual
133
+ - `discovery_source` (recommended): explore / bash-scan / dependency-trace / manual
129
134
  - `key_code` (required for relevance >= 0.7): Array of {symbol, location?, description}
130
135
  - `topic_relation` (required for relevance >= 0.7): Connection from exploration angle perspective
131
136
 
132
137
  **Step 4: Pre-Output Validation Checklist**
133
- - [ ] Root structure matches schema (array vs object)
138
+ - [ ] Root structure matches schema
134
139
  - [ ] ALL required fields present at each level
135
- - [ ] Field names EXACTLY match schema (character-by-character)
136
- - [ ] Enum values EXACTLY match schema (case-sensitive)
140
+ - [ ] Field names EXACTLY match schema
141
+ - [ ] Enum values EXACTLY match schema
137
142
  - [ ] Every file has: path + relevance + rationale + role
138
143
  - [ ] Files with relevance >= 0.7 have key_code and topic_relation
139
144
 
140
145
  ## Phase 4: Output Generation
141
146
 
142
147
  ### Agent Output (return to caller)
143
-
144
148
  Brief summary: task completion status, key findings, generated file paths
145
149
 
146
150
  ### File Output (as specified in prompt)
147
-
148
151
  1. Read schema file BEFORE generating output
149
152
  2. Extract ALL field names from schema
150
153
  3. Build JSON using ONLY schema field names
@@ -170,16 +173,16 @@ Brief summary: task completion status, key findings, generated file paths
170
173
  ## Rules
171
174
 
172
175
  ### ALWAYS
173
- - Read schema file FIRST before generating any output (if schema specified)
176
+ - Prefer `maestro explore` over raw Grep/rg for code search
177
+ - Use structured prompt format (FIND/SCOPE/EXCLUDE/ATTENTION/EXPECTED)
178
+ - Read schema file FIRST before generating output (if schema specified)
174
179
  - Copy field names EXACTLY from schema (case-sensitive)
175
180
  - Include file:line references in findings
176
- - Every file MUST have rationale (specific, not generic) and role
177
181
  - Track discovery source for all findings
178
- - Populate key_code and topic_relation for high-relevance files (>= 0.7)
179
182
  - Use `run_in_background: false` for all Bash/CLI calls
180
183
 
181
184
  ### NEVER
182
185
  - Modify any files (read-only agent)
183
186
  - Skip schema reading step when schema is specified
184
- - Guess field names - ALWAYS copy from schema
187
+ - Guess field names ALWAYS copy from schema
185
188
  - Omit required fields
@@ -40,6 +40,7 @@ You perform structured multi-dimensional analysis of technical topics, proposals
40
40
  - Comparison alternatives (if applicable)
41
41
  - **Codebase docs** (if `.workflow/codebase/` exists) — `ARCHITECTURE.md` and `CONCERNS.md` as evidence sources for feasibility/risk/dependency dimensions
42
42
  - **Wiki prior knowledge** (if `maestro wiki` available) — `maestro wiki search "<subject keywords>"` for prior decisions and analyses on related topics
43
+ - **Codebase search** — prefer `maestro explore "FIND: <analysis target> SCOPE: src/ EXPECTED: file:line evidence"` over raw Grep for gathering multi-file evidence across dimensions
43
44
 
44
45
  ## Output
45
46
  `analysis.md`:
@@ -117,6 +117,7 @@ You are a collaborative planner that works within a pre-allocated task ID range.
117
117
  - Task files must use `convergence.criteria` (array of testable strings), not `done_when`
118
118
  - files must use `[{path, action, target, change}]` format, not `["path"]`
119
119
  - Each task must have convergence.criteria with min 2 testable conditions
120
+ - Vertical slice for UI features: deliver backend + frontend + integration as one end-to-end capability per wave (no backend-only/frontend-only split); each UI delivery wave needs ≥1 task with a `[UI-observable]` convergence criterion (verifiable user-facing flow)
120
121
  - Each task must have `read_first[]` — files the executor MUST read before implementation
121
122
  - `action` must contain concrete values (function signatures, config keys, import paths), not just a verb
122
123
  - Task definitions follow the same schema as workflow-planner output
@@ -50,6 +50,7 @@ Each line in evidence.ndjson:
50
50
  - **Project specs** — `maestro spec load --category debug`: known issues, root causes, workarounds. Check before forming hypotheses to avoid re-investigating known problems.
51
51
  - **Codebase docs** (if `.workflow/codebase/` exists) — Read `ARCHITECTURE.md` for module boundaries to scope impact analysis and form better hypotheses
52
52
  - **Wiki prior knowledge** (if `maestro wiki` available) — `maestro wiki search "<symptom keywords>"` for prior investigations on similar issues; skip already-documented root causes
53
+ - **Codebase search** — prefer `maestro explore "FIND: <symptom> SCOPE: src/ ATTENTION: <error context>"` over raw Grep for multi-file evidence gathering
53
54
 
54
55
  ## Output
55
56
  - Debug session directory with:
@@ -67,6 +67,7 @@ You implement a single task from the execution plan. Each task is executed atomi
67
67
  - Codebase access for implementation
68
68
  - **Codebase docs** (if `.workflow/codebase/` exists) — Read `ARCHITECTURE.md` for module boundaries and component relationships before implementing cross-module changes
69
69
  - **Wiki prior knowledge** (if `maestro wiki` available) — `maestro wiki search "<task keywords>"` for related decisions/constraints that may affect implementation approach
70
+ - **Codebase search** — prefer `maestro explore "FIND: <pattern> SCOPE: src/ EXCLUDE: tests"` over raw Grep when searching for implementation patterns or integration points
70
71
 
71
72
  ## Output
72
73
  - Code changes (the actual implementation)
@@ -160,11 +160,13 @@ These rules prevent over-splitting that wastes tokens on unnecessary agent spawn
160
160
  - **Low** (single file, single concern, zero cross-module): **1 task**
161
161
  - **Medium** (multiple files OR integration point): **1-4 tasks**
162
162
  - **High** (cross-module, architectural, new subsystem): **4-10 tasks**
163
+ 8. **Vertical slice for UI features (MANDATORY)** — 含用户界面的功能必须作为端到端纵向切片交付一个用户可观测能力(后端 endpoint + 前端 wiring + 集成同属一个交付波次),**禁止**拆成 backend-only / frontend-only 任务或按层切波。每个交付波次须闭合一个可用能力,而非一层。
163
164
 
164
165
  ## Constraints
165
166
  - Each task must be substantial (15-60 min of work); group related changes, avoid file-per-task
166
167
  - Each task must have convergence.criteria (min 2 testable conditions)
167
168
  - convergence.criteria must be specific and testable (not "works correctly")
169
+ - For UI features, each delivery wave MUST have ≥1 task with a `[UI-observable]` convergence criterion — a verifiable user-facing flow (e.g. `[UI-observable] User can create a Note in the UI and see it in the list`). Backend-only criteria do NOT satisfy this; the runtime check is enforced by ralph's frontend-verify gate.
168
170
  - Each task must have `read_first[]` — files the executor MUST read before implementation (the file being modified + source-of-truth files)
169
171
  - `action` must contain concrete values (function signatures, config keys, import paths), not just a verb like "Implement"
170
172
  - files must use array format `[{path, action, target, change}]`