oh-my-codex 0.17.3 → 0.18.1

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 (381) hide show
  1. package/Cargo.lock +13 -5
  2. package/Cargo.toml +2 -1
  3. package/README.md +44 -19
  4. package/crates/omx-api/Cargo.toml +19 -0
  5. package/crates/omx-api/src/lib.rs +2997 -0
  6. package/crates/omx-api/src/main.rs +10 -0
  7. package/crates/omx-api/tests/cli.rs +558 -0
  8. package/crates/omx-explore/src/main.rs +4 -0
  9. package/crates/omx-sparkshell/src/codex_bridge.rs +437 -123
  10. package/crates/omx-sparkshell/src/exec.rs +127 -1
  11. package/crates/omx-sparkshell/src/main.rs +829 -30
  12. package/crates/omx-sparkshell/src/prompt.rs +25 -3
  13. package/crates/omx-sparkshell/src/redaction.rs +241 -0
  14. package/crates/omx-sparkshell/tests/execution.rs +702 -237
  15. package/dist/cli/__tests__/api.test.d.ts +2 -0
  16. package/dist/cli/__tests__/api.test.d.ts.map +1 -0
  17. package/dist/cli/__tests__/api.test.js +175 -0
  18. package/dist/cli/__tests__/api.test.js.map +1 -0
  19. package/dist/cli/__tests__/ask.test.js +72 -5
  20. package/dist/cli/__tests__/ask.test.js.map +1 -1
  21. package/dist/cli/__tests__/autoresearch-goal.test.js +14 -1
  22. package/dist/cli/__tests__/autoresearch-goal.test.js.map +1 -1
  23. package/dist/cli/__tests__/codex-plugin-layout.test.js +15 -7
  24. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
  25. package/dist/cli/__tests__/doctor-warning-copy.test.js +76 -3
  26. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  27. package/dist/cli/__tests__/explore.test.js +23 -0
  28. package/dist/cli/__tests__/explore.test.js.map +1 -1
  29. package/dist/cli/__tests__/index.test.js +171 -5
  30. package/dist/cli/__tests__/index.test.js.map +1 -1
  31. package/dist/cli/__tests__/install-docs-contract.test.d.ts +2 -0
  32. package/dist/cli/__tests__/install-docs-contract.test.d.ts.map +1 -0
  33. package/dist/cli/__tests__/install-docs-contract.test.js +55 -0
  34. package/dist/cli/__tests__/install-docs-contract.test.js.map +1 -0
  35. package/dist/cli/__tests__/launch-fallback.test.js +191 -0
  36. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  37. package/dist/cli/__tests__/package-bin-contract.test.js +4 -3
  38. package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
  39. package/dist/cli/__tests__/question.test.js +27 -41
  40. package/dist/cli/__tests__/question.test.js.map +1 -1
  41. package/dist/cli/__tests__/setup-install-mode.test.js +232 -35
  42. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  43. package/dist/cli/__tests__/sparkshell-cli.test.js +25 -1
  44. package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
  45. package/dist/cli/__tests__/sparkshell-packaging.test.js +1 -0
  46. package/dist/cli/__tests__/sparkshell-packaging.test.js.map +1 -1
  47. package/dist/cli/__tests__/ultragoal.test.js +227 -4
  48. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  49. package/dist/cli/__tests__/update.test.js +72 -1
  50. package/dist/cli/__tests__/update.test.js.map +1 -1
  51. package/dist/cli/__tests__/version-sync-contract.test.js +4 -0
  52. package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
  53. package/dist/cli/__tests__/windows-popup-loop-contract.test.js +1 -1
  54. package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
  55. package/dist/cli/api.d.ts +26 -0
  56. package/dist/cli/api.d.ts.map +1 -0
  57. package/dist/cli/api.js +153 -0
  58. package/dist/cli/api.js.map +1 -0
  59. package/dist/cli/codex-feature-probe.d.ts +5 -0
  60. package/dist/cli/codex-feature-probe.d.ts.map +1 -1
  61. package/dist/cli/codex-feature-probe.js +13 -7
  62. package/dist/cli/codex-feature-probe.js.map +1 -1
  63. package/dist/cli/doctor.d.ts +7 -0
  64. package/dist/cli/doctor.d.ts.map +1 -1
  65. package/dist/cli/doctor.js +119 -10
  66. package/dist/cli/doctor.js.map +1 -1
  67. package/dist/cli/explore.d.ts +2 -0
  68. package/dist/cli/explore.d.ts.map +1 -1
  69. package/dist/cli/explore.js +43 -1
  70. package/dist/cli/explore.js.map +1 -1
  71. package/dist/cli/index.d.ts +12 -4
  72. package/dist/cli/index.d.ts.map +1 -1
  73. package/dist/cli/index.js +460 -87
  74. package/dist/cli/index.js.map +1 -1
  75. package/dist/cli/native-assets.d.ts +2 -1
  76. package/dist/cli/native-assets.d.ts.map +1 -1
  77. package/dist/cli/native-assets.js +1 -0
  78. package/dist/cli/native-assets.js.map +1 -1
  79. package/dist/cli/plugin-marketplace.d.ts +2 -0
  80. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  81. package/dist/cli/plugin-marketplace.js +15 -1
  82. package/dist/cli/plugin-marketplace.js.map +1 -1
  83. package/dist/cli/setup.d.ts.map +1 -1
  84. package/dist/cli/setup.js +71 -11
  85. package/dist/cli/setup.js.map +1 -1
  86. package/dist/cli/sparkshell.d.ts +7 -1
  87. package/dist/cli/sparkshell.d.ts.map +1 -1
  88. package/dist/cli/sparkshell.js +31 -4
  89. package/dist/cli/sparkshell.js.map +1 -1
  90. package/dist/cli/ultragoal.d.ts +1 -1
  91. package/dist/cli/ultragoal.d.ts.map +1 -1
  92. package/dist/cli/ultragoal.js +184 -10
  93. package/dist/cli/ultragoal.js.map +1 -1
  94. package/dist/cli/update.d.ts +2 -0
  95. package/dist/cli/update.d.ts.map +1 -1
  96. package/dist/cli/update.js +14 -3
  97. package/dist/cli/update.js.map +1 -1
  98. package/dist/compat/__tests__/doctor-contract.test.js +3 -0
  99. package/dist/compat/__tests__/doctor-contract.test.js.map +1 -1
  100. package/dist/config/__tests__/codex-feature-flags.test.js +11 -1
  101. package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -1
  102. package/dist/config/__tests__/codex-hooks.test.js +19 -8
  103. package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
  104. package/dist/config/__tests__/commit-lore-guard.test.d.ts +2 -0
  105. package/dist/config/__tests__/commit-lore-guard.test.d.ts.map +1 -0
  106. package/dist/config/__tests__/commit-lore-guard.test.js +20 -0
  107. package/dist/config/__tests__/commit-lore-guard.test.js.map +1 -0
  108. package/dist/config/codex-feature-flags.d.ts +4 -0
  109. package/dist/config/codex-feature-flags.d.ts.map +1 -1
  110. package/dist/config/codex-feature-flags.js +4 -0
  111. package/dist/config/codex-feature-flags.js.map +1 -1
  112. package/dist/config/codex-hooks.js +6 -6
  113. package/dist/config/codex-hooks.js.map +1 -1
  114. package/dist/config/commit-lore-guard.d.ts +1 -0
  115. package/dist/config/commit-lore-guard.d.ts.map +1 -1
  116. package/dist/config/commit-lore-guard.js +29 -3
  117. package/dist/config/commit-lore-guard.js.map +1 -1
  118. package/dist/config/generator.d.ts +3 -1
  119. package/dist/config/generator.d.ts.map +1 -1
  120. package/dist/config/generator.js +114 -10
  121. package/dist/config/generator.js.map +1 -1
  122. package/dist/goal-workflows/codex-goal-snapshot.d.ts +1 -0
  123. package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
  124. package/dist/goal-workflows/codex-goal-snapshot.js +5 -1
  125. package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
  126. package/dist/hooks/__tests__/autopilot-skill-contract.test.js +10 -6
  127. package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
  128. package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts +2 -0
  129. package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts.map +1 -0
  130. package/dist/hooks/__tests__/best-practice-research-skill.test.js +27 -0
  131. package/dist/hooks/__tests__/best-practice-research-skill.test.js.map +1 -0
  132. package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +1 -1
  133. package/dist/hooks/__tests__/consensus-execution-handoff.test.js +13 -11
  134. package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
  135. package/dist/hooks/__tests__/deep-interview-contract.test.js +4 -3
  136. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  137. package/dist/hooks/__tests__/keyword-detector.test.js +15 -3
  138. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  139. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +6 -0
  140. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -1
  141. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +33 -0
  142. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  143. package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +4 -0
  144. package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
  145. package/dist/hooks/extensibility/__tests__/dispatcher.test.js +26 -3
  146. package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -1
  147. package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
  148. package/dist/hooks/extensibility/dispatcher.js +29 -14
  149. package/dist/hooks/extensibility/dispatcher.js.map +1 -1
  150. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  151. package/dist/hooks/keyword-detector.js +8 -3
  152. package/dist/hooks/keyword-detector.js.map +1 -1
  153. package/dist/hooks/keyword-registry.d.ts.map +1 -1
  154. package/dist/hooks/keyword-registry.js +1 -0
  155. package/dist/hooks/keyword-registry.js.map +1 -1
  156. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  157. package/dist/hooks/prompt-guidance-contract.js +3 -2
  158. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  159. package/dist/hud/__tests__/hud-tmux-injection.test.js +14 -8
  160. package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
  161. package/dist/hud/__tests__/reconcile.test.js +4 -4
  162. package/dist/hud/__tests__/reconcile.test.js.map +1 -1
  163. package/dist/hud/__tests__/resource-leak-watch.test.d.ts +2 -0
  164. package/dist/hud/__tests__/resource-leak-watch.test.d.ts.map +1 -0
  165. package/dist/hud/__tests__/resource-leak-watch.test.js +28 -0
  166. package/dist/hud/__tests__/resource-leak-watch.test.js.map +1 -0
  167. package/dist/hud/__tests__/tmux.test.js +23 -18
  168. package/dist/hud/__tests__/tmux.test.js.map +1 -1
  169. package/dist/hud/index.d.ts +1 -1
  170. package/dist/hud/index.d.ts.map +1 -1
  171. package/dist/hud/index.js +10 -4
  172. package/dist/hud/index.js.map +1 -1
  173. package/dist/hud/tmux.d.ts.map +1 -1
  174. package/dist/hud/tmux.js +9 -8
  175. package/dist/hud/tmux.js.map +1 -1
  176. package/dist/mcp/__tests__/bootstrap.test.js +75 -1
  177. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  178. package/dist/mcp/bootstrap.d.ts +3 -1
  179. package/dist/mcp/bootstrap.d.ts.map +1 -1
  180. package/dist/mcp/bootstrap.js +71 -2
  181. package/dist/mcp/bootstrap.js.map +1 -1
  182. package/dist/notifications/__tests__/http-client-resource.test.d.ts +2 -0
  183. package/dist/notifications/__tests__/http-client-resource.test.d.ts.map +1 -0
  184. package/dist/notifications/__tests__/http-client-resource.test.js +41 -0
  185. package/dist/notifications/__tests__/http-client-resource.test.js.map +1 -0
  186. package/dist/notifications/__tests__/verbosity.test.js +20 -0
  187. package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
  188. package/dist/notifications/config.d.ts.map +1 -1
  189. package/dist/notifications/config.js +6 -3
  190. package/dist/notifications/config.js.map +1 -1
  191. package/dist/notifications/http-client.d.ts.map +1 -1
  192. package/dist/notifications/http-client.js +78 -27
  193. package/dist/notifications/http-client.js.map +1 -1
  194. package/dist/notifications/types.d.ts +2 -0
  195. package/dist/notifications/types.d.ts.map +1 -1
  196. package/dist/openclaw/__tests__/dispatcher.test.js +49 -1
  197. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
  198. package/dist/openclaw/dispatcher.d.ts +7 -4
  199. package/dist/openclaw/dispatcher.d.ts.map +1 -1
  200. package/dist/openclaw/dispatcher.js +32 -69
  201. package/dist/openclaw/dispatcher.js.map +1 -1
  202. package/dist/pipeline/__tests__/orchestrator.test.js +65 -3
  203. package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
  204. package/dist/pipeline/__tests__/stages.test.js +50 -5
  205. package/dist/pipeline/__tests__/stages.test.js.map +1 -1
  206. package/dist/pipeline/index.d.ts +8 -2
  207. package/dist/pipeline/index.d.ts.map +1 -1
  208. package/dist/pipeline/index.js +5 -2
  209. package/dist/pipeline/index.js.map +1 -1
  210. package/dist/pipeline/orchestrator.d.ts +5 -4
  211. package/dist/pipeline/orchestrator.d.ts.map +1 -1
  212. package/dist/pipeline/orchestrator.js +56 -15
  213. package/dist/pipeline/orchestrator.js.map +1 -1
  214. package/dist/pipeline/stages/code-review.d.ts +2 -2
  215. package/dist/pipeline/stages/code-review.d.ts.map +1 -1
  216. package/dist/pipeline/stages/code-review.js +5 -3
  217. package/dist/pipeline/stages/code-review.js.map +1 -1
  218. package/dist/pipeline/stages/deep-interview.d.ts +15 -0
  219. package/dist/pipeline/stages/deep-interview.d.ts.map +1 -0
  220. package/dist/pipeline/stages/deep-interview.js +32 -0
  221. package/dist/pipeline/stages/deep-interview.js.map +1 -0
  222. package/dist/pipeline/stages/ralph-verify.d.ts +5 -5
  223. package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -1
  224. package/dist/pipeline/stages/ralph-verify.js +2 -2
  225. package/dist/pipeline/stages/ralph-verify.js.map +1 -1
  226. package/dist/pipeline/stages/ultragoal.d.ts +19 -0
  227. package/dist/pipeline/stages/ultragoal.d.ts.map +1 -0
  228. package/dist/pipeline/stages/ultragoal.js +38 -0
  229. package/dist/pipeline/stages/ultragoal.js.map +1 -0
  230. package/dist/pipeline/stages/ultraqa.d.ts +30 -0
  231. package/dist/pipeline/stages/ultraqa.d.ts.map +1 -0
  232. package/dist/pipeline/stages/ultraqa.js +46 -0
  233. package/dist/pipeline/stages/ultraqa.js.map +1 -0
  234. package/dist/pipeline/types.d.ts +8 -6
  235. package/dist/pipeline/types.d.ts.map +1 -1
  236. package/dist/pipeline/types.js +2 -2
  237. package/dist/scripts/__tests__/codex-native-hook.test.js +1488 -117
  238. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  239. package/dist/scripts/__tests__/notify-dispatcher.test.js +183 -1
  240. package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -1
  241. package/dist/scripts/__tests__/smoke-packed-install.test.js +27 -2
  242. package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
  243. package/dist/scripts/__tests__/verify-native-agents.test.js +16 -1
  244. package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -1
  245. package/dist/scripts/build-api.d.ts +2 -0
  246. package/dist/scripts/build-api.d.ts.map +1 -0
  247. package/dist/scripts/build-api.js +44 -0
  248. package/dist/scripts/build-api.js.map +1 -0
  249. package/dist/scripts/cleanup-explore-harness.js +1 -0
  250. package/dist/scripts/cleanup-explore-harness.js.map +1 -1
  251. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  252. package/dist/scripts/codex-native-hook.js +364 -16
  253. package/dist/scripts/codex-native-hook.js.map +1 -1
  254. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  255. package/dist/scripts/codex-native-pre-post.js +98 -25
  256. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  257. package/dist/scripts/notify-dispatcher.js +88 -0
  258. package/dist/scripts/notify-dispatcher.js.map +1 -1
  259. package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
  260. package/dist/scripts/notify-hook/process-runner.js +39 -17
  261. package/dist/scripts/notify-hook/process-runner.js.map +1 -1
  262. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  263. package/dist/scripts/notify-hook/team-dispatch.js +36 -14
  264. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  265. package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
  266. package/dist/scripts/notify-hook/team-leader-nudge.js +26 -11
  267. package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
  268. package/dist/scripts/notify-hook/team-tmux-guard.d.ts +2 -1
  269. package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
  270. package/dist/scripts/notify-hook/team-tmux-guard.js +45 -1
  271. package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
  272. package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
  273. package/dist/scripts/notify-hook/team-worker-stop.js +27 -14
  274. package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
  275. package/dist/scripts/run-provider-advisor.js +9 -3
  276. package/dist/scripts/run-provider-advisor.js.map +1 -1
  277. package/dist/scripts/smoke-packed-install.d.ts +4 -1
  278. package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
  279. package/dist/scripts/smoke-packed-install.js +101 -1
  280. package/dist/scripts/smoke-packed-install.js.map +1 -1
  281. package/dist/scripts/sync-plugin-mirror.js +2 -2
  282. package/dist/scripts/sync-plugin-mirror.js.map +1 -1
  283. package/dist/scripts/verify-native-agents.js +2 -2
  284. package/dist/scripts/verify-native-agents.js.map +1 -1
  285. package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts +2 -0
  286. package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts.map +1 -0
  287. package/dist/sidecar/__tests__/resource-leak-watch.test.js +38 -0
  288. package/dist/sidecar/__tests__/resource-leak-watch.test.js.map +1 -0
  289. package/dist/sidecar/index.d.ts +1 -1
  290. package/dist/sidecar/index.d.ts.map +1 -1
  291. package/dist/sidecar/index.js +29 -12
  292. package/dist/sidecar/index.js.map +1 -1
  293. package/dist/state/__tests__/operations-ralph-phase.test.js +88 -1
  294. package/dist/state/__tests__/operations-ralph-phase.test.js.map +1 -1
  295. package/dist/state/operations.d.ts.map +1 -1
  296. package/dist/state/operations.js +11 -0
  297. package/dist/state/operations.js.map +1 -1
  298. package/dist/team/__tests__/runtime.test.js +2 -2
  299. package/dist/team/__tests__/runtime.test.js.map +1 -1
  300. package/dist/team/__tests__/tmux-session.test.js +207 -22
  301. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  302. package/dist/team/tmux-session.d.ts +1 -0
  303. package/dist/team/tmux-session.d.ts.map +1 -1
  304. package/dist/team/tmux-session.js +73 -28
  305. package/dist/team/tmux-session.js.map +1 -1
  306. package/dist/ultragoal/__tests__/artifacts.test.js +714 -10
  307. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  308. package/dist/ultragoal/__tests__/docs-contract.test.js +57 -1
  309. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  310. package/dist/ultragoal/__tests__/steering-fixtures.d.ts +68 -0
  311. package/dist/ultragoal/__tests__/steering-fixtures.d.ts.map +1 -0
  312. package/dist/ultragoal/__tests__/steering-fixtures.js +259 -0
  313. package/dist/ultragoal/__tests__/steering-fixtures.js.map +1 -0
  314. package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts +2 -0
  315. package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts.map +1 -0
  316. package/dist/ultragoal/__tests__/steering-fixtures.test.js +65 -0
  317. package/dist/ultragoal/__tests__/steering-fixtures.test.js.map +1 -0
  318. package/dist/ultragoal/artifacts.d.ts +97 -2
  319. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  320. package/dist/ultragoal/artifacts.js +811 -256
  321. package/dist/ultragoal/artifacts.js.map +1 -1
  322. package/dist/utils/__tests__/sleep-resource.test.d.ts +2 -0
  323. package/dist/utils/__tests__/sleep-resource.test.d.ts.map +1 -0
  324. package/dist/utils/__tests__/sleep-resource.test.js +39 -0
  325. package/dist/utils/__tests__/sleep-resource.test.js.map +1 -0
  326. package/dist/utils/sleep.d.ts.map +1 -1
  327. package/dist/utils/sleep.js +17 -6
  328. package/dist/utils/sleep.js.map +1 -1
  329. package/dist/verification/__tests__/ci-rust-gates.test.js +85 -10
  330. package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
  331. package/dist/verification/__tests__/explore-harness-release-workflow.test.js +1 -0
  332. package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
  333. package/package.json +5 -3
  334. package/plugins/oh-my-codex/.codex-plugin/plugin.json +4 -3
  335. package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +56 -0
  336. package/plugins/oh-my-codex/hooks/hooks.json +77 -0
  337. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +77 -47
  338. package/plugins/oh-my-codex/skills/best-practice-research/SKILL.md +83 -0
  339. package/plugins/oh-my-codex/skills/cancel/SKILL.md +2 -2
  340. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +9 -8
  341. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +1 -1
  342. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +22 -11
  343. package/plugins/oh-my-codex/skills/plan/SKILL.md +8 -8
  344. package/plugins/oh-my-codex/skills/ralph/SKILL.md +7 -0
  345. package/plugins/oh-my-codex/skills/ralplan/SKILL.md +5 -5
  346. package/plugins/oh-my-codex/skills/team/SKILL.md +1 -1
  347. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +38 -4
  348. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +1 -1
  349. package/prompts/planner.md +1 -1
  350. package/prompts/researcher.md +15 -10
  351. package/skills/autopilot/SKILL.md +77 -47
  352. package/skills/best-practice-research/SKILL.md +83 -0
  353. package/skills/cancel/SKILL.md +2 -2
  354. package/skills/deep-interview/SKILL.md +9 -8
  355. package/skills/omx-setup/SKILL.md +1 -1
  356. package/skills/pipeline/SKILL.md +22 -11
  357. package/skills/plan/SKILL.md +8 -8
  358. package/skills/ralph/SKILL.md +7 -0
  359. package/skills/ralplan/SKILL.md +5 -5
  360. package/skills/team/SKILL.md +1 -1
  361. package/skills/ultragoal/SKILL.md +38 -4
  362. package/skills/ultrawork/SKILL.md +1 -1
  363. package/src/scripts/__tests__/codex-native-hook.test.ts +1758 -166
  364. package/src/scripts/__tests__/notify-dispatcher.test.ts +223 -1
  365. package/src/scripts/__tests__/smoke-packed-install.test.ts +39 -2
  366. package/src/scripts/__tests__/verify-native-agents.test.ts +21 -1
  367. package/src/scripts/build-api.ts +48 -0
  368. package/src/scripts/cleanup-explore-harness.ts +1 -0
  369. package/src/scripts/codex-native-hook.ts +416 -18
  370. package/src/scripts/codex-native-pre-post.ts +119 -25
  371. package/src/scripts/notify-dispatcher.ts +97 -0
  372. package/src/scripts/notify-hook/process-runner.ts +40 -16
  373. package/src/scripts/notify-hook/team-dispatch.ts +36 -13
  374. package/src/scripts/notify-hook/team-leader-nudge.ts +25 -11
  375. package/src/scripts/notify-hook/team-tmux-guard.ts +49 -0
  376. package/src/scripts/notify-hook/team-worker-stop.ts +24 -13
  377. package/src/scripts/run-provider-advisor.ts +11 -3
  378. package/src/scripts/smoke-packed-install.ts +107 -0
  379. package/src/scripts/sync-plugin-mirror.ts +3 -3
  380. package/src/scripts/verify-native-agents.ts +2 -2
  381. package/templates/catalog-manifest.json +7 -0
