maestro-flow 0.5.41 → 0.5.43

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 (363) hide show
  1. package/.agents/skills/domain-add/SKILL.md +3 -0
  2. package/.agents/skills/learn-decompose/SKILL.md +7 -4
  3. package/.agents/skills/learn-follow/SKILL.md +4 -2
  4. package/.agents/skills/learn-investigate/SKILL.md +8 -6
  5. package/.agents/skills/learn-second-opinion/SKILL.md +6 -3
  6. package/.agents/skills/maestro/SKILL.md +1 -1
  7. package/.agents/skills/maestro-amend/SKILL.md +1 -1
  8. package/.agents/skills/maestro-analyze/SKILL.md +1 -43
  9. package/.agents/skills/maestro-blueprint/SKILL.md +1 -23
  10. package/.agents/skills/maestro-brainstorm/SKILL.md +8 -25
  11. package/.agents/skills/maestro-collab/SKILL.md +6 -2
  12. package/.agents/skills/maestro-companion/SKILL.md +4 -1
  13. package/.agents/skills/maestro-composer/SKILL.md +4 -2
  14. package/.agents/skills/maestro-execute/SKILL.md +27 -9
  15. package/.agents/skills/maestro-fork/SKILL.md +4 -3
  16. package/.agents/skills/maestro-grill/SKILL.md +1 -17
  17. package/.agents/skills/maestro-guard/SKILL.md +2 -2
  18. package/.agents/skills/maestro-impeccable/SKILL.md +2 -1
  19. package/.agents/skills/maestro-init/SKILL.md +1 -1
  20. package/.agents/skills/maestro-merge/SKILL.md +12 -1
  21. package/.agents/skills/maestro-milestone-audit/SKILL.md +1 -15
  22. package/.agents/skills/maestro-milestone-complete/SKILL.md +8 -3
  23. package/.agents/skills/maestro-milestone-release/SKILL.md +8 -4
  24. package/.agents/skills/maestro-overlay/SKILL.md +9 -0
  25. package/.agents/skills/maestro-plan/SKILL.md +6 -62
  26. package/.agents/skills/maestro-player/SKILL.md +2 -2
  27. package/.agents/skills/maestro-quick/SKILL.md +5 -3
  28. package/.agents/skills/maestro-ralph/SKILL.md +8 -8
  29. package/.agents/skills/maestro-ralph-cli/SKILL.md +665 -0
  30. package/.agents/skills/maestro-ralph-cli-execute/SKILL.md +239 -0
  31. package/.agents/skills/maestro-ralph-execute/SKILL.md +127 -11
  32. package/.agents/skills/maestro-roadmap/SKILL.md +1 -9
  33. package/.agents/skills/maestro-swarm-workflow/SKILL.md +16 -14
  34. package/.agents/skills/maestro-tools-register/SKILL.md +16 -1
  35. package/.agents/skills/maestro-ui-codify/SKILL.md +11 -1
  36. package/.agents/skills/maestro-universal-workflow/SKILL.md +28 -5
  37. package/.agents/skills/maestro-update/SKILL.md +10 -7
  38. package/.agents/skills/manage-codebase-rebuild/SKILL.md +5 -1
  39. package/.agents/skills/manage-drift-realign/SKILL.md +6 -2
  40. package/.agents/skills/manage-harvest/SKILL.md +4 -1
  41. package/.agents/skills/manage-issue-discover/SKILL.md +1 -0
  42. package/.agents/skills/manage-kg-extractors/SKILL.md +5 -1
  43. package/.agents/skills/manage-knowhow-capture/SKILL.md +1 -0
  44. package/.agents/skills/manage-knowledge-audit/SKILL.md +3 -0
  45. package/.agents/skills/manage-wiki/SKILL.md +1 -0
  46. package/.agents/skills/odyssey-debug/SKILL.md +2 -1
  47. package/.agents/skills/odyssey-improve/SKILL.md +2 -2
  48. package/.agents/skills/odyssey-planex/SKILL.md +8 -7
  49. package/.agents/skills/odyssey-review-test-fix/SKILL.md +4 -1
  50. package/.agents/skills/odyssey-ui/SKILL.md +4 -4
  51. package/.agents/skills/quality-auto-test/SKILL.md +11 -1
  52. package/.agents/skills/quality-debug/SKILL.md +16 -2
  53. package/.agents/skills/quality-retrospective/SKILL.md +9 -1
  54. package/.agents/skills/quality-review/SKILL.md +8 -0
  55. package/.agents/skills/quality-sync/SKILL.md +2 -2
  56. package/.agents/skills/quality-test/SKILL.md +9 -1
  57. package/.agents/skills/security-audit/SKILL.md +14 -4
  58. package/.agents/skills/spec-add/SKILL.md +5 -2
  59. package/.agents/skills/spec-load/SKILL.md +1 -1
  60. package/.agents/skills/spec-remove/SKILL.md +1 -1
  61. package/.agents/skills/spec-setup/SKILL.md +3 -0
  62. package/.agents/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  63. package/.agents/skills/team-coordinate/specs/role-spec-template.md +197 -198
  64. package/.agents/skills/team-roadmap-dev/SKILL.md +164 -164
  65. package/.agents/skills/team-roadmap-dev/specs/team-config.json +1 -1
  66. package/.agents/skills/team-swarm/roles/analyst/role.md +172 -176
  67. package/.agy/skills/domain-add/SKILL.md +3 -0
  68. package/.agy/skills/learn-decompose/SKILL.md +7 -4
  69. package/.agy/skills/learn-follow/SKILL.md +4 -2
  70. package/.agy/skills/learn-investigate/SKILL.md +8 -6
  71. package/.agy/skills/learn-second-opinion/SKILL.md +6 -3
  72. package/.agy/skills/maestro/SKILL.md +1 -1
  73. package/.agy/skills/maestro-amend/SKILL.md +1 -1
  74. package/.agy/skills/maestro-analyze/SKILL.md +1 -43
  75. package/.agy/skills/maestro-blueprint/SKILL.md +1 -23
  76. package/.agy/skills/maestro-brainstorm/SKILL.md +8 -25
  77. package/.agy/skills/maestro-collab/SKILL.md +6 -2
  78. package/.agy/skills/maestro-companion/SKILL.md +4 -1
  79. package/.agy/skills/maestro-composer/SKILL.md +4 -2
  80. package/.agy/skills/maestro-execute/SKILL.md +27 -9
  81. package/.agy/skills/maestro-fork/SKILL.md +4 -3
  82. package/.agy/skills/maestro-grill/SKILL.md +1 -17
  83. package/.agy/skills/maestro-guard/SKILL.md +2 -2
  84. package/.agy/skills/maestro-impeccable/SKILL.md +2 -1
  85. package/.agy/skills/maestro-init/SKILL.md +1 -1
  86. package/.agy/skills/maestro-merge/SKILL.md +12 -1
  87. package/.agy/skills/maestro-milestone-audit/SKILL.md +1 -15
  88. package/.agy/skills/maestro-milestone-complete/SKILL.md +8 -3
  89. package/.agy/skills/maestro-milestone-release/SKILL.md +8 -4
  90. package/.agy/skills/maestro-overlay/SKILL.md +9 -0
  91. package/.agy/skills/maestro-plan/SKILL.md +6 -62
  92. package/.agy/skills/maestro-player/SKILL.md +2 -2
  93. package/.agy/skills/maestro-quick/SKILL.md +5 -3
  94. package/.agy/skills/maestro-ralph/SKILL.md +8 -8
  95. package/.agy/skills/maestro-ralph-cli/SKILL.md +661 -0
  96. package/.agy/skills/maestro-ralph-cli-execute/SKILL.md +235 -0
  97. package/.agy/skills/maestro-ralph-execute/SKILL.md +127 -11
  98. package/.agy/skills/maestro-roadmap/SKILL.md +1 -9
  99. package/.agy/skills/maestro-swarm-workflow/SKILL.md +16 -14
  100. package/.agy/skills/maestro-tools-register/SKILL.md +16 -1
  101. package/.agy/skills/maestro-ui-codify/SKILL.md +11 -1
  102. package/.agy/skills/maestro-universal-workflow/SKILL.md +28 -5
  103. package/.agy/skills/maestro-update/SKILL.md +10 -7
  104. package/.agy/skills/manage-codebase-rebuild/SKILL.md +5 -1
  105. package/.agy/skills/manage-drift-realign/SKILL.md +6 -2
  106. package/.agy/skills/manage-harvest/SKILL.md +4 -1
  107. package/.agy/skills/manage-issue-discover/SKILL.md +1 -0
  108. package/.agy/skills/manage-kg-extractors/SKILL.md +5 -1
  109. package/.agy/skills/manage-knowhow-capture/SKILL.md +1 -0
  110. package/.agy/skills/manage-knowledge-audit/SKILL.md +3 -0
  111. package/.agy/skills/manage-wiki/SKILL.md +1 -0
  112. package/.agy/skills/odyssey-debug/SKILL.md +2 -1
  113. package/.agy/skills/odyssey-improve/SKILL.md +2 -2
  114. package/.agy/skills/odyssey-planex/SKILL.md +8 -7
  115. package/.agy/skills/odyssey-review-test-fix/SKILL.md +4 -1
  116. package/.agy/skills/odyssey-ui/SKILL.md +4 -4
  117. package/.agy/skills/quality-auto-test/SKILL.md +11 -1
  118. package/.agy/skills/quality-debug/SKILL.md +16 -2
  119. package/.agy/skills/quality-retrospective/SKILL.md +9 -1
  120. package/.agy/skills/quality-review/SKILL.md +8 -0
  121. package/.agy/skills/quality-sync/SKILL.md +2 -2
  122. package/.agy/skills/quality-test/SKILL.md +9 -1
  123. package/.agy/skills/security-audit/SKILL.md +14 -4
  124. package/.agy/skills/spec-add/SKILL.md +5 -2
  125. package/.agy/skills/spec-load/SKILL.md +1 -1
  126. package/.agy/skills/spec-remove/SKILL.md +1 -1
  127. package/.agy/skills/spec-setup/SKILL.md +3 -0
  128. package/.agy/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  129. package/.agy/skills/team-coordinate/specs/role-spec-template.md +197 -198
  130. package/.agy/skills/team-roadmap-dev/SKILL.md +141 -153
  131. package/.agy/skills/team-roadmap-dev/specs/team-config.json +1 -1
  132. package/.agy/skills/team-swarm/roles/analyst/role.md +172 -176
  133. package/.claude/commands/domain-add.md +3 -0
  134. package/.claude/commands/learn-decompose.md +7 -4
  135. package/.claude/commands/learn-follow.md +4 -2
  136. package/.claude/commands/learn-investigate.md +8 -6
  137. package/.claude/commands/learn-second-opinion.md +6 -3
  138. package/.claude/commands/maestro-amend.md +1 -1
  139. package/.claude/commands/maestro-analyze.md +1 -43
  140. package/.claude/commands/maestro-blueprint.md +1 -23
  141. package/.claude/commands/maestro-brainstorm.md +8 -25
  142. package/.claude/commands/maestro-collab.md +6 -2
  143. package/.claude/commands/maestro-companion.md +4 -1
  144. package/.claude/commands/maestro-composer.md +4 -2
  145. package/.claude/commands/maestro-execute.md +27 -9
  146. package/.claude/commands/maestro-fork.md +4 -3
  147. package/.claude/commands/maestro-grill.md +1 -17
  148. package/.claude/commands/maestro-guard.md +2 -2
  149. package/.claude/commands/maestro-impeccable.md +2 -1
  150. package/.claude/commands/maestro-init.md +1 -1
  151. package/.claude/commands/maestro-merge.md +12 -1
  152. package/.claude/commands/maestro-milestone-audit.md +1 -15
  153. package/.claude/commands/maestro-milestone-complete.md +8 -3
  154. package/.claude/commands/maestro-milestone-release.md +8 -4
  155. package/.claude/commands/maestro-overlay.md +9 -0
  156. package/.claude/commands/maestro-plan.md +6 -62
  157. package/.claude/commands/maestro-player.md +2 -2
  158. package/.claude/commands/maestro-quick.md +5 -3
  159. package/.claude/commands/maestro-ralph-cli-execute.md +237 -0
  160. package/.claude/commands/maestro-ralph-cli.md +663 -0
  161. package/.claude/commands/maestro-ralph-execute.md +127 -11
  162. package/.claude/commands/maestro-ralph.md +8 -8
  163. package/.claude/commands/maestro-roadmap.md +1 -9
  164. package/.claude/commands/maestro-swarm-workflow.md +16 -14
  165. package/.claude/commands/maestro-tools-register.md +16 -1
  166. package/.claude/commands/maestro-ui-codify.md +11 -1
  167. package/.claude/commands/maestro-universal-workflow.md +28 -5
  168. package/.claude/commands/maestro-update.md +10 -7
  169. package/.claude/commands/maestro.md +1 -1
  170. package/.claude/commands/manage-codebase-rebuild.md +5 -1
  171. package/.claude/commands/manage-drift-realign.md +6 -2
  172. package/.claude/commands/manage-harvest.md +4 -1
  173. package/.claude/commands/manage-issue-discover.md +1 -0
  174. package/.claude/commands/manage-kg-extractors.md +5 -1
  175. package/.claude/commands/manage-knowhow-capture.md +1 -0
  176. package/.claude/commands/manage-knowledge-audit.md +3 -0
  177. package/.claude/commands/manage-wiki.md +1 -0
  178. package/.claude/commands/odyssey-debug.md +2 -1
  179. package/.claude/commands/odyssey-improve.md +2 -2
  180. package/.claude/commands/odyssey-planex.md +8 -7
  181. package/.claude/commands/odyssey-review-test-fix.md +4 -1
  182. package/.claude/commands/odyssey-ui.md +4 -4
  183. package/.claude/commands/quality-auto-test.md +11 -1
  184. package/.claude/commands/quality-debug.md +16 -2
  185. package/.claude/commands/quality-retrospective.md +9 -1
  186. package/.claude/commands/quality-review.md +8 -0
  187. package/.claude/commands/quality-sync.md +2 -2
  188. package/.claude/commands/quality-test.md +9 -1
  189. package/.claude/commands/security-audit.md +14 -4
  190. package/.claude/commands/spec-add.md +5 -2
  191. package/.claude/commands/spec-load.md +1 -1
  192. package/.claude/commands/spec-remove.md +1 -1
  193. package/.claude/commands/spec-setup.md +3 -0
  194. package/.claude/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  195. package/.claude/skills/team-coordinate/specs/role-spec-template.md +197 -198
  196. package/.claude/skills/team-roadmap-dev/SKILL.md +169 -169
  197. package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
  198. package/.claude/skills/team-swarm/roles/analyst/role.md +181 -185
  199. package/.codex/skills/codify-to-knowhow/SKILL.md +27 -15
  200. package/.codex/skills/domain-add/SKILL.md +5 -3
  201. package/.codex/skills/learn-decompose/SKILL.md +22 -4
  202. package/.codex/skills/learn-follow/SKILL.md +12 -6
  203. package/.codex/skills/learn-investigate/SKILL.md +11 -6
  204. package/.codex/skills/learn-retro/SKILL.md +12 -6
  205. package/.codex/skills/learn-second-opinion/SKILL.md +11 -3
  206. package/.codex/skills/maestro/SKILL.md +19 -13
  207. package/.codex/skills/maestro-amend/SKILL.md +10 -2
  208. package/.codex/skills/maestro-analyze/SKILL.md +7 -1
  209. package/.codex/skills/maestro-blueprint/SKILL.md +1 -1
  210. package/.codex/skills/maestro-brainstorm/SKILL.md +11 -8
  211. package/.codex/skills/maestro-collab/SKILL.md +5 -5
  212. package/.codex/skills/maestro-companion/SKILL.md +4 -1
  213. package/.codex/skills/maestro-composer/SKILL.md +6 -3
  214. package/.codex/skills/maestro-execute/SKILL.md +11 -8
  215. package/.codex/skills/maestro-fork/SKILL.md +4 -3
  216. package/.codex/skills/maestro-grill/SKILL.md +1 -1
  217. package/.codex/skills/maestro-guard/SKILL.md +1 -1
  218. package/.codex/skills/maestro-impeccable/SKILL.md +5 -5
  219. package/.codex/skills/maestro-init/SKILL.md +3 -2
  220. package/.codex/skills/maestro-milestone-audit/SKILL.md +21 -9
  221. package/.codex/skills/maestro-milestone-complete/SKILL.md +3 -3
  222. package/.codex/skills/maestro-milestone-release/SKILL.md +18 -1
  223. package/.codex/skills/maestro-next/SKILL.md +11 -10
  224. package/.codex/skills/maestro-overlay/SKILL.md +16 -6
  225. package/.codex/skills/maestro-player/SKILL.md +11 -5
  226. package/.codex/skills/maestro-quick/SKILL.md +2 -2
  227. package/.codex/skills/maestro-ralph/SKILL.md +44 -31
  228. package/.codex/skills/maestro-ralph-cli/SKILL.md +394 -0
  229. package/.codex/skills/maestro-ralph-cli-execute/SKILL.md +146 -0
  230. package/.codex/skills/maestro-ralph-execute/SKILL.md +105 -24
  231. package/.codex/skills/maestro-roadmap/SKILL.md +8 -2
  232. package/.codex/skills/maestro-tools-execute/SKILL.md +8 -4
  233. package/.codex/skills/maestro-tools-register/SKILL.md +10 -6
  234. package/.codex/skills/maestro-ui-codify/SKILL.md +14 -9
  235. package/.codex/skills/manage-codebase-rebuild/SKILL.md +36 -14
  236. package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
  237. package/.codex/skills/manage-drift-realign/SKILL.md +15 -12
  238. package/.codex/skills/manage-harvest/SKILL.md +1 -1
  239. package/.codex/skills/manage-issue/SKILL.md +8 -4
  240. package/.codex/skills/manage-issue-discover/SKILL.md +15 -14
  241. package/.codex/skills/manage-knowhow/SKILL.md +3 -2
  242. package/.codex/skills/manage-knowhow-capture/SKILL.md +4 -3
  243. package/.codex/skills/manage-learn/SKILL.md +2 -2
  244. package/.codex/skills/odyssey-debug/SKILL.md +12 -7
  245. package/.codex/skills/odyssey-improve/SKILL.md +11 -6
  246. package/.codex/skills/odyssey-planex/SKILL.md +14 -8
  247. package/.codex/skills/odyssey-review-test-fix/SKILL.md +12 -7
  248. package/.codex/skills/odyssey-ui/SKILL.md +10 -5
  249. package/.codex/skills/quality-auto-test/SKILL.md +13 -5
  250. package/.codex/skills/quality-debug/SKILL.md +18 -11
  251. package/.codex/skills/quality-refactor/SKILL.md +4 -4
  252. package/.codex/skills/quality-retrospective/SKILL.md +5 -6
  253. package/.codex/skills/quality-review/SKILL.md +18 -11
  254. package/.codex/skills/quality-sync/SKILL.md +2 -2
  255. package/.codex/skills/quality-test/SKILL.md +7 -5
  256. package/.codex/skills/security-audit/SKILL.md +7 -5
  257. package/.codex/skills/spec-add/SKILL.md +9 -7
  258. package/.codex/skills/spec-load/SKILL.md +3 -2
  259. package/.codex/skills/spec-map/SKILL.md +10 -1
  260. package/.codex/skills/spec-remove/SKILL.md +3 -2
  261. package/.codex/skills/team-coordinate/SKILL.md +10 -4
  262. package/.codex/skills/team-lifecycle-v4/SKILL.md +33 -26
  263. package/.codex/skills/team-quality-assurance/SKILL.md +43 -0
  264. package/.codex/skills/team-review/SKILL.md +50 -6
  265. package/.codex/skills/team-tech-debt/SKILL.md +53 -7
  266. package/.codex/skills/team-testing/SKILL.md +50 -2
  267. package/.codex/skills/wiki-connect/SKILL.md +3 -1
  268. package/.codex/skills/wiki-digest/SKILL.md +6 -4
  269. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +16 -0
  270. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +419 -44
  271. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
  272. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +43 -5
  273. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  274. package/dashboard/dist-server/src/commands/install-backend.js +31 -16
  275. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  276. package/dashboard/dist-server/src/core/component-defs.js +25 -0
  277. package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
  278. package/dashboard/dist-server/src/graph/kg/db/types.d.ts +3 -0
  279. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.d.ts +46 -0
  280. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js +329 -0
  281. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js.map +1 -0
  282. package/dashboard/dist-server/src/graph/kg/embedding/index.d.ts +2 -0
  283. package/dashboard/dist-server/src/graph/kg/embedding/index.js +3 -0
  284. package/dashboard/dist-server/src/graph/kg/embedding/index.js.map +1 -0
  285. package/dashboard/dist-server/src/graph/kg/engine.d.ts +19 -1
  286. package/dashboard/dist-server/src/graph/kg/engine.js +71 -1
  287. package/dashboard/dist-server/src/graph/kg/engine.js.map +1 -1
  288. package/dashboard/dist-server/src/graph/kg/query/scoring.d.ts +5 -0
  289. package/dashboard/dist-server/src/graph/kg/query/scoring.js +85 -1
  290. package/dashboard/dist-server/src/graph/kg/query/scoring.js.map +1 -1
  291. package/dashboard/dist-server/src/graph/kg/query/search.d.ts +7 -0
  292. package/dashboard/dist-server/src/graph/kg/query/search.js +117 -1
  293. package/dashboard/dist-server/src/graph/kg/query/search.js.map +1 -1
  294. package/dashboard/dist-server/src/graph/kg/surface/mcp-tools.js +49 -0
  295. package/dashboard/dist-server/src/graph/kg/surface/mcp-tools.js.map +1 -1
  296. package/dashboard/dist-server/src/hooks/kg-sync-hook.js +3 -0
  297. package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
  298. package/dashboard/dist-server/src/tools/spec-loader.js +7 -3
  299. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  300. package/dist/src/commands/install-backend.d.ts.map +1 -1
  301. package/dist/src/commands/install-backend.js +31 -16
  302. package/dist/src/commands/install-backend.js.map +1 -1
  303. package/dist/src/core/component-defs.d.ts.map +1 -1
  304. package/dist/src/core/component-defs.js +25 -0
  305. package/dist/src/core/component-defs.js.map +1 -1
  306. package/dist/src/core/plugin-bridge.d.ts.map +1 -1
  307. package/dist/src/core/plugin-bridge.js +17 -0
  308. package/dist/src/core/plugin-bridge.js.map +1 -1
  309. package/dist/src/graph/kg/db/types.d.ts +3 -0
  310. package/dist/src/graph/kg/db/types.d.ts.map +1 -1
  311. package/dist/src/graph/kg/embedding/code-embedding.d.ts +47 -0
  312. package/dist/src/graph/kg/embedding/code-embedding.d.ts.map +1 -0
  313. package/dist/src/graph/kg/embedding/code-embedding.js +329 -0
  314. package/dist/src/graph/kg/embedding/code-embedding.js.map +1 -0
  315. package/dist/src/graph/kg/embedding/index.d.ts +3 -0
  316. package/dist/src/graph/kg/embedding/index.d.ts.map +1 -0
  317. package/dist/src/graph/kg/embedding/index.js +3 -0
  318. package/dist/src/graph/kg/embedding/index.js.map +1 -0
  319. package/dist/src/graph/kg/engine.d.ts +19 -1
  320. package/dist/src/graph/kg/engine.d.ts.map +1 -1
  321. package/dist/src/graph/kg/engine.js +71 -1
  322. package/dist/src/graph/kg/engine.js.map +1 -1
  323. package/dist/src/graph/kg/query/scoring.d.ts +5 -0
  324. package/dist/src/graph/kg/query/scoring.d.ts.map +1 -1
  325. package/dist/src/graph/kg/query/scoring.js +85 -1
  326. package/dist/src/graph/kg/query/scoring.js.map +1 -1
  327. package/dist/src/graph/kg/query/search.d.ts +7 -0
  328. package/dist/src/graph/kg/query/search.d.ts.map +1 -1
  329. package/dist/src/graph/kg/query/search.js +117 -1
  330. package/dist/src/graph/kg/query/search.js.map +1 -1
  331. package/dist/src/graph/kg/surface/mcp-tools.d.ts.map +1 -1
  332. package/dist/src/graph/kg/surface/mcp-tools.js +49 -0
  333. package/dist/src/graph/kg/surface/mcp-tools.js.map +1 -1
  334. package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
  335. package/dist/src/hooks/kg-sync-hook.js +3 -0
  336. package/dist/src/hooks/kg-sync-hook.js.map +1 -1
  337. package/dist/src/tools/code-semantic-search.d.ts +10 -0
  338. package/dist/src/tools/code-semantic-search.d.ts.map +1 -0
  339. package/dist/src/tools/code-semantic-search.js +81 -0
  340. package/dist/src/tools/code-semantic-search.js.map +1 -0
  341. package/dist/src/tools/index.d.ts.map +1 -1
  342. package/dist/src/tools/index.js +4 -0
  343. package/dist/src/tools/index.js.map +1 -1
  344. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  345. package/dist/src/tools/spec-loader.js +7 -3
  346. package/dist/src/tools/spec-loader.js.map +1 -1
  347. package/dist/src/tools/wiki-search.d.ts +13 -0
  348. package/dist/src/tools/wiki-search.d.ts.map +1 -0
  349. package/dist/src/tools/wiki-search.js +114 -0
  350. package/dist/src/tools/wiki-search.js.map +1 -0
  351. package/dist/src/utils/update-notices.js +23 -0
  352. package/dist/src/utils/update-notices.js.map +1 -1
  353. package/package.json +4 -1
  354. package/workflows/agy-instructions.md +147 -161
  355. package/workflows/claude-instructions.md +100 -48
  356. package/workflows/codex-instructions.md +147 -161
  357. package/workflows/execute.md +4 -3
  358. package/workflows/explore-usage.md +41 -81
  359. package/workflows/grill.md +11 -0
  360. package/workflows/milestone-audit.md +8 -0
  361. package/workflows/odyssey-base-codex.md +115 -116
  362. package/workflows/odyssey-base.md +89 -91
  363. package/workflows/plan.md +6 -0
