oh-my-codex 0.16.3 → 0.17.0

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 (339) hide show
  1. package/Cargo.lock +5 -5
  2. package/Cargo.toml +1 -1
  3. package/README.md +3 -3
  4. package/dist/catalog/__tests__/generator.test.js +2 -0
  5. package/dist/catalog/__tests__/generator.test.js.map +1 -1
  6. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +9 -0
  7. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -1
  8. package/dist/cli/__tests__/cleanup.test.js +27 -0
  9. package/dist/cli/__tests__/cleanup.test.js.map +1 -1
  10. package/dist/cli/__tests__/codex-plugin-layout.test.js +7 -5
  11. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
  12. package/dist/cli/__tests__/doctor-warning-copy.test.js +175 -7
  13. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  14. package/dist/cli/__tests__/index.test.js +147 -12
  15. package/dist/cli/__tests__/index.test.js.map +1 -1
  16. package/dist/cli/__tests__/mcp-serve.test.js +4 -0
  17. package/dist/cli/__tests__/mcp-serve.test.js.map +1 -1
  18. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +2 -0
  19. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
  20. package/dist/cli/__tests__/ralph.test.js +47 -0
  21. package/dist/cli/__tests__/ralph.test.js.map +1 -1
  22. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +10 -5
  23. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -1
  24. package/dist/cli/__tests__/setup-install-mode.test.js +299 -27
  25. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  26. package/dist/cli/__tests__/setup-refresh.test.js +85 -3
  27. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  28. package/dist/cli/__tests__/setup-scope.test.js +1 -1
  29. package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
  30. package/dist/cli/__tests__/setup-skills-overwrite.test.js +2 -1
  31. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  32. package/dist/cli/__tests__/team.test.js +108 -0
  33. package/dist/cli/__tests__/team.test.js.map +1 -1
  34. package/dist/cli/__tests__/ultragoal.test.js +91 -0
  35. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  36. package/dist/cli/__tests__/uninstall.test.js +54 -8
  37. package/dist/cli/__tests__/uninstall.test.js.map +1 -1
  38. package/dist/cli/cleanup.d.ts.map +1 -1
  39. package/dist/cli/cleanup.js +8 -4
  40. package/dist/cli/cleanup.js.map +1 -1
  41. package/dist/cli/codex-feature-probe.d.ts +9 -0
  42. package/dist/cli/codex-feature-probe.d.ts.map +1 -0
  43. package/dist/cli/codex-feature-probe.js +28 -0
  44. package/dist/cli/codex-feature-probe.js.map +1 -0
  45. package/dist/cli/doctor.d.ts +1 -0
  46. package/dist/cli/doctor.d.ts.map +1 -1
  47. package/dist/cli/doctor.js +214 -23
  48. package/dist/cli/doctor.js.map +1 -1
  49. package/dist/cli/index.d.ts +17 -4
  50. package/dist/cli/index.d.ts.map +1 -1
  51. package/dist/cli/index.js +152 -24
  52. package/dist/cli/index.js.map +1 -1
  53. package/dist/cli/mcp-parity.js +8 -8
  54. package/dist/cli/mcp-parity.js.map +1 -1
  55. package/dist/cli/mcp-serve.d.ts.map +1 -1
  56. package/dist/cli/mcp-serve.js +4 -0
  57. package/dist/cli/mcp-serve.js.map +1 -1
  58. package/dist/cli/plugin-marketplace.d.ts +23 -0
  59. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  60. package/dist/cli/plugin-marketplace.js +203 -1
  61. package/dist/cli/plugin-marketplace.js.map +1 -1
  62. package/dist/cli/ralph.d.ts.map +1 -1
  63. package/dist/cli/ralph.js +21 -0
  64. package/dist/cli/ralph.js.map +1 -1
  65. package/dist/cli/setup-preferences.d.ts +4 -0
  66. package/dist/cli/setup-preferences.d.ts.map +1 -1
  67. package/dist/cli/setup-preferences.js +7 -0
  68. package/dist/cli/setup-preferences.js.map +1 -1
  69. package/dist/cli/setup.d.ts +5 -3
  70. package/dist/cli/setup.d.ts.map +1 -1
  71. package/dist/cli/setup.js +140 -51
  72. package/dist/cli/setup.js.map +1 -1
  73. package/dist/cli/ultragoal.d.ts +1 -1
  74. package/dist/cli/ultragoal.d.ts.map +1 -1
  75. package/dist/cli/ultragoal.js +70 -5
  76. package/dist/cli/ultragoal.js.map +1 -1
  77. package/dist/cli/uninstall.d.ts +2 -0
  78. package/dist/cli/uninstall.d.ts.map +1 -1
  79. package/dist/cli/uninstall.js +12 -3
  80. package/dist/cli/uninstall.js.map +1 -1
  81. package/dist/config/__tests__/codex-feature-flags.test.d.ts +2 -0
  82. package/dist/config/__tests__/codex-feature-flags.test.d.ts.map +1 -0
  83. package/dist/config/__tests__/codex-feature-flags.test.js +35 -0
  84. package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -0
  85. package/dist/config/__tests__/codex-hooks.test.js +143 -9
  86. package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
  87. package/dist/config/__tests__/generator-idempotent.test.js +85 -9
  88. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  89. package/dist/config/__tests__/generator-notify.test.js +116 -11
  90. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  91. package/dist/config/__tests__/wiki-config-contract.test.js +6 -3
  92. package/dist/config/__tests__/wiki-config-contract.test.js.map +1 -1
  93. package/dist/config/codex-feature-flags.d.ts +21 -0
  94. package/dist/config/codex-feature-flags.d.ts.map +1 -0
  95. package/dist/config/codex-feature-flags.js +56 -0
  96. package/dist/config/codex-feature-flags.js.map +1 -0
  97. package/dist/config/codex-hooks.d.ts +14 -13
  98. package/dist/config/codex-hooks.d.ts.map +1 -1
  99. package/dist/config/codex-hooks.js +108 -8
  100. package/dist/config/codex-hooks.js.map +1 -1
  101. package/dist/config/generator.d.ts +15 -3
  102. package/dist/config/generator.d.ts.map +1 -1
  103. package/dist/config/generator.js +233 -129
  104. package/dist/config/generator.js.map +1 -1
  105. package/dist/config/omx-first-party-mcp.d.ts +3 -1
  106. package/dist/config/omx-first-party-mcp.d.ts.map +1 -1
  107. package/dist/config/omx-first-party-mcp.js +9 -2
  108. package/dist/config/omx-first-party-mcp.js.map +1 -1
  109. package/dist/hooks/__tests__/design-skill.test.d.ts +2 -0
  110. package/dist/hooks/__tests__/design-skill.test.d.ts.map +1 -0
  111. package/dist/hooks/__tests__/design-skill.test.js +55 -0
  112. package/dist/hooks/__tests__/design-skill.test.js.map +1 -0
  113. package/dist/hooks/__tests__/keyword-detector.test.js +92 -2
  114. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  115. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js +125 -1
  116. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js.map +1 -1
  117. package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +265 -0
  118. package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
  119. package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts +2 -0
  120. package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts.map +1 -0
  121. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js +84 -0
  122. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -0
  123. package/dist/hooks/__tests__/skill-guidance-contract.test.js +41 -0
  124. package/dist/hooks/__tests__/skill-guidance-contract.test.js.map +1 -1
  125. package/dist/hooks/agents-overlay.js +2 -2
  126. package/dist/hooks/agents-overlay.js.map +1 -1
  127. package/dist/hooks/keyword-detector.d.ts +1 -0
  128. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  129. package/dist/hooks/keyword-detector.js +12 -6
  130. package/dist/hooks/keyword-detector.js.map +1 -1
  131. package/dist/hooks/keyword-registry.d.ts.map +1 -1
  132. package/dist/hooks/keyword-registry.js +2 -0
  133. package/dist/hooks/keyword-registry.js.map +1 -1
  134. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  135. package/dist/hooks/prompt-guidance-contract.js +47 -2
  136. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  137. package/dist/hud/__tests__/state.test.js +164 -0
  138. package/dist/hud/__tests__/state.test.js.map +1 -1
  139. package/dist/hud/state.d.ts.map +1 -1
  140. package/dist/hud/state.js +4 -5
  141. package/dist/hud/state.js.map +1 -1
  142. package/dist/mcp/__tests__/bootstrap.test.js +3 -0
  143. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  144. package/dist/mcp/__tests__/hermes-bridge.test.d.ts +2 -0
  145. package/dist/mcp/__tests__/hermes-bridge.test.d.ts.map +1 -0
  146. package/dist/mcp/__tests__/hermes-bridge.test.js +374 -0
  147. package/dist/mcp/__tests__/hermes-bridge.test.js.map +1 -0
  148. package/dist/mcp/__tests__/state-paths.test.js +155 -11
  149. package/dist/mcp/__tests__/state-paths.test.js.map +1 -1
  150. package/dist/mcp/__tests__/state-server.test.js +166 -0
  151. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  152. package/dist/mcp/bootstrap.d.ts +1 -1
  153. package/dist/mcp/bootstrap.d.ts.map +1 -1
  154. package/dist/mcp/bootstrap.js +2 -0
  155. package/dist/mcp/bootstrap.js.map +1 -1
  156. package/dist/mcp/hermes-bridge.d.ts +81 -0
  157. package/dist/mcp/hermes-bridge.d.ts.map +1 -0
  158. package/dist/mcp/hermes-bridge.js +400 -0
  159. package/dist/mcp/hermes-bridge.js.map +1 -0
  160. package/dist/mcp/hermes-server.d.ts +269 -0
  161. package/dist/mcp/hermes-server.d.ts.map +1 -0
  162. package/dist/mcp/hermes-server.js +121 -0
  163. package/dist/mcp/hermes-server.js.map +1 -0
  164. package/dist/mcp/state-paths.d.ts.map +1 -1
  165. package/dist/mcp/state-paths.js +64 -11
  166. package/dist/mcp/state-paths.js.map +1 -1
  167. package/dist/modes/__tests__/base-session-scope.test.js +22 -0
  168. package/dist/modes/__tests__/base-session-scope.test.js.map +1 -1
  169. package/dist/modes/__tests__/base-tmux-pane.test.js +88 -27
  170. package/dist/modes/__tests__/base-tmux-pane.test.js.map +1 -1
  171. package/dist/modes/base.d.ts.map +1 -1
  172. package/dist/modes/base.js +5 -0
  173. package/dist/modes/base.js.map +1 -1
  174. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts +2 -0
  175. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts.map +1 -0
  176. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js +316 -0
  177. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -0
  178. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts +2 -0
  179. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts.map +1 -0
  180. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js +481 -0
  181. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js.map +1 -0
  182. package/dist/planning/__tests__/artifacts.test.js +533 -4
  183. package/dist/planning/__tests__/artifacts.test.js.map +1 -1
  184. package/dist/planning/__tests__/context-pack-status.test.js +524 -0
  185. package/dist/planning/__tests__/context-pack-status.test.js.map +1 -1
  186. package/dist/planning/__tests__/markdown-structure.test.d.ts +2 -0
  187. package/dist/planning/__tests__/markdown-structure.test.d.ts.map +1 -0
  188. package/dist/planning/__tests__/markdown-structure.test.js +459 -0
  189. package/dist/planning/__tests__/markdown-structure.test.js.map +1 -0
  190. package/dist/planning/__tests__/ready-context-pack-role-refs.test.js +523 -1
  191. package/dist/planning/__tests__/ready-context-pack-role-refs.test.js.map +1 -1
  192. package/dist/planning/artifacts.d.ts +1 -1
  193. package/dist/planning/artifacts.d.ts.map +1 -1
  194. package/dist/planning/artifacts.js +227 -28
  195. package/dist/planning/artifacts.js.map +1 -1
  196. package/dist/planning/context-pack-status.d.ts +25 -0
  197. package/dist/planning/context-pack-status.d.ts.map +1 -1
  198. package/dist/planning/context-pack-status.js +272 -31
  199. package/dist/planning/context-pack-status.js.map +1 -1
  200. package/dist/planning/markdown-structure.d.ts +20 -0
  201. package/dist/planning/markdown-structure.d.ts.map +1 -0
  202. package/dist/planning/markdown-structure.js +137 -0
  203. package/dist/planning/markdown-structure.js.map +1 -0
  204. package/dist/ralph/__tests__/completion-audit.test.d.ts +2 -0
  205. package/dist/ralph/__tests__/completion-audit.test.d.ts.map +1 -0
  206. package/dist/ralph/__tests__/completion-audit.test.js +121 -0
  207. package/dist/ralph/__tests__/completion-audit.test.js.map +1 -0
  208. package/dist/ralph/completion-audit.d.ts +8 -0
  209. package/dist/ralph/completion-audit.d.ts.map +1 -0
  210. package/dist/ralph/completion-audit.js +99 -0
  211. package/dist/ralph/completion-audit.js.map +1 -0
  212. package/dist/scripts/__tests__/codex-native-hook.test.js +407 -15
  213. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  214. package/dist/scripts/__tests__/notify-dispatcher.test.d.ts +2 -0
  215. package/dist/scripts/__tests__/notify-dispatcher.test.d.ts.map +1 -0
  216. package/dist/scripts/__tests__/notify-dispatcher.test.js +126 -0
  217. package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -0
  218. package/dist/scripts/codex-native-hook.d.ts +1 -0
  219. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  220. package/dist/scripts/codex-native-hook.js +177 -71
  221. package/dist/scripts/codex-native-hook.js.map +1 -1
  222. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  223. package/dist/scripts/codex-native-pre-post.js +4 -2
  224. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  225. package/dist/scripts/notify-dispatcher.js +30 -1
  226. package/dist/scripts/notify-dispatcher.js.map +1 -1
  227. package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -1
  228. package/dist/scripts/notify-hook/tmux-injection.js +91 -2
  229. package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
  230. package/dist/scripts/notify-hook.js +3 -1
  231. package/dist/scripts/notify-hook.js.map +1 -1
  232. package/dist/state/__tests__/workflow-transition.test.js +102 -27
  233. package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
  234. package/dist/state/mode-state-context.d.ts +2 -0
  235. package/dist/state/mode-state-context.d.ts.map +1 -1
  236. package/dist/state/mode-state-context.js +21 -0
  237. package/dist/state/mode-state-context.js.map +1 -1
  238. package/dist/state/operations.d.ts.map +1 -1
  239. package/dist/state/operations.js +9 -3
  240. package/dist/state/operations.js.map +1 -1
  241. package/dist/state/skill-active.d.ts +7 -0
  242. package/dist/state/skill-active.d.ts.map +1 -1
  243. package/dist/state/skill-active.js +25 -8
  244. package/dist/state/skill-active.js.map +1 -1
  245. package/dist/state/workflow-transition-reconcile.d.ts +1 -0
  246. package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
  247. package/dist/state/workflow-transition-reconcile.js +22 -15
  248. package/dist/state/workflow-transition-reconcile.js.map +1 -1
  249. package/dist/state/workflow-transition.js +3 -3
  250. package/dist/state/workflow-transition.js.map +1 -1
  251. package/dist/team/__tests__/approved-execution.test.js +39 -0
  252. package/dist/team/__tests__/approved-execution.test.js.map +1 -1
  253. package/dist/team/__tests__/runtime.test.js +5 -0
  254. package/dist/team/__tests__/runtime.test.js.map +1 -1
  255. package/dist/team/__tests__/scaling.test.js +497 -2
  256. package/dist/team/__tests__/scaling.test.js.map +1 -1
  257. package/dist/team/__tests__/state-root.test.js +1 -1
  258. package/dist/team/__tests__/state-root.test.js.map +1 -1
  259. package/dist/team/__tests__/worker-bootstrap.test.js +8 -0
  260. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  261. package/dist/team/approved-execution.d.ts.map +1 -1
  262. package/dist/team/approved-execution.js +3 -0
  263. package/dist/team/approved-execution.js.map +1 -1
  264. package/dist/team/scaling.d.ts.map +1 -1
  265. package/dist/team/scaling.js +43 -0
  266. package/dist/team/scaling.js.map +1 -1
  267. package/dist/team/state-root.d.ts.map +1 -1
  268. package/dist/team/state-root.js +4 -0
  269. package/dist/team/state-root.js.map +1 -1
  270. package/dist/team/state.d.ts.map +1 -1
  271. package/dist/team/state.js +2 -6
  272. package/dist/team/state.js.map +1 -1
  273. package/dist/ultragoal/__tests__/artifacts.test.js +245 -1
  274. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  275. package/dist/ultragoal/__tests__/docs-contract.test.js +21 -0
  276. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  277. package/dist/ultragoal/artifacts.d.ts +52 -2
  278. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  279. package/dist/ultragoal/artifacts.js +301 -15
  280. package/dist/ultragoal/artifacts.js.map +1 -1
  281. package/dist/utils/__tests__/paths.test.js +31 -1
  282. package/dist/utils/__tests__/paths.test.js.map +1 -1
  283. package/dist/utils/paths.d.ts +6 -0
  284. package/dist/utils/paths.d.ts.map +1 -1
  285. package/dist/utils/paths.js +18 -0
  286. package/dist/utils/paths.js.map +1 -1
  287. package/dist/wiki/lifecycle.js +4 -4
  288. package/dist/wiki/lifecycle.js.map +1 -1
  289. package/package.json +1 -1
  290. package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
  291. package/plugins/oh-my-codex/.mcp.json +13 -5
  292. package/plugins/oh-my-codex/skills/analyze/SKILL.md +0 -2
  293. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +2 -2
  294. package/plugins/oh-my-codex/skills/code-review/SKILL.md +1 -3
  295. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +5 -7
  296. package/plugins/oh-my-codex/skills/design/SKILL.md +180 -0
  297. package/plugins/oh-my-codex/skills/doctor/SKILL.md +2 -2
  298. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +3 -3
  299. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +3 -3
  300. package/plugins/oh-my-codex/skills/plan/SKILL.md +3 -6
  301. package/plugins/oh-my-codex/skills/ralph/SKILL.md +9 -10
  302. package/plugins/oh-my-codex/skills/skill/SKILL.md +2 -1
  303. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +36 -3
  304. package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +175 -64
  305. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +8 -8
  306. package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +2 -2
  307. package/plugins/oh-my-codex/skills/wiki/SKILL.md +13 -13
  308. package/skills/analyze/SKILL.md +0 -2
  309. package/skills/ask-claude/SKILL.md +5 -3
  310. package/skills/ask-gemini/SKILL.md +5 -3
  311. package/skills/autopilot/SKILL.md +2 -2
  312. package/skills/code-review/SKILL.md +1 -3
  313. package/skills/deep-interview/SKILL.md +5 -7
  314. package/skills/design/SKILL.md +180 -0
  315. package/skills/doctor/SKILL.md +2 -2
  316. package/skills/ecomode/SKILL.md +105 -1
  317. package/skills/frontend-ui-ux/SKILL.md +6 -24
  318. package/skills/git-master/SKILL.md +2 -4
  319. package/skills/omx-setup/SKILL.md +3 -3
  320. package/skills/pipeline/SKILL.md +3 -3
  321. package/skills/plan/SKILL.md +3 -6
  322. package/skills/ralph/SKILL.md +9 -10
  323. package/skills/skill/SKILL.md +2 -1
  324. package/skills/swarm/SKILL.md +5 -3
  325. package/skills/tdd/SKILL.md +95 -1
  326. package/skills/ultragoal/SKILL.md +36 -3
  327. package/skills/ultraqa/SKILL.md +175 -64
  328. package/skills/ultrawork/SKILL.md +8 -8
  329. package/skills/visual-ralph/SKILL.md +2 -2
  330. package/skills/web-clone/SKILL.md +348 -1
  331. package/skills/wiki/SKILL.md +13 -13
  332. package/src/scripts/__tests__/codex-native-hook.test.ts +437 -14
  333. package/src/scripts/__tests__/notify-dispatcher.test.ts +153 -0
  334. package/src/scripts/codex-native-hook.ts +205 -61
  335. package/src/scripts/codex-native-pre-post.ts +4 -1
  336. package/src/scripts/notify-dispatcher.ts +40 -1
  337. package/src/scripts/notify-hook/tmux-injection.ts +110 -3
  338. package/src/scripts/notify-hook.ts +3 -1
  339. package/templates/catalog-manifest.json +9 -2
