oh-my-codex 0.16.3 → 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 (278) 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 +101 -6
  11. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  12. package/dist/cli/__tests__/index.test.js +131 -2
  13. package/dist/cli/__tests__/index.test.js.map +1 -1
  14. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +2 -0
  15. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
  16. package/dist/cli/__tests__/ralph.test.js +47 -0
  17. package/dist/cli/__tests__/ralph.test.js.map +1 -1
  18. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +2 -2
  19. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -1
  20. package/dist/cli/__tests__/setup-install-mode.test.js +272 -26
  21. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  22. package/dist/cli/__tests__/setup-refresh.test.js +85 -3
  23. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  24. package/dist/cli/__tests__/setup-scope.test.js +1 -1
  25. package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
  26. package/dist/cli/__tests__/setup-skills-overwrite.test.js +2 -1
  27. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  28. package/dist/cli/__tests__/team.test.js +108 -0
  29. package/dist/cli/__tests__/team.test.js.map +1 -1
  30. package/dist/cli/__tests__/ultragoal.test.js +69 -0
  31. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  32. package/dist/cli/__tests__/uninstall.test.js +54 -8
  33. package/dist/cli/__tests__/uninstall.test.js.map +1 -1
  34. package/dist/cli/cleanup.d.ts.map +1 -1
  35. package/dist/cli/cleanup.js +8 -4
  36. package/dist/cli/cleanup.js.map +1 -1
  37. package/dist/cli/codex-feature-probe.d.ts +9 -0
  38. package/dist/cli/codex-feature-probe.d.ts.map +1 -0
  39. package/dist/cli/codex-feature-probe.js +28 -0
  40. package/dist/cli/codex-feature-probe.js.map +1 -0
  41. package/dist/cli/doctor.d.ts +1 -0
  42. package/dist/cli/doctor.d.ts.map +1 -1
  43. package/dist/cli/doctor.js +152 -17
  44. package/dist/cli/doctor.js.map +1 -1
  45. package/dist/cli/index.d.ts +9 -2
  46. package/dist/cli/index.d.ts.map +1 -1
  47. package/dist/cli/index.js +135 -17
  48. package/dist/cli/index.js.map +1 -1
  49. package/dist/cli/mcp-parity.js +8 -8
  50. package/dist/cli/mcp-parity.js.map +1 -1
  51. package/dist/cli/plugin-marketplace.d.ts +3 -0
  52. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  53. package/dist/cli/plugin-marketplace.js +88 -0
  54. package/dist/cli/plugin-marketplace.js.map +1 -1
  55. package/dist/cli/ralph.d.ts.map +1 -1
  56. package/dist/cli/ralph.js +21 -0
  57. package/dist/cli/ralph.js.map +1 -1
  58. package/dist/cli/setup-preferences.d.ts +4 -0
  59. package/dist/cli/setup-preferences.d.ts.map +1 -1
  60. package/dist/cli/setup-preferences.js +7 -0
  61. package/dist/cli/setup-preferences.js.map +1 -1
  62. package/dist/cli/setup.d.ts +5 -3
  63. package/dist/cli/setup.d.ts.map +1 -1
  64. package/dist/cli/setup.js +114 -44
  65. package/dist/cli/setup.js.map +1 -1
  66. package/dist/cli/ultragoal.d.ts +1 -1
  67. package/dist/cli/ultragoal.d.ts.map +1 -1
  68. package/dist/cli/ultragoal.js +64 -5
  69. package/dist/cli/ultragoal.js.map +1 -1
  70. package/dist/cli/uninstall.d.ts +2 -0
  71. package/dist/cli/uninstall.d.ts.map +1 -1
  72. package/dist/cli/uninstall.js +12 -3
  73. package/dist/cli/uninstall.js.map +1 -1
  74. package/dist/config/__tests__/codex-feature-flags.test.d.ts +2 -0
  75. package/dist/config/__tests__/codex-feature-flags.test.d.ts.map +1 -0
  76. package/dist/config/__tests__/codex-feature-flags.test.js +35 -0
  77. package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -0
  78. package/dist/config/__tests__/codex-hooks.test.js +7 -0
  79. package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
  80. package/dist/config/__tests__/generator-idempotent.test.js +70 -9
  81. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  82. package/dist/config/__tests__/generator-notify.test.js +116 -11
  83. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  84. package/dist/config/__tests__/wiki-config-contract.test.js +6 -3
  85. package/dist/config/__tests__/wiki-config-contract.test.js.map +1 -1
  86. package/dist/config/codex-feature-flags.d.ts +21 -0
  87. package/dist/config/codex-feature-flags.d.ts.map +1 -0
  88. package/dist/config/codex-feature-flags.js +56 -0
  89. package/dist/config/codex-feature-flags.js.map +1 -0
  90. package/dist/config/codex-hooks.d.ts +2 -0
  91. package/dist/config/codex-hooks.d.ts.map +1 -1
  92. package/dist/config/codex-hooks.js +25 -3
  93. package/dist/config/codex-hooks.js.map +1 -1
  94. package/dist/config/generator.d.ts +11 -2
  95. package/dist/config/generator.d.ts.map +1 -1
  96. package/dist/config/generator.js +221 -123
  97. package/dist/config/generator.js.map +1 -1
  98. package/dist/config/omx-first-party-mcp.d.ts +3 -1
  99. package/dist/config/omx-first-party-mcp.d.ts.map +1 -1
  100. package/dist/config/omx-first-party-mcp.js +2 -2
  101. package/dist/config/omx-first-party-mcp.js.map +1 -1
  102. package/dist/hooks/__tests__/keyword-detector.test.js +92 -2
  103. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  104. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js +125 -1
  105. package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js.map +1 -1
  106. package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts +2 -0
  107. package/dist/hooks/__tests__/skill-catalog-hygiene.test.d.ts.map +1 -0
  108. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js +84 -0
  109. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -0
  110. package/dist/hooks/agents-overlay.js +2 -2
  111. package/dist/hooks/agents-overlay.js.map +1 -1
  112. package/dist/hooks/keyword-detector.d.ts +1 -0
  113. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  114. package/dist/hooks/keyword-detector.js +7 -5
  115. package/dist/hooks/keyword-detector.js.map +1 -1
  116. package/dist/hud/__tests__/state.test.js +164 -0
  117. package/dist/hud/__tests__/state.test.js.map +1 -1
  118. package/dist/hud/state.d.ts.map +1 -1
  119. package/dist/hud/state.js +4 -5
  120. package/dist/hud/state.js.map +1 -1
  121. package/dist/mcp/__tests__/state-paths.test.js +61 -0
  122. package/dist/mcp/__tests__/state-paths.test.js.map +1 -1
  123. package/dist/mcp/__tests__/state-server.test.js +166 -0
  124. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  125. package/dist/mcp/state-paths.d.ts.map +1 -1
  126. package/dist/mcp/state-paths.js +23 -2
  127. package/dist/mcp/state-paths.js.map +1 -1
  128. package/dist/modes/__tests__/base-session-scope.test.js +22 -0
  129. package/dist/modes/__tests__/base-session-scope.test.js.map +1 -1
  130. package/dist/modes/__tests__/base-tmux-pane.test.js +57 -26
  131. package/dist/modes/__tests__/base-tmux-pane.test.js.map +1 -1
  132. package/dist/modes/base.d.ts.map +1 -1
  133. package/dist/modes/base.js +5 -0
  134. package/dist/modes/base.js.map +1 -1
  135. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts +2 -0
  136. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.d.ts.map +1 -0
  137. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js +316 -0
  138. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -0
  139. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts +2 -0
  140. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.d.ts.map +1 -0
  141. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js +481 -0
  142. package/dist/planning/__tests__/approved-launch-hint-lineage-matrix.test.js.map +1 -0
  143. package/dist/planning/__tests__/artifacts.test.js +533 -4
  144. package/dist/planning/__tests__/artifacts.test.js.map +1 -1
  145. package/dist/planning/__tests__/context-pack-status.test.js +524 -0
  146. package/dist/planning/__tests__/context-pack-status.test.js.map +1 -1
  147. package/dist/planning/__tests__/markdown-structure.test.d.ts +2 -0
  148. package/dist/planning/__tests__/markdown-structure.test.d.ts.map +1 -0
  149. package/dist/planning/__tests__/markdown-structure.test.js +459 -0
  150. package/dist/planning/__tests__/markdown-structure.test.js.map +1 -0
  151. package/dist/planning/__tests__/ready-context-pack-role-refs.test.js +523 -1
  152. package/dist/planning/__tests__/ready-context-pack-role-refs.test.js.map +1 -1
  153. package/dist/planning/artifacts.d.ts +1 -1
  154. package/dist/planning/artifacts.d.ts.map +1 -1
  155. package/dist/planning/artifacts.js +227 -28
  156. package/dist/planning/artifacts.js.map +1 -1
  157. package/dist/planning/context-pack-status.d.ts +25 -0
  158. package/dist/planning/context-pack-status.d.ts.map +1 -1
  159. package/dist/planning/context-pack-status.js +272 -31
  160. package/dist/planning/context-pack-status.js.map +1 -1
  161. package/dist/planning/markdown-structure.d.ts +20 -0
  162. package/dist/planning/markdown-structure.d.ts.map +1 -0
  163. package/dist/planning/markdown-structure.js +137 -0
  164. package/dist/planning/markdown-structure.js.map +1 -0
  165. package/dist/ralph/__tests__/completion-audit.test.d.ts +2 -0
  166. package/dist/ralph/__tests__/completion-audit.test.d.ts.map +1 -0
  167. package/dist/ralph/__tests__/completion-audit.test.js +121 -0
  168. package/dist/ralph/__tests__/completion-audit.test.js.map +1 -0
  169. package/dist/ralph/completion-audit.d.ts +8 -0
  170. package/dist/ralph/completion-audit.d.ts.map +1 -0
  171. package/dist/ralph/completion-audit.js +99 -0
  172. package/dist/ralph/completion-audit.js.map +1 -0
  173. package/dist/scripts/__tests__/codex-native-hook.test.js +220 -13
  174. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  175. package/dist/scripts/__tests__/notify-dispatcher.test.d.ts +2 -0
  176. package/dist/scripts/__tests__/notify-dispatcher.test.d.ts.map +1 -0
  177. package/dist/scripts/__tests__/notify-dispatcher.test.js +126 -0
  178. package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -0
  179. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  180. package/dist/scripts/codex-native-hook.js +133 -54
  181. package/dist/scripts/codex-native-hook.js.map +1 -1
  182. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  183. package/dist/scripts/codex-native-pre-post.js +4 -2
  184. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  185. package/dist/scripts/notify-dispatcher.js +30 -1
  186. package/dist/scripts/notify-dispatcher.js.map +1 -1
  187. package/dist/scripts/notify-hook.js +3 -1
  188. package/dist/scripts/notify-hook.js.map +1 -1
  189. package/dist/state/__tests__/workflow-transition.test.js +102 -27
  190. package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
  191. package/dist/state/operations.d.ts.map +1 -1
  192. package/dist/state/operations.js +9 -3
  193. package/dist/state/operations.js.map +1 -1
  194. package/dist/state/skill-active.d.ts +7 -0
  195. package/dist/state/skill-active.d.ts.map +1 -1
  196. package/dist/state/skill-active.js +25 -8
  197. package/dist/state/skill-active.js.map +1 -1
  198. package/dist/state/workflow-transition-reconcile.d.ts +1 -0
  199. package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
  200. package/dist/state/workflow-transition-reconcile.js +22 -15
  201. package/dist/state/workflow-transition-reconcile.js.map +1 -1
  202. package/dist/state/workflow-transition.js +3 -3
  203. package/dist/state/workflow-transition.js.map +1 -1
  204. package/dist/team/__tests__/approved-execution.test.js +39 -0
  205. package/dist/team/__tests__/approved-execution.test.js.map +1 -1
  206. package/dist/team/__tests__/runtime.test.js +5 -0
  207. package/dist/team/__tests__/runtime.test.js.map +1 -1
  208. package/dist/team/__tests__/scaling.test.js +497 -2
  209. package/dist/team/__tests__/scaling.test.js.map +1 -1
  210. package/dist/team/__tests__/state-root.test.js +1 -1
  211. package/dist/team/__tests__/state-root.test.js.map +1 -1
  212. package/dist/team/__tests__/worker-bootstrap.test.js +8 -0
  213. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  214. package/dist/team/approved-execution.d.ts.map +1 -1
  215. package/dist/team/approved-execution.js +3 -0
  216. package/dist/team/approved-execution.js.map +1 -1
  217. package/dist/team/scaling.d.ts.map +1 -1
  218. package/dist/team/scaling.js +43 -0
  219. package/dist/team/scaling.js.map +1 -1
  220. package/dist/team/state-root.d.ts.map +1 -1
  221. package/dist/team/state-root.js +4 -0
  222. package/dist/team/state-root.js.map +1 -1
  223. package/dist/team/state.d.ts.map +1 -1
  224. package/dist/team/state.js +2 -6
  225. package/dist/team/state.js.map +1 -1
  226. package/dist/ultragoal/__tests__/artifacts.test.js +124 -1
  227. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  228. package/dist/ultragoal/__tests__/docs-contract.test.js +21 -0
  229. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  230. package/dist/ultragoal/artifacts.d.ts +44 -2
  231. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  232. package/dist/ultragoal/artifacts.js +197 -13
  233. package/dist/ultragoal/artifacts.js.map +1 -1
  234. package/dist/wiki/lifecycle.js +1 -1
  235. package/dist/wiki/lifecycle.js.map +1 -1
  236. package/package.json +1 -1
  237. package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
  238. package/plugins/oh-my-codex/.mcp.json +5 -5
  239. package/plugins/oh-my-codex/skills/analyze/SKILL.md +0 -2
  240. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +2 -2
  241. package/plugins/oh-my-codex/skills/code-review/SKILL.md +1 -3
  242. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +5 -7
  243. package/plugins/oh-my-codex/skills/doctor/SKILL.md +2 -2
  244. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +3 -3
  245. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +3 -3
  246. package/plugins/oh-my-codex/skills/plan/SKILL.md +3 -6
  247. package/plugins/oh-my-codex/skills/ralph/SKILL.md +9 -10
  248. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +36 -3
  249. package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +21 -24
  250. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +8 -8
  251. package/plugins/oh-my-codex/skills/wiki/SKILL.md +13 -13
  252. package/skills/analyze/SKILL.md +0 -2
  253. package/skills/ask-claude/SKILL.md +5 -3
  254. package/skills/ask-gemini/SKILL.md +5 -3
  255. package/skills/autopilot/SKILL.md +2 -2
  256. package/skills/code-review/SKILL.md +1 -3
  257. package/skills/deep-interview/SKILL.md +5 -7
  258. package/skills/doctor/SKILL.md +2 -2
  259. package/skills/ecomode/SKILL.md +105 -1
  260. package/skills/frontend-ui-ux/SKILL.md +4 -26
  261. package/skills/git-master/SKILL.md +2 -4
  262. package/skills/omx-setup/SKILL.md +3 -3
  263. package/skills/pipeline/SKILL.md +3 -3
  264. package/skills/plan/SKILL.md +3 -6
  265. package/skills/ralph/SKILL.md +9 -10
  266. package/skills/swarm/SKILL.md +5 -3
  267. package/skills/tdd/SKILL.md +95 -1
  268. package/skills/ultragoal/SKILL.md +36 -3
  269. package/skills/ultraqa/SKILL.md +21 -24
  270. package/skills/ultrawork/SKILL.md +8 -8
  271. package/skills/web-clone/SKILL.md +348 -1
  272. package/skills/wiki/SKILL.md +13 -13
  273. package/src/scripts/__tests__/codex-native-hook.test.ts +231 -13
  274. package/src/scripts/__tests__/notify-dispatcher.test.ts +153 -0
  275. package/src/scripts/codex-native-hook.ts +160 -43
  276. package/src/scripts/codex-native-pre-post.ts +4 -1
  277. package/src/scripts/notify-dispatcher.ts +40 -1
  278. package/src/scripts/notify-hook.ts +3 -1
