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
@@ -43,6 +43,8 @@ $ARGUMENTS
43
43
  **Session**: `.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`
44
44
  **Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md`
45
45
 
46
+ **Output boundary**: ALL session artifacts MUST target the session directory (`.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`) or `.workflow/state.json` only. Source code modifications during S_FIX are in-scope but MUST be committed per action. NEVER write session artifacts outside these paths.
47
+
46
48
  **session.json — review-specific fields:**
47
49
  ```json
48
50
  { "target": "", "dimensions": [], "review_result": {"remaining_actionable": 0},
@@ -88,6 +90,54 @@ All invariants defined in base.
88
90
  Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE**. Logic in base.
89
91
  </self_iteration>
90
92
 
93
+ <execution>
94
+ Follow base execution discipline completely. Actions defined in state_machine below.
95
+
96
+ ### Phase Gates (MANDATORY, BLOCKING)
97
+
98
+ **GATE 1: INTAKE → ARCHAEOLOGY**
99
+ - REQUIRED: Target resolved to file list, SESSION_DIR created, session.json initialized.
100
+ - REQUIRED: phase_goals[] derived from flags, understanding.md §1 written.
101
+ - BLOCKED if: no target specified (E001) or target path not found (E002).
102
+
103
+ **GATE 2: ARCHAEOLOGY → EXPLORE**
104
+ - REQUIRED: Git history analysis completed (timeline + blame agents), evidence phase=archaeology logged.
105
+ - REQUIRED: understanding.md §2 updated.
106
+ - BLOCKED if: both archaeology agents failed AND delegate failed (partial results via W003 are acceptable).
107
+
108
+ **GATE 3: EXPLORE → REVIEW**
109
+ - REQUIRED: explore.json written with call_chains/recent_changes/error_gaps/similar_patterns (or W006 skip logged).
110
+ - REQUIRED: Evidence phase=explore logged, understanding.md §3 updated, G2 marked done.
111
+ - BLOCKED if: exploration started but not completed (W006 skip is acceptable, incomplete is not).
112
+
113
+ **GATE 4: REVIEW → FIX**
114
+ - REQUIRED: All dimension agents completed, findings merged with severity classification.
115
+ - REQUIRED: review_result written to session.json, understanding.md §4 with severity matrix, G1 marked done.
116
+ - BLOCKED if: zero dimensions reviewed (W002 partial is allowed, zero is not).
117
+
118
+ **GATE 5: FIX → CONFIRM**
119
+ - REQUIRED: Current severity tier fully addressed — all findings in tier fixed or individually classified.
120
+ - REQUIRED: Per-fix evidence phase=fix logged, auto-commit per tier.
121
+ - BLOCKED if: tier incomplete — no partial tier advancement.
122
+
123
+ **GATE 6: CONFIRM → GENERALIZE**
124
+ - REQUIRED: Tests pass, remaining_actionable == 0, new findings == 0.
125
+ - REQUIRED: confirmation written, understanding.md §5 updated, G3 marked done.
126
+ - BLOCKED if: needs_rework → route back to S_FIX.
127
+
128
+ **GATE 7: GENERALIZE → DISCOVER**
129
+ - REQUIRED: ALL 3 layers (syntax/semantic/structural) attempted with evidence logged.
130
+ - REQUIRED: generalization_stats written with by_layer entries for all 3 layers, G4 marked done.
131
+ - BLOCKED if: any layer not attempted (thoroughness floor violation).
132
+
133
+ **GATE 8: DISCOVER → RECORD**
134
+ - REQUIRED: All hits triaged with per-item classification and reason.
135
+ - REQUIRED: remaining_actionable == 0 OR loops >= max_loops with per-item reasons logged.
136
+ - REQUIRED: G5 marked done.
137
+ - BLOCKED if: unclassified hits remain.
138
+
139
+ </execution>
140
+
91
141
  <state_machine>
92
142
 
93
143
  <states>
@@ -39,6 +39,8 @@ $ARGUMENTS
39
39
  **Session**: `.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
40
40
  **Output**: `session.json` | `evidence.ndjson` | `understanding.md`
41
41
 
42
+ **Output boundary**: ALL session artifacts MUST target the session directory (`.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`) or `.workflow/state.json` only. Source code modifications during S_FIX are in-scope but MUST be committed per action. NEVER write session artifacts outside these paths.
43
+
42
44
  **session.json — ui-specific fields:**
43
45
  ```json
44
46
  { "target": "", "dimensions": [],
@@ -87,6 +89,54 @@ $ARGUMENTS
87
89
  Applies to: **S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE**. Logic in base.
88
90
  </self_iteration>
89
91
 
92
+ <execution>
93
+ Follow base execution discipline completely. Actions defined in state_machine below.
94
+
95
+ ### Phase Gates (MANDATORY, BLOCKING)
96
+
97
+ **GATE 1: INTAKE → SURVEY**
98
+ - REQUIRED: Target resolved, SESSION_DIR created, session.json initialized.
99
+ - REQUIRED: phase_goals[] derived from flags, understanding.md §1 written.
100
+ - BLOCKED if: no target specified (E001) or target path not found (E002).
101
+
102
+ **GATE 2: SURVEY → AUDIT**
103
+ - REQUIRED: Design system inventory + current state analysis completed.
104
+ - REQUIRED: Evidence phase=survey logged, understanding.md §2 updated, G1 marked done.
105
+ - BLOCKED if: survey incomplete — token scan and styling analysis must both be attempted.
106
+
107
+ **GATE 3: AUDIT → DIVERGE**
108
+ - REQUIRED: All 6 dimension agents completed (or --dimensions subset), findings merged with severity classification.
109
+ - REQUIRED: audit_result written to session.json, understanding.md §3 with severity matrix, G2 marked done.
110
+ - BLOCKED if: zero dimensions reviewed (W002 partial is allowed, zero is not).
111
+
112
+ **GATE 4: DIVERGE → FIX**
113
+ - REQUIRED: Both parallel agents (Polish + Delight) completed, ideas consolidated with audit findings.
114
+ - REQUIRED: diverge_result written, understanding.md §4 updated, G3 marked done.
115
+ - BLOCKED if: divergent exploration not attempted.
116
+
117
+ **GATE 5: FIX → VERIFY**
118
+ - REQUIRED: ALL findings/ideas within fix_threshold fixed by priority tier.
119
+ - REQUIRED: Per-fix evidence phase=fix logged.
120
+ - BLOCKED if: tier incomplete — each tier must be fully addressed before advancing.
121
+
122
+ **GATE 6: VERIFY → GENERALIZE**
123
+ - REQUIRED: Tests pass (lint, unit, visual regression), delegate verification completed.
124
+ - REQUIRED: confirmation written, understanding.md §5 updated, G4 marked done.
125
+ - BLOCKED if: needs_rework → route back to S_FIX.
126
+
127
+ **GATE 7: GENERALIZE → DISCOVER**
128
+ - REQUIRED: ALL 3 layers (syntax/semantic/structural) attempted with evidence logged.
129
+ - REQUIRED: generalization_stats written with by_layer entries for all 3 layers, G5 marked done.
130
+ - BLOCKED if: any layer not attempted (thoroughness floor violation).
131
+
132
+ **GATE 8: DISCOVER → RECORD**
133
+ - REQUIRED: All hits triaged with per-item classification and reason.
134
+ - REQUIRED: remaining_actionable == 0 OR loops >= max_loops with per-item reasons logged.
135
+ - REQUIRED: G6 marked done.
136
+ - BLOCKED if: unclassified hits remain.
137
+
138
+ </execution>
139
+
90
140
  <state_machine>
91
141
 
92
142
  <states>
@@ -52,8 +52,20 @@ Flags, artifact context resolution, and output formats defined in workflow auto-
52
52
  - Browse: `maestro search --category test`
53
53
  - Load task-relevant entries: `maestro load --type knowhow --id <id1> [id2...]`
54
54
  4. All are optional — proceed without if unavailable.
55
+
56
+ **Output boundary**: ALL file writes MUST target `.workflow/scratch/{YYYYMMDD}-auto-test-P{N}-{slug}/` or `.workflow/state.json` only. Source code modifications are limited to test files generated by this command. NEVER modify existing production source code.
55
57
  </context>
56
58
 
59
+ <invariants>
60
+ 1. **Test code isolation** — generated tests MUST be written to test directories following existing project conventions. NEVER modify production source code to make tests pass.
61
+ 2. **RED-GREEN integrity** — tests MUST be written to fail first (RED), then verified to pass against implementation (GREEN). NEVER write tests that pass trivially or assert nothing.
62
+ 3. **Layer ordering is strict** — L0→L3 execution is sequential and fail-fast. NEVER skip a layer or run L2 before L1 passes.
63
+ 4. **Existing tests are sacred** — NEVER modify, delete, or overwrite existing test files. New tests are additive only.
64
+ 5. **Convergence requires evidence** — pass rate and confidence score MUST be computed from actual execution results. NEVER infer or estimate pass rates without running tests.
65
+ 6. **Iteration has bounds** — outer iteration MUST NOT exceed `--max-iter` (default 5). Inner test_defect fix MUST NOT exceed 3 attempts per scenario before escalating.
66
+ 7. **Traceability is mandatory for spec source** — when route=spec, every test scenario MUST trace back to a REQ-*.md requirement. Untraceable tests are flagged.
67
+ </invariants>
68
+
57
69
  <execution>
58
70
  Follow '~/.maestro/workflows/auto-test.md' completely.
59
71
 
@@ -136,7 +148,7 @@ Append to state.json.artifacts[]:
136
148
  | E003 | error | No test framework detected | Install test framework or configure test runner |
137
149
  | W001 | warning | One or more test scenarios failed | Auto-iterate or suggest fix options |
138
150
  | W002 | warning | Max iterations reached without convergence | Review reflection-log.md, suggest debug |
139
- | W003 | warning | Degraded spec mode (no full spec package) | Consider running maestro-roadmap --mode full |
151
+ | W003 | warning | Degraded spec mode (no full spec package) | Consider running /maestro-blueprint |
140
152
  </error_codes>
141
153
 
142
154
  <success_criteria>
@@ -48,8 +48,19 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
48
48
  - Role knowledge: `maestro search --category debug` → select relevant → `maestro load --type knowhow --id`
49
49
 
50
50
  **Output**: `DEBUG_DIR = .workflow/scratch/{YYYYMMDD}-debug-P{N}-{slug}/` (P{N} = phase number when phase-scoped; omit for standalone). Output directory rules defined in workflow debug.md Step 4.
51
+
52
+ **Output boundary**: ALL file writes MUST target `DEBUG_DIR` or `.workflow/state.json` only. NEVER modify source code, test files, or other artifacts outside these paths during investigation.
51
53
  </context>
52
54
 
55
+ <invariants>
56
+ 1. **Investigation is read-only on source** — debug MUST NOT modify source code, test files, or execution artifacts. Diagnosis produces understanding.md, evidence.ndjson, and reports only.
57
+ 2. **Root cause requires reproduction** — NEVER declare a root cause confirmed without evidence (code trace, log entry, or reproduction steps). Hypothesis without evidence stays "suspected".
58
+ 3. **Evidence is append-only** — evidence.ndjson entries MUST only be appended, NEVER modified or deleted. Each entry is an immutable observation.
59
+ 4. **Confidence is multi-factor** — root cause confidence MUST use the multi-factor scoring model (Step 7.0). NEVER use bare high/medium/low without dimensional breakdown.
60
+ 5. **Prior investigations are consulted** — when related debug artifacts exist, check understanding.md for prior root causes. NEVER re-investigate an already-confirmed root cause without new symptoms.
61
+ 6. **Fix direction is not fix execution** — debug produces `fix_direction` and `affected_files` but NEVER applies fixes. Fix execution belongs to plan→execute cycle.
62
+ </invariants>
63
+
53
64
  <execution>
54
65
  Follow '~/.maestro/workflows/debug.md' completely.
55
66
 
@@ -36,8 +36,19 @@ If not provided, prompt user for scope.
36
36
  - Browse: `maestro search --category coding`
37
37
  - Identify task-relevant entries, then load: `maestro load --type knowhow --id <id1> [id2...]`
38
38
  4. All are optional — proceed without if unavailable.
39
+
40
+ **Output boundary**: Refactoring modifies source files within the declared scope only. Ancillary outputs (reflection-log.md) MUST target `.workflow/scratch/{YYYYMMDD}-refactor-{slug}/`. NEVER modify files outside the confirmed scope without re-confirmation.
39
41
  </context>
40
42
 
43
+ <invariants>
44
+ 1. **Plan before change** — NEVER apply refactoring changes without a confirmed plan. Every modification traces to a plan item.
45
+ 2. **Behavioral equivalence** — refactoring MUST preserve existing behavior. All tests MUST pass after each individual change, not just at the end.
46
+ 3. **Scope is locked after confirmation** — once the user confirms the refactoring plan, do NOT expand scope to include additional files or changes without re-confirmation.
47
+ 4. **Incremental verification** — each discrete refactoring step MUST be verified (tests run) before proceeding to the next. NEVER batch multiple unrelated changes into a single verification.
48
+ 5. **No feature creep** — refactoring MUST NOT add new functionality, change APIs, or alter public interfaces. If a beneficial API change is discovered, log it as a recommendation, do NOT apply it.
49
+ 6. **Rollback safety** — if any test fails after a refactoring step, revert that specific change before attempting alternatives. NEVER proceed with failing tests.
50
+ </invariants>
51
+
41
52
  <execution>
42
53
  Follow '~/.maestro/workflows/refactor.md' completely.
43
54
 
@@ -38,8 +38,19 @@ Arguments: $ARGUMENTS
38
38
  - `--lens <name>` — Restrict to specific lens (technical|process|quality|decision); default: all four
39
39
 
40
40
  Modes (scan/single/range/all) and storage paths defined in workflow retrospective.md Argument Shape and Stages 1-7.
41
+
42
+ **Output boundary**: ALL file writes MUST target the phase's retrospective directory (`.workflow/scratch/{YYYYMMDD}-retrospective-P{N}/`), `.workflow/state.json`, `.workflow/issues.jsonl`, or `.workflow/specs/` (append-only). NEVER modify source code, verification.json, review.json, plan.json, or other existing artifacts.
41
43
  </context>
42
44
 
45
+ <invariants>
46
+ 1. **Source artifacts are read-only** — NEVER modify verification.json, review.json, plan.json, or any execution artifact. Retrospective reads these for analysis only.
47
+ 2. **Stable insight IDs** — `INS-{8hex}` MUST be deterministic from `hash(phase_num + lens + title)`. Re-runs MUST NOT create duplicate insights.
48
+ 3. **Routing requires confirmation** — unless `-y` flag is set, every external write (issues.jsonl, spec entry, knowhow capture) MUST be confirmed by user before execution.
49
+ 4. **Lens independence** — each lens agent (technical/process/quality/decision) operates independently. One lens's findings MUST NOT suppress or override another's.
50
+ 5. **Append-only for specs** — learnings.md entries are appended as `<spec-entry>` blocks. NEVER overwrite or restructure existing entries.
51
+ 6. **Archive before overwrite** — if retrospective.json already exists for a phase, the existing file MUST be archived before writing a new version.
52
+ </invariants>
53
+
43
54
  <execution>
44
55
  Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order.
45
56
 
@@ -54,8 +54,19 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
54
54
  - Role knowledge: `maestro search --category review` → select relevant → `maestro load --type knowhow --id`
55
55
 
56
56
  **Output**: `REVIEW_DIR = .workflow/scratch/{YYYYMMDD}-review-P{N}-{slug}/` (P{N} = phase number, enables directory-level identification as state.json fallback)
57
+
58
+ **Output boundary**: ALL file writes MUST target `REVIEW_DIR` or `.workflow/state.json` only. NEVER modify source code, execution artifacts, or files outside these paths.
57
59
  </context>
58
60
 
61
+ <invariants>
62
+ 1. **Review is read-only on source** — NEVER modify source code, test files, or execution artifacts. Review produces reports only.
63
+ 2. **Findings require evidence** — every finding MUST reference file:line and include a code snippet or concrete description. No vague or unanchored findings.
64
+ 3. **Verdict is data-driven** — NEVER change verdict severity to accommodate user preference without new evidence. Verdicts flow from findings, not negotiation.
65
+ 4. **Dimension independence** — each review dimension produces findings independently. One dimension's results MUST NOT suppress or override another's.
66
+ 5. **Prior review delta** — when a prior review.json exists for the same phase, findings MUST be compared. Do NOT re-report already-resolved findings as new.
67
+ 6. **Spec conflict integrity** — if code contradicts a spec entry, flag via `maestro spec conflict mark`. NEVER silently accept the contradiction or edit the spec inline.
68
+ </invariants>
69
+
59
70
  <execution>
60
71
  Follow '~/.maestro/workflows/review.md' completely.
61
72
 
@@ -25,8 +25,18 @@ $ARGUMENTS -- optional flags:
25
25
  - `--full` -- Complete resync of all tracked files (ignores git diff, rebuilds all docs)
26
26
  - `--since <commit|HEAD~N>` -- Diff since specific commit (default: last sync timestamp)
27
27
  - `--dry-run` -- Show what would be updated without writing changes
28
+
29
+ **Output boundary**: ALL file writes MUST target `.workflow/codebase/`, `.workflow/state.json`, or `doc-index.json` only. NEVER modify source code or files outside `.workflow/`. `--dry-run` MUST suppress all writes.
28
30
  </context>
29
31
 
32
+ <invariants>
33
+ 1. **Source code is read-only** — sync reads source files to generate documentation. NEVER modify source code, test files, or any non-documentation files.
34
+ 2. **Dry-run is side-effect-free** — when `--dry-run` is set, NO file writes occur. Report only what would change.
35
+ 3. **Impact trace before refresh** — NEVER regenerate a doc file without first tracing which source changes affect it via doc-index.json. Untargeted full-refresh requires explicit `--full` flag.
36
+ 4. **Idempotent sync** — running sync twice with the same diff MUST produce identical results. State.json timestamp prevents redundant re-runs.
37
+ 5. **Incremental by default** — without `--full`, only changed components are refreshed. NEVER silently expand to a full rebuild.
38
+ </invariants>
39
+
30
40
  <execution>
31
41
  Follow '~/.maestro/workflows/sync.md' completely.
32
42
 
@@ -24,8 +24,20 @@ UAT-style conversational testing for a completed phase. Interactive scenario wal
24
24
  Phase or task: $ARGUMENTS (optional)
25
25
 
26
26
  Flags, artifact context resolution, and output directory format defined in workflow test.md.
27
+
28
+ **Output boundary**: ALL file writes MUST target `.workflow/scratch/{YYYYMMDD}-test-P{N}-{slug}/`, `.workflow/state.json`, or `.workflow/issues.jsonl` only. NEVER modify source code or execution artifacts outside these paths. `--frontend-verify` additionally writes `e2e-results.json` to the same scratch directory.
27
29
  </context>
28
30
 
31
+ <invariants>
32
+ 1. **UAT is observational** — test execution observes behavior and records results. NEVER modify source code during testing. Source fixes belong to debug→plan→execute cycle.
33
+ 2. **Severity is inferred, not asked** — severity MUST be inferred from user's natural language description of issues. NEVER explicitly ask the user to assign severity levels.
34
+ 3. **One scenario at a time** — tests MUST be presented individually for user verification. NEVER batch-present multiple scenarios or assume outcomes.
35
+ 4. **Evidence before verdict** — UAT confidence MUST be scored with the 4-dimension factor model from actual test results. NEVER emit a verdict without running the readiness gate.
36
+ 5. **Existing UAT is resumable** — when uat.md exists for the target phase, offer resume. NEVER silently overwrite prior test progress.
37
+ 6. **Frontend-verify is deterministic** — `--frontend-verify` mode uses browser assertions with concrete pass/fail per criterion. NEVER treat "no response" or timeout as pass.
38
+ 7. **Auto-fix has bounds** — `--auto-fix` gap-fix loop MUST NOT exceed 2 iterations. Persistent failures escalate to debug, not infinite retry.
39
+ </invariants>
40
+
29
41
  <execution>
30
42
  **Mode select:** `--frontend-verify` → 走下方 **Frontend Verify Mode**(确定性浏览器 smoke,**不是**对话式 UAT);否则 Follow '~/.maestro/workflows/test.md' completely.
31
43
 
@@ -32,8 +32,19 @@ $ARGUMENTS — Parse tier and scope:
32
32
  | quick | ✓ | ✓ | — | — | — | — |
33
33
  | standard | ✓ | ✓ | ✓ | ✓ | — | — |
34
34
  | deep | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
35
+
36
+ **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.
35
37
  </context>
36
38
 
39
+ <invariants>
40
+ 1. **Audit is read-only** — NEVER modify source code, configuration, dependencies, or CI/CD files during audit. Security audit produces reports only.
41
+ 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.
42
+ 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).
43
+ 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.
44
+ 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.
45
+ 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.
46
+ </invariants>
47
+
37
48
  <execution>
38
49
 
39
50
  ### Phase Gates (MANDATORY, BLOCKING)
@@ -44,9 +44,36 @@ Scope-to-directory mapping, category-to-file mapping, and entry format defined i
44
44
  ```
45
45
  </context>
46
46
 
47
+ <invariants>
48
+ 1. **Idempotent append** — duplicate entry ID MUST be rejected (E003-level check on title + category match before write)
49
+ 2. **Category validation** — category MUST be one of: coding, arch, quality, debug, test, review, learning, ui. Invalid category → E003
50
+ 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/)
51
+ 4. **Confirmation gate** — MUST AskUserQuestion before appending entry (unless -y flag); NEVER write without user confirmation in interactive mode
52
+ 5. **Entry format invariance** — all entries MUST use `<spec-entry>` closed-tag format with id, keywords, and category attributes
53
+ 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
54
+ </invariants>
55
+
47
56
  <execution>
48
57
  Follow '~/.maestro/workflows/specs-add.md' completely.
49
58
 
59
+ ### Phase Gates (MANDATORY, BLOCKING)
60
+
61
+ **GATE 1: Parse → Validate**
62
+ - REQUIRED: Category and content both parsed from arguments.
63
+ - REQUIRED: Category is a valid value (coding, arch, quality, debug, test, review, learning, ui).
64
+ - REQUIRED: Scope resolved to a valid directory path.
65
+ - BLOCKED if: E001 (missing args), E003 (invalid category), E004 (invalid scope), E005 (personal scope without uid).
66
+
67
+ **GATE 2: Validate → Format**
68
+ - REQUIRED: Specs directory exists for the resolved scope.
69
+ - REQUIRED: No duplicate entry with identical title + category already present in target file.
70
+ - BLOCKED if: E002 (specs not initialized).
71
+
72
+ **GATE 3: Format → Write**
73
+ - REQUIRED: `<spec-entry>` block formatted with id, keywords, category attributes.
74
+ - REQUIRED: User confirmation via AskUserQuestion (unless -y flag).
75
+ - BLOCKED if: user declines confirmation — abort without writing.
76
+
50
77
  **Confirmation gate**: Unless -y flag is passed, after formatting the `<spec-entry>` block but before appending to the target file, AskUserQuestion showing the formatted entry, target file path, and scope. Proceed only on user confirm.
51
78
  </execution>
52
79
 
@@ -57,8 +57,33 @@ When loading entries with `ref` attribute, only the summary is shown with a load
57
57
  Use the load command to read the full referenced document.
58
58
  </context>
59
59
 
60
+ <invariants>
61
+ 1. **Read-only** — NEVER modify, create, or delete any spec files during load. This command is purely a read operation
62
+ 2. **Output to context only** — loaded specs are injected into the conversation context; NEVER write loaded content to new files or modify existing files
63
+ 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/
64
+ 4. **Category primary doc** — when --category is specified, the primary category doc MUST be loaded in full before cross-file matching
65
+ 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
66
+ 6. **Output boundary** — this command produces NO file writes. All output is conversation-context injection only
67
+ </invariants>
68
+
60
69
  <execution>
61
70
  Follow '~/.maestro/workflows/specs-load.md' completely.
71
+
72
+ ### Phase Gates (MANDATORY, BLOCKING)
73
+
74
+ **GATE 1: Parse → Discover**
75
+ - REQUIRED: Arguments parsed — at least one of --category or --keyword is provided, or empty args triggers full load.
76
+ - REQUIRED: Scope resolved (default: global+project merged).
77
+ - BLOCKED if: invalid scope value or invalid category value.
78
+
79
+ **GATE 2: Discover → Load**
80
+ - REQUIRED: At least one spec directory exists in the resolved scope chain.
81
+ - BLOCKED if: E001 — .workflow/specs/ not initialized AND no global specs available. Warn and abort.
82
+
83
+ **GATE 3: Load → Display**
84
+ - REQUIRED: Spec files read and entries parsed.
85
+ - REQUIRED: Keyword filtering applied if --keyword was provided.
86
+ - BLOCKED if: no readable spec files found in any scope layer.
62
87
  </execution>
63
88
 
64
89
  <error_codes>
@@ -31,8 +31,34 @@ $ARGUMENTS -- expects `<entry-id>` (e.g., `spec-learnings-003`, `spec-coding-con
31
31
  - `--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.
32
32
  </context>
33
33
 
34
+ <invariants>
35
+ 1. **Confirmation required** — MUST AskUserQuestion before deletion (unless -y flag); NEVER remove entries silently
36
+ 2. **Referential integrity** — before removing, check if other spec entries reference the target entry; warn user if references exist
37
+ 3. **Cascade explicit** — ref-type entries MUST NOT cascade-delete the linked knowhow file unless --cascade is explicitly passed; default leaves orphan knowhow intact
38
+ 4. **Atomic removal** — use `maestro wiki remove-entry` for atomic operation; NEVER manually edit spec files to remove entries
39
+ 5. **Index consistency** — wiki index MUST be auto-updated after removal; stale index entries are a hard failure
40
+ 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
41
+ </invariants>
42
+
34
43
  <execution>
35
44
  Follow '~/.maestro/workflows/specs-remove.md' completely.
45
+
46
+ ### Phase Gates (MANDATORY, BLOCKING)
47
+
48
+ **GATE 1: Parse → Lookup**
49
+ - REQUIRED: Entry ID parsed from arguments.
50
+ - BLOCKED if: E001 — no entry ID provided.
51
+
52
+ **GATE 2: Lookup → Confirm**
53
+ - REQUIRED: .workflow/specs/ directory exists.
54
+ - REQUIRED: Entry found in wiki index as a spec sub-node.
55
+ - REQUIRED: Entry content loaded for user preview.
56
+ - BLOCKED if: E002 (specs not initialized), E003 (entry not found), E004 (wrong type).
57
+
58
+ **GATE 3: Confirm → Remove**
59
+ - REQUIRED: User confirmed removal via AskUserQuestion (unless -y flag).
60
+ - REQUIRED: If --cascade and entry has ref attribute, user additionally confirmed knowhow file deletion.
61
+ - BLOCKED if: user declines — abort without modification.
36
62
  </execution>
37
63
 
38
64
  <error_codes>
@@ -26,9 +26,39 @@ $ARGUMENTS (no arguments expected)
26
26
  - Project must contain source files to scan # (see code: E002)
27
27
  </context>
28
28
 
29
+ <invariants>
30
+ 1. **Non-destructive** — NEVER overwrite existing spec files; if a file already exists, skip it and report as already-initialized
31
+ 2. **Idempotent** — safe to re-run on an initialized project; re-running MUST NOT duplicate entries or corrupt existing content
32
+ 3. **Confirmation gate** — MUST AskUserQuestion showing all files to be created before writing; NEVER write without user confirmation
33
+ 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
34
+ 5. **Core files mandatory** — coding-conventions.md, architecture-constraints.md, and learnings.md MUST always be created (unless they already exist)
35
+ 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
36
+ </invariants>
37
+
29
38
  <execution>
30
39
  Follow '~/.maestro/workflows/specs-setup.md' completely.
31
40
 
41
+ ### Phase Gates (MANDATORY, BLOCKING)
42
+
43
+ **GATE 1: Precondition → Scan**
44
+ - REQUIRED: .workflow/ directory exists.
45
+ - REQUIRED: Project contains source files to scan.
46
+ - BLOCKED if: E001 (.workflow/ not initialized), E002 (no source files).
47
+
48
+ **GATE 2: Scan → Plan**
49
+ - REQUIRED: Codebase scan completed — framework, language, and tooling signals collected.
50
+ - REQUIRED: Core spec file list determined (always 3: coding-conventions, architecture-constraints, learnings).
51
+ - REQUIRED: Optional spec files determined by detected signals only.
52
+
53
+ **GATE 3: Plan → Write**
54
+ - REQUIRED: User confirmed the full list of files to create via AskUserQuestion (showing core specs, optional specs, recipe knowhow, and detected signals).
55
+ - BLOCKED if: user declines — abort without writing.
56
+
57
+ **GATE 4: Write → Report**
58
+ - REQUIRED: All confirmed files written to .workflow/specs/ and .workflow/knowhow/.
59
+ - REQUIRED: Existing files skipped (not overwritten).
60
+ - REQUIRED: .proposed.md files created when slug collision detected (W003).
61
+
32
62
  **Confirmation gate**: After scanning codebase and determining which files/directories will be created (core specs, optional specs, recipe knowhow), AskUserQuestion showing the full list of files to create with their categories and detected signals. Proceed only on user confirm.
33
63
  </execution>
34
64
 
@@ -292,6 +292,8 @@ Odyssey 长周期循环(独立路径)
292
292
  | 长周期改进 | Odyssey 深度循环 | `/odyssey-improve "改进目标"` |
293
293
  | 需求迭代 | Odyssey 深度循环 | `/odyssey-planex "需求描述"` |
294
294
 
295
+ > 注:Path A/B 中 `analyze 1` / `plan 1` 的数字 `1` 指 **milestone 编号**(第 1 个里程碑),下游以 milestone 为入口。
296
+
295
297
  ## Core Rules
296
298
 
297
299
  1. **Catalog First**: 先查 catalog.json,再按需读 source 文件
@@ -9,8 +9,8 @@
9
9
  {"name": "maestro-init", "command": "/maestro-init", "category": "core", "description": "项目初始化 — 创建 .workflow/ 目录结构和状态文件", "source": "../../commands/maestro-init.md"},
10
10
  {"name": "maestro-brainstorm", "command": "/maestro-brainstorm", "category": "core", "description": "头脑风暴 — 发散探索,多角色创意,上游起源命令", "source": "../../commands/maestro-brainstorm.md"},
11
11
  {"name": "maestro-blueprint", "command": "/maestro-blueprint", "category": "core", "description": "正式规格文档化 — 7-phase 收敛规格链,上游起源命令,产出 .workflow/blueprint/", "source": "../../commands/maestro-blueprint.md"},
12
- {"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排 — 消费上游 context,纯 Milestone > Phase 分解(不做技术探索)", "source": "../../commands/maestro-roadmap.md"},
13
- {"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 — 跳过 Phase 管线直接完成,支持 --full/--discuss 模式", "source": "../../commands/maestro-quick.md"},
12
+ {"name": "maestro-roadmap", "command": "/maestro-roadmap", "category": "core", "description": "路线图编排 — Milestone > Phase 分解,下游以 milestone 为入口", "source": "../../commands/maestro-roadmap.md"},
13
+ {"name": "maestro-quick", "command": "/maestro-quick", "category": "core", "description": "快速任务 — 跳过管线直接完成,支持 --full/--discuss 模式", "source": "../../commands/maestro-quick.md"},
14
14
  {"name": "maestro-overlay", "command": "/maestro-overlay", "category": "core", "description": "Overlay 管理 — 创建、查看、删除命令补丁", "source": "../../commands/maestro-overlay.md"},
15
15
  {"name": "maestro-amend", "command": "/maestro-amend", "category": "core", "description": "修正补丁 — 从工作流信号自动生成 overlay", "source": "../../commands/maestro-amend.md"},
16
16
  {"name": "maestro-composer", "command": "/maestro-composer", "category": "core", "description": "编排器 — compose + play 工作流组合执行", "source": "../../commands/maestro-composer.md"},
@@ -27,7 +27,7 @@
27
27
  {"name": "maestro-plan", "command": "/maestro-plan", "category": "pipeline", "description": "任务规划 — 支持 --from analyze:ANL-xxx 直达、碰撞检测、gap 修复计划", "source": "../../commands/maestro-plan.md"},
28
28
  {"name": "maestro-execute", "command": "/maestro-execute", "category": "pipeline", "description": "任务执行 — wave 并行执行、delegate 编排、自动提交", "source": "../../commands/maestro-execute.md"},
29
29
 
30
- {"name": "maestro-milestone-audit", "command": "/maestro-milestone-audit", "category": "milestone", "description": "里程碑审计 — 检查 Phase 完成度和质量", "source": "../../commands/maestro-milestone-audit.md"},
30
+ {"name": "maestro-milestone-audit", "command": "/maestro-milestone-audit", "category": "milestone", "description": "里程碑审计 — 检查里程碑完成度和质量", "source": "../../commands/maestro-milestone-audit.md"},
31
31
  {"name": "maestro-milestone-complete", "command": "/maestro-milestone-complete", "category": "milestone", "description": "里程碑完成 — 归档里程碑并推进下一个", "source": "../../commands/maestro-milestone-complete.md"},
32
32
  {"name": "maestro-milestone-release", "command": "/maestro-milestone-release", "category": "milestone", "description": "里程碑发布 — 生成发布说明和变更日志", "source": "../../commands/maestro-milestone-release.md"},
33
33
 
@@ -218,17 +218,17 @@
218
218
  ],
219
219
  "workflows": {
220
220
  "topology": {
221
- "hierarchy": "Roadmap > Milestone > Phase > Task",
221
+ "hierarchy": "Roadmap > Milestone > Phase | Plan > Task > Wave",
222
222
  "layers": {
223
223
  "upstream_origin": ["brainstorm (发散/轻量)", "blueprint (收敛/重型)"],
224
- "understanding": "analyze 双层: 宏观(文本参数) + 微观(数字参数)",
224
+ "understanding": "analyze 双层: 宏观(文本参数) + 微观(milestone 数字参数)",
225
225
  "orchestration": "roadmap (可选,消费上游 context)",
226
226
  "execution": ["plan", "execute"]
227
227
  }
228
228
  },
229
229
  "paths": {
230
- "A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze 微观 → plan → execute",
231
- "B_large_feature": "analyze 宏观 → roadmap → analyze 微观 → plan → execute",
230
+ "A_full_project": "brainstorm → blueprint(可选) → analyze 宏观 → roadmap → analyze {milestone} → plan {milestone} → execute",
231
+ "B_large_feature": "analyze 宏观 → roadmap → analyze {milestone} → plan {milestone} → execute",
232
232
  "C_medium_feature": "analyze 宏观 → plan --from analyze:ANL-xxx → execute",
233
233
  "D_small_fix": "plan → execute",
234
234
  "E_spec_only": "blueprint → (供人阅读)",
@@ -57,6 +57,8 @@ $codify-to-knowhow ".workflow/reference_style/my-style-v1"
57
57
 
58
58
  **Upstream**: `maestro-ui-codify`, `learn-decompose`, or any skill that generates a manifest
59
59
  **Downstream**: `maestro search --category coding`, `maestro load --type spec --keyword <slug>`
60
+
61
+ **Output boundary**: ALL file writes MUST target `.workflow/knowhow/` (knowhow assets) and `.workflow/specs/` (spec entries) only. NEVER modify source code, manifest files, or files outside these paths.
60
62
  </context>
61
63
 
62
64
  <manifest_schema>
@@ -22,10 +22,36 @@ $ARGUMENTS — `<canonical> <definition>` where canonical is a kebab-case term n
22
22
  **Prerequisites**: `.workflow/domain/` must exist (run `maestro domain init` if missing).
23
23
 
24
24
  **Domain term lifecycle**: discover/manual → register → active → (optional) deprecated → removed
25
+
26
+ **Output boundary**: ALL file writes MUST target `.workflow/domain/glossary.yaml` only. NEVER modify source code or files outside this path.
25
27
  </context>
26
28
 
29
+ <invariants>
30
+ 1. **Single-term atomic operation** — each invocation registers exactly ONE term; NEVER batch-write multiple terms in a single execution
31
+ 2. **Glossary append-only** — existing terms in `glossary.yaml` SHALL NOT be modified or removed; only new entries are appended
32
+ 3. **Duplicate guard** — MUST check for exact canonical name match AND near-matches before writing; NEVER create duplicate entries
33
+ 4. **Confirmation mandatory** — MUST present term details (canonical, definition, aliases, tier, path) via `request_user_input` before any glossary write; NEVER write without user confirmation (unless `--yes`)
34
+ 5. **Schema compliance** — every term entry MUST include canonical name, definition, tier, and at least one alias/keyword; incomplete entries SHALL NOT be persisted
35
+ 6. **Domain directory prerequisite** — `.workflow/domain/` MUST exist before writing; NEVER auto-create the directory without user confirmation (E002 if missing)
36
+ </invariants>
37
+
27
38
  <execution>
28
39
 
40
+ ### Phase Gates (MANDATORY, BLOCKING)
41
+
42
+ **GATE 1: Parse → Validate**
43
+ - REQUIRED: Canonical name and definition both parsed and non-empty.
44
+ - BLOCKED if: either missing (E001).
45
+
46
+ **GATE 2: Validate → Dedup Check**
47
+ - REQUIRED: `.workflow/domain/glossary.yaml` exists and is readable.
48
+ - BLOCKED if: domain directory not initialized (E002).
49
+
50
+ **GATE 3: Dedup → Register**
51
+ - REQUIRED: No exact duplicate found (E003). Near-matches resolved via user confirmation.
52
+ - REQUIRED: User confirmed term details (canonical, definition, aliases, tier) via `request_user_input` (unless `--yes`).
53
+ - BLOCKED if: user declines confirmation.
54
+
29
55
  ### Step 1: Parse Input
30
56
 
31
57
  Extract canonical (first token, kebab-case) and definition (remainder) from arguments.
@@ -11,8 +11,36 @@ Scan codebase for potential domain terms not yet in `.workflow/domain/glossary.y
11
11
  `--auto`: auto-register candidates with confidence ≥ 0.8 without prompting.
12
12
  </purpose>
13
13
 
14
+ <context>
15
+ $ARGUMENTS — optional `--auto` flag.
16
+
17
+ **Output boundary**: ALL file writes MUST target `.workflow/domain/glossary.yaml` only (via `maestro domain add`). NEVER modify source code or files outside this path.
18
+ </context>
19
+
20
+ <invariants>
21
+ 1. **Read-only scan** — NEVER modify source code files during codebase scan; only glossary.yaml is written (via `maestro domain add`)
22
+ 2. **Dedup against existing** — MUST filter all candidates against current glossary before presenting; NEVER show already-registered terms
23
+ 3. **Confidence threshold for auto** — `--auto` MUST only register candidates with confidence ≥ 0.8; candidates below threshold MUST be skipped or presented for manual review
24
+ 4. **User confirmation required** — without `--auto`, MUST present candidates and obtain user selection before any registration; NEVER auto-register in interactive mode
25
+ 5. **Atomic registration** — each accepted candidate MUST be registered via individual `maestro domain add` call; NEVER batch-write directly to glossary.yaml
26
+ </invariants>
27
+
14
28
  <execution>
15
29
 
30
+ ### Phase Gates (MANDATORY, BLOCKING)
31
+
32
+ **GATE 1: Scan → Filter**
33
+ - REQUIRED: Codebase scan completed with at least 1 candidate found.
34
+ - BLOCKED if: no candidates found — report "No new domain terms detected" and exit.
35
+
36
+ **GATE 2: Filter → Present**
37
+ - REQUIRED: All candidates deduplicated against existing glossary.yaml entries.
38
+ - BLOCKED if: glossary.yaml not found (E001) — prompt user to run `maestro domain init`.
39
+
40
+ **GATE 3: Present → Register**
41
+ - REQUIRED: User selection obtained (unless `--auto` with confidence ≥ 0.8).
42
+ - BLOCKED if: user selects "skip" — exit without registration.
43
+
16
44
  ### Step 1: Scan Codebase
17
45
 
18
46
  Run `maestro domain discover` to scan TypeScript interfaces, types, enums, const patterns, API routes, and README headings.
@@ -41,3 +69,21 @@ Register? (all | select by number | skip)
41
69
  For each confirmed candidate, run `maestro domain add "<canonical>" "<definition>"`.
42
70
 
43
71
  </execution>
72
+
73
+ <error_codes>
74
+ | Code | Severity | Condition | Recovery |
75
+ |------|----------|-----------|----------|
76
+ | E001 | error | `.workflow/domain/glossary.yaml` not found | Run `maestro domain init` first |
77
+ | E002 | error | Codebase scan failed (no TypeScript/source files found) | Check project structure |
78
+ | W001 | warning | No new candidates after dedup filtering | All potential terms already registered |
79
+ | W002 | warning | `--auto` skipped low-confidence candidates | Review skipped candidates manually |
80
+ </error_codes>
81
+
82
+ <success_criteria>
83
+ - [ ] Codebase scanned for domain term candidates
84
+ - [ ] Existing glossary terms filtered out (no duplicates presented)
85
+ - [ ] Candidates ranked by confidence score
86
+ - [ ] User selection obtained (interactive) or confidence threshold applied (--auto)
87
+ - [ ] Selected candidates registered via `maestro domain add`
88
+ - [ ] Summary displayed with registration count
89
+ </success_criteria>