maestro-flow 0.3.46 → 0.3.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) 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 +10 -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-ui-codify.md +13 -0
  20. package/.claude/commands/maestro-ui-craft.md +364 -0
  21. package/.claude/commands/maestro-ui-design.md +12 -1
  22. package/.claude/commands/maestro-verify.md +12 -13
  23. package/.claude/commands/maestro.md +142 -72
  24. package/.claude/commands/manage-knowhow-capture.md +45 -170
  25. package/.claude/commands/quality-auto-test.md +9 -0
  26. package/.claude/commands/quality-debug.md +11 -25
  27. package/.claude/commands/quality-refactor.md +9 -0
  28. package/.claude/commands/quality-review.md +5 -14
  29. package/.claude/commands/spec-add.md +1 -1
  30. package/.claude/commands/spec-load.md +3 -2
  31. package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
  32. package/.codex/skills/learn-decompose/SKILL.md +1 -1
  33. package/.codex/skills/learn-investigate/SKILL.md +2 -1
  34. package/.codex/skills/maestro/SKILL.md +420 -313
  35. package/.codex/skills/maestro-analyze/SKILL.md +126 -417
  36. package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
  37. package/.codex/skills/maestro-collab/SKILL.md +134 -547
  38. package/.codex/skills/maestro-execute/SKILL.md +3 -1
  39. package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
  40. package/.codex/skills/maestro-plan/SKILL.md +88 -437
  41. package/.codex/skills/maestro-player/SKILL.md +191 -333
  42. package/.codex/skills/maestro-quick/SKILL.md +2 -0
  43. package/.codex/skills/maestro-ralph/SKILL.md +327 -710
  44. package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
  45. package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
  46. package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
  47. package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
  48. package/.codex/skills/maestro-verify/SKILL.md +116 -409
  49. package/.codex/skills/quality-auto-test/SKILL.md +145 -443
  50. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  51. package/.codex/skills/quality-test/SKILL.md +229 -517
  52. package/.codex/skills/spec-add/SKILL.md +1 -1
  53. package/README.md +4 -1
  54. package/README.zh-CN.md +3 -1
  55. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
  56. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  57. package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
  58. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  59. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
  60. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  61. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
  62. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  63. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
  64. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  65. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
  66. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  67. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
  68. package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
  69. package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
  70. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  71. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  72. package/dist/src/agents/cli-agent-runner.js +1 -3
  73. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  74. package/dist/src/agents/cli-history-store.d.ts +5 -0
  75. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  76. package/dist/src/agents/cli-history-store.js +65 -13
  77. package/dist/src/agents/cli-history-store.js.map +1 -1
  78. package/dist/src/cli.js +13 -0
  79. package/dist/src/cli.js.map +1 -1
  80. package/dist/src/commands/command-help.d.ts +3 -0
  81. package/dist/src/commands/command-help.d.ts.map +1 -0
  82. package/dist/src/commands/command-help.js +60 -0
  83. package/dist/src/commands/command-help.js.map +1 -0
  84. package/dist/src/commands/config.d.ts.map +1 -1
  85. package/dist/src/commands/config.js +17 -0
  86. package/dist/src/commands/config.js.map +1 -1
  87. package/dist/src/commands/delegate.d.ts.map +1 -1
  88. package/dist/src/commands/delegate.js +12 -2
  89. package/dist/src/commands/delegate.js.map +1 -1
  90. package/dist/src/commands/impeccable.d.ts +10 -0
  91. package/dist/src/commands/impeccable.d.ts.map +1 -0
  92. package/dist/src/commands/impeccable.js +181 -0
  93. package/dist/src/commands/impeccable.js.map +1 -0
  94. package/dist/src/commands/spec.js +1 -1
  95. package/dist/src/commands/spec.js.map +1 -1
  96. package/dist/src/commands/wiki.d.ts.map +1 -1
  97. package/dist/src/commands/wiki.js +5 -1
  98. package/dist/src/commands/wiki.js.map +1 -1
  99. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  100. package/dist/src/config/cli-tools-config.js +10 -7
  101. package/dist/src/config/cli-tools-config.js.map +1 -1
  102. package/dist/src/core/addon-registry.d.ts +31 -0
  103. package/dist/src/core/addon-registry.d.ts.map +1 -0
  104. package/dist/src/core/addon-registry.js +28 -0
  105. package/dist/src/core/addon-registry.js.map +1 -0
  106. package/dist/src/hooks/plugins/spec-injection-plugin.js +2 -0
  107. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  108. package/dist/src/hooks/spec-injector.js +2 -2
  109. package/dist/src/hooks/spec-injector.js.map +1 -1
  110. package/dist/src/index.d.ts +2 -0
  111. package/dist/src/index.d.ts.map +1 -1
  112. package/dist/src/index.js +1 -0
  113. package/dist/src/index.js.map +1 -1
  114. package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
  115. package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
  116. package/dist/src/tools/impeccable/critique-storage.js +120 -0
  117. package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
  118. package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
  119. package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
  120. package/dist/src/tools/impeccable/design-parser.js +696 -0
  121. package/dist/src/tools/impeccable/design-parser.js.map +1 -0
  122. package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
  123. package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
  124. package/dist/src/tools/impeccable/detect-csp.js +130 -0
  125. package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
  126. package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
  127. package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
  128. package/dist/src/tools/impeccable/is-generated.js +56 -0
  129. package/dist/src/tools/impeccable/is-generated.js.map +1 -0
  130. package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
  131. package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
  132. package/dist/src/tools/impeccable/live/accept.js +556 -0
  133. package/dist/src/tools/impeccable/live/accept.js.map +1 -0
  134. package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
  135. package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
  136. package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
  137. package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
  138. package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
  139. package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
  140. package/dist/src/tools/impeccable/live/complete.js +67 -0
  141. package/dist/src/tools/impeccable/live/complete.js.map +1 -0
  142. package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
  143. package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
  144. package/dist/src/tools/impeccable/live/completion.js +26 -0
  145. package/dist/src/tools/impeccable/live/completion.js.map +1 -0
  146. package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
  147. package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
  148. package/dist/src/tools/impeccable/live/inject.js +394 -0
  149. package/dist/src/tools/impeccable/live/inject.js.map +1 -0
  150. package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
  151. package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
  152. package/dist/src/tools/impeccable/live/poll.js +180 -0
  153. package/dist/src/tools/impeccable/live/poll.js.map +1 -0
  154. package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
  155. package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
  156. package/dist/src/tools/impeccable/live/resume.js +30 -0
  157. package/dist/src/tools/impeccable/live/resume.js.map +1 -0
  158. package/dist/src/tools/impeccable/live/server.d.ts +6 -0
  159. package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
  160. package/dist/src/tools/impeccable/live/server.js +867 -0
  161. package/dist/src/tools/impeccable/live/server.js.map +1 -0
  162. package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
  163. package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
  164. package/dist/src/tools/impeccable/live/session-store.js +281 -0
  165. package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
  166. package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
  167. package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
  168. package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
  169. package/dist/src/tools/impeccable/live/status.d.ts +2 -0
  170. package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
  171. package/dist/src/tools/impeccable/live/status.js +52 -0
  172. package/dist/src/tools/impeccable/live/status.js.map +1 -0
  173. package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
  174. package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
  175. package/dist/src/tools/impeccable/live/wrap.js +572 -0
  176. package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
  177. package/dist/src/tools/impeccable/load-context.d.ts +13 -0
  178. package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
  179. package/dist/src/tools/impeccable/load-context.js +79 -0
  180. package/dist/src/tools/impeccable/load-context.js.map +1 -0
  181. package/dist/src/tools/impeccable/paths.d.ts +34 -0
  182. package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
  183. package/dist/src/tools/impeccable/paths.js +102 -0
  184. package/dist/src/tools/impeccable/paths.js.map +1 -0
  185. package/dist/src/tools/spec-entry-parser.d.ts +1 -1
  186. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  187. package/dist/src/tools/spec-entry-parser.js +1 -1
  188. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  189. package/dist/src/tools/spec-init.d.ts.map +1 -1
  190. package/dist/src/tools/spec-init.js +26 -1
  191. package/dist/src/tools/spec-init.js.map +1 -1
  192. package/dist/src/tools/spec-loader.d.ts +1 -1
  193. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  194. package/dist/src/tools/spec-loader.js +2 -0
  195. package/dist/src/tools/spec-loader.js.map +1 -1
  196. package/package.json +2 -2
  197. package/workflows/claude-instructions.md +17 -5
  198. package/workflows/cli-tools-usage.md +10 -3
  199. package/workflows/delegate-usage.md +3 -2
  200. package/workflows/impeccable/adapt.md +190 -0
  201. package/workflows/impeccable/animate.md +175 -0
  202. package/workflows/impeccable/audit.md +133 -0
  203. package/workflows/impeccable/bolder.md +113 -0
  204. package/workflows/impeccable/brand.md +118 -0
  205. package/workflows/impeccable/clarify.md +174 -0
  206. package/workflows/impeccable/codex.md +105 -0
  207. package/workflows/impeccable/cognitive-load.md +106 -0
  208. package/workflows/impeccable/color-and-contrast.md +105 -0
  209. package/workflows/impeccable/colorize.md +154 -0
  210. package/workflows/impeccable/craft.md +123 -0
  211. package/workflows/impeccable/critique.md +261 -0
  212. package/workflows/impeccable/delight.md +302 -0
  213. package/workflows/impeccable/distill.md +111 -0
  214. package/workflows/impeccable/document.md +439 -0
  215. package/workflows/impeccable/extract.md +69 -0
  216. package/workflows/impeccable/harden.md +347 -0
  217. package/workflows/impeccable/heuristics-scoring.md +234 -0
  218. package/workflows/impeccable/interaction-design.md +195 -0
  219. package/workflows/impeccable/layout.md +141 -0
  220. package/workflows/impeccable/live.md +622 -0
  221. package/workflows/impeccable/motion-design.md +109 -0
  222. package/workflows/impeccable/onboard.md +234 -0
  223. package/workflows/impeccable/optimize.md +258 -0
  224. package/workflows/impeccable/overdrive.md +130 -0
  225. package/workflows/impeccable/personas.md +179 -0
  226. package/workflows/impeccable/polish.md +242 -0
  227. package/workflows/impeccable/product.md +62 -0
  228. package/workflows/impeccable/quieter.md +99 -0
  229. package/workflows/impeccable/responsive-design.md +114 -0
  230. package/workflows/impeccable/shape.md +165 -0
  231. package/workflows/impeccable/spatial-design.md +100 -0
  232. package/workflows/impeccable/teach.md +168 -0
  233. package/workflows/impeccable/typeset.md +124 -0
  234. package/workflows/impeccable/typography.md +159 -0
  235. package/workflows/impeccable/ux-writing.md +107 -0
  236. package/workflows/impeccable.md +164 -0
  237. package/workflows/maestro.md +7 -3
  238. package/workflows/skill-authoring.md +265 -0
  239. package/workflows/specs-add.md +3 -2
  240. package/workflows/specs-load.md +2 -1
  241. package/workflows/specs-setup.md +21 -1