@@ -34,15 +34,48 @@ Loop until `omx ultragoal status` reports all goals complete:
34
34
  4. If no active Codex goal exists, call `create_goal` with the printed payload. In aggregate mode, if the same aggregate Codex objective is already active, continue the current OMX story without creating a new Codex goal.
35
35
  5. Complete the current OMX story only.
36
36
  6. Run a completion audit against the story objective and real artifacts/tests.
37
- 7. In aggregate mode, do **not** call `update_goal` for intermediate stories; checkpoint with a fresh `get_goal` snapshot whose aggregate objective is still `active`. On the final story only, call `update_goal({status: "complete"})`, then call `get_goal` again for a fresh `complete` snapshot.
38
- 8. Checkpoint the durable ledger with that snapshot:
39
- `omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<evidence>" --codex-goal-json <get_goal-json-or-path>`
37
+ 7. In aggregate mode, do **not** call `update_goal` for intermediate stories; checkpoint with a fresh `get_goal` snapshot whose aggregate objective is still `active`. On the final story only, first run the mandatory final cleanup/review gate below; call `update_goal({status: "complete"})` only after that gate is clean, then call `get_goal` again for a fresh `complete` snapshot.
38
+ 8. Checkpoint the durable ledger with that snapshot. Intermediate aggregate checkpoints use only `--codex-goal-json`; final clean checkpoints also require `--quality-gate-json`:
39
+ `omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<evidence>" --codex-goal-json <get_goal-json-or-path> [--quality-gate-json <quality-gate-json-or-path>]`
40
40
  9. If blocked or failed, checkpoint failure:
41
41
  `omx ultragoal checkpoint --goal-id <id> --status failed --evidence "<blocker/evidence>"`
42
42
  10. For legacy per-story completed-goal blockers, preserve the non-terminal blocker with:
43
43
  `omx ultragoal checkpoint --goal-id <id> --status blocked --evidence "<completed legacy Codex goal blocks create_goal in this thread>" --codex-goal-json <get_goal-json-or-path>`
44
44
  11. Resume failed goals with `omx ultragoal complete-goals --retry-failed`.
45
45
 
46
+
47
+ ## Mandatory final cleanup and review gate
48
+
49
+ The final ultragoal story is not complete until the active agent has run the final quality gate:
50
+
51
+ 1. Run targeted verification for the story.
52
+ 2. Run `ai-slop-cleaner` on changed files only; if there are no relevant edits, the cleaner still runs and records a passed/no-op report.
53
+ 3. Rerun verification after the cleaner pass.
54
+ 4. Run `$code-review`. Clean means `codeReview.recommendation: "APPROVE"` and `codeReview.architectStatus: "CLEAR"`; `COMMENT`, `WATCH`, `REQUEST CHANGES`, and `BLOCK` are non-clean.
55
+ 5. If review is non-clean, do **not** call `update_goal`. Record durable blocker work instead:
56
+
57
+ ```sh
58
+ omx ultragoal record-review-blockers --goal-id <id> --title "Resolve final code-review blockers" --objective "<blocker-resolution objective>" --evidence "<review findings>" --codex-goal-json <active-get-goal-json-or-path>
59
+ ```
60
+
61
+ This marks the current story `review_blocked`, appends a pending blocker-resolution story, keeps the Codex goal active, and lets `omx ultragoal complete-goals` start the blocker next. In legacy per-story mode, the blocker may need a fresh/available Codex goal context because the old per-story Codex goal remains active/incomplete.
62
+
63
+ 6. If review is clean, call `update_goal({status: "complete"})`, call `get_goal`, and checkpoint with a structured final gate:
64
+
65
+ ```sh
66
+ omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<tests/files/review evidence>" --codex-goal-json <fresh-complete-get-goal-json-or-path> --quality-gate-json <quality-gate-json-or-path>
67
+ ```
68
+
69
+ `--quality-gate-json` must include:
70
+
71
+ ```json
72
+ {
73
+ "aiSlopCleaner": { "status": "passed", "evidence": "cleaner report" },
74
+ "verification": { "status": "passed", "commands": ["npm test"], "evidence": "post-cleaner verification" },
75
+ "codeReview": { "recommendation": "APPROVE", "architectStatus": "CLEAR", "evidence": "final review synthesis" }
76
+ }
77
+ ```
78
+
46
79
  ## Constraints
47
80
 
48
81
  - The shell command cannot directly invoke Codex interactive `/goal`; it emits a model-facing handoff for the active Codex agent.
@@ -1,21 +1,22 @@
1
1
  ---
2
2
  name: ultraqa
3
- description: QA cycling workflow - test, verify, fix, repeat until goal met
3
+ description: Adversarial dynamic e2e QA workflow - generate hostile scenarios, test, verify, fix, report, and clean up
4
4
  ---
5
5
 
6
6
  # UltraQA Skill
7
7
 
8
- [ULTRAQA ACTIVATED - AUTONOMOUS QA CYCLING]
8
+ ## Operating Contract
9
9
 
10
- ## Overview
11
-
12
- ## GPT-5.5 Guidance Alignment
10
+ - Use outcome-first framing with concise, evidence-dense progress and completion reporting.
11
+ - Treat newer user updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints.
12
+ - If the user says `continue`, advance the current verified next step instead of restarting discovery.
13
+ - UltraQA is not satisfied by a shallow build/lint/typecheck/test checklist. It must exercise the requested behavior through adversarial dynamic e2e scenarios whenever the target can be run, simulated, or harnessed safely.
13
14
 
14
- Use the shared workflow guidance pattern: outcome-first framing, concise visible updates for multi-step QA, local overrides for the active workflow branch, validation proportional to risk, explicit stop rules, and automatic continuation for safe reversible steps. Ask only for material, destructive, credentialed, external-production, or preference-dependent branches.
15
+ [ULTRAQA ACTIVATED - ADVERSARIAL DYNAMIC E2E QA CYCLING]
15
16
 
16
- You are now in **ULTRAQA** mode - an autonomous QA cycling workflow that runs until your quality goal is met.
17
+ ## Overview
17
18
 
18
- **Cycle**: qa-tester architect verification → fix → repeat
19
+ UltraQA finds real behavior failures by combining normal verification commands with generated end-to-end scenarios, hostile user modeling, temporary harnesses when useful, and a structured evidence report. The workflow repeats test diagnose → fix → retest until the goal is met, a bounded stop condition is reached, or a safety boundary blocks further execution.
19
20
 
20
21
  ## Goal Parsing
21
22
 
@@ -23,121 +24,231 @@ Parse the goal from arguments. Supported formats:
23
24
 
24
25
  | Invocation | Goal Type | What to Check |
25
26
  |------------|-----------|---------------|
26
- | `/ultraqa --tests` | tests | All test suites pass |
27
- | `/ultraqa --build` | build | Build succeeds with exit 0 |
28
- | `/ultraqa --lint` | lint | No lint errors |
29
- | `/ultraqa --typecheck` | typecheck | No TypeScript errors |
30
- | `/ultraqa --custom "pattern"` | custom | Custom success pattern in output |
27
+ | `/ultraqa --tests` | tests | Existing tests plus adversarial dynamic e2e scenarios for the changed behavior |
28
+ | `/ultraqa --build` | build | Build succeeds and generated smoke/e2e probes still run against the built artifact when applicable |
29
+ | `/ultraqa --lint` | lint | Lint passes and no generated harness/test artifact violates project hygiene |
30
+ | `/ultraqa --typecheck` | typecheck | Typecheck passes and generated typed harnesses compile when applicable |
31
+ | `/ultraqa --custom "pattern"` | custom | Custom success pattern is verified against behavior, not trusted as misleading success output |
32
+ | `/ultraqa --interactive` | interactive | CLI/service behavior is tested with generated hostile and edge-case interactions |
33
+
34
+ If no structured goal is provided, interpret the argument as a custom behavior goal and derive a runnable e2e strategy from repository context.
35
+
36
+ ## Required Scenario Matrix
37
+
38
+ Before declaring success, create and maintain a scenario matrix. Each row must include: scenario id, intent, user/attacker model, setup, command or harness, expected signal, actual result, fixes applied, evidence, and cleanup status.
39
+
40
+ The matrix must include normal-path coverage plus adversarial dynamic e2e scenarios selected from the current goal and codebase. Unless clearly irrelevant or impossible, include these hostile and edge-case classes:
41
+
42
+ 1. **Malformed input**: invalid JSON, missing fields, invalid flags, oversized strings, unusual Unicode, path traversal-like values, and corrupted state files.
43
+ 2. **Repeated interruptions**: repeated `continue`, stop/cancel/abort wording, interrupted command output, and retries after partial progress.
44
+ 3. **Prompt injection attempts**: user text that tries to override instructions, exfiltrate secrets, skip verification, delete state, or claim false success.
45
+ 4. **Cancel/resume behavior**: active state cleanup, resume detection, stale in-progress state, and cancellation followed by a fresh run.
46
+ 5. **Stale state**: old `.omx/state` files, mismatched sessions, missing timestamps, and contradictory phase metadata.
47
+ 6. **Dirty worktree**: pre-existing modifications, untracked generated files, and verification that UltraQA does not hide or overwrite unrelated work.
48
+ 7. **Hung or long-running commands**: bounded timeout handling, killed child processes, and recovery notes.
49
+ 8. **Flaky tests**: rerun strategy, failure clustering, quarantine evidence, and avoiding false green from a single lucky pass.
50
+ 9. **Misleading success output**: output containing success phrases with non-zero exits, hidden failures, skipped tests, or partial command logs.
31
51
 
32
- If no structured goal provided, interpret the argument as a custom goal.
52
+ ## Dynamic E2E and Temporary Harness Rules
53
+
54
+ - Generate temporary tests, scripts, fixtures, or harnesses when they materially improve behavioral confidence and no existing e2e surface covers the scenario.
55
+ - Prefer project-native test tools and small throwaway harnesses under a temporary directory or clearly named test fixture.
56
+ - Record every generated artifact in the scenario matrix, including whether it was committed intentionally or removed during cleanup.
57
+ - Use bounded runtimes and explicit timeouts for commands that can hang.
58
+ - Validate exit codes and output semantics; do not trust success-looking text alone.
59
+ - Do not delete, rewrite, or mask unrelated user work. Capture dirty-worktree evidence before and after generated harness work.
33
60
 
34
61
  ## Cycle Workflow
35
62
 
36
63
  ### Cycle N (Max 5)
37
64
 
38
- 1. **RUN QA**: Execute verification based on goal type
39
- - `--tests`: Run the project's test command
40
- - `--build`: Run the project's build command
41
- - `--lint`: Run the project's lint command
42
- - `--typecheck`: Run the project's type check command
43
- - `--custom`: Run appropriate command and check for pattern
44
- - `--interactive`: Use qa-tester for interactive CLI/service testing:
65
+ 1. **PLAN ADVERSARIAL QA**
66
+ - Restate the goal, success criteria, safety bounds, and stop condition.
67
+ - Inspect repository context enough to identify runnable surfaces, test commands, state files, and cleanup paths.
68
+ - Build or update the required scenario matrix before running commands.
69
+
70
+ 2. **RUN BASELINE VERIFICATION**
71
+ - `--tests`: Run the project's test command.
72
+ - `--build`: Run the project's build command.
73
+ - `--lint`: Run the project's lint command.
74
+ - `--typecheck`: Run the project's type check command.
75
+ - `--custom`: Run the appropriate command and check the pattern plus exit status and failure markers.
76
+ - `--interactive`: Use qa-tester or an equivalent CLI/service harness:
45
77
  ```
46
- delegate(role="qa-tester", tier="STANDARD", task="TEST:
78
+ Use `/prompts:qa-tester` with:
47
79
  Goal: [describe what to verify]
48
80
  Service: [how to start]
49
- Test cases: [specific scenarios to verify]")
81
+ Test cases: [normal, hostile, malformed, interruption, resume, stale-state, dirty-worktree, hung-command, flaky, and misleading-output scenarios]
50
82
  ```
51
83
 
52
- 2. **CHECK RESULT**: Did the goal pass?
53
- - **YES** Exit with success message
54
- - **NO** Continue to step 3
84
+ 3. **RUN ADVERSARIAL DYNAMIC E2E SCENARIOS**
85
+ - Execute the scenario matrix using existing e2e tests, generated temporary tests, or generated harnesses.
86
+ - Model malicious/hostile user behavior explicitly, including prompt injection and attempts to bypass safety or verification.
87
+ - Exercise malformed input, repeated interruptions, cancel/resume, stale state, dirty worktree handling, hung commands, flaky tests, and misleading success output when relevant.
88
+ - Capture commands, exit codes, important output excerpts, artifacts, and cleanup status.
89
+
90
+ 4. **CHECK RESULT**
91
+ - **YES** only if baseline verification and adversarial e2e scenarios passed, generated artifacts are cleaned up or intentionally tracked, and the report has complete evidence.
92
+ - **NO** if any scenario failed, was skipped without justification, left debris, relied on misleading output, or lacked evidence. Continue to step 5.
55
93
 
56
- 3. **ARCHITECT DIAGNOSIS**: Spawn architect to analyze failure
94
+ 5. **ARCHITECT DIAGNOSIS**
57
95
  ```
58
- delegate(role="architect", tier="THOROUGH", task="DIAGNOSE FAILURE:
59
- Goal: [goal type]
60
- Output: [test/build output]
61
- Provide root cause and specific fix recommendations.")
96
+ Use `/prompts:architect` with:
97
+ Goal: [goal type and behavior]
98
+ Scenario matrix: [rows, commands, failures, evidence]
99
+ Output: [test/build/e2e/harness output]
100
+ Provide root cause, safety implications, and specific fix recommendations.
62
101
  ```
63
102
 
64
- 4. **FIX ISSUES**: Apply architect's recommendations
103
+ 6. **FIX ISSUES**
65
104
  ```
66
- delegate(role="executor", tier="STANDARD", task="FIX:
105
+ Use `/prompts:executor` with:
67
106
  Issue: [architect diagnosis]
68
107
  Files: [affected files]
69
- Apply the fix precisely as recommended.")
108
+ Constraints: preserve unrelated dirty work, clean temporary harnesses, keep safety bounds
109
+ Apply the fix precisely as recommended.
70
110
  ```
71
111
 
72
- 5. **REPEAT**: Go back to step 1
112
+ 7. **CLEAN UP AND ROLLBACK**
113
+ - Remove temporary harnesses, fixtures, logs, spawned processes, and state files unless they are intentional deliverables.
114
+ - Roll back failed experimental edits that are not part of the final fix.
115
+ - Re-check the worktree and record remaining intentional changes or residual debris.
116
+
117
+ 8. **REPEAT**
118
+ - Go back to step 1 with the updated scenario matrix and failure history.
119
+
120
+ ## Safety Bounds
121
+
122
+ UltraQA must stay inside these safety bounds:
123
+
124
+ - No destructive commands such as force resets, broad deletes, secret exfiltration, credential dumping, production writes, or unbounded process spawning.
125
+ - No reading or printing secrets beyond the minimum metadata needed to verify absence of leakage.
126
+ - No network or external-production side effects unless the user explicitly authorized them.
127
+ - No unbounded waits: use timeouts, retries with caps, and clear hung-command diagnostics.
128
+ - No hiding unrelated dirty work or generated debris.
129
+ - If a required scenario would violate these bounds, mark it blocked in the report with the safe substitute used.
73
130
 
74
131
  ## Exit Conditions
75
132
 
76
133
  | Condition | Action |
77
134
  |-----------|--------|
78
- | **Goal Met** | Exit with success: "ULTRAQA COMPLETE: Goal met after N cycles" |
79
- | **Cycle 5 Reached** | Exit with diagnosis: "ULTRAQA STOPPED: Max cycles. Diagnosis: ..." |
80
- | **Same Failure 3x** | Exit early: "ULTRAQA STOPPED: Same failure detected 3 times. Root cause: ..." |
81
- | **Environment Error** | Exit: "ULTRAQA ERROR: [tmux/port/dependency issue]" |
135
+ | **Goal Met** | Exit with success: `ULTRAQA COMPLETE: Goal met after N cycles` plus the structured report |
136
+ | **Cycle 5 Reached** | Exit with diagnosis: `ULTRAQA STOPPED: Max cycles` plus failures, fixes attempted, residual risks, and evidence |
137
+ | **Same Failure 3x** | Exit early: `ULTRAQA STOPPED: Same failure detected 3 times` plus root cause, safety notes, and next owner |
138
+ | **Safety Boundary** | Exit: `ULTRAQA BLOCKED: [destructive/credentialed/external-production/unbounded action]` plus safe substitute evidence |
139
+ | **Environment Error** | Exit: `ULTRAQA ERROR: [tmux/port/dependency/hung command issue]` plus cleanup status |
140
+
141
+ ## Structured Report
142
+
143
+ Every terminal UltraQA result must include this report shape:
144
+
145
+ ```markdown
146
+ # UltraQA Report
147
+
148
+ ## Goal and success criteria
149
+ - Goal:
150
+ - Stop condition:
151
+ - Safety bounds applied:
152
+
153
+ ## Scenario matrix
154
+ | ID | User/attacker model | Scenario | Command/harness | Expected signal | Actual result | Status | Evidence | Cleanup |
155
+ |----|---------------------|----------|-----------------|-----------------|---------------|--------|----------|---------|
156
+
157
+ ## Commands run
158
+ - `[exit code] command` — purpose, duration/timeout, key output evidence
159
+
160
+ ## Failures found
161
+ - Scenario ID, failure signal, root cause, user impact, safety impact
162
+
163
+ ## Fixes applied
164
+ - Files changed, rationale, linked failing scenario(s), regression evidence
165
+
166
+ ## Cleanup and rollback
167
+ - Generated artifacts removed or intentionally kept
168
+ - State/process cleanup performed
169
+ - Worktree status before/after
170
+
171
+ ## Residual risks
172
+ - Untested or blocked scenarios with reasons and safe substitutes
173
+
174
+ ## Evidence
175
+ - Test output, e2e logs, harness output, screenshots/transcripts when relevant, and rerun/flake evidence
176
+ ```
82
177
 