@@ -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`, `codex_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
@@ -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.
@@ -5,17 +5,15 @@ description: QA cycling workflow - test, verify, fix, repeat until goal met
5
5
 
6
6
  # UltraQA Skill
7
7
 
8
- [ULTRAQA ACTIVATED - AUTONOMOUS QA CYCLING]
9
-
10
- ## Overview
11
-
12
- ## GPT-5.5 Guidance Alignment
8
+ ## Operating Contract
13
9
 
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.
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.
15
13
 
16
- You are now in **ULTRAQA** mode - an autonomous QA cycling workflow that runs until your quality goal is met.
14
+ [ULTRAQA ACTIVATED - AUTONOMOUS QA CYCLING]
17
15
 
18
- **Cycle**: qa-tester → architect verification → fix → repeat
16
+ ## Overview
19
17
 
20
18
  ## Goal Parsing
21
19
 
@@ -43,10 +41,10 @@ If no structured goal provided, interpret the argument as a custom goal.
43
41
  - `--custom`: Run appropriate command and check for pattern
44
42
  - `--interactive`: Use qa-tester for interactive CLI/service testing:
45
43
  ```
46
- delegate(role="qa-tester", tier="STANDARD", task="TEST:
44
+ Use `/prompts:qa-tester` with:
47
45
  Goal: [describe what to verify]
48
46
  Service: [how to start]
49
- Test cases: [specific scenarios to verify]")
47
+ Test cases: [specific scenarios to verify]
50
48
  ```
