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
@@ -34,8 +34,19 @@ $ARGUMENTS — Parse tier and scope:
34
34
  | quick | ✓ | ✓ | — | — | — | — |
35
35
  | standard | ✓ | ✓ | ✓ | ✓ | — | — |
36
36
  | deep | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
37
+
38
+ **Output boundary**: ALL file writes MUST target `.workflow/scratch/{YYYYMMDD}-security-audit-{tier}-{slug}/` or `.workflow/state.json` only. NEVER modify source code, configuration files, or dependencies. Audit is read-only analysis.
37
39
  </context>
38
40
 
41
+ <invariants>
42
+ 1. **Audit is read-only** — NEVER modify source code, configuration, dependencies, or CI/CD files during audit. Security audit produces reports only.
43
+ 2. **Findings require file:line evidence** — every finding MUST reference a specific file:line location and include the vulnerable code pattern. No vague or category-only findings.
44
+ 3. **Severity NEVER downgraded without justification** — if a finding matches a known OWASP category, its severity follows OWASP guidance. Downgrading requires documented rationale (e.g., compensating control exists).
45
+ 4. **Tier coverage is mandatory** — all scan phases required by the selected tier MUST complete. NEVER skip a tier-required phase silently; failures are logged as W00x warnings.
46
+ 5. **False positive marking requires evidence** — marking a finding as false positive MUST include the compensating control or code path that prevents exploitation. NEVER dismiss findings without counter-evidence.
47
+ 6. **Secrets are never logged** — if secrets are discovered, report their location (file:line) and type but NEVER include the actual secret value in the report output.
48
+ </invariants>
49
+
39
50
  <execution>
40
51
 
41
52
  ### Phase Gates (MANDATORY, BLOCKING)
@@ -43,9 +43,36 @@ Scope-to-directory mapping, category-to-file mapping, and entry format defined i
43
43
  ```
44
44
  </context>
45
45
 
46
+ <invariants>
47
+ 1. **Idempotent append** — duplicate entry ID MUST be rejected (E003-level check on title + category match before write)
48
+ 2. **Category validation** — category MUST be one of: coding, arch, quality, debug, test, review, learning, ui. Invalid category → E003
49
+ 3. **Scope isolation** — writes target ONLY the scope-resolved directory; project scope NEVER writes to global (~/.maestro/specs/), global scope NEVER writes to project (.workflow/specs/)
50
+ 4. **Confirmation gate** — MUST ask_question before appending entry (unless -y flag); NEVER write without user confirmation in interactive mode
51
+ 5. **Entry format invariance** — all entries MUST use `<spec-entry>` closed-tag format with id, keywords, and category attributes
52
+ 6. **Output boundary** — ALL file writes MUST target the scope-resolved specs directory (.workflow/specs/, ~/.maestro/specs/, .workflow/collab/specs/, or .workflow/collab/{uid}/specs/) and optionally .workflow/knowhow/ for --ref mode. NEVER modify source code or files outside these paths
53
+ </invariants>
54
+
46
55
  <execution>
47
56
  Follow '~/.maestro/workflows/specs-add.md' completely.
48
57
 
58
+ ### Phase Gates (MANDATORY, BLOCKING)
59
+
60
+ **GATE 1: Parse → Validate**
61
+ - REQUIRED: Category and content both parsed from arguments.
62
+ - REQUIRED: Category is a valid value (coding, arch, quality, debug, test, review, learning, ui).
63
+ - REQUIRED: Scope resolved to a valid directory path.
64
+ - BLOCKED if: E001 (missing args), E003 (invalid category), E004 (invalid scope), E005 (personal scope without uid).
65
+
66
+ **GATE 2: Validate → Format**
67
+ - REQUIRED: Specs directory exists for the resolved scope.
68
+ - REQUIRED: No duplicate entry with identical title + category already present in target file.
69
+ - BLOCKED if: E002 (specs not initialized).
70
+
71
+ **GATE 3: Format → Write**
72
+ - REQUIRED: `<spec-entry>` block formatted with id, keywords, category attributes.
73
+ - REQUIRED: User confirmation via ask_question (unless -y flag).
74
+ - BLOCKED if: user declines confirmation — abort without writing.
75
+
49
76
  **Confirmation gate**: Unless -y flag is passed, after formatting the `<spec-entry>` block but before appending to the target file, ask_question showing the formatted entry, target file path, and scope. Proceed only on user confirm.
50
77
  </execution>
51
78
 
@@ -56,8 +56,33 @@ When loading entries with `ref` attribute, only the summary is shown with a load
56
56
  Use the load command to read the full referenced document.
57
57
  </context>
58
58
 
59
+ <invariants>
60
+ 1. **Read-only** — NEVER modify, create, or delete any spec files during load. This command is purely a read operation
61
+ 2. **Output to context only** — loaded specs are injected into the conversation context; NEVER write loaded content to new files or modify existing files
62
+ 3. **Scope layering** — global scope MUST merge both ~/.maestro/specs/ and .workflow/specs/; project scope loads .workflow/specs/ only; team adds .workflow/collab/specs/; personal adds .workflow/collab/{uid}/specs/
63
+ 4. **Category primary doc** — when --category is specified, the primary category doc MUST be loaded in full before cross-file matching
64
+ 5. **Entry-level filtering** — --keyword filtering operates at `<spec-entry>` level via keywords attribute, NOT at file level; unmatched entries in a matching file are excluded
65
+ 6. **Output boundary** — this command produces NO file writes. All output is conversation-context injection only
66
+ </invariants>
67
+
59
68
  <execution>
60
69
  Follow '~/.maestro/workflows/specs-load.md' completely.
70
+
71
+ ### Phase Gates (MANDATORY, BLOCKING)
72
+
73
+ **GATE 1: Parse → Discover**
74
+ - REQUIRED: Arguments parsed — at least one of --category or --keyword is provided, or empty args triggers full load.
75
+ - REQUIRED: Scope resolved (default: global+project merged).
76
+ - BLOCKED if: invalid scope value or invalid category value.
77
+
78
+ **GATE 2: Discover → Load**
79
+ - REQUIRED: At least one spec directory exists in the resolved scope chain.
80
+ - BLOCKED if: E001 — .workflow/specs/ not initialized AND no global specs available. Warn and abort.
81
+
82
+ **GATE 3: Load → Display**
83
+ - REQUIRED: Spec files read and entries parsed.
84
+ - REQUIRED: Keyword filtering applied if --keyword was provided.
85
+ - BLOCKED if: no readable spec files found in any scope layer.
61
86
  </execution>
62
87
 
63
88
  <error_codes>
@@ -30,8 +30,34 @@ $ARGUMENTS -- expects `<entry-id>` (e.g., `spec-learnings-003`, `spec-coding-con
30
30
  - `--cascade` — When the target spec is a ref-type entry (created via `spec-add --ref` and linked to a knowhow document), also delete the referenced knowhow file. Without this flag, ref-type removal leaves an orphan knowhow file.
