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
@@ -52,15 +52,21 @@ Research and codebase exploration for context gathering.
52
52
  | package.json / Cargo.toml / pyproject.toml / go.mod exists | Explore |
53
53
  | No project files | Skip (codebase_context = null) |
54
54
 
55
- When project detected:
56
- ```
57
- shell({ command: `maestro delegate "PURPOSE: Explore codebase for context
58
- TASK: • Identify tech stack Map architecture patterns • Document conventions • List integration points
59
- MODE: analysis
60
- CONTEXT: @**/*
61
- EXPECTED: JSON with: tech_stack[], architecture_patterns[], conventions[], integration_points[]" --tool gemini --mode analysis`, run_in_background: false })
55
+ When project detected — prefer `maestro explore` multi-prompt:
56
+ ```bash
57
+ maestro explore \
58
+ "FIND: tech stack and framework detection
59
+ SCOPE: package.json, Cargo.toml, pyproject.toml, go.mod, src/
60
+ EXPECTED: tech_stack list with versions" \
61
+ "FIND: architecture patterns and conventions
62
+ SCOPE: src/
63
+ EXCLUDE: tests, node_modules
64
+ EXPECTED: patterns list with file:line evidence" \
65
+ --max-turns 3 --json
62
66
  ```
63
67
 
68
+ **Fallback**: `maestro delegate "PURPOSE: Explore codebase for context ..." --tool gemini --mode analysis`
69
+
64
70
  ### Tech Profile Scan
65
71
 
66
72
  After codebase exploration, scan results for context-aware trigger signals (based on detected codebase characteristics):
@@ -41,18 +41,22 @@ Scan codebase from multiple perspectives (bug, security, test-coverage, code-qua
41
41
 
42
42
  **Low complexity**: Use `` for quick pattern-based scan.
43
43
 
44
- **Medium/High complexity**: CLI fan-out -- one `maestro delegate --mode analysis` per perspective:
45
-
46
- For each active perspective, build prompt:
47
- ```
48
- PURPOSE: Scan code from <perspective> perspective to discover potential issues
49
- TASK: Analyze code patterns for <perspective> problems, identify anti-patterns, check for common issues
50
- MODE: analysis
51
- CONTEXT: @<scan-scope>
52
- EXPECTED: List of findings with severity (critical/high/medium/low), file:line references, description
53
- CONSTRAINTS: Focus on actionable findings only
44
+ **Medium/High complexity**: Multi-prompt `maestro explore` (preferred for read-only scan):
45
+
46
+ Build one prompt per active perspective:
47
+ ```bash
48
+ maestro explore \
49
+ "FIND: <perspective1> issues and anti-patterns
50
+ SCOPE: <scan-scope>
51
+ ATTENTION: common <perspective1> problems
52
+ EXPECTED: severity + file:line + description" \
53
+ "FIND: <perspective2> issues and anti-patterns
54
+ SCOPE: <scan-scope>
55
+ EXPECTED: severity + file:line + description" \
56
+ --max-turns 3 --json
54
57
  ```
55
- Execute via: `maestro delegate "<prompt>" --role analyze --mode analysis`
58
+
59
+ **Fallback** (when deeper analysis needed per perspective): `maestro delegate "<prompt>" --role analyze --mode analysis`
56
60
 
57
61
  After all perspectives complete:
58
62
  - Parse CLI outputs into structured findings
@@ -58,7 +58,7 @@ Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, arch
58
58
  - Classify findings into dimensions
59
59
 
60
60
  **Medium/High Complexity** (Fan-out):
61
- - Fan-out A: CLI exploration (structure, patterns, dependencies angles) via `maestro delegate --role explore --mode analysis`
61
+ - Fan-out A: `maestro explore` multi-prompt parallel (structure, patterns, dependencies angles) preferred over delegate for exploration
62
62
  - Fan-out B: CLI dimension analysis (parallel per dimension -- code, architecture, testing, dependency, documentation) via `--role analyze`
63
63
  - Fan-out C (High only): Multi-perspective analysis (security, performance, code-quality, architecture) via `--role analyze`
64
64
  - Fan-in: Merge results, cross-deduplicate by file:line, boost severity for multi-source findings
@@ -43,24 +43,31 @@ Explore codebase structure through cli-explore-agent, collecting structured cont
43
43
 
44
44
  ## Phase 3: Codebase Exploration
45
45
 
46
- Use CLI tool for codebase exploration:
47
-
48
- ```javascript
49
- shell({
50
- command: `maestro delegate "PURPOSE: Explore codebase for <topic> from <perspective> perspective; success = structured findings with relevant files and patterns
51
- TASK: • Run module depth analysis • Search for topic-related patterns • Identify key files and their relationships • Extract architectural insights
52
- MODE: analysis
53
- CONTEXT: @**/* | Memory: Session <session-folder>, perspective <perspective>
54
- EXPECTED: JSON output with: relevant_files (path, relevance, summary), patterns, key_findings, module_map, questions_for_analysis, _metadata (perspective, search_queries, timestamp)
55
- CONSTRAINTS: Focus on <perspective> angle - <strategy.focus> | Write to <session>/explorations/exploration-<num>.json
56
- " --tool gemini --mode analysis --rule analysis-analyze-code-patterns`,
57
- run_in_background: false
58
- })
46
+ **Primary: `maestro explore`** (structured multi-prompt):
47
+
48
+ ```bash
49
+ maestro explore \
50
+ "FIND: <topic> patterns and implementations
51
+ SCOPE: src/
52
+ ATTENTION: <perspective>-specific concerns
53
+ EXPECTED: file:line evidence with relevance" \
54
+ "FIND: module boundaries and relationships for <topic>
55
+ SCOPE: src/
56
+ EXCLUDE: tests, generated code
57
+ EXPECTED: dependency pairs and architectural insights" \
58
+ --max-turns 3 --json
59
59
  ```
