maestro-flow 0.3.45 → 0.3.47

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 (289) hide show
  1. package/.claude/agents/ui-design-agent.md +1 -0
  2. package/.claude/agents/workflow-executor.md +3 -0
  3. package/.claude/commands/learn-decompose.md +91 -146
  4. package/.claude/commands/learn-follow.md +102 -137
  5. package/.claude/commands/learn-investigate.md +102 -167
  6. package/.claude/commands/learn-retro.md +100 -243
  7. package/.claude/commands/learn-second-opinion.md +95 -135
  8. package/.claude/commands/maestro-amend.md +95 -232
  9. package/.claude/commands/maestro-analyze.md +1 -6
  10. package/.claude/commands/maestro-collab.md +104 -265
  11. package/.claude/commands/maestro-composer.md +113 -293
  12. package/.claude/commands/maestro-execute.md +11 -17
  13. package/.claude/commands/maestro-impeccable.md +89 -0
  14. package/.claude/commands/maestro-plan.md +1 -6
  15. package/.claude/commands/maestro-player.md +111 -340
  16. package/.claude/commands/maestro-quick.md +9 -0
  17. package/.claude/commands/maestro-ralph-execute.md +167 -210
  18. package/.claude/commands/maestro-ralph.md +245 -426
  19. package/.claude/commands/maestro-tools-register.md +28 -7
  20. package/.claude/commands/maestro-ui-codify.md +13 -0
  21. package/.claude/commands/maestro-ui-craft.md +364 -0
  22. package/.claude/commands/maestro-ui-design.md +12 -1
  23. package/.claude/commands/maestro-verify.md +12 -13
  24. package/.claude/commands/maestro.md +142 -72
  25. package/.claude/commands/manage-knowhow-capture.md +45 -161
  26. package/.claude/commands/quality-auto-test.md +9 -0
  27. package/.claude/commands/quality-debug.md +11 -24
  28. package/.claude/commands/quality-refactor.md +9 -0
  29. package/.claude/commands/quality-review.md +5 -13
  30. package/.claude/commands/quality-test.md +5 -0
  31. package/.claude/commands/spec-add.md +1 -1
  32. package/.claude/commands/spec-load.md +3 -2
  33. package/.claude/skills/maestro-help/SKILL.md +264 -0
  34. package/.claude/skills/maestro-help/index/catalog.json +182 -0
  35. package/.claude/skills/maestro-help/phases/01-parse-intent.md +122 -0
  36. package/.claude/skills/maestro-help/phases/02-search-present.md +181 -0
  37. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  38. package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
  39. package/.codex/agents/team-supervisor.toml +40 -0
  40. package/.codex/agents/team-worker.toml +63 -0
  41. package/.codex/skills/learn-decompose/SKILL.md +1 -1
  42. package/.codex/skills/learn-investigate/SKILL.md +2 -1
  43. package/.codex/skills/maestro/SKILL.md +278 -313
  44. package/.codex/skills/maestro-analyze/SKILL.md +126 -417
  45. package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
  46. package/.codex/skills/maestro-collab/SKILL.md +134 -547
  47. package/.codex/skills/maestro-execute/SKILL.md +4 -2
  48. package/.codex/skills/maestro-help/SKILL.md +213 -0
  49. package/.codex/skills/maestro-help/catalog.json +182 -0
  50. package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
  51. package/.codex/skills/maestro-plan/SKILL.md +88 -437
  52. package/.codex/skills/maestro-player/SKILL.md +191 -333
  53. package/.codex/skills/maestro-quick/SKILL.md +2 -0
  54. package/.codex/skills/maestro-ralph/SKILL.md +307 -710
  55. package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
  56. package/.codex/skills/maestro-tools-register/SKILL.md +29 -7
  57. package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
  58. package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
  59. package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
  60. package/.codex/skills/maestro-verify/SKILL.md +116 -409
  61. package/.codex/skills/manage-knowhow-capture/SKILL.md +18 -3
  62. package/.codex/skills/quality-auto-test/SKILL.md +145 -443
  63. package/.codex/skills/quality-debug/SKILL.md +2 -1
  64. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  65. package/.codex/skills/quality-review/SKILL.md +1 -1
  66. package/.codex/skills/quality-test/SKILL.md +229 -507
  67. package/.codex/skills/spec-add/SKILL.md +1 -1
  68. package/README.md +4 -1
  69. package/README.zh-CN.md +3 -1
  70. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
  71. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  72. package/dashboard/dist-server/dashboard/src/server/index.js +5 -3
  73. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js +3 -3
  75. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js.map +1 -1
  76. package/dashboard/dist-server/dashboard/src/server/routes/index.js +14 -5
  77. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  78. package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
  79. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  80. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.d.ts +2 -0
  81. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js +181 -0
  82. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js.map +1 -0
  83. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
  84. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
  86. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +2 -0
  88. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +2 -0
  89. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  90. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.d.ts +2 -0
  91. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +58 -0
  92. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  93. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
  94. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  95. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
  96. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  97. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
  98. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +7 -2
  99. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +7 -1
  100. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
  101. package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
  102. package/dashboard/dist-server/dashboard/src/shared/constants.js +9 -9
  103. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  104. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.d.ts +113 -0
  105. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js +6 -0
  106. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js.map +1 -0
  107. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +4 -3
  108. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  109. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  110. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  111. package/dist/src/agents/cli-agent-runner.js +1 -3
  112. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  113. package/dist/src/agents/cli-history-store.d.ts +5 -0
  114. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  115. package/dist/src/agents/cli-history-store.js +65 -13
  116. package/dist/src/agents/cli-history-store.js.map +1 -1
  117. package/dist/src/cli.js +13 -0
  118. package/dist/src/cli.js.map +1 -1
  119. package/dist/src/commands/command-help.d.ts +3 -0
  120. package/dist/src/commands/command-help.d.ts.map +1 -0
  121. package/dist/src/commands/command-help.js +60 -0
  122. package/dist/src/commands/command-help.js.map +1 -0
  123. package/dist/src/commands/config.d.ts.map +1 -1
  124. package/dist/src/commands/config.js +17 -0
  125. package/dist/src/commands/config.js.map +1 -1
  126. package/dist/src/commands/delegate.d.ts.map +1 -1
  127. package/dist/src/commands/delegate.js +12 -2
  128. package/dist/src/commands/delegate.js.map +1 -1
  129. package/dist/src/commands/impeccable.d.ts +10 -0
  130. package/dist/src/commands/impeccable.d.ts.map +1 -0
  131. package/dist/src/commands/impeccable.js +181 -0
  132. package/dist/src/commands/impeccable.js.map +1 -0
  133. package/dist/src/commands/knowhow.d.ts.map +1 -1
  134. package/dist/src/commands/knowhow.js +7 -4
  135. package/dist/src/commands/knowhow.js.map +1 -1
  136. package/dist/src/commands/spec.js +1 -1
  137. package/dist/src/commands/spec.js.map +1 -1
  138. package/dist/src/commands/wiki.d.ts.map +1 -1
  139. package/dist/src/commands/wiki.js +5 -1
  140. package/dist/src/commands/wiki.js.map +1 -1
  141. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  142. package/dist/src/config/cli-tools-config.js +10 -7
  143. package/dist/src/config/cli-tools-config.js.map +1 -1
  144. package/dist/src/core/addon-registry.d.ts +31 -0
  145. package/dist/src/core/addon-registry.d.ts.map +1 -0
  146. package/dist/src/core/addon-registry.js +28 -0
  147. package/dist/src/core/addon-registry.js.map +1 -0
  148. package/dist/src/hooks/plugins/spec-injection-plugin.js +9 -4
  149. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  150. package/dist/src/hooks/spec-injector.js +2 -2
  151. package/dist/src/hooks/spec-injector.js.map +1 -1
  152. package/dist/src/index.d.ts +2 -0
  153. package/dist/src/index.d.ts.map +1 -1
  154. package/dist/src/index.js +1 -0
  155. package/dist/src/index.js.map +1 -1
  156. package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
  157. package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
  158. package/dist/src/tools/impeccable/critique-storage.js +120 -0
  159. package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
  160. package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
  161. package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
  162. package/dist/src/tools/impeccable/design-parser.js +696 -0
  163. package/dist/src/tools/impeccable/design-parser.js.map +1 -0
  164. package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
  165. package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
  166. package/dist/src/tools/impeccable/detect-csp.js +130 -0
  167. package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
  168. package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
  169. package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
  170. package/dist/src/tools/impeccable/is-generated.js +56 -0
  171. package/dist/src/tools/impeccable/is-generated.js.map +1 -0
  172. package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
  173. package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
  174. package/dist/src/tools/impeccable/live/accept.js +556 -0
  175. package/dist/src/tools/impeccable/live/accept.js.map +1 -0
  176. package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
  177. package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
  178. package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
  179. package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
  180. package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
  181. package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
  182. package/dist/src/tools/impeccable/live/complete.js +67 -0
  183. package/dist/src/tools/impeccable/live/complete.js.map +1 -0
  184. package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
  185. package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
  186. package/dist/src/tools/impeccable/live/completion.js +26 -0
  187. package/dist/src/tools/impeccable/live/completion.js.map +1 -0
  188. package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
  189. package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
  190. package/dist/src/tools/impeccable/live/inject.js +394 -0
  191. package/dist/src/tools/impeccable/live/inject.js.map +1 -0
  192. package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
  193. package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
  194. package/dist/src/tools/impeccable/live/poll.js +180 -0
  195. package/dist/src/tools/impeccable/live/poll.js.map +1 -0
  196. package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
  197. package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
  198. package/dist/src/tools/impeccable/live/resume.js +30 -0
  199. package/dist/src/tools/impeccable/live/resume.js.map +1 -0
  200. package/dist/src/tools/impeccable/live/server.d.ts +6 -0
  201. package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
  202. package/dist/src/tools/impeccable/live/server.js +867 -0
  203. package/dist/src/tools/impeccable/live/server.js.map +1 -0
  204. package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
  205. package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
  206. package/dist/src/tools/impeccable/live/session-store.js +281 -0
  207. package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
  208. package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
  209. package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
  210. package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
  211. package/dist/src/tools/impeccable/live/status.d.ts +2 -0
  212. package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
  213. package/dist/src/tools/impeccable/live/status.js +52 -0
  214. package/dist/src/tools/impeccable/live/status.js.map +1 -0
  215. package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
  216. package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
  217. package/dist/src/tools/impeccable/live/wrap.js +572 -0
  218. package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
  219. package/dist/src/tools/impeccable/load-context.d.ts +13 -0
  220. package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
  221. package/dist/src/tools/impeccable/load-context.js +79 -0
  222. package/dist/src/tools/impeccable/load-context.js.map +1 -0
  223. package/dist/src/tools/impeccable/paths.d.ts +34 -0
  224. package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
  225. package/dist/src/tools/impeccable/paths.js +102 -0
  226. package/dist/src/tools/impeccable/paths.js.map +1 -0
  227. package/dist/src/tools/spec-entry-parser.d.ts +1 -1
  228. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  229. package/dist/src/tools/spec-entry-parser.js +1 -1
  230. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  231. package/dist/src/tools/spec-init.d.ts.map +1 -1
  232. package/dist/src/tools/spec-init.js +26 -1
  233. package/dist/src/tools/spec-init.js.map +1 -1
  234. package/dist/src/tools/spec-loader.d.ts +1 -1
  235. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  236. package/dist/src/tools/spec-loader.js +2 -0
  237. package/dist/src/tools/spec-loader.js.map +1 -1
  238. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  239. package/dist/src/tools/store-knowhow.js +15 -6
  240. package/dist/src/tools/store-knowhow.js.map +1 -1
  241. package/package.json +5 -3
  242. package/workflows/claude-instructions.md +17 -5
  243. package/workflows/cli-tools-usage.md +10 -3
  244. package/workflows/delegate-usage.md +3 -2
  245. package/workflows/impeccable/adapt.md +190 -0
  246. package/workflows/impeccable/animate.md +175 -0
  247. package/workflows/impeccable/audit.md +133 -0
  248. package/workflows/impeccable/bolder.md +113 -0
  249. package/workflows/impeccable/brand.md +118 -0
  250. package/workflows/impeccable/clarify.md +174 -0
  251. package/workflows/impeccable/codex.md +105 -0
  252. package/workflows/impeccable/cognitive-load.md +106 -0
  253. package/workflows/impeccable/color-and-contrast.md +105 -0
  254. package/workflows/impeccable/colorize.md +154 -0
  255. package/workflows/impeccable/craft.md +123 -0
  256. package/workflows/impeccable/critique.md +261 -0
  257. package/workflows/impeccable/delight.md +302 -0
  258. package/workflows/impeccable/distill.md +111 -0
  259. package/workflows/impeccable/document.md +439 -0
  260. package/workflows/impeccable/extract.md +69 -0
  261. package/workflows/impeccable/harden.md +347 -0
  262. package/workflows/impeccable/heuristics-scoring.md +234 -0
  263. package/workflows/impeccable/interaction-design.md +195 -0
  264. package/workflows/impeccable/layout.md +141 -0
  265. package/workflows/impeccable/live.md +622 -0
  266. package/workflows/impeccable/motion-design.md +109 -0
  267. package/workflows/impeccable/onboard.md +234 -0
  268. package/workflows/impeccable/optimize.md +258 -0
  269. package/workflows/impeccable/overdrive.md +130 -0
  270. package/workflows/impeccable/personas.md +179 -0
  271. package/workflows/impeccable/polish.md +242 -0
  272. package/workflows/impeccable/product.md +62 -0
  273. package/workflows/impeccable/quieter.md +99 -0
  274. package/workflows/impeccable/responsive-design.md +114 -0
  275. package/workflows/impeccable/shape.md +165 -0
  276. package/workflows/impeccable/spatial-design.md +100 -0
  277. package/workflows/impeccable/teach.md +168 -0
  278. package/workflows/impeccable/typeset.md +124 -0
  279. package/workflows/impeccable/typography.md +159 -0
  280. package/workflows/impeccable/ux-writing.md +107 -0
  281. package/workflows/impeccable.md +164 -0
  282. package/workflows/maestro.md +7 -3
  283. package/workflows/skill-authoring.md +265 -0
  284. package/workflows/specs-add.md +3 -2
  285. package/workflows/specs-load.md +2 -1
  286. package/workflows/specs-setup.md +21 -1
  287. package/workflows/tools-spec.md +20 -13
  288. package/.claude/commands/maestro-link-coordinate.md +0 -71
  289. package/.codex/skills/maestro-link-coordinate/SKILL.md +0 -257
