maestro-flow 0.5.45 → 0.5.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 (310) hide show
  1. package/.agents/agents/ralph-executor.md +51 -6
  2. package/.agents/skills/domain-add/SKILL.md +9 -0
  3. package/.agents/skills/learn-decompose/SKILL.md +12 -0
  4. package/.agents/skills/learn-follow/SKILL.md +41 -0
  5. package/.agents/skills/learn-investigate/SKILL.md +14 -0
  6. package/.agents/skills/learn-second-opinion/SKILL.md +14 -0
  7. package/.agents/skills/maestro-amend/SKILL.md +11 -0
  8. package/.agents/skills/maestro-companion/SKILL.md +11 -0
  9. package/.agents/skills/maestro-composer/SKILL.md +11 -0
  10. package/.agents/skills/maestro-guard/SKILL.md +25 -0
  11. package/.agents/skills/maestro-init/SKILL.md +28 -0
  12. package/.agents/skills/maestro-overlay/SKILL.md +11 -0
  13. package/.agents/skills/maestro-player/SKILL.md +11 -0
  14. package/.agents/skills/maestro-quick/SKILL.md +29 -0
  15. package/.agents/skills/maestro-ralph-v2/SKILL.md +124 -61
  16. package/.agents/skills/maestro-swarm-workflow/SKILL.md +25 -0
  17. package/.agents/skills/maestro-tools-execute/SKILL.md +29 -0
  18. package/.agents/skills/maestro-tools-register/SKILL.md +29 -0
  19. package/.agents/skills/maestro-ui-codify/SKILL.md +11 -0
  20. package/.agents/skills/maestro-universal-workflow/SKILL.md +59 -0
  21. package/.agents/skills/maestro-update/SKILL.md +38 -0
  22. package/.agents/skills/manage-codebase-rebuild/SKILL.md +29 -0
  23. package/.agents/skills/manage-drift-realign/SKILL.md +12 -0
  24. package/.agents/skills/manage-harvest/SKILL.md +30 -6
  25. package/.agents/skills/manage-issue/SKILL.md +23 -0
  26. package/.agents/skills/manage-issue-discover/SKILL.md +28 -0
  27. package/.agents/skills/manage-kg-extractors/SKILL.md +27 -1
  28. package/.agents/skills/manage-knowhow/SKILL.md +26 -0
  29. package/.agents/skills/manage-knowhow-capture/SKILL.md +24 -0
  30. package/.agents/skills/manage-knowledge-audit/SKILL.md +13 -0
  31. package/.agents/skills/manage-status/SKILL.md +22 -0
  32. package/.agents/skills/manage-wiki/SKILL.md +28 -0
  33. package/.agents/skills/odyssey-debug/SKILL.md +338 -253
  34. package/.agents/skills/odyssey-improve/SKILL.md +417 -281
  35. package/.agents/skills/odyssey-planex/SKILL.md +536 -420
  36. package/.agents/skills/odyssey-review-test-fix/SKILL.md +386 -251
  37. package/.agents/skills/odyssey-ui/SKILL.md +382 -247
  38. package/.agents/skills/quality-auto-test/SKILL.md +12 -0
  39. package/.agents/skills/quality-debug/SKILL.md +11 -0
  40. package/.agents/skills/quality-refactor/SKILL.md +11 -0
  41. package/.agents/skills/quality-retrospective/SKILL.md +11 -0
  42. package/.agents/skills/quality-review/SKILL.md +11 -0
  43. package/.agents/skills/quality-sync/SKILL.md +10 -0
  44. package/.agents/skills/quality-test/SKILL.md +12 -0
  45. package/.agents/skills/security-audit/SKILL.md +11 -0
  46. package/.agents/skills/spec-add/SKILL.md +27 -0
  47. package/.agents/skills/spec-load/SKILL.md +25 -0
  48. package/.agents/skills/spec-remove/SKILL.md +26 -0
  49. package/.agents/skills/spec-setup/SKILL.md +30 -0
  50. package/.agy/agents/ralph-executor.md +53 -6
  51. package/.agy/skills/domain-add/SKILL.md +9 -0
  52. package/.agy/skills/learn-decompose/SKILL.md +12 -0
  53. package/.agy/skills/learn-follow/SKILL.md +41 -0
  54. package/.agy/skills/learn-investigate/SKILL.md +14 -0
  55. package/.agy/skills/learn-second-opinion/SKILL.md +14 -0
  56. package/.agy/skills/maestro-amend/SKILL.md +11 -0
  57. package/.agy/skills/maestro-companion/SKILL.md +11 -0
  58. package/.agy/skills/maestro-composer/SKILL.md +11 -0
  59. package/.agy/skills/maestro-guard/SKILL.md +25 -0
  60. package/.agy/skills/maestro-init/SKILL.md +28 -0
  61. package/.agy/skills/maestro-overlay/SKILL.md +11 -0
  62. package/.agy/skills/maestro-player/SKILL.md +11 -0
  63. package/.agy/skills/maestro-quick/SKILL.md +29 -0
  64. package/.agy/skills/maestro-ralph-v2/SKILL.md +123 -61
  65. package/.agy/skills/maestro-swarm-workflow/SKILL.md +25 -0
  66. package/.agy/skills/maestro-tools-execute/SKILL.md +29 -0
  67. package/.agy/skills/maestro-tools-register/SKILL.md +29 -0
  68. package/.agy/skills/maestro-ui-codify/SKILL.md +11 -0
  69. package/.agy/skills/maestro-universal-workflow/SKILL.md +59 -0
  70. package/.agy/skills/maestro-update/SKILL.md +38 -0
  71. package/.agy/skills/manage-codebase-rebuild/SKILL.md +29 -0
  72. package/.agy/skills/manage-drift-realign/SKILL.md +12 -0
  73. package/.agy/skills/manage-harvest/SKILL.md +30 -6
  74. package/.agy/skills/manage-issue/SKILL.md +23 -0
  75. package/.agy/skills/manage-issue-discover/SKILL.md +28 -0
  76. package/.agy/skills/manage-kg-extractors/SKILL.md +27 -1
  77. package/.agy/skills/manage-knowhow/SKILL.md +26 -0
  78. package/.agy/skills/manage-knowhow-capture/SKILL.md +24 -0
  79. package/.agy/skills/manage-knowledge-audit/SKILL.md +13 -0
  80. package/.agy/skills/manage-status/SKILL.md +22 -0
  81. package/.agy/skills/manage-wiki/SKILL.md +28 -0
  82. package/.agy/skills/odyssey-debug/SKILL.md +338 -253
  83. package/.agy/skills/odyssey-improve/SKILL.md +417 -281
  84. package/.agy/skills/odyssey-planex/SKILL.md +536 -420
  85. package/.agy/skills/odyssey-review-test-fix/SKILL.md +386 -251
  86. package/.agy/skills/odyssey-ui/SKILL.md +382 -247
  87. package/.agy/skills/quality-auto-test/SKILL.md +12 -0
  88. package/.agy/skills/quality-debug/SKILL.md +11 -0
  89. package/.agy/skills/quality-refactor/SKILL.md +11 -0
  90. package/.agy/skills/quality-retrospective/SKILL.md +11 -0
  91. package/.agy/skills/quality-review/SKILL.md +11 -0
  92. package/.agy/skills/quality-sync/SKILL.md +10 -0
  93. package/.agy/skills/quality-test/SKILL.md +12 -0
  94. package/.agy/skills/security-audit/SKILL.md +11 -0
  95. package/.agy/skills/spec-add/SKILL.md +27 -0
  96. package/.agy/skills/spec-load/SKILL.md +25 -0
  97. package/.agy/skills/spec-remove/SKILL.md +26 -0
  98. package/.agy/skills/spec-setup/SKILL.md +30 -0
  99. package/.claude/agents/ralph-executor.md +51 -6
  100. package/.claude/commands/domain-add.md +9 -0
  101. package/.claude/commands/learn-decompose.md +12 -0
  102. package/.claude/commands/learn-follow.md +41 -0
  103. package/.claude/commands/learn-investigate.md +14 -0
  104. package/.claude/commands/learn-second-opinion.md +14 -0
  105. package/.claude/commands/maestro-amend.md +11 -0
  106. package/.claude/commands/maestro-companion.md +11 -0
  107. package/.claude/commands/maestro-composer.md +11 -0
  108. package/.claude/commands/maestro-guard.md +25 -0
  109. package/.claude/commands/maestro-init.md +28 -0
  110. package/.claude/commands/maestro-overlay.md +11 -0
  111. package/.claude/commands/maestro-player.md +11 -0
  112. package/.claude/commands/maestro-quick.md +29 -0
  113. package/.claude/commands/maestro-ralph-v2.md +124 -61
  114. package/.claude/commands/maestro-swarm-workflow.md +25 -0
  115. package/.claude/commands/maestro-tools-execute.md +29 -0
  116. package/.claude/commands/maestro-tools-register.md +29 -0
  117. package/.claude/commands/maestro-ui-codify.md +11 -0
  118. package/.claude/commands/maestro-universal-workflow.md +59 -0
  119. package/.claude/commands/maestro-update.md +38 -0
  120. package/.claude/commands/manage-codebase-rebuild.md +29 -0
  121. package/.claude/commands/manage-drift-realign.md +12 -0
  122. package/.claude/commands/manage-harvest.md +30 -6
  123. package/.claude/commands/manage-issue-discover.md +28 -0
  124. package/.claude/commands/manage-issue.md +23 -0
  125. package/.claude/commands/manage-kg-extractors.md +27 -1
  126. package/.claude/commands/manage-knowhow-capture.md +24 -0
  127. package/.claude/commands/manage-knowhow.md +26 -0
  128. package/.claude/commands/manage-knowledge-audit.md +13 -0
  129. package/.claude/commands/manage-status.md +22 -0
  130. package/.claude/commands/manage-wiki.md +28 -0
  131. package/.claude/commands/odyssey-debug.md +352 -267
  132. package/.claude/commands/odyssey-improve.md +431 -295
  133. package/.claude/commands/odyssey-planex.md +550 -434
  134. package/.claude/commands/odyssey-review-test-fix.md +400 -265
  135. package/.claude/commands/odyssey-ui.md +396 -261
  136. package/.claude/commands/quality-auto-test.md +12 -0
  137. package/.claude/commands/quality-debug.md +11 -0
  138. package/.claude/commands/quality-refactor.md +11 -0
  139. package/.claude/commands/quality-retrospective.md +11 -0
  140. package/.claude/commands/quality-review.md +11 -0
  141. package/.claude/commands/quality-sync.md +10 -0
  142. package/.claude/commands/quality-test.md +12 -0
  143. package/.claude/commands/security-audit.md +11 -0
  144. package/.claude/commands/spec-add.md +27 -0
  145. package/.claude/commands/spec-load.md +25 -0
  146. package/.claude/commands/spec-remove.md +26 -0
  147. package/.claude/commands/spec-setup.md +30 -0
  148. package/.codex/skills/codify-to-knowhow/SKILL.md +2 -0
  149. package/.codex/skills/domain-add/SKILL.md +26 -0
  150. package/.codex/skills/domain-discover/SKILL.md +46 -0
  151. package/.codex/skills/domain-list/SKILL.md +29 -0
  152. package/.codex/skills/learn-decompose/SKILL.md +2 -0
  153. package/.codex/skills/learn-follow/SKILL.md +34 -0
  154. package/.codex/skills/learn-investigate/SKILL.md +33 -0
  155. package/.codex/skills/learn-retro/SKILL.md +33 -0
  156. package/.codex/skills/learn-second-opinion/SKILL.md +30 -0
  157. package/.codex/skills/maestro-amend/SKILL.md +11 -0
  158. package/.codex/skills/maestro-companion/SKILL.md +11 -0
  159. package/.codex/skills/maestro-composer/SKILL.md +11 -0
  160. package/.codex/skills/maestro-guard/SKILL.md +25 -0
  161. package/.codex/skills/maestro-help/SKILL.md +2 -0
  162. package/.codex/skills/maestro-init/SKILL.md +16 -0
  163. package/.codex/skills/maestro-learn/SKILL.md +2 -0
  164. package/.codex/skills/maestro-overlay/SKILL.md +1 -0
  165. package/.codex/skills/maestro-player/SKILL.md +2 -0
  166. package/.codex/skills/maestro-quick/SKILL.md +17 -0
  167. package/.codex/skills/maestro-tools-execute/SKILL.md +31 -0
  168. package/.codex/skills/maestro-tools-register/SKILL.md +29 -0
  169. package/.codex/skills/maestro-ui-codify/SKILL.md +2 -0
  170. package/.codex/skills/maestro-update/SKILL.md +38 -0
  171. package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -0
  172. package/.codex/skills/manage-codebase-refresh/SKILL.md +11 -0
  173. package/.codex/skills/manage-drift-realign/SKILL.md +2 -0
  174. package/.codex/skills/manage-harvest/SKILL.md +30 -8
  175. package/.codex/skills/manage-issue/SKILL.md +24 -0
  176. package/.codex/skills/manage-issue-discover/SKILL.md +2 -0
  177. package/.codex/skills/manage-knowhow/SKILL.md +26 -0
  178. package/.codex/skills/manage-knowhow-capture/SKILL.md +23 -0
  179. package/.codex/skills/manage-learn/SKILL.md +2 -0
  180. package/.codex/skills/manage-status/SKILL.md +22 -0
  181. package/.codex/skills/manage-wiki/SKILL.md +28 -0
  182. package/.codex/skills/odyssey-debug/SKILL.md +44 -0
  183. package/.codex/skills/odyssey-improve/SKILL.md +49 -0
  184. package/.codex/skills/odyssey-planex/SKILL.md +44 -0
  185. package/.codex/skills/odyssey-review-test-fix/SKILL.md +48 -0
  186. package/.codex/skills/odyssey-ui/SKILL.md +49 -0
  187. package/.codex/skills/quality-auto-test/SKILL.md +2 -0
  188. package/.codex/skills/quality-debug/SKILL.md +2 -0
  189. package/.codex/skills/quality-refactor/SKILL.md +2 -0
  190. package/.codex/skills/quality-retrospective/SKILL.md +2 -0
  191. package/.codex/skills/quality-review/SKILL.md +2 -0
  192. package/.codex/skills/quality-sync/SKILL.md +24 -0
  193. package/.codex/skills/quality-test/SKILL.md +2 -0
  194. package/.codex/skills/security-audit/SKILL.md +30 -0
  195. package/.codex/skills/spec-add/SKILL.md +28 -0
  196. package/.codex/skills/spec-load/SKILL.md +26 -0
  197. package/.codex/skills/spec-map/SKILL.md +1 -0
  198. package/.codex/skills/spec-remove/SKILL.md +28 -0
  199. package/.codex/skills/spec-setup/SKILL.md +28 -0
  200. package/.codex/skills/wiki-connect/SKILL.md +11 -0
  201. package/.codex/skills/wiki-digest/SKILL.md +11 -0
  202. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js +3 -1
  203. package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js.map +1 -1
  204. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +5 -0
  205. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +28 -4
  206. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
  207. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +4 -4
  208. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  209. package/dashboard/dist-server/src/graph/kg/db/queries.d.ts +10 -0
  210. package/dashboard/dist-server/src/graph/kg/db/queries.js +176 -38
  211. package/dashboard/dist-server/src/graph/kg/db/queries.js.map +1 -1
  212. package/dashboard/dist-server/src/graph/kg/extraction/code/svelte-extractor.js +1 -1
  213. package/dashboard/dist-server/src/graph/kg/extraction/code/svelte-extractor.js.map +1 -1
  214. package/dashboard/dist-server/src/graph/kg/extraction/code/tree-sitter.js +2 -2
  215. package/dashboard/dist-server/src/graph/kg/extraction/code/tree-sitter.js.map +1 -1
  216. package/dashboard/dist-server/src/graph/kg/extraction/code/vue-extractor.js +1 -1
  217. package/dashboard/dist-server/src/graph/kg/extraction/code/vue-extractor.js.map +1 -1
  218. package/dashboard/dist-server/src/graph/kg/extraction/code/wasm-stability.js +1 -1
  219. package/dashboard/dist-server/src/graph/kg/extraction/code/wasm-stability.js.map +1 -1
  220. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +20 -12
  221. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
  222. package/dashboard/dist-server/src/graph/kg/surface/hook-injector.js +1 -1
  223. package/dashboard/dist-server/src/graph/kg/surface/hook-injector.js.map +1 -1
  224. package/dashboard/dist-server/src/hooks/keyword-spec-injector.js +35 -0
  225. package/dashboard/dist-server/src/hooks/keyword-spec-injector.js.map +1 -1
  226. package/dashboard/dist-server/src/hooks/spec-analytics.d.ts +1 -0
  227. package/dashboard/dist-server/src/hooks/spec-analytics.js.map +1 -1
  228. package/dashboard/dist-server/src/hooks/wiki-search-bridge.d.ts +32 -0
  229. package/dashboard/dist-server/src/hooks/wiki-search-bridge.js +71 -0
  230. package/dashboard/dist-server/src/hooks/wiki-search-bridge.js.map +1 -0
  231. package/dist/src/agents/api-explore/agent-loop.d.ts +15 -2
  232. package/dist/src/agents/api-explore/agent-loop.d.ts.map +1 -1
  233. package/dist/src/agents/api-explore/agent-loop.js +6 -5
  234. package/dist/src/agents/api-explore/agent-loop.js.map +1 -1
  235. package/dist/src/agents/api-explore/config.d.ts +67 -1
  236. package/dist/src/agents/api-explore/config.d.ts.map +1 -1
  237. package/dist/src/agents/api-explore/config.js +50 -15
  238. package/dist/src/agents/api-explore/config.js.map +1 -1
  239. package/dist/src/agents/api-explore/index.js +4 -4
  240. package/dist/src/agents/api-explore/index.js.map +1 -1
  241. package/dist/src/agents/api-explore/llm.d.ts +7 -1
  242. package/dist/src/agents/api-explore/llm.d.ts.map +1 -1
  243. package/dist/src/agents/api-explore/llm.js +26 -12
  244. package/dist/src/agents/api-explore/llm.js.map +1 -1
  245. package/dist/src/agents/api-explore/moa-cache.d.ts +12 -0
  246. package/dist/src/agents/api-explore/moa-cache.d.ts.map +1 -0
  247. package/dist/src/agents/api-explore/moa-cache.js +50 -0
  248. package/dist/src/agents/api-explore/moa-cache.js.map +1 -0
  249. package/dist/src/agents/api-explore/moa-loop.d.ts +49 -0
  250. package/dist/src/agents/api-explore/moa-loop.d.ts.map +1 -0
  251. package/dist/src/agents/api-explore/moa-loop.js +43 -0
  252. package/dist/src/agents/api-explore/moa-loop.js.map +1 -0
  253. package/dist/src/agents/api-explore/moa-pipeline.d.ts +43 -0
  254. package/dist/src/agents/api-explore/moa-pipeline.d.ts.map +1 -0
  255. package/dist/src/agents/api-explore/moa-pipeline.js +276 -0
  256. package/dist/src/agents/api-explore/moa-pipeline.js.map +1 -0
  257. package/dist/src/agents/api-explore/runner.d.ts +3 -0
  258. package/dist/src/agents/api-explore/runner.d.ts.map +1 -1
  259. package/dist/src/agents/api-explore/runner.js +39 -18
  260. package/dist/src/agents/api-explore/runner.js.map +1 -1
  261. package/dist/src/agents/api-explore/session.d.ts +15 -0
  262. package/dist/src/agents/api-explore/session.d.ts.map +1 -1
  263. package/dist/src/agents/api-explore/session.js.map +1 -1
  264. package/dist/src/cli.js +1 -0
  265. package/dist/src/cli.js.map +1 -1
  266. package/dist/src/commands/explore.d.ts.map +1 -1
  267. package/dist/src/commands/explore.js +34 -2
  268. package/dist/src/commands/explore.js.map +1 -1
  269. package/dist/src/commands/install.js +7 -28
  270. package/dist/src/commands/install.js.map +1 -1
  271. package/dist/src/commands/moa.d.ts +3 -0
  272. package/dist/src/commands/moa.d.ts.map +1 -0
  273. package/dist/src/commands/moa.js +217 -0
  274. package/dist/src/commands/moa.js.map +1 -0
  275. package/dist/src/commands/search.d.ts.map +1 -1
  276. package/dist/src/commands/search.js +2 -0
  277. package/dist/src/commands/search.js.map +1 -1
  278. package/dist/src/graph/kg/db/queries.d.ts +10 -0
  279. package/dist/src/graph/kg/db/queries.d.ts.map +1 -1
  280. package/dist/src/graph/kg/db/queries.js +176 -38
  281. package/dist/src/graph/kg/db/queries.js.map +1 -1
  282. package/dist/src/graph/kg/extraction/code/svelte-extractor.js +1 -1
  283. package/dist/src/graph/kg/extraction/code/svelte-extractor.js.map +1 -1
  284. package/dist/src/graph/kg/extraction/code/tree-sitter.js +2 -2
  285. package/dist/src/graph/kg/extraction/code/tree-sitter.js.map +1 -1
  286. package/dist/src/graph/kg/extraction/code/vue-extractor.js +1 -1
  287. package/dist/src/graph/kg/extraction/code/vue-extractor.js.map +1 -1
  288. package/dist/src/graph/kg/extraction/code/wasm-stability.js +1 -1
  289. package/dist/src/graph/kg/extraction/code/wasm-stability.js.map +1 -1
  290. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  291. package/dist/src/graph/kg/extraction/orchestrator.js +20 -12
  292. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  293. package/dist/src/graph/kg/surface/hook-injector.js +1 -1
  294. package/dist/src/graph/kg/surface/hook-injector.js.map +1 -1
  295. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
  296. package/dist/src/hooks/keyword-spec-injector.js +35 -0
  297. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  298. package/dist/src/hooks/plugins/explore-plugin.d.ts.map +1 -1
  299. package/dist/src/hooks/plugins/explore-plugin.js +3 -2
  300. package/dist/src/hooks/plugins/explore-plugin.js.map +1 -1
  301. package/dist/src/hooks/spec-analytics.d.ts +1 -0
  302. package/dist/src/hooks/spec-analytics.d.ts.map +1 -1
  303. package/dist/src/hooks/spec-analytics.js.map +1 -1
  304. package/dist/src/hooks/wiki-search-bridge.d.ts +33 -0
  305. package/dist/src/hooks/wiki-search-bridge.d.ts.map +1 -0
  306. package/dist/src/hooks/wiki-search-bridge.js +71 -0
  307. package/dist/src/hooks/wiki-search-bridge.js.map +1 -0
  308. package/dist/src/utils/update-notices.js +12 -0
  309. package/dist/src/utils/update-notices.js.map +1 -1
  310. package/package.json +1 -1