60
60
 
61
- **ACE fallback** (when CLI produces no output):
62
- ```javascript
63
- ({ project_root_path: ".", query: "<topic> <perspective>" })
61
+ Parse JSON results extract relevant_files, patterns, key_findings.
62
+
63
+ **Fallback: `maestro delegate`** (when explore results insufficient):
64
+
65
+ ```bash
66
+ maestro delegate "PURPOSE: Explore codebase for <topic> from <perspective> perspective
67
+ TASK: Search for topic-related patterns | Identify key files and relationships | Extract architectural insights
68
+ EXPECTED: JSON with relevant_files, patterns, key_findings
69
+ CONSTRAINTS: Focus on <perspective> angle
70
+ " --tool gemini --mode analysis --rule analysis-analyze-code-patterns
64
71
  ```
65
72
 
66
73
  ## Phase 4: Result Validation
@@ -10,96 +10,103 @@ allowed-tools:
10
10
  # CLI Explore Agent
11
11
 
12
12
  ## Role
13
- 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.
13
+ Specialized CLI exploration agent. Autonomously analyzes codebases and generates structured outputs. Read-only.
14
14
 
15
15
  **CRITICAL: Mandatory Initial Read**
16
16
  When spawned with `<files_to_read>`, read ALL listed files before any analysis.
17
17
 
18
18
  **Core responsibilities:**
19
- 1. **Structural Analysis** - Module discovery, file patterns, symbol inventory via Bash tools
20
- 2. **Semantic Understanding** - Design intent, architectural patterns via CLI analysis
21
- 3. **Dependency Mapping** - Import/export graphs, circular detection, coupling analysis
22
- 4. **Structured Output** - Schema-compliant JSON generation with validation
19
+ 1. **Structural Analysis** Module discovery, file patterns, symbol inventory
20
+ 2. **Semantic Understanding** Design intent, architectural patterns via CLI analysis
21
+ 3. **Dependency Mapping** Import/export graphs, circular detection, coupling analysis
22
+ 4. **Structured Output** Schema-compliant JSON generation with validation
23
23
 
24
24
  **Analysis Modes**:
25
- - `quick-scan` → Bash only (fast)
26
- - `deep-scan` → Bash + CLI dual-source (thorough)
27
- - `dependency-map` → Graph construction (comprehensive)
25
+ - `quick-scan` → `maestro explore` single prompt (fast)
26
+ - `deep-scan` → `maestro explore` multi-prompt parallel (thorough)
27
+ - `dependency-map` → Multi-prompt + Bash graph construction (comprehensive)
28
28
 
29
29
  ## 4-Phase Execution Workflow
30
30
 
31
31
  ```