51
49
 
52
50
  2. **CHECK RESULT**: Did the goal pass?
@@ -55,18 +53,18 @@ If no structured goal provided, interpret the argument as a custom goal.
55
53
 
56
54
  3. **ARCHITECT DIAGNOSIS**: Spawn architect to analyze failure
57
55
  ```
58
- delegate(role="architect", tier="THOROUGH", task="DIAGNOSE FAILURE:
56
+ Use `/prompts:architect` with:
59
57
  Goal: [goal type]
60
58
  Output: [test/build output]
61
- Provide root cause and specific fix recommendations.")
59
+ Provide root cause and specific fix recommendations.
62
60
  ```
63
61
 
64
62
  4. **FIX ISSUES**: Apply architect's recommendations
65
63
  ```
66
- delegate(role="executor", tier="STANDARD", task="FIX:
64
+ Use `/prompts:executor` with:
67
65
  Issue: [architect diagnosis]
68
66
  Files: [affected files]
69
- Apply the fix precisely as recommended.")
67
+ Apply the fix precisely as recommended.
70
68
  ```
71
69
 
72
70
  5. **REPEAT**: Go back to step 1
@@ -95,20 +93,19 @@ Output progress each cycle:
95
93
 
96
94
  ## State Tracking
97
95
 
98
- Use `omx_state` MCP tools for UltraQA lifecycle state.
96
+ 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
97
 