@@ -0,0 +1,77 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\""
9
+ }
10
+ ],
11
+ "matcher": "startup|resume|clear"
12
+ }
13
+ ],
14
+ "PreToolUse": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\""
20
+ }
21
+ ],
22
+ "matcher": "Bash"
23
+ }
24
+ ],
25
+ "PostToolUse": [
26
+ {
27
+ "hooks": [
28
+ {
29
+ "type": "command",
30
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\""
31
+ }
32
+ ]
33
+ }
34
+ ],
35
+ "UserPromptSubmit": [
36
+ {
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\""
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "PreCompact": [
46
+ {
47
+ "hooks": [
48
+ {
49
+ "type": "command",
50
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\""
51
+ }
52
+ ]
53
+ }
54
+ ],
55
+ "PostCompact": [
56
+ {
57
+ "hooks": [
58
+ {
59
+ "type": "command",
60
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\""
61
+ }
62
+ ]
63
+ }
64
+ ],
65
+ "Stop": [
66
+ {
67
+ "hooks": [
68
+ {
69
+ "type": "command",
70
+ "command": "node \"${PLUGIN_ROOT}/hooks/codex-native-hook.mjs\"",
71
+ "timeout": 30
72
+ }
73
+ ]
74
+ }
75
+ ]
76
+ }
77
+ }
@@ -1,56 +1,66 @@
1
1
  ---
