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