100
98
  - **On start**:
101
- `state_write({mode: "ultraqa", active: true, current_phase: "qa", iteration: 1, started_at: "<now>"})`
99
+ `omx state write --input '{"mode":"ultraqa","active":true,"current_phase":"qa","iteration":1,"started_at":"<now>"}' --json`
102
100
  - **On each cycle**:
103
- `state_write({mode: "ultraqa", current_phase: "qa", iteration: <cycle>})`
101
+ `omx state write --input '{"mode":"ultraqa","current_phase":"qa","iteration":<cycle>}' --json`
104
102
  - **On diagnose/fix transitions**:
105
- `state_write({mode: "ultraqa", current_phase: "diagnose"})`
106
- `state_write({mode: "ultraqa", current_phase: "fix"})`
103
+ `omx state write --input '{"mode":"ultraqa","current_phase":"diagnose"}' --json`
104
+ `omx state write --input '{"mode":"ultraqa","current_phase":"fix"}' --json`
107
105
  - **On completion**:
108
- `state_write({mode: "ultraqa", active: false, current_phase: "complete", completed_at: "<now>"})`
106
+ `omx state write --input '{"mode":"ultraqa","active":false,"current_phase":"complete","completed_at":"<now>"}' --json`
109
107
  - **For resume detection**:
110
- `state_read({mode: "ultraqa"})`
111
-
108
+ `omx state read --input '{"mode":"ultraqa"}' --json`
112
109
 
113
110
  ## Scenario Examples
114
111
 
@@ -134,9 +131,9 @@ User can cancel with `/cancel` which clears the state file.
134
131
 
135
132
  When goal is met OR max cycles reached OR exiting early, run `$cancel` or call:
136
133
 
137
- `state_clear({mode: "ultraqa"})`
134
+ `omx state clear --input '{"mode":"ultraqa"}' --json`
138
135
 
139
- Use MCP state cleanup rather than deleting files directly.
136
+ Use CLI state cleanup rather than deleting files directly.
140
137
 
141
138
  ---
142
139
 
@@ -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>
@@ -11,31 +11,31 @@ Persistent, self-maintained markdown knowledge base for project and session know
11
11
  ## Operations
12
12
 
13
13
  ### Ingest
14
- ```text
15
- wiki_ingest({ title: "Auth Architecture", content: "...", tags: ["auth", "architecture"], category: "architecture" })
14
+ ```bash
15
+ omx wiki wiki_ingest --input '{"title":"Auth Architecture","content":"...","tags":["auth","architecture"],"category":"architecture"}' --json
16
16
  ```
17
17
 
18
18
  ### Query
19
- ```text
20
- wiki_query({ query: "authentication", tags: ["auth"], category: "architecture" })
19
+ ```bash
20
+ omx wiki wiki_query --input '{"query":"authentication","tags":["auth"],"category":"architecture"}' --json
21
21
  ```