2
2
  name: autopilot
3
- description: "[OMX] Strict autonomous loop: $ralplan -> $ralph -> $code-review"
3
+ description: "[OMX] Strict autonomous loop: $deep-interview -> $ralplan -> $ultragoal (+ $team if needed) -> $code-review -> $ultraqa"
4
4
  ---
5
5
 
6
6
  <Purpose>
7
- Autopilot is the strict autonomous delivery loop for non-trivial work. Its primary contract is exactly:
7
+ Autopilot is the strict autonomous delivery loop for non-trivial work. Its recommended/default contract is exactly:
8
8
 
9
9
  ```text
10
- $ralplan -> $ralph -> $code-review
10
+ $deep-interview -> $ralplan -> $ultragoal (+ $team if needed) -> $code-review -> $ultraqa
11
11
  ```
12
12
 
13
- If `$code-review` is not clean, Autopilot returns to `$ralplan` with the review findings as the next planning input, then continues again through `$ralph` and `$code-review` until the review is clean or a hard blocker is reported.
13
+ If `$code-review` or `$ultraqa` is not clean, Autopilot returns to `$ralplan` with the findings as the next planning input, then continues again through `$ultragoal`, `$code-review`, and `$ultraqa` until the gates are clean or a hard blocker is reported. Ralph is a legacy/explicit alternate execution loop only; do not advertise Ralph as the default Autopilot path.
14
14
  </Purpose>