32
- Phase 1: Task Understanding
33
- Parse prompt for: analysis scope, output requirements, schema path
34
- Phase 2: Analysis Execution
35
- Bash structural scan + CLI semantic analysis (based on mode)
36
- Phase 3: Schema Validation (MANDATORY if schema specified)
37
- ↓ Read schema → Extract EXACT field names → Validate structure
38
- Phase 4: Output Generation
39
- ↓ Agent report + File output (strictly schema-compliant)
32
+ Phase 1: Task Understanding → parse scope, output requirements, schema
33
+ Phase 2: Analysis Execution maestro explore + Bash structural scan
34
+ Phase 3: Schema Validation → read schema, validate structure
35
+ Phase 4: Output Generation agent report + file output
40
36
  ```
41
37
 
42
38
  ## Phase 1: Task Understanding
43
39
 
44
- ### Autonomous Initialization (execute before any analysis)
45
-
46
40
  1. **Project Structure Discovery**:
47
41
  - Glob `src/**` and top-level directories to map module structure
48
42
  - Read `package.json` / `Cargo.toml` / `go.mod` / `pyproject.toml` for tech stack
49
43
 
50
44
  2. **Output Schema Loading** (if output file path specified in prompt):
51
- - Read schema file and memorize requirements BEFORE any analysis begins
45
+ - Read schema file and memorize requirements BEFORE any analysis
52
46
 
53
47
  3. **Project Context Loading** (from spec system):
54
48
  - Load exploration specs: `maestro spec load --category arch`
55
- - Extract: tech_stack, architecture, key_components, overview
56
- - If no specs returned, proceed with fresh analysis
57
49
 
58
- 4. **Task Keyword Search** (initial file discovery):
59
- - Extract keywords from prompt, detect primary language, run targeted Grep
60
- - Store results as `keyword_files` for Phase 2 scoping
50
+ 4. **Determine analysis depth from prompt keywords**:
51
+ - Quick lookup, structure overview quick-scan
52
+ - Deep analysis, design intent, architecture deep-scan
53
+ - Dependencies, impact analysis, coupling → dependency-map
61
54
 
62
- **Extract from prompt**:
63
- - Analysis target and scope
64
- - Analysis mode (quick-scan / deep-scan / dependency-map)
65
- - Output file path and schema file path (if specified)
55
+ ## Phase 2: Analysis Execution
66
56
 
67
- **Determine analysis depth from prompt keywords**:
68
- - Quick lookup, structure overview → quick-scan
69
- - Deep analysis, design intent, architecture → deep-scan
70
- - Dependencies, impact analysis, coupling → dependency-map
57
+ ### Primary: `maestro explore` (preferred)
71
58
 
72
- ## Phase 2: Analysis Execution
59
+ **Quick-scan** single targeted prompt:
73
60
 
74
- ### Bash Structural Scan
61
+ ```bash
62
+ maestro explore "FIND: <target from prompt>
63
+ SCOPE: src/
64
+ EXCLUDE: test files, node_modules, generated code
65
+ EXPECTED: file:line evidence list" --max-turns 3
66
+ ```
67
+
68
+ **Deep-scan** — multi-prompt parallel for multi-angle coverage:
75
69
 
76
70
  ```bash
77
- # Pattern discovery (adapt based on language)
78
- rg "^export (class|interface|function) " --type ts -n
79
- rg "^(class|def) \w+" --type py -n
80
- rg "^import .* from " -n | head -30
71
+ maestro explore \
72
+ "FIND: <structural patterns>
73
+ SCOPE: src/
74
+ EXPECTED: file:line list" \
75
+ "FIND: <design intent / architecture>
76
+ SCOPE: src/
77
+ EXPECTED: pattern descriptions with file evidence" \
78
+ --max-turns 3 --json
79
+ ```
80
+
81
+ **Dependency-map** — combine explore + Bash:
82
+
83
+ ```bash
84
+ maestro explore "FIND: import/export relationships
85
+ SCOPE: src/
86
+ ATTENTION: circular dependencies, tight coupling
87
+ EXPECTED: dependency pairs with file:line" --max-turns 4 --json
81
88
  ```
82
89
 
83
- ### CLI Semantic Analysis (deep-scan, dependency-map)
90
+ ### Secondary: Bash structural scan (supplement only)
84
91
 
85
92
  ```bash
86
- maestro delegate "
87
- PURPOSE: {from prompt}
88
- TASK: {from prompt}
89
- MODE: analysis
90
- CONTEXT: @**/*
91
- EXPECTED: {from prompt}
92
- " --role explore --mode analysis --cd {dir}
93
+ rg "^export (class|interface|function) " --type ts -n | head -30
94
+ rg "^import .* from " -n | head -30
93
95
  ```
94
96
 
95
- **Fallback Chain**: config-driven via `cli-tools.json` role mappings Bash-only
97
+ Use Bash only when `maestro explore` results need structural verification.
98
+
99
+ ### Fallback: `maestro delegate` (only when explore unavailable)
100
+
101
+ ```bash
102
+ maestro delegate "PURPOSE: {from prompt} TASK: {from prompt} MODE: analysis" --role explore --mode analysis
103
+ ```
96
104
 
97
105
  ### Dual-Source Synthesis
98
106
 
99
- 1. Bash results: Precise file:line locations → `discovery_source: "bash-scan"`
100
- 2. CLI results: Semantic understanding, design intent → `discovery_source: "cli-analysis"`
101
- 3. Dependency tracing: Import/export graph `discovery_source: "dependency-trace"`
102
- 4. Merge with source attribution and generate for each file:
107
+ 1. Explore results: Semantic findings → `discovery_source: "explore"`
108
+ 2. Bash results: Precise file:line locations → `discovery_source: "bash-scan"`
109
+ 3. Merge with source attribution and generate for each file:
103
110
  - `rationale`: WHY the file was selected (specific, >10 chars)
104
111
  - `topic_relation`: HOW the file connects to the exploration angle/topic
105
112
  - `key_code`: Detailed descriptions of key symbols with locations (for relevance >= 0.7)
@@ -111,39 +118,35 @@ EXPECTED: {from prompt}
111
118
  **Step 1: Read Schema FIRST** before generating any output
112
119
 
113
120
  **Step 2: Extract Schema Requirements**
114
- 1. Root structure - Is it array `[...]` or object `{...}`?
115
- 2. Required fields - List all `"required": [...]` arrays
116
- 3. Field names EXACTLY - Copy character-by-character (case-sensitive)
117
- 4. Enum values - Copy exact strings (case-sensitive)
118
- 5. Nested structures - Note flat vs nested requirements
121
+ 1. Root structure array `[...]` or object `{...}`?
122
+ 2. Required fields list all `"required": [...]` arrays
123
+ 3. Field names EXACTLY copy character-by-character (case-sensitive)
124
+ 4. Enum values copy exact strings (case-sensitive)
125
+ 5. Nested structures note flat vs nested requirements
119
126
 
120
127
  **Step 3: File Rationale Validation** (MANDATORY for relevant_files / affected_files)
121
128
 
122
129
  Every file entry MUST have:
123
130
  - `rationale` (required, minLength 10): Specific reason tied to the exploration topic
124
- - GOOD: "Contains AuthService.login() which is the entry point for JWT token generation"
125
- - BAD: "Related to auth"
126
131
  - `role` (required, enum): modify_target / dependency / pattern_reference / test_target / type_definition / integration_point / config / context_only
127
- - `discovery_source` (recommended): bash-scan / cli-analysis / dependency-trace / manual
132
+ - `discovery_source` (recommended): explore / bash-scan / dependency-trace / manual
128
133
  - `key_code` (required for relevance >= 0.7): Array of {symbol, location?, description}
129
134
  - `topic_relation` (required for relevance >= 0.7): Connection from exploration angle perspective
130
135
 
131
136
  **Step 4: Pre-Output Validation Checklist**
132
- - [ ] Root structure matches schema (array vs object)
137
+ - [ ] Root structure matches schema
133
138
  - [ ] ALL required fields present at each level
134
- - [ ] Field names EXACTLY match schema (character-by-character)
135
- - [ ] Enum values EXACTLY match schema (case-sensitive)
139
+ - [ ] Field names EXACTLY match schema
140
+ - [ ] Enum values EXACTLY match schema
136
141
  - [ ] Every file has: path + relevance + rationale + role
137
142
  - [ ] Files with relevance >= 0.7 have key_code and topic_relation
138
143
 
139
144
  ## Phase 4: Output Generation
140
145
 
141
146
  ### Agent Output (return to caller)
142
-
143
147
  Brief summary: task completion status, key findings, generated file paths
144
148
 
145
149
  ### File Output (as specified in prompt)
146
-
147
150
  1. Read schema file BEFORE generating output
148
151
  2. Extract ALL field names from schema
149
152
  3. Build JSON using ONLY schema field names
@@ -169,16 +172,16 @@ Brief summary: task completion status, key findings, generated file paths
169
172
  ## Rules
170
173
 
171
174
  ### ALWAYS
172
- - Read schema file FIRST before generating any output (if schema specified)
175
+ - Prefer `maestro explore` over raw Grep/rg for code search
176
+ - Use structured prompt format (FIND/SCOPE/EXCLUDE/ATTENTION/EXPECTED)
177
+ - Read schema file FIRST before generating output (if schema specified)
173
178
  - Copy field names EXACTLY from schema (case-sensitive)
174
179
  - Include file:line references in findings
175
- - Every file MUST have rationale (specific, not generic) and role
176
180
  - Track discovery source for all findings
177
- - Populate key_code and topic_relation for high-relevance files (>= 0.7)
178
181
  - Use `run_in_background: false` for all Bash/CLI calls
179
182
 
180
183
  ### NEVER
181
184
  - Modify any files (read-only agent)
182
185
  - Skip schema reading step when schema is specified
183
- - Guess field names - ALWAYS copy from schema
186
+ - Guess field names ALWAYS copy from schema
184
187
  - Omit required fields
@@ -39,6 +39,7 @@ You perform structured multi-dimensional analysis of technical topics, proposals
39
39
  - Comparison alternatives (if applicable)
40
40
  - **Codebase docs** (if `.workflow/codebase/` exists) — `ARCHITECTURE.md` and `CONCERNS.md` as evidence sources for feasibility/risk/dependency dimensions
41
41
  - **Wiki prior knowledge** (if `maestro wiki` available) — `maestro wiki search "<subject keywords>"` for prior decisions and analyses on related topics
42
+ - **Codebase search** — prefer `maestro explore "FIND: <analysis target> SCOPE: src/ EXPECTED: file:line evidence"` over raw Grep for gathering multi-file evidence across dimensions
42
43
 
43
44
  ## Output
44
45
  `analysis.md`:
@@ -116,6 +116,7 @@ You are a collaborative planner that works within a pre-allocated task ID range.
116
116
  - Task files must use `convergence.criteria` (array of testable strings), not `done_when`
117
117
  - files must use `[{path, action, target, change}]` format, not `["path"]`
118
118
  - Each task must have convergence.criteria with min 2 testable conditions
119
+ - 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)
119
120
  - Each task must have `read_first[]` — files the executor MUST read before implementation
120
121
  - `action` must contain concrete values (function signatures, config keys, import paths), not just a verb
121
122
  - Task definitions follow the same schema as workflow-planner output
@@ -49,6 +49,7 @@ Each line in evidence.ndjson:
49
49
  - **Project specs** — `maestro spec load --category debug`: known issues, root causes, workarounds. Check before forming hypotheses to avoid re-investigating known problems.
50
50
  - **Codebase docs** (if `.workflow/codebase/` exists) — Read `ARCHITECTURE.md` for module boundaries to scope impact analysis and form better hypotheses
51
51
  - **Wiki prior knowledge** (if `maestro wiki` available) — `maestro wiki search "<symptom keywords>"` for prior investigations on similar issues; skip already-documented root causes
52
+ - **Codebase search** — prefer `maestro explore "FIND: <symptom> SCOPE: src/ ATTENTION: <error context>"` over raw Grep for multi-file evidence gathering
52
53
 
53
54
  ## Output
54
55
  - Debug session directory with:
@@ -66,6 +66,7 @@ You implement a single task from the execution plan. Each task is executed atomi
66
66
  - Codebase access for implementation
67
67
  - **Codebase docs** (if `.workflow/codebase/` exists) — Read `ARCHITECTURE.md` for module boundaries and component relationships before implementing cross-module changes
68
68
  - **Wiki prior knowledge** (if `maestro wiki` available) — `maestro wiki search "<task keywords>"` for related decisions/constraints that may affect implementation approach
69
+ - **Codebase search** — prefer `maestro explore "FIND: <pattern> SCOPE: src/ EXCLUDE: tests"` over raw Grep when searching for implementation patterns or integration points
69
70
 
70
71
  ## Output
71
72
  - Code changes (the actual implementation)
@@ -159,11 +159,13 @@ These rules prevent over-splitting that wastes tokens on unnecessary agent spawn
159
159
  - **Low** (single file, single concern, zero cross-module): **1 task**
160
160
  - **Medium** (multiple files OR integration point): **1-4 tasks**
161
161
  - **High** (cross-module, architectural, new subsystem): **4-10 tasks**
162
+ 8. **Vertical slice for UI features (MANDATORY)** — 含用户界面的功能必须作为端到端纵向切片交付一个用户可观测能力(后端 endpoint + 前端 wiring + 集成同属一个交付波次),**禁止**拆成 backend-only / frontend-only 任务或按层切波。每个交付波次须闭合一个可用能力,而非一层。
162
163
 
163
164
  ## Constraints
164
165
  - Each task must be substantial (15-60 min of work); group related changes, avoid file-per-task
165
166
  - Each task must have convergence.criteria (min 2 testable conditions)
166
167
  - convergence.criteria must be specific and testable (not "works correctly")
168
+ - 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.
167
169
  - Each task must have `read_first[]` — files the executor MUST read before implementation (the file being modified + source-of-truth files)
168
170
  - `action` must contain concrete values (function signatures, config keys, import paths), not just a verb like "Implement"
169
171
  - files must use array format `[{path, action, target, change}]`
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: domain-add
3
+ description: Register a domain term into project glossary
4
+ argument-hint: <canonical> \"<definition>\"
5
+ allowed-tools:
6
+ - grep_search
7
+ - run_command
8
+ - view_file
9
+ - write_to_file
10
+ ---
11
+ <purpose>
12
+ Register a domain term into `.workflow/domain/glossary.yaml`. Domain terms are automatically injected into agent context via hooks (domain-compact for all prompts, domain-expanded on keyword match).
13
+ </purpose>
14
+
15
+ <required_reading>
16
+ @~/.maestro/workflows/domain-add.md
17
+ </required_reading>
18
+
19
+ <context>
20
+ $ARGUMENTS -- expects `<canonical> "<definition>"`
21
+
22
+ **Examples:**
23
+ ```bash
24
+ /domain-add auth-token "Short-lived credential for API authentication"
25
+ /domain-add event-bus "Central pub-sub message broker for cross-module communication"
26
+ /domain-add 会话上下文 "Runtime state container for active workflow session"
27
+ ```
28
+
29
+ Domain term lifecycle: discover/manual → register → active → (optional) deprecated → removed.
30
+
31
+ **Related commands:**
32
+ - `maestro domain list` — list all registered terms
33
+ - `maestro domain discover` — scan codebase for term candidates
34
+ - `maestro domain show <canonical>` — show term details
35
+ - `maestro domain deprecate <canonical> --successor <new>` — deprecate a term
36
+ </context>
37
+
38
+ <execution>
39
+ Follow '~/.maestro/workflows/domain-add.md' completely.
40
+ </execution>
41
+
42
+ <error_codes>
43
+ | Code | Severity | Description | Stage |
44
+ |------|----------|-------------|-------|
45
+ | E001 | fatal | Canonical name and definition are both required | parse_input |
46
+ | E002 | fatal | `.workflow/domain/` not initialized — run `maestro domain init` first | validate |
47
+ | E003 | fatal | Term already registered with same canonical name | duplicate_check |
48
+ | E004 | warning | Near-match found — confirm merge or create new | duplicate_check |
49
+ </error_codes>
50
+
51
+ <success_criteria>
52
+ - [ ] Canonical name and definition parsed and validated
53
+ - [ ] No duplicate term in glossary (or user confirmed near-match)
54
+ - [ ] Aliases and keywords auto-extracted from definition
55
+ - [ ] Term written to glossary.yaml with tier and relationships
56
+ - [ ] Confirmation displayed with term details and verify command
57
+ </success_criteria>
58
+
59
+ <completion>
60
+ ### Next-step routing
61
+
62
+ | Condition | Suggestion |
63
+ |-----------|-----------|
64
+ | Verify term added | `maestro domain show <canonical>` |
65
+ | Add more terms | `/domain-add <canonical> "<definition>"` |
66
+ | Discover candidates | `maestro domain discover` |
67
+ | List all terms | `maestro domain list` |
68
+ </completion>
@@ -40,17 +40,18 @@ $ARGUMENTS — user intent text, or special keywords.
40
40
  1. **All chains dispatch via maestro-ralph-execute** — maestro never executes steps directly
41
41
  2. **Session before execution** — status.json created before any step runs
42
42
  3. **Auto flag pass-through** — 仅当用户传入 `-y` 时透传 `-y` 到 skill args
43
- 4. **Decomposition contract shared with maestro-ralph** — broad/lifecycle intents run S_DECOMPOSE producing the SAME additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`)Reference maestro-ralph `A_DECOMPOSE_TASKS`
43
+ 4. **Decomposition contract maestro owns** — `source=="maestro"` session maestro 拥有分解契约(`decomposition_owner="maestro"`):S_DECOMPOSE 产出 additive block (`boundary_contract`, `execution_criteria`, `task_decomposition`),下游 ralph 只消费不覆盖(ralph A_DECOMPOSE_TASKS step 0 ownership guard 跳过二次提问)。Reference maestro-ralph `A_DECOMPOSE_TASKS`
44
44
  5. **status.json 唯一真源** — 不生成 `goal-checklist.md` 或外部清单