@@ -61,7 +61,9 @@ HARD RULES:
61
61
  <states>
62
62
  S_LOCATE — 定位 session + 找下一个 pending step PERSIST: —
63
63
  S_RESOLVE_ARGS — 解析占位符 + 丰富参数 PERSIST: step.args (enriched)
64
+ S_LOAD_CONTEXT — 加载前序产出 + 发现 PERSIST: —
64
65
  S_EXECUTE — 执行当前 step PERSIST: step.status = "running", session.current_step
66
+ S_POST_ANALYZE — 产物 vs 目标偏离分析 PERSIST: step.drift_score, step.drift_correction
65
67
  S_POST_EXEC — 标记完成 + 传播上下文 PERSIST: step.completion_*, step.status, session.context
66
68
  S_HANDLE_FAIL — 处理失败 PERSIST: step.status, session.status
67
69
  S_COMPLETE — 所有 step 完成 PERSIST: session.status = "completed"
@@ -76,18 +78,28 @@ S_LOCATE:
76
78
  → S_FALLBACK WHEN: no running session
77
79
 
78
80
  S_RESOLVE_ARGS:
79
- S_EXECUTE DO: A_RESOLVE_ARGS
81
+ S_LOAD_CONTEXT DO: A_RESOLVE_ARGS
82
+
83
+ S_LOAD_CONTEXT:
84
+ → S_EXECUTE DO: A_LOAD_STEP_CONTEXT
80
85
 