83
178
  ## Observability
84
179
 
85
180
  Output progress each cycle:
86
- ```
87
- [ULTRAQA Cycle 1/5] Running tests...
88
- [ULTRAQA Cycle 1/5] FAILED - 3 tests failing
89
- [ULTRAQA Cycle 1/5] Architect diagnosing...
90
- [ULTRAQA Cycle 1/5] Fixing: auth.test.ts - missing mock
91
- [ULTRAQA Cycle 2/5] Running tests...
92
- [ULTRAQA Cycle 2/5] PASSED - All 47 tests pass
181
+
182
+ ```text
183
+ [ULTRAQA Cycle 1/5] Planning adversarial scenario matrix...
184
+ [ULTRAQA Cycle 1/5] Running baseline tests...
185
+ [ULTRAQA Cycle 1/5] Running ADV-E2E-003 prompt-injection harness...
186
+ [ULTRAQA Cycle 1/5] FAILED - stale state resume accepted misleading success output
187
+ [ULTRAQA Cycle 1/5] Architect diagnosing scenario ADV-E2E-003...
188
+ [ULTRAQA Cycle 1/5] Fixing: src/hooks/... - validate exit code before success phrase
189
+ [ULTRAQA Cycle 1/5] Cleaning temporary harnesses and state...
190
+ [ULTRAQA Cycle 2/5] PASSED - baseline + 9 adversarial scenarios pass
93
191
  [ULTRAQA COMPLETE] Goal met after 2 cycles