31
31
  </context>
32
32
 
33
+ <invariants>
34
+ 1. **Confirmation required** — MUST ask_question before deletion (unless -y flag); NEVER remove entries silently
35
+ 2. **Referential integrity** — before removing, check if other spec entries reference the target entry; warn user if references exist
36
+ 3. **Cascade explicit** — ref-type entries MUST NOT cascade-delete the linked knowhow file unless --cascade is explicitly passed; default leaves orphan knowhow intact
37
+ 4. **Atomic removal** — use `maestro wiki remove-entry` for atomic operation; NEVER manually edit spec files to remove entries
38
+ 5. **Index consistency** — wiki index MUST be auto-updated after removal; stale index entries are a hard failure
39
+ 6. **Output boundary** — file modifications MUST target ONLY the spec container file (.workflow/specs/*.md) and optionally the referenced knowhow file (.workflow/knowhow/*) when --cascade is used. NEVER modify source code or files outside these paths
40
+ </invariants>
41
+
33
42
  <execution>
34
43
  Follow '~/.maestro/workflows/specs-remove.md' completely.
44
+
45
+ ### Phase Gates (MANDATORY, BLOCKING)
46
+
47
+ **GATE 1: Parse → Lookup**
48
+ - REQUIRED: Entry ID parsed from arguments.
49
+ - BLOCKED if: E001 — no entry ID provided.
50
+
51
+ **GATE 2: Lookup → Confirm**
52
+ - REQUIRED: .workflow/specs/ directory exists.
53
+ - REQUIRED: Entry found in wiki index as a spec sub-node.
54
+ - REQUIRED: Entry content loaded for user preview.
55
+ - BLOCKED if: E002 (specs not initialized), E003 (entry not found), E004 (wrong type).
56
+
57
+ **GATE 3: Confirm → Remove**
58
+ - REQUIRED: User confirmed removal via ask_question (unless -y flag).
59
+ - REQUIRED: If --cascade and entry has ref attribute, user additionally confirmed knowhow file deletion.
60
+ - BLOCKED if: user declines — abort without modification.
35
61
  </execution>
36
62
 
37
63
  <error_codes>
@@ -25,9 +25,39 @@ $ARGUMENTS (no arguments expected)
25
25
  - Project must contain source files to scan # (see code: E002)
26
26
  </context>
27
27
 
28
+ <invariants>
29
+ 1. **Non-destructive** — NEVER overwrite existing spec files; if a file already exists, skip it and report as already-initialized
30
+ 2. **Idempotent** — safe to re-run on an initialized project; re-running MUST NOT duplicate entries or corrupt existing content
31
+ 3. **Confirmation gate** — MUST ask_question showing all files to be created before writing; NEVER write without user confirmation
32
+ 4. **Output boundary** — ALL file writes MUST target .workflow/specs/ (spec files) and .workflow/knowhow/ (recipe knowhow) only. NEVER modify source code, .workflow/state.json, or files outside these paths
33
+ 5. **Core files mandatory** — coding-conventions.md, architecture-constraints.md, and learnings.md MUST always be created (unless they already exist)
34
+ 6. **Signal-driven optionals** — optional spec files (quality-rules.md, test-conventions.md, ui-conventions.md) MUST only be created when corresponding framework/tool signals are detected in the codebase; NEVER create optional files without evidence
35
+ </invariants>
36
+
28
37
  <execution>
29
38
  Follow '~/.maestro/workflows/specs-setup.md' completely.
30
39
 
40
+ ### Phase Gates (MANDATORY, BLOCKING)
41
+
42
+ **GATE 1: Precondition → Scan**
43
+ - REQUIRED: .workflow/ directory exists.
44
+ - REQUIRED: Project contains source files to scan.
45
+ - BLOCKED if: E001 (.workflow/ not initialized), E002 (no source files).
46
+
47
+ **GATE 2: Scan → Plan**
48
+ - REQUIRED: Codebase scan completed — framework, language, and tooling signals collected.
49
+ - REQUIRED: Core spec file list determined (always 3: coding-conventions, architecture-constraints, learnings).
50
+ - REQUIRED: Optional spec files determined by detected signals only.
51
+
52
+ **GATE 3: Plan → Write**
53
+ - REQUIRED: User confirmed the full list of files to create via ask_question (showing core specs, optional specs, recipe knowhow, and detected signals).
54
+ - BLOCKED if: user declines — abort without writing.
55
+
56
+ **GATE 4: Write → Report**
57
+ - REQUIRED: All confirmed files written to .workflow/specs/ and .workflow/knowhow/.
58
+ - REQUIRED: Existing files skipped (not overwritten).
59
+ - REQUIRED: .proposed.md files created when slug collision detected (W003).
60
+
31
61
  **Confirmation gate**: After scanning codebase and determining which files/directories will be created (core specs, optional specs, recipe knowhow), ask_question showing the full list of files to create with their categories and detected signals. Proceed only on user confirm.
32
62
  </execution>
33
63
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ralph-executor
3
- description: Single-step executor — ralph next + inline skill execution, multi-agent orchestration via SendMessage
3
+ description: Single-step executor — ralph next + inline skill execution, unnamed nesting for multi-agent orchestration
4
4
  allowed-tools:
5
5
  - Read
6
6
  - Write
@@ -10,48 +10,42 @@ allowed-tools:
10
10
  - Grep
11
11
  - Skill
12
12
  - Agent
13
- - SendMessage
14
13
  ---
15
14
 
16
15
  # Ralph Executor
17
16
 
18
17
  ## Role
19
18
 
20
- Single-step skill executor with multi-agent orchestration capability. Call `maestro ralph next` to load the skill prompt, execute it inline, return execution output via SendMessage. You are a sandboxed executor — arg resolution, context assembly, signal extraction, drift analysis, and session management are handled by the orchestrator.
19
+ Single-step skill executor with multi-agent orchestration capability. Call `maestro ralph next` to load the skill prompt, execute it inline, return execution output as final text. You are a sandboxed executor — arg resolution, context assembly, signal extraction, drift analysis, and session management are handled by the orchestrator.
21
20
 
22
21
  ## Process
23
22
 
24
- **立即自启动**:你是 named mailbox teammate。收到含 `session_id` 和 `agent_name` 的 dispatch prompt 后,MUST 立即从 step 1 开始执行——禁止等待 mailbox 后续指令,禁止发送 idle notification。
23
+ **立即自启动**:收到含 `session_id` 的 dispatch prompt 后,MUST 立即从 step 1 开始执行。
25
24
 
26
25
  1. Call `Bash("maestro ralph next --session {session_id}")` — **全量捕获 stdout,严禁截断管道**
27
26
  - Exit 0 → skill_prompt = stdout,继续执行
28
- - Exit 1 → SendMessage 错误信息给 main,结束
29
- - Exit 2 → SendMessage "所有 step 已完成" 给 main,结束
30
- - Exit 3 → SendMessage "并发冲突" 给 main,结束
27
+ - Exit 1 → 返回错误信息,结束
28
+ - Exit 2 → 返回 "所有 step 已完成",结束
29
+ - Exit 3 → 返回 "并发冲突",结束
31
30
  2. Execute the skill prompt inline — follow all instructions faithfully
32
31
  3. Handle `<deferred_reading>` paths: Read files on demand during execution, do not batch-load upfront
33
- 4. SendMessage({to: "main"}) 返回执行产物路径 + 摘要
32
+ 4. 返回执行产物路径 + 摘要作为最终输出文本(主流程通过 task-notification `<result>` 接收)
34
33
 
35
34
  ## Multi-Agent Orchestration
36
35
 
37
36
  当 skill prompt 需要多 agent 编排时(如 `maestro-execute` 的 wave 并行派发):
38
37
 
39
- 1. **派发 named worker**:调用 `Agent({name})` 派发 worker 为 named teammate,确保长时间任务存活:
40
- ```
41
- worker name 格式: {agent_name}-w{index}(如 exe-v2-001-w1, exe-v2-001-w2)
42
- ```
43
- > **必须传 name**:匿名 agent 执行完当前任务会 came to rest(死亡),后台任务完成通知无法唤醒。Named teammate 只会 idle,可被后台任务通知或 SendMessage 唤醒。
44
- 2. **等待结果**:worker 通过 SendMessage 回传结果到 executor 的 mailbox
45
- 3. **收集汇总**:接收所有 worker 的 SendMessage,汇总执行结果
46
- 4. **回报主流程**:通过 `SendMessage({to: "main"})` 返回最终执行输出
38
+ 1. **派发 unnamed worker**:调用 `Agent()` 不传 name,子结果自动回流给本 executor(嵌套套娃模型)
39
+ 2. **等待结果**:子 Agent 的 task-notification 会自动回流到本 executor,可直接使用返回的 `<result>`
40
+ 3. **收集汇总**:汇总所有子 Agent 的执行结果
41
+ 4. **返回**:将最终执行输出作为文本返回(主流程通过 task-notification 接收)
47
42
 
48
43
  ### Worker Dispatch Template
49
44
 
50
45
  ```
51
46
  Agent({
52
- name: "{agent_name}-w{index}",
53
47
  description: "执行子任务: {task_description}",
54
- prompt: "你是 worker agent。执行以下任务:\n{task_content}\n\n完成后必须调用 SendMessage({to: \"{agent_name}\", summary: \"worker完成\", message: \"WORKER_RESULT: [执行结果摘要 + 产物路径]\"})。"
48
+ prompt: "执行以下任务:\n{task_content}\n\n返回执行结果摘要 + 产物路径。"
55
49
  })
56
50
  ```
57
51
 
@@ -62,12 +56,11 @@ Agent({
62
56
  | Field | Required | Description |
63
57
  |-------|----------|-------------|
64
58
  | `session_id` | Yes | ralph session ID |
65
- | `agent_name` | Yes | 本 agent 的 name,用于 sub-agent SendMessage 回传 |
66
59
  | execution context | No | 编排器注入的上下文(intent、boundary、goals、prior steps 等) |
67
60
 
68
61
  ## Output
69
62
 
70
- 通过 `SendMessage({to: "main"})` 返回,格式:
63
+ 返回最终文本(主流程通过 task-notification `<result>` 接收),格式:
71
64
 
72
65
  ```
73
66
  EXECUTOR_OUTPUT:
@@ -78,14 +71,11 @@ EXECUTOR_OUTPUT:
78
71
  - error: <错误信息,仅 ERROR 时>
79
72
  ```
80
73
 
81
- 失败时也必须 SendMessage,禁止静默崩溃。
82
-
83
74
  ## Constraints
84
75
 
85
- - 禁止无故空转——收到 session_id 即开始执行,不等待编排器的后续 mailbox 指令。等待 worker SendMessage 回传期间的 idle 是正常行为(平台自动触发 idle_notification,不可抑制)
76
+ - 收到 session_id 即开始执行
86
77
  - Execute exactly one step per invocation
87
78
  - Do not call `maestro ralph complete` — completion is handled by the orchestrator
88
79
  - Do not read or modify `status.json` — session management is the orchestrator's responsibility
89
80
  - Do not skip execution steps or short-circuit — execute the full skill content
90
81
  - Do not insert/delete/reorder steps or evaluate decision nodes
91
- - 所有执行结果必须通过 SendMessage({to: "main"}) 回报,直接文本输出主流程看不到
@@ -37,6 +37,15 @@ Domain term lifecycle: discover/manual → register → active → (optional) de
37
37
  - `maestro domain deprecate <canonical> --successor <new>` — deprecate a term
38
38
  </context>
39
39
 
40
+ <invariants>
41
+ 1. **Single-term atomic operation** — each invocation registers exactly ONE term; NEVER batch-write multiple terms in a single execution
42
+ 2. **Glossary append-only** — existing terms in `glossary.yaml` SHALL NOT be modified or removed; only new entries are appended
43
+ 3. **Duplicate guard** — MUST check for exact canonical name match AND near-matches before writing; NEVER create duplicate entries
44
+ 4. **Confirmation mandatory** — MUST present term details (canonical, definition, aliases, tier, path) via AskUserQuestion before any glossary write; NEVER write without user confirmation
45
+ 5. **Schema compliance** — every term entry MUST include canonical name, definition, tier, and at least one alias/keyword; incomplete entries SHALL NOT be persisted
46
+ 6. **Domain directory prerequisite** — `.workflow/domain/` MUST exist before writing; NEVER auto-create the directory (E002 if missing)
47
+ </invariants>
48
+
40
49
  <execution>
41
50
  Follow '~/.maestro/workflows/domain-add.md' completely.
42
51
 
@@ -28,8 +28,19 @@ $ARGUMENTS — target path/module and optional flags.
28
28
 
29
29
  **Storage read**: target files + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
30
30
  **Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
31
+
32
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
31
33
  </context>
32
34
 
35
+ <invariants>
36
+ 1. **Read-only analysis** — NEVER modify source code files under analysis; all writes go to `.workflow/` only
37
+ 2. **Evidence-anchored findings** — every pattern MUST include at least one `file:line` anchor from source; unanchored patterns SHALL NOT be persisted
38
+ 3. **Dedup before persist** — MUST cross-reference against existing `learnings.md` and `coding-conventions.md` before writing; duplicate entries SHALL NOT be appended
39
+ 4. **Parallel agent isolation** — each dimension agent operates independently; NEVER share state between agents during analysis
40
+ 5. **Confirmation gate** — unless `-y` is set, MUST present all findings and target files via AskUserQuestion before any writes
41
+ 6. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
42
+ </invariants>
43
+
33
44
  <state_machine>
34
45
 
35
46
  <states>
@@ -100,6 +111,7 @@ Flag contradictions (finding conflicts with documented convention). Merge duplic
100
111
  <error_codes>
101
112
  | Code | Condition | Recovery |
102
113
  |------|-----------|----------|
114
+ | E001 | No target path/module provided | Prompt user for target |
103
115
  | E002 | No source files in target | Check target has .ts/.js files |
104
116
  | W001 | One+ dimension agent failed | Proceed with available dimensions |
105
117
  | W002 | .workflow/specs/learnings.md missing or malformed | Treat all patterns as new; create file on persist |
@@ -33,8 +33,46 @@ $ARGUMENTS — target and optional flags.
33
33
 
34
34
  **Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
35
35
  **Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
36
+
37
+ **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.
36
38
  </context>
37
39
 
40
+ <invariants>
41
+ 1. **Read-only traversal** — NEVER modify source code or wiki entries under analysis; all writes go to `.workflow/` only
42
+ 2. **Forcing questions mandatory** — each section MUST have all 4 forcing questions applied; NEVER skip questions even for trivial sections
43
+ 3. **Anchor requirement** — every extracted pattern MUST include a `file:line` anchor; unanchored patterns SHALL NOT be persisted to learnings.md
44
+ 4. **Convention cross-ref** — MUST check every finding against `coding-conventions.md` and mark status (documented/candidate); NEVER persist without status tag
45
+ 5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
46
+ 6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via AskUserQuestion before any writes
47
+ 7. **Depth contract** — `--depth shallow` MUST NOT descend into function bodies; `--depth deep` MUST cover every branch and sub-expression
48
+ </invariants>
49
+
50
+ <execution>
51
+
52
+ ### Phase Gates (MANDATORY, BLOCKING)
53
+
54
+ **GATE 1: Resolve → Context Building** (S_RESOLVE → S_CONTEXT)
55
+ - REQUIRED: Target resolved to a readable source (file path, wiki entry, or search result).
56
+ - BLOCKED if: target unresolvable after user prompt (E001/E002).
57
+
58
+ **GATE 2: Reading → Extraction** (S_READ → S_EXTRACT)
59
+ - REQUIRED: All sections traversed with 4 forcing questions applied per section.
60
+ - REQUIRED: Depth contract honored — shallow stays at top-level, deep covers every branch.
61
+ - BLOCKED if: any section skipped without forcing questions.
62
+
63
+ **GATE 3: Extraction → Persistence** (S_EXTRACT → S_PERSIST)
64
+ - REQUIRED: All extracted patterns have file:line anchors.
65
+ - REQUIRED: Convention cross-ref completed against coding-conventions.md (or marked "unknown status" if W002).
66
+ - BLOCKED if: unanchored patterns remain in extraction results.
67
+
68
+ **GATE 4: Persistence → Completion** (S_PERSIST → END)
69
+ - REQUIRED: Unless `-y`, AskUserQuestion showing files to write and spec-entries to append — user must confirm.
70
+ - REQUIRED: KNW-follow-{slug}-{date}.md written with understanding map.
71
+ - REQUIRED: learnings.md appended (not overwritten) with new spec-entry blocks.
72
+ - BLOCKED if: user declines confirmation — offer to adjust findings before retry.
73
+
74
+ </execution>
75
+
38
76
  <state_machine>
39
77
 
40
78
  <states>
@@ -112,6 +150,9 @@ Write understanding map: Key Concepts, Patterns (table: name/location/convention
112
150
  <error_codes>
113
151
  | Code | Condition | Recovery |
114
152
  |------|-----------|----------|
153
+ | E001 | No target path/wiki-id/topic provided | Prompt user for target |
154
+ | E002 | Target path not found and wiki/grep search returned no results | Check path or broaden search terms |
155
+ | W001 | Wiki forward/backlinks unavailable | Proceed without context web; note reduced coverage |
115
156
  | W002 | coding-conventions.md not found | All patterns marked "unknown status" |
116
157
  | W003 | Target > 1000 lines | Auto-switch to shallow; use --depth deep to override |
117
158
  </error_codes>
@@ -31,8 +31,20 @@ $ARGUMENTS — question text and optional flags.
31
31
  - `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks
32
32
 
33
33
  **Storage read**: source files in scope + `maestro search` + `.workflow/specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
34
+
35
+ **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.
34
36
  </context>
35
37
 
38
+ <invariants>
39
+ 1. **Read-only investigation** — NEVER modify source code files; all writes go to `.workflow/` only
40
+ 2. **Evidence append-only** — `evidence.ndjson` MUST be appended line-by-line; NEVER overwrite or truncate existing evidence entries
41
+ 3. **Scope lock** — once `--scope` is resolved in S_FRAME, NEVER expand search scope without explicit user confirmation via S_ESCALATE
42
+ 4. **Hypothesis cap** — MUST NOT generate more than `--max-hypotheses` (default 3) before triggering escalation; NEVER silently exceed the cap
43
+ 5. **Structured evidence format** — every evidence entry MUST include `{ts, type, source, relevance, content, note}`; incomplete entries SHALL NOT be appended
44
+ 6. **3-strike escalation** — after all hypotheses fail, MUST escalate to user via AskUserQuestion; NEVER silently conclude as INCONCLUSIVE without user interaction
45
+ 7. **Confirmation gate** — unless `-y` is set, MUST present report.md path and spec-entries via AskUserQuestion before final writes
46
+ </invariants>
47
+
36
48
  <state_machine>
37
49
 
38
50
  <states>
@@ -134,7 +146,9 @@ Append to .workflow/specs/learnings.md: confirmed → roles="implement", disprov
134
146
  <error_codes>
135
147
  | Code | Condition | Recovery |
136
148
  |------|-----------|----------|
149
+ | E001 | No question text provided | Prompt user for investigation question |
137
150
  | E002 | --scope path not found | Check path |
151
+ | W001 | Prior knowledge search returned no results | Proceed without prior context; note cold-start |
138
152
  | W002 | Very few evidence matches (<3) | Broaden search terms or expand scope |
139
153
  | W003 | All hypotheses inconclusive | Investigation marked INCONCLUSIVE |
140
154
  </error_codes>
@@ -34,8 +34,19 @@ $ARGUMENTS — target and optional mode flag.
34
34
  **Pre-load** (optional): `Skill("spec-load")` for conventions + `maestro search "<target topic>"` for related entries.
35
35
 
36
36
  **Output**: `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md`
37
+
38
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
37
39
  </context>
38
40
 
41
+ <invariants>
42
+ 1. **Read-only analysis** — NEVER modify source code, wiki entries, or plan files under review; all writes go to `.workflow/` only
43
+ 2. **Agent independence** — in review mode, each of the 3 agents (Pragmatist/Purist/Strategist) MUST operate independently without shared state; NEVER pass one agent's findings to another
44
+ 3. **Evidence-backed verdicts** — every finding MUST include a `location` reference (file:line or section); ungrounded opinions SHALL NOT appear in the report
45
+ 4. **Mode contract** — MUST execute exactly the mode specified (review/challenge/consult); NEVER mix mode behaviors within a single execution
46
+ 5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
47
+ 6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via AskUserQuestion before any writes
48
+ </invariants>
49
+
39
50
  <state_machine>
40
51
 
41
52
  <states>
@@ -104,8 +115,11 @@ Interactive loop:
104
115
  <error_codes>
105
116
  | Code | Condition | Recovery |
106
117
  |------|-----------|----------|
118
+ | E001 | No target provided | Prompt user for target (path, wiki ID, HEAD, staged, or phase) |
107
119
  | E002 | Unknown --mode value | Use: review, challenge, or consult |
120
+ | E003 | Target resolution failed — path not found, wiki ID invalid, or no staged changes | Check target exists |
108
121
  | W001 | One review agent failed | Proceed with available perspectives |
122
+ | W002 | Specs/wiki pre-load unavailable | Proceed without convention context; note reduced coverage |
109
123
  </error_codes>
110
124
 
111
125
  <success_criteria>
@@ -40,8 +40,19 @@ Multiple combinable. No flags + no description → interactive (scan + AskUserQu
40
40
  **CLI targeting**: `"cli": "claude"` (default, patches .claude/commands/), `"codex"` (patches .codex/skills/), `"both"` (both paths)
41
41
 
42
42
  **Output**: `~/.maestro/overlays/amend-{slug}.json` + optional `~/.maestro/overlays/docs/amend-{slug}.md`
43
+
44
+ **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`.
43
45
  </context>
44
46
 
47
+ <invariants>
48
+ 1. **Non-invasive only** — amendments MUST use the overlay system (`~/.maestro/overlays/*.json`); direct edits to `.claude/commands/*.md` are NEVER permitted
49
+ 2. **Idempotent patches** — re-running the same amendment MUST produce identical overlay JSON; overlay markers prevent duplicate injection
50
+ 3. **Pristine source reads** — signal diagnosis MUST read from `$PKG_ROOT/.claude/commands/` (untouched originals), not installed copies
51
+ 4. **Code bugs excluded** — signals classified as code bugs MUST be routed to `/maestro-quick` or `/maestro-plan --gaps`, NEVER patched via overlay
52
+ 5. **User confirmation before install** — overlay JSON MUST be previewed and confirmed by the user before `maestro overlay add` runs (unless `-y`)
53
+ 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
54
+ </invariants>
55
+
45
56
  <state_machine>
46
57
 
47
58
  <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: "[phase|topic] [-y] [-c] [-q] [--gaps [ISS-ID]]"
4
+ argument-hint: "[milestone|topic] [-y] [-c] [-q] [--gaps [ISS-ID]]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -27,17 +27,17 @@ Multi-dimensional analysis of a proposal, decision, or architecture choice via C
27
27
  </deferred_reading>
28
28
 
29
29
  <context>
30
- $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no args for milestone-wide.
30
+ $ARGUMENTS -- milestone number for micro mode, topic text for macro/adhoc mode, no args for current milestone.
31
31
 
32
32
  **Dual-layer mode:**
33
33
  - **Macro mode** (text argument): Explore impact surface of a topic/requirement. Produces coarse-grained context with `scope_verdict` to route next step. Use before roadmap or for standalone analysis.
34
- - **Micro mode** (numeric argument): Phase-level deep analysis within an existing roadmap. Produces fine-grained context for plan consumption. `analyze 1` = Phase 1 of current milestone.
34
+ - **Micro mode** (numeric argument): Milestone-level deep analysis within an existing roadmap. Covers all phases under the milestone. Same analysis depth, broader scope. `analyze 1` = Milestone 1.
35
35
 
36
36
  **Disambiguation rule (mode selection):**
37
- - First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as phase number)
37
+ - First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as milestone number)
38
38
  - First positional arg is non-numeric text (e.g. `auth-refactor`, `improve search`) → **macro mode** (treat as topic)
39
- - No positional arg → milestone-wide micro mode (when roadmap present) else macro fallback
40
- - Mixed input like `"1 phase"` is treated as text → macro mode (only bare numerics trigger micro)
39
+ - No positional arg → current milestone micro mode (when roadmap present) else macro fallback
40
+ - Mixed input like `"1 milestone"` is treated as text → macro mode (only bare numerics trigger micro)
41
41
 
42
42
  **Flags:**
43
43
 
@@ -52,9 +52,9 @@ $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no a
52
52
  **Scope routing:**
53
53
  | Input | Mode | Scope |
54
54
  |-------|------|-------|
55
- | Pure digits (e.g. `1`, `42`) | micro | Phase-level deep analysis |
55
+ | Pure digits (e.g. `1`, `42`) | micro | Milestone-level deep analysis |
56
56
  | Non-numeric text (e.g. `auth-refactor`) | macro | Topic impact surface |
57
- | No positional arg + roadmap | micro | Milestone-wide |
57
+ | No positional arg + roadmap | micro | Current milestone |
58
58
  | No positional arg + no roadmap | macro | Fallback |
59
59
  | `--gaps [ISS-ID]` | gaps | Issue root cause analysis |
60
60
 
@@ -79,7 +79,7 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
79
79
  **Scope guard**: only analyze decisions; do not prejudge plan/execute concerns
80
80
  **Writeback target**: discussion.md (top table) + context.md "Interview Decisions"
81
81
  **Additional search sources**: issues.jsonl (--gaps mode), roadmap.md
82
- **Additional skip conditions**: input is already specific (explicit phase number or unambiguous topic)
82
+ **Additional skip conditions**: input is already specific (explicit milestone number or unambiguous topic)
83
83
  **Exit condition**: all decision points settled → finalize session metadata
84
84
  </interview_protocol>
85
85
 
@@ -122,9 +122,9 @@ Status verdicts:
122
122
 
123
123
  | Condition | Suggestion |
124
124
  |-----------|-----------|
125
- | Phase/Milestone scope, Go, UI work needed | `/maestro-impeccable build {target}` |
126
- | Phase/Milestone scope, Go, ready to plan | `/maestro-plan` or `/maestro-plan {phase}` |
127
- | Phase/Milestone scope, No-Go | Revisit requirements or `/maestro-brainstorm {topic}` |
125
+ | Milestone scope, Go, UI work needed | `/maestro-impeccable build {target}` |
126
+ | Milestone scope, Go, ready to plan | `/maestro-plan` or `/maestro-plan {milestone}` |
127
+ | Milestone scope, No-Go | Revisit requirements or `/maestro-brainstorm {topic}` |
128
128
  | Macro/Adhoc, scope_verdict = large | `/maestro-roadmap --from analyze:ANL-xxx` |
129
129
  | Macro/Adhoc, scope_verdict = medium/small | `/maestro-plan --from analyze:ANL-xxx` |
130
130
  | Need more exploration | `/maestro-analyze {topic} -c` |
@@ -175,7 +175,7 @@ Both modes (full + quick):
175
175
  - [ ] Decision Recording Protocol applied to all decisions
176
176
  - [ ] Scope creep redirected to Deferred section
177
177
  - [ ] Deferred items auto-created as issues (if any)
178
- - [ ] Artifact registered in state.json with correct scope/milestone/phase
178
+ - [ ] Artifact registered in state.json with correct scope/milestone
179
179
  - [ ] Next step routed (impeccable/plan for Go, brainstorm for No-Go)
180
180
  - [ ] Session sealed via finish-work (archive.json written, optional spec/knowhow extraction)
181
181
  </success_criteria>
@@ -48,12 +48,23 @@ $ARGUMENTS — mode + optional flags.
48
48
 
49
49
  Auto-detection: if `--type` not provided, infer from `--task` description keywords.
50
50
 
51
+ **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/`.
52
+
51
53
  **Companion document:**
52
54
  - Path: `.workflow/.scratchpad/companion-{YYYYMMDD-HHmmss}.md`
53
55
  - Active doc tracking: `.workflow/.scratchpad/.companion-active` (stores path of current companion doc)
54
56
  - Format: YAML frontmatter (rich metadata) + typed sections + timestamped entries
55
57
  </context>
56
58
 
59
+ <invariants>
60
+ 1. **No session creation** — companion NEVER creates workflow sessions, NEVER writes to state.json
61
+ 2. **Side-car only** — companion MUST NOT modify source code or execute implementation tasks; it is strictly a knowledge loading + recording utility
62
+ 3. **One active doc** — only one `.companion-active` pointer SHALL exist at a time; creating a new companion doc MUST clear any stale pointer
63
+ 4. **Append-only entries** — note mode MUST append entries; NEVER overwrite or reorder existing entries
64
+ 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/`
65
+ 6. **Type-template integrity** — context template sections MUST match the resolved `task_type`; NEVER mix templates from different types
66
+ </invariants>
67
+
57
68
  <state_machine>
58
69
 
59
70
  <states>
@@ -39,8 +39,19 @@ $ARGUMENTS — natural language description, or flags.
39
39
  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.
40
40
  2. **Coding specs**: Run `maestro load --type spec --category coding` to load coding conventions. Informs executor argument defaults and context injection.
41
41
  3. Optional — proceed without if unavailable.
42
+
43
+ **Output boundary**: ALL file writes MUST target `~/.maestro/templates/workflows/` (template JSON + index.json) and `.workflow/templates/design-drafts/` (intermediate drafts) only. NEVER modify source code or `.claude/commands/` files.
42
44
  </context>
43
45
 
46
+ <invariants>
47
+ 1. **Max 20 nodes** — workflow templates MUST NOT exceed 20 nodes; larger workflows MUST be split into sub-workflows
48
+ 2. **Acyclic DAG** — generated template MUST be a directed acyclic graph; cycles MUST be detected and rejected before persistence
49
+ 3. **No orphan nodes** — every node MUST be reachable from at least one edge; unreachable nodes MUST be flagged
50
+ 4. **Confirmation before write** — template JSON MUST be shown to user via AskUserQuestion before writing to `~/.maestro/templates/workflows/`; cancellation saves draft only
51
+ 5. **Draft preservation** — abandoning at any confirmation gate MUST save current progress to design-drafts directory; NEVER discard user's partial work
52
+ 6. **Deferred reading only** — node-catalog and template-schema MUST be read at their designated phases (P2, P5), NEVER loaded eagerly at startup
53
+ </invariants>
54
+
44
55
  <state_machine>
45
56
 
46
57
  <states>
@@ -141,7 +152,7 @@ Write `nodes.json`. Display resolved node list.
141
152
  |------|-----------|
142
153
  | Artifact boundary | Source outputs plan/spec/analysis/review |
143
154
  | Execution gate | Target contains `execute` |
144
- | Long-running | Target is maestro-plan, maestro-roadmap --mode full |
155
+ | Long-running | Target is maestro-plan, maestro-blueprint |
145
156
  | Post-testing | Source contains `test` or `auto-test` |
146
157
  | User-defined | type_hint == checkpoint |
147
158
 
@@ -30,10 +30,35 @@ $ARGUMENTS — Parse subcommand and optional path argument.
30
30
 
31
31
  **Enforcement:** The `workflow-guard` hook (PreToolUse on Write/Edit) reads this config
32
32
  and blocks operations targeting files outside boundaries. Requires hooks level >= `full`.
33
+
34
+ **Output boundary**: ALL file writes MUST target `.workflow/config.json` (guard section) only. NEVER modify hook files, `.claude/settings.json`, or source code.
33
35
  </context>
34
36
 
37
+ <invariants>
38
+ 1. **Config-only mutation** — guard MUST only modify the `guard` section of `.workflow/config.json`; NEVER touch other config sections or files
39
+ 2. **Non-destructive** — `off` MUST preserve existing paths and mode; NEVER clear the path list when disabling
40
+ 3. **Mode switch confirmation** — switching between allow/deny mode MUST require AskUserQuestion confirmation when existing paths will be cleared
41
+ 4. **Hook dependency** — guard MUST warn when enabled but `workflow-guard` hook is not active (hooks level < full)
42
+ 5. **Path normalization** — all paths MUST use forward slashes with trailing slash for directories; NEVER store raw backslash paths
43
+ </invariants>
44
+
35
45
  <execution>
36
46
 
47
+ ### Phase Gates (MANDATORY, BLOCKING)
48
+
49
+ **GATE 1: Parse → Config Read**
50
+ - REQUIRED: Subcommand parsed (on/off/status/allow/deny) or defaulted to `status`.
51
+ - BLOCKED if: invalid subcommand provided.
52
+
53
+ **GATE 2: Config Read → Execute**
54
+ - REQUIRED: `.workflow/config.json` read successfully or initialized with empty guard section.
55
+ - BLOCKED if: file unreadable and cannot be created (E001).
56
+
57
+ **GATE 3: Execute → Confirm**
58
+ - REQUIRED: Config mutation applied (for on/off/allow/deny) or status displayed (for status).
59
+ - REQUIRED: Mode-switch AskUserQuestion answered (for allow↔deny transitions with existing paths).
60
+ - BLOCKED if: user declines mode switch.
61
+
37
62
  **Step 1: Parse subcommand**
38
63
 
39
64
  Extract from $ARGUMENTS: