maestro-flow 0.5.46 → 0.5.48

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 (336) hide show
  1. package/.agents/agents/ralph-executor.md +14 -24
  2. package/.agents/skills/domain-add/SKILL.md +9 -0
  3. package/.agents/skills/learn-decompose/SKILL.md +12 -0
  4. package/.agents/skills/learn-follow/SKILL.md +41 -0
  5. package/.agents/skills/learn-investigate/SKILL.md +14 -0
  6. package/.agents/skills/learn-second-opinion/SKILL.md +14 -0
  7. package/.agents/skills/maestro-amend/SKILL.md +11 -0
  8. package/.agents/skills/maestro-analyze/SKILL.md +13 -13
  9. package/.agents/skills/maestro-companion/SKILL.md +11 -0
  10. package/.agents/skills/maestro-composer/SKILL.md +12 -1
  11. package/.agents/skills/maestro-guard/SKILL.md +25 -0
  12. package/.agents/skills/maestro-help/SKILL.md +2 -0
  13. package/.agents/skills/maestro-help/index/catalog.json +7 -7
  14. package/.agents/skills/maestro-init/SKILL.md +29 -1
  15. package/.agents/skills/maestro-milestone-audit/SKILL.md +2 -2
  16. package/.agents/skills/maestro-milestone-release/SKILL.md +1 -1
  17. package/.agents/skills/maestro-next/SKILL.md +2 -2
  18. package/.agents/skills/maestro-overlay/SKILL.md +11 -0
  19. package/.agents/skills/maestro-plan/SKILL.md +31 -9
  20. package/.agents/skills/maestro-player/SKILL.md +11 -0
  21. package/.agents/skills/maestro-quick/SKILL.md +29 -0
  22. package/.agents/skills/maestro-ralph-v2/SKILL.md +26 -50
  23. package/.agents/skills/maestro-roadmap/SKILL.md +2 -2
  24. package/.agents/skills/maestro-swarm-workflow/SKILL.md +25 -0
  25. package/.agents/skills/maestro-tools-execute/SKILL.md +29 -0
  26. package/.agents/skills/maestro-tools-register/SKILL.md +29 -0
  27. package/.agents/skills/maestro-ui-codify/SKILL.md +11 -0
  28. package/.agents/skills/maestro-universal-workflow/SKILL.md +59 -0
  29. package/.agents/skills/maestro-update/SKILL.md +38 -0
  30. package/.agents/skills/manage-codebase-rebuild/SKILL.md +29 -0
  31. package/.agents/skills/manage-drift-realign/SKILL.md +12 -0
  32. package/.agents/skills/manage-harvest/SKILL.md +30 -6
  33. package/.agents/skills/manage-issue/SKILL.md +23 -0
  34. package/.agents/skills/manage-issue-discover/SKILL.md +28 -0
  35. package/.agents/skills/manage-kg-extractors/SKILL.md +27 -1
  36. package/.agents/skills/manage-knowhow/SKILL.md +26 -0
  37. package/.agents/skills/manage-knowhow-capture/SKILL.md +24 -0
  38. package/.agents/skills/manage-knowledge-audit/SKILL.md +13 -0
  39. package/.agents/skills/manage-status/SKILL.md +22 -0
  40. package/.agents/skills/manage-wiki/SKILL.md +28 -0
  41. package/.agents/skills/odyssey-improve/SKILL.md +50 -0
  42. package/.agents/skills/odyssey-planex/SKILL.md +46 -0
  43. package/.agents/skills/odyssey-review-test-fix/SKILL.md +50 -0
  44. package/.agents/skills/odyssey-ui/SKILL.md +50 -0
  45. package/.agents/skills/quality-auto-test/SKILL.md +13 -1
  46. package/.agents/skills/quality-debug/SKILL.md +11 -0
  47. package/.agents/skills/quality-refactor/SKILL.md +11 -0
  48. package/.agents/skills/quality-retrospective/SKILL.md +11 -0
  49. package/.agents/skills/quality-review/SKILL.md +11 -0
  50. package/.agents/skills/quality-sync/SKILL.md +10 -0
  51. package/.agents/skills/quality-test/SKILL.md +12 -0
  52. package/.agents/skills/security-audit/SKILL.md +11 -0
  53. package/.agents/skills/spec-add/SKILL.md +27 -0
  54. package/.agents/skills/spec-load/SKILL.md +25 -0
  55. package/.agents/skills/spec-remove/SKILL.md +26 -0
  56. package/.agents/skills/spec-setup/SKILL.md +30 -0
  57. package/.agy/agents/ralph-executor.md +14 -23
  58. package/.agy/skills/domain-add/SKILL.md +9 -0
  59. package/.agy/skills/learn-decompose/SKILL.md +12 -0
  60. package/.agy/skills/learn-follow/SKILL.md +41 -0
  61. package/.agy/skills/learn-investigate/SKILL.md +14 -0
  62. package/.agy/skills/learn-second-opinion/SKILL.md +14 -0
  63. package/.agy/skills/maestro-amend/SKILL.md +11 -0
  64. package/.agy/skills/maestro-analyze/SKILL.md +13 -13
  65. package/.agy/skills/maestro-companion/SKILL.md +11 -0
  66. package/.agy/skills/maestro-composer/SKILL.md +12 -1
  67. package/.agy/skills/maestro-guard/SKILL.md +25 -0
  68. package/.agy/skills/maestro-help/SKILL.md +2 -0
  69. package/.agy/skills/maestro-help/index/catalog.json +7 -7
  70. package/.agy/skills/maestro-init/SKILL.md +29 -1
  71. package/.agy/skills/maestro-milestone-audit/SKILL.md +2 -2
  72. package/.agy/skills/maestro-milestone-release/SKILL.md +1 -1
  73. package/.agy/skills/maestro-next/SKILL.md +2 -2
  74. package/.agy/skills/maestro-overlay/SKILL.md +11 -0
  75. package/.agy/skills/maestro-plan/SKILL.md +31 -9
  76. package/.agy/skills/maestro-player/SKILL.md +11 -0
  77. package/.agy/skills/maestro-quick/SKILL.md +29 -0
  78. package/.agy/skills/maestro-ralph-v2/SKILL.md +26 -50
  79. package/.agy/skills/maestro-roadmap/SKILL.md +2 -2
  80. package/.agy/skills/maestro-swarm-workflow/SKILL.md +25 -0
  81. package/.agy/skills/maestro-tools-execute/SKILL.md +29 -0
  82. package/.agy/skills/maestro-tools-register/SKILL.md +29 -0
  83. package/.agy/skills/maestro-ui-codify/SKILL.md +11 -0
  84. package/.agy/skills/maestro-universal-workflow/SKILL.md +59 -0
  85. package/.agy/skills/maestro-update/SKILL.md +38 -0
  86. package/.agy/skills/manage-codebase-rebuild/SKILL.md +29 -0
  87. package/.agy/skills/manage-drift-realign/SKILL.md +12 -0
  88. package/.agy/skills/manage-harvest/SKILL.md +30 -6
  89. package/.agy/skills/manage-issue/SKILL.md +23 -0
  90. package/.agy/skills/manage-issue-discover/SKILL.md +28 -0
  91. package/.agy/skills/manage-kg-extractors/SKILL.md +27 -1
  92. package/.agy/skills/manage-knowhow/SKILL.md +26 -0
  93. package/.agy/skills/manage-knowhow-capture/SKILL.md +24 -0
  94. package/.agy/skills/manage-knowledge-audit/SKILL.md +13 -0
  95. package/.agy/skills/manage-status/SKILL.md +22 -0
  96. package/.agy/skills/manage-wiki/SKILL.md +28 -0
  97. package/.agy/skills/odyssey-improve/SKILL.md +50 -0
  98. package/.agy/skills/odyssey-planex/SKILL.md +46 -0
  99. package/.agy/skills/odyssey-review-test-fix/SKILL.md +50 -0
  100. package/.agy/skills/odyssey-ui/SKILL.md +50 -0
  101. package/.agy/skills/quality-auto-test/SKILL.md +13 -1
  102. package/.agy/skills/quality-debug/SKILL.md +11 -0
  103. package/.agy/skills/quality-refactor/SKILL.md +11 -0
  104. package/.agy/skills/quality-retrospective/SKILL.md +11 -0
  105. package/.agy/skills/quality-review/SKILL.md +11 -0
  106. package/.agy/skills/quality-sync/SKILL.md +10 -0
  107. package/.agy/skills/quality-test/SKILL.md +12 -0
  108. package/.agy/skills/security-audit/SKILL.md +11 -0
  109. package/.agy/skills/spec-add/SKILL.md +27 -0
  110. package/.agy/skills/spec-load/SKILL.md +25 -0
  111. package/.agy/skills/spec-remove/SKILL.md +26 -0
  112. package/.agy/skills/spec-setup/SKILL.md +30 -0
  113. package/.claude/agents/ralph-executor.md +14 -24
  114. package/.claude/commands/domain-add.md +9 -0
  115. package/.claude/commands/learn-decompose.md +12 -0
  116. package/.claude/commands/learn-follow.md +41 -0
  117. package/.claude/commands/learn-investigate.md +14 -0
  118. package/.claude/commands/learn-second-opinion.md +14 -0
  119. package/.claude/commands/maestro-amend.md +11 -0
  120. package/.claude/commands/maestro-analyze.md +13 -13
  121. package/.claude/commands/maestro-companion.md +11 -0
  122. package/.claude/commands/maestro-composer.md +12 -1
  123. package/.claude/commands/maestro-guard.md +25 -0
  124. package/.claude/commands/maestro-init.md +29 -1
  125. package/.claude/commands/maestro-milestone-audit.md +2 -2
  126. package/.claude/commands/maestro-milestone-release.md +1 -1
  127. package/.claude/commands/maestro-next.md +2 -2
  128. package/.claude/commands/maestro-overlay.md +11 -0
  129. package/.claude/commands/maestro-plan.md +31 -9
  130. package/.claude/commands/maestro-player.md +11 -0
  131. package/.claude/commands/maestro-quick.md +29 -0
  132. package/.claude/commands/maestro-ralph-v2.md +26 -50
  133. package/.claude/commands/maestro-roadmap.md +2 -2
  134. package/.claude/commands/maestro-swarm-workflow.md +25 -0
  135. package/.claude/commands/maestro-tools-execute.md +29 -0
  136. package/.claude/commands/maestro-tools-register.md +29 -0
  137. package/.claude/commands/maestro-ui-codify.md +11 -0
  138. package/.claude/commands/maestro-universal-workflow.md +59 -0
  139. package/.claude/commands/maestro-update.md +38 -0
  140. package/.claude/commands/manage-codebase-rebuild.md +29 -0
  141. package/.claude/commands/manage-drift-realign.md +12 -0
  142. package/.claude/commands/manage-harvest.md +30 -6
  143. package/.claude/commands/manage-issue-discover.md +28 -0
  144. package/.claude/commands/manage-issue.md +23 -0
  145. package/.claude/commands/manage-kg-extractors.md +27 -1
  146. package/.claude/commands/manage-knowhow-capture.md +24 -0
  147. package/.claude/commands/manage-knowhow.md +26 -0
  148. package/.claude/commands/manage-knowledge-audit.md +13 -0
  149. package/.claude/commands/manage-status.md +22 -0
  150. package/.claude/commands/manage-wiki.md +28 -0
  151. package/.claude/commands/odyssey-improve.md +50 -0
  152. package/.claude/commands/odyssey-planex.md +46 -0
  153. package/.claude/commands/odyssey-review-test-fix.md +50 -0
  154. package/.claude/commands/odyssey-ui.md +50 -0
  155. package/.claude/commands/quality-auto-test.md +13 -1
  156. package/.claude/commands/quality-debug.md +11 -0
  157. package/.claude/commands/quality-refactor.md +11 -0
  158. package/.claude/commands/quality-retrospective.md +11 -0
  159. package/.claude/commands/quality-review.md +11 -0
  160. package/.claude/commands/quality-sync.md +10 -0
  161. package/.claude/commands/quality-test.md +12 -0
  162. package/.claude/commands/security-audit.md +11 -0
  163. package/.claude/commands/spec-add.md +27 -0
  164. package/.claude/commands/spec-load.md +25 -0
  165. package/.claude/commands/spec-remove.md +26 -0
  166. package/.claude/commands/spec-setup.md +30 -0
  167. package/.claude/skills/maestro-help/SKILL.md +2 -0
  168. package/.claude/skills/maestro-help/index/catalog.json +7 -7
  169. package/.codex/skills/codify-to-knowhow/SKILL.md +2 -0
  170. package/.codex/skills/domain-add/SKILL.md +26 -0
  171. package/.codex/skills/domain-discover/SKILL.md +46 -0
  172. package/.codex/skills/domain-list/SKILL.md +29 -0
  173. package/.codex/skills/learn-decompose/SKILL.md +2 -0
  174. package/.codex/skills/learn-follow/SKILL.md +34 -0
  175. package/.codex/skills/learn-investigate/SKILL.md +33 -0
  176. package/.codex/skills/learn-retro/SKILL.md +33 -0
  177. package/.codex/skills/learn-second-opinion/SKILL.md +30 -0
  178. package/.codex/skills/maestro/SKILL.md +6 -5
  179. package/.codex/skills/maestro-amend/SKILL.md +11 -0
  180. package/.codex/skills/maestro-analyze/SKILL.md +13 -18
  181. package/.codex/skills/maestro-companion/SKILL.md +11 -0
  182. package/.codex/skills/maestro-composer/SKILL.md +11 -0
  183. package/.codex/skills/maestro-guard/SKILL.md +25 -0
  184. package/.codex/skills/maestro-help/SKILL.md +2 -0
  185. package/.codex/skills/maestro-help/catalog.json +7 -7
  186. package/.codex/skills/maestro-init/SKILL.md +16 -0
  187. package/.codex/skills/maestro-learn/SKILL.md +2 -0
  188. package/.codex/skills/maestro-next/SKILL.md +2 -2
  189. package/.codex/skills/maestro-overlay/SKILL.md +1 -0
  190. package/.codex/skills/maestro-plan/SKILL.md +13 -16
  191. package/.codex/skills/maestro-player/SKILL.md +2 -0
  192. package/.codex/skills/maestro-quick/SKILL.md +17 -0
  193. package/.codex/skills/maestro-ralph/SKILL.md +11 -11
  194. package/.codex/skills/maestro-ralph-execute/SKILL.md +8 -8
  195. package/.codex/skills/maestro-tools-execute/SKILL.md +31 -0
  196. package/.codex/skills/maestro-tools-register/SKILL.md +29 -0
  197. package/.codex/skills/maestro-ui-codify/SKILL.md +2 -0
  198. package/.codex/skills/maestro-update/SKILL.md +38 -0
  199. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -0
  200. package/.codex/skills/manage-codebase-refresh/SKILL.md +11 -0
  201. package/.codex/skills/manage-drift-realign/SKILL.md +2 -0
  202. package/.codex/skills/manage-harvest/SKILL.md +30 -8
  203. package/.codex/skills/manage-issue/SKILL.md +24 -0
  204. package/.codex/skills/manage-issue-discover/SKILL.md +2 -0
  205. package/.codex/skills/manage-knowhow/SKILL.md +26 -0
  206. package/.codex/skills/manage-knowhow-capture/SKILL.md +23 -0
  207. package/.codex/skills/manage-learn/SKILL.md +2 -0
  208. package/.codex/skills/manage-status/SKILL.md +22 -0
  209. package/.codex/skills/manage-wiki/SKILL.md +28 -0
  210. package/.codex/skills/odyssey-debug/SKILL.md +44 -0
  211. package/.codex/skills/odyssey-improve/SKILL.md +49 -0
  212. package/.codex/skills/odyssey-planex/SKILL.md +44 -0
  213. package/.codex/skills/odyssey-review-test-fix/SKILL.md +48 -0
  214. package/.codex/skills/odyssey-ui/SKILL.md +49 -0
  215. package/.codex/skills/quality-auto-test/SKILL.md +2 -0
  216. package/.codex/skills/quality-debug/SKILL.md +2 -0
  217. package/.codex/skills/quality-refactor/SKILL.md +2 -0
  218. package/.codex/skills/quality-retrospective/SKILL.md +2 -0
  219. package/.codex/skills/quality-review/SKILL.md +2 -0
  220. package/.codex/skills/quality-sync/SKILL.md +24 -0
  221. package/.codex/skills/quality-test/SKILL.md +2 -0
  222. package/.codex/skills/security-audit/SKILL.md +30 -0
  223. package/.codex/skills/spec-add/SKILL.md +28 -0
  224. package/.codex/skills/spec-load/SKILL.md +26 -0
  225. package/.codex/skills/spec-map/SKILL.md +1 -0
  226. package/.codex/skills/spec-remove/SKILL.md +28 -0
  227. package/.codex/skills/spec-setup/SKILL.md +28 -0
  228. package/.codex/skills/wiki-connect/SKILL.md +11 -0
  229. package/.codex/skills/wiki-digest/SKILL.md +11 -0
  230. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js +3 -1
  231. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js.map +1 -1
  232. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +5 -0
  233. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +42 -1
  234. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
  235. package/dashboard/dist-server/src/graph/kg/db/queries.d.ts +4 -0
  236. package/dashboard/dist-server/src/graph/kg/db/queries.js +35 -19
  237. package/dashboard/dist-server/src/graph/kg/db/queries.js.map +1 -1
  238. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js +2 -0
  239. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js.map +1 -1
  240. package/dashboard/dist-server/src/graph/kg/engine.js +5 -1
  241. package/dashboard/dist-server/src/graph/kg/engine.js.map +1 -1
  242. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +19 -11
  243. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
  244. package/dashboard/dist-server/src/hooks/kg-sync-hook.js +5 -3
  245. package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
  246. package/dashboard/dist-server/src/hooks/session-context.js +3 -1
  247. package/dashboard/dist-server/src/hooks/session-context.js.map +1 -1
  248. package/dist/src/agents/api-explore/circuit-breaker.d.ts +41 -0
  249. package/dist/src/agents/api-explore/circuit-breaker.d.ts.map +1 -0
  250. package/dist/src/agents/api-explore/circuit-breaker.js +82 -0
  251. package/dist/src/agents/api-explore/circuit-breaker.js.map +1 -0
  252. package/dist/src/agents/api-explore/config.d.ts +15 -34
  253. package/dist/src/agents/api-explore/config.d.ts.map +1 -1
  254. package/dist/src/agents/api-explore/config.js +17 -42
  255. package/dist/src/agents/api-explore/config.js.map +1 -1
  256. package/dist/src/agents/api-explore/index.js +6 -6
  257. package/dist/src/agents/api-explore/index.js.map +1 -1
  258. package/dist/src/agents/api-explore/llm.d.ts +2 -0
  259. package/dist/src/agents/api-explore/llm.d.ts.map +1 -1
  260. package/dist/src/agents/api-explore/llm.js +16 -4
  261. package/dist/src/agents/api-explore/llm.js.map +1 -1
  262. package/dist/src/agents/api-explore/runner.d.ts +5 -0
  263. package/dist/src/agents/api-explore/runner.d.ts.map +1 -1
  264. package/dist/src/agents/api-explore/runner.js +66 -15
  265. package/dist/src/agents/api-explore/runner.js.map +1 -1
  266. package/dist/src/commands/explore.d.ts.map +1 -1
  267. package/dist/src/commands/explore.js +23 -4
  268. package/dist/src/commands/explore.js.map +1 -1
  269. package/dist/src/commands/install.d.ts.map +1 -1
  270. package/dist/src/commands/install.js +62 -28
  271. package/dist/src/commands/install.js.map +1 -1
  272. package/dist/src/commands/moa.d.ts.map +1 -1
  273. package/dist/src/commands/moa.js +18 -3
  274. package/dist/src/commands/moa.js.map +1 -1
  275. package/dist/src/commands/search.d.ts.map +1 -1
  276. package/dist/src/commands/search.js +2 -0
  277. package/dist/src/commands/search.js.map +1 -1
  278. package/dist/src/config/api-config.d.ts +61 -0
  279. package/dist/src/config/api-config.d.ts.map +1 -0
  280. package/dist/src/config/api-config.js +59 -0
  281. package/dist/src/config/api-config.js.map +1 -0
  282. package/dist/src/config/cli-tools-config.d.ts +1 -0
  283. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  284. package/dist/src/config/cli-tools-config.js +22 -1
  285. package/dist/src/config/cli-tools-config.js.map +1 -1
  286. package/dist/src/graph/kg/db/queries.d.ts +4 -0
  287. package/dist/src/graph/kg/db/queries.d.ts.map +1 -1
  288. package/dist/src/graph/kg/db/queries.js +35 -19
  289. package/dist/src/graph/kg/db/queries.js.map +1 -1
  290. package/dist/src/graph/kg/embedding/code-embedding.d.ts.map +1 -1
  291. package/dist/src/graph/kg/embedding/code-embedding.js +2 -0
  292. package/dist/src/graph/kg/embedding/code-embedding.js.map +1 -1
  293. package/dist/src/graph/kg/engine.d.ts.map +1 -1
  294. package/dist/src/graph/kg/engine.js +5 -1
  295. package/dist/src/graph/kg/engine.js.map +1 -1
  296. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  297. package/dist/src/graph/kg/extraction/orchestrator.js +19 -11
  298. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  299. package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
  300. package/dist/src/hooks/kg-sync-hook.js +5 -3
  301. package/dist/src/hooks/kg-sync-hook.js.map +1 -1
  302. package/dist/src/hooks/plugins/explore-plugin.d.ts.map +1 -1
  303. package/dist/src/hooks/plugins/explore-plugin.js +3 -2
  304. package/dist/src/hooks/plugins/explore-plugin.js.map +1 -1
  305. package/dist/src/hooks/session-context.js +3 -1
  306. package/dist/src/hooks/session-context.js.map +1 -1
  307. package/dist/src/tui/install-ui/EmbeddingConfig.d.ts +25 -0
  308. package/dist/src/tui/install-ui/EmbeddingConfig.d.ts.map +1 -0
  309. package/dist/src/tui/install-ui/EmbeddingConfig.js +58 -0
  310. package/dist/src/tui/install-ui/EmbeddingConfig.js.map +1 -0
  311. package/dist/src/tui/install-ui/EmbeddingPanel.d.ts +6 -0
  312. package/dist/src/tui/install-ui/EmbeddingPanel.d.ts.map +1 -0
  313. package/dist/src/tui/install-ui/EmbeddingPanel.js +101 -0
  314. package/dist/src/tui/install-ui/EmbeddingPanel.js.map +1 -0
  315. package/dist/src/tui/install-ui/GroupedHub.d.ts +2 -0
  316. package/dist/src/tui/install-ui/GroupedHub.d.ts.map +1 -1
  317. package/dist/src/tui/install-ui/GroupedHub.js +8 -1
  318. package/dist/src/tui/install-ui/GroupedHub.js.map +1 -1
  319. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  320. package/dist/src/tui/install-ui/InstallFlow.js +4 -2
  321. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  322. package/dist/src/tui/install-ui/embedding-status.d.ts +12 -0
  323. package/dist/src/tui/install-ui/embedding-status.d.ts.map +1 -0
  324. package/dist/src/tui/install-ui/embedding-status.js +82 -0
  325. package/dist/src/tui/install-ui/embedding-status.js.map +1 -0
  326. package/dist/src/tui/install-ui/useInstallFlowState.d.ts +1 -1
  327. package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
  328. package/dist/src/tui/install-ui/useInstallFlowState.js +52 -2
  329. package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
  330. package/dist/src/tui/shared/tokens.d.ts +1 -1
  331. package/dist/src/tui/shared/tokens.js +1 -1
  332. package/dist/src/utils/update-notices.js +11 -0
  333. package/dist/src/utils/update-notices.js.map +1 -1
  334. package/package.json +1 -1
  335. package/workflows/analyze.md +13 -15
  336. package/workflows/plan.md +33 -21