15
15
 
16
16
  <Use_When>
17
- - User wants hands-off execution from a concrete idea, issue, PRD, or requirements artifact to reviewed code
17
+ - User wants hands-off execution from a concrete idea, issue, PRD, or requirements artifact to reviewed and QA-checked code
18
18
  - User says `$autopilot`, "autopilot", "auto pilot", "autonomous", "build me", "create me", "make me", "full auto", "handle it all", or "I want a/an..."
19
- - Task needs planning, implementation, verification, and code review with automatic follow-up when review is not clean
19
+ - Task needs clarification, planning, durable execution, verification, code review, and QA with automatic follow-up when gates are not clean
20
20
  </Use_When>
21
21
 
22
22
  <Do_Not_Use_When>
23
23
  - User wants to explore options or brainstorm -- use `$plan` / `$ralplan`
24
24
  - User says "just explain", "draft only", or "what would you suggest" -- respond conversationally
25
- - User wants a single focused code change -- use `$ralph` or direct executor work
25
+ - User wants a single focused code change -- use `$ultragoal`, `$ralph` only when explicitly requested, or direct executor work
26
26
  - User wants only review/critique of existing code -- use `$code-review`
27
27
  </Do_Not_Use_When>
28
28
 
29
29
  <Strict_Loop_Contract>
30
- Autopilot must not run a separate broad expansion/planning/execution/QA/validation lifecycle as its primary behavior. It delegates those concerns to the three canonical workflow phases below:
30
+ Autopilot must not run a separate broad expansion/planning/execution/QA/validation lifecycle as its primary behavior. It delegates those concerns to the canonical workflow phases below:
31
31
 
32
- 1. **Phase `ralplan`** — consensus planning gate
33
- - Ground the task with pre-context intake.
32
+ 1. **Phase `deep-interview`** — Socratic requirements clarification gate
33
+ - Run or resume `$deep-interview` to clarify intent, scope, non-goals, constraints, and decision boundaries.
34
+ - Required handoff artifact: a clarified spec or concise requirements summary suitable for `$ralplan`.
35
+
36
+ 2. **Phase `ralplan`** — consensus planning gate
37
+ - Ground the task with pre-context intake and the deep-interview artifact.
34
38
  - Run or resume `$ralplan` to produce/update PRD and test-spec artifacts.
35
- - When returning from a non-clean review, include `return_to_ralplan_reason` and the review findings as first-class planning input.
36
- - Required handoff artifact: an approved plan/test spec suitable for `$ralph`.
39
+ - When returning from a non-clean review or QA pass, include `return_to_ralplan_reason` and the findings as first-class planning input.
40
+ - Required handoff artifact: an approved plan/test spec suitable for `$ultragoal`.
37
41
 
38
- 2. **Phase `ralph`** — implementation + verification loop
39
- - Run `$ralph` from the approved ralplan artifacts.
40
- - Ralph owns implementation, tests, build/lint/typecheck evidence, deslop where applicable, and architect verification.
41
- - Required handoff artifact: implementation evidence and changed-file summary suitable for `$code-review`.
42
+ 3. **Phase `ultragoal`** — durable implementation + verification loop
43
+ - Run `$ultragoal` from the approved ralplan artifacts.
44
+ - Ultragoal owns durable Codex goal handoffs, `.omx/ultragoal` ledger checkpoints, implementation, tests, build/lint/typecheck evidence, cleanup, and final review gate discipline.
45
+ - Use `$team` only inside an active Ultragoal story when the story clearly benefits from coordinated parallel execution (for example independent file/module lanes, broad test matrix work, or multi-domain implementation). Team remains explicit and leader-owned; Ultragoal keeps the goal/ledger state.
46
+ - Required handoff artifact: implementation evidence, changed-file summary, verification evidence, and Ultragoal ledger/checkpoint references suitable for `$code-review`.
42
47
 
43
- 3. **Phase `code-review`** — merge-readiness gate
44
- - Run `$code-review` on the diff/artifacts produced by `$ralph`.
48
+ 4. **Phase `code-review`** — merge-readiness gate
49
+ - Run `$code-review` on the diff/artifacts produced by `$ultragoal`.
45
50
  - A clean review means final recommendation `APPROVE` with architectural status `CLEAR`.
46
51
  - `COMMENT`, `REQUEST CHANGES`, any architectural `WATCH`/`BLOCK`, or any unresolved finding is not clean.
47
52
  - If not clean, increment the review cycle, persist `review_verdict`, set `return_to_ralplan_reason`, and transition back to Phase `ralplan`.
48
53
 
49
- The only normal terminal state is `complete` after a clean code review. Cancellation, blocked credentials, unrecoverable repeated failures, or explicit user stop may terminate earlier with preserved state.
54
+ 5. **Phase `ultraqa`** adversarial QA gate
55
+ - Run `$ultraqa` after a clean code review when user-facing behavior, workflows, CLI/runtime behavior, integration surfaces, or regression risk warrant adversarial QA.
56
+ - For docs-only or trivially non-runtime changes, record `ultraqa` as skipped with an explicit condition and evidence.
57
+ - If UltraQA finds issues, persist the QA verdict/evidence, set `return_to_ralplan_reason`, and transition back to Phase `ralplan`.
58
+
59
+ The only normal terminal state is `complete` after clean code review and a passed or explicitly skipped UltraQA gate. Cancellation, blocked credentials, unrecoverable repeated failures, or explicit user stop may terminate earlier with preserved state.
50
60
  </Strict_Loop_Contract>
