oh-my-codex 0.16.2 → 0.16.4

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 (340) 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__/plugin-bundle-ssot.test.js +9 -0
  5. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -1
  6. package/dist/cli/__tests__/cleanup.test.js +27 -0
  7. package/dist/cli/__tests__/cleanup.test.js.map +1 -1
  8. package/dist/cli/__tests__/codex-plugin-layout.test.js +7 -5
  9. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
  10. package/dist/cli/__tests__/doctor-warning-copy.test.js +137 -6
  11. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  12. package/dist/cli/__tests__/index.test.js +303 -4
  13. package/dist/cli/__tests__/index.test.js.map +1 -1
  14. package/dist/cli/__tests__/launch-fallback.test.js +58 -0
  15. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  16. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +2 -0
  17. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
  18. package/dist/cli/__tests__/ralph.test.js +48 -0
  19. package/dist/cli/__tests__/ralph.test.js.map +1 -1
  20. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +8 -0
  21. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -1
  22. package/dist/cli/__tests__/setup-install-mode.test.js +350 -27
  23. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  24. package/dist/cli/__tests__/setup-refresh.test.js +85 -3
  25. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  26. package/dist/cli/__tests__/setup-scope.test.js +1 -1
  27. package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
  28. package/dist/cli/__tests__/setup-skills-overwrite.test.js +2 -1
  29. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  30. package/dist/cli/__tests__/team.test.js +269 -0
  31. package/dist/cli/__tests__/team.test.js.map +1 -1
  32. package/dist/cli/__tests__/ultragoal.test.js +69 -0
  33. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  34. package/dist/cli/__tests__/uninstall.test.js +90 -6
  35. package/dist/cli/__tests__/uninstall.test.js.map +1 -1
  36. package/dist/cli/__tests__/update.test.js +109 -19
  37. package/dist/cli/__tests__/update.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 +168 -16
  48. package/dist/cli/doctor.js.map +1 -1
  49. package/dist/cli/index.d.ts +9 -2
  50. package/dist/cli/index.d.ts.map +1 -1
  51. package/dist/cli/index.js +168 -20
  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/plugin-marketplace.d.ts +3 -0
  56. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  57. package/dist/cli/plugin-marketplace.js +88 -0
  58. package/dist/cli/plugin-marketplace.js.map +1 -1
  59. package/dist/cli/ralph.d.ts.map +1 -1
  60. package/dist/cli/ralph.js +21 -0
  61. package/dist/cli/ralph.js.map +1 -1
  62. package/dist/cli/setup-preferences.d.ts +4 -0
  63. package/dist/cli/setup-preferences.d.ts.map +1 -1
  64. package/dist/cli/setup-preferences.js +7 -0
  65. package/dist/cli/setup-preferences.js.map +1 -1
  66. package/dist/cli/setup.d.ts +5 -3
  67. package/dist/cli/setup.d.ts.map +1 -1
  68. package/dist/cli/setup.js +177 -43
  69. package/dist/cli/setup.js.map +1 -1
  70. package/dist/cli/team.d.ts.map +1 -1
  71. package/dist/cli/team.js +54 -15
  72. package/dist/cli/team.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 +64 -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 +76 -5
  80. package/dist/cli/uninstall.js.map +1 -1
  81. package/dist/cli/update.d.ts +10 -2
  82. package/dist/cli/update.d.ts.map +1 -1
  83. package/dist/cli/update.js +99 -5
  84. package/dist/cli/update.js.map +1 -1
  85. package/dist/config/__tests__/codex-feature-flags.test.d.ts +2 -0
  86. package/dist/config/__tests__/codex-feature-flags.test.d.ts.map +1 -0
  87. package/dist/config/__tests__/codex-feature-flags.test.js +35 -0
  88. package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -0
  89. package/dist/config/__tests__/codex-hooks.test.js +188 -4
  90. package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
  91. package/dist/config/__tests__/generator-idempotent.test.js +129 -10
  92. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  93. package/dist/config/__tests__/generator-notify.test.js +148 -7
  94. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  95. package/dist/config/__tests__/wiki-config-contract.test.js +6 -3
  96. package/dist/config/__tests__/wiki-config-contract.test.js.map +1 -1
  97. package/dist/config/codex-feature-flags.d.ts +21 -0
  98. package/dist/config/codex-feature-flags.d.ts.map +1 -0
  99. package/dist/config/codex-feature-flags.js +56 -0
  100. package/dist/config/codex-feature-flags.js.map +1 -0
  101. package/dist/config/codex-hooks.d.ts +40 -4
  102. package/dist/config/codex-hooks.d.ts.map +1 -1
  103. package/dist/config/codex-hooks.js +204 -18
  104. package/dist/config/codex-hooks.js.map +1 -1
  105. package/dist/config/generator.d.ts +19 -1
  106. package/dist/config/generator.d.ts.map +1 -1
  107. package/dist/config/generator.js +319 -83
  108. package/dist/config/generator.js.map +1 -1
  109. package/dist/config/omx-first-party-mcp.d.ts +3 -1
  110. package/dist/config/omx-first-party-mcp.d.ts.map +1 -1
  111. package/dist/config/omx-first-party-mcp.js +2 -2
  112. package/dist/config/omx-first-party-mcp.js.map +1 -1
  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-fallback-watcher.test.js +29 -1
  116. package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
  117. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +10 -0
  118. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
  119. package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +1 -0
  120. package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
  121. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.d.ts +2 -0
  122. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.d.ts.map +1 -0
  123. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js +176 -0
  124. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js.map +1 -0
  125. package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +148 -0
  126. package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
  127. package/dist/hooks/__tests__/notify-hook-session-scope.test.js +3 -0
  128. package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -1
  129. package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts +2 -0
  130. package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts.map +1 -0
  131. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js +84 -0
  132. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -0
  133. package/dist/hooks/__tests__/wiki-docs-contract.test.js +1 -2
  134. package/dist/hooks/__tests__/wiki-docs-contract.test.js.map +1 -1
  135. package/dist/hooks/agents-overlay.js +2 -2
  136. package/dist/hooks/agents-overlay.js.map +1 -1
  137. package/dist/hooks/keyword-detector.d.ts +1 -0
  138. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  139. package/dist/hooks/keyword-detector.js +7 -5
  140. package/dist/hooks/keyword-detector.js.map +1 -1
  141. package/dist/hud/__tests__/state.test.js +164 -0
  142. package/dist/hud/__tests__/state.test.js.map +1 -1
  143. package/dist/hud/state.d.ts.map +1 -1
  144. package/dist/hud/state.js +4 -5
  145. package/dist/hud/state.js.map +1 -1
  146. package/dist/mcp/__tests__/state-paths.test.js +61 -0
  147. package/dist/mcp/__tests__/state-paths.test.js.map +1 -1
  148. package/dist/mcp/__tests__/state-server.test.js +166 -0
  149. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  150. package/dist/mcp/state-paths.d.ts.map +1 -1
  151. package/dist/mcp/state-paths.js +23 -2
  152. package/dist/mcp/state-paths.js.map +1 -1
  153. package/dist/modes/__tests__/base-session-scope.test.js +22 -0
  154. package/dist/modes/__tests__/base-session-scope.test.js.map +1 -1
  155. package/dist/modes/__tests__/base-tmux-pane.test.js +57 -26
  156. package/dist/modes/__tests__/base-tmux-pane.test.js.map +1 -1
  157. package/dist/modes/base.d.ts.map +1 -1
  158. package/dist/modes/base.js +5 -0
  159. package/dist/modes/base.js.map +1 -1
  160. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts +2 -0
  161. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts.map +1 -0
  162. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js +316 -0
  163. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -0
  164. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts +2 -0
  165. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts.map +1 -0
  166. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js +481 -0
  167. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js.map +1 -0
  168. package/dist/planning/__tests__/artifacts.test.js +597 -4
  169. package/dist/planning/__tests__/artifacts.test.js.map +1 -1
  170. package/dist/planning/__tests__/context-pack-status.test.js +524 -0
  171. package/dist/planning/__tests__/context-pack-status.test.js.map +1 -1
  172. package/dist/planning/__tests__/markdown-structure.test.d.ts +2 -0
  173. package/dist/planning/__tests__/markdown-structure.test.d.ts.map +1 -0
  174. package/dist/planning/__tests__/markdown-structure.test.js +459 -0
  175. package/dist/planning/__tests__/markdown-structure.test.js.map +1 -0
  176. package/dist/planning/__tests__/ready-context-pack-role-refs.test.d.ts +2 -0
  177. package/dist/planning/__tests__/ready-context-pack-role-refs.test.d.ts.map +1 -0
  178. package/dist/planning/__tests__/ready-context-pack-role-refs.test.js +612 -0
  179. package/dist/planning/__tests__/ready-context-pack-role-refs.test.js.map +1 -0
  180. package/dist/planning/artifacts.d.ts +7 -2
  181. package/dist/planning/artifacts.d.ts.map +1 -1
  182. package/dist/planning/artifacts.js +279 -26
  183. package/dist/planning/artifacts.js.map +1 -1
  184. package/dist/planning/context-pack-status.d.ts +31 -0
  185. package/dist/planning/context-pack-status.d.ts.map +1 -1
  186. package/dist/planning/context-pack-status.js +291 -25
  187. package/dist/planning/context-pack-status.js.map +1 -1
  188. package/dist/planning/markdown-structure.d.ts +20 -0
  189. package/dist/planning/markdown-structure.d.ts.map +1 -0
  190. package/dist/planning/markdown-structure.js +137 -0
  191. package/dist/planning/markdown-structure.js.map +1 -0
  192. package/dist/ralph/__tests__/completion-audit.test.d.ts +2 -0
  193. package/dist/ralph/__tests__/completion-audit.test.d.ts.map +1 -0
  194. package/dist/ralph/__tests__/completion-audit.test.js +121 -0
  195. package/dist/ralph/__tests__/completion-audit.test.js.map +1 -0
  196. package/dist/ralph/completion-audit.d.ts +8 -0
  197. package/dist/ralph/completion-audit.d.ts.map +1 -0
  198. package/dist/ralph/completion-audit.js +99 -0
  199. package/dist/ralph/completion-audit.js.map +1 -0
  200. package/dist/ralph/persistence.d.ts +1 -1
  201. package/dist/ralph/persistence.d.ts.map +1 -1
  202. package/dist/ralph/persistence.js +8 -2
  203. package/dist/ralph/persistence.js.map +1 -1
  204. package/dist/scripts/__tests__/codex-native-hook.test.js +359 -24
  205. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  206. package/dist/scripts/__tests__/notify-dispatcher.test.d.ts +2 -0
  207. package/dist/scripts/__tests__/notify-dispatcher.test.d.ts.map +1 -0
  208. package/dist/scripts/__tests__/notify-dispatcher.test.js +126 -0
  209. package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -0
  210. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  211. package/dist/scripts/codex-native-hook.js +142 -76
  212. package/dist/scripts/codex-native-hook.js.map +1 -1
  213. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  214. package/dist/scripts/codex-native-pre-post.js +4 -2
  215. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  216. package/dist/scripts/notify-dispatcher.d.ts +7 -0
  217. package/dist/scripts/notify-dispatcher.d.ts.map +1 -0
  218. package/dist/scripts/notify-dispatcher.js +87 -0
  219. package/dist/scripts/notify-dispatcher.js.map +1 -0
  220. package/dist/scripts/notify-fallback-watcher.js +4 -0
  221. package/dist/scripts/notify-fallback-watcher.js.map +1 -1
  222. package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +1 -1
  223. package/dist/scripts/notify-hook/ralph-session-resume.js +96 -8
  224. package/dist/scripts/notify-hook/ralph-session-resume.js.map +1 -1
  225. package/dist/scripts/notify-hook/state-io.d.ts.map +1 -1
  226. package/dist/scripts/notify-hook/state-io.js +6 -2
  227. package/dist/scripts/notify-hook/state-io.js.map +1 -1
  228. package/dist/scripts/notify-hook/visual-verdict.js +3 -3
  229. package/dist/scripts/notify-hook/visual-verdict.js.map +1 -1
  230. package/dist/scripts/notify-hook.js +127 -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/operations.d.ts.map +1 -1
  235. package/dist/state/operations.js +9 -3
  236. package/dist/state/operations.js.map +1 -1
  237. package/dist/state/skill-active.d.ts +7 -0
  238. package/dist/state/skill-active.d.ts.map +1 -1
  239. package/dist/state/skill-active.js +25 -8
  240. package/dist/state/skill-active.js.map +1 -1
  241. package/dist/state/workflow-transition-reconcile.d.ts +1 -0
  242. package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
  243. package/dist/state/workflow-transition-reconcile.js +22 -15
  244. package/dist/state/workflow-transition-reconcile.js.map +1 -1
  245. package/dist/state/workflow-transition.js +3 -3
  246. package/dist/state/workflow-transition.js.map +1 -1
  247. package/dist/team/__tests__/approved-execution.test.js +84 -1
  248. package/dist/team/__tests__/approved-execution.test.js.map +1 -1
  249. package/dist/team/__tests__/runtime.test.js +178 -19
  250. package/dist/team/__tests__/runtime.test.js.map +1 -1
  251. package/dist/team/__tests__/scaling.test.js +497 -2
  252. package/dist/team/__tests__/scaling.test.js.map +1 -1
  253. package/dist/team/__tests__/state-root.test.js +1 -1
  254. package/dist/team/__tests__/state-root.test.js.map +1 -1
  255. package/dist/team/__tests__/worker-bootstrap.test.js +45 -0
  256. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  257. package/dist/team/approved-execution.d.ts +1 -0
  258. package/dist/team/approved-execution.d.ts.map +1 -1
  259. package/dist/team/approved-execution.js +53 -0
  260. package/dist/team/approved-execution.js.map +1 -1
  261. package/dist/team/delivery-log.d.ts.map +1 -1
  262. package/dist/team/delivery-log.js +8 -1
  263. package/dist/team/delivery-log.js.map +1 -1
  264. package/dist/team/runtime.d.ts.map +1 -1
  265. package/dist/team/runtime.js +104 -18
  266. package/dist/team/runtime.js.map +1 -1
  267. package/dist/team/scaling.d.ts.map +1 -1
  268. package/dist/team/scaling.js +43 -0
  269. package/dist/team/scaling.js.map +1 -1
  270. package/dist/team/state/mailbox.d.ts +1 -0
  271. package/dist/team/state/mailbox.d.ts.map +1 -1
  272. package/dist/team/state/mailbox.js +10 -1
  273. package/dist/team/state/mailbox.js.map +1 -1
  274. package/dist/team/state-root.d.ts.map +1 -1
  275. package/dist/team/state-root.js +5 -1
  276. package/dist/team/state-root.js.map +1 -1
  277. package/dist/team/state.d.ts.map +1 -1
  278. package/dist/team/state.js +3 -7
  279. package/dist/team/state.js.map +1 -1
  280. package/dist/team/worker-bootstrap.d.ts +7 -2
  281. package/dist/team/worker-bootstrap.d.ts.map +1 -1
  282. package/dist/team/worker-bootstrap.js +17 -4
  283. package/dist/team/worker-bootstrap.js.map +1 -1
  284. package/dist/ultragoal/__tests__/artifacts.test.js +124 -1
  285. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  286. package/dist/ultragoal/__tests__/docs-contract.test.js +21 -0
  287. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  288. package/dist/ultragoal/artifacts.d.ts +44 -2
  289. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  290. package/dist/ultragoal/artifacts.js +197 -13
  291. package/dist/ultragoal/artifacts.js.map +1 -1
  292. package/dist/wiki/lifecycle.js +1 -1
  293. package/dist/wiki/lifecycle.js.map +1 -1
  294. package/package.json +1 -1
  295. package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
  296. package/plugins/oh-my-codex/.mcp.json +5 -5
  297. package/plugins/oh-my-codex/skills/analyze/SKILL.md +0 -2
  298. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +2 -2
  299. package/plugins/oh-my-codex/skills/code-review/SKILL.md +1 -3
  300. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +5 -7
  301. package/plugins/oh-my-codex/skills/doctor/SKILL.md +2 -2
  302. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +3 -3
  303. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +3 -3
  304. package/plugins/oh-my-codex/skills/plan/SKILL.md +3 -6
  305. package/plugins/oh-my-codex/skills/ralph/SKILL.md +9 -10
  306. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +36 -3
  307. package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +21 -24
  308. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +8 -8
  309. package/plugins/oh-my-codex/skills/wiki/SKILL.md +13 -13
  310. package/skills/analyze/SKILL.md +0 -2
  311. package/skills/ask-claude/SKILL.md +5 -3
  312. package/skills/ask-gemini/SKILL.md +5 -3
  313. package/skills/autopilot/SKILL.md +2 -2
  314. package/skills/code-review/SKILL.md +1 -3
  315. package/skills/deep-interview/SKILL.md +5 -7
  316. package/skills/doctor/SKILL.md +2 -2
  317. package/skills/ecomode/SKILL.md +105 -1
  318. package/skills/frontend-ui-ux/SKILL.md +4 -26
  319. package/skills/git-master/SKILL.md +2 -4
  320. package/skills/omx-setup/SKILL.md +3 -3
  321. package/skills/pipeline/SKILL.md +3 -3
  322. package/skills/plan/SKILL.md +3 -6
  323. package/skills/ralph/SKILL.md +9 -10
  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 +21 -24
  328. package/skills/ultrawork/SKILL.md +8 -8
  329. package/skills/web-clone/SKILL.md +348 -1
  330. package/skills/wiki/SKILL.md +13 -13
  331. package/src/scripts/__tests__/codex-native-hook.test.ts +389 -24
  332. package/src/scripts/__tests__/notify-dispatcher.test.ts +153 -0
  333. package/src/scripts/codex-native-hook.ts +168 -64
  334. package/src/scripts/codex-native-pre-post.ts +4 -1
  335. package/src/scripts/notify-dispatcher.ts +113 -0
  336. package/src/scripts/notify-fallback-watcher.ts +6 -2
  337. package/src/scripts/notify-hook/ralph-session-resume.ts +117 -8
  338. package/src/scripts/notify-hook/state-io.ts +4 -2
  339. package/src/scripts/notify-hook/visual-verdict.ts +3 -3
  340. package/src/scripts/notify-hook.ts +119 -1
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: ask-gemini
3
- description: Ask Gemini deprecated skill
3
+ description: Deprecated compatibility shim for Gemini advisor requests
4
4
  ---