81
86
  S_EXECUTE:
82
87
  → END WHEN: step.decision != null DO: A_EXEC_DECISION
83
- S_POST_EXEC WHEN: step.decision == null + ralph complete invoked with DONE|DONE_WITH_CONCERNS DO: A_EXEC_STEP
84
- → S_HANDLE_FAIL WHEN: step.decision == null + ralph next exit≠0 OR ralph complete with NEEDS_RETRY|BLOCKED DO: A_EXEC_STEP
88
+ S_POST_ANALYZE WHEN: step.decision == null + execution succeeded (DONE|DONE_WITH_CONCERNS) DO: A_EXEC_STEP
89
+ → S_HANDLE_FAIL WHEN: step.decision == null + ralph next exit=1 OR ralph complete with NEEDS_RETRY|BLOCKED DO: A_EXEC_STEP
90
+ → S_HANDLE_FAIL WHEN: step.decision == null + ralph next exit=3 (concurrency conflict) DO: A_HANDLE_CONCURRENCY
91
+
92
+ S_POST_ANALYZE:
93
+ → S_POST_EXEC WHEN: drift_score == ALIGNED|MINOR_DRIFT DO: A_POST_ANALYZE_DRIFT
94
+ → S_EXECUTE WHEN: drift_score == MAJOR_DRIFT + not retried DO: A_POST_ANALYZE_DRIFT (re-execute with correction)
95
+ → S_POST_EXEC WHEN: drift_score == MAJOR_DRIFT + retried DO: A_POST_ANALYZE_DRIFT (proceed with caveats)
85
96
 