@@ -9,6 +9,19 @@ allowed-tools: Read, Bash, Glob, Grep
9
9
  List all registered domain terms from `.workflow/domain/glossary.yaml`. Shows canonical name, definition, tier, aliases, and status.
10
10
  </purpose>
11
11
 
12
+ <context>
13
+ $ARGUMENTS — optional `--tier core|extended|peripheral` filter.
14
+
15
+ **Output boundary**: Read-only command — NEVER write any files. Display output to console only.
16
+ </context>
17
+
18
+ <invariants>
19
+ 1. **Strictly read-only** — NEVER modify `glossary.yaml` or any other file; display-only operation
20
+ 2. **Complete listing** — MUST show all registered terms (filtered by --tier if specified); NEVER silently omit entries
21
+ 3. **Tier grouping** — MUST group terms by tier (core → extended → peripheral → deprecated); NEVER display flat unsorted list
22
+ 4. **Graceful absence** — if glossary.yaml does not exist, report "No domain glossary" with init command; NEVER create or auto-initialize
23
+ </invariants>
24
+
12
25
  <execution>
13
26
 
14
27
  ### Step 1: Load Glossary
@@ -36,3 +49,19 @@ Apply optional `--tier` filter. Display terms grouped by tier (core → extended
36
49
  ```
37
50
 
38
51
  </execution>
52
+
53
+ <error_codes>
54
+ | Code | Severity | Condition | Recovery |
55
+ |------|----------|-----------|----------|
56
+ | E001 | error | `.workflow/domain/glossary.yaml` not found | Run `maestro domain init` first |
57
+ | E002 | error | glossary.yaml parse error (invalid YAML) | Check file syntax |
58
+ | W001 | warning | No terms match --tier filter | Show "No terms in tier: {tier}" |
59
+ </error_codes>
60
+
61
+ <success_criteria>
62
+ - [ ] Glossary loaded and parsed successfully
63
+ - [ ] Terms grouped by tier (core → extended → peripheral → deprecated)
64
+ - [ ] Optional --tier filter applied correctly
65
+ - [ ] Each term displayed with canonical name, definition, aliases, keywords
66
+ - [ ] Total count shown
67
+ </success_criteria>
@@ -33,6 +33,8 @@ $ARGUMENTS — target path/module and optional flags.
33
33
  - `--save-wiki`: Create wiki note entries per dimension group
34
34
 
35
35
  **Output**: `.workflow/.csv-wave/{session-id}/` + `.workflow/knowhow/KNW-decompose-{slug}-{date}.md`
36
+
37
+ **Output boundary**: ALL file writes MUST target `.workflow/.csv-wave/{session-id}/`, `.workflow/knowhow/KNW-decompose-{slug}-{date}.md`, and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
36
38
  </context>
37
39
 
38
40
  <invariants>
@@ -25,10 +25,44 @@ $ARGUMENTS — target and optional flags.
25
25
  - `--save-wiki` — Create wiki note with reading notes
26
26
 
27
27
  **Output**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md`
28
+
29
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-follow-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
28
30
  </context>
29
31
 
32
+ <invariants>
33
+ 1. **Read-only traversal** — NEVER modify source code or wiki entries under analysis; all writes go to `.workflow/` only
34
+ 2. **Forcing questions mandatory** — each section MUST have all 4 forcing questions applied; NEVER skip questions even for trivial sections
35
+ 3. **Anchor requirement** — every extracted pattern MUST include a `file:line` anchor; unanchored patterns SHALL NOT be persisted to learnings.md
36
+ 4. **Convention cross-ref** — MUST check every finding against `coding-conventions.md` and mark status (documented/candidate); NEVER persist without status tag
37
+ 5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
38
+ 6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via `request_user_input` before any writes
39
+ 7. **Depth contract** — `--depth shallow` MUST NOT descend into function bodies; `--depth deep` MUST cover every branch and sub-expression
40
+ </invariants>
41
+
30
42
  <execution>
31
43
 
44
+ ### Phase Gates (MANDATORY, BLOCKING)
45
+
46
+ **GATE 1: Resolve → Context Building**
47
+ - REQUIRED: Target resolved to a readable source (file path, wiki entry, or search result).
48
+ - BLOCKED if: target unresolvable after user prompt (E001).
49
+
50
+ **GATE 2: Reading → Extraction**
51
+ - REQUIRED: All sections traversed with 4 forcing questions applied per section.
52
+ - REQUIRED: Depth contract honored — shallow stays at top-level, deep covers every branch.
53
+ - BLOCKED if: any section skipped without forcing questions.
54
+
55
+ **GATE 3: Extraction → Persistence**
56
+ - REQUIRED: All extracted patterns have file:line anchors.
57
+ - REQUIRED: Convention cross-ref completed against coding-conventions.md (or marked "unknown status" if W002).
58
+ - BLOCKED if: unanchored patterns remain in extraction results.
59
+
60
+ **GATE 4: Persistence → Completion**
61
+ - REQUIRED: Unless `-y`, `request_user_input` showing files to write and spec-entries to append — user must confirm.
62
+ - REQUIRED: KNW-follow-{slug}-{date}.md written with understanding map.
63
+ - REQUIRED: learnings.md appended (not overwritten) with new spec-entry blocks.
64
+ - BLOCKED if: user declines confirmation — offer to adjust findings before retry.
65
+
32
66
  ### Stage 1: Resolve Target + Load Context Web
33
67
  - File: verify exists, parse imports for dependency files
34
68
  - Wiki ID: fetch + load forward/backlinks
@@ -20,10 +20,43 @@ $ARGUMENTS — question text and optional flags.
20
20
  - `--no-persist` — Skip writing to learnings.md (report.md still written locally)
21
21
 
22
22
  **Output**: `.workflow/knowhow/KNW-investigate-{slug}/` (evidence.ndjson, understanding.md, report.md)
23
+
24
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-investigate-{slug}/` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
23
25
  </context>
24
26
 
27
+ <invariants>
28
+ 1. **Read-only investigation** — NEVER modify source code files; all writes go to `.workflow/` only
29
+ 2. **Evidence append-only** — `evidence.ndjson` MUST be appended line-by-line; NEVER overwrite or truncate existing evidence entries
30
+ 3. **Scope lock** — once `--scope` is resolved, NEVER expand search scope without explicit user confirmation via escalation
31
+ 4. **Hypothesis cap** — MUST NOT generate more than `--max-hypotheses` (default 3) before triggering escalation; NEVER silently exceed the cap
32
+ 5. **Structured evidence format** — every evidence entry MUST include `{ts, type, source, relevance, content, note}`; incomplete entries SHALL NOT be appended
33
+ 6. **3-strike escalation** — after all hypotheses fail, MUST escalate to user via `request_user_input`; NEVER silently conclude as INCONCLUSIVE without user interaction
34
+ 7. **Confirmation gate** — unless `--no-persist` is set, MUST present report.md path and spec-entries via `request_user_input` before final writes
35
+ </invariants>
36
+
25
37
  <execution>
26
38
 
39
+ ### Phase Gates (MANDATORY, BLOCKING)
40
+
41
+ **GATE 1: Frame → Evidence Collection**
42
+ - REQUIRED: Question parsed, slug generated, investigation directory created.
43
+ - REQUIRED: Prior knowledge search completed (maestro search + learnings.md + debug-notes).
44
+ - BLOCKED if: no question provided (E001) or scope path not found (E002).
45
+
46
+ **GATE 2: Evidence → Hypothesis Formation**
47
+ - REQUIRED: At least 3 evidence items collected in evidence.ndjson.
48
+ - BLOCKED if: fewer than 3 evidence matches (W002 — broaden search before proceeding).
49
+
50
+ **GATE 3: Hypothesis Testing → Report**
51
+ - REQUIRED: All hypotheses tested (up to max-hypotheses) with results recorded.
52
+ - REQUIRED: If all failed, 3-strike escalation triggered via `request_user_input`.
53
+ - BLOCKED if: hypotheses remain untested.
54
+
55
+ **GATE 4: Report → Completion**
56
+ - REQUIRED: report.md written with answer, evidence trail, hypothesis results.
57
+ - REQUIRED: Unless `--no-persist`, user confirmation obtained before learnings append.
58
+ - BLOCKED if: user declines — offer to adjust findings before retry.
59
+
27
60
  ### Stage 1: Frame the Question
28
61
  - Parse question, generate slug, create investigation directory
29
62
  - Load debug specs: `maestro load --type spec --category debug` for known issues and patterns
@@ -21,10 +21,43 @@ $ARGUMENTS — lens selection and scope flags.
21
21
  **Decision flags:** `--phase N`, `--tag <tag>`, `--id <id>`
22
22
 
23
23
  **Output**: `.workflow/knowhow/KNW-retro-{date}.md` + `KNW-retro-{date}.json`
24
+
25
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-retro-{date}.md`, `.workflow/knowhow/KNW-retro-{date}.json`, and `.workflow/specs/learnings.md` only. NEVER modify source code, git history, or files outside these paths.
24
26
  </context>
25
27
 
28
+ <invariants>
29
+ 1. **Read-only analysis** — NEVER modify source code, git history, or wiki entries; all writes go to `.workflow/` only
30
+ 2. **Git data integrity** — git commands MUST be read-only (`git log`, `git diff --stat`); NEVER run `git commit`, `git reset`, or any write-mode git operation
31
+ 3. **Confirmation before agents** — MUST prompt user via `request_user_input` before spawning decision evaluation agents; NEVER auto-spawn without confirmation
32
+ 4. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
33
+ 5. **Confirmation before persist** — MUST prompt user via `request_user_input` before appending insights to learnings.md
34
+ 6. **Lens contract** — MUST execute exactly the selected lens(es); `--lens git` SHALL NOT trigger decision evaluation and vice versa
35
+ 7. **Prior retro preservation** — existing `KNW-retro-*.json` files MUST NOT be modified; only new files created for current retro
36
+ </invariants>
37
+
26
38
  <execution>
27
39
 
40
+ ### Phase Gates (MANDATORY, BLOCKING)
41
+
42
+ **GATE 1: Parse → Lens Execution**
43
+ - REQUIRED: Lens selection parsed (git/decision/all).
44
+ - REQUIRED: Git repo validated if git lens selected (E001).
45
+ - BLOCKED if: not inside git repo for git lens, or no commits in window (E002).
46
+
47
+ **GATE 2: Git Lens → Decision Lens**
48
+ - REQUIRED: Git metrics computed (commits, LOC, sessions, hotspots).
49
+ - BLOCKED if: git data gathering failed entirely — skip git lens, continue with decision lens only.
50
+
51
+ **GATE 3: Decision Collection → Decision Evaluation**
52
+ - REQUIRED: Decisions collected from wiki/specs/git/phase.
53
+ - REQUIRED: User confirmation obtained via `request_user_input` before spawning evaluation agents.
54
+ - BLOCKED if: no decisions found (E003) or user declines agent spawn.
55
+
56
+ **GATE 4: Report → Persist**
57
+ - REQUIRED: Unified report written to KNW-retro-{date}.md + KNW-retro-{date}.json.
58
+ - REQUIRED: User confirmation obtained via `request_user_input` before learnings append.
59
+ - BLOCKED if: user declines — display summary only, skip persistence.
60
+
28
61
  ### Phase 1: Parse + Select Lenses
29
62
 
30
63
  ### Phase 2: Git Lens (skip if --lens decision)
@@ -29,10 +29,40 @@ $ARGUMENTS — target and optional flags.
29
29
  - `--mode consult` — Interactive Q&A session
30
30
 
31
31
  **Output**: `.workflow/knowhow/KNW-opinion-{slug}-{date}.md`
32
+
33
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-opinion-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
32
34
  </context>
33
35
 
36
+ <invariants>
37
+ 1. **Read-only analysis** — NEVER modify source code, wiki entries, or plan files under review; all writes go to `.workflow/` only
38
+ 2. **Agent independence** — in review mode, each persona agent (Pragmatist/Purist/Strategist) MUST operate independently without shared state; NEVER pass one agent's findings to another during wave 1
39
+ 3. **Evidence-backed verdicts** — every finding MUST include a `location` reference (file:line or section); ungrounded opinions SHALL NOT appear in the report
40
+ 4. **Mode contract** — MUST execute exactly the mode specified (review/challenge/consult); NEVER mix mode behaviors within a single execution
41
+ 5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
42
+ 6. **Confirmation gate** — MUST present findings and target files via `request_user_input` before any writes
43
+ </invariants>
44
+
34
45
  <execution>
35
46
 
47
+ ### Phase Gates (MANDATORY, BLOCKING)
48
+
49
+ **GATE 1: Resolve → Execute**
50
+ - REQUIRED: Target resolved to concrete content (file, wiki entry, git diff, or phase plan).
51
+ - BLOCKED if: target unresolvable (E001) or unknown mode (E002).
52
+
53
+ **GATE 2: Execute → Synthesize**
54
+ - REQUIRED: Mode-specific analysis completed (review: ≥2 of 3 personas completed; challenge: adversarial agent completed; consult: Q&A session ended).
55
+ - BLOCKED if: all persona agents failed in review mode — skip to degraded synthesis with LOW CONFIDENCE flag.
56
+
57
+ **GATE 3: Synthesize → Persist**
58
+ - REQUIRED: Synthesis produced with agreements, disagreements, verdict, and top 3 recommendations.
59
+ - BLOCKED if: synthesis agent failed — use raw persona outputs as fallback.
60
+
61
+ **GATE 4: Persist → Completion**
62
+ - REQUIRED: `request_user_input` confirmation before writing learnings.
63
+ - REQUIRED: KNW-opinion-{slug}-{date}.md written.
64
+ - BLOCKED if: user declines — offer to adjust findings before retry.
65
+
36
66
  ### Phase 1: Resolve Target + Load Context
37
67
  Resolve target to content. Load specs, `maestro search`, prior lessons for context brief.
38
68
 
@@ -349,6 +349,7 @@ Direct in-context skill invocation — **replaces the old spawn/wave/CSV mechani
349
349
  | Placeholder | Source |
350
350
  |-------------|--------|
351
351
  | `{phase}` | session.phase |
352
+ | `{milestone}` | session.milestone |
352
353
  | `{plan_dir}` | session.context.plan_dir |
353
354
  | `{analysis_dir}` | session.context.analysis_dir |
354
355
  | `{brainstorm_dir}` | session.context.brainstorm_dir |
@@ -358,7 +359,7 @@ Direct in-context skill invocation — **replaces the old spawn/wave/CSV mechani
358
359
  | `{BLP}` | session.blueprint_id |
359
360
  | `{intent}` | session.intent |
360
361
 
361
- **--from auto-injection**: 当 step 是 `maestro-plan`,args 含 `{phase}` 但无 `--from` 且无 `--dir`,且 `session.context.analysis_dir` 已填充 → 查 state.json 同 phase+milestone 最新 completed analyze artifact → 注入 `--from analyze:{id}`,写 `step.source_artifact_ref`
362
+ **--from auto-injection**: 当 step 是 `maestro-plan`,args 含 `{milestone}` 但无 `--from` 且无 `--dir`,且 `session.context.analysis_dir` 已填充 → 查 state.json 同 milestone 最新 completed analyze artifact → 注入 `--from analyze:{id}`,写 `step.source_artifact_ref`
362
363
  2. Mark step `status="running"`, persist status.json + `update_plan` (this step → in_progress)
363
364
  3. **Invoke the skill directly**: execute `Skill(skill_name, resolved_args)` in coordinator context (NO spawn). Read its produced artifacts directly
364
365
  4. On success: mark step `status="done"`. **Structured completion**: `Bash("maestro ralph complete {idx} --status DONE --summary \"...\" [--decisions \"...\"] [--caveats \"...\"] [--deferred \"...\"]")`(`--summary` MUST,动词开头 ≤100 字)。**Barrier-context update** (when step is a context-producing skill):
@@ -424,9 +425,9 @@ S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condense
424
425
  | `init` | `maestro-init` |
425
426
  | `blueprint` | `maestro-blueprint "{intent}"` |
426
427
  | `analyze_macro` | `maestro-analyze "{intent}"` |
427
- | `analyze` | `maestro-analyze {phase}` |
428
+ | `analyze` | `maestro-analyze {milestone}` |
428
429
  | `ui_design` | `maestro-impeccable build "{phase}"` |
429
- | `plan` | `maestro-plan {phase}` |
430
+ | `plan` | `maestro-plan {milestone}` |
430
431
  | `plan_from_analyze` | `maestro-plan --from analyze:{analyze_macro_id}` |
431
432
  | `plan_from_blueprint` | `maestro-plan --from blueprint:{blueprint_id}` |
432
433
  | `execute` | `maestro-execute {phase}` |
@@ -482,7 +483,7 @@ S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condense
482
483
  | `quality-fix` | [B] maestro-analyze --gaps → [B] maestro-plan --gaps → [B] maestro-execute → quality-review |
483
484
  | `deploy` | quality-review → maestro-milestone-release |
484
485
  | `blueprint-driven` | maestro-init → [B] maestro-blueprint → [B] maestro-plan --from blueprint:{BLP} → [B] maestro-execute → quality-review → manage-harvest --auto |
485
- | `analyze-macro-driven` | [B] maestro-analyze "{intent}" → ◆ post-analyze-scope → (large: [B] maestro-roadmap --from analyze:{ANL} → [B] maestro-analyze {phase} → [B] maestro-plan {phase}) / (medium\|small: [B] maestro-plan --from analyze:{ANL}) → [B] maestro-execute → quality-review → manage-harvest --auto |
486
+ | `analyze-macro-driven` | [B] maestro-analyze "{intent}" → ◆ post-analyze-scope → (large: [B] maestro-roadmap --from analyze:{ANL} → [B] maestro-analyze {milestone} → [B] maestro-plan {milestone}) / (medium\|small: [B] maestro-plan --from analyze:{ANL}) → [B] maestro-execute → quality-review → manage-harvest --auto |
486
487
  | `grill-brainstorm` | [B] maestro-grill → [B] maestro-brainstorm --from grill:{GRL} → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto (**auto_mode: grill 透传 `-y`,Auto mode 代码代答**) |
487
488
  | `brainstorm-driven` | [B] maestro-brainstorm → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto |
488
489
  | `ui-craft-build` | maestro-impeccable build → [B] maestro-plan → [B] maestro-execute → quality-review → manage-harvest --auto |
@@ -542,7 +543,7 @@ S_DECISION_EVAL 入口;镜像 maestro-ralph `A_GOAL_AUDIT_EVALUATE`。Condense
542
543
  - [ ] Intent classified and chain resolved
543
544
  - [ ] Chain catalog 覆盖 blueprint / analyze_macro / plan_from_analyze / plan_from_blueprint / blueprint-driven / analyze-macro-driven 等新拓扑路径
544
545
  - [ ] D-007: 数字 phase 步骤的 `milestone_id` 通过 `state.json.milestones[].phase_slugs` 反查;写入 step
545
- - [ ] plan step args 支持 `{phase}` / `--from analyze:{ANL_ID}` / `--from blueprint:{BLP_ID}` 三路径,`source_artifact_ref` 写入
546
+ - [ ] plan step args 支持 `{milestone}` / `--from analyze:{ANL_ID}` / `--from blueprint:{BLP_ID}` 三路径,`source_artifact_ref` 写入
546
547
  - [ ] Broad lifecycle intents decomposed (≤3 boundary questions); narrow/single-step skip
547
548
  - [ ] Goal registered via built-in `create_goal`; status.json decomposition fields additive-only
548
549
  - [ ] status.json 唯一真源;无 markdown 清单
@@ -41,8 +41,19 @@ Multiple combinable. No flags + no description → interactive (scan + request_u
41
41
  | `both` | Both paths checked; overlay targets whichever exists |
42
42
 
43
43
  **Output**: `~/.maestro/overlays/amend-{slug}.json` + optional `~/.maestro/overlays/docs/amend-{slug}.md`
44
+
45
+ **Output boundary**: ALL file writes MUST target `~/.maestro/overlays/` (overlay JSON + docs) only. NEVER modify `.claude/commands/*.md` directly — overlay installation is handled by `maestro overlay add`.
44
46
  </context>
45
47
 
48
+ <invariants>
49
+ 1. **Non-invasive only** — amendments MUST use the overlay system (`~/.maestro/overlays/*.json`); direct edits to `.claude/commands/*.md` are NEVER permitted
50
+ 2. **Idempotent patches** — re-running the same amendment MUST produce identical overlay JSON; overlay markers prevent duplicate injection
51
+ 3. **Pristine source reads** — signal diagnosis MUST read from `$PKG_ROOT/.claude/commands/` (untouched originals), not installed copies
52
+ 4. **Code bugs excluded** — signals classified as code bugs MUST be routed to `$maestro-quick` or `$maestro-plan --gaps`, NEVER patched via overlay
53
+ 5. **User confirmation before install** — overlay JSON MUST be previewed and confirmed by the user before `maestro overlay add` runs (unless `-y`)
54
+ 6. **Section existence verified** — target section MUST be confirmed to exist in the pristine source before drafting a patch; missing sections trigger `new-section` mode
55
+ </invariants>
56
+
46
57
  <state_machine>
47
58
 
48
59
  <states>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-analyze
3
3
  description: Use when a topic needs structured multi-dimensional investigation before planning or decision-making
4
- argument-hint: "[-y|--yes] [--concurrency N] [-c|--continue] [--from <source>] \"<phase|topic> [-q|--quick] [--gaps [ISS-ID]]\""
4
+ argument-hint: "[-y|--yes] [--concurrency N] [-c|--continue] [--from <source>] \"<milestone|topic> [-q|--quick] [--gaps [ISS-ID]]\""
5
5
  allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
6
6
  ---
7
7
 
@@ -13,11 +13,11 @@ Wave 1 (CLI exploration, parallel) -> Wave 2 (6-dimension scoring, parallel) ->
13
13
 
14
14
  **Dual-layer scope (D-003)**:
15
15
  - **Macro layer** (text argument, e.g. `analyze "auth refactor"`): broad impact exploration. Produces `scope_verdict ∈ {small, medium, large}` to drive downstream routing (roadmap vs plan).
16
- - **Phase layer** (numeric argument, e.g. `analyze 1`): phase-scoped deep analysis under `current_milestone`. Milestone resolved via D-007 `phase_slugs` reverse lookup, NEVER direct `current_milestone` read.
16
+ - **Milestone layer** (numeric argument, e.g. `analyze 1`): milestone-level deep analysis covering all phases under the milestone. `analyze 1` = Milestone 1.
17
17
  </purpose>
18
18
 
19
19
  <context>
20
- $ARGUMENTS -- phase number, topic text, and optional flags.
20
+ $ARGUMENTS -- milestone number, topic text, and optional flags.
21
21
 
22
22
  **Flags**:
23
23
  - `-y, --yes`: Skip all confirmations (auto mode)
@@ -94,7 +94,7 @@ Available exploration dimensions: architecture, implementation, performance, sec
94
94
  6. **Gaps mode pipeline**: --gaps follows: Load issues from issues.jsonl -> Classify & group by location/component -> CSV gen (W1: 1 explore row per issue, W2: 1 synthesis per group) -> Execute waves -> Write issue.analysis record per issue -> Append history `{ action: "analyzed", at: <ISO>, by: "maestro-analyze --gaps" }` -> Output context.md for plan --gaps
95
95
  7. **Graceful degradation**: Missing exploration reduces scoring quality; missing scoring reduces synthesis quality
96
96
  8. **Tri-output**: context.md + context-package.json always. analysis.md (full only) + conclusions.json (full + quick — quick writes minimal with `scope_verdict` + `implementation_scope[]`). Gaps mode writes to issues.jsonl + context.md + context-package.json
97
- 9. **D-007 milestone resolution**: numeric scope MUST reverse-lookup `state.json.milestones[].phase_slugs`. NEVER read `current_milestone` directly for phase-scoped artifact registration.
97
+ 9. **Milestone resolution**: numeric scope directly specifies the milestone number. Resolve from `state.json.milestones[]` by ID.
98
98
  10. **scope_verdict mandatory** (D-003): macro/adhoc/standalone scopes MUST produce `scope_verdict ∈ {small, medium, large}` in conclusions.json. Drives downstream chain (roadmap vs plan).
99
99
  11. **Invariant violation = BLOCK** — violating any invariant above blocks the current operation. Do NOT bypass for "efficiency" or "clear intent" reasons.
100
100
  12. **Evidence required on decisions** — every decision in context.md MUST cite evidence from Wave 1 exploration findings or Wave 2 scores. Decisions citing only orchestrator's manual file reading are flagged LOW CONFIDENCE. **Degradation exception**: when invariant 7 activates and evidence is incomplete, decisions MAY proceed but MUST inherit LOW CONFIDENCE flag per invariant 13 — this is not a violation of the MUST, it is the defined degraded behavior.
@@ -119,24 +119,19 @@ S_PARSE:
119
119
  -> S_CONTEXT WHEN: scope resolved (milestone/phase/macro/adhoc/standalone/gaps)
120
120
  -> ERROR(E001) WHEN: no args and no roadmap
121
121
 
122
- **Scope routing** (text → macro layer, numeric → phase layer per D-003):
122
+ **Scope routing** (text → macro layer, numeric → milestone layer per D-003):
123
123
  | Condition | Scope | Layer | Slug |
124
124
  |-----------|-------|-------|------|
125
125
  | --gaps flag | gaps | — | ISS-ID slugified or "issue-gaps" |
126
- | Empty subject + milestone + roadmap | milestone | phase | milestone name slugified |
126
+ | Empty subject + milestone + roadmap | milestone | milestone | milestone name slugified |
127
127
  | Empty subject, no roadmap | ERROR E001 | — | -- |
128
- | Numeric + milestone + roadmap | phase | phase | phase slug from roadmap |
128
+ | Numeric + roadmap | milestone | milestone | milestone name slugified |
129
129
  | Text subject + milestone | macro | macro | subject slugified (max 40) |
130
130
  | Text subject, no milestone | macro | macro | subject slugified (max 40) |
131
131
 
132
- **D-007 milestone reverse lookup** (numeric scope only):
133
- ```
134
- resolve_milestone(phase_number):
135
- for ms in state.json.milestones[]:
136
- if str(phase_number) in ms.phase_slugs: return ms.id
137
- return state.json.current_milestone # fallback (standalone)
138
- ```
139
- Write resolved milestone into `session.milestone` and artifact registration; NEVER use `current_milestone` directly for phase-scoped runs.
132
+ **Milestone resolution** (numeric scope only):
133
+ target_milestone = specified milestone number
134
+ IF not found in state.json.milestones[]: ERROR
140
135
 
141
136
  S_CONTEXT:
142
137
  -> S_CSV_GEN DO: load project.md, roadmap.md, state.json, prior artifacts, specs, upstream context-package (if --from)
@@ -252,7 +247,7 @@ Filter `wave==3 AND status=="pending"` -> build prev_context from wave 2 scores
252
247
  | `medium` | 1-2 subsystems, parallel-safe |
253
248
  | `small` | Single file or few files, directly executable |
254
249
 
255
- Write to `conclusions.json.scope_verdict` (all modes that produce conclusions); mirror into `context.md` and `context-package.json.source.scope_verdict`. Phase-scoped runs may omit (default null).
250
+ Write to `conclusions.json.scope_verdict` (all modes that produce conclusions); mirror into `context.md` and `context-package.json.source.scope_verdict`. Milestone-scoped runs may omit (default null).
256
251
 
257
252
  Gray area detection: domain-aware (things users SEE/CALL/RUN/READ), phase-specific (skip prior decided areas).
258
253
 
@@ -286,7 +281,7 @@ Non-blocking: conflicts produce warnings, pipeline continues.
286
281
  | Scope | Condition | Suggested |
287
282
  |-------|-----------|-----------|
288
283
  | Phase/Milestone | Go + UI work needed | `$maestro-impeccable build {target}` |
289
- | Phase/Milestone | Go + ready to plan | `$maestro-plan` or `$maestro-plan {phase}` |
284
+ | Phase/Milestone | Go + ready to plan | `$maestro-plan` or `$maestro-plan {milestone}` |
290
285
  | Phase/Milestone | No-Go | `$maestro-brainstorm {topic}` |
291
286
  | Macro/Adhoc/Standalone | `scope_verdict == "large"` | `$maestro-roadmap --from analyze:{ANL_ID}` |
292
287
  | Macro/Adhoc/Standalone | `scope_verdict == "medium"` | `$maestro-plan --from analyze:{ANL_ID}` |
@@ -341,7 +336,7 @@ Protocol: read before analysis, append-only, dedup by type+key.
341
336
  - [ ] context.md produced (all modes); analysis.md (full mode); conclusions.json (full mode AND quick mode with at minimum `scope_verdict` + `implementation_scope[]`)
342
337
  - [ ] context-package.json produced (all modes) with constraints, requirements, insights, open_questions
343
338
  - [ ] `scope_verdict ∈ {small, medium, large}` written into conclusions.json + context.md (macro/adhoc/standalone scopes)
344
- - [ ] D-007 milestone reverse lookup applied for numeric scope; `session.milestone` populated via `phase_slugs`, never via direct `current_milestone` read
339
+ - [ ] Milestone resolved directly from numeric arg; `session.milestone` populated from state.json.milestones[]
345
340
  - [ ] context.md contains all decisions classified as Locked/Free/Deferred
346
341
  - [ ] Decision Recording Protocol applied to all decisions
347
342
  - [ ] Confidence scored per dimension with factor-based model (full mode)
@@ -61,12 +61,23 @@ $maestro-companion "route what should I do next"
61
61
 
62
62
  Auto-detection: if `--type` not provided, infer from `--task` description keywords.
63
63
 
64
+ **Output boundary**: ALL file writes MUST target `.workflow/.scratchpad/` (companion docs + `.companion-active` pointer) only. Promotion writes (spec/knowhow) are delegated to `spec-add` / `manage-knowhow-capture` skills. NEVER modify source code, `.workflow/state.json`, or files outside `.workflow/.scratchpad/`.
65
+
64
66
  **Companion document:**
65
67
  - Path: `.workflow/.scratchpad/companion-{YYYYMMDD-HHmmss}.md`
66
68
  - Active doc tracking: `.workflow/.scratchpad/.companion-active` (stores path of current companion doc)
67
69
  - Format: YAML frontmatter (rich metadata) + typed sections + timestamped entries
68
70
  </context>
69
71
 
72
+ <invariants>
73
+ 1. **No session creation** — companion NEVER creates workflow sessions, NEVER writes to state.json
74
+ 2. **Side-car only** — companion MUST NOT modify source code or execute implementation tasks; it is strictly a knowledge loading + recording utility
75
+ 3. **One active doc** — only one `.companion-active` pointer SHALL exist at a time; creating a new companion doc MUST clear any stale pointer
76
+ 4. **Append-only entries** — note mode MUST append entries; NEVER overwrite or reorder existing entries
77
+ 5. **Promotion via delegation** — spec/knowhow promotion MUST route through `spec-add` / `manage-knowhow-capture` skills; companion NEVER writes directly to `.workflow/specs/` or `.workflow/knowhow/`
78
+ 6. **Type-template integrity** — context template sections MUST match the resolved `task_type`; NEVER mix templates from different types
79
+ </invariants>
80
+
70
81
  <execution>
71
82
 
72
83
  ## S_BEFORE — Knowledge Loading + Companion Doc Creation
@@ -58,8 +58,19 @@ $ARGUMENTS — natural language workflow description, or flags.
58
58
  1. **Architecture specs**: Run `maestro load --type spec --category arch` to load architecture constraints. Use as context for node resolution — ensures workflow design respects documented patterns.
59
59
  2. **Coding specs**: Run `maestro load --type spec --category coding` to load coding conventions. Informs executor argument defaults and context injection.
60
60
  3. Optional — proceed without if unavailable.
61
+
62
+ **Output boundary**: ALL file writes MUST target `~/.maestro/templates/workflows/` (final templates) and `.workflow/templates/design-drafts/` (in-progress drafts). NEVER modify source code, `.claude/commands/`, or `.codex/skills/`.
61
63
  </context>
62
64
 
65
+ <invariants>
66
+ 1. **Max 20 nodes** — workflow templates MUST NOT exceed 20 nodes; larger workflows MUST be split into sub-workflows
67
+ 2. **Acyclic DAG** — generated template MUST be a directed acyclic graph; cycles MUST be detected and rejected before persistence
68
+ 3. **No orphan nodes** — every node MUST be reachable from at least one edge; unreachable nodes MUST be flagged
69
+ 4. **Confirmation before write** — template JSON MUST be shown to user via request_user_input before writing to `~/.maestro/templates/workflows/`; cancellation saves draft only
70
+ 5. **Draft preservation** — abandoning at any confirmation gate MUST save current progress to design-drafts directory; NEVER discard user's partial work
71
+ 6. **Deferred reading only** — node-catalog and template-schema MUST be read at their designated phases (P2, P5), NEVER loaded eagerly at startup
72
+ </invariants>
73
+
63
74
  <execution>
64
75
 
65
76
  ### Phase 0: Resume / Edit (conditional)
@@ -33,10 +33,35 @@ $ARGUMENTS -- Parse subcommand and optional path argument.
33
33
 
34
34
  **Enforcement:** The `workflow-guard` hook (PreToolUse on Write/Edit) reads this config
35
35
  and blocks operations targeting files outside boundaries. Requires hooks level >= `full`.
36
+
37
+ **Output boundary**: ALL file writes MUST target `.workflow/config.json` (guard section) only. NEVER modify hook files, `.codex/settings.json`, or source code.
36
38
  </context>
37
39
 
40
+ <invariants>
41
+ 1. **Config-only mutation** — guard MUST only modify the `guard` section of `.workflow/config.json`; NEVER touch other config sections or files
42
+ 2. **Non-destructive** — `off` MUST preserve existing paths and mode; NEVER clear the path list when disabling
43
+ 3. **Mode switch confirmation** — switching between allow/deny mode MUST require request_user_input confirmation when existing paths will be cleared
44
+ 4. **Hook dependency** — guard MUST warn when enabled but `workflow-guard` hook is not active (hooks level < full)
45
+ 5. **Path normalization** — all paths MUST use forward slashes with trailing slash for directories; NEVER store raw backslash paths
46
+ </invariants>
47
+
38
48
  <execution>
39
49
 
50
+ ### Phase Gates (MANDATORY, BLOCKING)
51
+
52
+ **GATE 1: Parse → Config Read**
53
+ - REQUIRED: Subcommand parsed (on/off/status/allow/deny) or defaulted to `status`.
54
+ - BLOCKED if: invalid subcommand provided.
55
+
56
+ **GATE 2: Config Read → Execute**
57
+ - REQUIRED: `.workflow/config.json` read successfully or initialized with empty guard section.
58
+ - BLOCKED if: file unreadable and cannot be created (E001).
59
+
60
+ **GATE 3: Execute → Confirm**
61
+ - REQUIRED: Config mutation applied (for on/off/allow/deny) or status displayed (for status).
62
+ - REQUIRED: Mode-switch request_user_input answered (for allow↔deny transitions with existing paths).
63
+ - BLOCKED if: user declines mode switch.
64
+
40
65
  **Step 1: Parse subcommand**
41
66
 
42
67
  Extract from $ARGUMENTS:
@@ -36,6 +36,8 @@ $ARGUMENTS 匹配关键词 → 路由到对应模式:
36
36
  | "cli", "终端", "terminal" | 7 | CLI Reference |
37
37
  | 其他自由文本 | 1 | Fuzzy Search |
38
38
 
39
+ **Output boundary**: This skill is read-only — it MUST NOT write any files. All output is displayed directly to the user via text response.
40
+
39
41
  ## Data Source
40
42
 
41
43
  读取同目录下的 `catalog.json` 作为唯一数据源:
@@ -7,19 +7,19 @@
7
7
  "commands": [
8
8
  {"name": "maestro", "command": "/maestro", "category": "core", "description": "智能协调器 — 根据意图和项目状态自动选择最优命令链", "source": "../../commands/maestro.md"},
9
9
  {"name": "maestro-init", "command": "/maestro-init", "category": "core", "description": "项目初始化 — 创建 .workflow/ 目录结构和状态文件", "source": "../../commands/maestro-init.md"},
10
- {"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排 — 消费上游 context,纯 Milestone > Phase 分解(不做技术探索)", "source": "../../commands/maestro-roadmap.md"},
10
+ {"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排 — Milestone > Phase 分解,下游以 milestone 为入口", "source": "../../commands/maestro-roadmap.md"},
11
11
  {"name": "maestro-brainstorm", "command": "/maestro-brainstorm", "category": "core", "description": "头脑风暴 — 发散探索,多角色创意,上游起源命令", "source": "../../commands/maestro-brainstorm.md"},
12
12
  {"name": "maestro-blueprint", "command": "/maestro-blueprint", "category": "core", "description": "正式规格文档化 — 7-phase 收敛规格链,上游起源命令,产出 .workflow/blueprint/", "source": "../../commands/maestro-blueprint.md"},
13
13
  {"name": "maestro-analyze", "command": "/maestro-analyze", "category": "pipeline", "description": "双层分析 — 宏观(文本参数)探索影响面+scope_verdict / 微观(数字参数)Phase 级深入", "source": "../../commands/maestro-analyze.md"},
14
14
  {"name": "maestro-plan", "command": "/maestro-plan", "category": "pipeline", "description": "任务规划 — 支持 --from analyze:ANL-xxx 直达、碰撞检测、gap 修复计划", "source": "../../commands/maestro-plan.md"},
15
15
  {"name": "maestro-execute", "command": "/maestro-execute", "category": "pipeline", "description": "任务执行 — wave 并行执行、delegate 编排、自动提交", "source": "../../commands/maestro-execute.md"},
16
- {"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 — 跳过 Phase 管线直接完成,支持 --full/--discuss 模式", "source": "../../commands/maestro-quick.md"},
16
+ {"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 — 跳过管线直接完成,支持 --full/--discuss 模式", "source": "../../commands/maestro-quick.md"},
17
17
  {"name": "maestro-overlay", "command": "/maestro-overlay", "category": "core", "description": "Overlay 管理 — 创建、查看、删除命令补丁", "source": "../../commands/maestro-overlay.md"},
18
18
  {"name": "maestro-amend", "command": "/maestro-amend", "category": "core", "description": "修正补丁 — 从工作流信号自动生成 overlay", "source": "../../commands/maestro-amend.md"},
19
19
  {"name": "maestro-fork", "command": "/maestro-fork", "category": "worktree", "description": "Worktree 分叉 — 基于 milestone 创建隔离开发环境", "source": "../../commands/maestro-fork.md"},
20
20
  {"name": "maestro-merge", "command": "/maestro-merge", "category": "worktree", "description": "Worktree 合并 — 同步变更回主线", "source": "../../commands/maestro-merge.md"},
21
21
  {"name": "maestro-collab", "command": "/maestro-collab", "category": "team", "description": "人类团队协作 — .workflow/collab/ 目录管理", "source": "../../commands/maestro-collab.md"},
22
- {"name": "maestro-milestone-audit", "command": "/maestro-milestone-audit", "category": "milestone", "description": "里程碑审计 — 检查 Phase 完成度和质量", "source": "../../commands/maestro-milestone-audit.md"},
22
+ {"name": "maestro-milestone-audit", "command": "/maestro-milestone-audit", "category": "milestone", "description": "里程碑审计 — 检查里程碑完成度和质量", "source": "../../commands/maestro-milestone-audit.md"},
23
23
  {"name": "maestro-milestone-complete", "command": "/maestro-milestone-complete", "category": "milestone", "description": "里程碑完成 — 归档里程碑并推进下一个", "source": "../../commands/maestro-milestone-complete.md"},
24
24
  {"name": "maestro-milestone-release", "command": "/maestro-milestone-release", "category": "milestone", "description": "里程碑发布 — 生成发布说明和变更日志", "source": "../../commands/maestro-milestone-release.md"},
25
25
  {"name": "maestro-composer", "command": "/maestro-composer", "category": "core", "description": "编排器 — compose + play 工作流组合执行", "source": "../../commands/maestro-composer.md"},
@@ -157,17 +157,17 @@
157
157
  ],
158
158
  "workflows": {
159
159
  "topology": {
160
- "hierarchy": "Roadmap > Milestone > Phase > Task",
160
+ "hierarchy": "Roadmap > Milestone > Phase | Plan > Task > Wave",
161
161
  "layers": {
162
162
  "upstream_origin": ["brainstorm (发散/轻量)", "blueprint (收敛/重型)"],
163
- "understanding": "analyze 双层: 宏观(文本参数) + 微观(数字参数)",
163
+ "understanding": "analyze 双层: 宏观(文本参数) + 微观(milestone 数字参数)",
164
164
  "orchestration": "roadmap (可选,消费上游 context)",
165
165
  "execution": ["plan", "execute", "verify"]
166
166
  }
167
167
  },
168
168
  "paths": {
169
- "A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze 微观 → plan → execute → quality-review",
170
- "B_large_feature": "analyze 宏观 → roadmap → analyze 微观 → plan → execute → quality-review",
169
+ "A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze {milestone} → plan {milestone} → execute → quality-review",
170
+ "B_large_feature": "analyze 宏观 → roadmap → analyze {milestone} → plan {milestone} → execute → quality-review",
171
171
  "C_medium_feature": "analyze 宏观 → plan --from analyze:ANL-xxx → execute → quality-review",
172
172
  "D_small_fix": "plan → execute → quality-review",
173
173
  "E_spec_only": "blueprint → (供人阅读)",
@@ -25,6 +25,7 @@ $maestro-init "--from brainstorm:20260318-brainstorm-auth"
25
25
 
26
26
  **Output**: `.workflow/` directory with project.md, state.json, config.json, specs/
27
27
 
28
+ **Output boundary**: ALL file writes MUST target `.workflow/` (project files, state, config, specs). NEVER modify existing source code or files outside `.workflow/`.
28
29
  </context>
29
30
 
30
31
  <invariants>
@@ -37,6 +38,21 @@ $maestro-init "--from brainstorm:20260318-brainstorm-auth"
37
38
 
38
39
  <execution>
39
40
 
41
+ ### Phase Gates (MANDATORY, BLOCKING)
42
+
43
+ **GATE 1: Parse → Detect**
44
+ - REQUIRED: Arguments parsed; flags extracted.
45
+ - BLOCKED if: `-y` set but no document reference provided (E001).
46
+
47
+ **GATE 2: Detect → Gather**
48
+ - REQUIRED: Project state classified (empty/code/existing).
49
+ - BLOCKED if: existing `.workflow/` detected (E002).
50
+
51
+ **GATE 3: Gather → Write**
52
+ - REQUIRED: All project information gathered (interactive or extracted).
53
+ - REQUIRED: Templates read from `~/.maestro/templates/`.
54
+ - BLOCKED if: templates unreadable.
55
+
40
56
  ### Step 1: Parse Arguments
41
57
 
42
58
  Extract flags from arguments:
@@ -34,6 +34,8 @@ $ARGUMENTS — learning intent text, or flags.
34
34
  | `pattern-catalog` | decompose --save-spec --save-wiki → second-opinion --mode review | Full pattern extraction + review |
35
35
 
36
36
  **Session state:** `.workflow/knowhow/.maestro-learn/{session_id}/status.json`
37
+
38
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/.maestro-learn/{session_id}/` (session state) and delegate to learn-* commands for knowledge writes. NEVER modify source code or files outside `.workflow/`.
37
39
  </context>
38
40
 
39
41
  <execution>
@@ -123,8 +123,8 @@ ls -la .workflow/.maestro/ 2>/dev/null | head -5 # 进行中的 session
123
123
  | 无 `.workflow/` + 有源码 | init | `maestro-init` |
124
124
  | 有 state.json,无 roadmap,无 milestones | analyze-macro | `maestro-analyze` (宏观调研) |
125
125
  | 有 macro analyze artifact,无 roadmap | roadmap | `maestro-roadmap` |
126
- | 有 roadmap,未启动 phase | analyze | `maestro-analyze {phase}` |
127
- | 最新 artifact = analyze | plan | `maestro-plan {phase}` |
126
+ | 有 roadmap,未启动 phase | analyze | `maestro-analyze {milestone}` |
127
+ | 最新 artifact = analyze | plan | `maestro-plan {milestone}` |
128
128
  | 最新 artifact = plan | execute | `maestro-execute {phase}` |
129
129
  | 最新 artifact = execute | review | `quality-review {phase}` |
130
130
  | review verdict=PASS | test-gen | `quality-auto-test {phase}` |
@@ -38,6 +38,7 @@ $maestro-overlay "--remove cli-verify-after-execute"
38
38
  - Shared docs: `~/.maestro/overlays/docs/*.md`
39
39
  - Shipped examples: `~/.maestro/overlays/_shipped/` (read-only)
40
40
 
41
+ **Output boundary**: ALL file writes MUST target `~/.maestro/overlays/` (overlay JSON + docs). NEVER modify `.claude/commands/*.md` or `.codex/skills/` directly — overlay application is handled by `maestro overlay add`.
41
42
  </context>
42
43
 
43
44
  <invariants>