51
61
 
52
62
  <Pre-context Intake>
53
- Before Phase `ralplan` starts or resumes:
63
+ Before Phase `deep-interview` or `ralplan` starts or resumes:
54
64
  1. Derive a task slug from the request.
55
65
  2. Reuse the latest relevant `.omx/context/{slug}-*.md` snapshot when available.
56
66
  3. If none exists, create `.omx/context/{slug}-{timestamp}.md` (UTC `YYYYMMDDTHHMMSSZ`) with:
@@ -60,16 +70,18 @@ Before Phase `ralplan` starts or resumes:
60
70
  - constraints
61
71
  - unknowns/open questions
62
72
  - likely codebase touchpoints
63
- 4. If ambiguity remains high, run `explore` first for brownfield facts, then run the Socratic `$deep-interview --quick <task>` before `$ralplan`.
73
+ 4. If brownfield facts are missing, run `explore` first before or during `$deep-interview` (`$deep-interview --quick <task>` remains acceptable for bounded low-ambiguity intake); do not skip the clarification gate merely because the task sounds actionable.
64
74
  5. Carry the snapshot path in Autopilot state and all handoff artifacts.
65
75
  </Pre-context Intake>
66
76
 
67
77
  <Execution_Policy>
68
- - Always execute phases in order: `ralplan`, then `ralph`, then `code-review`.
69
- - Never skip directly from vague/freeform expansion to implementation; unclear input must be clarified or planned through `$ralplan`.
70
- - A non-clean `$code-review` always returns to `$ralplan`; do not patch findings ad hoc outside the loop.
78
+ - Always execute the recommended phases in order: `deep-interview`, then `ralplan`, then `ultragoal`, then `code-review`, then `ultraqa`.
79
+ - `$team` is conditional and explicit: use it only within an Ultragoal story when parallel execution materially improves throughput, quality, or safety.
80
+ - Never skip directly from vague/freeform expansion to implementation; unclear input must be clarified and planned through `$deep-interview` and `$ralplan`.
81
+ - A non-clean `$code-review` or failed `$ultraqa` always returns to `$ralplan`; do not patch findings ad hoc outside the loop.
71
82
  - Each phase must write/update Autopilot state before handing off.
72
- - Use existing hooks, `.omx/state`, `$ralplan`, `$ralph`, `$code-review`, and pipeline primitives; do not invent a separate execution framework.
83
+ - Use existing hooks, `.omx/state`, `$deep-interview`, `$ralplan`, `$ultragoal`, optional `$team`, `$code-review`, `$ultraqa`, and pipeline primitives; do not invent a separate execution framework.
84
+ - Preserve legacy compatibility: if a user explicitly requests the old Ralph execution lane, use `$ralph` as an intentional alternate execution phase, but do not present it as Autopilot's default recommended loop.
73
85
  - Continue automatically through safe reversible phase transitions. Ask only for destructive, credential-gated, or materially preference-dependent branches.
74
86
  - Apply the shared workflow guidance pattern: outcome-first framing, concise visible updates for multi-step execution, 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.
75
87
  </Execution_Policy>
@@ -83,81 +95,99 @@ Required fields:
83
95
  {
84
96
  "mode": "autopilot",
85
97
  "active": true,
86
- "current_phase": "ralplan",
98
+ "current_phase": "deep-interview",
87
99
  "iteration": 1,
88
100
  "review_cycle": 0,
89
101
  "max_iterations": 10,
90
- "phase_cycle": ["ralplan", "ralph", "code-review"],
102
+ "phase_cycle": ["deep-interview", "ralplan", "ultragoal", "code-review", "ultraqa"],
91
103
  "handoff_artifacts": {
92
104
  "context_snapshot_path": ".omx/context/<slug>-<timestamp>.md",
105
+ "deep_interview": null,
93
106
  "ralplan": null,
94
- "ralph": null,
95
- "code_review": null
107
+ "ultragoal": null,
108
+ "code_review": null,
109
+ "ultraqa": null
96
110
  },
97
111
  "review_verdict": null,
112
+ "qa_verdict": null,
98
113
  "return_to_ralplan_reason": null
99
114
  }
100
115
  ```
101
116
 
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
- - **On ralplan -> ralph**: set `current_phase:"ralph"`, persist the plan/test-spec paths under `handoff_artifacts.ralplan`.
104
- - **On ralph -> code-review**: set `current_phase:"code-review"`, persist implementation/test evidence under `handoff_artifacts.ralph`.
105
- - **On clean review**: set `active:false`, `current_phase:"complete"`, persist `review_verdict:{recommendation:"APPROVE", architectural_status:"CLEAR", clean:true}` and `completed_at`.
106
- - **On non-clean review**: increment `iteration` and `review_cycle`, set `current_phase:"ralplan"`, persist `review_verdict:{..., clean:false}`, persist `handoff_artifacts.code_review`, and set `return_to_ralplan_reason` to a concise review-driven reason.
117
+ - **On start**: `omx state write --input '{"mode":"autopilot","active":true,"current_phase":"deep-interview","iteration":1,"review_cycle":0,"state":{"phase_cycle":["deep-interview","ralplan","ultragoal","code-review","ultraqa"],"handoff_artifacts":{"context_snapshot_path":"<snapshot-path>","deep_interview":null,"ralplan":null,"ultragoal":null,"code_review":null,"ultraqa":null},"review_verdict":null,"qa_verdict":null,"return_to_ralplan_reason":null}}' --json`
118
+ - **On deep-interview -> ralplan**: set `current_phase:"ralplan"`, persist the clarified spec/requirements under `handoff_artifacts.deep_interview`.
119
+ - **On ralplan -> ultragoal**: set `current_phase:"ultragoal"`, persist the plan/test-spec paths under `handoff_artifacts.ralplan`.
120
+ - **On ultragoal -> code-review**: set `current_phase:"code-review"`, persist implementation/test/ledger evidence under `handoff_artifacts.ultragoal`.
121
+ - **On code-review -> ultraqa**: set `current_phase:"ultraqa"`, persist the clean review under `handoff_artifacts.code_review`.
122
+ - **On clean review + passed/skipped QA**: set `active:false`, `current_phase:"complete"`, persist `review_verdict:{recommendation:"APPROVE", architectural_status:"CLEAR", clean:true}`, `qa_verdict:{clean:true, skipped:<boolean>, reason:<string|null>}`, and `completed_at`.
123
+ - **On non-clean review or failed QA**: increment `iteration` and `review_cycle`, set `current_phase:"ralplan"`, persist `review_verdict` or `qa_verdict`, persist the phase handoff, and set `return_to_ralplan_reason` to a concise findings-driven reason.
124
+ - **Legacy Ralph state**: if a user explicitly selected the legacy Ralph execution lane, phase names and handoff keys may include `ralph`; preserve and resume them rather than rewriting history to Ultragoal.
107
125
  - **On cancellation**: run `$cancel`; preserve progress for resume rather than deleting handoff artifacts.
108
126
  </State_Management>
109
127
 
110
128
  <Continuation_And_Resume>
111
129
  When the user says `continue`, `resume`, or `keep going` while Autopilot is active, read `autopilot-state.json` and continue from `current_phase`:
130
+ - `deep-interview`: clarify requirements and record the handoff artifact.
112
131
  - `ralplan`: run/update consensus planning from current handoffs and any `return_to_ralplan_reason`.
113
- - `ralph`: execute the approved plan and record verification evidence.
132
+ - `ultragoal`: execute the approved plan durably and record verification/ledger evidence.
133
+ - `team`: continue explicit team work only when it is nested under the active Ultragoal story and report evidence back to the leader.
114
134
  - `code-review`: review the current diff and decide clean vs return-to-ralplan.
135
+ - `ultraqa`: run or explicitly skip adversarial QA based on the documented condition, then finish if clean or transition to `ralplan` with findings if not clean.
136
+ - `ralph`: resume only for explicit legacy Ralph-path Autopilot state.
115
137
  - `complete`: report completion evidence; do not restart.
116
138
 
117
139
  Do not restart discovery or discard handoff artifacts on continuation.
118
140
  </Continuation_And_Resume>
119
141
 
120
142
  <Pipeline_Orchestrator>
121
- Autopilot may be represented by the configurable pipeline orchestrator (`src/pipeline/`) when useful. The Autopilot pipeline contract is:
143
+ Autopilot may be represented by the configurable pipeline orchestrator (`src/pipeline/`) when useful. The default Autopilot pipeline contract is:
122
144
 
123
145
  ```text