45
45
  6. **执行步骤统一通过 `maestro ralph next` 加载** — `command_scope`/`command_path` 由 `maestro ralph skills --platform agy --json --quiet` 预校验(project 覆盖 global,限定 `.claude/`);decision 节点不走 CLI,走 `Skill("maestro-ralph")` handoff
46
46
  7. **Topology awareness** — chain catalog 含 grill / brainstorm / blueprint / analyze-macro / analyze / roadmap / plan(三路径) / execute / ...;scope_verdict 由 ralph 在 `post-analyze-scope` 决定
47
- 8. **Grill is interactive-only** — `-y` auto mode MUST skip grill stage and route directly to brainstorm; grill requires Socratic Q&A with the user
47
+ 8. **Grill `-y` 透传** — `-y` auto mode 透传 `-y` grill args(grill 自身 Auto mode 用代码代答),不删除 grill stage;grill 仍产出 grill-report/terminology/context-package 供下游 brainstorm
48
48
  9. **D-007 milestone 反查** — 数字 phase 的 `milestone_id` 由 `state.json.milestones[].phase_slugs` 反查
49
49
  10. **每个 step 必须 `completion_confirmed: true`** — 由 `maestro ralph complete N --status DONE|DONE_WITH_CONCERNS` 写入
50
50
  11. **schema** — `ralph_protocol_version: "1"` 标记 CLI-driven session;新增字段全部可选
