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
@@ -9,8 +9,6 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
9
9
  Task companion command — pairs with any task to provide knowledge context loading,
10
10
  structured companion document recording, insight capture, and skill routing.
11
11
 
12
- Does not create sessions or modify workflow state. Pure side-car utility.
13
-
14
12
  Four modes:
15
13
  - **before** — Pre-task: load spec + knowhow index + codebase index, create companion doc
16
14
  - **note** — Mid-task: append a structured entry to the active companion doc
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-execute
3
3
  description: Use when a confirmed plan is ready for implementation
4
- argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--auto-commit] [--method agent|cli] [--dir <path>]\""
4
+ argument-hint: "[-y|--yes] [--concurrency N] [-c|--continue] \"<phase> [--auto-commit] [--method agent|cli] [--dir <path>]\""
5
5
  allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
@@ -75,8 +75,8 @@ $maestro-execute --continue "20260318-execute-P3-phase3"
75
75
 
76
76
  **Flags**:
77
77
  - `-y, --yes`: Skip all confirmations (auto mode)
78
- - `-c, --concurrency N`: Max concurrent agents within each wave (default: 5)
79
- - `--continue`: Resume existing session
78
+ - `--concurrency N`: Max concurrent agents within each wave (default: 5)
79
+ - `-c, --continue`: Resume existing session
80
80
 
81
81
  **Inner flags** (passed inside quotes):
82
82
  - `--auto-commit`: Atomic git commit after each task completion
@@ -335,6 +335,28 @@ After each wave: if blocked tasks exist, prompt user to continue or stop (AUTO_Y
335
335
 
336
336
  Blocked/failed tasks cascade: mark all downstream dependents as `skipped` with error "Dependency {dep_id} blocked/failed".
337
337
 
338
+ ### Phase 2.5: Verification Gate
339
+
340
+ **Objective**: Cross-validate execution results against convergence criteria using external model perspective.
341
+
342
+ 1. **Collect verification targets**: For each completed task, read `.summaries/TASK-{NNN}-summary.md` + convergence criteria from `.task/TASK-{NNN}.json`
343
+ 2. **Delegate verification**: Run `maestro delegate` with accumulated evidence:
344
+ ```
345
+ maestro delegate "PURPOSE: 验证执行结果是否满足 convergence criteria
346
+ TASK: 逐项检查 | 对照 criteria | 标注 pass/fail | 汇总 gaps
347
+ CONTEXT: @.summaries/ @.task/
348
+ EXPECTED: verification.json { tasks: [{ id, criteria_met: bool, gaps: [] }], overall_pass: bool }
349
+ CONSTRAINTS: 只验证不修改" --role analyze --mode analysis
350
+ ```
351
+ 3. **Write verification.json** to plan directory with per-task pass/fail and gap list
352
+ 4. **Gate decision**:
353
+ - `overall_pass == true` → proceed to Phase 3
354
+ - Critical gaps (task criteria all failed) → log warning, mark affected tasks as `needs_retry`
355
+ - Non-critical gaps → record as `concerns` in verification.json, proceed
356
+ 5. **Register VRF artifact**: `{ id: "VRF-{next}", type: "verify", scope, path: verification.json, depends_on: "EXC-{id}" }`
357
+
358
+ Skip Phase 2.5 when `--skip-verify` flag present or task count == 0.
359
+
338
360
  ### Phase 3: Results Aggregation
339
361
 
340
362
  **Objective**: Update all state files and generate execution report.
@@ -12,8 +12,6 @@ the worktree. Since `.workflow/` is gitignored, this command explicitly copies p
12
12
  and milestone scratch artifacts into the worktree.
13
13
 
14
14
  Also supports `--sync` mode to pull latest main into an active worktree.
15
-
16
- Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree, and writes a scoped `state.json` inside the worktree containing only the forked milestone's artifacts.
17
15
  </purpose>
18
16
 
19
17
  <required_reading>
@@ -7,7 +7,6 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
7
7
  <purpose>
8
8
  Socratic stress-testing of a plan, idea, or requirement against codebase reality. Walks every branch of the decision tree one question at a time — challenging vague terminology against existing code, probing edge cases with concrete scenarios, and verifying assumptions with code evidence. Produces a verified context package (grill-report.md + terminology.md + context-package.json) for downstream brainstorm/analyze/roadmap consumption.
9
9
 
10
- Positioned BEFORE brainstorm in the pipeline: grill stress-tests and sharpens; brainstorm generates and elaborates.
11
10
 
12
11
  Codex specifics:
13
12
  - **No agent spawning** — codebase exploration runs directly via Glob/Grep/Read in coordinator context.
@@ -110,8 +109,17 @@ Resume routing:
110
109
  - [ ] `context-package.json` generated with schema "context-package/1.0"
111
110
  - [ ] Artifact registered in state.json (type=grill, id=GRL-xxx)
112
111
  - [ ] Session sealed via finish-work
112
+ - [ ] Ralph-invoked: `maestro ralph complete <idx> --status {STATUS}` called with correct verdict
113
113
  </success_criteria>
114
114
 
115
+ <ralph_completion>
116
+ When invoked as a ralph session step, end by calling the CLI (no standalone report):
117
+ ```
118
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
119
+ ```
120
+ Status verdicts: **DONE** (normal), **DONE_WITH_CONCERNS** (caveats; pass `--concerns`), **NEEDS_RETRY** (transient error), **BLOCKED** (hard blocker; pass `--reason`).
121
+ </ralph_completion>
122
+
115
123
  <on_complete>
116
124
  @~/.maestro/workflows/finish-work.md — SESSION_DIR={output_dir}, SESSION_TYPE=grill, SESSION_ID={artifact_id}, LINKED_MILESTONE=null
117
125
  </on_complete>
@@ -19,10 +19,6 @@ Codex specifics:
19
19
  - **Skill pool discovery via CLI** — `maestro ralph skills --platform codex --json --quiet`(project `.codex/skills/` 覆盖 global `~/.codex/skills/`)
20
20
  - **No session, no status.json, no goal** — 不调 `create_goal` / `update_plan`,由目标 skill 自行管理产出
21
21
 
22
- 与 `$maestro` / `$maestro-ralph` 区别:
23
- - 不创建 session、不构建 chain、不写 status.json
24
- - 始终只推 1 个 top pick,最多列 2-3 个备选
25
- - 适用场景:意图清晰且单步即可完成;或需要定向推荐时
26
22
  </purpose>
27
23
 
28
24
  <context>
@@ -132,7 +128,8 @@ ls -la .workflow/.maestro/ 2>/dev/null | head -5 # 进行中的 session
132
128
  | 最新 artifact = plan | execute | `maestro-execute {phase}` |
133
129
  | 最新 artifact = execute | review | `quality-review {phase}` |
134
130
  | review verdict=PASS | test-gen | `quality-auto-test {phase}` |
135
- | 测试全绿 | milestone-audit | `maestro-milestone-audit` |
131
+ | 测试全绿 + current_milestone 存在 | milestone-audit | `maestro-milestone-audit` |
132
+ | 测试全绿 + current_milestone=null (standalone) | review-done | 回退到 `quality-review` 或 `manage-status`(无 milestone 上下文时不推荐 milestone 命令) |
136
133
  | 当前 milestone 全 phase 完成 | milestone-complete | `maestro-milestone-complete` |
137
134
  | 任一 stage 产物含 gaps/failed | debug | `quality-debug {gap}` |
138
135
 
@@ -155,6 +152,16 @@ brainstorm → blueprint → init → analyze-macro → roadmap
155
152
  | `name` 关键词命中 intent | 中 | intent 含 "test" → quality-test/quality-auto-test 加分 |
156
153
  | Workflow 簇匹配 | 中 | intent 涉及学习/知识/issue 等场景触发对应簇 |
157
154
  | Recent activity 反向避免 | 低 | 刚完成的 stage 短期内降权 |
155
+ | **前置条件不满足** | **禁止** | 候选 skill 的前置条件未满足时,直接从候选池移除(如 `maestro-milestone-*` 在 `current_milestone=null` 时移除) |
156
+
157
+ **前置条件检查(评分前执行,不满足则移除候选):**
158
+
159
+ | Skill | 前置条件 |
160
+ |-------|---------|
161
+ | `maestro-milestone-audit` | `current_milestone` 存在且非 null |
162
+ | `maestro-milestone-complete` | `current_milestone` 存在且非 null |
163
+ | `maestro-milestone-release` | `current_milestone` 存在且非 null |
164
+ | `maestro-merge` | 存在活跃的 fork 分支 |
158
165
 
159
166
  **特殊意图处理:**
160
167
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-plan
3
3
  description: Use when creating, revising, or verifying an execution plan for a phase or task
4
- argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--dir <path>] [--from <source>] [--gaps] [--spec SPEC-xxx] [--collab]\""
4
+ argument-hint: "[-y|--yes] [--concurrency N] [-c|--continue] \"<phase> [--dir <path>] [--from <source>] [--gaps] [--spec SPEC-xxx] [--collab]\""
5
5
  allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
@@ -65,7 +65,7 @@ All mean: **follow the cycle anyway**.
65
65
  <context>
66
66
  $ARGUMENTS — phase number/text and optional flags.
67
67
 
68
- **Flags**: `-y` (auto), `-c N` (concurrency, default 4), `--continue` (resume), `--dir <path>`, `--from <source>` (load upstream context directly: analyze:ANL-xxx, blueprint:BLP-xxx, brainstorm:ID, @file, path), `--gaps` (issue-linked), `--spec SPEC-xxx`, `--collab`, `--revise`, `--check`, `--tdd` (RED-GREEN-REFACTOR task chains)
68
+ **Flags**: `-y` (auto), `--concurrency N` (default 4), `-c`/`--continue` (resume), `--dir <path>`, `--from <source>` (load upstream context directly: analyze:ANL-xxx, blueprint:BLP-xxx, brainstorm:ID, @file, path), `--gaps` (issue-linked), `--spec SPEC-xxx`, `--collab`, `--revise`, `--check`, `--tdd` (RED-GREEN-REFACTOR task chains)
69
69
 
70
70
  **Scope routing** (priority, per redesign §5.2):
71
71
  1. `--from analyze:ANL-xxx` → CONTEXT_DIR = ANL artifact path; scope=`standalone`