@@ -14,250 +14,385 @@ allowed-tools:
14
14
  - view_file
15
15
  - write_to_file
16
16
  ---
17
- <base>@~/.maestro/workflows/odyssey-base.md</base>
18
-
19
- <purpose>
20
- survey → 6-dimension audit → divergent exploration → fix → verify → generalize → discover → persist.
21
- Exhaustive iteration until all findings addressed or deferred.
22
- </purpose>
23
-
24
- <boundary>
25
- **In scope:** Target component/page visual experience optimization — audit 6 dimensions, divergent exploration, fix, generalize to sibling components.
26
- **Out of scope:** Backend/data/API → `/odyssey-planex` | Deep bug investigation → `/odyssey-debug` | Code quality review → `/odyssey-review-test-fix`
27
-
28
- **Decision gate** — ONLY these qualify as decisions:
29
- - Brand/style direction requiring human creative judgment
30
- - Layout restructuring that changes user flow significantly
31
- - Requires new design tokens or breaking component API
32
- </boundary>
33
-
34
- <context>
35
- $ARGUMENTS
36
-
37
- **Target resolution:** Component path → audit component | Page/route → audit page | `staged`/`HEAD` → diff UI changes | Feature area → resolve to components/pages
38
-
39
- **Flags:** `--dimensions <list>` dimension subset | `--fix-threshold <severity>` | `--skip-fix` audit+diverge only | `--skip-generalize` skip generalize+discover | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
40
-
41
- **Session**: `.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
42
- **Output**: `session.json` | `evidence.ndjson` | `understanding.md`
43
-
44
- **session.json ui-specific fields:**
45
- ```json
46
- { "target": "", "dimensions": [],
47
- "audit_result": { "dimensions_audited": 0, "finding_count": 0, "severity_distribution": {} },
48
- "diverge_result": { "improvements_proposed": 0, "creative_ideas": 0 },
49
- "patterns": [], "confirmation": null, "generalization_stats": null }
50
- ```
51
-
52
- **evidence.ndjson phases:** `survey|audit|diverge|fix|discovery|decision|self-iteration`
53
-
54
- **phase_goals[]:**
55
-
56
- | ID | Goal | Phase | skip_when |
57
- |----|------|-------|-----------|
58
- | G1 | Survey completed | S_SURVEY | |
59
- | G2 | Audit completed | S_AUDIT | — |
60
- | G3 | Divergent exploration done | S_DIVERGE | — |
61
- | G4 | Zero remaining: all findings/ideas fixed and verified | S_VERIFY | skip_fix |
62
- | G5 | Pattern generalized | S_GENERALIZE | skip_generalize |
63
- | G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
64
- | G7 | Learnings persisted | S_RECORD | |
65
-
66
- **understanding.md8 sections:**
67
- 1. Target & Design Context ← S_INTAKE | 2. Survey ← S_SURVEY | 3. Audit ← S_AUDIT
68
- 4. Diverge S_DIVERGE | 5. Verify ← S_VERIFY | 6. Generalize ← S_GENERALIZE
69
- 7. DiscoverS_DISCOVER | 8. LearningsS_RECORD
70
-
71
- **Knowledge Persistence categories (section 8):**
72
-
73
- | Category | Content | Follow-up |
74
- |----------|---------|-----------|
75
- | Design pattern | Component pattern + applicable scenarios + token references | `/spec-add ui` |
76
- | Interaction spec | State definitions + transition rules + feedback patterns | `/spec-add ui` |
77
- | Accessibility rule | WCAG requirement + implementation approach | `/spec-add ui` |
78
- | Reusable generalization pattern | Pattern signature + application scope | `/spec-add coding` |
79
- </context>
80
-
81
- <invariants>
82
- 1-5 in base. UI-specific:
83
- 6. **Browser is truth** — verify in real rendering, not just code review
84
- 7. **Diverge before converge** — explore creatively first, then implement methodically
85
- </invariants>
86
-
87
- <self_iteration>
88
- Applies to: **S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE**. Logic in base.
89
- </self_iteration>
90
-
91
- <state_machine>
92
-
93
- <states>
94
- S_INTAKE → S_SURVEY → S_AUDIT → S_DIVERGE → S_FIX → S_VERIFY → S_GENERALIZE → S_DISCOVER → S_RECORD → END
95
- </states>
96
-
97
- <transitions>
98
- S_INTAKE → S_INTAKE : -c + session found → A_RESUME
99
- S_INTAKE → S_SURVEY : target resolved A_INTAKE
100
- S_INTAKE → S_INTAKE : no target ask_question
101
-
102
- S_SURVEY → S_AUDIT : complete
103
- S_AUDIT → S_DIVERGE : complete
104
-
105
- S_DIVERGE → S_FIX : !skip_fix AND actionable findings/ideas
106
- S_DIVERGE → S_GENERALIZE : (skip_fix OR no actionable) AND !skip_generalize
107
- S_DIVERGE S_RECORD : (skip_fix OR no actionable) AND skip_generalize
108
-
109
- S_FIX → S_VERIFY : fix implemented
110
- S_VERIFY → S_GENERALIZE : verified, !skip_generalize
111
- S_VERIFY → S_RECORD : verified, skip_generalize
112
- S_VERIFY → S_FIX : needs_rework
113
-
114
- S_GENERALIZE → S_DISCOVER : similar code found
115
- S_GENERALIZE → S_RECORD : no similar code
116
-
117
- S_DISCOVER S_AUDIT : new component to audit → cross_phase_loops++
118
- S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
119
- S_DISCOVER → S_RECORD : remaining_actionable == 0 OR loops >= max_loops log per-item reasons
120
-
121
- S_RECORD → END : complete
122
- </transitions>
123
-
124
- <actions>
125
-
126
- ### A_INTAKE
127
- 1. Parse arguments: target, flags, `--dimensions` subset
128
- 2. Generate slug, create SESSION_DIR
129
- 3. `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
130
- 4. Derive `phase_goals[]` from flags
131
- 5. Write `session.json` + `understanding.md` section 1, emit Goal Prompt
132
-
133
- Commit: `"odyssey-ui({slug}): INTAKE — parse target and load context"`
134
-
135
- ### A_RESUME
136
- Glob latest session read `session.json` jump to `current_state`.
137
-
138
- ### A_SURVEY
139
- 1. **Design system inventory**: Scan for design tokens, CSS variables, theme imports
140
- 2. **Current state analysis**: Styling patterns, layout strategy, component hierarchy
141
- 3. **CLI-assisted**: `maestro delegate --role analyze --mode analysis` — survey tokens, spacing, typography, hierarchy, consistency
142
- 4. Append evidence phase=survey. Update section 2. Mark G1.
143
-
144
- Commit: `"odyssey-ui({slug}): SURVEY — design token inventory"`
145
-
146
- ### A_AUDIT
147
- Spawn 6 parallel Agents (one per dimension, or `--dimensions` subset):
148
-
149
- | Dimension | Focus |
150
- |-----------|-------|
151
- | visual_hierarchy | Spacing, typography scale, color contrast, alignment, whitespace, visual weight |
152
- | interaction_states | Hover, focus, active, disabled, loading, error, empty, selected states |
153
- | accessibility | WCAG AA contrast, focus management, aria labels, keyboard nav, screen reader |
154
- | responsiveness | Breakpoints, overflow, touch targets, fluid typography, container queries |
155
- | micro_interactions | Transitions, animations, feedback indicators, loading states, progress |
156
- | edge_cases | Long text truncation, empty data, error states, extreme values, i18n, RTL |
157
-
158
- Each returns `[{title, severity, file, line, description, suggestion, dimension}]`.
159
- Merge → evidence phase=audit. Write `audit_result`. Update section 3 with severity matrix. Mark G2.
160
-
161
- Commit: `"odyssey-ui({slug}): AUDIT — 6-dimension review"`
162
-
163
- ### A_DIVERGE
164
- Goes beyond defect fixing — "what would make this delightful?"
165
-
166
- **Step 1 2 parallel Agents:**
167
- - **Polish Agent**: Shadows, borders, transitions, hover states, feedback, empty states, skeleton loading, scroll behavior
168
- - **Delight Agent**: Motion design, progressive disclosure, smart defaults, contextual hints, celebratory feedback, personality in copy
169
-
170
- Each returns `[{idea, category (polish|delight), impact, effort, description, inspiration}]`
171
-
172
- **Step 2 — CLI-assisted**: `maestro delegate --role analyze --mode analysis` — polish opportunities, micro-interactions, visual rhythm, delight moments
173
-
174
- **Step 3 — Consolidate**: Merge audit findings + divergent ideas → prioritized list (severity x impact x effort).
175
- Append evidence phase=diverge. Update section 4. Mark G3.
176
-
177
- Commit: `"odyssey-ui({slug}): DIVERGE — creative exploration"`
178
-
179
- ### A_FIX
180
- Skip if `--skip-fix`.
181
- 1. **Exhaustive fix**: ALL findings/ideas by priority tier (critical → high → medium → low + high-impact ideas). After each tier, re-review — new findings append.
182
- 2. Each fix evidence phase=fix
183
- 3. Normal: ask_question per-fix | `-y`: auto-proceed, record `deferred`
184
-
185
- Commit: `"odyssey-ui({slug}): FIX — implement improvements"`
186
-
187
- ### A_VERIFY
188
- 1. Run tests (lint, unit, visual regression)
189
- 2. `maestro delegate --role review --mode analysis` — visual correctness, interaction states, accessibility, responsive
190
- 3. `needs_rework` S_FIX. `verified` mark G4. Update section 5, write `confirmation`.
191
-
192
- Commit: `"odyssey-ui({slug}): VERIFYvisual verification"`
193
-
194
- ### A_GENERALIZE, A_DISCOVER, A_RECORD
195
- Base shared_actions. UI overrides:
196
- - **A_GENERALIZE** pattern source: audit findings + diverge ideas (severity >= medium OR impact = high)
197
- - **A_RECORD** learnings per Knowledge Persistence table
198
-
199
- **Completion summary:**
200
- ```
201
- --- UI ODYSSEY COMPLETE ---
202
- Target: {target} | Dimensions: {dimensions_audited}
203
- Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
204
- Fix: {fixed_count} applied, verified={yes|skipped}
205
- Patterns: {extracted} ({by_layer})
206
- Scan hits: {total} ({cross_layer} cross-layer)
207
- Issues: {N} created
208
- Decisions: {N} resolved, {M} pending, {K} deferred
209
- Learnings: {N} persisted
210
- Self-iter: {N} rounds
211
- Goals: {done}/{total} ({skipped} skipped)
212
- ---
213
- ```
214
-
215
- </actions>
216
-
217
- <appendix>
218
-
219
- ### `-y` ui-specific points
220
-
221
- | Decision Point | Normal | `-y` |
222
- |---------------|--------|------|
223
- | A_FIX improvement confirmation | ask_question | auto-proceed, deferred |
224
-
225
- ### Goal Prompt convergence rules
226
-
227
- ```
228
- Stop when audit + diverge findings all addressed (fix/issue/decision),
229
- phase_goals_all_done=true. Fix by impact x severity per tier.
230
- Re-review after each tier — new findings append and continue.
231
- Pending decisions must ask_question — no self-resolve.
232
- ```
233
-
234
- </appendix>
235
-
236
- </state_machine>
237
-
238
- <error_codes>
239
- | Code | Severity | Condition | Recovery |
240
- |------|----------|-----------|----------|
241
- | E001 | error | No target specified | Provide target |
242
- | E002 | error | Target path not found | Check path |
243
- | W001 | warning | No design system detected | Proceed with defaults |
244
- | W002 | warning | Some dimension agents failed | Partial coverage |
245
- </error_codes>
246
-
247
- <success_criteria>
248
- - [ ] 6-dimension audit with severity matrix + divergent exploration (polish + delight)
249
- - [ ] Improvements implemented and verified (unless --skip-fix)
250
- - [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
251
- - [ ] Every unfixed finding has individual classification and reason
252
- - [ ] understanding.md section 8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
253
- </success_criteria>
254
-
255
- <next_step_routing>
256
- | Condition | Next |
257
- |-----------|------|
258
- | Finding needs deeper debug | `/odyssey-debug "<finding>"` |
259
- | Issues from discoveries | `/manage-issue list --source ui-odyssey` |
260
- | Design pattern to document | `/spec-add ui "..."` |
261
- | Full review of changes | `/odyssey-review-test-fix <changed-files>` |
262
- | Sibling components to polish | `/odyssey-ui "<sibling>"` |
263
- </next_step_routing>
17
+ <base>@~/.maestro/workflows/odyssey-base.md</base>
18
+
19
+ <purpose>
20
+ survey → 6-dimension audit → divergent exploration → fix → verify → generalize → discover → persist.
21
+ Exhaustive iteration until all findings addressed or deferred.
22
+ </purpose>
23
+
24
+ <boundary>
25
+ **In scope:** Target component/page visual experience optimization — audit 6 dimensions, divergent exploration, fix, generalize to sibling components.
26
+ **Out of scope:** Backend/data/API → `/odyssey-planex` | Deep bug investigation → `/odyssey-debug` | Code quality review → `/odyssey-review-test-fix`
27
+
28
+ **Decision gate** — ONLY these qualify as decisions:
29
+ - Brand/style direction requiring human creative judgment
30
+ - Layout restructuring that changes user flow significantly
31
+ - Requires new design tokens or breaking component API
32
+ </boundary>
33
+
34
+ <context>
35
+ $ARGUMENTS
36
+
37
+ **Target resolution:** Component path → audit component | Page/route → audit page | `staged`/`HEAD` → diff UI changes | Feature area → resolve to components/pages
38
+
39
+ **Flags:** `--dimensions <list>` dimension subset | `--fix-threshold <severity>` | `--skip-fix` audit+diverge only | `--skip-generalize` skip generalize+discover | `--auto` no delegate confirmation | `-y` auto-confirm | `-c` resume | `--heartbeat` /loop heartbeat
40
+
41
+ **Session**: `.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
42
+ **Output**: `session.json` | `evidence.ndjson` | `understanding.md`
43
+
44
+ **Output boundary**: ALL session artifacts MUST target the session directory (`.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`) or `.workflow/state.json` only. Source code modifications during S_FIX are in-scope but MUST be committed per action. NEVER write session artifacts outside these paths.
45
+
46
+ **session.json ui-specific fields:**
47
+ ```json
48
+ { "target": "", "dimensions": [],
49
+ "audit_result": { "dimensions_audited": 0, "finding_count": 0, "severity_distribution": {} },
50
+ "diverge_result": { "improvements_proposed": 0, "creative_ideas": 0 },
51
+ "patterns": [], "confirmation": null, "generalization_stats": null }
52
+ ```
53
+
54
+ **evidence.ndjson phases:** `survey|audit|diverge|fix|discovery|decision|self-iteration`
55
+
56
+ **phase_goals[]:**
57
+
58
+ | ID | Goal | Phase | skip_when |
59
+ |----|------|-------|-----------|
60
+ | G1 | Survey completed | S_SURVEY | — |
61
+ | G2 | Audit completed | S_AUDIT | |
62
+ | G3 | Divergent exploration done | S_DIVERGE | |
63
+ | G4 | Zero remaining: all findings/ideas fixed and verified | S_VERIFY | skip_fix |
64
+ | G5 | Pattern generalized | S_GENERALIZE | skip_generalize |
65
+ | G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
66
+ | G7 | Learnings persisted | S_RECORD | |
67
+
68
+ **understanding.md 8 sections:**
69
+ 1. Target & Design Context S_INTAKE | 2. SurveyS_SURVEY | 3. Audit ← S_AUDIT
70
+ 4. Diverge ← S_DIVERGE | 5. Verify ← S_VERIFY | 6. Generalize ← S_GENERALIZE
71
+ 7. Discover S_DISCOVER | 8. Learnings ← S_RECORD
72
+
73
+ **Knowledge Persistence categories (section 8):**
74
+
75
+ | Category | Content | Follow-up |
76
+ |----------|---------|-----------|
77
+ | Design pattern | Component pattern + applicable scenarios + token references | `/spec-add ui` |
78
+ | Interaction spec | State definitions + transition rules + feedback patterns | `/spec-add ui` |
79
+ | Accessibility rule | WCAG requirement + implementation approach | `/spec-add ui` |
80
+ | Reusable generalization pattern | Pattern signature + application scope | `/spec-add coding` |
81
+ </context>
82
+
83
+ <invariants>
84
+ 1-5 in base. UI-specific:
85
+ 6. **Browser is truth** — verify in real rendering, not just code review
86
+ 7. **Diverge before converge** — explore creatively first, then implement methodically
87
+ 8. **Generalize is mandatory** — S_GENERALIZE and S_DISCOVER execute unless `skip_generalize == true`. "All verified" or context pressure are NOT valid reasons to skip. The phase itself determines whether patterns exist.
88
+ </invariants>
89
+
90
+ <self_iteration>
91
+ Applies to: **S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE**. Logic in base.
92
+ </self_iteration>
93
+
94
+ <execution>
95
+ Follow base execution discipline completely. Actions defined in state_machine below.
96
+
97
+ ### Phase Gates (MANDATORY, BLOCKING)
98
+
99
+ **GATE 1: INTAKESURVEY**
100
+ - REQUIRED: Target resolved, SESSION_DIR created, session.json initialized.
101
+ - REQUIRED: phase_goals[] derived from flags, understanding.md §1 written.
102
+ - BLOCKED if: no target specified (E001) or target path not found (E002).
103
+
104
+ **GATE 2: SURVEY → AUDIT**
105
+ - REQUIRED: Design system inventory + current state analysis completed.
106
+ - REQUIRED: Evidence phase=survey logged, understanding.md §2 updated, G1 marked done.
107
+ - BLOCKED if: survey incomplete token scan and styling analysis must both be attempted.
108
+
109
+ **GATE 3: AUDIT → DIVERGE**
110
+ - REQUIRED: All 6 dimension agents completed (or --dimensions subset), findings merged with severity classification.
111
+ - REQUIRED: audit_result written to session.json, understanding.md §3 with severity matrix, G2 marked done.
112
+ - BLOCKED if: zero dimensions reviewed (W002 partial is allowed, zero is not).
113
+
114
+ **GATE 4: DIVERGE FIX**
115
+ - REQUIRED: Both parallel agents (Polish + Delight) completed, ideas consolidated with audit findings.
116
+ - REQUIRED: diverge_result written, understanding.md §4 updated, G3 marked done.
117
+ - BLOCKED if: divergent exploration not attempted.
118
+
119
+ **GATE 5: FIXVERIFY**
120
+ - REQUIRED: ALL findings/ideas within fix_threshold fixed by priority tier.
121
+ - REQUIRED: Per-fix evidence phase=fix logged.
122
+ - BLOCKED if: tier incomplete — each tier must be fully addressed before advancing.
123
+
124
+ **GATE 6: VERIFY → GENERALIZE**
125
+ - REQUIRED: Tests pass (lint, unit, visual regression), delegate verification completed.
126
+ - REQUIRED: confirmation written, understanding.md §5 updated, G4 marked done.
127
+ - BLOCKED if: needs_rework route back to S_FIX.
128
+
129
+ **GATE 7: GENERALIZE DISCOVER**
130
+ - REQUIRED: ALL 3 layers (syntax/semantic/structural) attempted with evidence logged.
131
+ - REQUIRED: generalization_stats written with by_layer entries for all 3 layers, G5 marked done.
132
+ - BLOCKED if: any layer not attempted (thoroughness floor violation).
133
+
134
+ **GATE 8: DISCOVER → RECORD**
135
+ - REQUIRED: All hits triaged with per-item classification and reason.
136
+ - REQUIRED: remaining_actionable == 0 OR loops >= max_loops with per-item reasons logged.
137
+ - REQUIRED: G6 marked done.
138
+ - BLOCKED if: unclassified hits remain.
139
+
140
+ </execution>
141
+
142
+ <state_machine>
143
+
144
+ <states>
145
+ S_INTAKE → S_SURVEY → S_AUDIT → S_DIVERGE → S_FIX → S_VERIFY → S_GENERALIZE → S_DISCOVER → S_RECORD → END
146
+ </states>
147
+
148
+ <transitions>
149
+ S_INTAKE S_INTAKE : -c + session found → A_RESUME
150
+ S_INTAKE → S_SURVEY : target resolved → A_INTAKE
151
+ S_INTAKE S_INTAKE : no target ask_question
152
+
153
+ S_SURVEY → S_AUDIT : complete
154
+ S_AUDIT → S_DIVERGE : complete
155
+
156
+ S_DIVERGE S_FIX : !skip_fix AND actionable findings/ideas
157
+ S_DIVERGE → S_GENERALIZE : (skip_fix OR no actionable) AND !skip_generalize
158
+ S_DIVERGE S_RECORD : (skip_fix OR no actionable) AND skip_generalize
159
+
160
+ S_FIX → S_VERIFY : fix implemented
161
+ S_VERIFY → S_GENERALIZE : verified, !skip_generalize
162
+ S_VERIFY → S_RECORD : verified, skip_generalize
163
+ S_VERIFY → S_FIX : needs_rework
164
+
165
+ S_GENERALIZE → S_DISCOVER : similar code found
166
+ S_GENERALIZE S_RECORD : all 3 layers scanned with evidence, total_hits == 0
167
+
168
+ S_DISCOVER S_AUDIT : new component to audit cross_phase_loops++
169
+ S_DISCOVER → S_FIX : fixable sibling, !skip_fix → cross_phase_loops++
170
+ S_DISCOVER S_RECORD : remaining_actionable == 0 OR loops >= max_loops → log per-item reasons
171
+
172
+ S_RECORD → END : complete
173
+ </transitions>
174
+
175
+ <actions>
176
+
177
+ ### A_INTAKE
178
+ 1. Parse arguments: target, flags, `--dimensions` subset
179
+ 2. Generate slug, create SESSION_DIR
180
+ 3. `maestro search` + Glob prior sessions + ARCHITECTURE.md + spec load ui/coding
181
+ 4. Derive `phase_goals[]` from flags
182
+ 5. Write `session.json` + `understanding.md` section 1, emit Goal Prompt
183
+
184
+ Commit: `"odyssey-ui({slug}): INTAKE — parse target and load context"`
185
+
186
+ ### A_RESUME
187
+ Glob latest session → read `session.json` → jump to `current_state`.
188
+
189
+ ### A_SURVEY
190
+ 1. **Design system inventory**: Scan for design tokens, CSS variables, theme imports
191
+ 2. **Current state analysis**: Styling patterns, layout strategy, component hierarchy
192
+ 3. **CLI-assisted**: `maestro delegate --role analyze --mode analysis` survey tokens, spacing, typography, hierarchy, consistency
193
+ 4. Append evidence phase=survey. Update section 2. Mark G1.
194
+
195
+ Commit: `"odyssey-ui({slug}): SURVEY — design token inventory"`
196
+
197
+ ### A_AUDIT
198
+ Spawn 6 parallel Agents (one per dimension, or `--dimensions` subset):
199
+
200
+ | Dimension | Focus |
201
+ |-----------|-------|
202
+ | visual_hierarchy | Spacing, typography scale, color contrast, alignment, whitespace, visual weight |
203
+ | interaction_states | Hover, focus, active, disabled, loading, error, empty, selected states |
204
+ | accessibility | WCAG AA contrast, focus management, aria labels, keyboard nav, screen reader |
205
+ | responsiveness | Breakpoints, overflow, touch targets, fluid typography, container queries |
206
+ | micro_interactions | Transitions, animations, feedback indicators, loading states, progress |
207
+ | edge_cases | Long text truncation, empty data, error states, extreme values, i18n, RTL |
208
+
209
+ Each returns `[{title, severity, file, line, description, suggestion, dimension}]`.
210
+ Merge → evidence phase=audit. Write `audit_result`. Update section 3 with severity matrix. Mark G2.
211
+
212
+ Commit: `"odyssey-ui({slug}): AUDIT — 6-dimension review"`
213
+
214
+ ### A_DIVERGE
215
+ Goes beyond defect fixing — "what would make this delightful?"
216
+
217
+ **Step 1 — 2 parallel Agents:**
218
+ - **Polish Agent**: Shadows, borders, transitions, hover states, feedback, empty states, skeleton loading, scroll behavior
219
+ - **Delight Agent**: Motion design, progressive disclosure, smart defaults, contextual hints, celebratory feedback, personality in copy
220
+
221
+ Each returns `[{idea, category (polish|delight), impact, effort, description, inspiration}]`
222
+
223
+ **Step 2 CLI-assisted**: `maestro delegate --role analyze --mode analysis` — polish opportunities, micro-interactions, visual rhythm, delight moments
224
+
225
+ **Step 3 Consolidate**: Merge audit findings + divergent ideas → prioritized list (severity x impact x effort).
226
+ Append evidence phase=diverge. Update section 4. Mark G3.
227
+
228
+ Commit: `"odyssey-ui({slug}): DIVERGE creative exploration"`
229
+
230
+ ### A_FIX
231
+ Skip if `--skip-fix`.
232
+ 1. **Exhaustive fix**: ALL findings/ideas by priority tier (critical → high → medium → low + high-impact ideas). After each tier, re-review — new findings append.
233
+ 2. Each fix → evidence phase=fix
234
+ 3. Normal: ask_question per-fix | `-y`: auto-proceed, record `deferred`
235
+
236
+ Commit: `"odyssey-ui({slug}): FIX — implement improvements"`
237
+
238
+ ### A_VERIFY
239
+ 1. Run tests (lint, unit, visual regression)
240
+ 2. `maestro delegate --role review --mode analysis` — visual correctness, interaction states, accessibility, responsive
241
+ 3. `needs_rework` S_FIX. `verified` mark G4. Update section 5, write `confirmation`.
242
+
243
+ Commit: `"odyssey-ui({slug}): VERIFY visual verification"`
244
+
245
+ ### A_GENERALIZE
246
+
247
+ **MANDATORY — executes unless `skip_generalize == true`. Prior-phase convergence, "all verified," or context pressure are NOT valid skip reasons.**
248
+
249
+ Pattern source: audit findings + diverge ideas (severity >= medium OR impact = high).
250
+
251
+ **Step 1 3-layer pattern extraction** from UI findings and creative improvements:
252
+
253
+ | Layer | Method | Targets |
254
+ |-------|--------|---------|
255
+ | Syntax | Build regex from fix diffs → Grep | Hardcoded px values, missing aria attributes, inline color values, raw z-index |
256
+ | Semantic | Understand UI anti-pattern → Agent scan | Inconsistent spacing scale, missing hover/focus states, keyboard nav gaps, contrast violations |
257
+ | Structural | Find components with same layout/state shape | Sibling components with same template, parallel page layouts, shared form patterns |
258
+
259
+ Write `session.json.patterns[]`: `[{id, source, layer, signature, description, risk, fix_template, confidence}]`
260
+
261
+ **Thoroughness floor:** ALL 3 layers must be attempted and logged. Each layer records search method, scope, hit count in evidence phase=generalization. "No hits" requires all 3 layers to return 0 with logged evidence.
262
+
263
+ **Step 2 — 4-agent concurrent scan** (single message, 4 Agents):
264
+
265
+ | Agent | Strategy | Scope |
266
+ |-------|----------|-------|
267
+ | Syntax grep | Grep regex from pattern signatures | Full project |
268
+ | Semantic scan | UI anti-pattern check (states, a11y, spacing) | Related components |
269
+ | Structural match | Find structurally similar components/pages | Full project |
270
+ | Historical grep | `git log -S` for pattern signatures | Git history |
271
+
272
+ **Step 3 — Cross-layer dedup:** multi-layer hit → boost | single-layer → `needs_review` | historically fixed → `regression_risk`
273
+
274
+ **Step 4 — Iterative deepening:** Component with ≥3 hits → targeted deep scan (max 1 round).
275
+
276
+ **Step 5 — Persist:** Update understanding.md section 6 + write `session.json.generalization_stats`:
277
+ ```json
278
+ {"patterns_extracted": 0, "total_hits": 0, "cross_layer_confirmed": 0, "regression_risks": 0, "by_layer": {"syntax": 0, "semantic": 0, "structural": 0}, "deepening_triggered": false}
279
+ ```
280
+
281
+ **Transition guard:** `S_GENERALIZE → S_RECORD` requires `by_layer` has entries for all 3 layers with search evidence logged. Mark G5 done.
282
+
283
+ Commit: `"odyssey-ui({slug}): GENERALIZE — pattern scan complete"`
284
+
285
+ ### A_DISCOVER
286
+
287
+ **Executes whenever `total_hits > 0`. Cannot be skipped without `skip_generalize == true`.**
288
+
289
+ 1. **Triage** each hit with ±10 lines context → classify:
290
+ - `bug` — confirmed UI defect in sibling component (missing state, broken a11y, inconsistent token)
291
+ - `risk` — potential visual/UX degradation
292
+ - `safe` — false positive (must log individual reason — blanket "pre-existing" forbidden)
293
+
294
+ 2. **Route:**
295
+
296
+ | Classification | Action |
297
+ |---------------|--------|
298
+ | new component needing audit | Route to S_AUDIT, `cross_phase_loops++` |
299
+ | fixable sibling (same pattern) | Immediate fix → back to S_FIX, `cross_phase_loops++` |
300
+ | risk + guard addable | Fix directly |
301
+ | risk + design decision needed | Create issue |
302
+ | safe | Skip with logged per-item reason |
303
+
304
+ Normal: ask_question per hit | `-y`: auto-fix with template, create issue for rest
305
+
306
+ 3. **Cross-phase loops:** `loops >= max_loops` → must log per-item reasons, advance to S_RECORD.
307
+
308
+ 4. Append evidence phase=discovery. Update understanding.md section 7. Mark G6 done.
309
+
310
+ Commit: `"odyssey-ui({slug}): DISCOVER — sibling triage complete"`
311
+
312
+ ### A_RECORD
313
+
314
+ 1. Finalize understanding.md section 8 — learnings by Knowledge Persistence categories:
315
+ - Design pattern: component pattern + applicable scenarios + token references → `/spec-add ui`
316
+ - Interaction spec: state definitions + transition rules + feedback patterns → `/spec-add ui`
317
+ - Accessibility rule: WCAG requirement + implementation approach → `/spec-add ui`
318
+ - Reusable generalization pattern: signature + application scope → `/spec-add coding`
319
+
320
+ 2. Mark G7 done. Pending decisions: Normal → ask_question | `-y` → skip (show deferred count).
321
+
322
+ 3. **Goal audit (hardened):**
323
+ - `done` → confirmed
324
+ - `skipped` → confirmed ONLY if corresponding `skip_when` flag is true
325
+ - **Hard rule:** G5 and G6 CANNOT be `skipped` unless `skip_generalize == true`. Pending without flag → `failed` (Normal: ask_question | `-y`: record `failed`)
326
+ - `phase_goals_all_done = true` only when all goals pass this audit
327
+
328
+ 4. `current_state = "COMPLETED"`, emit completion summary.
329
+
330
+ **Completion summary:**
331
+ ```
332
+ --- UI ODYSSEY COMPLETE ---
333
+ Target: {target} | Dimensions: {dimensions_audited}
334
+ Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
335
+ Fix: {fixed_count} applied, verified={yes|skipped}
336
+ Patterns: {extracted} ({by_layer})
337
+ Scan hits: {total} ({cross_layer} cross-layer)
338
+ Issues: {N} created
339
+ Decisions: {N} resolved, {M} pending, {K} deferred
340
+ Learnings: {N} persisted
341
+ Self-iter: {N} rounds
342
+ Goals: {done}/{total} ({skipped} skipped)
343
+ ---
344
+ ```
345
+
346
+ Commit: `"odyssey-ui({slug}): RECORD — summary and knowledge persistence"`
347
+
348
+ </actions>
349
+
350
+ <appendix>
351
+
352
+ ### `-y` ui-specific points
353
+
354
+ | Decision Point | Normal | `-y` |
355
+ |---------------|--------|------|
356
+ | A_FIX improvement confirmation | ask_question | auto-proceed, deferred |
357
+ | A_DISCOVER hit routing | ask_question | auto-fix with template, create issue for rest |
358
+
359
+ ### Goal Prompt convergence rules
360
+
361
+ ```
362
+ Stop when audit + diverge findings all addressed (fix/issue/decision),
363
+ phase_goals_all_done=true. Fix by impact x severity per tier.
364
+ Re-review after each tier — new findings append and continue.
365
+ Pending decisions must ask_question — no self-resolve.
366
+ ```
367
+
368
+ </appendix>
369
+
370
+ </state_machine>
371
+
372
+ <error_codes>
373
+ | Code | Severity | Condition | Recovery |
374
+ |------|----------|-----------|----------|
375
+ | E001 | error | No target specified | Provide target |
376
+ | E002 | error | Target path not found | Check path |
377
+ | W001 | warning | No design system detected | Proceed with defaults |
378
+ | W002 | warning | Some dimension agents failed | Partial coverage |
379
+ | W003 | warning | Generalization 0 hits after full 3-layer scan | Advance to S_RECORD (requires all 3 layers attempted with evidence) |
380
+ </error_codes>
381
+
382
+ <success_criteria>
383
+ - [ ] 6-dimension audit with severity matrix + divergent exploration (polish + delight)
384
+ - [ ] Improvements implemented and verified (unless --skip-fix)
385
+ - [ ] Multi-layer generalization + discoveries classified (unless --skip-generalize)
386
+ - [ ] Every unfixed finding has individual classification and reason
387
+ - [ ] understanding.md section 8 finalized; phase_goals G1-G7 tracked; `-y` no blocking prompts
388
+ </success_criteria>
389
+
390
+ <next_step_routing>
391
+ | Condition | Next |
392
+ |-----------|------|
393
+ | Finding needs deeper debug | `/odyssey-debug "<finding>"` |
394
+ | Issues from discoveries | `/manage-issue list --source ui-odyssey` |
395
+ | Design pattern to document | `/spec-add ui "..."` |
396
+ | Full review of changes | `/odyssey-review-test-fix <changed-files>` |
397
+ | Sibling components to polish | `/odyssey-ui "<sibling>"` |
398
+ </next_step_routing>