oh-my-codex 0.18.0 → 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 (293) hide show
  1. package/Cargo.lock +6 -6
  2. package/Cargo.toml +1 -1
  3. package/README.md +43 -19
  4. package/crates/omx-api/src/lib.rs +66 -9
  5. package/crates/omx-sparkshell/src/exec.rs +125 -3
  6. package/crates/omx-sparkshell/src/main.rs +126 -36
  7. package/crates/omx-sparkshell/tests/execution.rs +225 -1
  8. package/dist/cli/__tests__/codex-plugin-layout.test.js +15 -7
  9. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
  10. package/dist/cli/__tests__/doctor-warning-copy.test.js +76 -3
  11. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  12. package/dist/cli/__tests__/index.test.js +49 -1
  13. package/dist/cli/__tests__/index.test.js.map +1 -1
  14. package/dist/cli/__tests__/install-docs-contract.test.d.ts +2 -0
  15. package/dist/cli/__tests__/install-docs-contract.test.d.ts.map +1 -0
  16. package/dist/cli/__tests__/install-docs-contract.test.js +55 -0
  17. package/dist/cli/__tests__/install-docs-contract.test.js.map +1 -0
  18. package/dist/cli/__tests__/launch-fallback.test.js +115 -0
  19. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  20. package/dist/cli/__tests__/question.test.js +27 -41
  21. package/dist/cli/__tests__/question.test.js.map +1 -1
  22. package/dist/cli/__tests__/setup-install-mode.test.js +94 -35
  23. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  24. package/dist/cli/__tests__/sparkshell-cli.test.js +20 -1
  25. package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
  26. package/dist/cli/__tests__/sparkshell-packaging.test.js +1 -0
  27. package/dist/cli/__tests__/sparkshell-packaging.test.js.map +1 -1
  28. package/dist/cli/__tests__/ultragoal.test.js +227 -4
  29. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  30. package/dist/cli/__tests__/update.test.js +72 -1
  31. package/dist/cli/__tests__/update.test.js.map +1 -1
  32. package/dist/cli/codex-feature-probe.d.ts +5 -0
  33. package/dist/cli/codex-feature-probe.d.ts.map +1 -1
  34. package/dist/cli/codex-feature-probe.js +13 -7
  35. package/dist/cli/codex-feature-probe.js.map +1 -1
  36. package/dist/cli/doctor.d.ts +7 -0
  37. package/dist/cli/doctor.d.ts.map +1 -1
  38. package/dist/cli/doctor.js +119 -10
  39. package/dist/cli/doctor.js.map +1 -1
  40. package/dist/cli/index.d.ts +3 -1
  41. package/dist/cli/index.d.ts.map +1 -1
  42. package/dist/cli/index.js +345 -90
  43. package/dist/cli/index.js.map +1 -1
  44. package/dist/cli/plugin-marketplace.d.ts +2 -0
  45. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  46. package/dist/cli/plugin-marketplace.js +15 -1
  47. package/dist/cli/plugin-marketplace.js.map +1 -1
  48. package/dist/cli/setup.d.ts.map +1 -1
  49. package/dist/cli/setup.js +71 -11
  50. package/dist/cli/setup.js.map +1 -1
  51. package/dist/cli/sparkshell.d.ts +7 -1
  52. package/dist/cli/sparkshell.d.ts.map +1 -1
  53. package/dist/cli/sparkshell.js +13 -3
  54. package/dist/cli/sparkshell.js.map +1 -1
  55. package/dist/cli/ultragoal.d.ts +1 -1
  56. package/dist/cli/ultragoal.d.ts.map +1 -1
  57. package/dist/cli/ultragoal.js +184 -10
  58. package/dist/cli/ultragoal.js.map +1 -1
  59. package/dist/cli/update.d.ts +2 -0
  60. package/dist/cli/update.d.ts.map +1 -1
  61. package/dist/cli/update.js +14 -3
  62. package/dist/cli/update.js.map +1 -1
  63. package/dist/compat/__tests__/doctor-contract.test.js +3 -0
  64. package/dist/compat/__tests__/doctor-contract.test.js.map +1 -1
  65. package/dist/config/__tests__/codex-feature-flags.test.js +11 -1
  66. package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -1
  67. package/dist/config/__tests__/codex-hooks.test.js +19 -8
  68. package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
  69. package/dist/config/__tests__/commit-lore-guard.test.d.ts +2 -0
  70. package/dist/config/__tests__/commit-lore-guard.test.d.ts.map +1 -0
  71. package/dist/config/__tests__/commit-lore-guard.test.js +20 -0
  72. package/dist/config/__tests__/commit-lore-guard.test.js.map +1 -0
  73. package/dist/config/codex-feature-flags.d.ts +4 -0
  74. package/dist/config/codex-feature-flags.d.ts.map +1 -1
  75. package/dist/config/codex-feature-flags.js +4 -0
  76. package/dist/config/codex-feature-flags.js.map +1 -1
  77. package/dist/config/codex-hooks.js +6 -6
  78. package/dist/config/codex-hooks.js.map +1 -1
  79. package/dist/config/commit-lore-guard.d.ts +1 -0
  80. package/dist/config/commit-lore-guard.d.ts.map +1 -1
  81. package/dist/config/commit-lore-guard.js +29 -3
  82. package/dist/config/commit-lore-guard.js.map +1 -1
  83. package/dist/config/generator.d.ts +3 -1
  84. package/dist/config/generator.d.ts.map +1 -1
  85. package/dist/config/generator.js +24 -10
  86. package/dist/config/generator.js.map +1 -1
  87. package/dist/goal-workflows/codex-goal-snapshot.d.ts +1 -0
  88. package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
  89. package/dist/goal-workflows/codex-goal-snapshot.js +5 -1
  90. package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
  91. package/dist/hooks/__tests__/autopilot-skill-contract.test.js +10 -6
  92. package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
  93. package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +1 -1
  94. package/dist/hooks/__tests__/consensus-execution-handoff.test.js +13 -11
  95. package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
  96. package/dist/hooks/__tests__/deep-interview-contract.test.js +4 -3
  97. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  98. package/dist/hooks/__tests__/keyword-detector.test.js +4 -3
  99. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  100. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +33 -0
  101. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  102. package/dist/hooks/extensibility/__tests__/dispatcher.test.js +26 -3
  103. package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -1
  104. package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
  105. package/dist/hooks/extensibility/dispatcher.js +29 -14
  106. package/dist/hooks/extensibility/dispatcher.js.map +1 -1
  107. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  108. package/dist/hooks/keyword-detector.js +8 -3
  109. package/dist/hooks/keyword-detector.js.map +1 -1
  110. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  111. package/dist/hooks/prompt-guidance-contract.js +3 -2
  112. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  113. package/dist/hud/__tests__/hud-tmux-injection.test.js +14 -8
  114. package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
  115. package/dist/hud/__tests__/reconcile.test.js +2 -2
  116. package/dist/hud/__tests__/reconcile.test.js.map +1 -1
  117. package/dist/hud/__tests__/resource-leak-watch.test.d.ts +2 -0
  118. package/dist/hud/__tests__/resource-leak-watch.test.d.ts.map +1 -0
  119. package/dist/hud/__tests__/resource-leak-watch.test.js +28 -0
  120. package/dist/hud/__tests__/resource-leak-watch.test.js.map +1 -0
  121. package/dist/hud/index.d.ts +1 -1
  122. package/dist/hud/index.d.ts.map +1 -1
  123. package/dist/hud/index.js +10 -4
  124. package/dist/hud/index.js.map +1 -1
  125. package/dist/hud/tmux.js +2 -2
  126. package/dist/hud/tmux.js.map +1 -1
  127. package/dist/notifications/__tests__/http-client-resource.test.d.ts +2 -0
  128. package/dist/notifications/__tests__/http-client-resource.test.d.ts.map +1 -0
  129. package/dist/notifications/__tests__/http-client-resource.test.js +41 -0
  130. package/dist/notifications/__tests__/http-client-resource.test.js.map +1 -0
  131. package/dist/notifications/__tests__/verbosity.test.js +20 -0
  132. package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
  133. package/dist/notifications/config.d.ts.map +1 -1
  134. package/dist/notifications/config.js +6 -3
  135. package/dist/notifications/config.js.map +1 -1
  136. package/dist/notifications/http-client.d.ts.map +1 -1
  137. package/dist/notifications/http-client.js +78 -27
  138. package/dist/notifications/http-client.js.map +1 -1
  139. package/dist/notifications/types.d.ts +2 -0
  140. package/dist/notifications/types.d.ts.map +1 -1
  141. package/dist/openclaw/__tests__/dispatcher.test.js +49 -1
  142. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
  143. package/dist/openclaw/dispatcher.d.ts +7 -4
  144. package/dist/openclaw/dispatcher.d.ts.map +1 -1
  145. package/dist/openclaw/dispatcher.js +32 -69
  146. package/dist/openclaw/dispatcher.js.map +1 -1
  147. package/dist/pipeline/__tests__/orchestrator.test.js +65 -3
  148. package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
  149. package/dist/pipeline/__tests__/stages.test.js +50 -5
  150. package/dist/pipeline/__tests__/stages.test.js.map +1 -1
  151. package/dist/pipeline/index.d.ts +8 -2
  152. package/dist/pipeline/index.d.ts.map +1 -1
  153. package/dist/pipeline/index.js +5 -2
  154. package/dist/pipeline/index.js.map +1 -1
  155. package/dist/pipeline/orchestrator.d.ts +5 -4
  156. package/dist/pipeline/orchestrator.d.ts.map +1 -1
  157. package/dist/pipeline/orchestrator.js +56 -15
  158. package/dist/pipeline/orchestrator.js.map +1 -1
  159. package/dist/pipeline/stages/code-review.d.ts +2 -2
  160. package/dist/pipeline/stages/code-review.d.ts.map +1 -1
  161. package/dist/pipeline/stages/code-review.js +5 -3
  162. package/dist/pipeline/stages/code-review.js.map +1 -1
  163. package/dist/pipeline/stages/deep-interview.d.ts +15 -0
  164. package/dist/pipeline/stages/deep-interview.d.ts.map +1 -0
  165. package/dist/pipeline/stages/deep-interview.js +32 -0
  166. package/dist/pipeline/stages/deep-interview.js.map +1 -0
  167. package/dist/pipeline/stages/ralph-verify.d.ts +5 -5
  168. package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -1
  169. package/dist/pipeline/stages/ralph-verify.js +2 -2
  170. package/dist/pipeline/stages/ralph-verify.js.map +1 -1
  171. package/dist/pipeline/stages/ultragoal.d.ts +19 -0
  172. package/dist/pipeline/stages/ultragoal.d.ts.map +1 -0
  173. package/dist/pipeline/stages/ultragoal.js +38 -0
  174. package/dist/pipeline/stages/ultragoal.js.map +1 -0
  175. package/dist/pipeline/stages/ultraqa.d.ts +30 -0
  176. package/dist/pipeline/stages/ultraqa.d.ts.map +1 -0
  177. package/dist/pipeline/stages/ultraqa.js +46 -0
  178. package/dist/pipeline/stages/ultraqa.js.map +1 -0
  179. package/dist/pipeline/types.d.ts +8 -6
  180. package/dist/pipeline/types.d.ts.map +1 -1
  181. package/dist/pipeline/types.js +2 -2
  182. package/dist/scripts/__tests__/codex-native-hook.test.js +705 -45
  183. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  184. package/dist/scripts/__tests__/smoke-packed-install.test.js +23 -1
  185. package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
  186. package/dist/scripts/__tests__/verify-native-agents.test.js +16 -1
  187. package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -1
  188. package/dist/scripts/cleanup-explore-harness.js +1 -0
  189. package/dist/scripts/cleanup-explore-harness.js.map +1 -1
  190. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  191. package/dist/scripts/codex-native-hook.js +158 -10
  192. package/dist/scripts/codex-native-hook.js.map +1 -1
  193. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  194. package/dist/scripts/codex-native-pre-post.js +9 -1
  195. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  196. package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
  197. package/dist/scripts/notify-hook/process-runner.js +39 -17
  198. package/dist/scripts/notify-hook/process-runner.js.map +1 -1
  199. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  200. package/dist/scripts/notify-hook/team-dispatch.js +9 -5
  201. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  202. package/dist/scripts/notify-hook/team-tmux-guard.d.ts +1 -1
  203. package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
  204. package/dist/scripts/notify-hook/team-tmux-guard.js +7 -1
  205. package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
  206. package/dist/scripts/smoke-packed-install.d.ts +3 -0
  207. package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
  208. package/dist/scripts/smoke-packed-install.js +99 -1
  209. package/dist/scripts/smoke-packed-install.js.map +1 -1
  210. package/dist/scripts/sync-plugin-mirror.js +2 -2
  211. package/dist/scripts/sync-plugin-mirror.js.map +1 -1
  212. package/dist/scripts/verify-native-agents.js +2 -2
  213. package/dist/scripts/verify-native-agents.js.map +1 -1
  214. package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts +2 -0
  215. package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts.map +1 -0
  216. package/dist/sidecar/__tests__/resource-leak-watch.test.js +38 -0
  217. package/dist/sidecar/__tests__/resource-leak-watch.test.js.map +1 -0
  218. package/dist/sidecar/index.d.ts +1 -1
  219. package/dist/sidecar/index.d.ts.map +1 -1
  220. package/dist/sidecar/index.js +29 -12
  221. package/dist/sidecar/index.js.map +1 -1
  222. package/dist/state/__tests__/operations-ralph-phase.test.js +88 -1
  223. package/dist/state/__tests__/operations-ralph-phase.test.js.map +1 -1
  224. package/dist/state/operations.d.ts.map +1 -1
  225. package/dist/state/operations.js +11 -0
  226. package/dist/state/operations.js.map +1 -1
  227. package/dist/team/__tests__/tmux-session.test.js +111 -3
  228. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  229. package/dist/team/tmux-session.d.ts.map +1 -1
  230. package/dist/team/tmux-session.js +39 -18
  231. package/dist/team/tmux-session.js.map +1 -1
  232. package/dist/ultragoal/__tests__/artifacts.test.js +714 -10
  233. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  234. package/dist/ultragoal/__tests__/docs-contract.test.js +57 -1
  235. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  236. package/dist/ultragoal/__tests__/steering-fixtures.d.ts +68 -0
  237. package/dist/ultragoal/__tests__/steering-fixtures.d.ts.map +1 -0
  238. package/dist/ultragoal/__tests__/steering-fixtures.js +259 -0
  239. package/dist/ultragoal/__tests__/steering-fixtures.js.map +1 -0
  240. package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts +2 -0
  241. package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts.map +1 -0
  242. package/dist/ultragoal/__tests__/steering-fixtures.test.js +65 -0
  243. package/dist/ultragoal/__tests__/steering-fixtures.test.js.map +1 -0
  244. package/dist/ultragoal/artifacts.d.ts +97 -2
  245. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  246. package/dist/ultragoal/artifacts.js +811 -256
  247. package/dist/ultragoal/artifacts.js.map +1 -1
  248. package/dist/utils/__tests__/sleep-resource.test.d.ts +2 -0
  249. package/dist/utils/__tests__/sleep-resource.test.d.ts.map +1 -0
  250. package/dist/utils/__tests__/sleep-resource.test.js +39 -0
  251. package/dist/utils/__tests__/sleep-resource.test.js.map +1 -0
  252. package/dist/utils/sleep.d.ts.map +1 -1
  253. package/dist/utils/sleep.js +17 -6
  254. package/dist/utils/sleep.js.map +1 -1
  255. package/package.json +2 -1
  256. package/plugins/oh-my-codex/.codex-plugin/plugin.json +4 -3
  257. package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +56 -0
  258. package/plugins/oh-my-codex/hooks/hooks.json +77 -0
  259. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +77 -47
  260. package/plugins/oh-my-codex/skills/cancel/SKILL.md +2 -2
  261. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +8 -8
  262. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +1 -1
  263. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +22 -11
  264. package/plugins/oh-my-codex/skills/plan/SKILL.md +8 -8
  265. package/plugins/oh-my-codex/skills/ralph/SKILL.md +7 -0
  266. package/plugins/oh-my-codex/skills/ralplan/SKILL.md +4 -4
  267. package/plugins/oh-my-codex/skills/team/SKILL.md +1 -1
  268. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +38 -4
  269. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +1 -1
  270. package/prompts/planner.md +1 -1
  271. package/skills/autopilot/SKILL.md +77 -47
  272. package/skills/cancel/SKILL.md +2 -2
  273. package/skills/deep-interview/SKILL.md +8 -8
  274. package/skills/omx-setup/SKILL.md +1 -1
  275. package/skills/pipeline/SKILL.md +22 -11
  276. package/skills/plan/SKILL.md +8 -8
  277. package/skills/ralph/SKILL.md +7 -0
  278. package/skills/ralplan/SKILL.md +4 -4
  279. package/skills/team/SKILL.md +1 -1
  280. package/skills/ultragoal/SKILL.md +38 -4
  281. package/skills/ultrawork/SKILL.md +1 -1
  282. package/src/scripts/__tests__/codex-native-hook.test.ts +867 -81
  283. package/src/scripts/__tests__/smoke-packed-install.test.ts +31 -0
  284. package/src/scripts/__tests__/verify-native-agents.test.ts +21 -1
  285. package/src/scripts/cleanup-explore-harness.ts +1 -0
  286. package/src/scripts/codex-native-hook.ts +156 -10
  287. package/src/scripts/codex-native-pre-post.ts +16 -1
  288. package/src/scripts/notify-hook/process-runner.ts +40 -16
  289. package/src/scripts/notify-hook/team-dispatch.ts +9 -5
  290. package/src/scripts/notify-hook/team-tmux-guard.ts +7 -0
  291. package/src/scripts/smoke-packed-install.ts +105 -0
  292. package/src/scripts/sync-plugin-mirror.ts +3 -3
  293. package/src/scripts/verify-native-agents.ts +2 -2