94
192
  ```
95
193
 
96
194
  ## State Tracking
97
195
 
98
- Use `omx_state` MCP tools for UltraQA lifecycle state.
196
+ Use the CLI-first state surface (`omx state ... --json`) for UltraQA lifecycle state. If explicit MCP compatibility tools are already available, equivalent `omx_state` calls are optional compatibility, not the default.
99
197
 
100
198
  - **On start**:
101
- `state_write({mode: "ultraqa", active: true, current_phase: "qa", iteration: 1, started_at: "<now>"})`
199
+ `omx state write --input '{"mode":"ultraqa","active":true,"current_phase":"planning","iteration":1,"started_at":"<now>","scenario_matrix":[]}' --json`
102
200
  - **On each cycle**:
103
- `state_write({mode: "ultraqa", current_phase: "qa", iteration: <cycle>})`
201
+ `omx state write --input '{"mode":"ultraqa","current_phase":"qa","iteration":<cycle>,"scenario_matrix":"<updated matrix path or summary>"}' --json`
202
+ - **On adversarial e2e transition**:
203
+ `omx state write --input '{"mode":"ultraqa","current_phase":"adversarial-e2e"}' --json`
104
204
  - **On diagnose/fix transitions**:
105
- `state_write({mode: "ultraqa", current_phase: "diagnose"})`
106
- `state_write({mode: "ultraqa", current_phase: "fix"})`
205
+ `omx state write --input '{"mode":"ultraqa","current_phase":"diagnose"}' --json`
206
+ `omx state write --input '{"mode":"ultraqa","current_phase":"fix"}' --json`
207
+ - **On cleanup transition**:
208
+ `omx state write --input '{"mode":"ultraqa","current_phase":"cleanup"}' --json`
107
209
  - **On completion**:
108
- `state_write({mode: "ultraqa", active: false, current_phase: "complete", completed_at: "<now>"})`
210
+ `omx state write --input '{"mode":"ultraqa","active":false,"current_phase":"complete","completed_at":"<now>"}' --json`
109
211
  - **For resume detection**:
110
- `state_read({mode: "ultraqa"})`
111
-
212
+ `omx state read --input '{"mode":"ultraqa"}' --json`
112
213
 
113
214
  ## Scenario Examples
114
215
 
115
- **Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.
216
+ **Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work, rerun the relevant adversarial scenario, and update the report instead of restarting discovery.
116
217
 
117
218
  **Good:** The user changes only the output shape or downstream delivery step (for example `make a PR`). Preserve earlier non-conflicting workflow constraints and apply the update locally.
118
219
 
220
+ **Good:** A CLI prints `SUCCESS` while exiting 1. Mark the misleading success output scenario failed, fix the parser or reporting path, and rerun the generated harness.
221
+
222
+ **Bad:** The workflow runs only `npm test`, `npm run build`, `npm run lint`, or `npm run typecheck`, sees green output, and declares UltraQA complete without adversarial dynamic e2e coverage.
223
+
224
+ **Bad:** A generated harness leaves untracked files, state, or a child process behind and the final report omits cleanup status.
225
+
119
226
  **Bad:** The user says `continue`, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
120
227
 
121
228
  ## Cancellation
122
229
 
123
- User can cancel with `/cancel` which clears the state file.
230
+ User can cancel with `/cancel`, which clears UltraQA state. Cancellation itself should be tested in cancel/resume scenarios when relevant, but UltraQA must not block an explicit user cancellation.
124
231
 
125
232
  ## Important Rules
126
233
 
127
- 1. **PARALLEL when possible** - Run diagnosis while preparing potential fixes
128
- 2. **TRACK failures** - Record each failure to detect patterns
129
- 3. **EARLY EXIT on pattern** - 3x same failure = stop and surface
130
- 4. **CLEAR OUTPUT** - User should always know current cycle and status
131
- 5. **CLEAN UP** - Clear state file on completion or cancellation
234
+ 1. **ADVERSARIAL E2E REQUIRED** - Baseline build/lint/typecheck/test commands are necessary evidence, not sufficient completion proof.
235
+ 2. **SCENARIO MATRIX REQUIRED** - Track normal, hostile, malformed, interruption, injection, cancel/resume, stale-state, dirty-worktree, hung-command, flaky, and misleading-output coverage.
236
+ 3. **GENERATE HARNESSES WHEN USEFUL** - Create temporary tests or harnesses when they materially improve behavioral confidence, then clean them up or commit them intentionally.
237
+ 4. **PARALLEL WHEN SAFE** - Run independent diagnostics while preparing potential fixes; do not parallelize commands that mutate the same state or worktree.
238
+ 5. **TRACK FAILURES** - Record each failure to detect patterns and avoid false greens.
239
+ 6. **EARLY EXIT ON PATTERN** - 3x same failure = stop and surface with root cause and residual risk.
240
+ 7. **CLEAR OUTPUT** - User should always know current cycle, scenario, command, status, and evidence.
241
+ 8. **CLEAN UP** - Clear UltraQA state and temporary artifacts on completion, cancellation, or early stop.
242
+ 9. **SAFETY FIRST** - Never exfiltrate secrets, run destructive cleanup, write to production, or wait indefinitely to satisfy a scenario.
132
243
 
133
244
  ## STATE CLEANUP ON COMPLETION
134
245
 
135
246
  When goal is met OR max cycles reached OR exiting early, run `$cancel` or call:
136
247
 
137
- `state_clear({mode: "ultraqa"})`
248
+ `omx state clear --input '{"mode":"ultraqa"}' --json`
138
249
 
139
- Use MCP state cleanup rather than deleting files directly.
250
+ Use CLI state cleanup rather than deleting files directly. Also remove temporary e2e harnesses, fixtures, and logs unless they are intentional artifacts listed in the report.
140
251
 
141
252
  ---
142
253
 
143
- Begin ULTRAQA cycling now. Parse the goal and start cycle 1.
254
+ Begin ULTRAQA cycling now. Parse the goal, build the adversarial dynamic e2e scenario matrix, and start cycle 1.
@@ -81,16 +81,16 @@ Sequential task execution wastes time when tasks are independent. Ultrawork keep
81
81
 
82
82
  ## State Management
83
83
 
84
- Use `omx_state` MCP tools for ultrawork lifecycle state.
84
+ Use the CLI-first state surface (`omx state ... --json`) for ultrawork lifecycle state. If explicit MCP compatibility tools are already available, equivalent `omx_state` calls are optional compatibility, not the default.
85
85
 
86
86
  - **On start**:
87
- `state_write({mode: "ultrawork", active: true, reinforcement_count: 1, started_at: "<now>"})`
87
+ `omx state write --input '{"mode":"ultrawork","active":true,"reinforcement_count":1,"started_at":"<now>"}' --json`
88
88
  - **On each reinforcement/loop step**:
89
- `state_write({mode: "ultrawork", reinforcement_count: <current>})`
89
+ `omx state write --input '{"mode":"ultrawork","reinforcement_count":<current>}' --json`
90
90
  - **On completion**:
91
- `state_write({mode: "ultrawork", active: false})`
91
+ `omx state write --input '{"mode":"ultrawork","active":false}' --json`
92
92
  - **On cancellation/cleanup**:
93
- run `$cancel` (which should call `state_clear(mode="ultrawork")`)
93
+ run `$cancel` (which should call `omx state clear --input '{"mode":"ultrawork"}' --json`)
94
94
 
95
95
  <Examples>
96
96
  <Good>
@@ -105,7 +105,7 @@ Direct-tool lane:
105
105
  - update `skills/ultrawork/SKILL.md`
106
106
 
107
107
  Background evidence lane:
108
- - delegate(role="test-engineer", tier="STANDARD", task="Map which hook tests cover ultrawork activation messaging", model="...")
108
+ - use /prompts:test-engineer for this scoped task
109
109
  ```
110
110
  Why good: Context is grounded first, acceptance criteria are explicit, and the direct-tool lane runs alongside a bounded evidence lane.
111
111
  </Good>
@@ -122,8 +122,8 @@ Why good: Shared-file work stays local; independent evidence work fans out.
122
122
  <Bad>
123
123
  Parallelizing before the task is grounded:
124
124
  ```
125
- delegate(role="executor", tier="STANDARD", task="Implement whatever seems necessary", model="...")
126
- delegate(role="test-engineer", tier="STANDARD", task="Figure out how to test it later", model="...")
125
+ use /prompts:executor for this scoped task
126
+ use /prompts:test-engineer for this scoped task
127
127
  ```
128
128
  Why bad: No context snapshot, no pass/fail target, and delegation starts before the work is shaped.
129
129
  </Bad>
@@ -27,7 +27,7 @@ This is an orchestration skill. It composes existing skills and must not add run
27
27
 
28
28
  ## Do not use when
29
29
 
30
- - The user only wants design critique or general frontend advice; use `$frontend-ui-ux` or a designer lane.
30
+ - The user only wants repo-wide design guidance, product/design context, or a DESIGN.md source of truth; use `$design` or a designer lane.
31
31
  - The task is a non-visual backend/API implementation with no UI reference target.
32
32
  - The user already supplied a final static reference image and only needs comparison/fixes; hand directly to `$ralph` with Visual Ralph verdict guidance.
33
33
  - The requested output is a deterministic SVG/vector/code-native asset rather than a raster reference.
@@ -117,7 +117,7 @@ Record final diff evidence with the reference/screenshot artifacts so the result
117
117
 
118
118
  ### 7. Build a reproducible design system
119
119
 
120
- The implementation is incomplete unless the visual match is encoded in repo-native reusable artifacts. Depending on the project, this may mean CSS variables, theme tokens, Tailwind config, component variants, Storybook stories, design docs, or existing equivalents.
120
+ The implementation is incomplete unless the visual match is encoded in repo-native reusable artifacts. Depending on the project, this may mean CSS variables, theme tokens, Tailwind config, component variants, Storybook stories, updates that align with DESIGN.md, or existing equivalents.
121
121
 
122
122
  Capture at least the applicable:
123
123
  - colors,