@@ -89,6 +89,14 @@ Write resolved milestone into PLN artifact registration and `plan.json.milestone
89
89
  **Scratch**: `.workflow/scratch/{YYYYMMDD}-plan-P{N}-{slug}/` (.task/ subdir)
90
90
 
91
91
  **Pre-load** (optional): context-package.json (via `--from`, takes precedence), context.md (prior analyze), conclusions.json, codebase ARCHITECTURE.md, `maestro search`, `maestro spec load --category arch`, team preflight `maestro collab preflight`.
92
+
93
+ **D-008 Ad-hoc Milestone Auto-Creation**: When scope resolves to `standalone` via standard resolution (routes 6 or 7, NOT via `--from`), and `state.json.current_milestone == null`, auto-create an adhoc milestone:
94
+ ```
95
+ milestone_id = "ADH-{YYYYMMDD}-{slug}"
96
+ state.json.milestones.push({ id: milestone_id, name: "{intent slug}", type: "adhoc", status: "active", phase_slugs: [] })
97
+ state.json.current_milestone = milestone_id
98
+ ```
99
+ **Exception**: `--from analyze:ANL-xxx` or `--from blueprint:BLP-xxx` → skip adhoc creation (upstream artifact provides milestone context or is intentionally milestone-free).
92
100
  </context>
93
101
 
94
102
  <csv_schema>
@@ -145,8 +153,13 @@ S_WAVE_1 → S_WAVE_2 DO: spawn parallel explorations, merge results, build p
145
153
 
146
154
  S_WAVE_2 → S_CHECK DO: spawn planning agent, merge results
147
155
 
148
- S_CHECK → S_CONFIRM WHEN: plan passes or max 3 iterations DO: A_PLAN_CHECK
149
- S_CHECK → S_WAVE_2 WHEN: plan fails check, iterations < 3 DO: feed checker feedback back
156
+ S_CHECK → S_BOUNDARY_GRILL WHEN: plan passes or max 3 iterations DO: A_PLAN_CHECK
157
+ S_CHECK → S_WAVE_2 WHEN: plan fails check, iterations < 3 DO: feed checker feedback back
158
+
159
+ S_BOUNDARY_GRILL:
160
+ → S_CONFIRM WHEN: no boundary conflicts detected DO: —
161
+ → S_CONFIRM WHEN: conflicts detected + resolved DO: A_BOUNDARY_GRILL
162
+ GUARD: max 3 conflicts × 3 questions; non-blocking (see boundary-grill.md)
150
163
 
151
164
  S_CONFIRM → S_REGISTER WHEN: -y OR user confirms
152
165
  S_CONFIRM → S_CSV_GEN WHEN: user wants to modify
@@ -197,10 +210,32 @@ Each explores one angle: architecture (module boundaries, deps), patterns (simil
197
210
  Consumes all exploration findings + context.md + specs. Produces:
198
211
  - `plan.json`: summary, approach, task_ids, waves (with phase labels), confidence section
199
212
  - `.task/TASK-*.json`: each with read_first[], convergence.criteria[] (grep-verifiable), concrete action/implementation
200
- - Deep Work Rules: every task has read_first with file being modified + source of truth files
213
+
214
+ **Deep Work Rules** (MANDATORY for every task):
215
+ 1. `read_first[]`: MUST contain the file being modified + source-of-truth files (tests, interfaces, schemas)
216
+ 2. `convergence.criteria[]`: MUST be grep-verifiable (e.g., `"src/auth.ts contains export function verifyToken("`) — no subjective language ("well-structured", "properly implemented")
217
+ 3. `action`: concrete implementation verb (create/modify/delete/refactor) + target path
218
+ 4. `implementation[]`: ordered steps with file:change pairs — each step < 60 min
219
+ - Anti-pattern: `"Implement the feature"` (vague). Correct: `"Create src/auth.ts with verifyToken() and generateToken() functions using jsonwebtoken"`
220
+ - Anti-pattern: `read_first: []` (empty). Every file change requires reading the target first.
221
+
222
+ **Anti-splitting Rules**:
223
+ 1. One feature = one task (don't split "create auth module" into "create file" + "add exports")
224
+ 2. Group trivial changes (< 5 min each) into a single task
225
+ 3. `depends_on` only for genuine data/API dependencies, not arbitrary sequencing
226
+ 4. Task count guards: simple scope → 1-2 tasks, medium → 2-4, complex → 4-8
227
+
228
+ **UI-observable criteria**: If plan touches UI paths (components/, pages/, styles/) or frontend keywords, at least 1 convergence criterion per delivery wave MUST be UI-observable (e.g., `"page renders without console errors"`, `"button click triggers API call"`).
201
229
 
202
230
  Verifies plan.json and every .task/*.json exists on disk before reporting completed; else report blocked.
203
231
 
232
+ ### A_BOUNDARY_GRILL
233
+
234
+ Run boundary grill per `~/.maestro/workflows/boundary-grill.md` after plan-checker pass.
235
+ Input: plan.json tasks + convergence criteria + upstream context. Scope guard: "only plan scope; do not re-analyze or re-scope".
236
+ IF conflicts → results to plan.json `boundary_grill` section + affected TASK files. DEC conflicts add `boundary_warning` to confidence.
237
+ Non-blocking: warnings, not hard stops.
238
+
204
239
  ### A_PLAN_CHECK
205
240
  Run plan-checker: coverage, dependency validity, criteria quality, pressure pass on highest-complexity task.
206
241
  Confidence: 5-dimension factor model + readiness gate.
@@ -240,6 +275,9 @@ Collision detection against same-milestone plans.
240
275
  - [ ] .task/TASK-*.json with read_first[] (file being modified + source of truth files)
241
276
  - [ ] Every task has convergence.criteria[] with grep-verifiable conditions (no subjective language)
242
277
  - [ ] Every task action and implementation contain concrete values (no "align X with Y")
278
+ - [ ] Boundary grill executed after plan-checker pass (skip if no conflicts detected)
279
+ - [ ] Boundary grill results written to plan.json `boundary_grill` section (if conflicts found)
280
+ - [ ] DEC conflicts reflected in confidence `boundary_warning` factor
243
281
  - [ ] Plan confidence scored with 5-dimension factor model
244
282
  - [ ] Readiness gate checked before collision detection
245
283
  - [ ] Pressure pass completed on highest-complexity task
@@ -294,7 +294,8 @@ resolve_milestone(phase_number):
294
294
  |-----------|----------|
295
295
  | review.json: verdict=="BLOCK" | `review-failed` |
296
296
  | review.json: verdict!="BLOCK" | `test` |
297
- | uat.md: all passed | `milestone-audit` |
297
+ | uat.md: all passed + `session.milestone` 存在 | `milestone-audit` |
298
+ | uat.md: all passed + `session.milestone=null` (standalone) | 标记 session completed(无 milestone 可审计) |
298
299
  | uat.md: has failures | `test-failed` |
299
300
 
300
301
  ### A_DETERMINE_QUALITY_MODE
@@ -376,7 +377,7 @@ narrow → derive defaults from intent + codebase, skip questions.
376
377
 
377
378
  ### A_BUILD_STEPS
378
379
 
379
- Generate steps from `session.lifecycle_position` to `milestone-complete`.
380
+ Generate steps from `session.lifecycle_position` to `milestone-complete`(`session.milestone` 存在时)或最后一个质量门(standalone 时)。
380
381
 
381
382
  | Stage | Skill (independent) | Skill (unified) | Decision after | quality_mode |
382
383
  |-------|---------------------|-----------------|----------------|--------------|
@@ -408,7 +409,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
408
409
  3.5. **grill auto_confirm 跳过**:`auto_confirm == true` 时删除 `grill` stage(grill 为交互式苏格拉底拷问,不支持自动模式);brainstorm args 不含 `--from grill:*`
409
410
  4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ decision: "<gate>", retry_count: 0, max_retries: 2, command_scope: null, command_path: null }`