@@ -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>
@@ -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
@@ -370,7 +370,7 @@ Include these product-facing suggestions when they fit the clarified spec, witho
370
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.
371
371
  - **`$performance-goal`** — use when the clarified context is an optimization or performance project with measurable speed, latency, throughput, memory, benchmark, or evaluator criteria.
372
372
 
373
- 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.
374
374
 
375
375
  ### 1. **`$ralplan` (Recommended)**
376
376
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md` (optionally accompanied by the transcript/context snapshot for traceability)
@@ -379,7 +379,7 @@ Preserve `$ralph` for persistent single-owner execution/verification and `$team`
379
379
  - **Skipped / Already-Satisfied Stages:** Requirements discovery, ambiguity clarification, and early intent-boundary elicitation
380
380
  - **Expected Output:** Canonical planning artifacts under `.omx/plans/`, especially `prd-*.md` and `test-spec-*.md`
381
381
  - **Best When:** Requirements are clear enough to stop interviewing, but architectural validation / consensus planning is still desirable
382
- - **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
383
383
 
384
384
  ### 2. **`$autopilot`**
385
385
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`
@@ -388,25 +388,25 @@ Preserve `$ralph` for persistent single-owner execution/verification and `$team`
388
388
  - **Skipped / Already-Satisfied Stages:** Initial requirement discovery and ambiguity reduction