86
97
  S_POST_EXEC:
87
98
  → S_LOCATE DO: Bash("maestro ralph complete ...") + Skill("maestro-ralph-execute")
88
99
  NOTE: CLI 已写完 completion_*, status, active_step_index;无需额外写盘
89
100
 
90
101
  S_HANDLE_FAIL:
102
+ → S_LOCATE WHEN: exit code 3 (concurrency conflict) DO: A_HANDLE_CONCURRENCY (wait 3s + retry)
91
103
  → S_LOCATE WHEN: auto + not retried DO: A_RETRY
92
104
  → END WHEN: auto + retried DO: A_PAUSE_SESSION
93
105
  → S_LOCATE WHEN: interactive + user selects retry DO: A_RETRY
@@ -173,6 +185,27 @@ if goal:
173
185
 
174
186
  Write enriched args + source_artifact_ref back to status.json.
175
187
 
188
+ ### A_LOAD_STEP_CONTEXT
189
+
190
+ 加载前序产出和发现,为 inline execution 注入上下文。
191
+
192
+ 1. **Previous step output** — 读前一 completed step 的 `completion_summary` + `completion_caveats` + `completion_decisions` + `completion_deferred`
193
+ 2. **Artifacts** — 按 `session.context` 中的路径逐个 Read,提取与当前 step 相关的内容:
194
+
195
+ | 当前 stage | 加载什么 | Source |
196
+ |-----------|---------|--------|
197
+ | plan | analysis conclusions + scope_verdict | `{context.analysis_dir}/conclusions.json` |
198
+ | execute | task list + wave assignments | `{context.plan_dir}/TASK-*.json` |
199
+ | review | changed files + verification results | `{context.scratch_dir}/verification.json` |
200
+ | test | review findings | `review.json` |
201
+ | debug | error traces + failing test details | 前一 step 的 `completion_evidence` |
202
+ | brainstorm | grill report | `{context.grill_id}` report |
203
+
204
+ 3. **Explore if needed** — 产物指向代码位置但缺少上下文 → `maestro explore` 补充(仅 execute/debug/test 且有文件路径引用时)
205
+ 4. **Accumulated signals** — 遍历 ALL completed steps → 聚合 caveats + deferred
206
+
207
+ 加载的内容进入会话上下文,后续 inline execution 自动受益。
208
+
176
209
  ### A_EXEC_DECISION
177
210
 
178
211
  1. Mark step running, write status.json
@@ -200,22 +233,105 @@ Write enriched args + source_artifact_ref back to status.json.
200
233
  </goal_context>