51
51
  12. **Invariant violation = BLOCK** — 违反上述任一 invariant 即阻断当前操作,不可绕过。特别是 invariant 1(dispatch via ralph-execute)和 invariant 2(session before execution)和 invariant 10(completion_confirmed 由 CLI 写入)为硬约束。
52
52
  14. **禁止以上下文消耗为由中断执行** — harness 自动处理 context compression,以"上下文不足"或"避免 context overflow"为由中断属于 invariant violation
53
53
  13. **Classification evidence** — S_CLASSIFY 的 chain 选择决策 MUST 记录到 status.json 的 `classification_rationale` 字段:匹配了哪个 pattern、排除了哪些备选、confidence level。无记录的分类不可进入 S_CREATE。
54
+ 15. **控制权优先级(范式治理)** — FSM(maestro/maestro-ralph)独占 session 生命周期 + step 排序 + cross-step decision 节点;Pipeline(plan/execute/analyze)只拥有自身 artifact GATE,由 ralph dispatch 时 GATE 失败 → `complete BLOCKED|NEEDS_RETRY`、自身 GATE 全过 → DONE;Router(maestro-next)只单次推荐,不得出现在 FSM step 内。
54
55
  </invariants>
55
56
 
56
57
  <state_machine>
@@ -129,7 +130,7 @@ S_FALLBACK:
129
130
  1. Read `~/.maestro/workflows/maestro.md` from deferred_reading