@@ -17,7 +17,7 @@ Codify reusable business processes as knowhow documents with `tool: true` in `.w
17
17
 
18
18
  When to register: during planning to standardize a business process (e.g. payment reconciliation, OAuth integration steps); after execution to capture a validated procedure (e.g. database migration rollback); before testing to register verification methods for test agents (e.g. E2E checkout flow, API idempotency verification); during retrospective/harvest to extract reusable process knowledge from artifacts.
19
19
 
20
- Three modes: Extract (from code/docs), Generate (from description), Optimize (improve existing).
20
+ Four modes: Extract (from code/docs), Generate (from description), Optimize (improve existing), Promote (existing knowhow → tool in place).
21
21
  Short processes (<10 steps) inline; long processes (>=10 steps) use ref mode with knowhow detail doc.
22
22
  </purpose>
23
23
 
@@ -34,6 +34,8 @@ $ARGUMENTS — Intent description
34
34
  /maestro-tools-register generate Stripe webhook idempotency verification
35
35
  /maestro-tools-register generate E2E checkout flow with payment gateway mock setup
36
36
  /maestro-tools-register optimize e2e-checkout tool
37
+ /maestro-tools-register promote RCP-db-migration-rollback as test tool
38
+ /maestro-tools-register promote knowhow-auth-api to coding tool
37
39
  ```
38
40
  </context>
39
41
 
@@ -44,6 +46,7 @@ $ARGUMENTS — Intent description
44
46
  Parse $ARGUMENTS to determine mode:
45
47
  - Contains "extract" → extract mode
46
48
  - Contains "optimize/improve" → optimize mode
49
+ - Contains "promote" or references existing knowhow doc (path/ID) → promote mode
47
50
  - Other → generate mode
48
51
  - Empty → ask user with AskUserQuestion
49
52
 
@@ -61,16 +64,34 @@ Parse $ARGUMENTS to determine mode:
61
64
  - Load existing tool: `maestro spec load --category coding --keyword <name>`
62
65
  - Analyze improvement points (step splitting, prerequisites, error handling)
63
66
 
67
+ **Promote mode** (existing knowhow → tool):
68
+ - Locate document: `maestro wiki list --keyword <name>` or by path in `.workflow/knowhow/`
69
+ - Read document, verify it contains actionable steps (numbered list or ## Steps section)
70
+ - If no actionable steps, suggest extract mode instead
71
+ - Determine category (Step 3) and summary ("Use when ...")
72
+ - Update frontmatter via: `maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "<summary>"}'`
73
+ - Do NOT recreate the document — modify in place
74
+
64
75
  **For all modes** — identify the usage timing: when should an agent or user invoke this tool? This becomes the first line of the entry description (see Step 5).
65
76
 
66
77
  ### Step 3: Determine Category
67
78
 
68
- Infer applicable category from context, or ask user:
69
- - coding — execution tools (build, deploy, integrate)
70
- - test testing tools (test flows, verification steps)
71
- - review — review tools (checklists, audit standards)
72
- - arch planning tools (design flows, analysis steps)
73
- - debug analysis tools (diagnostic flows, investigation steps)
79
+ **Core principle**: `category` = **who consumes this tool** (which agent type discovers and uses it), not what the content is about.
80
+
81
+ | Category | Consumer Agent | Decision Question | Signal Words |
82
+ |---|---|---|---|
83
+ | `coding` | code-developer, workflow-executor | 开发者实现时需要这个流程吗? | build, deploy, integrate, configure, setup, migrate, api-contract |
84
+ | `test` | tdd-developer, test-fix-agent | 测试者验证行为时需要这个流程吗? | verify, validate, assert, e2e, regression, coverage, idempotency |
85
+ | `review` | workflow-reviewer | 审查者需要这个作为 checklist 吗? | audit, checklist, compliance, quality-gate, standard |
86
+ | `arch` | workflow-planner | 规划者设计方案时需要这个吗? | design, architecture, decompose, trade-off, migration-strategy |
87
+ | `debug` | debug-explore-agent | 调试者排查问题时需要这个吗? | diagnose, trace, investigate, root-cause, reproduce |
88
+
89
+ **Multi-consumer split**: If content serves multiple consumers (e.g., API doc for both dev and test), split into separate documents:
90
+ - API contract (what endpoints look like) → `category: coding` (AST-*, tool: false)
91
+ - API verification steps (how to test) → `category: test` (RCP-*, tool: true)
92
+ - Ask user when ambiguous: "This tool content serves both developers and testers. Split into separate documents?"
93
+
94
+ **Ambiguous cases**: Choose the **primary consumer** — the agent that would fail without this knowledge.
74
95
 
75
96
  ### Step 4: Decide Inline vs Ref
76
97
 
@@ -41,6 +41,18 @@ Flags:
41
41
  </context>
42
42
 
43
43
  <execution>
44
+ ## 1. Load UI Specs
45
+
46
+ Load project UI conventions before extracting design system:
47
+
48
+ ```bash
49
+ maestro spec load --category ui
50
+ ```
51
+
52
+ If specs not initialized, continue without — the workflow still produces valid output.
53
+
54
+ ## 2. Execute Workflow
55
+
44
56
  Route to `~/.maestro/workflows/ui-codify.md` and follow completely.
45
57
 
46
58
  The workflow orchestrates 4 phases with deferred loading of phase-specific workflow files. Each phase reads its workflow file only when execution reaches that phase.
@@ -56,6 +68,7 @@ The workflow orchestrates 4 phases with deferred loading of phase-specific workf
56
68
  </error_codes>
57
69
 
58
70
  <success_criteria>
71
+ - [ ] UI specs loaded via `spec load --category ui` (if available)
59
72
  - [ ] Source path validated and file discovery completed
60
73
  - [ ] design-tokens.json generated with color, typography, spacing tokens
61
74
  - [ ] layout-templates.json generated with component patterns (universal/specialized)
@@ -0,0 +1,364 @@
1
+ ---
2
+ name: maestro-ui-craft
3
+ description: Chain maestro-impeccable commands with intelligent routing and quality gate loops for automated UI production
4
+ argument-hint: "<intent|target> [--chain build|improve|enhance|harden|live] [--enhance <cmd>] [--threshold <score>] [--max-loops <n>] [-y] [-c]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - Skill
14
+ - AskUserQuestion
15
+ - TodoWrite
16
+ ---
17
+ <purpose>
18
+ Orchestrate maestro-impeccable skill commands via intelligent intent routing + quality gate auto-iteration.
19
+ Chain: Build → Evaluate → Auto-Refine → Re-evaluate → Verify.
20
+
21
+ Core innovation: critique/audit scores drive automatic command selection and iteration loops.
22
+ Impeccable has 23 commands across 6 categories — this command chains them into automated pipelines
23
+ with quality gates that loop until design quality meets the threshold.
24
+
25
+ Prerequisite: maestro-impeccable skill available (auto-discovered by harness).
26
+
27
+ Session: `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
28
+ </purpose>
29
+
30
+ <invariants>
31
+ 1. **Session before execution** — status.json created before any chain step runs
32
+ 2. **All steps via Skill** — every impeccable command dispatched through `Skill({ skill: "maestro-impeccable" })`
33
+ 3. **Gate scores drive loops** — refine loop auto-selects commands from P0/P1 findings, never from hardcoded lists
34
+ 4. **Interactive gates respected** — teach, shape, craft retain their user gates; never suppress
35
+ </invariants>
36
+
37
+ <context>
38
+ $ARGUMENTS — intent description or target path, with optional flags.
39
+
40
+ **Keywords:** `continue`/`next` → resume previous session
41
+
42
+ **Flags:**
43
+ - `--chain <type>` — Force chain type: build, improve, enhance, harden, live
44
+ - `--enhance <cmd>` — Specific enhance command for enhance chain (animate|colorize|typeset|layout|delight|overdrive|bolder)
45
+ - `--threshold <score>` — Critique pass threshold (default: 26/40). Audit threshold auto-computed as threshold×0.5
46
+ - `--max-loops <n>` — Maximum quality gate iterations (default: 3)
47
+ - `-c` / `--continue` — Resume previous ui-craft session
48
+ - `-y` — Auto mode: auto-select at ambiguous routing, skip confirmations where impeccable allows
49
+ </context>
50
+
51
+ <chains>
52
+
53
+ ### Chain Definitions
54
+
55
+ | Chain | Sequence | Gate Condition |
56
+ |-------|----------|----------------|
57
+ | **build** | teach? → shape → craft → **critique** → [refine loop] → audit → polish | critique ≥ threshold AND P0 == 0 |
58
+ | **improve** | **critique** → [refine loop] → polish → audit | critique ≥ threshold AND P0 == 0 |
59
+ | **enhance** | {cmd} → **critique** → polish (if needed) | critique ≥ threshold |
60
+ | **harden** | harden → **audit** → polish | audit ≥ threshold×0.5 |
61
+ | **live** | live | — (interactive, no gate) |
62
+
63
+ - `teach?` — conditional: only if PRODUCT.md missing/placeholder
64
+ - `[refine loop]` — quality gate loop: extract suggested commands from critique → execute → re-critique
65
+
66
+ ### Intent → Chain Routing
67
+
68
+ | Intent Pattern | Chain |
69
+ |---------------|-------|
70
+ | 新建, create, build, new, 从零, landing, feature, page | build |
71
+ | 改进, improve, fix, 优化, iterate, better, 迭代 | improve |
72
+ | 动画, 颜色, 排版, animate, color, type, bold, delight, enhance | enhance |
73
+ | 生产, production, harden, 上线, ship, edge case, i18n | harden |
74
+ | 实时, live, browser, 浏览器, variant | live |
75
+
76
+ Explicit `--chain` overrides routing. Ambiguous + no `-y` → AskUserQuestion.
77
+
78
+ </chains>
79
+
80
+ <state_machine>
81
+
82
+ <states>
83
+ S_PARSE — 解析参数、意图分类、chain 选择 PERSIST: —
84
+ S_RESUME — 扫描已有 ui-craft session、恢复执行 PERSIST: —
85
+ S_SETUP — 加载 context、检查 PRODUCT.md PERSIST: —
86
+ S_CREATE — 创建 session + status.json PERSIST: session (全量)
87
+ S_CHAIN — 按序执行 chain 步骤 PERSIST: step progress, executed commands
88
+ S_GATE — 质量门控:解析评分、决策 PERSIST: scores, loop count
89
+ S_REFINE — 执行自动选取的 refine 命令 PERSIST: refine commands, loop state
90
+ S_REPORT — 最终报告 + 趋势 PERSIST: final scores, status
91
+ </states>
92
+
93
+ <transitions>
94
+
95
+ S_PARSE:
96
+ → S_RESUME WHEN: -c / --continue flag OR keyword "continue"/"next"
97
+ → S_SETUP WHEN: chain selected (explicit or routed)
98
+ → S_PARSE WHEN: ambiguous AND not -y DO: AskUserQuestion
99
+ → END WHEN: no intent AND no target → E002
100
+
101
+ S_RESUME:
102
+ → S_CHAIN WHEN: session found DO: A_LOCATE_SESSION
103
+ → S_FALLBACK WHEN: no session found → E005
104
+
105
+ S_SETUP:
106
+ → S_CREATE DO: A_LOAD_CONTEXT
107
+
108
+ S_CREATE:
109
+ → S_CHAIN DO: A_CREATE_SESSION
110
+
111
+ S_CHAIN:
112
+ → S_GATE WHEN: current step is gate command (critique/audit)
113
+ → S_CHAIN WHEN: step is normal command → execute → advance
114
+ → S_REPORT WHEN: all steps complete
115
+
116
+ S_GATE:
117
+ → S_CHAIN WHEN: PASS (score ≥ threshold AND P0 == 0) → advance to next step
118
+ → S_REFINE WHEN: FAIL (score < threshold OR P0 > 0)
119
+ → S_CHAIN WHEN: max loops exceeded → W002 → force advance
120
+
121
+ S_REFINE:
122
+ → S_GATE DO: execute auto-selected commands → re-run gate command
123
+ GUARD: loop_count < max_loops
124
+
125
+ S_REPORT:
126
+ → END DO: A_FINAL_REPORT
127
+
128
+ </transitions>
129
+
130
+ <actions>
131
+
132
+ ### A_LOCATE_SESSION
133
+
134
+ 1. Scan `.workflow/.maestro/ui-craft-*/status.json`, filter `status == "running"`, sort DESC
135
+ 2. Take most recent; load into context as current session
136
+ 3. Resume from `current_step` position
137
+
138
+ ### A_LOAD_CONTEXT
139
+
140
+ 1. Trigger impeccable context loading by invoking: `Skill({ skill: "maestro-impeccable", args: "teach" })`
141
+ - Impeccable's own setup will auto-discover and load PRODUCT.md / DESIGN.md
142
+ - If PRODUCT.md missing/placeholder, impeccable teach handles the interview
143
+ 2. If teach was not in the chain but PRODUCT.md is missing:
144
+ - Prepend `teach` to chain start
145
+ - Announce: W001
146
+ 3. Context is now in conversation for subsequent commands
147
+
148
+ ### A_CREATE_SESSION
149
+
150
+ 1. Read `.workflow/state.json` for project context (phase, milestone)
151
+ 2. Create `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`:
152
+ ```json
153
+ { "session_id": "ui-craft-{ts}", "source": "ui-craft", "intent": "...",
154
+ "chain_type": "build|improve|enhance|harden|live", "target": "...",
155
+ "auto_mode": false, "threshold": 26, "max_loops": 3,
156
+ "steps": [{ "index": 0, "command": "shape", "status": "pending" }],
157
+ "gate_history": [], "loop_count": 0,
158
+ "current_step": 0, "status": "running",
159
+ "created_at": "ISO-8601", "updated_at": "ISO-8601" }
160
+ ```
161
+ 3. Write status.json before executing any step
162
+
163
+ ### A_FINAL_REPORT
164
+
165
+ 1. Read critique trend if available (impeccable's critique persists snapshots automatically)
166
+ 2. Update status.json with `status: "completed"` and final scores
167
+ 3. Present summary table with scores, iterations, commands executed
168
+
169
+ </actions>
170
+
171
+ </state_machine>
172
+
173
+ <execution>
174
+
175
+ ## 1. Parse & Route
176
+
177
+ 1. If `-c` / `--continue` or keyword "continue"/"next" → S_RESUME
178
+ 2. If `--chain` present → use directly
179
+ 3. Otherwise → match $ARGUMENTS against intent patterns
180
+ 4. If `--enhance` present → chain = enhance, cmd = --enhance value
181
+ 5. For enhance chain without `--enhance` → infer from intent ("动画" → animate, "颜色" → colorize, etc.)
182
+ 6. Ambiguous + no `-y` → ask user to pick chain
183
+
184
+ Create TodoWrite with chain steps.
185
+
186
+ ## 2. Setup Context
187
+
188
+ 1. If chain starts with `teach` → execute it first, impeccable handles context loading internally
189
+ 2. Otherwise → invoke `Skill({ skill: "maestro-impeccable" })` with no args to trigger setup (context + register)
190
+ 3. If impeccable reports PRODUCT.md missing → prepend teach, execute, then resume
191
+
192
+ ## 3. Create Session
193
+
194
+ Write `.workflow/.maestro/ui-craft-{ts}/status.json` with chain steps before any execution.
195
+
196
+ ## 4. Execute Chain
197
+
198
+ For each step in chain, sequentially:
199
+
200
+ ```
201
+ ▸ Step {n}/{total}: /maestro-impeccable {command} {target}
202
+ ```
203
+
204
+ Execute via: `Skill({ skill: "maestro-impeccable", args: "{command} {target}" })`
205
+
206
+ After each step: update status.json `current_step` and step `status`.
207
+
208
+ **Rules:**
209
+ - `teach`, `shape`, `craft` are interactive — do NOT suppress their user gates
210
+ - After `teach` completes → re-run context loader for fresh PRODUCT.md
211
+ - After `craft` completes → the build exists, ready for evaluation
212
+ - Gate steps (critique/audit) → transition to quality gate logic
213
+
214
+ ## 5. Quality Gate
215
+
216
+ When chain reaches a gate step (critique or audit):
217
+
218
+ ### 5a. Execute Gate Command
219
+
220
+ ```
221
+ Skill({ skill: "maestro-impeccable", args: "critique {target}" })
222
+ ```
223
+ or
224
+ ```
225
+ Skill({ skill: "maestro-impeccable", args: "audit {target}" })
226
+ ```
227
+
228
+ ### 5b. Parse Score
229
+
230
+ From critique output, extract:
231
+ - **score**: Nielsen's total (N/40) — from "**Total** | | **N/40**" row
232
+ - **P0_count**: count of `[P0]` tagged findings
233
+ - **P1_count**: count of `[P1]` tagged findings
234
+ - **suggested_commands**: list of "/maestro-impeccable <cmd>" from "Suggested command" fields
235
+
236
+ From audit output, extract:
237
+ - **score**: dimension total (N/20) — from "**Total** | | **N/20**" row
238
+ - **P0_count**: count of `[P0]` findings
239
+
240
+ ### 5c. Evaluate
241
+
242
+ ```
243
+ critique_pass = (score >= threshold) AND (P0_count == 0)
244
+ audit_pass = (score >= threshold * 0.5) AND (P0_count == 0)
245
+ ```
246
+
247
+ ### 5d. On PASS
248
+
249
+ ```
250
+ ✓ Gate passed: {score}/{max} (P0: 0)
251
+ ```
252
+ → advance to next chain step
253
+
254
+ ### 5e. On FAIL
255
+
256
+ ```
257
+ ⟳ Loop {n}/{max_loops}: {score}/{max}, P0={count}
258
+ Running: {command_list}
259
+ ```
260
+
261
+ 1. Collect suggested commands from P0/P1 findings
262
+ 2. If no suggestions found → use fallback mapping (see quality_gate_routing)
263
+ 3. De-duplicate, cap at 3 commands per iteration
264
+ 4. Sort: P0-suggested first
265
+ 5. Execute each: `Skill({ skill: "maestro-impeccable", args: "{cmd} {target}" })`
266
+ - Pass issue context: the specific findings that triggered this command are already in conversation
267
+ 6. Re-run gate command (critique/audit)
268
+ 7. Increment loop_count
269
+ 8. Append to status.json `gate_history`
270
+
271
+ ### 5f. On Max Loops Exceeded
272
+
273
+ ```
274
+ ⚠ Max iterations ({max_loops}) reached. Score: {score}/{max}, P0: {count}
275
+ Continuing chain with remaining issues.
276
+ ```
277
+ → force advance to next chain step
278
+
279
+ ## 6. Final Report
280
+
281
+ ```
282
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
283
+ Chain complete: {chain_type}
284
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
285
+
286
+ Critique : {score}/40 (trend: {trend_line})
287
+ Audit : {score}/20
288
+ Loops : {total_iterations}
289
+ Commands : {executed_command_list}
290
+
291
+ Status : {PASS | PARTIAL — N issues remain}
292
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
293
+ ```
294
+
295
+ Update status.json: `status: "completed"`, `final_scores`, `completed_at`.
296
+
297
+ If issues remain → suggest: "Run `/maestro-ui-craft --chain improve {target}` to continue iteration."
298
+
299
+ </execution>
300
+
301
+ <quality_gate_routing>
302
+
303
+ ### Finding → Command Fallback Mapping
304
+
305
+ When critique/audit findings lack explicit "Suggested command", map by category:
306
+
307
+ | Finding Category | Command |
308
+ |-----------------|---------|
309
+ | Visual hierarchy, layout, spacing, alignment | layout |
310
+ | Color, contrast, palette, monochromatic | colorize |
311
+ | Typography, font, readability, hierarchy | typeset |
312
+ | Animation, motion, transitions, micro-interaction | animate |
313
+ | Copy, labels, error messages, UX writing | clarify |
314
+ | Responsive, mobile, breakpoints, touch targets | adapt |
315
+ | Performance, loading, speed, bundle, jank | optimize |
316
+ | Complexity, overload, clutter, cognitive load | distill |
317
+ | Bland, safe, generic, lacks personality | bolder |
318
+ | Aggressive, overwhelming, loud, overstimulating | quieter |
319
+ | Onboarding, empty state, first-run, activation | onboard |
320
+ | Edge cases, i18n, error handling, overflow | harden |
321
+ | Personality, memorability, joy, delight | delight |
322
+
323
+ ### Commands Never Auto-Selected
324
+
325
+ These are structural/interactive — never picked by the refine loop:
326
+
327
+ | Command | Reason |
328
+ |---------|--------|
329
+ | teach | Project setup (run in S_SETUP only) |
330
+ | shape | Requires user interview |
331
+ | craft | Full build with multiple gates |
332
+ | live | Interactive browser mode |
333
+ | document | Generates DESIGN.md (setup) |
334
+ | extract | Design system extraction (setup) |
335
+ | overdrive | Requires explicit user vision |
336
+ | critique | Gate command, not a fix |
337
+ | audit | Gate command, not a fix |
338
+
339
+ </quality_gate_routing>
340
+
341
+ <error_codes>
342
+ | Code | Severity | Description |
343
+ |------|----------|-------------|
344
+ | E001 | error | Impeccable skill not found in project |
345
+ | E002 | error | No intent or target specified |
346
+ | E003 | error | Invalid --chain type |
347
+ | E004 | error | Invalid --enhance command |
348
+ | E005 | error | Resume session not found |
349
+ | W001 | warning | PRODUCT.md missing, prepending teach to chain |
350
+ | W002 | warning | Max quality gate loops exceeded, forcing continue |
351
+ | W003 | warning | Could not parse score from critique/audit output |
352
+ </error_codes>
353
+
354
+ <success_criteria>
355
+ - [ ] Intent classified and chain type selected
356
+ - [ ] Context loaded (PRODUCT.md present or taught)
357
+ - [ ] Session dir created with status.json before execution
358
+ - [ ] All chain steps executed via Skill("maestro-impeccable", ...)
359
+ - [ ] Quality gate evaluated with parsed scores
360
+ - [ ] Refine loop executed when gate failed (if applicable)
361
+ - [ ] Gate history and scores persisted to status.json
362
+ - [ ] Final report with scores and trend presented
363
+ - [ ] Progress tracked via TodoWrite throughout
364
+ </success_criteria>
@@ -40,7 +40,17 @@ Flags, workflow routing, scope modes, and output artifacts defined in the routed
40
40
  </context>
41
41
 
42
42
  <execution>
43
- ## Workflow Routing
43
+ ## 1. Load UI Specs
44
+
45
+ Load project UI conventions before generating designs:
46
+
47
+ ```bash
48
+ maestro spec load --category ui
49
+ ```
50
+
51
+ If specs not initialized, continue without — the workflow still produces valid output.
52
+
53
+ ## 2. Workflow Routing
44
54
 
45
55
  Detect ui-ux-pro-max skill availability and route to the appropriate workflow:
46
56
 
@@ -71,6 +81,7 @@ Skill detection logic, report format, and complete pipeline steps defined in the
71
81
 
72
82
  <success_criteria>
73
83
  **Both paths (common):**
84
+ - [ ] UI specs loaded via `spec load --category ui` (if available)
74
85
  - [ ] Requirements extracted from phase context (context.md, brainstorm, spec, or user input)
75
86
  - [ ] N style variants generated with contrasting design directions
76
87
  - [ ] User selected preferred variant (or auto-selected in -y mode)
@@ -42,8 +42,12 @@ Flags (`--skip-tests`, `--skip-antipattern`, `--dir`), scope routing, output pat
42
42
  ### Pre-load context (before verification)
43
43
 
44
44
  1. **Codebase docs**: If `.workflow/codebase/` exists, read `ARCHITECTURE.md` for expected module wiring and `FEATURES.md` for component mapping. Use in Layer 3 (Connection) checks.
45
- 2. **Wiki constraints**: Run `maestro wiki search "architecture constraint" --json 2>/dev/null`. If results found, include documented invariants as additional truth checks in Layer 1.
46
- 3. Both are optional proceed without if unavailable.
45
+ 2. **Review specs**: Run `maestro spec load --category review` to load review standards. Use as quality baseline for anti-pattern scan and constraint checks.
46
+ 3. **Wiki constraints**: Run `maestro wiki search "architecture constraint" --json 2>/dev/null`. If results found, include documented invariants as additional truth checks in Layer 1.
47
+ 4. **Role Knowledge**:
48
+ - Browse: `maestro wiki list --category review`
49
+ - Load task-relevant entries: `maestro wiki load <id1> [id2...]`
50
+ 5. All are optional — proceed without if unavailable.
47
51
  </context>
48
52
 
49
53
  <execution>
@@ -51,18 +55,13 @@ Follow '~/.maestro/workflows/verify.md' completely.
51
55
 
52
56
  ### Post-verify Knowledge Inquiry
53
57
 
54
- After verification completes, evaluate inquiry triggers:
58
+ | Condition | Ask | Route |
59
+ |-----------|-----|-------|
60
+ | Anti-pattern blockers found (TODO/FIXME/stubs) | "Update quality-rules.md?" | spec-add quality |
61
+ | Architecture constraint violations | "Update architecture-constraints.md?" | spec-add arch |
62
+ | Recurring test coverage gap (same module across tasks) | "Add to test-conventions.md?" | spec-add test |
55
63
 
56
- 1. **Anti-pattern detection**: If anti-pattern scan found blockers (TODO/FIXME, stubs, empty returns):
57
- → Ask: "Verification found {N} anti-patterns. Should `quality-rules.md` be updated to enforce these checks? (`/spec-add quality`)"
58
-
59
- 2. **Constraint violation**: If Goal-Backward check found constraint_violations or missing wiring:
60
- → Ask: "Verification found architecture constraint violations. Should `architecture-constraints.md` be updated? (`/spec-add arch`)"
61
-
62
- 3. **Test coverage gaps**: If Nyquist gaps found with recurring pattern (same module/type across tasks):
63
- → Ask: "Persistent test coverage gap detected in {module}. Should it be added to `test-conventions.md` as a required test area? (`/spec-add test`)"
64
-
65
- If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })`.
64
+ On confirm `Skill("spec-add", "<category> <content>")`.
66
65
 
67
66
  **Next-step routing on completion:**
68
67
  - All checks pass, no gaps → /quality-review