5
5
 
6
- # Ask Gemini deprecated
6
+ # Ask Gemini compatibility shim
7
7
 
8
- Hard-deprecated. Do not invoke or route this skill. Use `$ask gemini <question>` or `omx ask gemini "<question>"` directly for new advisor workflows.
8
+ Hard-deprecated. Do not invoke or route this skill for new work.
9
+
10
+ Use `$ask gemini <question>` or `omx ask gemini "<question>"` directly for Gemini advisor workflows. This file exists only to preserve the public/catalog-visible `ask-gemini` skill contract while the canonical `$ask` workflow owns provider selection.
9
11
 
10
12
  Task: {{ARGUMENTS}}
@@ -75,7 +75,7 @@ Before Phase `ralplan` starts or resumes:
75
75
  </Execution_Policy>
76
76
 
77
77
  <State_Management>
78
- Use `omx_state` MCP tools (or `omx state ... --json` fallback if MCP transport is unavailable) for Autopilot lifecycle state. State must be session-aware when a session id exists.
78
+ Use the CLI-first state surface (`omx state ... --json`) for Autopilot lifecycle state. State must be session-aware when a session id exists. If the explicit MCP compatibility surface is already available, equivalent `omx_state` tool calls remain acceptable but are not required.
79
79
 
80
80
  Required fields:
81
81
 
@@ -99,7 +99,7 @@ Required fields:
99
99
  }
100
100
  ```
101
101
 
102
- - **On start**: `state_write({mode:"autopilot", active:true, current_phase:"ralplan", iteration:1, review_cycle:0, state:{phase_cycle:["ralplan","ralph","code-review"], handoff_artifacts:{context_snapshot_path, ralplan:null, ralph:null, code_review:null}, review_verdict:null, return_to_ralplan_reason:null}})`
102
+ - **On start**: `omx state write --input '{"mode":"autopilot","active":true,"current_phase":"ralplan","iteration":1,"review_cycle":0,"state":{"phase_cycle":["ralplan","ralph","code-review"],"handoff_artifacts":{"context_snapshot_path":"<snapshot-path>","ralplan":null,"ralph":null,"code_review":null},"review_verdict":null,"return_to_ralplan_reason":null}}' --json`
103
103
  - **On ralplan -> ralph**: set `current_phase:"ralph"`, persist the plan/test-spec paths under `handoff_artifacts.ralplan`.
104
104
  - **On ralph -> code-review**: set `current_phase:"code-review"`, persist implementation/test evidence under `handoff_artifacts.ralph`.
105
105
  - **On clean review**: set `active:false`, `current_phase:"complete"`, persist `review_verdict:{recommendation:"APPROVE", architectural_status:"CLEAR", clean:true}` and `completed_at`.
@@ -141,9 +141,7 @@ The code-reviewer agent SHOULD consult Codex for cross-validation.
141
141
  - Small, isolated changes
142
142
 
143
143
  ### Tool Usage
144
- Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools.
145
- Use `mcp__x__ask_codex` with `agent_role: "code-reviewer"`.
146
- If ToolSearch finds no MCP tools, fall back to the `code-reviewer` agent.
144
+ Prefer native `code-reviewer` agent consultation or CLI-backed `ask_codex` surfaces when available. Optional MCP compatibility ask tools may be used only when already enabled. If consultation tools are unavailable, fall back to the `code-reviewer` agent.
147
145
 
148
146
  **Note:** Codex calls can take up to 1 hour. Consider the review timeline before consulting.
149
147
 
@@ -72,7 +72,7 @@ If no flag is provided, use **Standard**.
72
72
  - Do not hand off to execution while ambiguity remains above threshold unless user explicitly opts to proceed with warning
73
73
  - Do not crystallize or hand off while `Non-goals` or `Decision Boundaries` remain unresolved, even if the weighted ambiguity threshold is met
74
74
  - Treat early exit as a safety valve, not the default success path
75
- - Persist mode state for resume safety (`state_write` / `state_read`)
75
+ - Persist mode state for resume safety with CLI-first state commands (`omx state write/read --input '<json>' --json`); use `state_write` / `state_read` only when explicit MCP compatibility is enabled
76
76
  </Execution_Policy>
77
77
 
78
78
  <Steps>
@@ -101,7 +101,7 @@ If no flag is provided, use **Standard**.
101
101
  2. Detect project context:
102
102
  - Run `explore` to classify **brownfield** (existing codebase target) vs **greenfield**.
103
103
  - For brownfield, collect relevant codebase context before questioning.
104
- 3. Initialize state via `state_write(mode="deep-interview")`:
104
+ 3. Initialize state via `omx state write --input '{"mode":"deep-interview","active":true}' --json`:
105
105
 
106
106
  ```json