22
22
 
23
23
  ### Lint
24
- ```text
25
- wiki_lint()
24
+ ```bash
25
+ omx wiki wiki_lint --json
26
26
  ```
27
27
 
28
28
  ### Quick Add
29
- ```text
30
- wiki_add({ title: "Page Title", content: "...", tags: ["tag1"], category: "decision" })
29
+ ```bash
30
+ omx wiki wiki_add --input '{"title":"Page Title","content":"...","tags":["tag1"],"category":"decision"}' --json
31
31
  ```
32
32
 
33
33
  ### List / Read / Delete
34
- ```text
35
- wiki_list()
36
- wiki_read({ page: "auth-architecture" })
37
- wiki_delete({ page: "outdated-page" })
38
- wiki_refresh()
34
+ ```bash
35
+ omx wiki wiki_list --json
36
+ omx wiki wiki_read --input '{"page":"auth-architecture"}' --json
37
+ omx wiki wiki_delete --input '{"page":"outdated-page"}' --json
38
+ omx wiki wiki_refresh --json
39
39
  ```
40
40
 
41
41
  ## Categories
@@ -144,5 +144,3 @@ A good analyze response is:
144
144
  - free of normative drift or judgmental filler
145
145
  - explicit about the evidence-vs-inference distinction
146
146
  - concise for simple cases, broader only when the question truly needs it
147
-
148
- Task: {{ARGUMENTS}}
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: ask-claude
3
- description: Ask Claude deprecated skill
3
+ description: Deprecated compatibility shim for Claude advisor requests
4
4
  ---
5
5
 
6
- # Ask Claude deprecated
6
+ # Ask Claude compatibility shim
7
7
 
8
- Hard-deprecated. Do not invoke or route this skill. Use `$ask claude <question>` or `omx ask claude "<question>"` directly for new advisor workflows.
8
+ Hard-deprecated. Do not invoke or route this skill for new work.
9
+
10
+ Use `$ask claude <question>` or `omx ask claude "<question>"` directly for Claude advisor workflows. This file exists only to preserve the public/catalog-visible `ask-claude` skill contract while the canonical `$ask` workflow owns provider selection.
9
11
 
10
12
  Task: {{ARGUMENTS}}
@@ -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`)