389
389
  - **Expected Output:** Planning/execution progress, QA evidence, and validation artifacts produced by autopilot
390
390
  - **Best When:** The clarified spec is already strong enough for direct planning + execution without an additional consensus gate
391
- - **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
392
392
 
393
- ### 3. **`$ralph`**
393
+ ### 3. **`$ralph` (Explicit fallback only)**
394
394
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`
395
395
  - **Invocation:** `$ralph <spec-path>`
396
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.
397
397
  - **Skipped / Already-Satisfied Stages:** Requirement interview, ambiguity clarification, and initial scope-definition work
398
398
  - **Expected Output:** Iterative execution progress and verification evidence tracked against the clarified criteria
399
- - **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
400
- - **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
401
401
 
402
402
  ### 4. **`$team`**
403
403
  - **Input Artifact:** `.omx/specs/deep-interview-{slug}.md`
404
404
  - **Invocation:** `$team <spec-path>`
405
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.
406
406
  - **Skipped / Already-Satisfied Stages:** Requirement clarification and early ambiguity reduction
407
- - **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
408
408
  - **Best When:** The task is large, multi-lane, or blocker-sensitive enough to justify coordinated parallel execution instead of a single persistent loop
409
- - **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
410
410
 
411
411
  ### 5. **Refine further**
412
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
@@ -94,11 +94,11 @@ Jumping into code without understanding requirements leads to rework, scope cree
94
94
  b. Deduplicate and categorize the suggestions
95
95
  c. Update the plan file in `.omx/plans/` with the accepted improvements (add missing details, refine steps, strengthen acceptance criteria, ADR updates, etc.)
96
96
  d. Note which improvements were applied in a brief changelog section at the end of the plan
97
- e. Before any execution handoff, derive an explicit **available-agent-types roster** from the known prompt catalog and add concrete **follow-up staffing guidance** for both `$ralph` and `$team` (recommended roles, counts, suggested reasoning levels by lane, and why each lane exists)
98
- f. Add a product-facing **Goal-Mode Follow-up Suggestions** section: recommend `$ultragoal` by default for general goal-oriented follow-up, `$autoresearch-goal` when the context is a research project, and `$performance-goal` when the context is an optimization or performance project. Keep these suggestions alongside the Ralph/team paths rather than replacing them when implementation delivery is still the main need. For durable-goal work that is also parallelizable, explicitly recommend **Team + Ultragoal**: Ultragoal remains leader-owned goal/ledger state and Team returns checkpoint-ready execution evidence.
99
- g. For the `$team` path, add an explicit launch-hint block with concrete `omx team` / `$team` commands and a **team verification path** (what team proves before shutdown, what Ralph verifies after handoff). Distinguish Team + Ultragoal from a later Ralph follow-up: Team handles coordinated parallel lanes; Ralph is only for persistent sequential single-owner verification/fix pressure when needed.
97
+ e. Before any execution handoff, derive an explicit **available-agent-types roster** from the known prompt catalog and add concrete **follow-up staffing guidance** for `$ultragoal` and `$team` (recommended roles, counts, suggested reasoning levels by lane, and why each lane exists), plus an explicit `$ralph` fallback note only when persistent single-owner verification is intentionally selected
98
+ f. Add a product-facing **Goal-Mode Follow-up Suggestions** section: recommend `$ultragoal` by default for general goal-oriented follow-up, `$autoresearch-goal` when the context is a research project, and `$performance-goal` when the context is an optimization or performance project. Keep these suggestions alongside the Team path and any explicit Ralph fallback rather than replacing implementation-delivery guidance. For durable-goal work that is also parallelizable, explicitly recommend **Team + Ultragoal**: Ultragoal remains leader-owned goal/ledger state and Team returns checkpoint-ready execution evidence.
99
+ g. For the `$team` path, add an explicit launch-hint block with concrete `omx team` / `$team` commands and a **team verification path** (what Team proves before shutdown and what Ultragoal checkpoints as durable completion evidence). Distinguish Team + Ultragoal from any explicit Ralph fallback: Team handles coordinated parallel lanes; Ultragoal is the default durable follow-up/ledger owner, and Ralph is only an explicitly requested legacy-style persistent sequential verification/fix lane when needed.
100
100
  7. On Critic approval (with improvements applied): *(--interactive only)* If running with `--interactive`, use `AskUserQuestion` / the structured question UI to present the plan with these options:
101
- - **Approve and execute** — proceed to implementation via ralph+ultrawork
101
+ - **Approve durable goal execution** — proceed via `$ultragoal` by default (optionally with `$team` for parallel lanes)
102
102
  - **Approve and implement via team** — proceed to implementation via coordinated parallel team agents
103
103
  - **Start goal-mode follow-up** — proceed via `$ultragoal` by default, or `$autoresearch-goal` / `$performance-goal` when the approved plan specifically fits research validation or measurable optimization
104
104
  - **Request changes** — return to step 1 with user feedback
@@ -106,7 +106,7 @@ Jumping into code without understanding requirements leads to rework, scope cree
106
106
  If NOT running with `--interactive`, output the final approved plan and stop. Do NOT auto-execute.
107
107
  8. *(--interactive only)* User chooses via the structured question UI (never ask for approval in plain text when a structured surface is available)
108
108
  9. On user approval (--interactive only):
109
- - **Approve and execute**: **MUST** invoke `$ralph` with the approved plan path from `.omx/plans/` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete role allocation guidance, and direct launch hints for Ralph follow-up work**. Do NOT implement directly. Do NOT edit source code files in the planning agent. The ralph skill handles execution via ultrawork parallel agents.
109
+ - **Approve durable goal execution**: **MUST** invoke `$ultragoal` with the approved plan path from `.omx/plans/` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete role allocation guidance, and direct launch hints for Ultragoal follow-up work**. Use `$team` alongside Ultragoal when parallel lanes are warranted. Do NOT implement directly. Do NOT edit source code files in the planning agent. Ralph is not the default follow-up; only invoke `$ralph` when the user explicitly selects a legacy/persistent single-owner execution lane.
110
110
  - **Approve and implement via team**: **MUST** invoke `$team` with the approved plan path from `.omx/plans/` as context **plus the explicit available-agent-types roster, suggested reasoning levels, concrete staffing / worker-role allocation guidance, explicit `omx team` / `$team` launch hints, and the team verification path**. Do NOT implement directly. The team skill coordinates parallel agents across the staged pipeline for faster execution on large tasks.
111
111
  - **Start goal-mode follow-up**: **MUST** invoke the selected goal workflow with the approved plan path and appropriate success context: `$ultragoal` as the default goal-mode path, `$autoresearch-goal` for research projects, or `$performance-goal` for optimization/performance projects with measurable evaluator criteria. Do NOT implement directly in the planning agent.
112
112
 
@@ -147,7 +147,7 @@ Plans are saved to `.omx/plans/`. Drafts go to `.omx/drafts/`.
147
147
  - **CRITICAL — Consensus mode agent calls MUST be sequential, never parallel.** Always await the Architect result before issuing the Critic call.
148
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)
149
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.
150
- - In consensus mode with `--interactive`, on user approval **MUST** invoke the selected follow-up lane from step 9 (`$ralph`, `$team`, `$ultragoal`, `$autoresearch-goal`, or `$performance-goal`) -- never implement directly in the planning agent
150
+ - In consensus mode with `--interactive`, on user approval **MUST** invoke the selected follow-up lane from step 9 (`$ultragoal`, `$team`, `$autoresearch-goal`, `$performance-goal`, or explicit `$ralph` fallback) -- never implement directly in the planning agent
151
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. For parallelizable durable-goal plans, recommend Team + Ultragoal with leader-owned checkpointing from Team evidence; reserve Ralph for persistent sequential single-owner verification/fix follow-up.
152
152
  </Tool_Usage>
153
153
 
@@ -212,8 +212,8 @@ Why bad: Decision fatigue. Present one option with trade-offs, get reaction, the
212
212
  <Escalation_And_Stop_Conditions>
213
213
  - Stop interviewing when requirements are clear enough to plan -- do not over-interview
214
214
  - In consensus mode, stop after 5 Planner/Architect/Critic iterations and present the best version
215
- - Consensus mode outputs the plan by default; with `--interactive`, user can approve and hand off to ralph/team
216
- - If the user says "just do it" or "skip planning", **MUST** invoke `$ralph` to transition to execution mode. Do NOT implement directly in the planning agent.
215
+ - Consensus mode outputs the plan by default; with `--interactive`, user can approve and hand off to ultragoal/team, with Ralph only as an explicit legacy/persistent single-owner lane
216
+ - If the user says "just do it" or "skip planning", **MUST** invoke `$ultragoal` to transition to durable goal execution mode by default; use `$ralph` only when the user explicitly asks for that fallback. Do NOT implement directly in the planning agent.
217
217
  - Escalate to the user when there are irreconcilable trade-offs that require a business decision
218
218
  </Escalation_And_Stop_Conditions>
219
219
 
@@ -127,6 +127,13 @@ Use the CLI-first state surface for Ralph lifecycle state (`omx state write/read
127
127
  `omx state write --input '{"mode":"ralph","current_phase":"verifying"}' --json` or `omx state write --input '{"mode":"ralph","current_phase":"fixing"}' --json`