201
234
  ```
202
235
  3. **Inline execution** — 按 stdout 执行;deferred_reading 按需 Read
203
- 4. **Complete**:
236
+ 4. **Extract step signals** (A_EXTRACT_STEP_SIGNALS) — 执行完成后、调 ralph complete 前,提取结构化信号用于组装 completion 参数和下一步上下文:
237
+
238
+ **4a. Stage-specific signal extraction:**
239
+
240
+ | Stage | 提取什么 | 写入字段 |
241
+ |-------|---------|---------|
242
+ | analyze | `conclusions.json` 的 scope_verdict + key_findings; 依赖图摘要 | `--summary`, `--decisions`, context.analysis_dir |
243
+ | plan | 生成的 TASK-*.json 数量 + 主要模块; 波次划分 | `--summary`, context.plan_dir |
244
+ | execute | 修改的文件列表; verification.json passed/failed; 新 artifact ID | `--summary`, `--evidence`, context.scratch_dir |
245
+ | review | review.json verdict + findings 数量 + severity 分布 | `--summary`, `--decisions` |
246
+ | test | test-results.json pass/fail 统计; uat.md 结果 | `--summary`, `--evidence` |
247
+ | debug | root cause 描述; 修复了什么 | `--summary`, `--decisions` |
248
+ | grill | grill-report.md 核心质疑点; 术语表 | `--summary`, `--caveats`, context.grill_id |
249
+ | brainstorm | 候选方案数量 + 推荐方案 | `--summary`, `--decisions`, context.brainstorm_dir |
250
+
251
+ **4b. Compose completion params:**
252
+
253
+ | Param | 规则 | 组装方法 |
254
+ |-------|------|---------|
255
+ | `--summary` | MUST。动词开头,≤100 字。从 4a 提取的关键产出组合 | `"<动词><做了什么>,<量化结果>"` e.g. `"分析认证模块依赖图,发现 5 处 JWT 内联验证,scope=medium"` |
256
+ | `--decisions` | SHOULD。每条一个架构/技术决策(可多次 `--decisions`) | 从执行过程中做出的非显而易见的选择提取。e.g. `"选择中间件模式而非装饰器"` `"跳过 session 层重构,留给 G2"` |
257
+ | `--caveats` | SHOULD。后续 step 必须知道的约束/风险 | 从执行中发现但不属于本步解决的问题。e.g. `"session 存储层与 JWT 有隐式耦合,execute 阶段需处理"` |
258
+ | `--deferred` | SHOULD。明确推迟到后续的工作(可多次 `--deferred`) | 被主动推迟的项。e.g. `"性能基准测试留到 review 后"` `"错误码国际化不在 scope 内"` |
259
+
260
+ **4c. Context-to-next-step propagation checklist:**
261
+
262
+ | 信号 | 检查 | 传播到 |
263
+ |------|------|--------|
264
+ | PHASE 变更 | 输出含 `PHASE: N` | `session.context.phase` |
265
+ | Artifact ID | 输出含 `ANL-xxx`/`PLN-xxx`/`BLP-xxx` | `session.analyze_macro_id`/`context.plan_dir` 等 |
266
+ | Scratch dir | 输出含 `scratch_dir:` 或 `.workflow/scratch/` 路径 | `session.context.scratch_dir` |
267
+ | Plan dir | plan step 产出目录 | `session.context.plan_dir` |
268
+ | Grill ID | grill step 产出 ID | `session.context.grill_id` |
269
+ | Blueprint ID | blueprint step 产出 `BLP-xxx` | `session.blueprint_id` |
270
+
271
+ 这些信号直接写入 `status.json.context`,下一步的 session_anchor 自动携带。
272
+
273
+ 5. **Complete** — 使用 4b 组装的参数调用:
204
274
  - `Bash("maestro ralph complete N --status DONE --summary \"...\" [--evidence <path>] [--decisions \"...\"] [--caveats \"...\"] [--deferred \"...\"]")`
205
275
  - `Bash("maestro ralph complete N --status DONE_WITH_CONCERNS --summary \"...\" --concerns \"...\"")`
206
276
  - `Bash("maestro ralph retry N")`
207
277
  - `Bash("maestro ralph complete N --status BLOCKED --reason \"...\"")`
208
278
 
209
- | Param | 必填 | 格式 | 示例 |
210
- |-------|------|------|------|
211
- | `--summary` | MUST | 动词开头,≤100 字 | `"实现搜索 API 分页逻辑,新增 3 端点"` |
212
- | `--decisions` | SHOULD(可多次) | 每条一个决策 | `"选择 ELK 布局而非 dagre"` |
213
- | `--caveats` | SHOULD | 后续注意事项 | `"X 模块 e2e 暂未覆盖新端点"` |
214
- | `--deferred` | SHOULD(可多次) | 推迟工作 | `"性能优化留到 review 后"` |
215
- 5. **Propagate context signals** — 关键信号 (`PHASE: N` / `scratch_dir: path` / `BLP-xxx`) 写入 `status.json.context`
279
+ 6. **Propagate context signals** 4c checklist 将关键信号写入 `status.json.context`
216
280
 
217
281
  完成后 S_LOCATE 触发 `Skill({ skill: "maestro-ralph-execute" })` 自调用。
218
282
 
283
+ ### A_POST_ANALYZE_DRIFT
284
+
285
+ 执行完成后、调 ralph complete 前,分析产物与目标的偏离程度并自动修正。
286
+
287
+ **1. 收集对照基准:**
288
+
289
+ | 基准来源 | 取值 |
290
+ |---------|------|
291
+ | `step.goal_ref` → goal.done_when | 子目标的完成条件 |
292
+ | `session.boundary_contract.definition_of_done` | 全局验收标准 |
293
+ | `session.execution_criteria` | 执行准则 |
294
+ | `session.intent` | 原始意图 |
295
+
296
+ **2. 读产物摘要:**
297
+
298
+ 从 A_EXTRACT_STEP_SIGNALS (step 4a) 已提取的 summary + decisions + artifacts 构建产物画像。
299
+
300
+ **3. 对比评分:**
301
+
302
+ | 维度 | 检查 |
303
+ |------|------|
304
+ | 覆盖度 | 产物是否覆盖了 goal.done_when 的每个条件 |
305
+ | 方向性 | decisions 是否与 intent 和 boundary 一致 |
306
+ | 完整性 | 预期产物类型是否齐全(如 plan 阶段应有 TASK-*.json) |
307
+
308
+ **drift_score:**
309
+ - `ALIGNED` — 全部维度通过
310
+ - `MINOR_DRIFT` — 覆盖度/完整性有小缺口,不影响后续
311
+ - `MAJOR_DRIFT` — 方向性偏离或关键产物缺失
312
+
313
+ **4. 修正动作:**
314
+
315
+ | drift_score | 动作 |
316
+ |-------------|------|
317
+ | ALIGNED | 正常进入 S_POST_EXEC |
318
+ | MINOR_DRIFT | 将偏离项追加到 completion_caveats,正常 complete |
319
+ | MAJOR_DRIFT + 未重试 | 将偏离分析写入 `step.drift_correction`,回到 S_EXECUTE 重跑(A_LOAD_STEP_CONTEXT 自动加载 drift_correction 作为修正上下文) |
320
+ | MAJOR_DRIFT + 已重试 | 将偏离项写入 caveats + concerns,以 DONE_WITH_CONCERNS complete,由后续 decision node 裁决 |
321
+
322
+ **5. 写入:**
323
+ - `step.drift_score` — ALIGNED / MINOR_DRIFT / MAJOR_DRIFT
324
+ - `step.drift_correction` — MAJOR_DRIFT 时的偏离描述 + 修正指引(供重跑时注入)
325
+
326
+ ### A_HANDLE_CONCURRENCY
327
+
328
+ Exit code 3 — `active_step_index` occupied by another process (concurrency conflict).
329
+
330
+ 1. Display: `[{index}] ⚠ Concurrency conflict — active_step_index already held`
331
+ 2. Wait 3 seconds, then re-read `status.json` to check if `active_step_index` has been cleared
332
+ 3. If cleared → return to S_LOCATE (retry the step)
333
+ 4. If still held after 2 attempts → A_PAUSE_SESSION with reason "concurrency conflict unresolved — another process may be holding the lock"
334
+
219
335
  ### A_RETRY
220
336
 
221
337
  1. `Bash("maestro ralph retry N")` — CLI 设 `step.retried = true`, `step.status = "pending"`, `step.completion_confirmed = false`, 清 `active_step_index`
@@ -42,7 +42,7 @@ Remaining → intent (amend_mode 时为 change_request)
42
42
  <invariants>
43
43
  1. **Ralph never executes steps** — only creates sessions and evaluates decisions
44
44
  2. **Handoff via Skill("maestro-ralph-execute")** — 创建 session 后始终自动 handoff;decision 评估后始终 handoff
45
- 3. **Decision delegates read-only** — `maestro delegate --role analyze --mode analysis`
45
+ 3. **Decision delegates read-only** — `maestro delegate --to <tool> --mode analysis`
46
46
  4. **执行 step 通过 `maestro ralph next` CLI 加载并内联执行**(详见 invariant 8)
47
47
  5. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
48
48
  6. **每个 step 必须 `completion_confirmed: true`** — 由 `maestro ralph complete N --status DONE`(或 DONE_WITH_CONCERNS)写入;CLI 是唯一合法写入路径
@@ -472,11 +472,11 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`(`sess
472
472
  ```
473
473
  maestro delegate "PURPOSE: 评估 {decision} 质量门结果
474
474
  TASK: 读取结果 | 分析状态 | 评估严重性 | 给出建议
475
- EXPECTED: ---VERDICT--- STATUS/REASON/GAP_SUMMARY/CONFIDENCE(high|medium|low)/CONFIDENCE_SCORE(0-100)/WEAKEST_DIMENSION ---END---
475
+ EXPECTED: ---VERDICT--- STATUS(PASS|FAIL|PARTIAL|BLOCKED)/REASON/GAP_SUMMARY/CONFIDENCE(high|medium|low)/CONFIDENCE_SCORE(0-100)/WEAKEST_DIMENSION ---END---
476
476
  CONSTRAINTS: 只评估 | 置信度<60% 倾向 fix | retry {n}/{max} 达上限必须 escalate"
477
- --role analyze --mode analysis
477
+ --to {session.cli_tool} --mode analysis
478
478
  ```
479
- 6. On callback: parse verdict; if parse fails → fallback STATUS="fix", BUT MUST set `parse_failed: true` and `confidence_score: 0` in decision log (invariant 13). Subsequent steps inherit LOW CONFIDENCE flag.
479
+ 6. On callback: parse verdict block — STATUS must match strict enum `PASS|FAIL|PARTIAL|BLOCKED`; any other value → parse failure. If parse fails → fallback STATUS="fix", BUT MUST set `parse_failed: true` and `confidence_score: 0` in decision log (invariant 13). Subsequent steps inherit LOW CONFIDENCE flag.
480
480
  7. Confidence adjustment: <60 + proceed → fix; >95 + fix + retry>0 → suggest proceed
481
481
  8. **Decision log**: Append to `{session_dir}/decisions.ndjson`:
482
482
  ```json
@@ -545,7 +545,7 @@ Runs only when `task_decomposition` present.
545
545
  - 严格按 done_when 判定;evidence 缺失 → unmet
546
546
  - 不得建议超出 boundary_contract 的修改
547
547
  "
548
- --role analyze --mode analysis
548
+ --to {session.cli_tool} --mode analysis
549
549
  ```
550
550
  4. On callback: 对每个 met 子目标,set `task_decomposition[i].status="done"` + `completion_confirmed=true` + `completed_at=now`
551
551
  5. Append `{session_dir}/decisions.ndjson` with `"type": "goal-gate"`, `unmet_count`, `unmet_ids`
@@ -592,7 +592,7 @@ GUARD: `task_decomposition` 存在(周期触发,见 build rule 5.5)
592
592
  - aligned 阈值:≥80% 已完成产出直接服务 intent
593
593
  - 单个 step 触碰 out_of_scope → 直接判 drifted
594
594
  - goal_changelog 存在 → 以最新 after.goals 为基准"
595
- --role analyze --mode analysis
595
+ --to {session.cli_tool} --mode analysis
596
596
  ```
597
597
  3. On callback: parse verdict
598
598
  4. Append `{session_dir}/decisions.ndjson`:`{ "id": "DEC-{ts}", "type": "reground-gate", "source": "ralph", "node_id": "post-reground", "verdict": "{aligned|drifted}", "confidence_score": {N}, "drift_description": "...", "corrective_action": "..." }`
@@ -677,7 +677,7 @@ GUARD: `task_decomposition` 存在(周期触发,见 build rule 5.5)
677
677
  |-------|------|------|
678
678
  | 1. 快照 | 读 `task_decomposition` + `boundary_contract` + 已完成 steps 的 `completion_summary` | Display: 目标列表 + 进度 |
679
679
  | 2. 解析 | `change_request` 非空 → 直接用;为空 → AskUserQuestion(修改/新增/移除/调整边界) | `change_type` + `change_request` |
680
- | 3. Mini Grill | `maestro delegate --role analyze --mode analysis`:评估影响 | RISK_LEVEL + AFFECTED_GOALS + INVALIDATED_STEPS + NEW_GAPS |
680
+ | 3. Mini Grill | `maestro delegate --to {session.cli_tool} --mode analysis`:评估影响 | RISK_LEVEL + AFFECTED_GOALS + INVALIDATED_STEPS + NEW_GAPS |
681
681
  | 4. 确认 | AskUserQuestion:应用并继续 / 仅改目标 / 取消 | 用户选择 |
682
682
  | 5. 应用 | 归档旧目标(`superseded`)→ 写入新目标(`origin: CHG-xxx`)→ 重建链路 → write status.json | handoff ralph-execute |
683
683
 
@@ -890,7 +890,7 @@ decision:post-goal-audit {retry+1}
890
890
  - [ ] planning_mode 显式决定;unified=无 `{phase}`, independent=带 `{phase}`
891
891
  - [ ] specs 预检:lifecycle_position 在 init 之后 + `.workflow/specs/` 不存在 → 链路最前面插入 `spec-setup`
892
892
  - [ ] Chain 必须以 `milestone-complete` 结尾
893
- - [ ] Decision nodes 由 maestro delegate --role analyze 评估
893
+ - [ ] Decision nodes 由 maestro delegate --to {session.cli_tool} --mode analysis 评估
894
894
  - [ ] Ralph 不执行 step,只 evaluate;Skill("maestro-ralph-execute") handoff
895
895
  - [ ] Phase-level deferred chaining:plan/execute step 的 `--from`/`--dir` 注入由 A_RESOLVE_ARGS(ralph-execute)运行时完成;build 阶段标记意图,不预知 artifact ID
896
896
  - [ ] Phase-level plan step 运行时获得 `--from analyze:{phase_analyze_id}`(由 ralph-execute 从 state.json 查找注入)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-roadmap
3
3
  description: Generate roadmap with milestone/phase structure from requirements or upstream context
4
- argument-hint: "<requirement> [-y] [-c] [-m progressive|direct|auto] [--from <source>] [--revise [instructions]] [--review]"
4
+ argument-hint: "<requirement> [-y] [-c] [-m progressive|direct|auto] [--from <source>] [--from-brainstorm SESSION-ID] [--revise [instructions]] [--review]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -96,14 +96,6 @@ Sub-modes:
96
96
  - REQUIRED: Artifact registered in state.json with milestone entries.
97
97
  - BLOCKED if missing: do not report completion without written roadmap.
98
98
 
99
- ### Artifact Verification (before completion)
100
-
101
- ```
102
- REQUIRED_ARTIFACTS = [
103
- ".workflow/roadmap.md" // Milestone > Phase hierarchy with progress table
104
- ]
105
- ```
106
- If missing: DO NOT report completion.
107
99
 
108
100
  </execution>
109
101
 
@@ -92,20 +92,22 @@ S_FALLBACK:
92
92
 
93
93
  ### A_ROUTE_SCRIPT
94
94
 
95
- Intent-to-script routing(按关键词匹配,--script 优先级最高):
96
-
97
- | Keywords | Script |
98
- |----------|--------|
99
- | 分析 / analyze / 探索 / explore / 架构 / architecture / 复杂度 / 风险 | `wf-analyze` |
100
- | 头脑风暴 / brainstorm / 方案 / 设计 / 评估 / evaluate / 多角度 | `wf-brainstorm` |
101
- | 审查 / review / 代码审查 / code review / 质量 / quality | `wf-review` |
102
- | 验证 / verify / 检查 / check / 反模式 / antipattern | `wf-verify` |
103
- | 拷问 / grill / 压力测试 / stress-test / 挑战 / challenge | `wf-grill` |
104
- | 规划 / plan / 任务分解 / decompose / 分波 / wave | `wf-plan` |
105
- | 执行 / execute / 实现 / implement / 开发 / develop | `wf-execute` |
106
- | 里程碑审计 / milestone-audit / 集成检查 / integration | `wf-milestone-audit` |
107
-
108
- 多命中 AskUserQuestion 让用户选择。
95
+ Intent-to-script routing(按关键词匹配,--script 优先级最高)。
96
+
97
+ **Priority ordering** 按下表自上而下匹配,先命中先用。高优先级的具体关键词优先于低优先级的宽泛关键词(如 "grill" > "analyze","verify" > "check"):
98
+
99
+ | Priority | Keywords | Script |
100
+ |----------|----------|--------|
101
+ | 1 | 里程碑审计 / milestone-audit / 集成检查 / integration | `wf-milestone-audit` |
102
+ | 2 | 拷问 / grill / 压力测试 / stress-test / 挑战 / challenge | `wf-grill` |
103
+ | 3 | 验证 / verify / 反模式 / antipattern | `wf-verify` |
104
+ | 4 | 审查 / review / 代码审查 / code review / 质量 / quality | `wf-review` |
105
+ | 5 | 执行 / execute / 实现 / implement / 开发 / develop | `wf-execute` |
106
+ | 6 | 规划 / plan / 任务分解 / decompose / 分波 / wave | `wf-plan` |
107
+ | 7 | 头脑风暴 / brainstorm / 方案 / 评估 / evaluate / 多角度 | `wf-brainstorm` |
108
+ | 8 | 分析 / analyze / 探索 / explore / 架构 / architecture / 复杂度 / 风险 | `wf-analyze` |
109
+
110
+ **Disambiguation**: 多命中(同一优先级内多个关键词匹配不同脚本)→ AskUserQuestion 让用户选择。跨优先级命中取高优先级。
109
111
 
110
112
  ### A_ASSEMBLE_CONTEXT
111
113
 
@@ -100,6 +100,21 @@ Use when {timing/trigger condition}.
100
100
  1. Step one ...
101
101
  ```
102
102
 
103
+ **Confirm before writing** — Use `AskUserQuestion` to show the user the planned knowhow document (title, category, keywords, summary, step count) and spec ref entry before persisting:
104
+
105
+ ```
106
+ question: "确认写入以下 knowhow 工具文档?"
107
+ options:
108
+ - label: "确认写入"
109
+ description: "knowhow: {title} (category: {category}, keywords: {keywords}), spec ref entry"
110
+ - label: "修改后写入"
111
+ description: "调整 title/category/keywords 后重新确认"
112
+ - label: "取消"
113
+ description: "不写入任何文件"
114
+ ```
115
+
116
+ User confirms → proceed; user edits → re-gather; user cancels → END.
117
+
103
118
  **Create knowhow tool document** in `.workflow/knowhow/` with `tool: true` in YAML frontmatter:
104
119
  ```yaml
105
120
  ---
@@ -115,7 +130,7 @@ summary: "Use when <timing>. <scope description>"
115
130
  1. Step one ...
116
131
  ```
117
132
 
118
- **Optionally register spec ref entry** for index discoverability:
133
+ **Optionally register spec ref entry** (after user confirmation above) for index discoverability:
119
134
  ```bash
120
135
  maestro spec add <category> "<title>" "Use when <timing>. <scope summary>" --keywords "<csv>" \
121
136
  --description "<one-line summary>" --ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
@@ -11,6 +11,7 @@ allowed-tools:
11
11
  - Grep
12
12
  - Agent
13
13
  - Skill
14
+ - AskUserQuestion
14
15
  ---
15
16
  <purpose>
16
17
  Extract design system from source code into tokens, reference package, and knowledge assets.
@@ -63,10 +64,19 @@ The workflow orchestrates 4 phases with deferred loading of phase-specific workf
63
64
  **GATE Phase 3 → Phase 4: Package → Knowhow**
64
65
  - REQUIRED: preview.html + preview.css generated as interactive showcase.
65
66
  - BLOCKED if missing: preview artifacts not generated — knowhow phase needs rendered reference for validation.
67
+ - REQUIRED: AskUserQuestion confirmation before proceeding to knowhow generation:
68
+ ```
69
+ question: "Preview 生成完成。是否继续将设计系统持久化为 knowhow 知识资产?"
70
+ options:
71
+ - label: "继续生成 knowhow"
72
+ description: "调用 codify-to-knowhow 写入 AST/DCS assets 和 spec entries"
73
+ - label: "仅保留 preview,跳过 knowhow"
74
+ description: "保留 preview.html + preview.css,不写入知识库"
75
+ ```
66
76
 
67
77
  **GATE Phase 4 → Completion: Knowhow → Done**
68
78
  - REQUIRED: knowhow-manifest.json created with AST/DCS assets and spec entries.
69
- - REQUIRED: codify-to-knowhow called and completed.
79
+ - REQUIRED: codify-to-knowhow called and completed (only after user confirmation at Phase 3→4 gate).
70
80
  - BLOCKED if missing: knowhow-manifest.json absent or codify-to-knowhow not invoked — knowledge assets not persisted.
71
81
 
72
82
  ### Artifact Verification (before completion)
@@ -43,6 +43,7 @@ S_SCAN — 扫描现有 workflow 库匹配 PERSIST: —
43
43
  S_DECIDE — 用户选择:复用现有 / 生成新脚本 PERSIST: —
44
44
  S_DESIGN — 分析任务、设计工作流结构 PERSIST: —
45
45
  S_GENERATE — 生成脚本 → 写入文件 → node --check 验证 PERSIST: uwf-{slug}.js
46
+ S_CONFIRM_EXEC — 确认执行前门控 PERSIST: —
46
47
  S_EXECUTE — 调用 Workflow 工具执行 PERSIST: —
47
48
  S_PERSIST — 保存脚本到 dynamic/ 目录 PERSIST: —
48
49
  </states>
@@ -58,7 +59,7 @@ S_SCAN:
58
59
  → S_DESIGN WHEN: no matches DO: A_SCAN_LIBRARY
59
60
 
60
61
  S_DECIDE:
61
- → S_EXECUTE WHEN: user picks existing script DO:
62
+ → S_EXECUTE WHEN: user picks existing script DO: A_CONFIRM_EXECUTE
62
63
  → S_DESIGN WHEN: user wants new script DO: —
63
64
  → S_DESIGN WHEN: --from specified DO: —
64
65
 
@@ -66,10 +67,15 @@ S_DESIGN:
66
67
  → S_GENERATE DO: A_DESIGN_WORKFLOW
67
68
 
68
69
  S_GENERATE:
69
- S_EXECUTE WHEN: Write + node --check pass AND NOT --dry-run DO: A_GENERATE_SCRIPT
70
- → S_PERSIST WHEN: --dry-run (file already written) DO: A_GENERATE_SCRIPT
71
- → S_GENERATE WHEN: node --check fails (retry ≤2) DO: A_GENERATE_SCRIPT (fix & retry)
72
- → END WHEN: node --check fails after 2 retries DO: report E003
70
+ S_CONFIRM_EXEC WHEN: Write + node --check pass AND NOT --dry-run DO: A_GENERATE_SCRIPT
71
+ → S_PERSIST WHEN: --dry-run (file already written) DO: A_GENERATE_SCRIPT
72
+ → S_GENERATE WHEN: node --check fails (retry ≤2) DO: A_GENERATE_SCRIPT (fix & retry)
73
+ → END WHEN: node --check fails after 2 retries DO: report E003
74
+
75
+ S_CONFIRM_EXEC:
76
+ → S_EXECUTE WHEN: user confirms execution DO: A_CONFIRM_EXECUTE
77
+ → S_PERSIST WHEN: user declines execution DO: —
78
+ → END WHEN: user cancels DO: —
73
79
 
74
80
  S_EXECUTE:
75
81
  → S_PERSIST WHEN: workflow completed DO: A_EXECUTE_WORKFLOW
@@ -284,6 +290,23 @@ Bash({ command: 'node --check "path/to/uwf-{slug}.js"' })
284
290
 
285
291
  验证通过后进入 S_EXECUTE(若非 `--dry-run`)。
286
292
 
293
+ ### A_CONFIRM_EXECUTE
294
+
295
+ Use `AskUserQuestion` to confirm before executing the generated or selected script:
296
+
297
+ ```
298
+ question: "脚本已就绪,是否执行?"
299
+ options:
300
+ - label: "执行"
301
+ description: "调用 Workflow 工具运行 {script_name}(预估 {agent_count} 个 agent)"
302
+ - label: "仅保存,不执行"
303
+ description: "保存脚本到 dynamic/ 目录,稍后手动执行"
304
+ - label: "取消"
305
+ description: "不执行也不保存"
306
+ ```
307
+
308
+ User confirms → S_EXECUTE; user declines → S_PERSIST (save only); user cancels → END.
309
+
287
310
  ### A_EXECUTE_WORKFLOW
288
311
 
289
312
  **必须用 scriptPath 调用**(不用 script 内联字符串):
@@ -21,7 +21,7 @@ $ARGUMENTS — optional flags.
21
21
 
22
22
  **Flags:**
23
23
  - `--dry-run` -- Preview migration plan without executing
24
- - `--force` -- Skip confirmation prompts
24
+ - `--force` -- Skip confirmation prompts (intended for CI/automated contexts). Migration diff is still displayed even with `--force` to maintain audit visibility.
25
25
  - `--setup-only` -- Skip schema migration, run only the setup for current version
26
26
 
27
27
  **Version source:** `.workflow/state.json` → `version` field
@@ -69,24 +69,27 @@ IF `--dry-run` → display info and EXIT.
69
69
  ### Step 3: Execute
70
70
 
71
71
  ```
72
- 1. Confirm (unless --force):
72
+ 1. Display migration diff (always — even with --force):
73
+ Show schema changes that will be applied.
74
+
75
+ 2. Confirm (unless --force):
73
76
  AskUserQuestion: "Upgrade v{current} → v{target}?"
74
77
  Options: [执行 / 取消]
75
78
 
76
- 2. Create backup:
79
+ 3. Create backup:
77
80
  Bash: cp .workflow/state.json .workflow/state.json.backup-v{current}-{timestamp}
78
81
 
79
- 3. Run schema migration (handles all intermediate steps automatically):
82
+ 4. Run schema migration (handles all intermediate steps automatically):
80
83
  Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
81
84
  Parse result, display changes.
82
85
 
83
- 4. IF failed → display backup restore command → EXIT
86
+ 5. IF failed → display backup restore command → EXIT
84
87
 
85
- 5. Load version-specific setup:
88
+ 6. Load version-specific setup:
86
89
  Read: ~/.maestro/workflows/updates/update-v{target}-setup.md
87
90
  IF exists → follow completely (hooks, deps, knowledge system config)
88
91
 
89
- 6. Display: "v{current} → v{target}: done"
92
+ 7. Display: "v{current} → v{target}: done"
90
93
  ```
91
94
 
92
95
  ### Step 4: Summary
@@ -30,7 +30,7 @@ $ARGUMENTS — user intent text, or special keywords.
30
30
 
31
31
  **Flags:**
32
32
  - `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors
33
- - `-c` / `--continue` — Resume previous session
33
+ - `-c` / `--continue` — Resume previous session. **`-c` is reserved for `--continue` across all maestro commands** — downstream skills MUST NOT redefine `-c` for other purposes to prevent collision via transparent forwarding.
34
34
  - `--dry-run` — Show chain without executing
35
35
  - `--super` — Read and follow `maestro-super.md`
36
36
  </context>
@@ -29,6 +29,8 @@ $ARGUMENTS -- optional flags.
29
29
  - `--force` -- Skip confirmation prompt and proceed directly
30
30
  - `--skip-commit` -- Do not auto-commit after rebuild
31
31
 
32
+ **Confirmation gate:** Unless `--force` is set, prompt the user (AskUserQuestion) before executing git commit. Show the list of changed files and proposed commit message. If `--skip-commit` is set, skip the commit entirely.
33
+
32
34
  **Mapper agent assignments (when `--focus` omitted):**
33
35
  | Agent | Focus | Output file |
34
36
  |-------|-------|-------------|
@@ -66,6 +68,7 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
66
68
  | Code | Severity | Condition | Recovery |
67
69
  |------|----------|-----------|----------|
68
70
  | E001 | error | .workflow/ not initialized | Run maestro-init first to create .workflow/ |
71
+ | E002 | error | All 4 mapper agents failed | Abort rebuild; check agent configuration and retry |
69
72
  | W001 | warning | A mapper agent failed (partial results) | Retry failed mapper or accept partial results |
70
73
  | W002 | warning | `.workflow/codebase/` already exists -- user prompted for rebuild/skip | check_existing |
71
74
  | W003 | warning | KG validation failed (graph written with valid=false) | Review .kg-tmp/ artifacts, re-run KG pipeline |
@@ -75,7 +78,8 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
75
78
  <success_criteria>
76
79
  - [ ] User confirmed rebuild (or --force used)
77
80
  - [ ] .workflow/codebase/ cleared and rebuilt from scratch (or scoped subset when --focus set)
78
- - [ ] All 4 mapper agents spawned (failures logged as W001)
81
+ - [ ] All 4 mapper agents spawned (all-fail E002; partial fail → W001)
82
+ - [ ] If not --skip-commit: user confirmed git commit (or --force used) before committing
79
83
  - [ ] doc-index.json generated and valid
80
84
  - [ ] All documentation files regenerated
81
85
  - [ ] state.json updated with rebuild timestamp
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-drift-realign
3
3
  description: Detect and realign .workflow/ artifact drift against code reality after refactoring
4
- argument-hint: "--scope <roadmap|spec|codebase|state|issue|knowhow|project|all> [--since YYYY-MM-DD|commit|HEAD~N] [--depth shallow|deep] [--dry-run] [--report] [--auto-archive] [--interactive]"
4
+ argument-hint: "[--scope <roadmap|spec|codebase|state|issue|knowhow|project|all>] [--since YYYY-MM-DD|commit|HEAD~N] [--depth shallow|deep] [--dry-run] [--report] [--auto-archive] [--interactive]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -43,7 +43,10 @@ Arguments: $ARGUMENTS
43
43
 
44
44
  **`--interactive`:** 逐项交互分诊(默认)。
45
45
 
46
- **互斥规则:** `--report` 覆盖 `--interactive`;`--auto-archive` 覆盖 `--interactive`。
46
+ **互斥规则:**
47
+ - `--report` 覆盖 `--interactive`
48
+ - `--auto-archive` 覆盖 `--interactive`
49
+ - `--report` 与 `--auto-archive` 互斥(同时传入 → E006)
47
50
 
48
51
  **状态文件读取:**
49
52
  - `.workflow/state.json`
@@ -127,6 +130,7 @@ Follow `~/.maestro/workflows/drift-realign.md` Stages 1-9 in order.
127
130
  | E003 | error | git 不可用(非 git 仓库) | 初始化 git |
128
131
  | E004 | error | `--since` 无法解析 | 检查日期格式或 commit ref |
129
132
  | E005 | error | 备份失败 | 检查磁盘空间 |
133
+ | E006 | error | `--report` 与 `--auto-archive` 同时传入 | 二选一:`--report` 仅生成报告,`--auto-archive` 执行归档 |
130
134
  | W001 | warning | session 历史不可用(wiki 未索引) | 运行 `maestro wiki rebuild` |
131
135
  | W002 | warning | `drift_window` > 180 天 | 建议使用 `--depth deep` |
132
136
  | W003 | warning | 部分 scanner agent 失败 | 以部分覆盖继续 |
@@ -33,7 +33,10 @@ Arguments: $ARGUMENTS
33
33
  - `<session-id>` (e.g., `ANL-auth-20260410`, `WFS-xxx`) → `session` mode: harvest specific session
34
34
  - `<path>` (e.g., `.workflow/.analysis/ANL-auth-20260410/`) → `path` mode: harvest from explicit directory
35
35
 
36
- Flags, source registry (scan paths), and storage locations defined in workflow harvest.md.
36
+ **Flags:**
37
+ - `-y` / `--yes` — Skip confirmation prompts for all write operations (artifact selection, routing decisions, store writes). Useful for CI or batch harvesting.
38
+
39
+ Additional flags, source registry (scan paths), and storage locations defined in workflow harvest.md.
37
40
  </context>
38
41
 
39
42
  <execution>
@@ -5,6 +5,7 @@ argument-hint: "[multi-perspective | by-prompt <prompt>] [-y] [--scope <glob>] [
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
8
+ - Edit
8
9
  - Bash
9
10
  - Glob
10
11
  - Grep
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-kg-extractors
3
3
  description: Analyze codebase patterns and generate .workflow/kg/extractors.yaml for custom symbol extraction
4
- argument-hint: "[--scan-only] [--append] [--language <lang>]"
4
+ argument-hint: "[--scan-only] [--append] [--language <lang>] [--min-count <n>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -24,6 +24,7 @@ $ARGUMENTS -- optional flags.
24
24
  - `--scan-only` — Only report detected patterns, don't write extractors.yaml
25
25
  - `--append` — Append new rules to existing extractors.yaml (default: overwrite)
26
26
  - `--language <lang>` — Limit analysis to specific language (python, typescript, java, etc.)
27
+ - `--min-count <n>` — Minimum occurrences to include a pattern (default: 3). Use `--min-count 1` to include rare patterns.
27
28
 
28
29
  **Analysis targets (per language):**
29
30
 
@@ -77,6 +78,8 @@ Spawn **3 parallel agents** to scan the codebase:
77
78
 
78
79
  Each agent returns: `[{pattern_type, regex_evidence, file_count, sample_matches: [{file, line, code}]}]`
79
80
 
81
+ **Gate:** If all 3 agents return empty results → E002 (abort). If at least 1 agent succeeds, proceed with partial results (log W001 for failed agents).
82
+
80
83
  ### Phase 2: Generate rules
81
84
 
82
85
  For each discovered pattern with ≥3 occurrences:
@@ -112,6 +115,7 @@ If `--scan-only`: stop after Phase 2 summary.
112
115
  | Code | Severity | Condition | Recovery |
113
116
  |------|----------|-----------|----------|
114
117
  | E001 | error | .workflow/ not initialized | Run maestro-init first |
118
+ | E002 | error | All 3 Phase 1 agents failed — zero patterns discovered | Check codebase language detection; retry with `--language` |
115
119
  | W001 | warning | No patterns detected for language | Try broader scan or different language |
116
120
  | W002 | warning | Pattern has < 3 occurrences | Skipped by default, include with --min-count 1 |
117
121
  | W003 | warning | Existing extractors.yaml will be overwritten | Use --append to preserve |
@@ -9,6 +9,7 @@ allowed-tools:
9
9
  - Bash
10
10
  - Glob
11
11
  - Grep
12
+ - WebFetch
12
13
  - AskUserQuestion
13
14
  ---
14
15
  <purpose>
@@ -32,6 +32,8 @@ Arguments: $ARGUMENTS
32
32
 
33
33
  **删除策略**默认 `--interactive`(三态面板逐项决策);非交互模式 `--mark`(仅打标)/ `--delete`(软删到 `.trash/`)/ `--purge`(物理擦除,仅 artifact 且需双重确认)。
34
34
 
35
+ **互斥规则:** `--interactive`、`--mark`、`--delete`、`--purge` 四选一,同时传入多个 → E006。
36
+
35
37
  Flag 全集、scope 对应的扫描路径、Stage 步骤、检测算法定义在 workflow knowledge-audit.md。
36
38
  </context>
37
39
 
@@ -111,6 +113,7 @@ Follow `~/.maestro/workflows/knowledge-audit.md` Stages 1-8 in order.
111
113
  | E003 | error | `--purge` 与 `--dry-run` 同用 | 二选一 |
112
114
  | E004 | error | `--purge` 作用于非 artifact 范围 | purge 仅支持 artifact scope |
113
115
  | E005 | error | 备份失败(`.trash/` 写入异常) | 检查磁盘空间与权限,重试 |
116
+ | E006 | error | `--interactive`/`--mark`/`--delete`/`--purge` 同时传入多个 | 四选一,默认 `--interactive` |
114
117
  | W001 | warning | 检出冲突但用户选择 keep | 记入 report,不阻断 |
115
118
  | W002 | warning | 待删 artifact 无 harvest-log 记录 | 提示先跑 manage-harvest |
116
119
  | W003 | warning | 循环 supersedes 链 | 自动断环或交互选保留节点 |
@@ -36,6 +36,7 @@ $ARGUMENTS — subcommand and optional flags.
36
36
  **Flags:**
37
37
  - `--type <type>` — Filter by wiki type: spec, knowhow, note, issue
38
38
  - `--fix` — Auto-fix issues found during cleanup/connect (remove broken links, apply connections)
39
+ - `--dry-run` — Preview mode, no writes. **Overrides `--fix`**: when both are passed, `--dry-run` takes precedence (preview only, no fixes applied).
39
40
  - `--json` — Output in JSON format
40
41
  - `--min-similarity N` — (connect) Minimum similarity threshold for link candidates
41
42
  - `--max N` — (connect) Maximum number of suggestions