410
411
  5. **goal-audit 插入**:`task_decomposition` 存在时,在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
411
- 6. **终点硬约束**:chain 以 `milestone-complete` 结尾
412
+ 6. **终点硬约束**:`session.milestone` 存在时 chain 以 `milestone-complete` 结尾;`session.milestone=null`(standalone)时跳过 `milestone-audit` + `milestone-complete` stage,chain 以最后一个质量门 stage 结尾
412
413
  7. **goal_ref 传播**:`task_decomposition` 存在时,每个 step 按 `step.stage ∈ g.lifecycle` 匹配 `step.goal_ref = g.id`(多匹配取字典序最小);decision 节点不打 goal_ref
413
414
  8. **占位符**:independent 保留 `{phase}` `{intent}`;unified 不带 `{phase}`
414
415
  9. **command_path 解析**(每个执行 step,decision 节点跳过):
@@ -426,6 +427,9 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
426
427
  - `analyze_macro_id` 存在且当前 step 是 `roadmap` → args 改为 `--from analyze:{analyze_macro_id}`
427
428
  - `analyze_macro_id` 存在且 `scope_verdict ∈ {medium, small}` 且当前 step 是 `plan` → args 改为 `--from analyze:{analyze_macro_id}`
428
429
  - `blueprint_id` 存在 → 当前 step 是 `plan` → args 改为 `--from blueprint:{blueprint_id}`(优先级低于 phase 数字参数)
430
+ - **phase-level deferred chaining**(独立模式,step 含 `{phase}` 占位符):build 阶段前序 artifact 尚未产出,由 A_RESOLVE_ARGS(ralph-execute)运行时从 state.json 查找同 phase+milestone 最新 completed artifact 注入:
431
+ - `plan` step → `--from analyze:{phase_analyze_id}`,写 `source_artifact_ref`
432
+ - `execute` step → `--dir {plan_path}`(现有逻辑),写 `source_artifact_ref = "plan:{id}"`
429
433
  - 写入 `step.source_artifact_ref` 以便审计
430
434
  13. **D-007 Milestone-ref 标注**:每个含 `{phase}` 占位符的 step → `step.milestone_id = session.milestone`(由 A_RESOLVE_PHASE 反查得出),禁止读 `current_milestone`
431
435
  14. **动态插入步骤**(A_APPLY_*)同样应用规则 7-13
@@ -761,5 +765,8 @@ decision:post-goal-audit {retry+1}
761
765
  - [ ] Decision nodes 由 maestro delegate --role analyze 评估
762
766
  - [ ] Ralph 不执行 step,只 evaluate;`$maestro-ralph-execute` 直调 handoff
763
767
  - [ ] session.platform = "codex";所有 CLI 调用携带 `--platform codex`
768
+ - [ ] Phase-level deferred chaining:plan/execute step 的 `--from`/`--dir` 注入由 A_RESOLVE_ARGS(ralph-execute)运行时完成;build 阶段标记意图,不预知 artifact ID
769
+ - [ ] Phase-level plan step 运行时获得 `--from analyze:{phase_analyze_id}`(由 ralph-execute 从 state.json 查找注入)
770
+ - [ ] Phase-level execute step 运行时获得 `source_artifact_ref = "plan:{id}"`
764
771
 
765
772
  </appendix>
@@ -128,19 +128,44 @@ S_FALLBACK:
128
128
  | maestro-brainstorm | topic | `"{intent}"` |
129
129
  | maestro-roadmap | description | `"{intent}"` |
130
130
  | maestro-analyze | phase or topic | `{phase}` or `"{intent}"` |
131
- | maestro-plan | phase or --dir | `{phase}`, or `--dir {scratch_dir}` |
132
- | maestro-execute | phase or --dir | `{phase}`, or `--dir {scratch_dir}` |
131
+ | maestro-plan | phase, --from, or --dir | see --from auto-injection below |
132
+ | maestro-execute | phase or --dir | see --from auto-injection below |
133
133
  | quality-debug | gap context | Read previous step's error/gap |
134
134
  | quality-* | phase | `{phase}` |
135
135
 
136
- **Artifact dir resolution for --dir:**
136
+ **--from auto-injection (phase-level artifact chaining):**
137
+
138
+ Phase-level steps 在 build 阶段无法预知前序 artifact ID。A_RESOLVE_ARGS 运行时从 state.json 查找并注入显式引用,打通 analyze→plan→execute 数据管道:
139
+
137
140
  ```
138
- Read state.json filter artifacts by milestone + phase
139
- plan commands: latest type=="analyze" --dir .workflow/scratch/{path}
140
- execute commands: latest type=="plan" → --dir .workflow/scratch/{path}
141
+ Read state.json.artifacts(含 milestone_history 内归档 artifacts
142
+ filter by milestone={session.milestone} + phase={session.phase} + status=="completed"
143
+
144
+ plan step(含 {phase} 占位符,args 无 --from 且无 --dir):
145
+ 1. 查同 phase+milestone 最新 completed type=="analyze" artifact → id = ANL-xxx
146
+ 2. 命中 → args 追加 --from analyze:{id}
147
+ 3. 写 step.source_artifact_ref = "analyze:{id}"
148
+
149
+ execute step(含 {phase} 占位符,args 无 --dir):
150
+ 1. 查同 phase+milestone 最新 completed type=="plan" artifact → id = PLN-xxx, path = scratch/...
151
+ 2. 命中 → args 追加 --dir .workflow/scratch/{path}
152
+ 3. 写 step.source_artifact_ref = "plan:{id}"
141
153
  ```
142
154
 
143
- Write enriched args back to status.json.
155
+ 兜底:查询无结果 不注入,由命令自身 discovery 逻辑处理。已有 `--from` 或 `--dir` 的 step 不覆盖。
156
+
157
+ **Goal context injection:**
158
+
159
+ 当 step.goal_ref 非空且 session.task_decomposition 存在时:
160
+ ```
161
+ goal = session.task_decomposition.find(g => g.id == step.goal_ref)
162
+ if goal:
163
+ goal_snippet = { id: goal.id, goal: goal.goal, done_when: goal.done_when,
164
+ boundary: goal.boundary, evidence: goal.evidence }
165
+ → 传递给 A_EXEC_STEP 用于 inline execution 前注入(见 step 2 goal context pre-injection)
166
+ ```
167
+
168
+ Write enriched args + source_artifact_ref back to status.json.
144
169
 
145
170
  ### A_EXEC_DECISION
146
171
 
@@ -156,13 +181,24 @@ Write enriched args back to status.json.
156
181
  - 退出码 2 → 交给 S_LOCATE
157
182
  - 退出码 3 → active_step_index 已被占用
158
183
  - 退出码 1 → pause session
159
- 2. **Inline execution** — stdout 执行;deferred_reading 按需 Read
160
- 3. **Complete**:
184
+ 2. **Goal context pre-injection** — A_RESOLVE_ARGS 产出了 `goal_snippet`(step.goal_ref 非空),在 ralph next stdout prompt **顶部前置**以下 block,使执行命令感知当前子目标和执行约束:
185
+ ```
186
+ <goal_context>
187
+ Sub-goal: {goal.id} — {goal.goal}
188
+ Done when: {goal.done_when}
189
+ Boundary: {goal.boundary}
190
+ Evidence target: {goal.evidence}
191
+ Execution criteria: {session.execution_criteria joined by '; '}
192
+ </goal_context>
193
+ ```
194
+ 无 goal_snippet 时跳过此步。goal_context block 不替换 ralph next 的 stdout 内容,仅在其前方拼接。
195
+ 3. **Inline execution** — 按 stdout(含 goal_context 前置)执行;deferred_reading 按需 Read
196
+ 4. **Complete**:
161
197
  - `Bash("maestro ralph complete N --status DONE [--evidence <path>]")`
162
198
  - `Bash("maestro ralph complete N --status DONE_WITH_CONCERNS --concerns \"...\"")`
163
199
  - `Bash("maestro ralph retry N")`
164
200
  - `Bash("maestro ralph complete N --status BLOCKED --reason \"...\"")`
165
- 4. **Propagate context signals** — 关键信号 (`PHASE: N` / `scratch_dir: path` / `BLP-xxx`) 写入 `status.json.context`
201
+ 5. **Propagate context signals** — 关键信号 (`PHASE: N` / `scratch_dir: path` / `BLP-xxx`) 写入 `status.json.context`
166
202
 
167
203
  完成后 S_LOCATE 触发 `$maestro-ralph-execute` 直调自调用。
168
204
 