128
128
  - **On completion** (only after the completion audit passes with real evidence):
129
129
  `omx state write --input '{"mode":"ralph","active":false,"current_phase":"complete","completed_at":"<now>","completion_audit":{"passed":true,"prompt_to_artifact_checklist":["<requirement mapped to artifact/evidence>"],"verification_evidence":["<fresh test/build/lint command and result>"]}}' --json`
130
+ - **Before the final answer**:
131
+ 1. Run fresh verification and read the output.
132
+ 2. Build `prompt_to_artifact_checklist` entries that map every user requirement, workflow gate, named file, command, PR/delivery requirement, and stop condition to a concrete artifact or evidence item.
133
+ 3. Build `verification_evidence` entries with concrete commands, exit status, files inspected, PR URLs, or other machine-checkable evidence.
134
+ 4. Write the Ralph completion state with a top-level `completion_audit` field on the Ralph state object. Do not write bare top-level `prompt_to_artifact_checklist` or `verification_evidence` fields by themselves; the Stop gate will reject them.
135
+ 5. Read the state back with `omx state read --input '{"mode":"ralph"}' --json` and verify `completion_audit.passed === true`, a non-empty checklist, and non-empty verification evidence before producing the final answer.
136
+ 6. If Codex goal mode is active, call `update_goal({status:"complete"})` only after this Ralph audit read-back succeeds.
130
137
  - **On cancellation/cleanup**:
131
138
  run `$cancel` (which should call `omx state clear --input '{"mode":"ralph"}' --json`)
132
139
 
@@ -54,9 +54,9 @@ The consensus workflow:
54
54
  d. Return to Critic evaluation
55
55
  e. Repeat this loop until Critic returns `APPROVE` or 5 iterations are reached
56
56
  f. If 5 iterations are reached without `APPROVE`, present the best version to the user
57
- 6. On Critic approval *(--interactive only)*: If `--interactive` is set, use the structured question UI to present the plan with approval options (Approve and execute via ralph / Approve and implement via team / Start a goal-mode follow-up / Request changes / Reject). Final plan must include ADR (Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups), an explicit available-agent-types roster, concrete follow-up staffing guidance for both `ralph` and `team`, suggested reasoning levels by lane, explicit `omx team` / `$team` launch hints, a concrete **team verification** path, and a product-facing **Goal-Mode Follow-up Suggestions** section. Recommend `$ultragoal` by default for goal-mode follow-up, use `$autoresearch-goal` instead when the context is a research project, and use `$performance-goal` instead when the context is an optimization or performance project. Otherwise, output the final plan and stop.
58
- 7. *(--interactive only)* User chooses: Approve (ralph, team, or a goal-mode follow-up), Request changes, or Reject
59
- 8. *(--interactive only)* On approval: invoke `$ralph` for sequential execution, `$team` for parallel team execution, or the selected goal-mode follow-up (`$ultragoal`, `$autoresearch-goal`, or `$performance-goal`) with the approved plan and matching success/evaluator context -- never implement directly. Preserve the explicit available-agent-types roster, reasoning-by-lane guidance, role/staffing allocation guidance, launch hints, and verification-path guidance from the approved plan for Ralph/team paths.
57
+ 6. On Critic approval *(--interactive only)*: If `--interactive` is set, use the structured question UI to present the plan with approval options (Approve durable goal execution via ultragoal / Approve and implement via team / Explicit Ralph fallback / Start specialized goal-mode follow-up / Request changes / Reject). Final plan must include ADR (Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups), an explicit available-agent-types roster, concrete follow-up staffing guidance for `$ultragoal` and `$team`, plus an explicit `$ralph` fallback note when persistent single-owner verification is intentionally selected, suggested reasoning levels by lane, explicit `omx team` / `$team` launch hints, a concrete **team verification** path, and a product-facing **Goal-Mode Follow-up Suggestions** section. Recommend `$ultragoal` by default for goal-mode follow-up, use `$autoresearch-goal` instead when the context is a research project, and use `$performance-goal` instead when the context is an optimization or performance project. Otherwise, output the final plan and stop.
58
+ 7. *(--interactive only)* User chooses: Approve (`$ultragoal` durable goal execution, `$team`, explicit `$ralph` fallback, or a specialized goal-mode follow-up), Request changes, or Reject
59
+ 8. *(--interactive only)* On approval: invoke `$ultragoal` for default durable sequential execution, `$team` for parallel team execution, the selected specialized goal-mode follow-up (`$autoresearch-goal` or `$performance-goal`), or `$ralph` only when the user explicitly selects that fallback with the approved plan and matching success/evaluator context -- never implement directly. Preserve the explicit available-agent-types roster, reasoning-by-lane guidance, role/staffing allocation guidance, launch hints, and verification-path guidance from the approved plan for Ultragoal/team paths and any explicit Ralph fallback.
60
60
 