130
131
  2. Match intent to task_type via chain catalog (semantic)
131
132
  3. Select chain from chainMap,遵循拓扑约束:
132
- - 压力测试/拷问/验证假设/grill/stress-test → `grill`(**-y 模式跳过 grill,直接走 brainstorm**)
133
+ - 压力测试/拷问/验证假设/grill/stress-test → `grill`(**-y 模式透传 `-y` 到 grill,grill 以 Auto mode 执行,不跳过**)
133
134
  - 头脑风暴/探索 → `brainstorm`
134
135
  - 学习/阅读代码/跟读/follow → `Skill("learn-follow")`;调查/为什么/investigate → `Skill("learn-investigate")`;分解/模式/decompose → `Skill("learn-decompose")`;评审/挑战/second-opinion → `Skill("learn-second-opinion")`;回顾/retro → `Skill("quality-retrospective")`
135
136
  - 正式规格/spec-generate/7-phase → `blueprint`
@@ -147,7 +148,7 @@ S_FALLBACK:
147
148
 
148
149
  ### A_DECOMPOSE_TASKS
149
150
 
150
- maestro-ralph `A_DECOMPOSE_TASKS` 共享分解契约。Condensed:
151
+ `session.decomposition_owner = "maestro"`。下游 ralph 只消费不二次提问(invariant 4)。Condensed:
151
152
 