124
- ralplan -> ralph -> code-review
146
+ deep-interview -> ralplan -> ultragoal -> code-review -> ultraqa
125
147
  ```
126
148
 
127
- Pipeline state should use `current_phase` values that match the same phase names (`ralplan`, `ralph`, `code-review`, `complete`, `failed`) and should carry `iteration`, `review_cycle`, `handoff_artifacts`, `review_verdict`, and `return_to_ralplan_reason` alongside stage results.
149
+ Pipeline state should use `current_phase` values that match the same phase names (`deep-interview`, `ralplan`, `ultragoal`, `code-review`, `ultraqa`, `complete`, `failed`) and should carry `iteration`, `review_cycle`, `handoff_artifacts`, `review_verdict`, `qa_verdict`, and `return_to_ralplan_reason` alongside stage results. `$team` is not a default pipeline stage; it is an explicit conditional execution engine inside an Ultragoal story.
128
150
  </Pipeline_Orchestrator>
129
151
 
130
152
  <Escalation_And_Stop_Conditions>
131
153
  - Stop and report a blocker when required credentials/authority are missing.
132
- - Stop and report when the same review or verification failure recurs across 3 review cycles with no meaningful new plan.
154
+ - Stop and report when the same review or QA failure recurs across 3 review cycles with no meaningful new plan.
133
155
  - Stop when the user says "stop", "cancel", or "abort" and run `$cancel`.
134
- - Otherwise, continue the loop until `$code-review` is clean.
156
+ - Otherwise, continue the loop until `$code-review` is clean and `$ultraqa` has passed or been explicitly skipped with evidence.
135
157
  </Escalation_And_Stop_Conditions>
136
158
 
137
159
  <Final_Checklist>
160
+ - [ ] Phase `deep-interview` produced/updated clarified requirements or a concise spec
138
161
  - [ ] Phase `ralplan` produced/updated approved planning artifacts
139
- - [ ] Phase `ralph` implemented and verified the plan with fresh evidence
162
+ - [ ] Phase `ultragoal` implemented and verified the plan with fresh evidence and durable ledger/checkpoint references
163
+ - [ ] `$team` was used only if the active Ultragoal story needed coordinated parallel work, or explicitly recorded as not needed
140
164
  - [ ] Phase `code-review` returned a clean verdict (`APPROVE` + `CLEAR`)
141
- - [ ] `review_verdict.clean` is true and `return_to_ralplan_reason` is null
142
- - [ ] Tests/build/lint/typecheck evidence from Ralph is available in handoff artifacts
165
+ - [ ] Phase `ultraqa` passed, or was explicitly skipped because the change was docs-only/trivially non-runtime with evidence
166
+ - [ ] `review_verdict.clean` is true, `qa_verdict.clean` is true, and `return_to_ralplan_reason` is null
167
+ - [ ] Tests/build/lint/typecheck evidence from Ultragoal is available in handoff artifacts
143
168
  - [ ] Autopilot state is marked `complete` or cancellation state is preserved coherently
144
- - [ ] User receives a concise summary with plan, implementation, verification, and review evidence
169
+ - [ ] User receives a concise summary with clarification, plan, implementation, verification, review, and QA evidence
145
170
  </Final_Checklist>
146
171
 
147
172
  <Examples>
148
173
  <Good>
149
174
  User: `$autopilot implement GitHub issue #42`
150
- Flow: create/load context snapshot -> `$ralplan` issue plan -> `$ralph` implementation + tests -> `$code-review`; if review requests changes, return to `$ralplan` with findings.
175
+ Flow: create/load context snapshot -> `$deep-interview` requirements check -> `$ralplan` issue plan -> `$ultragoal` durable implementation + tests (launch `$team` only if a story needs parallel lanes) -> `$code-review` -> `$ultraqa`; if review or QA requests changes, return to `$ralplan` with findings.
151
176
  </Good>
152
177
 
153
178
  <Good>
154
179
  User: `continue`
155
180
  Context: Autopilot state says `current_phase:"code-review"`.
156
- Flow: run `$code-review` on current diff, persist verdict, finish if clean or transition to `ralplan` with findings if not clean.
181
+ Flow: run `$code-review` on current diff, persist verdict, transition to `ultraqa` if clean or to `ralplan` with findings if not clean.
182
+ </Good>
183
+
184
+ <Good>
185
+ User: `$autopilot --legacy-ralph finish the migration`
186
+ Flow: preserve the explicit legacy Ralph execution choice and run the old Ralph execution lane as an alternate, without changing the documented default Autopilot recommendation.
157
187
  </Good>
158
188
 
159
189
  <Bad>
160
190
  Autopilot invents independent "Expansion", "QA", and "Validation" phases and treats them as the primary lifecycle.
161
- Why bad: this bypasses the strict `$ralplan -> $ralph -> $code-review` contract.
191
+ Why bad: this bypasses the strict `$deep-interview -> $ralplan -> $ultragoal -> $code-review -> $ultraqa` contract.
162
192
  </Bad>