@@ -14,108 +14,178 @@ allowed-tools:
14
14
  - TodoWrite
15
15
  ---
16
16
  <purpose>
17
- Orchestrate all maestro commands automatically based on user intent and current project state.
18
- Two routing modes:
19
- 1. **Intent-based**: User describes a goal → classify task type → select/compose command chain → confirm → execute
20
- 2. **State-based**: Read .workflow/state.json → determine next logical step → suggest/execute (triggered by `continue`/`next`)
17
+ Orchestrate all maestro commands based on user intent and project state.
18
+ Classify intent → select chain → create session → dispatch to `maestro-ralph-execute`.
21
19
 
22
- Per-step type selection (default: auto):
23
- - **skill**: Execute via Skill() in current session output visible in conversation, synchronous, user can intervene
24
- - **cli**: Heavy execution steps via CLI delegate context isolation, template-driven prompts
20
+ Entry points:
21
+ - **`/maestro "intent"`**Intent-based: classify chain execute
22
+ - **`/maestro -c`**Resume previous session
23
+ - **`/maestro --dry-run "intent"`** — Show chain, no execution
24
+ - **`/maestro --super "intent"`** — Production-ready mode (read maestro-super.md)
25
25
 
26
- Produces session directory at `.workflow/.maestro/{session_id}/` with status.json tracking chain progress.
27
- Dispatches to unified executor (`maestro-ralph-execute`) for sequential step execution with artifact propagation.
26
+ Session: `.workflow/.maestro/{session_id}/status.json`
28
27
  </purpose>