152
153
  1. 分类意图广度。narrow / 单步 / `{status,init,quick}` 链跳过
153
154
  2. broad/medium → `ask_question` ≤3 轮:Scope / Constraints / Definition of Done
@@ -176,7 +177,7 @@ S_FALLBACK:
176
177
  "ralph_protocol_version": "1", "active_step_index": null,
177
178
  "phase", "phase_is_new": false, "milestone": "",
178
179
  "scope_verdict": null, "analyze_macro_id": null, "blueprint_id": null,
179
- "auto_mode": false, "cli_tool": "claude",
180
+ "auto_mode": false, "decomposition_owner": "maestro", "cli_tool": "claude",
180
181
  "context": { "scratch_dir": null, "plan_dir": null, "analysis_dir": null,
181
182
  "brainstorm_dir": null, "blueprint_dir": null, "issue_id": null },
182
183
  "steps": [{
@@ -221,7 +222,7 @@ S_FALLBACK:
221
222
 
222
223
  - [ ] Intent classified with task_type, complexity, clarity_score
223
224
  - [ ] Chain catalog 覆盖 grill / brainstorm / blueprint / analyze-macro / analyze / roadmap / plan(三路径) / execute / quality pipeline
224
- - [ ] `-y` 模式不触发 grill(交互式压力测试不支持自动模式,跳过直接走 brainstorm)
225
+ - [ ] `-y` 模式透传 `-y` 到 grill(grill 以 Auto mode 代码代答执行,stage 不跳过)
225
226
  - [ ] D-007: 数字 phase 步骤的 `milestone_id` 通过 `state.json.milestones[].phase_slugs` 反查
226
227
  - [ ] macro analyze 后跟 `decision:post-analyze-scope`(由 ralph 评估 scope_verdict 决定下游链路)
227
228
  - [ ] plan 支持 `{phase}` / `--from analyze:{ANL_ID}` / `--from blueprint:{BLP_ID}` 三路径;`source_artifact_ref` 写入 step
@@ -11,8 +11,6 @@ allowed-tools:
11
11
  ---
12
12
  <purpose>
13
13
  Signal-driven overlay generator — collect workflow deficiency signals from multiple sources, diagnose which commands need amendment, batch-generate targeted overlays. All amendments use overlay system (`~/.maestro/overlays/*.json`) — non-invasive, idempotent, survives reinstall.
14
-
15
- Differs from `/maestro-overlay` (single explicit intent). This command **discovers** what needs amending by analyzing workflow artifacts.
16
14
  </purpose>
17
15
 
18
16
  <required_reading>
@@ -25,6 +25,7 @@ Multi-dimensional analysis of a proposal, decision, or architecture choice via C
25
25
  <deferred_reading>
26
26
  - [state.json](~/.maestro/templates/state.json) — read when registering artifact
27
27
  - [issue-gaps-analyze.md](~/.maestro/workflows/issue-gaps-analyze.md) — read when --gaps is triggered
28
+ - [boundary-grill.md](~/.maestro/workflows/boundary-grill.md) — read when boundary conflicts detected (between Phase 4 and Phase 5)
28
29
  </deferred_reading>
29
30
 
30
31
  <context>
@@ -96,6 +97,12 @@ Every decision MUST trace to independently gathered evidence. Manual Read/Grep i
96
97
 
97
98
  Decisions without CLI/agent-sourced evidence MUST be flagged as LOW CONFIDENCE.
98
99
 
100
+ ### Boundary Grill (Step 5 → Step 6)
101
+
102
+ After discussion rounds, BEFORE synthesis: run boundary grill per `~/.maestro/workflows/boundary-grill.md`.
103
+ Input: discussion.md decisions + exploration-codebase.json. Scope guard: "only analyze decisions; do not prejudge plan/execute concerns".
104
+ IF conflicts → results to `analysis.md` § Boundary Grill Results + update `context.md` Locked/Free/Deferred.
105
+
99
106
  ### Standard Mode Gates
100
107
 
101
108
  Gates 1-4 are defined in `analyze.md`. NEVER skip gates. NEVER substitute manual Read/Grep for agent/CLI exploration.
@@ -195,6 +202,8 @@ Full mode:
195
202
  - [ ] Confidence tracking initialized (Step 4.6) and re-scored each round (Step 5.8)
196
203
  - [ ] Readiness gate checked before synthesis (Step 5.10)
197
204
  - [ ] Pressure pass completed ≥ 1 time before Step 6
205
+ - [ ] Boundary grill executed between Phase 4 and Phase 5 (skip if no conflicts detected)
206
+ - [ ] Boundary grill results written to analysis.md § Boundary Grill Results (if conflicts found)
198
207
  - [ ] Confidence summary with factor decomposition written to analysis.md
199
208
 
200
209
  Gaps mode:
@@ -27,6 +27,7 @@ Pipeline: grill (optional) → **brainstorm** → roadmap / analyze / blueprint.
27
27
  - [scratch-index.json](~/.maestro/templates/scratch-index.json) — read when operating in scratch mode
28
28
  - [index.json](~/.maestro/templates/index.json) — read when operating in phase mode
29
29
  - [brainstorm-visualize.md](~/.maestro/workflows/brainstorm-visualize.md) — read when html-prototypes/ produced and user wants to browse them
30
+ - [boundary-grill.md](~/.maestro/workflows/boundary-grill.md) — read when boundary conflicts detected (in cross-role review)
30
31
  </deferred_reading>
31
32
 
32
33
  <context>
@@ -90,8 +91,14 @@ These gates apply to Auto mode (full pipeline). Do NOT advance past a gate until
90
91
  - REQUIRED: Per-feature files `{role}/analysis-F-*.md` written for each feature in §10.
91
92
  - BLOCKED if missing: complete all role analyses before spawning cross-role-reviewer.
92
93
 
93
- **GATE 3: Cross-Role Review → Completion** (Step 4.5 → Report)
94
+ **GATE 2.5: Cross-Role Review → Boundary Grill** (Step 4.5 → Step 4.6)
95
+ Run boundary grill per `~/.maestro/workflows/boundary-grill.md` after cross-role-reviewer output.
96
+ Input: reviewer findings + role Decision Digests. Scope guard: "only brainstorm decisions; do not pre-resolve roadmap/plan choices".
97
+ IF conflicts → results to `guidance-specification.md` §12.5 + feed into GATE 3. NON-BLOCKING.
98
+
99
+ **GATE 3: Cross-Role Review → Completion** (Step 4.5/4.6 → Report)
94
100
  - REQUIRED: Cross-role-reviewer output received with `patch_targets[]`.
101
+ - REQUIRED: Boundary grill completed (if conflicts detected, results logged).
95
102
  - REQUIRED: If findings > 0, resolutions applied via Edit AND logged in `guidance-specification.md` §12.
96
103
  - REQUIRED: If findings == 0, final report explicitly states "No cross-role issues detected".
97
104
  - BLOCKED if missing: complete review synthesis before reporting.
@@ -193,6 +200,8 @@ Status verdicts:
193
200
  - [ ] `ui-designer/analysis.md` references DESIGN.md visual constraints when ui-designer is selected
194
201
  - [ ] Each `{role}/analysis.md` §2 Decisions table has ≥ 1 row per feature
195
202
  - [ ] Cross-role review (Step 4.5) executed; reviewer compares §2 Decision Digests; output includes `patch_targets[]` for every finding
203
+ - [ ] Boundary grill executed after cross-role review (skip if no conflicts detected)
204
+ - [ ] Boundary grill results written to guidance-specification.md §12.5 (if conflicts found)
196
205
  - [ ] If findings exist: each accepted resolution applied via replace_file_content(annotate / strikeout / append) AND logged in `guidance-specification.md` §12 "Cross-Role Resolutions"
197
206
  - [ ] If zero findings: final report explicitly states "No cross-role issues detected"; guidance §12 unchanged
198
207
  - [ ] Heading-drift patch failures surfaced in final report (if any)