163
193
  </Examples>
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: best-practice-research
3
+ description: "[OMX] Bounded best-practice research wrapper using official/upstream evidence first"
4
+ argument-hint: "<technology|decision|practice question>"
5
+ ---
6
+
7
+ # Best-Practice Research
8
+
9
+ Use this skill when a task depends on current external best practices, version-aware guidance, standards, official recommendations, or upstream behavior. This is a workflow wrapper: it routes evidence gathering and synthesis; it is not a new research authority and it does not replace `researcher`.
10
+
11
+ ## Purpose
12
+
13
+ Produce a cited, reusable best-practice answer or handoff that separates current external evidence from repo-local facts and dependency-selection decisions.
14
+
15
+ ## Activate When
16
+
17
+ - The user asks for best practices, recommended approach, current guidance, official recommendations, standards, or version-aware external behavior.
18
+ - `$ralplan`, `$deep-interview`, `$team`, or another workflow needs current external evidence before planning or execution can be correct.
19
+ - The task involves an already chosen technology and needs authoritative usage guidance, migration notes, API behavior, lifecycle rules, or current safety guidance.
20
+
21
+ ## Do Not Activate When
22
+
23
+ - The answer is fully repo-local; use `explore` for codebase facts.
24
+ - The main question is whether to adopt, replace, upgrade, or compare dependencies; use `dependency-expert`.
25
+ - The user only needs implementation against already-grounded requirements; use `executor`, `$ralph`, or `$team` as appropriate.
26
+ - The task can be answered from stable local project conventions without current external lookup.
27
+
28
+ ## Specialist Routing
29
+
30
+ 1. Use `explore` first for brownfield facts: current code usage, local constraints, versions, config, and integration points.
31
+ 2. Use `researcher` for official/upstream docs, release notes, standards, migration guides, source-backed examples, and current best-practice evidence for an already chosen technology.
32
+ 3. Use `dependency-expert` only for adoption/upgrade/replacement/comparison decisions.
33
+ 4. Return to the caller with explicit evidence, uncertainty, and any implementation handoff constraints.
34
+
35
+ ## Source-Quality Rules
36
+
37
+ - Prefer official documentation, upstream source, release notes, changelogs, standards, and maintainer guidance.
38
+ - Include source URLs for material claims.
39
+ - State date/version context for current best-practice claims.
40
+ - Label third-party summaries as supplemental; do not use them before official/upstream sources.
41
+ - Flag stale, conflicting, undocumented, or version-mismatched evidence.
42
+ - Do not over-fetch: gather the smallest evidence set that can support the decision.
43
+
44
+ ## Workflow
45
+
46
+ 1. Classify the question: conceptual best practice, implementation guidance, migration/version guidance, standards/compliance guidance, or mixed local + external guidance.
47
+ 2. Gather repo-local facts with `explore` when local usage or constraints affect the answer.
48
+ 3. Gather external evidence with `researcher` when current or version-aware practice affects correctness.
49
+ 4. Synthesize a concise answer with source quality, version/date context, caveats, and an implementation or planning handoff.
50
+ 5. Stop when the answer is grounded enough for the caller; otherwise report the exact blocker or specialist handoff needed.
51
+
52
+ ## Output Contract
53
+
54
+ ```md
55
+ ## Best-Practice Research: <question>
56
+
57
+ ### Direct Recommendation
58
+ <actionable guidance or decision support>
59
+
60
+ ### Evidence Used
61
+ - Official/upstream: <source URL> — <what it establishes>
62
+ - Supplemental, if any: <source URL> — <why it is secondary>
63
+
64
+ ### Version / Date Context
65
+ <versions, dates, release channels, or unknowns>
66
+
67
+ ### Repo-Local Context
68
+ <facts from explore, or "not needed">
69
+
70
+ ### Boundaries / Non-goals
71
+ <what this research does not decide>
72
+
73
+ ### Handoff
74
+ <planning/execution/test implications>
75
+ ```
76
+
77
+ ## Stop Rules
78
+
79
+ - Stop after a source-backed recommendation is reusable by the caller.
80
+ - Stop and route upward if the task becomes dependency comparison, broad architecture, or implementation.
81
+ - Do not continue researching when remaining work would only polish wording rather than change the recommendation.
82
+
83
+ Task: {{ARGUMENTS}}
@@ -56,7 +56,7 @@ For Ralph-targeted cancellation (standalone or linked), completion is defined by
56
56
  See: `docs/contracts/ralph-cancel-contract.md`.
57
57
 
58
58
  Active modes are still cancelled in dependency order:
59
- 1. Autopilot (includes linked ralph/ultraqa/ecomode cleanup)
59
+ 1. Autopilot (includes linked ultragoal/ultraqa/ecomode cleanup plus explicit legacy Ralph cleanup)
60
60
  2. Ralph (cleans its linked ultrawork or ecomode)
61
61
  3. Ultrawork (standalone)
62
62
  4. Ecomode (standalone)
@@ -374,7 +374,7 @@ Mode-specific subsections below describe what extra cleanup each handler perform
374
374
 
375
375
  ## Notes
376
376
 
377
- - **Dependency-aware**: Autopilot cancellation cleans up Ralph and UltraQA
377
+ - **Dependency-aware**: Autopilot cancellation cleans up Ultragoal/UltraQA state and any explicit legacy Ralph state
378
378
  - **Link-aware**: Ralph cancellation cleans up linked Ultrawork or Ecomode
379
379
  - **Safe**: Only clears linked Ultrawork, preserves standalone Ultrawork
380
380
  - **Local-only**: Clears state files in `.omx/state/` directory
@@ -56,6 +56,7 @@ If no flag is provided, use **Standard**.
56
56
  - Reduce user effort: ask only the highest-leverage unresolved question, and never ask the user for codebase facts that can be discovered directly
57
57
  - For brownfield work, prefer evidence-backed confirmation questions such as "I found X in Y. Should this change follow that pattern?"
58
58
  - Route facts before judgment in the Ouroboros style: before presenting a user-facing interview round, classify whether the needed information is a discoverable fact, a fact needing confirmation, or a human decision. The interview is with the human for judgment, not for facts the agent can inspect.
59
+ - When unresolved ambiguity depends on current external best practices, official/upstream guidance, standards, or version-aware behavior, use `$best-practice-research` as the bounded evidence wrapper before crystallizing requirements or handing off to planning/execution.
59
60
  - Use these transcript/spec labels only; never use them as `omx question` `source` values, and never replace the runtime `source: "deep-interview"` contract for user-facing deep-interview questions:
60
61
  - `[from-code][auto-confirmed]` — exact, high-confidence codebase facts from manifests/configs or direct source evidence, with no prescription attached.
61
62
  - `[from-code]` — codebase findings that are useful but inferred, pattern-based, or low/medium confidence and therefore need a confirmation-style user-facing round before being treated as settled.
@@ -369,7 +370,7 @@ Include these product-facing suggestions when they fit the clarified spec, witho
369
370
  - **`$autoresearch-goal`** — use when the clarified context is a research project: a research question, reference/literature gathering, evaluator-backed analysis, or professor/critic-style deliverable.
370
371
  - **`$performance-goal`** — use when the clarified context is an optimization or performance project with measurable speed, latency, throughput, memory, benchmark, or evaluator criteria.
371
372
 
372
- Preserve `$ralph` for persistent single-owner execution/verification and `$team` for coordinated parallel implementation. Present goal-mode options as context-sensitive next steps, not as generic replacements for implementation lanes.
373
+ Recommend `$ultragoal` as the default durable goal-mode follow-up because it supersedes Ralph for goal tracking. Preserve `$team` for coordinated parallel implementation and keep `$ralph` only as an explicit fallback for persistent single-owner execution/verification when the user specifically selects it.
373
374
 
374
375
  ### 1. **`$ralplan` (Recommended)**
375
376
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md` (optionally accompanied by the transcript/context snapshot for traceability)
@@ -378,7 +379,7 @@ Preserve `$ralph` for persistent single-owner execution/verification and `$team`
378
379
  - **Skipped / Already-Satisfied Stages:** Requirements discovery, ambiguity clarification, and early intent-boundary elicitation
379
380
  - **Expected Output:** Canonical planning artifacts under `.omx/plans/`, especially `prd-*.md` and `test-spec-*.md`
380
381
  - **Best When:** Requirements are clear enough to stop interviewing, but architectural validation / consensus planning is still desirable
381
- - **Next Recommended Step:** Use the approved planning artifacts with `$autopilot`, `$ralph`, `$team`, or `$ultragoal` as the default goal-mode follow-up; choose `$autoresearch-goal` for research validation or `$performance-goal` for measurable optimization
382
+ - **Next Recommended Step:** Use the approved planning artifacts with `$ultragoal` as the default durable goal-mode follow-up (optionally with `$team` for parallel lanes); choose `$autoresearch-goal` for research validation or `$performance-goal` for measurable optimization, and use `$ralph` only as an explicit fallback when a narrow single-owner persistence loop is requested
382
383
 
383
384
  ### 2. **`$autopilot`**
384
385
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`
@@ -387,25 +388,25 @@ Preserve `$ralph` for persistent single-owner execution/verification and `$team`
387
388
  - **Skipped / Already-Satisfied Stages:** Initial requirement discovery and ambiguity reduction
388
389
  - **Expected Output:** Planning/execution progress, QA evidence, and validation artifacts produced by autopilot
389
390
  - **Best When:** The clarified spec is already strong enough for direct planning + execution without an additional consensus gate