@@ -240,5 +276,10 @@ Display: `[{index}/{total}] ✗ {step.skill} 失败,会话已暂停。$maestro
240
276
  - [ ] Auto mode: retry 一次后 pause;interactive 提供 retry/skip/abort
241
277
  - [ ] 自调用持续到全部 completion_confirmed 或 paused
242
278
  - [ ] 只处理 session.platform == "codex" 的会话
279
+ - [ ] --from auto-injection:phase-level plan step 运行时从 state.json 查找同 phase+milestone 最新 completed analyze artifact → 注入 `--from analyze:{id}`,写 `source_artifact_ref`
280
+ - [ ] --from auto-injection:phase-level execute step 运行时查找同 phase+milestone 最新 completed plan artifact → 注入 `--dir`,写 `source_artifact_ref`
281
+ - [ ] Goal context injection:step.goal_ref 非空时从 task_decomposition 提取 goal_snippet,A_EXEC_STEP 在 ralph next stdout 顶部前置 `<goal_context>` block
282
+ - [ ] Goal context 包含 sub-goal description、done_when、boundary、evidence、execution_criteria
283
+ - [ ] 已有 `--from` 或 `--dir` 的 step 不被 auto-injection 覆盖
243
284
 
244
285
  </appendix>
@@ -11,8 +11,6 @@ Generate a milestone/phase roadmap using `spawn_agents_on_csv` with 2-wave analy
11
11
  Wave 1: parallel analysis (scope, risk, dependency). Wave 2: assembly -> roadmap.md with Milestone > Phase hierarchy.
12
12
 
13
13
  Additional: `--revise` (modify existing roadmap), `--review` (read-only health check).
14
-
15
- For formal specification documents (Product Brief, PRD, Architecture, Epics), use `maestro-blueprint` instead.
16
14
  </purpose>
17
15
 
18
16
  <context>
@@ -29,6 +27,11 @@ $ARGUMENTS -- requirement/idea text or @file reference, plus optional flags.
29
27
 
30
28
  **Session**: `.workflow/.csv-wave/{YYYYMMDD}-roadmap-{slug}/`
31
29
  **Output**: tasks.csv, results.csv, discoveries.ndjson, context.md, `.workflow/roadmap.md`
30
+
31
+ ### Pre-load (runs unconditionally, including -y auto mode)
32
+ 1. **Architecture specs**: `maestro spec load --category arch` — load architecture constraints for phase decomposition
33
+ 2. **Wiki search**: `maestro search "{requirement keywords}" --json` → prior knowledge for dependency and scope analysis
34
+ 3. All optional — proceed without if unavailable (log warning)
32
35
  </context>
33
36
 
34
37
  <interview_protocol>
@@ -176,7 +179,22 @@ Assembly agent produces roadmap.md with Milestone > Phase hierarchy (goal, depen
176
179
  3. Generate context.md (summary + analysis findings + roadmap stats)
177
180
  4. Write .workflow/roadmap.md with Milestone > Phase hierarchy
178
181
  5. Update state.json milestones + current_milestone
179
- 6. Next-step routing: need analysis -> maestro-analyze; ready to plan -> maestro-plan; UI first -> maestro-impeccable build; need formal specs -> maestro-blueprint
182
+ 6. **Generate context-package.json** (schema `context-package/1.0`):
183
+ ```jsonc
184
+ {
185
+ "$schema": "context-package/1.0",
186
+ "source": { "type": "roadmap", "artifact_id": "RDM-{id}", "session_path": "...", "generated_at": "..." },
187
+ "requirements": [], // from milestone phase goals → { id, title, acceptance }
188
+ "constraints": [], // from scope decisions → locked items
189
+ "domain": {}, // inherit from upstream --from context-package if loaded
190
+ "non_goals": [], // deferred scope items
191
+ "insights": [], // from risk analysis and dependency findings
192
+ "open_questions": [], // unresolved scope areas
193
+ "references": [{ "type": "roadmap", "path": "roadmap.md" }]
194
+ }
195
+ ```
196
+ Register `context_package` path in RDM artifact entry so downstream `--from roadmap:ID` can resolve.
197
+ 7. Next-step routing: need analysis -> maestro-analyze; ready to plan -> maestro-plan; UI first -> maestro-impeccable build; need formal specs -> maestro-blueprint
180
198
 
181
199
  </actions>
182
200
 
@@ -215,5 +233,14 @@ Protocol: read before analysis, append-only, dedup by type+key.
215
233
  - [ ] context.md generated
216
234
  - [ ] Uncertainty assessed, strategy selected, milestones with phases + success criteria
217
235
  - [ ] Artifact registered in state.json with milestone entries
236
+ - [ ] Ralph-invoked: `maestro ralph complete <idx> --status {STATUS}` called with correct verdict
218
237
  </success_criteria>
238
+
239
+ <ralph_completion>
240
+ When invoked as a ralph session step, end by calling the CLI (no standalone report):
241
+ ```
242
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
243
+ ```
244
+ Status verdicts: **DONE** (normal), **DONE_WITH_CONCERNS** (caveats; pass `--concerns`), **NEEDS_RETRY** (transient error), **BLOCKED** (hard blocker; pass `--reason`).
245
+ </ralph_completion>
219
246
  </output>
@@ -7,8 +7,6 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
7
7
 
8
8
  <purpose>
9
9
  Unified wiki graph management. Health monitoring, interactive search, orphan cleanup, and graph statistics. Day-to-day operations to keep the knowledge graph healthy.
10
-
11
- Complements `wiki-connect` (link discovery) and `wiki-digest` (synthesis) with operational tooling.
12
10
  </purpose>
13
11
 
14
12
  <required_reading>
@@ -8,8 +8,6 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
8
8
  <purpose>
9
9
  Closed-loop deep debugging: archaeology (what changed) → explore (call chains, error gaps) → diagnose (hypothesis-driven) → fix & confirm → generalize (举一反三) → discover siblings → persist learnings.
10
10
 
11
- Unlike `quality-debug` (fast fix), this treats every bug as a learning signal — digs into git history before hypotheses, confirms fixes with CLI review, scans for siblings of the root cause.
12
-
13
11
  Core philosophy:
14
12
  - **Archaeology before hypothesis** — look at what changed before guessing why
15
13
  - **Fix one, find many** — a single bug reveals a class of bugs
@@ -9,12 +9,6 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
9
9
  Deep codebase improvement: survey (dependency + complexity baseline) -> audit (6 dimensions) ->
10
10
  diagnose (root cause analysis) -> fix -> verify -> generalize -> discover -> record.
11
11
 
12
- Unlike `$quality-review` (single pass), this is a persistent session with evidence trails,
13
- baseline metrics, iterative improvement, and codebase-wide generalization. `--skip-fix` for audit-only.
14
-
15
- Focuses on **program runtime quality** — performance, security, architecture, reliability,
16
- observability, maintainability. Combines static analysis with runtime-aware reasoning.
17
-
18
12
  Core philosophy:
19
13
  - **Measure before improving** — baseline first, then optimize
20
14
  - **Root cause over symptom** — trace each issue to its origin
@@ -9,9 +9,6 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
9
9
  Deep code review with generalization: archaeology → explore → multi-dimensional review →
10
10
  fix all findings → confirm → generalize (举一反三) → discover → persist.
11
11
 
12
- Unlike `quality-review` (pipeline gate verdict), this reviews AND fixes: exhaustive documentation,
13
- targeted fixes, codebase-wide generalization, decision journal. `--skip-fix` for review-only.
14
-
15
12
  **三句哲学约束(穷尽迭代):**
16
13
  1. **零遗留** — 每个 finding 必须是 action item(修复 / issue / 决策),不允许只报告不处理
17
14
  2. **穷尽迭代** — 按 severity 从高到低逐轮修复,直到 0 remaining actionable findings 才退出 fix loop
@@ -9,9 +9,6 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
9
9
  Deep UI polish cycle: survey (design tokens + pattern inventory) -> audit (6 dimensions) ->
10
10
  diverge (creative exploration) -> fix -> verify -> generalize -> discover -> record.
11
11
 
12
- Unlike `$maestro-impeccable` (single command), this is a persistent session with evidence trails,
13
- decision journal, iterative improvement, and codebase-wide generalization. `--skip-fix` for audit-only.
14
-
15
12
  Core philosophy:
16
13
  - **Every pixel tells a story** — subtle details create the experience
17
14
  - **Diverge before converge** — explore creatively, then implement methodically
@@ -413,4 +413,13 @@ echo '{"ts":"<ISO>","worker":"{id}","type":"vulnerability","data":{"location":"s
413
413
  - [ ] Issues auto-created for qualifying severity findings
414
414
  - [ ] Phase index.json updated with review status
415
415
  - [ ] discoveries.ndjson append-only throughout
416
+ - [ ] Ralph-invoked: `maestro ralph complete <idx> --status {STATUS}` called with correct verdict
416
417
  </success_criteria>
418
+
419
+ <ralph_completion>
420
+ When invoked as a ralph session step, end by calling the CLI (no standalone report):
421
+ ```
422
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
423
+ ```
424
+ Status verdicts: **DONE** (normal), **DONE_WITH_CONCERNS** (caveats; pass `--concerns`), **NEEDS_RETRY** (transient error), **BLOCKED** (hard blocker; pass `--reason`).
425
+ </ralph_completion>
@@ -9,8 +9,6 @@ allowed-tools: Read, Write, Bash, Glob, Grep
9
9
  Initialize project specs by scanning the codebase and generating spec files in `.workflow/specs/`.
10
10
  Core files (coding, arch, learning) always created. Optional files created only when relevant signals detected.
11
11
 
12
- Triggered automatically by `maestro-init` for **existing projects** (source files detected). Greenfield projects skip this — specs are populated progressively by analyze, plan, and execute stages.
13
-
14
12
  ```bash