29
28
 
30
29
  <deferred_reading>
31
- - [maestro.md](~/.maestro/workflows/maestro.md) — read at execution start (Steps 1-3: intent analysis, chain selection, session setup; Step 4 dispatches to unified executor)
32
- - [maestro-super.md](~/.maestro/workflows/maestro-super.md) — read when `--super` flag is active
30
+ - [maestro.md](~/.maestro/workflows/maestro.md) — read at execution start for intent analysis + chain selection
31
+ - [maestro-super.md](~/.maestro/workflows/maestro-super.md) — read when `--super` flag active
33
32
  </deferred_reading>
34
33
 
35
34
  <context>
36
35
  $ARGUMENTS — user intent text, or special keywords.
37
36
 
38
- **Special keywords:**
39
- - `continue` / `next` / `go` — State-based routing: read state.json, determine next step, execute
40
- - `status` — Shortcut to Skill({ skill: "manage-status" })
37
+ **Keywords:** `continue`/`next`/`go` → state-based routing; `status` → `Skill("manage-status")`
41
38
 
42
39
  **Flags:**
43
- - `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors. Propagates to downstream commands that support it.
44
- - `-c` / `--continue` — Resume previous coordinator session from `.workflow/.maestro/*/status.json`
45
- - `--dry-run` — Show planned chain without executing
46
- - `--exec <mode>` — Execution engine: `auto` (default), `cli`, `internal`. `internal` = Skill() in current session; `cli` = delegate to external CLI. Auto selects per step based on command complexity.
47
- - `--tool <name>` — CLI tool for delegate execution (default: claude). Only used when engine=cli.
48
- - `--super` — Super mode: deliver production-ready complete software system. See Super Mode section below.
49
-
50
- **State files read:**
51
- - `.workflow/state.json` — project state machine + artifact registry
52
- - `.workflow/roadmap.md` — milestone/phase structure
53
- - `.workflow/scratch/*/plan.json` — plan metadata (via artifact registry paths)
40
+ - `-y` / `--yes` — Auto mode: skip clarification, skip confirmation, auto-skip on errors
41
+ - `-c` / `--continue` — Resume previous session
42
+ - `--dry-run` — Show chain without executing
43
+ - `--exec <mode>` — `auto` (default), `cli`, `internal`
44
+ - `--tool <name>` — CLI tool for delegates (default: claude)
45
+ - `--super` — Read and follow `maestro-super.md`
54
46
  </context>
55
47
 
56
- <execution>
57
- **Resume mode (`-c`):** Skip selection workflow entirely — scan `.workflow/.maestro/` for latest session, then `Skill({ skill: "maestro-ralph-execute" })`. The unified executor discovers the running session and resumes from the next pending step. **End.**
48
+ <invariants>
49
+ 1. **All chains dispatch via maestro-ralph-execute** maestro never executes steps directly
50
+ 2. **Session before execution** — status.json created before any step runs
51
+ 3. **Auto flags only to supporting commands** — unlisted commands execute as-is
52
+ </invariants>
58
53
 
59
- **Normal mode:** Read `~/.maestro/workflows/maestro.md` from deferred_reading, then follow it completely.
54
+ <state_machine>
60
55
 
61
- **Auto mode (`-y`) propagation:**
56
+ <states>
57
+ S_PARSE — 解析参数、检测 flags PERSIST: —
58
+ S_RESUME — 扫描已有 session、恢复执行 PERSIST: —
59
+ S_CLASSIFY — 意图分类、chain 选择 PERSIST: —
60
+ S_CREATE — 创建 session + status.json PERSIST: session (全量)
61
+ S_DRY_RUN — 显示 chain 后结束 PERSIST: —
62
+ S_CONFIRM — 用户确认(auto_mode 跳过) PERSIST: —
63
+ S_DISPATCH — 移交 maestro-ralph-execute PERSIST: —
64
+ S_FALLBACK — 意图无法分类、请求输入 PERSIST: —
65
+ </states>
62
66
 
63
- When `-y` is active, maestro propagates auto flags to downstream commands. Only commands that explicitly support auto mode receive the flag — others execute normally (no forced flags).
67
+ <transitions>
68
+
69
+ S_PARSE:
70
+ → S_RESUME WHEN: -c / --continue flag
71
+ → S_CLASSIFY WHEN: intent text present
72
+ → S_CLASSIFY WHEN: keyword "continue"/"next"/"go" DO: A_STATE_BASED_ROUTE
73
+ → S_FALLBACK WHEN: no intent AND no flags
74
+
75
+ S_RESUME:
76
+ → S_DISPATCH WHEN: session found DO: A_LOCATE_SESSION
77
+ → S_FALLBACK WHEN: no session found
78
+
79
+ S_CLASSIFY:
80
+ → S_CREATE WHEN: chain resolved DO: A_CLASSIFY_INTENT
81
+ → S_FALLBACK WHEN: no match AND auto_mode
82
+ → S_CLASSIFY WHEN: no match AND not auto_mode DO: A_CLARIFY
83
+ GUARD: max 2 clarification rounds → S_FALLBACK
84
+
85
+ S_CREATE:
86
+ → S_DRY_RUN WHEN: --dry-run flag DO: A_CREATE_SESSION
87
+ → S_CONFIRM WHEN: not auto_mode DO: A_CREATE_SESSION
88
+ → S_DISPATCH WHEN: auto_mode DO: A_CREATE_SESSION
89
+
90
+ S_DRY_RUN:
91
+ → END DO: display chain with step types
92
+
93
+ S_CONFIRM:
94
+ → S_DISPATCH WHEN: user confirms
95
+ → S_PARSE WHEN: user wants to modify
96
+ → END WHEN: user cancels
97
+
98
+ S_DISPATCH:
99
+ → END DO: Skill({ skill: "maestro-ralph-execute" })
100
+
101
+ S_FALLBACK:
102
+ → S_CLASSIFY WHEN: user provides new intent DO: AskUserQuestion
103
+ → END WHEN: user cancels
104
+
105
+ </transitions>
106
+
107
+ <actions>
108
+
109
+ ### A_STATE_BASED_ROUTE
110
+
111
+ 1. Read `.workflow/state.json` → determine next logical step
112
+ 2. Convert to equivalent intent for chain classification
113
+
114
+ ### A_LOCATE_SESSION
115
+
116
+ 1. Scan `.workflow/.maestro/*/status.json`, filter `status == "running"`, sort DESC
117
+ 2. Take most recent; if not found → S_FALLBACK
118
+
119
+ ### A_CLASSIFY_INTENT
120
+
121
+ 1. Read `~/.maestro/workflows/maestro.md` from deferred_reading
122
+ 2. Classify intent via keyword heuristics + detectTaskType/detectNextAction
123
+ 3. Select/compose command chain from chainMap
124
+ 4. Determine per-step type: `internal` (Skill) or `external` (delegate)
125
+
126
+ ### A_CLARIFY
127
+
128
+ 1. `AskUserQuestion` with parsed intent + available chain options
129
+ 2. Re-classify with user response
130
+
131
+ ### A_CREATE_SESSION
132
+
133
+ 1. Read `.workflow/state.json` for project context (phase, milestone)
134
+ 2. Create `.workflow/.maestro/maestro-{YYYYMMDD-HHMMSS}/status.json`:
135
+ ```json
136
+ { "session_id", "source": "maestro", "intent", "task_type", "chain_name",
137
+ "phase", "milestone", "auto_mode", "exec_mode", "cli_tool",
138
+ "context": { ... }, "steps": [{ "index", "skill", "args", "type", "status": "pending" }],
139
+ "waves": [], "current_step": 0, "status": "running" }
140
+ ```
141
+ 3. Initialize tracking: `create_goal`, `update_plan`
142
+ 4. If `--super`: read `maestro-super.md`, follow it completely
143
+
144
+ </actions>
145
+
146
+ </state_machine>
147
+
148
+ <appendix>
149
+
150
+ ### Auto-Yes Flag Map
64
151
 
65
152
  | Command | Auto Flag | Effect |
66
153
  |---------|-----------|--------|
67
154
  | maestro-init | `-y` | Skip interactive questioning |
68
- | maestro-analyze | `-y` | Skip interactive scoping, auto-deepen |
69
- | maestro-brainstorm | `-y` | Skip interactive questions, use defaults |
70
- | maestro-roadmap | `-y` | Skip interactive questions, use defaults (create/revise/review) |
71
- | maestro-ui-design | `-y` | Skip interactive selection, pick top variant |
155
+ | maestro-analyze | `-y` | Skip scoping, auto-deepen |
156
+ | maestro-brainstorm | `-y` | Skip questions, use defaults |
157
+ | maestro-roadmap | `-y` | Skip questions (create/revise/review) |
158
+ | maestro-ui-design | `-y` | Skip selection, pick top variant |
72
159
  | maestro-plan | `-y` | Skip confirmations and clarification |
73
160
  | maestro-execute | `-y` | Skip confirmations, blocked auto-continue |
74
- | maestro-verify | *(none)* | No interactive prompts |
75
161
  | quality-auto-test | `-y` | Skip plan confirmation |
76
- | quality-review | *(none)* | No interactive prompts, auto-detects level |
77
- | quality-test | `-y --auto-fix` | Auto-trigger gap-fix loop on failures |
78
- | quality-debug | *(none)* | No interactive prompts |
79
- | quality-retrospective | `-y` | Accept all routing recommendations without prompting |
80
- | maestro-milestone-audit | *(none)* | No interactive prompts |
81
- | maestro-milestone-complete | `-y` | Skip knowledge promotion inquiry |
82
- | manage-learn | *(none)* | No interactive prompts |
162
+ | quality-test | `-y --auto-fix` | Auto-trigger gap-fix loop |
163
+ | quality-retrospective | `-y` | Accept all routing recommendations |
164
+ | maestro-milestone-complete | `-y` | Skip knowledge promotion |
83
165
 
84
- Commands not listed (manage-*, spec-*, milestone-*) have no auto flags and execute as-is.
166
+ Unlisted commands have no auto flags.
85
167
 
86
- In auto mode, maestro also:
87
- - Skips intent clarification (workflow Step 2d)
88
- - Skips chain confirmation (workflow Step 3d)
89
- - Auto-skips on step errors (retry once, then skip and continue)
168
+ ### Error Codes
90
169
 
91
- **Super mode (`--super`):** Read `maestro-super.md` from deferred_reading, then follow it completely.
92
- </execution>
93
-
94
- <error_codes>
95
170
  | Code | Severity | Description | Recovery |
96
171
  |------|----------|-------------|----------|
97
- | E001 | error | No intent and project not initialized | Prompt for intent or suggest maestro-init |
98
- | E002 | error | Clarity too low after 2 clarification rounds | Show parsed intent, ask user to rephrase |
99
- | E003 | error | Chain step failed + user chose abort | Record partial progress, suggest resume with -c |
172
+ | E001 | error | No intent and project not initialized | Prompt or suggest maestro-init |
173
+ | E002 | error | Clarity too low after 2 rounds | Show parsed intent, ask rephrase |
174
+ | E003 | error | Chain step failed + user abort | Record partial, suggest -c resume |
100
175
  | E004 | error | Resume session not found | Show available sessions |
101
- | W001 | warning | Intent ambiguous, multiple chains possible | Present options, let user choose |
102
- | W002 | warning | Chain step completed with warnings | Log and continue |
103
- | W003 | warning | State suggests different chain than intent | Show discrepancy, let user decide |
104
- </error_codes>
176
+ | W001 | warning | Ambiguous intent, multiple chains | Present options |
177
+ | W002 | warning | Step completed with warnings | Log and continue |
178
+ | W003 | warning | State suggests different chain | Show discrepancy |
179
+
180
+ ### Success Criteria
105
181
 
106
- <success_criteria>
107
182
  - [ ] Intent classified with task_type, complexity, clarity_score
108
- - [ ] Project state read and incorporated into routing
109
- - [ ] Command chain selected and confirmed (or auto-confirmed with -y)
110
- - [ ] Per-step type selected (auto routes heavy steps to "cli", observable steps to "skill")
111
- - [ ] Auto flags correctly propagated to supporting commands only
112
- - [ ] Session directory created at .workflow/.maestro/{session_id}/
113
- - [ ] status.json created with unified schema (source: "maestro", steps[] with type field)
183
+ - [ ] Chain selected and confirmed (or auto-confirmed)
184
+ - [ ] Session dir created with status.json before execution
185
+ - [ ] Auto flags propagated to supporting commands only
186
+ - [ ] All chains dispatched via maestro-ralph-execute
114
187
  - [ ] Low-complexity intents routed to maestro-quick
115
- - [ ] All chains dispatched via unified executor (maestro-ralph-execute) with status.json tracking
116
- - [ ] Phase numbers auto-detected and passed to downstream commands
117
- - [ ] (super mode) Requirements expanded and validated via CLI delegate before roadmap creation
118
- - [ ] (super mode) Each milestone scored ≥ 80% before advancing
119
- - [ ] (super mode) All milestones completed with no user intervention
120
- - [ ] (super mode) Final system builds, starts, and passes all tests
121
- </success_criteria>
188
+ - [ ] (super) Requirements validated before roadmap
189
+ - [ ] (super) Each milestone scored >= 80%
190
+
191
+ </appendix>
@@ -13,8 +13,7 @@ allowed-tools:
13
13
  ---
14
14
  <purpose>
15
15
  Capture reusable knowledge into `.workflow/knowhow/` with type-specific structured fields.
16
- Six content types, each optimized for a different reuse pattern. All entries are automatically
17
- indexed by WikiIndexer (type=knowhow) and searchable via `maestro knowhow search`.
16
+ Auto-indexed by WikiIndexer (type=knowhow), searchable via `maestro knowhow search`.
18
17
  </purpose>
19
18
 
20
19
  <required_reading>
@@ -22,181 +21,57 @@ indexed by WikiIndexer (type=knowhow) and searchable via `maestro knowhow search
22
21
  </required_reading>
23
22
 
24
23
  <context>
25
- Arguments: $ARGUMENTS
26
-
27
- **Types:**
28
-
29
- | Type | Prefix | Use Case | Key Fields |
30
- |------|--------|----------|------------|
31
- | `compact` | KNW- | Session state recovery | objective, files, decisions, plan, pending |
32
- | `template` | TPL- | Code/config templates | language, code block, usage context |
33
- | `recipe` | RCP- | Step-by-step how-to | prerequisites, steps, expected outcome |
34
- | `reference` | REF- | External doc / API quick-ref | source URL, key points, scenarios |
35
- | `decision` | DCS- | Design decision record | context, alternatives, rationale, consequences |
36
- | `tip` | TIP- | Quick note / reminder | content, tags |
37
- | `asset` | AST- | Code asset (API contract, data model) | assetType, codePaths, category |
38
- | `blueprint` | BLP- | Architecture design with code paths | codePaths, category |
39
- | `document` | DOC- | General long-form (fallback) | |
40
-
41
- No arguments: auto-detect type or ask user via AskUserQuestion.
42
-
43
- **Flags:**
44
- - `--lang <lang>` — Language for templates (typescript, python, bash, yaml, etc.)
45
- - `--source <url>` Source URL for references
46
- - `--tag tag1,tag2` — Categorization tags
47
- - `--title <title>` — Explicit title (auto-generated if omitted)
48
- - `--asset-type <type>` — Asset subtype: api-contract, data-model, prompt, config, etc.
49
- - `--code-paths <paths>` — Related source paths for asset/blueprint (comma-separated)
50
- - `--category <cat>` — Spec category for agent discovery (coding, arch, test, debug, review, learning)
24
+ $ARGUMENTS — type token + description + optional flags.
25
+
26
+ **Flags**: `--lang <lang>`, `--source <url>`, `--tag tag1,tag2`, `--title <title>`, `--asset-type <type>`, `--code-paths <paths>`, `--category <cat>`
27
+
28
+ **Type routing** (first token match):
29
+
30
+ | Token | Type | Prefix | Key fields |
31
+ |-------|------|--------|------------|
32
+ | `compact`/`session`/`压缩`/`保存` | compact | KNW- | objective, files, decisions, plan, pending |
33
+ | `template`/`tpl`/`模板` | template | TPL- | language, code block, usage, parameters |
34
+ | `recipe`/`rcp`/`配方`/`步骤` | recipe | RCP- | prerequisites, steps, expected outcome, pitfalls |
35
+ | `reference`/`ref`/`参考`/`引用` | reference | REF- | source URL, key points, scenarios, examples |
36
+ | `decision`/`dcs`/`决策`/`adr` | decision | DCS- | context, alternatives table, rationale, consequences |
37
+ | `tip`/`note`/`记录`/`快速` | tip | TIP- | content, tags |
38
+ | `asset`/`ast`/`资产`/`契约` | asset | AST- | assetType, codePaths, category |
39
+ | `blueprint`/`blp`/`蓝图` | blueprint | BLP- | codePaths, category |
40
+ | `document`/`doc`/`文档` | document | DOC- | (general fallback) |
41
+ | Short text + `--tag` | tip | TIP- | — |
42
+ | No args | — | — | AskUserQuestion (9 options) |
43
+
44
+ **Output**: `.workflow/knowhow/{PREFIX}-{YYYYMMDD}-{HHMM}.md` with YAML frontmatter (title, type, category, created, tags, source, lang, status)
51
45
  </context>
52
46
 
53
47
  <execution>
54
-
55
- ### Step 1: Detect Type
56
-
57
- Parse first token as type. If ambiguous, AskUserQuestion with options:
58
-
59
- | Token Match | Type |
60
- |-------------|------|
61
- | `compact`, `session`, `压缩`, `保存` | compact |
62
- | `template`, `tpl`, `模板` | template |
63
- | `recipe`, `rcp`, `配方`, `步骤` | recipe |
64
- | `reference`, `ref`, `参考`, `引用` | reference |
65
- | `decision`, `dcs`, `决策`, `adr` | decision |
66
- | `tip`, `note`, `记录`, `快速` | tip |
67
- | `asset`, `ast`, `资产`, `契约` | asset |
68
- | `blueprint`, `blp`, `蓝图` | blueprint |
69
- | `document`, `doc`, `文档` | document |
70
- | No match, short text, `--tag` present | tip |
71
- | No arguments | AskUserQuestion (9 options) |
72
-
73
- ### Step 2: Generate Content by Type
74
-
75
- #### compact (KNW-{YYYYMMDD}-{HHMM}.md)
76
-
77
- Extract from conversation history:
78
- - **Session ID** — WFS-* if workflow session active, else `manual-{date}`
79
- - **Project Root** — Absolute path
80
- - **Objective** — High-level goal
81
- - **Execution Plan** — Source + complete verbatim content (never summarize)
82
- - **Working Files** — Modified files with roles (absolute paths, 3-8 files)
83
- - **Reference Files** — Read-only context files
84
- - **Last Action** — Final action + result
85
- - **Decisions** — Table: decision | reasoning
86
- - **Constraints** — User-specified limitations
87
- - **Dependencies** — Added/changed packages
88
- - **Known Issues** — Deferred bugs
89
- - **Changes Made** — Completed modifications
90
- - **Pending** — Next steps
91
- - **Notes** — Unstructured thoughts
92
-
93
- Plan detection priority: workflow session IMPL_PLAN.md > TodoWrite items > user-stated > inferred.
94
-
95
- #### template (TPL-{YYYYMMDD}-{HHMM}.md)
96
-
97
- Ask for or extract:
98
- - **Language / Tech** — `--lang` flag or inferred from context
99
- - **Usage** — When/how to use this template
100
- - **Code** — The template content (ask user to provide or select from conversation)
101
- - **Parameters** — Placeholders to replace (e.g. `{{name}}`, `{{port}}`)
102
- - **Dependencies** — Required packages/config
103
- - **Tags** — From `--tag` flag
104
-
105
- If code not provided explicitly, prompt user: "Paste the template code:"
106
-
107
- #### recipe (RCP-{YYYYMMDD}-{HHMM}.md)
108
-
109
- Ask for or extract:
110
- - **Goal** — What this recipe accomplishes
111
- - **Prerequisites** — Tools, access, config needed
112
- - **Steps** — Numbered step-by-step instructions
113
- - **Expected Outcome** — What success looks like
114
- - **Common Pitfalls** — Known issues / gotchas
115
- - **Related** — Links to templates, references, decisions used
116
- - **Tags** — From `--tag` flag
117
-
118
- If steps not clear, prompt user: "Describe the steps (numbered list):"
119
-
120
- #### reference (REF-{YYYYMMDD}-{HHMM}.md)
121
-
122
- Ask for or extract:
123
- - **Source** — `--source` flag (URL, doc title, API endpoint)
124
- - **Key Points** — Bullet list of essential info
125
- - **Applicable Scenarios** — When to consult this reference
126
- - **Quick Examples** — Copy-paste ready code snippets
127
- - **Last Verified** — Date (today)
128
- - **Tags** — From `--tag` flag
129
-
130
- If `--source` provided, offer to fetch and summarize via WebFetch.
131
-
132
- #### decision (DCS-{YYYYMMDD}-{HHMM}.md)
133
-
134
- Ask for or extract:
135
- - **Context** — Background and problem statement
136
- - **Decision** — What was decided
137
- - **Alternatives Considered** — Table: alternative | pros | cons | rejected because
138
- - **Rationale** — Why this choice over alternatives
139
- - **Consequences** — Positive and negative impact
140
- - **Related** — Links to affected specs, recipes, templates
141
- - **Date** — Decision date
142
- - **Status** — proposed | accepted | superseded
143
-
144
- #### tip (TIP-{YYYYMMDD}-{HHMM}.md)
145
-
146
- Simple note:
147
- - **Content** — Everything after type token (or full $ARGUMENTS)
148
- - **Context** — Auto-detected from recent conversation files
149
- - **Tags** — From `--tag` flag
150
- - **Timestamp** — ISO format
151
-
152
- ### Step 3: Write File
153
-
154
- Write to `.workflow/knowhow/{PREFIX}-{YYYYMMDD}-{HHMM}.md` with YAML frontmatter:
155
-
156
- ```yaml
157
- ---
158
- title: {auto or --title}
159
- type: {type}
160
- category: {type}
161
- created: {ISO timestamp}
162
- tags: [{tags}]
163
- source: {url if reference}
164
- lang: {language if template}
165
- status: {status if decision}
166
- ---
167
- {markdown body}
168
- ```
169
-
170
- ### Step 4: Confirm
171
-
172
- ```
173
- === KNOWHOW CAPTURED ===
174
- Type: {type}
175
- ID: knowhow-{slug}
176
- File: .workflow/knowhow/{filename}
177
-
178
- {type-specific summary line}
179
- ```
48
+ Follow '~/.maestro/workflows/knowhow.md' completely.
49
+
50
+ **Type-specific content rules**:
51
+
52
+ | Type | Content extraction |
53
+ |------|-------------------|
54
+ | compact | Extract from conversation: session ID, objective, execution plan (verbatim), working files (3-8), decisions, constraints, pending. Plan priority: workflow IMPL_PLAN.md > TodoWrite > user-stated > inferred. |
55
+ | template | Ask for: language, code block, parameters (placeholders), usage context, dependencies |
56
+ | recipe | Ask for: goal, prerequisites, numbered steps, expected outcome, common pitfalls |
57
+ | reference | From --source URL or ask. Key points, applicable scenarios, quick examples. Offer WebFetch if URL provided. |
58
+ | decision | Context, alternatives (table: alt/pros/cons/rejected-because), rationale, consequences. Status: proposed/accepted/superseded. |
59
+ | tip | Content = everything after type token. Auto-detect context from recent files. |
60
+ | asset | assetType (api-contract/data-model/prompt/config), codePaths, category for agent discovery |
61
+ | blueprint | Architecture design with codePaths and category |
180
62
  </execution>
181
63
 
182
64
  <error_codes>
183
- | Code | Severity | Description | Stage |
184
- |------|----------|-------------|-------|
185
- | E001 | error | `.workflow/` not initialized run `/maestro-init` first | validate |
186
- | E002 | error | Template: no code provided after prompt | template |
187
- | E003 | error | Recipe: no steps provided after prompt | recipe |
188
- | W001 | warning | No active workflow session compact captures conversation only | compact |
189
- | W002 | warning | Plan detection found no explicit plan — using inferred plan | compact |
190
- | W003 | warning | `--source` URL could not be fetched — proceeding with manual entry | reference |
65
+ | Code | Condition | Recovery |
66
+ |------|-----------|----------|
67
+ | E002 | Template: no code provided after prompt | Ask again or cancel |
68
+ | E003 | Recipe: no steps provided after prompt | Ask again or cancel |
69
+ | W001 | No active workflow session (compact) | Captures conversation only |
70
+ | W002 | Plan detection found no explicit plan (compact) | Uses inferred plan |
191
71
  </error_codes>
192
72
 
193
73
  <success_criteria>
194
- - [ ] Type correctly detected or selected
195
- - [ ] All type-specific fields populated (not empty)
196
- - [ ] YAML frontmatter written with correct fields
197
- - [ ] Markdown body follows type structure
198
- - [ ] File written to `.workflow/knowhow/` with correct prefix
199
- - [ ] Auto-indexed by WikiIndexer (type=knowhow)
200
- - [ ] Confirmation displayed with ID, type, file path
201
- - [ ] Next step hint appropriate to type shown
74
+ - [ ] Type detected or selected, all type-specific fields populated
75
+ - [ ] File written to .workflow/knowhow/ with correct prefix and YAML frontmatter
76
+ - [ ] Confirmation displayed with ID, type, path
202
77
  </success_criteria>
@@ -50,6 +50,15 @@ Phase or task: $ARGUMENTS (required — phase number)
50
50
  | 5 | Default | code | quality-integration-test |
51
51
 
52
52
  Flags, artifact context resolution, and output formats defined in workflow auto-test.md.
53
+
54
+ ### Pre-load context (before test generation)
55
+
56
+ 1. **Test specs + tools**: Run `maestro spec load --category test` to load test conventions (framework, patterns, naming). Apply to all generated tests.
57
+ 2. **Coding specs**: Run `maestro spec load --category coding` to understand coding patterns for accurate test targeting.
58
+ 3. **Role Knowledge**:
59
+ - Browse: `maestro wiki list --category test`
60
+ - Load task-relevant entries: `maestro wiki load <id1> [id2...]`
61
+ 4. All are optional — proceed without if unavailable.
53
62
  </context>
54
63
 
55
64
  <execution>
@@ -43,20 +43,11 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
43
43
 
44
44
  Extract conclusions from related artifacts that may affect this debug session — review findings guide investigation direction, prior debug avoids redundant work.
45
45
 
46
- ### Pre-load context (before hypothesis formation)
47
-
48
- 1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, load module boundaries to scope impact analysis and inform hypothesis formation.
49
- 2. **Wiki prior knowledge**: Run `maestro wiki search "<symptom keywords>" --json 2>/dev/null`. If results found, check for prior investigations on similar issues to avoid re-investigation.
50
- 3. **Debug specs + tools**: Run `maestro spec load --category debug --keyword "<symptom keywords>"`. If tools found, extract known issues, workarounds, and root-cause notes to inform hypotheses.
51
- 4. All are optional — proceed without if unavailable.
52
-
53
- ### Role Knowledge
54
- 1. Browse accumulated knowledge for this role:
55
- `maestro wiki list --category debug`
56
- 2. Analyze the index, identify entries relevant to the current task
57
- 3. Load selected documents:
58
- `maestro wiki load <id1> [id2] [id3...]`
59
- 4. Review loaded knowledge before proceeding
46
+ ### Pre-load (optional, proceed without)
47
+ - Codebase docs: `.workflow/codebase/ARCHITECTURE.md` → module boundaries
48
+ - Wiki: `maestro wiki search "<symptom keywords>" --json` prior investigations
49
+ - Specs: `maestro spec load --category debug --keyword "<symptom>"` known issues/workarounds
50
+ - Role knowledge: `maestro wiki list --category debug` select relevant `maestro wiki load`
60
51
 
61
52
  **Output**: `DEBUG_DIR = .workflow/scratch/{YYYYMMDD}-debug-P{N}-{slug}/` (P{N} = phase number when phase-scoped; omit for standalone). Output directory rules defined in workflow debug.md Step 4.
62
53
  </context>
@@ -84,18 +75,13 @@ Append to state.json.artifacts[]:
84
75
 
85
76
  ### Post-debug Knowledge Inquiry
86
77
 
87
- After root cause is confirmed, evaluate inquiry triggers:
88
-
89
- 1. **Recurring pattern**: If root cause matches a recurring pattern (similar to prior debug sessions):
90
- Ask: "This root cause pattern has appeared before. Should it be documented in `debug-notes.md` to prevent recurrence? (`/spec-add debug`)"
91
-
92
- 2. **Non-obvious fix**: If fix involved a non-obvious approach or workaround:
93
- → Ask: "This fix used a non-obvious strategy. Should it be recorded as a learning? (`/spec-add learning`)"
94
-
95
- 3. **Architectural gap**: If root cause traces to architectural boundary violation or missing constraint:
96
- → Ask: "Root cause points to an architectural gap. Should `architecture-constraints.md` be updated? (`/spec-add arch`)"
78
+ | Condition | Ask | Route |
79
+ |-----------|-----|-------|
80
+ | Recurring root cause pattern (seen in prior debug) | "Document in debug-notes.md?" | spec-add debug |
81
+ | Non-obvious fix / workaround | "Record as learning?" | spec-add learning |
82
+ | Root cause = architectural boundary violation | "Update architecture-constraints.md?" | spec-add arch |
97
83
 
98
- If user confirms, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })`.
84
+ On confirm `Skill("spec-add", "<category> <content>")`.
99
85
 
100
86
  **Next-step routing on completion:**
101
87
  - Root cause found, fix needed → `/maestro-plan {phase} --gaps`
@@ -27,6 +27,15 @@ Scope: $ARGUMENTS (required)
27
27
  - "all" - full codebase scan
28
28
 
29
29
  If not provided, prompt user for scope.
30
+
31
+ ### Pre-load context (before refactoring)
32
+
33
+ 1. **Coding specs**: Run `maestro spec load --category coding` to load coding conventions. Apply conventions to all refactored code.
34
+ 2. **Review specs**: Run `maestro spec load --category review` to load review standards. Use as quality gate for refactored code.
35
+ 3. **Role Knowledge**:
36
+ - Browse: `maestro wiki list --category coding`
37
+ - Identify task-relevant entries, then load: `maestro wiki load <id1> [id2...]`
38
+ 4. All are optional — proceed without if unavailable.
30
39
  </context>
31
40
 
32
41
  <execution>
@@ -48,20 +48,11 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
48
48
 
49
49
  Extract conclusions from related artifacts that may affect this review. Pass as prior quality context to reviewer agents — avoid redundant work, focus on gaps and regressions.
50
50
 
51
- ### Pre-load context (before dispatching reviewer agents)
52
-
53
- 1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, load component boundaries and layer rules. Pass as `codebase_context` to reviewer agents (especially architecture dimension).
54
- 2. **Wiki constraints**: Run `maestro wiki search "architecture constraint" --json 2>/dev/null`. If results found, pass as `wiki_context` to reviewer agents for evaluating code against documented decisions.
55
- 3. **Review specs + tools**: Run `maestro spec load --category review` to load review standards, checklists, AND discoverable knowhow tools. Pass as `specs_content` to all reviewer agents.
56
- 4. All are optional — proceed without if unavailable.
57
-
58
- ### Role Knowledge
59
- 1. Browse accumulated knowledge for this role:
60
- `maestro wiki list --category review`
61
- 2. Analyze the index, identify entries relevant to the current task
62
- 3. Load selected documents:
63
- `maestro wiki load <id1> [id2] [id3...]`
64
- 4. Review loaded knowledge before proceeding
51
+ ### Pre-load (optional, proceed without)
52
+ - Codebase docs: `.workflow/codebase/ARCHITECTURE.md` → component boundaries, layer rules
53
+ - Wiki constraints: `maestro wiki search "architecture constraint" --json` documented decisions
54
+ - Specs: `maestro spec load --category review` review standards, checklists, knowhow tools
55
+ - Role knowledge: `maestro wiki list --category review` select relevant `maestro wiki load`
65
56
 
66
57
  **Output**: `REVIEW_DIR = .workflow/scratch/{YYYYMMDD}-review-P{N}-{slug}/` (P{N} = phase number, enables directory-level identification as state.json fallback)
67
58
  </context>
@@ -50,7 +50,7 @@ Follow '~/.maestro/workflows/specs-add.md' completely.
50
50
  |------|----------|-------------|-------|
51
51
  | E001 | fatal | Category and content are both required | parse_input |
52
52
  | E002 | fatal | Specs directory not initialized -- run `maestro spec init --scope <scope>` | validate_entry |
53
- | E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning, tools | parse_input |
53
+ | E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning, tools, ui | parse_input |
54
54
  | E004 | fatal | Invalid scope -- must be one of: project, global, team, personal | parse_input |
55
55
  | E005 | fatal | Personal scope requires uid -- use `--uid` or run `maestro collab join` first | parse_input |
56
56
  </error_codes>
@@ -21,7 +21,7 @@ Category-based loading: loads the category's primary doc in full + matching entr
21
21
  $ARGUMENTS -- optional flags and keyword
22
22
 
23
23
  **Flags:**
24
- - `--category <category>` — Load by category: primary category doc (full) + cross-file entries with matching category attr. Categories: coding, arch, test, review, debug, quality, learning.
24
+ - `--category <category>` — Load by category: primary category doc (full) + cross-file entries with matching category attr. Categories: coding, arch, test, review, debug, learning, ui.
25
25
  - `--keyword <word>` — Filter by keyword within entries
26
26
 
27
27
  **File → Primary Category mapping:**
@@ -32,7 +32,8 @@ $ARGUMENTS -- optional flags and keyword
32
32
  | test-conventions.md | test |
33
33
  | review-standards.md | review |
34
34
  | debug-notes.md | debug |
35
- | quality-rules.md | quality |
35
+ | ui-conventions.md | ui |
36
+ | quality-rules.md | review |
36
37
  | learnings.md | learning |
37
38
 
38
39
  **Examples:**