390
- - **Next Recommended Step:** Continue through autopilot's execution/QA/validation flow; if coordination-heavy execution emerges, prefer a follow-up `$team` or `$ralph` lane as appropriate
391
+ - **Next Recommended Step:** Continue through autopilot's execution/QA/validation flow; if coordination-heavy execution emerges, prefer `$team` under a leader-owned `$ultragoal` ledger, using `$ralph` only as an explicit fallback when a narrow single-owner persistence loop is requested
391
392
 
392
- ### 3. **`$ralph`**
393
+ ### 3. **`$ralph` (Explicit fallback only)**
393
394
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`
394
395
  - **Invocation:** `$ralph <spec-path>`
395
396
  - **Consumer Behavior:** Use the spec's acceptance criteria and boundary constraints as the persistence target. Do not reopen requirements discovery unless the user explicitly asks to refine further.
396
397
  - **Skipped / Already-Satisfied Stages:** Requirement interview, ambiguity clarification, and initial scope-definition work
397
398
  - **Expected Output:** Iterative execution progress and verification evidence tracked against the clarified criteria
398
- - **Best When:** The task benefits from persistent sequential completion pressure and the user wants execution to keep moving until the criteria are satisfied or a real blocker exists
399
- - **Next Recommended Step:** Continue Ralph's persistence loop; if work expands into coordination-heavy lanes, hand off to `$team` and keep Ralph for verification continuity
399
+ - **Best When:** The user explicitly asks for Ralph's persistent sequential completion pressure; otherwise use `$ultragoal` for durable goal tracking and completion checkpoints
400
+ - **Next Recommended Step:** If this explicit fallback is selected, continue Ralph's persistence loop; if work expands into coordination-heavy lanes, hand off to `$team` under `$ultragoal` checkpointing rather than promoting Ralph as the next default
400
401
 
401
402
  ### 4. **`$team`**
402
403
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`
403
404
  - **Invocation:** `$team <spec-path>`
404
405
  - **Consumer Behavior:** Treat the spec as shared execution context for coordinated parallel work. Preserve the clarified intent, non-goals, decision boundaries, and acceptance criteria as common lane constraints.
405
406
  - **Skipped / Already-Satisfied Stages:** Requirement clarification and early ambiguity reduction
406
- - **Expected Output:** Coordinated multi-agent execution against the shared spec, with evidence that can later feed a Ralph verification pass when appropriate
407
+ - **Expected Output:** Coordinated multi-agent execution against the shared spec, with evidence that can later feed Ultragoal checkpoints by default, or an explicit Ralph verification pass only when requested
407
408
  - **Best When:** The task is large, multi-lane, or blocker-sensitive enough to justify coordinated parallel execution instead of a single persistent loop
408
- - **Next Recommended Step:** Follow the team verification path when the coordinated execution phase finishes; escalate to a separate Ralph loop only when a later persistent verification/fix owner is still needed
409
+ - **Next Recommended Step:** Follow the team verification path when the coordinated execution phase finishes; checkpoint completion through `$ultragoal` by default, escalating to a separate Ralph loop only when the user explicitly asks for that persistent verification/fix owner
409
410
 
410
411
  ### 5. **Refine further**
411
412
  - **Input Artifact:** Existing transcript, context snapshot, and current spec draft
@@ -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 (`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.
63
+ - `plugin`: rely on Codex plugin discovery for bundled skills and plugin-scoped lifecycle hooks when Codex reports `plugin_hooks`; archive/remove legacy OMX-managed prompts/skills/native agents. Setup still enables setup-owned runtime feature flags (`plugin_hooks = true` and `goals = true` when supported, or legacy setup-managed `hooks`/`codex_hooks` fallback when plugin hooks are not reported).
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.
@@ -10,19 +10,21 @@ through a uniform `PipelineStage` interface, with state persistence and resume s
10
10
 
11
11
  ## Default Autopilot Pipeline
12
12
 
13
- The canonical OMX pipeline sequences:
13
+ The default Autopilot pipeline sequences:
14
14
 
15
15
  ```
16
- RALPLAN (consensus planning) -> team-exec (Codex CLI workers) -> ralph-verify (architect verification)
16
+ deep-interview -> ralplan -> ultragoal (+ team if needed) -> code-review -> ultraqa
17
17
  ```
18
18
 
19
+ `$team` is conditional: use it only inside an active Ultragoal story when independent lanes or broad verification make coordinated parallel execution useful. Explicit legacy Ralph pipelines remain available through custom stages, but Ralph is not the advertised default Autopilot loop.
20
+
19
21
  ## Configuration
20
22
 
21
23
  Pipeline parameters are configurable per run:
22
24
 
23
25
  | Parameter | Default | Description |
24
26
  |-----------|---------|-------------|
25
- | `maxRalphIterations` | 10 | Ralph verification iteration ceiling |
27
+ | `maxRalphIterations` | 10 | Quality-gate retry ceiling; legacy option name retained for compatibility |
26
28
  | `workerCount` | 2 | Number of Codex CLI team workers |
27
29
  | `agentType` | `executor` | Agent type for team workers |
28
30
 
@@ -43,9 +45,12 @@ return a `StageResult` with status, artifacts, and duration.
43
45
 
44
46
  ## Built-in Stages
45
47
 
48
+ - **deep-interview**: Requirements clarification and ambiguity gate.
46
49
  - **ralplan**: Consensus planning (planner + architect + critic). Skips only when both `prd-*.md` and `test-spec-*.md` planning artifacts already exist, and carries any `deep-interview-*.md` spec paths forward for traceability.
47
- - **team-exec**: Team execution via Codex CLI workers. Always the OMX execution backend.
48
- - **ralph-verify**: Ralph verification loop with configurable iteration count.
50
+ - **ultragoal**: Durable goal-mode execution with `.omx/ultragoal` ledgers. Launch `$team` only from inside an Ultragoal story when parallel lanes are warranted.
51
+ - **code-review**: Merge-readiness review gate.
52
+ - **ultraqa**: Adversarial QA gate after a clean review; docs-only/trivially non-runtime changes may record an explicit skip reason.
53
+ - **team-exec** and **ralph-verify**: Legacy/custom pipeline adapters retained for explicit non-default pipelines.
49
54
 
50
55
  ## State Management
51
56
 
@@ -62,16 +67,20 @@ The HUD renders pipeline phase automatically. Resume is supported from the last
62
67
  import {
63
68
  runPipeline,
64
69
  createAutopilotPipelineConfig,
70
+ createDeepInterviewStage,
65
71
  createRalplanStage,
66
- createTeamExecStage,
67
- createRalphVerifyStage,
72
+ createUltragoalStage,
73
+ createCodeReviewStage,
74
+ createUltraqaStage,
68
75
  } from './pipeline/index.js';
69
76
 
70
77
  const config = createAutopilotPipelineConfig('build feature X', {
71
78
  stages: [
79
+ createDeepInterviewStage(),
72
80
  createRalplanStage(),
73
- createTeamExecStage({ workerCount: 3, agentType: 'executor' }),
74
- createRalphVerifyStage({ maxIterations: 15 }),
81
+ createUltragoalStage(),
82
+ createCodeReviewStage(),
83
+ createUltraqaStage(),
75
84
  ],
76
85
  });
77
86
 
@@ -82,5 +91,7 @@ const result = await runPipeline(config);
82
91
 
83
92
  - **autopilot**: Autopilot can use pipeline as its execution engine (v0.8+)
84
93
  - **team**: Pipeline delegates execution to team mode (Codex CLI workers)
85
- - **ralph**: Pipeline delegates verification to ralph (configurable iterations)
86
- - **ralplan**: Pipeline's first stage runs RALPLAN consensus planning
94
+ - **ultragoal**: Autopilot delegates durable execution to Ultragoal by default
95
+ - **team**: Optional execution engine inside an Ultragoal story when parallel lanes are needed
96
+ - **ralph**: Available only for explicit legacy/custom pipelines
97
+ - **ralplan**: Pipeline planning runs RALPLAN consensus planning