15
13
  $spec-setup
16
14
  ```
@@ -7,9 +7,6 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
7
7
 
8
8
  <purpose>
9
9
  Wave-based multi-role coordination via `spawn_agents_on_csv`. Dynamic role generation + linear wave execution with per-wave evaluation gates.
10
-
11
- **Core difference from other team skills**: Roles are NOT predefined — they are dynamically generated from task analysis at runtime. Each role's behavioral instructions are encoded directly into the CSV `description` column, eliminating the need for role-spec files.
12
-
13
10
  **Core workflow**: Analyze Task → Generate Dynamic Roles → Build CSV → Wave-by-Wave Execution with Evaluation → Aggregate Results
14
11
 
15
12
  ```
@@ -1,7 +1,5 @@
1
1
  # Team Lifecycle v4 — Agent Instruction
2
2
 
3
- This instruction is loaded by team-worker agents when spawned with roles: `analyst`, `writer`, `planner`, `executor`, `tester`, `reviewer`.
4
-
5
3
  ---
6
4
 
7
5
  ## Role-Based Execution
package/README.md CHANGED
@@ -36,7 +36,7 @@ Maestro-Flow is built on two interconnected systems that reinforce each other:
36
36
  ┌──────────────┴──────────────┐ ┌──────────────────┴───────────────┐
37
37
  │ Workflow Orchestration │ │ Knowledge System │
38
38
  │ │ │ │
39
- │ Intent Router │ │ Knowledge Graph (SQLite)
39
+ │ Intent Router │ │ MaestroGraph (SQLite)
40
40
  │ └─ 40+ chain types │ │ └─ Code + Knowledge unified │
41
41
  │ Ralph Decision Engine │ │ Spec Injection (Hooks) │
42
42
  │ └─ 11-state FSM │ │ └─ Auto-inject into prompts │
@@ -67,6 +67,8 @@ maestro install
67
67
 
68
68
  **Prerequisites**: Node.js ≥ 18, Claude Code CLI. Optional: Codex CLI, Gemini CLI for multi-agent workflows.
69
69
 
70
+ `maestro install` provides an interactive component selector — choose which assets (commands, hooks, MCP, agents) to install. Use `maestro workspace link` to share knowledge (specs, knowhow, domain) across multiple projects.
71
+
70
72
  ---
71
73
 
72
74
  ## Quick Start