107
107
  {
@@ -286,7 +286,7 @@ Readiness gate:
286
286
  Show weighted breakdown table, readiness-gate status (`Non-goals`, `Decision Boundaries`), and the next focus dimension.
287
287
 
288
288
  ### 2e) Persist state
289
- Append round result and updated scores via `state_write`.
289
+ Append round result and updated scores via `omx state write --input '<json>' --json`; use `state_write` only when explicit MCP compatibility is enabled.
290
290
 
291
291
  ### 2f) Round controls
292
292
  - Do not offer early exit before the first explicit assumption probe and one persistent follow-up have happened
@@ -428,7 +428,7 @@ Preserve `$ralph` for persistent single-owner execution/verification and `$team`
428
428
  - From attached-tmux Bash/tool paths, call it as `OMX_QUESTION_RETURN_PANE=$TMUX_PANE omx question ...` unless an explicit `%pane` return target is already known
429
429
  - If the current runtime is outside tmux and cannot render `omx question`, use native structured input when available; otherwise ask exactly one concise plain-text question and wait for the answer
430
430
  - After `omx question` returns JSON, prefer `answers[0].answer` / `answers[]`; use legacy `answer` only as a fallback for older records
431
- - Use `state_write` / `state_read` for resumable mode state
431
+ - Use `omx state write/read --input '<json>' --json` for resumable mode state; `state_write` / `state_read` are explicit MCP compatibility fallbacks only
432
432
  - If the interview cannot ask a required `omx question` round, persist the blocker as terminal state with `active: false` and `current_phase: "blocked"`; do not write a terminal blocked phase with `active: true`
433
433
  - Read/write context snapshots under `.omx/context/`
434
434
  - Record whether the oversized-context summary gate is not needed, pending, or satisfied before any scoring or handoff step
@@ -475,7 +475,7 @@ enableChallengeModes = true
475
475
 
476
476
  ## Resume
477
477
 
478
- If interrupted, rerun `$deep-interview`. Resume from persisted mode state via `state_read(mode="deep-interview")`.
478
+ If interrupted, rerun `$deep-interview`. Resume from persisted mode state via `omx state read --input '{"mode":"deep-interview"}' --json`.
479
479
 
480
480
  ## Recommended 3-Stage Pipeline
481
481
 
@@ -487,5 +487,3 @@ deep-interview -> ralplan -> autopilot
487
487
  - Stage 2 (ralplan): feasibility + architecture gate
488
488
  - Stage 3 (autopilot): execution + QA + validation gate
489
489
  </Advanced>
490
-
491
- Task: {{ARGUMENTS}}
@@ -51,7 +51,7 @@ echo "Latest npm: $LATEST"
51
51
  - If no cache entry exists: INFO - plugin marketplace artifact not cached; this may be normal when OMX was installed only through npm/setup
52
52
  - Compare each printed `PLUGIN_VERSION` with `LATEST`; if it differs and is not `local`: WARN - outdated plugin cache
53
53
  - If one marketplace has multiple version directories: WARN - stale cache for that marketplace/plugin pair
54
- - Remember: plugin install/discovery is not a replacement for `npm install -g oh-my-codex` plus `omx setup`; the packaged plugin now carries plugin-scoped companion metadata for MCP servers and apps, while native/runtime hooks and the rest of OMX runtime wiring stay setup-owned
54
+ - Remember: plugin install/discovery is not a replacement for `npm install -g oh-my-codex` plus `omx setup`; the packaged plugin carries plugin-scoped companion metadata for optional MCP compatibility servers and apps, with first-party MCP disabled by default, while native/runtime hooks and the rest of OMX runtime wiring stay setup-owned
55
55
 
56
56
  ### Step 2: Check Hook Configuration (config.toml + legacy settings.json)
57
57
 
@@ -123,7 +123,7 @@ ls -la ~/.agents/skills/ 2>/dev/null
123
123
  ```
124
124
 
125
125
  **Diagnosis**:
126
- - If `~/.codex/agents/` exists with oh-my-codex-related files: WARN - legacy generated agents or hand-installed role files. The Codex plugin can package reusable workflows plus plugin-scoped companion metadata for MCP/apps; legacy setup installs native agents, while plugin setup archives stale legacy native-agent files and keeps config/hooks current.
126
+ - If `~/.codex/agents/` exists with oh-my-codex-related files: WARN - legacy generated agents or hand-installed role files. The Codex plugin can package reusable workflows plus plugin-scoped companion metadata for optional MCP/apps; legacy setup installs native agents, while plugin setup archives stale legacy native-agent files and keeps config/hooks current.
127
127
  - If `~/.codex/commands/` exists with oh-my-codex-related files: WARN - legacy command files from older installs. Current OMX uses skills/workflows plus setup-managed native surfaces.
128
128
  - If `${CODEX_HOME:-~/.codex}/skills/` exists with OMX skills: OK - canonical current user skill root
129
129
  - If `~/.agents/skills/` exists: WARN - historical legacy skill root that can overlap with `${CODEX_HOME:-~/.codex}/skills/` and cause duplicate Enable/Disable Skills entries
@@ -7,4 +7,108 @@ description: Ecomode deprecated shim
7
7
 
8
8
  Hard-deprecated. Do not invoke or route this skill. Use `$ultrawork` directly for maintained high-throughput execution workflows.
9
9
 
10
- Task: {{ARGUMENTS}}
10
+ ## What Ecomode Does
11
+
12
+ Overrides default model selection to prefer cheaper tiers:
13
+
14
+ | Default Tier | Ecomode Override |
15
+ |--------------|------------------|
16
+ | THOROUGH | STANDARD, THOROUGH only if essential |
17
+ | STANDARD | LOW first, STANDARD if needed |
18
+ | LOW | LOW - no change |
19
+
20
+ ## What Ecomode Does NOT Do
21
+
22
+ - **Persistence**: Use `ralph` for "don't stop until done"
23
+ - **Parallel Execution**: Use `ultrawork` for parallel agents
24
+ - **Delegation Enforcement**: Always active via core orchestration
25
+
26
+ ## Combining Ecomode with Other Modes
27
+
28
+ Ecomode is a modifier that combines with execution modes:
29
+
30
+ | Combination | Effect |
31
+ |-------------|--------|
32
+ | `eco ralph` | Ralph loop with cheaper agents |
33
+ | `eco ultrawork` | Parallel execution with cheaper agents |
34
+ | `eco autopilot` | Full autonomous with cost optimization |
35
+
36
+ ## Ecomode Routing Rules
37
+
38
+ **ALWAYS prefer lower tiers. Only escalate when task genuinely requires it.**
39
+
40
+ | Decision | Rule |
41
+ |----------|------|
42
+ | DEFAULT | Start with LOW tier for most tasks |
43
+ | UPGRADE | Escalate to STANDARD when LOW tier fails or task requires multi-file reasoning |
44
+ | AVOID | THOROUGH tier - only for planning/critique if essential |
45
+
46
+ ## Agent Selection in Ecomode
47
+
48
+ **FIRST ACTION:** Before delegating any work, read the agent reference file:
49
+ ```
50
+ Read file: docs/shared/agent-tiers.md
51
+ ```
52
+ This provides the complete agent tier matrix, MCP tool assignments, and selection guidance.
53
+
54
+ **Ecomode preference order:**
55
+
56
+ ```
57
+ // PREFERRED - Use for most tasks
58
+ use /prompts:executor for this scoped task
59
+ use /prompts:explore for this scoped task
60
+ use /prompts:architect for this scoped task
61
+
62
+ // FALLBACK - Only if LOW fails
63
+ use /prompts:executor for this scoped task
64
+ use /prompts:architect for this scoped task
65
+
66
+ // AVOID - Only for planning/critique if essential
67
+ use /prompts:planner for this scoped task
68
+ ```
69
+
70
+ ## Delegation Enforcement
71
+
72
+ Ecomode maintains all delegation rules from core protocol with cost-optimized routing:
73
+
74
+ | Action | Delegate To | Model |
75
+ |--------|-------------|-------|
76
+ | Code changes | executor | LOW / STANDARD |
77
+ | Analysis | architect | LOW |
78
+ | Search | explore | LOW |
79
+ | Documentation | writer | LOW |
80
+
81
+ ### Background Execution
82
+ Long-running commands (install, build, test) run in background. Maximum 20 concurrent.
83
+
84
+ ## Token Savings Tips
85
+
86
+ 1. **Batch similar tasks** to one agent instead of spawning many
87
+ 2. **Use explore (LOW tier)** for file discovery, not architect
88
+ 3. **Prefer LOW-tier executor routing** for simple changes - only upgrade if it fails
89
+ 4. **Use writer (LOW tier)** for all documentation tasks
90
+ 5. **Avoid THOROUGH-tier agents** unless the task genuinely requires deep reasoning
91
+
92
+ ## Disabling Ecomode
93
+
94
+ Ecomode can be completely disabled via config. When disabled, all ecomode keywords are ignored.
95
+
96
+ Set in `~/.codex/.omx-config.json`:
97
+ ```json
98
+ {
99
+ "ecomode": {
100
+ "enabled": false
101
+ }
102
+ }
103
+ ```
104
+
105
+ ## State Management
106
+
107
+ Use the CLI-first state surface (`omx state ... --json`) for ecomode lifecycle state. If explicit MCP compatibility tools are already available, equivalent `omx_state` calls are optional compatibility, not the default.
108
+
109
+ - **On activation**:
110
+ `omx state write --input '{"mode":"ecomode","active":true}' --json`
111
+ - **On deactivation/completion**:
112
+ `omx state write --input '{"mode":"ecomode","active":false}' --json`
113
+ - **On cancellation/cleanup**:
114
+ run `$cancel` (which should call `omx state clear --input '{"mode":"ecomode"}' --json`)
@@ -1,34 +1,12 @@
1
1
  ---
2
2
  name: frontend-ui-ux
3
- description: Designer-developer for UI/UX work
3
+ description: Deprecated compatibility shim for designer-led frontend UI/UX work
4
4
  ---
5
5
 
6
- # Frontend UI/UX Command
6
+ # Frontend UI/UX compatibility shim
7
7
 
8
- Routes to the designer agent or Gemini MCP for frontend work.
8
+ Hard-deprecated. Do not invoke or route this skill for new work.
9
9
 
10
- ## Usage
11
-
12
- ```
13
- /frontend-ui-ux <design task>
14
- ```
15
-
16
- ## Routing
17
-
18
- ### Preferred: MCP Direct
19
- Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools.
20
- Use `mcp__g__ask_gemini` with `agent_role: "designer"` for design tasks.
21
- If ToolSearch finds no MCP tools, use the Codex agent fallback below.
22
-
23
- ### Fallback: Codex Agent
24
- ```
25
- delegate(role="designer", tier="STANDARD", task="{{ARGUMENTS}}")
26
- ```
27
-
28
- ## Capabilities
29
- - Component design and implementation
30
- - Responsive layouts
31
- - Design system consistency
32
- - Accessibility compliance
10
+ Use the `designer` agent/lane directly, or use `$visual-ralph` when the task needs visual iteration and screenshot-based verification. This file exists only to preserve the public/catalog-visible `frontend-ui-ux` alias contract while designer-led frontend guidance is handled by the canonical designer surfaces.
33
11
 
34
12
  Task: {{ARGUMENTS}}
@@ -15,8 +15,8 @@ Routes to the git-master agent for git operations.
15
15
 
16
16
  ## Routing
17
17
 
18
- ```
19
- delegate(role="git-master", tier="STANDARD", task="{{ARGUMENTS}}")
18
+ ```text
19
+ Use /prompts:git-master with the user task.
20
20
  ```
21
21
 
22
22
  ## Capabilities
@@ -25,5 +25,3 @@ delegate(role="git-master", tier="STANDARD", task="{{ARGUMENTS}}")
25
25
  - Branch management
26
26
  - History cleanup
27
27
  - Style detection from repo history
28
-
29
- Task: {{ARGUMENTS}}
@@ -60,7 +60,7 @@ Supported setup flags (current implementation):
60
60
  - `project`: local directories (`./.codex`, `./.codex/skills`, `./.omx/agents`)
61
61
  - User-scope skill delivery targets:
62
62
  - `legacy`: keep installing/updating OMX skills in the resolved user skill root
63
- - `plugin`: rely on Codex plugin discovery for bundled skills and archive/remove legacy OMX-managed prompts/skills/native agents; setup still installs native Codex hooks and setup-owned runtime feature flags (`codex_hooks = true`, `goals = true`) because plugins do not carry hooks or enable Codex goal mode by themselves.
63
+ - `plugin`: rely on Codex plugin discovery for bundled skills and archive/remove legacy OMX-managed prompts/skills/native agents; setup still installs native Codex hooks and setup-owned runtime feature flags (`hooks = true` on current Codex, legacy `codex_hooks = true` when that is the only reported hook feature, plus `goals = true`) because plugins do not carry hooks or enable Codex goal mode by themselves.
64
64
  - Migration hint: in `user` scope, if historical `~/.agents/skills` still exists alongside `${CODEX_HOME:-~/.codex}/skills`, current setup prints a cleanup hint. **Why the paths differ**: `${CODEX_HOME:-~/.codex}/skills/` is the path current Codex CLI natively loads as its skill root; `~/.agents/skills/` was the skill root in an older Codex CLI release before `~/.codex` became the standard home directory. OMX writes only to the canonical `${CODEX_HOME:-~/.codex}/skills/` path. When both directories exist simultaneously, Codex discovers skills from both trees and may show duplicate entries in Enable/Disable Skills. Archive or remove `~/.agents/skills/` to resolve this.
65
65
  - If persisted scope is `project`, `omx` launch automatically uses `CODEX_HOME=./.codex` unless user explicitly overrides `CODEX_HOME`.
66
66
  - Plugin mode prompts separately for optional AGENTS.md defaults and optional `developer_instructions` defaults. If `developer_instructions` already exists, setup asks before overwriting it; non-interactive runs preserve it.
@@ -74,7 +74,7 @@ Use this map when reconciling setup behavior or debugging a confusing install:
74
74
  | Surface | Owner | Notes |
75
75
  | --- | --- | --- |
76
76
  | `./.omx/setup-scope.json` | `omx setup` | Persists setup scope and user-scope skill delivery mode. TTY reruns summarize it and offer keep/review/reset. |
77
- | `~/.codex/config.toml` / `./.codex/config.toml` | `omx setup` generated blocks + user edits | Setup refreshes OMX-managed blocks while preserving supported manual content; setup-owned runtime feature flags include `multi_agent`, `child_agents_md`, `hooks`, and `goals`. |
77
+ | `~/.codex/config.toml` / `./.codex/config.toml` | `omx setup` generated blocks + user edits | Setup refreshes OMX-managed blocks while preserving supported manual content; setup-owned runtime feature flags include `multi_agent`, `child_agents_md`, the Codex hook feature flag (`hooks` or legacy `codex_hooks`), and `goals`. |
78
78
  | `~/.codex/hooks.json` / `./.codex/hooks.json` | `omx setup` shared ownership | Setup owns OMX native hook wrappers and preserves user-owned hooks. |
79
79
  | prompts, skills, native agents | `omx setup` or Codex plugin delivery | Legacy mode installs local files; plugin mode relies on plugin discovery for bundled skills and archives/removes legacy OMX-managed prompt/native-agent copies. |
80
80
  | `AGENTS.md` | `omx setup` with overwrite safety | Generated defaults or managed refreshes are guarded by force/session checks. |
@@ -114,7 +114,7 @@ From `omx doctor`, expect:
114
114
  - Skills installed (scope-dependent: user or project)
115
115
  - AGENTS.md found in project root
116
116
  - `.omx/state` exists
117
- - OMX MCP servers configured in scope target `config.toml` (`~/.codex/config.toml` or `./.codex/config.toml`)
117
+ - CLI-first config present in the scope target `config.toml`; first-party OMX MCP servers and shared MCP registry sync are omitted by default unless setup was run with `--mcp compat`
118
118
 
119
119
  ## Troubleshooting
120
120
 
@@ -52,9 +52,9 @@ return a `StageResult` with status, artifacts, and duration.
52
52
  Pipeline state persists via the ModeState system at `.omx/state/pipeline-state.json`.
53
53
  The HUD renders pipeline phase automatically. Resume is supported from the last incomplete stage.
54
54
 
55
- - **On start**: `state_write({mode: "pipeline", active: true, current_phase: "stage:ralplan"})`
56
- - **On stage transitions**: `state_write({mode: "pipeline", current_phase: "stage:<name>"})`
57
- - **On completion**: `state_write({mode: "pipeline", active: false, current_phase: "complete"})`
55
+ - **On start**: `omx state write --input '{"mode":"pipeline","active":true,"current_phase":"stage:ralplan"}' --json`
56
+ - **On stage transitions**: `omx state write --input '{"mode":"pipeline","current_phase":"stage:<name>"}' --json`
57
+ - **On completion**: `omx state write --input '{"mode":"pipeline","active":false,"current_phase":"complete"}' --json`
58
58
 
59
59
  ## API
60
60
 
@@ -137,15 +137,13 @@ Plans are saved to `.omx/plans/`. Drafts go to `.omx/drafts/`.
137
137
  </Steps>
138
138
 
139
139
  <Tool_Usage>
140
- - Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools
141
- - Use the surface-appropriate structured question path for preference questions (scope, priority, timeline, risk tolerance): attached-tmux OMX runtime uses `omx question`; outside tmux uses native structured input when available. Use plain text only as a last fallback for unsupported surfaces or highly specific free-form values.
142
- - `omx question` success JSON uses `answers[]` as the primary contract. For single-question planning prompts, read `answers[0].answer`; treat top-level `answer` as legacy compatibility fallback only.
143
- - Batch `questions[]` may be used for non-interview grouped preference or approval prompts when one submitted form is clearer than multiple interruptions; interview mode still asks one question per round.
140
+ - Use `AskUserQuestion` for preference questions (scope, priority, timeline, risk tolerance) -- provides clickable UI
141
+ - Use plain text for questions needing specific values (port numbers, names, follow-up clarifications)
144
142
  - Use the `explore` agent (LOW tier, bounded quick pass) to gather codebase facts before asking the user
145
143
  - Use `ask_codex` with `agent_role: "planner"` for planning validation on large-scope plans
146
144
  - Use `ask_codex` with `agent_role: "analyst"` for requirements analysis
147
145
  - Use `ask_codex` with `agent_role: "critic"` for plan review in consensus and review modes
148
- - If ToolSearch finds no MCP tools or Codex is unavailable, fall back to equivalent OMX prompt agents -- never block on external tools
146
+ - If optional MCP compatibility tools or Codex consultation are unavailable, fall back to equivalent OMX prompt/native agents -- never block on external tools
149
147
  - **CRITICAL — Consensus mode agent calls MUST be sequential, never parallel.** Always await the Architect result before issuing the Critic call.
150
148
  - In consensus mode, default to RALPLAN-DR short mode; enable deliberate mode on `--deliberate` or explicit high-risk signals (auth/security, migrations, destructive changes, production incidents, compliance/PII, public API breakage)
151
149
  - In consensus mode with `--interactive`: use `AskUserQuestion` / the structured question UI for the user feedback step (step 2) and the final approval step (step 7) -- never ask for approval in plain text when a structured surface is available. Without `--interactive`, auto-proceed through planning steps without pausing. Output the final plan without execution.
@@ -153,7 +151,6 @@ Plans are saved to `.omx/plans/`. Drafts go to `.omx/drafts/`.
153
151
  - In consensus mode, execution follow-up handoff **MUST** include an explicit available-agent-types roster plus concrete staffing / role-allocation guidance grounded in that roster, suggested reasoning levels by lane, product-facing goal-mode follow-up suggestions (`$ultragoal` by default, `$autoresearch-goal` for research projects, `$performance-goal` for optimization/performance projects), explicit `omx team` / `$team` launch hints, and a team verification path
154
152
  </Tool_Usage>
155
153
 
156
-
157
154
  ## Scenario Examples
158
155
 
159
156
  **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.
@@ -91,14 +91,13 @@ Complex tasks often fail silently: partial implementations get declared "done",
91
91
  </Steps>
92
92
 
93
93
  <Tool_Usage>
94
- - Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools
95
94
  - Use `ask_codex` with `agent_role: "architect"` for verification cross-checks when changes are security-sensitive, architectural, or involve complex multi-system integration
96
95
  - Skip Codex consultation for simple feature additions, well-tested changes, or time-critical verification
97
- - If ToolSearch finds no MCP tools or Codex is unavailable, proceed with architect agent verification alone -- never block on external tools
98
- - Use `state_write` / `state_read` for ralph mode state persistence between iterations
96
+ - If MCP compatibility tools are unavailable, proceed with CLI/agent verification alone -- never block on external tools
97
+ - Use `omx state write/read --input '<json>' --json` for ralph mode state persistence between iterations
99
98
  - Use Codex goal tools when present: `get_goal` to discover or re-check the active objective, `create_goal` only when the user/system explicitly requested a new goal and no active goal exists, and `update_goal` only after the audited objective is fully achieved.
100
99
  - Persist context snapshot path in Ralph mode state so later phases and agents share the same grounding context
101
- - If an `omx_state` MCP tool call reports that its stdio transport is unavailable/closed, do **not** retry the same MCP call. Retry once through the supported CLI parity surface with the same payload, preserving `workingDirectory` and `session_id`: `omx state write --input '<json>' --json`, `omx state read --input '<json>' --json`, or `omx state clear --input '<json>' --json`. If the CLI path also fails, continue with `.omx/context` / `.omx/plans` file-backed artifacts and report the state persistence blocker.
100
+ - Prefer CLI state commands. If an explicit MCP compatibility `omx_state` call reports that its stdio transport is unavailable/closed, do **not** retry the same MCP call. Retry once through the supported CLI parity surface with the same payload, preserving `workingDirectory` and `session_id`: `omx state write --input '<json>' --json`, `omx state read --input '<json>' --json`, or `omx state clear --input '<json>' --json`. If the CLI path also fails, continue with `.omx/context` / `.omx/plans` file-backed artifacts and report the state persistence blocker.
102
101
  </Tool_Usage>
103
102
 
104
103
  ## Goal Mode Integration
@@ -118,18 +117,18 @@ Codex goal mode is the thread-level completion contract for long-running Ralph w
118
117
 
119
118
  ## State Management
120
119
 
121
- Use the `omx_state` MCP server tools (`state_write`, `state_read`, `state_clear`) for Ralph lifecycle state.
120
+ Use the CLI-first state surface for Ralph lifecycle state (`omx state write/read/clear --input '<json>' --json`). Explicit MCP compatibility tools (`state_write`, `state_read`, `state_clear`) remain acceptable only when already enabled.
122
121
 
123
122
  - **On start**:
124
- `state_write({mode: "ralph", active: true, iteration: 1, max_iterations: 10, current_phase: "executing", started_at: "<now>", state: {context_snapshot_path: "<snapshot-path>"}})`
123
+ `omx state write --input '{"mode":"ralph","active":true,"iteration":1,"max_iterations":10,"current_phase":"executing","started_at":"<now>","state":{"context_snapshot_path":"<snapshot-path>"}}' --json`
125
124
  - **On each iteration**:
126
- `state_write({mode: "ralph", iteration: <current>, current_phase: "executing"})`
125
+ `omx state write --input '{"mode":"ralph","iteration":<current>,"current_phase":"executing"}' --json`
127
126
  - **On verification/fix transition**:
128
- `state_write({mode: "ralph", current_phase: "verifying"})` or `state_write({mode: "ralph", current_phase: "fixing"})`
127
+ `omx state write --input '{"mode":"ralph","current_phase":"verifying"}' --json` or `omx state write --input '{"mode":"ralph","current_phase":"fixing"}' --json`
129
128
  - **On completion**:
130
- `state_write({mode: "ralph", active: false, current_phase: "complete", completed_at: "<now>"})`
129
+ `omx state write --input '{"mode":"ralph","active":false,"current_phase":"complete","completed_at":"<now>"}' --json`
131
130
  - **On cancellation/cleanup**:
132
- run `$cancel` (which should call `state_clear(mode="ralph")`)
131
+ run `$cancel` (which should call `omx state clear --input '{"mode":"ralph"}' --json`)
133
132
 
134
133
 
135
134
  ## Scenario Examples
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: swarm
3
- description: Swarm deprecated shim
3
+ description: Deprecated compatibility shim for team execution
4
4
  ---
5
5
 
6
- # Swarm deprecated
6
+ # Swarm compatibility shim
7
7
 
8
- Hard-deprecated. Do not invoke or route this skill. Use `$team` directly for coordinated multi-agent execution.
8
+ Hard-deprecated. Do not invoke or route this skill for new work.
9
+
10
+ Use `$team` or `omx team` directly for coordinated multi-agent execution. This file exists only to preserve the public/catalog-visible `swarm` skill contract while Team mode owns coordinated execution.
9
11
 
10
12
  Task: {{ARGUMENTS}}
@@ -7,4 +7,98 @@ description: TDD deprecated shim
7
7
 
8
8
  Hard-deprecated. Do not invoke or route this skill. Keep test-first discipline inside the active implementation workflow and verify with the project test suite.
9
9
 
10
- Task: {{ARGUMENTS}}
10
+ ## The Iron Law
11
+
12
+ **NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST**
13
+
14
+ Write code before test? DELETE IT. Start over. No exceptions.
15
+
16
+ ## Red-Green-Refactor Cycle
17
+
18
+ ### 1. RED: Write Failing Test
19
+ - Write test for the NEXT piece of functionality
20
+ - Run test - MUST FAIL
21
+ - If it passes, your test is wrong
22
+
23
+ ### 2. GREEN: Minimal Implementation
24
+ - Write ONLY enough code to pass the test
25
+ - No extras. No "while I'm here."
26
+ - Run test - MUST PASS
27
+
28
+ ### 3. REFACTOR: Clean Up
29
+ - Improve code quality
30
+ - Run tests after EVERY change
31
+ - Must stay green
32
+
33
+ ### 4. REPEAT
34
+ - Next failing test
35
+ - Continue cycle
36
+
37
+ ## Enforcement Rules
38
+
39
+ | If You See | Action |
40
+ |------------|--------|
41
+ | Code written before test | STOP. Delete code. Write test first. |
42
+ | Test passes on first run | Test is wrong. Fix it to fail first. |
43
+ | Multiple features in one cycle | STOP. One test, one feature. |
44
+ | Skipping refactor | Go back. Clean up before next feature. |
45
+
46
+ ## Commands
47
+
48
+ Before each implementation:
49
+ ```bash
50
+ # Run the project's test command - should have ONE new failure
51
+ ```
52
+
53
+ After implementation:
54
+ ```bash
55
+ # Run the project's test command - new test should pass, all others still pass
56
+ ```
57
+
58
+ ## Output Format
59
+
60
+ When guiding TDD:
61
+
62
+ ```
63
+ ## TDD Cycle: [Feature Name]
64
+
65
+ ### RED Phase
66
+ Test: [test code]
67
+ Expected failure: [what error you expect]
68
+ Actual: [run result showing failure]
69
+
70
+ ### GREEN Phase
71
+ Implementation: [minimal code]
72
+ Result: [run result showing pass]
73
+
74
+ ### REFACTOR Phase
75
+ Changes: [what was cleaned up]
76
+ Result: [tests still pass]
77
+ ```
78
+
79
+ ## External Model Consultation (Preferred)
80
+
81
+ The tdd-guide agent SHOULD consult Codex for test strategy validation.
82
+
83
+ ### Protocol
84
+ 1. **Form your OWN test strategy FIRST** - Design tests independently
85
+ 2. **Consult for validation** - Cross-check test coverage strategy
86
+ 3. **Critically evaluate** - Never blindly adopt external suggestions
87
+ 4. **Graceful fallback** - Never block if tools unavailable
88
+
89
+ ### When to Consult
90
+ - Complex domain logic requiring comprehensive test coverage
91
+ - Edge case identification for critical paths
92
+ - Test architecture for large features
93
+ - Unfamiliar testing patterns
94
+
95
+ ### When to Skip
96
+ - Simple unit tests
97
+ - Well-understood testing patterns
98
+ - Time-critical TDD cycles
99
+ - Small, isolated functionality
100
+
101
+ ### Tool Usage
102
+ Prefer native `test-engineer` consultation or CLI-backed ask surfaces when available. Optional MCP compatibility ask tools may be used only when already enabled. If consultation tools are unavailable, fall back to the `test-engineer` agent.
103
+
104
+ **Remember:** The discipline IS the value. Shortcuts destroy the benefit.
@@ -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.