61
61
  > **Important:** Steps 3 and 4 MUST run sequentially. Do NOT issue both agent calls in the same parallel batch. Always await the Architect result before invoking Critic.
62
62
 
@@ -70,7 +70,7 @@ When ralplan outputs a final handoff or asks the user to choose a next lane, inc
70
70
  - `$autoresearch-goal` — research-project follow-up when the plan centers on a question, literature/reference gathering, evaluator-backed research, or a professor/critic-style research deliverable.
71
71
  - `$performance-goal` — optimization/performance follow-up when the plan centers on speed, latency, throughput, memory, benchmark, or other measurable performance work.
72
72
 
73
- Keep `$ralph` and `$team` as first-class execution options where appropriate: use Ralph for persistent single-owner completion/verification pressure and team for coordinated parallel implementation. For parallelizable durable-goal delivery, recommend `$ultragoal` + `$team` together: Ultragoal remains the leader-owned `.omx/ultragoal` ledger/Codex-goal wrapper while Team runs parallel lanes and returns checkpoint-ready evidence. Do not present the goal-mode options as replacements for Ralph/team when the task is mainly implementation delivery; present them as better fits when durable goal tracking, research validation, or performance evaluators are the primary need.
73
+ Keep `$team` as a first-class execution option and keep `$ralph` available only as an explicit fallback where appropriate: use Ultragoal as the default durable goal-mode follow-up, Team for coordinated parallel implementation, and Ralph only for intentionally selected persistent single-owner completion/verification pressure. For parallelizable durable-goal delivery, recommend `$ultragoal` + `$team` together: Ultragoal remains the leader-owned `.omx/ultragoal` ledger/Codex-goal wrapper while Team runs parallel lanes and returns checkpoint-ready evidence. Do not present Ralph as the recommended follow-up when durable goal tracking is needed; present Ultragoal as the superseding default, with Team for parallel delivery and Ralph only as an explicit fallback when its narrow persistence loop is specifically desired.
74
74
 
75
75
  ## Pre-context Intake
76
76
 
@@ -126,7 +126,7 @@ When `$team` is used as a follow-up mode from ralplan, carry forward the approve
126
126
  - state the recommended headcount and role counts
127
127
  - state the suggested reasoning level for each lane when available
128
128
  - explain why each lane exists (delivery, verification, specialist support)
129
- - include an explicit launch hint (`omx team N "<task>"` / `$team N "<task>"`) for the coordinated team run; mention a later separate Ralph follow-up only when genuinely needed
129
+ - include an explicit launch hint (`omx team N "<task>"` / `$team N "<task>"`) for the coordinated team run; mention `$ultragoal` as the default durable follow-up/ledger path; mention a later separate Ralph follow-up only when explicitly requested or genuinely needed as a fallback
130
130
  - if the ideal role is unavailable, choose the closest role from the roster and say so
131
131
 
132
132
  ## Current Runtime Behavior (As Implemented)