@@ -95,6 +97,18 @@ Ralph automatically determines where you are (brainstorm → plan → execute
95
97
  | `/maestro-quick` | Quick fixes, small features (analyze → plan → execute) |
96
98
  | `/maestro-*` | Step-by-step: brainstorm, blueprint, analyze, plan, execute, verify |
97
99
 
100
+ ### Odyssey — Long-Running Iterative Cycles
101
+
102
+ Odyssey commands run extended, self-correcting loops that combine archaeology, diagnosis, fix, verification, and knowledge persistence until acceptance criteria are met:
103
+
104
+ | Command | Focus |
105
+ |---------|-------|
106
+ | `odyssey-debug` | Debug cycle — archaeology, diagnosis, fix, confirmation, generalization |
107
+ | `odyssey-planex` | Requirement-driven cycle — plan, execute, strict verify, fix loop |
108
+ | `odyssey-improve` | Codebase improvement — multi-dimensional audit, targeted fix, verify |
109
+ | `odyssey-review-test-fix` | Deep review + fix — multi-dimensional review, targeted fix, generalization |
110
+ | `odyssey-ui` | UI optimization — visual survey, audit, divergent exploration, fix |
111
+
98
112
  ---
99
113
 
100
114
  ## Workflow Orchestration
@@ -159,9 +173,9 @@ These patterns compose: a team coordinator can delegate subtasks to different LL
159
173
 
160
174
  ## Knowledge System
161
175
 
162
- ### Knowledge Graph
176
+ ### Knowledge Graph (MaestroGraph)
163
177
 
164
- A SQLite-backed unified graph that stores both **code structure** (functions, classes, call chains via tree-sitter extraction) and **project knowledge** (specs, knowhow, domain terms, issues) in one queryable structure.
178
+ **MaestroGraph** is the unified code index engine that replaces the former CodeGraph dependency. Built on `web-tree-sitter` for AST-level extraction, it stores both **code structure** (functions, classes, call chains) and **project knowledge** (specs, knowhow, domain terms, issues) in a single SQLite-backed graph with dual FTS5 indexes.
165
179
 
166
180
  ```bash
167
181
  maestro kg search <symbol> # Find nodes
@@ -187,6 +201,10 @@ Agent executes task
187
201
 
188
202
  Four learning tools feed this cycle: `learn-retro` (retrospective), `learn-follow` (pattern study), `learn-decompose` (architecture breakdown), `learn-investigate` (deep dive).
189
203
 
204
+ ### Domain Knowledge
205
+
206
+ A semantic glossary layer that defines **what things mean** in your project. Domain terms (`maestro domain`) standardize terminology, map concept relationships, and serve as a MaestroGraph knowledge source — bridging the gap between code-level symbols and business-level concepts.
207
+
190
208
  ### Wiki & Search
191
209
 
192
210
  WikiIndexer walks the `.workflow/` directory, parses frontmatter, builds backlink graphs, and creates a **BM25 inverted index** for full-text search across all project knowledge — specs, knowhow, issues, and KG nodes as virtual entries.
@@ -225,7 +243,7 @@ Built with React 19, Zustand, Tailwind CSS 4, Framer Motion, Hono, WebSocket.
225
243
 
226
244
  | Metric | Count |
227
245
  |--------|-------|
228
- | Source files (TypeScript) | 446 |
246
+ | Source files (TypeScript) | 454 |
229
247
  | Lines of code | ~111,000 |
230
248
  | Slash commands | 64 |
231
249
  | Workflow definitions | 115 |
@@ -233,7 +251,7 @@ Built with React 19, Zustand, Tailwind CSS 4, Framer Motion, Hono, WebSocket.
233
251
  | Agent definitions | 23 |
234
252
  | CLI commands | 32 |
235
253
  | Templates | 92 |
236
- | Guides (bilingual) | 66 |
254
+ | Guides (bilingual) | 67 |
237
255
 
238
256
  ### Tech Stack
239
257
 
@@ -277,6 +295,7 @@ maestro/
277
295
 
278
296
  **Getting Started**
279
297
  - **[Quick Start Guide](guide/quick-start-guide.en.md)** — Install, first workflow, key concepts
298
+ - **[Install Guide](guide/install-guide.md)** — Step-by-step installation, component selection, workspace setup
280
299
  - **[Maestro Ralph Guide](guide/maestro-ralph-guide.en.md)** — Adaptive lifecycle engine, decision nodes, quality modes
281
300
 
282
301
  **Workflow**
@@ -288,6 +307,9 @@ maestro/
288
307
 
289
308
  **Knowledge**
290
309
  - **[Knowledge Management Guide](guide/knowledge-management-guide.en.md)** — KG, specs, knowhow, wiki
310
+ - **[Search System Guide](guide/search-system-guide.md)** — Unified BM25F search, MaestroGraph integration, type filtering
311
+ - **[MaestroGraph Plan](guide/plan-maestrograph.md)** — Unified KG engine design, CodeGraph replacement, tree-sitter integration
312
+ - **[Domain Knowledge Plan](guide/plan-domain-knowledge.md)** — Semantic glossary, term relationships, concept layer
291
313
  - **[Spec System Guide](guide/spec-system-guide.en.md)** — Spec entries, keyword loading, validation hooks
292
314
  - **[Hooks Guide](guide/hooks-guide.en.md)** — 17 hooks, spec injection, context budget
293
315
  - **[Learning Tools Guide](guide/learn-tools-guide.en.md)** — Retro, follow, decompose, investigate
@@ -296,6 +318,7 @@ maestro/
296
318
  - **[Delegate Async Guide](guide/delegate-async-guide.en.md)** — Multi-CLI delegation, message injection, chaining
297
319
  - **[Overlay Guide](guide/overlay-guide.en.md)** — Non-invasive command extensions
298
320
  - **[Worktree Guide](guide/worktree-guide.en.md)** — Milestone-level parallel development
321
+ - **[Workspace Guide](guide/workspace-guide.md)** — Cross-workspace knowledge sharing, link/unlink
299
322
  - **[MCP Tools Reference](guide/mcp-tools-guide.en.md)** — All 9 MCP endpoint tools
300
323
  - **[Collab Guide](guide/team-lite-guide.en.md)** — 2-8 person team collaboration
301
324