oh-my-codex 0.20.5 → 0.21.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 (890) hide show
  1. package/Cargo.toml +1 -1
  2. package/README.md +22 -19
  3. package/dist/agents/__tests__/definitions.test.js +0 -27
  4. package/dist/agents/__tests__/definitions.test.js.map +1 -1
  5. package/dist/agents/__tests__/native-config.test.js +3 -8
  6. package/dist/agents/__tests__/native-config.test.js.map +1 -1
  7. package/dist/agents/definitions.d.ts.map +1 -1
  8. package/dist/agents/definitions.js +0 -41
  9. package/dist/agents/definitions.js.map +1 -1
  10. package/dist/agents/policy.d.ts.map +1 -1
  11. package/dist/agents/policy.js +0 -1
  12. package/dist/agents/policy.js.map +1 -1
  13. package/dist/autopilot/__tests__/completion-gate-advisory.test.d.ts +2 -0
  14. package/dist/autopilot/__tests__/completion-gate-advisory.test.d.ts.map +1 -0
  15. package/dist/autopilot/__tests__/completion-gate-advisory.test.js +383 -0
  16. package/dist/autopilot/__tests__/completion-gate-advisory.test.js.map +1 -0
  17. package/dist/autopilot/completion-gate.d.ts +6 -1
  18. package/dist/autopilot/completion-gate.d.ts.map +1 -1
  19. package/dist/autopilot/completion-gate.js +247 -7
  20. package/dist/autopilot/completion-gate.js.map +1 -1
  21. package/dist/catalog/__tests__/generator.test.js +15 -10
  22. package/dist/catalog/__tests__/generator.test.js.map +1 -1
  23. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +13 -7
  24. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -1
  25. package/dist/catalog/__tests__/schema.test.js +3 -5
  26. package/dist/catalog/__tests__/schema.test.js.map +1 -1
  27. package/dist/catalog/schema.js +1 -1
  28. package/dist/catalog/schema.js.map +1 -1
  29. package/dist/cli/__tests__/autopilot.test.d.ts +2 -0
  30. package/dist/cli/__tests__/autopilot.test.d.ts.map +1 -0
  31. package/dist/cli/__tests__/autopilot.test.js +143 -0
  32. package/dist/cli/__tests__/autopilot.test.js.map +1 -0
  33. package/dist/cli/__tests__/codex-plugin-layout.test.js +6 -2
  34. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
  35. package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.d.ts +2 -0
  36. package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.d.ts.map +1 -0
  37. package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.js +592 -0
  38. package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.js.map +1 -0
  39. package/dist/cli/__tests__/detached-leader-teardown.test.js +270 -33
  40. package/dist/cli/__tests__/detached-leader-teardown.test.js.map +1 -1
  41. package/dist/cli/__tests__/doctor-state-root-binding.test.js +69 -2
  42. package/dist/cli/__tests__/doctor-state-root-binding.test.js.map +1 -1
  43. package/dist/cli/__tests__/doctor-team.test.js +85 -0
  44. package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
  45. package/dist/cli/__tests__/doctor-warning-copy.test.js +136 -8
  46. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  47. package/dist/cli/__tests__/index.test.js +543 -2
  48. package/dist/cli/__tests__/index.test.js.map +1 -1
  49. package/dist/cli/__tests__/issue-windows-cancel-identity.test.d.ts +2 -0
  50. package/dist/cli/__tests__/issue-windows-cancel-identity.test.d.ts.map +1 -0
  51. package/dist/cli/__tests__/issue-windows-cancel-identity.test.js +17 -0
  52. package/dist/cli/__tests__/issue-windows-cancel-identity.test.js.map +1 -0
  53. package/dist/cli/__tests__/launch-fallback.test.js +120 -3
  54. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  55. package/dist/cli/__tests__/package-bin-contract.test.js +25 -8
  56. package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
  57. package/dist/cli/__tests__/plugin-cache-stale-lock.test.d.ts +2 -0
  58. package/dist/cli/__tests__/plugin-cache-stale-lock.test.d.ts.map +1 -0
  59. package/dist/cli/__tests__/plugin-cache-stale-lock.test.js +76 -0
  60. package/dist/cli/__tests__/plugin-cache-stale-lock.test.js.map +1 -0
  61. package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.d.ts +2 -0
  62. package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.d.ts.map +1 -0
  63. package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.js +1662 -0
  64. package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.js.map +1 -0
  65. package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.d.ts +2 -0
  66. package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.d.ts.map +1 -0
  67. package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.js +522 -0
  68. package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.js.map +1 -0
  69. package/dist/cli/__tests__/ralph-deslop-contract.test.js +4 -18
  70. package/dist/cli/__tests__/ralph-deslop-contract.test.js.map +1 -1
  71. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +4 -30
  72. package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
  73. package/dist/cli/__tests__/ralph-prd-deep-interview.test.js +4 -15
  74. package/dist/cli/__tests__/ralph-prd-deep-interview.test.js.map +1 -1
  75. package/dist/cli/__tests__/ralplan-advisory.test.d.ts +2 -0
  76. package/dist/cli/__tests__/ralplan-advisory.test.d.ts.map +1 -0
  77. package/dist/cli/__tests__/ralplan-advisory.test.js +301 -0
  78. package/dist/cli/__tests__/ralplan-advisory.test.js.map +1 -0
  79. package/dist/cli/__tests__/ralplan.test.js +88 -4
  80. package/dist/cli/__tests__/ralplan.test.js.map +1 -1
  81. package/dist/cli/__tests__/resume.test.js +81 -6
  82. package/dist/cli/__tests__/resume.test.js.map +1 -1
  83. package/dist/cli/__tests__/session-scoped-runtime.test.js +458 -4
  84. package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
  85. package/dist/cli/__tests__/session-search-help.test.js +65 -3
  86. package/dist/cli/__tests__/session-search-help.test.js.map +1 -1
  87. package/dist/cli/__tests__/setup-agents-overwrite.test.js +49 -0
  88. package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
  89. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +34 -0
  90. package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -1
  91. package/dist/cli/__tests__/setup-hooks-trust-e2e.test.js +1 -1
  92. package/dist/cli/__tests__/setup-hooks-trust-e2e.test.js.map +1 -1
  93. package/dist/cli/__tests__/setup-install-mode.test.js +133 -23
  94. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  95. package/dist/cli/__tests__/setup-prompts-overwrite.test.js +1 -1
  96. package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
  97. package/dist/cli/__tests__/setup-refresh.test.js +12 -6
  98. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  99. package/dist/cli/__tests__/setup-skills-overwrite.test.js +180 -21
  100. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  101. package/dist/cli/__tests__/sparkshell-cli.test.js +4 -0
  102. package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
  103. package/dist/cli/__tests__/ultragoal.test.js +115 -0
  104. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  105. package/dist/cli/__tests__/uninstall.test.js +23 -23
  106. package/dist/cli/__tests__/uninstall.test.js.map +1 -1
  107. package/dist/cli/__tests__/update.test.js +81 -1
  108. package/dist/cli/__tests__/update.test.js.map +1 -1
  109. package/dist/cli/__tests__/windows-popup-loop-contract.test.js +30 -4
  110. package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
  111. package/dist/cli/autopilot.d.ts +8 -0
  112. package/dist/cli/autopilot.d.ts.map +1 -0
  113. package/dist/cli/autopilot.js +160 -0
  114. package/dist/cli/autopilot.js.map +1 -0
  115. package/dist/cli/doctor.d.ts +12 -0
  116. package/dist/cli/doctor.d.ts.map +1 -1
  117. package/dist/cli/doctor.js +216 -27
  118. package/dist/cli/doctor.js.map +1 -1
  119. package/dist/cli/index.d.ts +114 -8
  120. package/dist/cli/index.d.ts.map +1 -1
  121. package/dist/cli/index.js +1932 -200
  122. package/dist/cli/index.js.map +1 -1
  123. package/dist/cli/mcp-parity.d.ts.map +1 -1
  124. package/dist/cli/mcp-parity.js +7 -3
  125. package/dist/cli/mcp-parity.js.map +1 -1
  126. package/dist/cli/native-assets.d.ts +1 -1
  127. package/dist/cli/native-assets.d.ts.map +1 -1
  128. package/dist/cli/package-manager-ownership.d.ts +6 -0
  129. package/dist/cli/package-manager-ownership.d.ts.map +1 -1
  130. package/dist/cli/package-manager-ownership.js +15 -0
  131. package/dist/cli/package-manager-ownership.js.map +1 -1
  132. package/dist/cli/plugin-marketplace.d.ts +90 -4
  133. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  134. package/dist/cli/plugin-marketplace.js +2190 -105
  135. package/dist/cli/plugin-marketplace.js.map +1 -1
  136. package/dist/cli/ralplan.d.ts +4 -1
  137. package/dist/cli/ralplan.d.ts.map +1 -1
  138. package/dist/cli/ralplan.js +199 -1
  139. package/dist/cli/ralplan.js.map +1 -1
  140. package/dist/cli/session-search.d.ts.map +1 -1
  141. package/dist/cli/session-search.js +38 -1
  142. package/dist/cli/session-search.js.map +1 -1
  143. package/dist/cli/setup.d.ts +3 -0
  144. package/dist/cli/setup.d.ts.map +1 -1
  145. package/dist/cli/setup.js +376 -183
  146. package/dist/cli/setup.js.map +1 -1
  147. package/dist/cli/sparkshell.d.ts.map +1 -1
  148. package/dist/cli/sparkshell.js +9 -10
  149. package/dist/cli/sparkshell.js.map +1 -1
  150. package/dist/cli/ultragoal.d.ts +1 -1
  151. package/dist/cli/ultragoal.d.ts.map +1 -1
  152. package/dist/cli/ultragoal.js +8 -5
  153. package/dist/cli/ultragoal.js.map +1 -1
  154. package/dist/cli/update.d.ts +2 -1
  155. package/dist/cli/update.d.ts.map +1 -1
  156. package/dist/cli/update.js +21 -1
  157. package/dist/cli/update.js.map +1 -1
  158. package/dist/compat/__tests__/upgrade-from-0-20.test.d.ts +2 -0
  159. package/dist/compat/__tests__/upgrade-from-0-20.test.d.ts.map +1 -0
  160. package/dist/compat/__tests__/upgrade-from-0-20.test.js +109 -0
  161. package/dist/compat/__tests__/upgrade-from-0-20.test.js.map +1 -0
  162. package/dist/compat/upgrade-from-0-20.d.ts +64 -0
  163. package/dist/compat/upgrade-from-0-20.d.ts.map +1 -0
  164. package/dist/compat/upgrade-from-0-20.js +276 -0
  165. package/dist/compat/upgrade-from-0-20.js.map +1 -0
  166. package/dist/config/__tests__/generator-idempotent.test.js +118 -0
  167. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  168. package/dist/config/generator.d.ts.map +1 -1
  169. package/dist/config/generator.js +74 -4
  170. package/dist/config/generator.js.map +1 -1
  171. package/dist/hooks/__tests__/analyze-skill-contract.test.js +24 -31
  172. package/dist/hooks/__tests__/analyze-skill-contract.test.js.map +1 -1
  173. package/dist/hooks/__tests__/anti-slop-workflow.test.js +66 -135
  174. package/dist/hooks/__tests__/anti-slop-workflow.test.js.map +1 -1
  175. package/dist/hooks/__tests__/autopilot-skill-contract.test.js +47 -129
  176. package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
  177. package/dist/hooks/__tests__/code-review-skill-contract.test.js +16 -18
  178. package/dist/hooks/__tests__/code-review-skill-contract.test.js.map +1 -1
  179. package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +2 -14
  180. package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts.map +1 -1
  181. package/dist/hooks/__tests__/consensus-execution-handoff.test.js +56 -234
  182. package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
  183. package/dist/hooks/__tests__/deep-interview-contract.test.js +1 -3
  184. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  185. package/dist/hooks/__tests__/design-skill.test.js +18 -16
  186. package/dist/hooks/__tests__/design-skill.test.js.map +1 -1
  187. package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js +24 -20
  188. package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js.map +1 -1
  189. package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.js +8 -16
  190. package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.js.map +1 -1
  191. package/dist/hooks/__tests__/issue-3497-hook-simplification.test.d.ts +2 -0
  192. package/dist/hooks/__tests__/issue-3497-hook-simplification.test.d.ts.map +1 -0
  193. package/dist/hooks/__tests__/issue-3497-hook-simplification.test.js +169 -0
  194. package/dist/hooks/__tests__/issue-3497-hook-simplification.test.js.map +1 -0
  195. package/dist/hooks/__tests__/keyword-detector.test.js +200 -897
  196. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  197. package/dist/hooks/__tests__/notify-fallback-watcher.test.js +4 -4
  198. package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
  199. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +18 -54
  200. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
  201. package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +14 -904
  202. package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
  203. package/dist/hooks/__tests__/notify-hook-session-scope.test.js +5 -5
  204. package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -1
  205. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +5 -5
  206. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
  207. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +7 -7
  208. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -1
  209. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +7 -6
  210. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  211. package/dist/hooks/__tests__/pre-context-gate-skills.test.js +19 -21
  212. package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
  213. package/dist/hooks/__tests__/prompt-guidance-contract.test.js +15 -4
  214. package/dist/hooks/__tests__/prompt-guidance-contract.test.js.map +1 -1
  215. package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +23 -28
  216. package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
  217. package/dist/hooks/__tests__/ralplan-advisory-keyword.test.d.ts +2 -0
  218. package/dist/hooks/__tests__/ralplan-advisory-keyword.test.d.ts.map +1 -0
  219. package/dist/hooks/__tests__/ralplan-advisory-keyword.test.js +250 -0
  220. package/dist/hooks/__tests__/ralplan-advisory-keyword.test.js.map +1 -0
  221. package/dist/hooks/__tests__/research-workflow-boundaries.test.js +9 -8
  222. package/dist/hooks/__tests__/research-workflow-boundaries.test.js.map +1 -1
  223. package/dist/hooks/__tests__/session.test.js +608 -18
  224. package/dist/hooks/__tests__/session.test.js.map +1 -1
  225. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js +13 -22
  226. package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -1
  227. package/dist/hooks/__tests__/skill-guidance-contract.test.js +3 -13
  228. package/dist/hooks/__tests__/skill-guidance-contract.test.js.map +1 -1
  229. package/dist/hooks/__tests__/sunset-routing-contract.test.d.ts +2 -0
  230. package/dist/hooks/__tests__/sunset-routing-contract.test.d.ts.map +1 -0
  231. package/dist/hooks/__tests__/sunset-routing-contract.test.js +172 -0
  232. package/dist/hooks/__tests__/sunset-routing-contract.test.js.map +1 -0
  233. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +2 -2
  234. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -1
  235. package/dist/hooks/__tests__/tmux-hook-engine.test.js +18 -3
  236. package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -1
  237. package/dist/hooks/__tests__/visual-ralph-skill.test.js +20 -17
  238. package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -1
  239. package/dist/hooks/__tests__/visual-verdict-loop.test.js +17 -18
  240. package/dist/hooks/__tests__/visual-verdict-loop.test.js.map +1 -1
  241. package/dist/hooks/keyword-detector.d.ts +10 -51
  242. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  243. package/dist/hooks/keyword-detector.js +279 -366
  244. package/dist/hooks/keyword-detector.js.map +1 -1
  245. package/dist/hooks/keyword-registry.d.ts.map +1 -1
  246. package/dist/hooks/keyword-registry.js +14 -26
  247. package/dist/hooks/keyword-registry.js.map +1 -1
  248. package/dist/hooks/native/capability-warnings.d.ts +16 -0
  249. package/dist/hooks/native/capability-warnings.d.ts.map +1 -0
  250. package/dist/hooks/native/capability-warnings.js +40 -0
  251. package/dist/hooks/native/capability-warnings.js.map +1 -0
  252. package/dist/hooks/native/index.d.ts +17 -0
  253. package/dist/hooks/native/index.d.ts.map +1 -0
  254. package/dist/hooks/native/index.js +17 -0
  255. package/dist/hooks/native/index.js.map +1 -0
  256. package/dist/hooks/native/pre-tool-use-advisory.d.ts +17 -0
  257. package/dist/hooks/native/pre-tool-use-advisory.d.ts.map +1 -0
  258. package/dist/hooks/native/pre-tool-use-advisory.js +112 -0
  259. package/dist/hooks/native/pre-tool-use-advisory.js.map +1 -0
  260. package/dist/hooks/native/types.d.ts +30 -0
  261. package/dist/hooks/native/types.d.ts.map +1 -0
  262. package/dist/hooks/native/types.js +22 -0
  263. package/dist/hooks/native/types.js.map +1 -0
  264. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  265. package/dist/hooks/prompt-guidance-contract.js +46 -93
  266. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  267. package/dist/hooks/session.d.ts +22 -4
  268. package/dist/hooks/session.d.ts.map +1 -1
  269. package/dist/hooks/session.js +589 -28
  270. package/dist/hooks/session.js.map +1 -1
  271. package/dist/hooks/sunset-stub.d.ts +17 -0
  272. package/dist/hooks/sunset-stub.d.ts.map +1 -0
  273. package/dist/hooks/sunset-stub.js +125 -0
  274. package/dist/hooks/sunset-stub.js.map +1 -0
  275. package/dist/hud/__tests__/index.test.js +16 -1
  276. package/dist/hud/__tests__/index.test.js.map +1 -1
  277. package/dist/hud/__tests__/reconcile.test.js +134 -7
  278. package/dist/hud/__tests__/reconcile.test.js.map +1 -1
  279. package/dist/hud/__tests__/session-attached.test.d.ts +2 -0
  280. package/dist/hud/__tests__/session-attached.test.d.ts.map +1 -0
  281. package/dist/hud/__tests__/session-attached.test.js +82 -0
  282. package/dist/hud/__tests__/session-attached.test.js.map +1 -0
  283. package/dist/hud/__tests__/tmux-split-realtmux.test.d.ts +2 -0
  284. package/dist/hud/__tests__/tmux-split-realtmux.test.d.ts.map +1 -0
  285. package/dist/hud/__tests__/tmux-split-realtmux.test.js +279 -0
  286. package/dist/hud/__tests__/tmux-split-realtmux.test.js.map +1 -0
  287. package/dist/hud/__tests__/tmux.test.js +166 -22
  288. package/dist/hud/__tests__/tmux.test.js.map +1 -1
  289. package/dist/hud/__tests__/watch-detached.test.d.ts +2 -0
  290. package/dist/hud/__tests__/watch-detached.test.d.ts.map +1 -0
  291. package/dist/hud/__tests__/watch-detached.test.js +383 -0
  292. package/dist/hud/__tests__/watch-detached.test.js.map +1 -0
  293. package/dist/hud/__tests__/watch-realtmux.test.d.ts +2 -0
  294. package/dist/hud/__tests__/watch-realtmux.test.d.ts.map +1 -0
  295. package/dist/hud/__tests__/watch-realtmux.test.js +322 -0
  296. package/dist/hud/__tests__/watch-realtmux.test.js.map +1 -0
  297. package/dist/hud/index.d.ts +3 -0
  298. package/dist/hud/index.d.ts.map +1 -1
  299. package/dist/hud/index.js +98 -20
  300. package/dist/hud/index.js.map +1 -1
  301. package/dist/hud/reconcile.d.ts.map +1 -1
  302. package/dist/hud/reconcile.js +68 -24
  303. package/dist/hud/reconcile.js.map +1 -1
  304. package/dist/hud/session-attached.d.ts +15 -0
  305. package/dist/hud/session-attached.d.ts.map +1 -0
  306. package/dist/hud/session-attached.js +47 -0
  307. package/dist/hud/session-attached.js.map +1 -0
  308. package/dist/hud/tmux.d.ts +5 -0
  309. package/dist/hud/tmux.d.ts.map +1 -1
  310. package/dist/hud/tmux.js +103 -32
  311. package/dist/hud/tmux.js.map +1 -1
  312. package/dist/mcp/__tests__/state-server-ralph-phase.test.js +29 -4
  313. package/dist/mcp/__tests__/state-server-ralph-phase.test.js.map +1 -1
  314. package/dist/mcp/__tests__/state-server-schema.test.js +13 -3
  315. package/dist/mcp/__tests__/state-server-schema.test.js.map +1 -1
  316. package/dist/mcp/__tests__/state-server.test.js +11 -1033
  317. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  318. package/dist/mcp/state-server.d.ts +67 -96
  319. package/dist/mcp/state-server.d.ts.map +1 -1
  320. package/dist/mcp/state-server.js +116 -67
  321. package/dist/mcp/state-server.js.map +1 -1
  322. package/dist/modes/__tests__/base-autopilot-gates.test.js +1 -197
  323. package/dist/modes/__tests__/base-autopilot-gates.test.js.map +1 -1
  324. package/dist/modes/__tests__/base-autoresearch-contract.test.js +1 -85
  325. package/dist/modes/__tests__/base-autoresearch-contract.test.js.map +1 -1
  326. package/dist/modes/__tests__/base-multi-state-compat.test.js +1 -35
  327. package/dist/modes/__tests__/base-multi-state-compat.test.js.map +1 -1
  328. package/dist/modes/__tests__/base-session-scope.test.js +1 -158
  329. package/dist/modes/__tests__/base-session-scope.test.js.map +1 -1
  330. package/dist/modes/base.d.ts +16 -3
  331. package/dist/modes/base.d.ts.map +1 -1
  332. package/dist/modes/base.js +157 -97
  333. package/dist/modes/base.js.map +1 -1
  334. package/dist/native-assets/policy.d.ts +1 -1
  335. package/dist/native-assets/policy.d.ts.map +1 -1
  336. package/dist/native-assets/policy.js +1 -1
  337. package/dist/native-assets/policy.js.map +1 -1
  338. package/dist/notifications/__tests__/formatter.test.js +8 -0
  339. package/dist/notifications/__tests__/formatter.test.js.map +1 -1
  340. package/dist/notifications/__tests__/template-engine.test.js +8 -0
  341. package/dist/notifications/__tests__/template-engine.test.js.map +1 -1
  342. package/dist/notifications/formatter.js +1 -1
  343. package/dist/notifications/formatter.js.map +1 -1
  344. package/dist/notifications/template-engine.js +1 -1
  345. package/dist/notifications/template-engine.js.map +1 -1
  346. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js +0 -21
  347. package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -1
  348. package/dist/question/autopilot-wait.d.ts.map +1 -1
  349. package/dist/question/autopilot-wait.js +3 -3
  350. package/dist/question/autopilot-wait.js.map +1 -1
  351. package/dist/question/deep-interview.d.ts +1 -2
  352. package/dist/question/deep-interview.d.ts.map +1 -1
  353. package/dist/question/deep-interview.js +5 -5
  354. package/dist/question/deep-interview.js.map +1 -1
  355. package/dist/ralplan/__tests__/advisory-activation.test.d.ts +2 -0
  356. package/dist/ralplan/__tests__/advisory-activation.test.d.ts.map +1 -0
  357. package/dist/ralplan/__tests__/advisory-activation.test.js +700 -0
  358. package/dist/ralplan/__tests__/advisory-activation.test.js.map +1 -0
  359. package/dist/ralplan/__tests__/advisory-detached-transition.test.d.ts +2 -0
  360. package/dist/ralplan/__tests__/advisory-detached-transition.test.d.ts.map +1 -0
  361. package/dist/ralplan/__tests__/advisory-detached-transition.test.js +88 -0
  362. package/dist/ralplan/__tests__/advisory-detached-transition.test.js.map +1 -0
  363. package/dist/ralplan/__tests__/advisory.test.d.ts +2 -0
  364. package/dist/ralplan/__tests__/advisory.test.d.ts.map +1 -0
  365. package/dist/ralplan/__tests__/advisory.test.js +1087 -0
  366. package/dist/ralplan/__tests__/advisory.test.js.map +1 -0
  367. package/dist/ralplan/__tests__/runtime.test.js +380 -716
  368. package/dist/ralplan/__tests__/runtime.test.js.map +1 -1
  369. package/dist/ralplan/advisory-activation-verifier.d.ts +19 -0
  370. package/dist/ralplan/advisory-activation-verifier.d.ts.map +1 -0
  371. package/dist/ralplan/advisory-activation-verifier.js +77 -0
  372. package/dist/ralplan/advisory-activation-verifier.js.map +1 -0
  373. package/dist/ralplan/advisory-activation.d.ts +34 -0
  374. package/dist/ralplan/advisory-activation.d.ts.map +1 -0
  375. package/dist/ralplan/advisory-activation.js +205 -0
  376. package/dist/ralplan/advisory-activation.js.map +1 -0
  377. package/dist/ralplan/advisory-contract.d.ts +103 -0
  378. package/dist/ralplan/advisory-contract.d.ts.map +1 -0
  379. package/dist/ralplan/advisory-contract.js +83 -0
  380. package/dist/ralplan/advisory-contract.js.map +1 -0
  381. package/dist/ralplan/advisory-detached-transition.d.ts +11 -0
  382. package/dist/ralplan/advisory-detached-transition.d.ts.map +1 -0
  383. package/dist/ralplan/advisory-detached-transition.js +21 -0
  384. package/dist/ralplan/advisory-detached-transition.js.map +1 -0
  385. package/dist/ralplan/advisory-evidence.d.ts +91 -0
  386. package/dist/ralplan/advisory-evidence.d.ts.map +1 -0
  387. package/dist/ralplan/advisory-evidence.js +393 -0
  388. package/dist/ralplan/advisory-evidence.js.map +1 -0
  389. package/dist/ralplan/advisory-lifecycle-validation.d.ts +11 -0
  390. package/dist/ralplan/advisory-lifecycle-validation.d.ts.map +1 -0
  391. package/dist/ralplan/advisory-lifecycle-validation.js +72 -0
  392. package/dist/ralplan/advisory-lifecycle-validation.js.map +1 -0
  393. package/dist/ralplan/advisory-postconditions.d.ts +3 -0
  394. package/dist/ralplan/advisory-postconditions.d.ts.map +1 -0
  395. package/dist/ralplan/advisory-postconditions.js +33 -0
  396. package/dist/ralplan/advisory-postconditions.js.map +1 -0
  397. package/dist/ralplan/advisory-recovery-journal.d.ts +56 -0
  398. package/dist/ralplan/advisory-recovery-journal.d.ts.map +1 -0
  399. package/dist/ralplan/advisory-recovery-journal.js +136 -0
  400. package/dist/ralplan/advisory-recovery-journal.js.map +1 -0
  401. package/dist/ralplan/advisory-storage.d.ts +24 -0
  402. package/dist/ralplan/advisory-storage.d.ts.map +1 -0
  403. package/dist/ralplan/advisory-storage.js +106 -0
  404. package/dist/ralplan/advisory-storage.js.map +1 -0
  405. package/dist/ralplan/advisory.d.ts +99 -0
  406. package/dist/ralplan/advisory.d.ts.map +1 -0
  407. package/dist/ralplan/advisory.js +914 -0
  408. package/dist/ralplan/advisory.js.map +1 -0
  409. package/dist/ralplan/documented-leader-preflight.d.ts +8 -0
  410. package/dist/ralplan/documented-leader-preflight.d.ts.map +1 -1
  411. package/dist/ralplan/documented-leader-preflight.js +60 -2
  412. package/dist/ralplan/documented-leader-preflight.js.map +1 -1
  413. package/dist/ralplan/runtime-advisory-lifecycle.d.ts +74 -0
  414. package/dist/ralplan/runtime-advisory-lifecycle.d.ts.map +1 -0
  415. package/dist/ralplan/runtime-advisory-lifecycle.js +352 -0
  416. package/dist/ralplan/runtime-advisory-lifecycle.js.map +1 -0
  417. package/dist/ralplan/runtime-contract.d.ts +126 -0
  418. package/dist/ralplan/runtime-contract.d.ts.map +1 -0
  419. package/dist/ralplan/runtime-contract.js +2 -0
  420. package/dist/ralplan/runtime-contract.js.map +1 -0
  421. package/dist/ralplan/runtime.d.ts +6 -109
  422. package/dist/ralplan/runtime.d.ts.map +1 -1
  423. package/dist/ralplan/runtime.js +256 -51
  424. package/dist/ralplan/runtime.js.map +1 -1
  425. package/dist/runtime/bridge.d.ts.map +1 -1
  426. package/dist/runtime/bridge.js +45 -0
  427. package/dist/runtime/bridge.js.map +1 -1
  428. package/dist/scripts/__tests__/codex-native-hook.test.js +7361 -19497
  429. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  430. package/dist/scripts/__tests__/docs-site-contract.test.js +2 -2
  431. package/dist/scripts/__tests__/docs-site-contract.test.js.map +1 -1
  432. package/dist/scripts/__tests__/generated-artifact-drift.test.d.ts +2 -0
  433. package/dist/scripts/__tests__/generated-artifact-drift.test.d.ts.map +1 -0
  434. package/dist/scripts/__tests__/generated-artifact-drift.test.js +84 -0
  435. package/dist/scripts/__tests__/generated-artifact-drift.test.js.map +1 -0
  436. package/dist/scripts/__tests__/issue-3293-callsite-parity.test.js +13 -3
  437. package/dist/scripts/__tests__/issue-3293-callsite-parity.test.js.map +1 -1
  438. package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.js +32 -84
  439. package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.js.map +1 -1
  440. package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.js +69 -404
  441. package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.js.map +1 -1
  442. package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.js +107 -624
  443. package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.js.map +1 -1
  444. package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.js +3 -171
  445. package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.js.map +1 -1
  446. package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.d.ts +2 -0
  447. package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.d.ts.map +1 -0
  448. package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.js +63 -0
  449. package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.js.map +1 -0
  450. package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.d.ts +2 -0
  451. package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.d.ts.map +1 -0
  452. package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.js +65 -0
  453. package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.js.map +1 -0
  454. package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.d.ts +2 -0
  455. package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.d.ts.map +1 -0
  456. package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.js +189 -0
  457. package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.js.map +1 -0
  458. package/dist/scripts/__tests__/prompt-inventory.test.js +54 -1
  459. package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -1
  460. package/dist/scripts/__tests__/ralplan-advisory-hook.test.d.ts +2 -0
  461. package/dist/scripts/__tests__/ralplan-advisory-hook.test.d.ts.map +1 -0
  462. package/dist/scripts/__tests__/ralplan-advisory-hook.test.js +299 -0
  463. package/dist/scripts/__tests__/ralplan-advisory-hook.test.js.map +1 -0
  464. package/dist/scripts/__tests__/reasoning-artifact-contract.test.js +2 -2
  465. package/dist/scripts/__tests__/reasoning-artifact-contract.test.js.map +1 -1
  466. package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js +46 -77
  467. package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js.map +1 -1
  468. package/dist/scripts/__tests__/smoke-packed-install.test.js +121 -18
  469. package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
  470. package/dist/scripts/codex-native-hook.d.ts +21 -1
  471. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  472. package/dist/scripts/codex-native-hook.js +412 -993
  473. package/dist/scripts/codex-native-hook.js.map +1 -1
  474. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  475. package/dist/scripts/codex-native-pre-post.js +8 -20
  476. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  477. package/dist/scripts/notify-hook/auto-nudge.d.ts +2 -48
  478. package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
  479. package/dist/scripts/notify-hook/auto-nudge.js +1 -0
  480. package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
  481. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  482. package/dist/scripts/notify-hook/team-dispatch.js +8 -5
  483. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  484. package/dist/scripts/notify-hook/team-tmux-guard.d.ts +1 -1
  485. package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
  486. package/dist/scripts/notify-hook/team-tmux-guard.js +3 -2
  487. package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
  488. package/dist/scripts/notify-hook.d.ts.map +1 -1
  489. package/dist/scripts/notify-hook.js +2 -51
  490. package/dist/scripts/notify-hook.js.map +1 -1
  491. package/dist/scripts/prompt-inventory.d.ts +39 -0
  492. package/dist/scripts/prompt-inventory.d.ts.map +1 -1
  493. package/dist/scripts/prompt-inventory.js +108 -3
  494. package/dist/scripts/prompt-inventory.js.map +1 -1
  495. package/dist/scripts/run-compiled-ci.js +2 -0
  496. package/dist/scripts/run-compiled-ci.js.map +1 -1
  497. package/dist/scripts/run-test-files.js +1 -0
  498. package/dist/scripts/run-test-files.js.map +1 -1
  499. package/dist/scripts/smoke-packed-install.d.ts +21 -5
  500. package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
  501. package/dist/scripts/smoke-packed-install.js +158 -64
  502. package/dist/scripts/smoke-packed-install.js.map +1 -1
  503. package/dist/scripts/sync-prompt-guidance-fragments.js +62 -20
  504. package/dist/scripts/sync-prompt-guidance-fragments.js.map +1 -1
  505. package/dist/scripts/tmux-hook-engine.d.ts +1 -1
  506. package/dist/scripts/tmux-hook-engine.d.ts.map +1 -1
  507. package/dist/scripts/tmux-hook-engine.js +3 -3
  508. package/dist/scripts/tmux-hook-engine.js.map +1 -1
  509. package/dist/scripts/verify-capabilities-lock.d.ts +3 -0
  510. package/dist/scripts/verify-capabilities-lock.d.ts.map +1 -0
  511. package/dist/scripts/verify-capabilities-lock.js +22 -0
  512. package/dist/scripts/verify-capabilities-lock.js.map +1 -0
  513. package/dist/state/__tests__/authority-decreasing.test.d.ts +2 -0
  514. package/dist/state/__tests__/authority-decreasing.test.d.ts.map +1 -0
  515. package/dist/state/__tests__/authority-decreasing.test.js +78 -0
  516. package/dist/state/__tests__/authority-decreasing.test.js.map +1 -0
  517. package/dist/state/__tests__/handoff-carrier.test.d.ts +2 -0
  518. package/dist/state/__tests__/handoff-carrier.test.d.ts.map +1 -0
  519. package/dist/state/__tests__/handoff-carrier.test.js +96 -0
  520. package/dist/state/__tests__/handoff-carrier.test.js.map +1 -0
  521. package/dist/state/__tests__/mode-binding-lease.test.d.ts +2 -0
  522. package/dist/state/__tests__/mode-binding-lease.test.d.ts.map +1 -0
  523. package/dist/state/__tests__/mode-binding-lease.test.js +498 -0
  524. package/dist/state/__tests__/mode-binding-lease.test.js.map +1 -0
  525. package/dist/state/__tests__/operations.test.js +340 -1596
  526. package/dist/state/__tests__/operations.test.js.map +1 -1
  527. package/dist/state/__tests__/pinned-atomic-file.test.d.ts +2 -0
  528. package/dist/state/__tests__/pinned-atomic-file.test.d.ts.map +1 -0
  529. package/dist/state/__tests__/pinned-atomic-file.test.js +438 -0
  530. package/dist/state/__tests__/pinned-atomic-file.test.js.map +1 -0
  531. package/dist/state/__tests__/single-writer-invariant.test.d.ts +2 -0
  532. package/dist/state/__tests__/single-writer-invariant.test.d.ts.map +1 -0
  533. package/dist/state/__tests__/single-writer-invariant.test.js +342 -0
  534. package/dist/state/__tests__/single-writer-invariant.test.js.map +1 -0
  535. package/dist/state/__tests__/skill-active-exact-session-transaction.test.d.ts +2 -0
  536. package/dist/state/__tests__/skill-active-exact-session-transaction.test.d.ts.map +1 -0
  537. package/dist/state/__tests__/skill-active-exact-session-transaction.test.js +179 -0
  538. package/dist/state/__tests__/skill-active-exact-session-transaction.test.js.map +1 -0
  539. package/dist/state/__tests__/skill-active.test.js +29 -1
  540. package/dist/state/__tests__/skill-active.test.js.map +1 -1
  541. package/dist/state/__tests__/stale-state-neutralization.test.d.ts +2 -0
  542. package/dist/state/__tests__/stale-state-neutralization.test.d.ts.map +1 -0
  543. package/dist/state/__tests__/stale-state-neutralization.test.js +84 -0
  544. package/dist/state/__tests__/stale-state-neutralization.test.js.map +1 -0
  545. package/dist/state/__tests__/workflow-transition.test.js +20 -33
  546. package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
  547. package/dist/state/handoff-carrier.d.ts +46 -0
  548. package/dist/state/handoff-carrier.d.ts.map +1 -0
  549. package/dist/state/handoff-carrier.js +85 -0
  550. package/dist/state/handoff-carrier.js.map +1 -0
  551. package/dist/state/mode-binding-lease-helper.d.ts +2 -0
  552. package/dist/state/mode-binding-lease-helper.d.ts.map +1 -0
  553. package/dist/state/mode-binding-lease-helper.js +623 -0
  554. package/dist/state/mode-binding-lease-helper.js.map +1 -0
  555. package/dist/state/mode-binding-lease.d.ts +25 -0
  556. package/dist/state/mode-binding-lease.d.ts.map +1 -0
  557. package/dist/state/mode-binding-lease.js +380 -0
  558. package/dist/state/mode-binding-lease.js.map +1 -0
  559. package/dist/state/namespace-owners.d.ts +34 -0
  560. package/dist/state/namespace-owners.d.ts.map +1 -0
  561. package/dist/state/namespace-owners.js +127 -0
  562. package/dist/state/namespace-owners.js.map +1 -0
  563. package/dist/state/operations.d.ts +34 -4
  564. package/dist/state/operations.d.ts.map +1 -1
  565. package/dist/state/operations.js +274 -338
  566. package/dist/state/operations.js.map +1 -1
  567. package/dist/state/pinned-atomic-file-darwin-client.d.ts +34 -0
  568. package/dist/state/pinned-atomic-file-darwin-client.d.ts.map +1 -0
  569. package/dist/state/pinned-atomic-file-darwin-client.js +174 -0
  570. package/dist/state/pinned-atomic-file-darwin-client.js.map +1 -0
  571. package/dist/state/pinned-atomic-file-darwin-helper.d.ts +2 -0
  572. package/dist/state/pinned-atomic-file-darwin-helper.d.ts.map +1 -0
  573. package/dist/state/pinned-atomic-file-darwin-helper.js +275 -0
  574. package/dist/state/pinned-atomic-file-darwin-helper.js.map +1 -0
  575. package/dist/state/pinned-atomic-file-darwin-janitor.d.ts +2 -0
  576. package/dist/state/pinned-atomic-file-darwin-janitor.d.ts.map +1 -0
  577. package/dist/state/pinned-atomic-file-darwin-janitor.js +272 -0
  578. package/dist/state/pinned-atomic-file-darwin-janitor.js.map +1 -0
  579. package/dist/state/pinned-atomic-file.d.ts +29 -0
  580. package/dist/state/pinned-atomic-file.d.ts.map +1 -0
  581. package/dist/state/pinned-atomic-file.js +536 -0
  582. package/dist/state/pinned-atomic-file.js.map +1 -0
  583. package/dist/state/process-identity.d.ts +30 -0
  584. package/dist/state/process-identity.d.ts.map +1 -0
  585. package/dist/state/process-identity.js +99 -0
  586. package/dist/state/process-identity.js.map +1 -0
  587. package/dist/state/skill-active.d.ts +18 -1
  588. package/dist/state/skill-active.d.ts.map +1 -1
  589. package/dist/state/skill-active.js +83 -13
  590. package/dist/state/skill-active.js.map +1 -1
  591. package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
  592. package/dist/state/workflow-transition-reconcile.js +5 -31
  593. package/dist/state/workflow-transition-reconcile.js.map +1 -1
  594. package/dist/state/workflow-transition.d.ts +1 -27
  595. package/dist/state/workflow-transition.d.ts.map +1 -1
  596. package/dist/state/workflow-transition.js +6 -789
  597. package/dist/state/workflow-transition.js.map +1 -1
  598. package/dist/team/__tests__/api-interop.test.js +1 -0
  599. package/dist/team/__tests__/api-interop.test.js.map +1 -1
  600. package/dist/team/__tests__/scaling.test.js +47 -8
  601. package/dist/team/__tests__/scaling.test.js.map +1 -1
  602. package/dist/team/__tests__/team-ops-contract.test.js +1 -0
  603. package/dist/team/__tests__/team-ops-contract.test.js.map +1 -1
  604. package/dist/team/__tests__/tmux-session.test.js +321 -15
  605. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  606. package/dist/team/__tests__/tmux-source-authority-realtmux.test.js +11 -1
  607. package/dist/team/__tests__/tmux-source-authority-realtmux.test.js.map +1 -1
  608. package/dist/team/__tests__/worker-bootstrap.test.js +11 -13
  609. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  610. package/dist/team/__tests__/worker-provenance.test.d.ts +2 -0
  611. package/dist/team/__tests__/worker-provenance.test.d.ts.map +1 -0
  612. package/dist/team/__tests__/worker-provenance.test.js +251 -0
  613. package/dist/team/__tests__/worker-provenance.test.js.map +1 -0
  614. package/dist/team/api-interop.d.ts.map +1 -1
  615. package/dist/team/api-interop.js +14 -8
  616. package/dist/team/api-interop.js.map +1 -1
  617. package/dist/team/mcp-comm.d.ts.map +1 -1
  618. package/dist/team/mcp-comm.js +3 -8
  619. package/dist/team/mcp-comm.js.map +1 -1
  620. package/dist/team/scaling.js +1 -1
  621. package/dist/team/scaling.js.map +1 -1
  622. package/dist/team/state.d.ts +1 -0
  623. package/dist/team/state.d.ts.map +1 -1
  624. package/dist/team/state.js +11 -1
  625. package/dist/team/state.js.map +1 -1
  626. package/dist/team/team-ops.d.ts +1 -0
  627. package/dist/team/team-ops.d.ts.map +1 -1
  628. package/dist/team/team-ops.js +1 -0
  629. package/dist/team/team-ops.js.map +1 -1
  630. package/dist/team/tmux-session.d.ts +2 -0
  631. package/dist/team/tmux-session.d.ts.map +1 -1
  632. package/dist/team/tmux-session.js +73 -35
  633. package/dist/team/tmux-session.js.map +1 -1
  634. package/dist/team/ultragoal-context.d.ts +1 -0
  635. package/dist/team/ultragoal-context.d.ts.map +1 -1
  636. package/dist/team/ultragoal-context.js +2 -0
  637. package/dist/team/ultragoal-context.js.map +1 -1
  638. package/dist/team/worker-provenance.d.ts +35 -0
  639. package/dist/team/worker-provenance.d.ts.map +1 -0
  640. package/dist/team/worker-provenance.js +213 -0
  641. package/dist/team/worker-provenance.js.map +1 -0
  642. package/dist/ultragoal/__tests__/artifacts.test.js +103 -0
  643. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  644. package/dist/ultragoal/__tests__/docs-contract.test.js +88 -59
  645. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  646. package/dist/ultragoal/artifacts.d.ts +1 -0
  647. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  648. package/dist/ultragoal/artifacts.js +35 -5
  649. package/dist/ultragoal/artifacts.js.map +1 -1
  650. package/dist/url-reader/__tests__/url-reader.test.js +14 -0
  651. package/dist/url-reader/__tests__/url-reader.test.js.map +1 -1
  652. package/dist/url-reader/index.js +5 -3
  653. package/dist/url-reader/index.js.map +1 -1
  654. package/dist/utils/__tests__/file-durability.test.js +20 -0
  655. package/dist/utils/__tests__/file-durability.test.js.map +1 -1
  656. package/dist/utils/__tests__/version.test.js +17 -0
  657. package/dist/utils/__tests__/version.test.js.map +1 -1
  658. package/dist/utils/file-durability.d.ts +1 -1
  659. package/dist/utils/file-durability.d.ts.map +1 -1
  660. package/dist/utils/file-durability.js.map +1 -1
  661. package/dist/utils/version.d.ts.map +1 -1
  662. package/dist/utils/version.js +2 -1
  663. package/dist/utils/version.js.map +1 -1
  664. package/dist/verification/__tests__/ci-rust-gates.test.js +12 -4
  665. package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
  666. package/dist/verification/__tests__/ci-trusted-publish.test.d.ts +2 -0
  667. package/dist/verification/__tests__/ci-trusted-publish.test.d.ts.map +1 -0
  668. package/dist/verification/__tests__/ci-trusted-publish.test.js +205 -0
  669. package/dist/verification/__tests__/ci-trusted-publish.test.js.map +1 -0
  670. package/dist/verification/__tests__/explore-harness-release-workflow.test.js +10 -5
  671. package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
  672. package/dist/verification/__tests__/publish-npm-manual-retired.test.d.ts +2 -0
  673. package/dist/verification/__tests__/publish-npm-manual-retired.test.d.ts.map +1 -0
  674. package/dist/verification/__tests__/publish-npm-manual-retired.test.js +22 -0
  675. package/dist/verification/__tests__/publish-npm-manual-retired.test.js.map +1 -0
  676. package/package.json +6 -3
  677. package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
  678. package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +60 -135
  679. package/plugins/oh-my-codex/skills/analyze/SKILL.md +35 -111
  680. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +69 -168
  681. package/plugins/oh-my-codex/skills/cancel/SKILL.md +33 -337
  682. package/plugins/oh-my-codex/skills/code-review/SKILL.md +66 -256
  683. package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +30 -216
  684. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +11 -10
  685. package/plugins/oh-my-codex/skills/design/SKILL.md +32 -132
  686. package/plugins/oh-my-codex/skills/doctor/SKILL.md +56 -177
  687. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +35 -116
  688. package/plugins/oh-my-codex/skills/plan/SKILL.md +45 -228
  689. package/plugins/oh-my-codex/skills/ralplan/SKILL.md +26 -17
  690. package/plugins/oh-my-codex/skills/skill/SKILL.md +82 -807
  691. package/plugins/oh-my-codex/skills/team/SKILL.md +34 -520
  692. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +47 -151
  693. package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +75 -252
  694. package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +33 -111
  695. package/plugins/oh-my-codex/skills/worker/SKILL.md +40 -113
  696. package/prompts/analyst.md +27 -107
  697. package/prompts/api-reviewer.md +17 -84
  698. package/prompts/architect.md +31 -70
  699. package/prompts/code-reviewer.md +18 -107
  700. package/prompts/code-simplifier.md +32 -110
  701. package/prompts/critic.md +32 -54
  702. package/prompts/dependency-expert.md +37 -107
  703. package/prompts/designer.md +40 -107
  704. package/prompts/executor.md +26 -75
  705. package/prompts/information-architect.md +51 -200
  706. package/prompts/performance-reviewer.md +17 -81
  707. package/prompts/planner.md +33 -76
  708. package/prompts/product-analyst.md +65 -280
  709. package/prompts/product-manager.md +48 -216
  710. package/prompts/qa-tester.md +33 -104
  711. package/prompts/quality-reviewer.md +17 -93
  712. package/prompts/quality-strategist.md +31 -255
  713. package/prompts/researcher.md +32 -89
  714. package/prompts/security-reviewer.md +12 -98
  715. package/prompts/test-engineer.md +29 -110
  716. package/prompts/ux-researcher.md +46 -300
  717. package/prompts/verifier.md +23 -51
  718. package/skills/ai-slop-cleaner/SKILL.md +60 -135
  719. package/skills/analyze/SKILL.md +35 -111
  720. package/skills/autopilot/SKILL.md +69 -168
  721. package/skills/autoresearch-goal/SKILL.md +6 -31
  722. package/skills/cancel/SKILL.md +33 -337
  723. package/skills/code-review/SKILL.md +66 -256
  724. package/skills/configure-notifications/SKILL.md +30 -216
  725. package/skills/deep-interview/SKILL.md +11 -10
  726. package/skills/design/SKILL.md +32 -132
  727. package/skills/doctor/SKILL.md +56 -177
  728. package/skills/omx-setup/SKILL.md +35 -116
  729. package/skills/pipeline/SKILL.md +6 -89
  730. package/skills/plan/SKILL.md +45 -228
  731. package/skills/ralph/SKILL.md +6 -290
  732. package/skills/ralplan/SKILL.md +26 -17
  733. package/skills/skill/SKILL.md +82 -807
  734. package/skills/team/SKILL.md +34 -520
  735. package/skills/ultragoal/SKILL.md +47 -151
  736. package/skills/ultraqa/SKILL.md +75 -252
  737. package/skills/ultrawork/SKILL.md +6 -182
  738. package/skills/visual-ralph/SKILL.md +33 -111
  739. package/skills/worker/SKILL.md +40 -113
  740. package/src/scripts/__tests__/codex-native-hook.test.ts +17518 -32980
  741. package/src/scripts/__tests__/docs-site-contract.test.ts +2 -2
  742. package/src/scripts/__tests__/generated-artifact-drift.test.ts +97 -0
  743. package/src/scripts/__tests__/issue-3293-callsite-parity.test.ts +12 -2
  744. package/src/scripts/__tests__/issue-3293-hook-owned-cancel.test.ts +32 -33
  745. package/src/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.ts +67 -481
  746. package/src/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.ts +115 -615
  747. package/src/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.ts +0 -168
  748. package/src/scripts/__tests__/issue-3481-conductor-deadlock.test.ts +77 -0
  749. package/src/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.ts +95 -0
  750. package/src/scripts/__tests__/issue-3536-external-team-state-root.test.ts +216 -0
  751. package/src/scripts/__tests__/prompt-inventory.test.ts +62 -1
  752. package/src/scripts/__tests__/ralplan-advisory-hook.test.ts +320 -0
  753. package/src/scripts/__tests__/reasoning-artifact-contract.test.ts +1 -2
  754. package/src/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.ts +49 -78
  755. package/src/scripts/__tests__/smoke-packed-install.test.ts +141 -19
  756. package/src/scripts/codex-native-hook.ts +436 -1154
  757. package/src/scripts/codex-native-pre-post.ts +17 -22
  758. package/src/scripts/notify-hook/auto-nudge.ts +1 -0
  759. package/src/scripts/notify-hook/team-dispatch.ts +8 -5
  760. package/src/scripts/notify-hook/team-tmux-guard.ts +3 -1
  761. package/src/scripts/notify-hook.ts +2 -51
  762. package/src/scripts/prompt-inventory.ts +142 -3
  763. package/src/scripts/run-compiled-ci.ts +2 -0
  764. package/src/scripts/run-test-files.ts +1 -0
  765. package/src/scripts/smoke-packed-install.ts +176 -77
  766. package/src/scripts/sync-prompt-guidance-fragments.ts +59 -22
  767. package/src/scripts/tmux-hook-engine.ts +3 -3
  768. package/src/scripts/verify-capabilities-lock.ts +23 -0
  769. package/templates/AGENTS.md +45 -10
  770. package/templates/catalog-manifest.json +6 -146
  771. package/dist/autopilot/__tests__/deep-interview-gate.test.d.ts +0 -2
  772. package/dist/autopilot/__tests__/deep-interview-gate.test.d.ts.map +0 -1
  773. package/dist/autopilot/__tests__/deep-interview-gate.test.js +0 -215
  774. package/dist/autopilot/__tests__/deep-interview-gate.test.js.map +0 -1
  775. package/dist/autopilot/__tests__/ralplan-gate.test.d.ts +0 -2
  776. package/dist/autopilot/__tests__/ralplan-gate.test.d.ts.map +0 -1
  777. package/dist/autopilot/__tests__/ralplan-gate.test.js +0 -114
  778. package/dist/autopilot/__tests__/ralplan-gate.test.js.map +0 -1
  779. package/dist/autopilot/deep-interview-gate.d.ts +0 -18
  780. package/dist/autopilot/deep-interview-gate.d.ts.map +0 -1
  781. package/dist/autopilot/deep-interview-gate.js +0 -396
  782. package/dist/autopilot/deep-interview-gate.js.map +0 -1
  783. package/dist/autopilot/ralplan-gate.d.ts +0 -18
  784. package/dist/autopilot/ralplan-gate.d.ts.map +0 -1
  785. package/dist/autopilot/ralplan-gate.js +0 -149
  786. package/dist/autopilot/ralplan-gate.js.map +0 -1
  787. package/dist/hooks/__tests__/prometheus-strict-contract.test.d.ts +0 -2
  788. package/dist/hooks/__tests__/prometheus-strict-contract.test.d.ts.map +0 -1
  789. package/dist/hooks/__tests__/prometheus-strict-contract.test.js +0 -320
  790. package/dist/hooks/__tests__/prometheus-strict-contract.test.js.map +0 -1
  791. package/dist/pipeline/__tests__/orchestrator.test.d.ts +0 -2
  792. package/dist/pipeline/__tests__/orchestrator.test.d.ts.map +0 -1
  793. package/dist/pipeline/__tests__/orchestrator.test.js +0 -892
  794. package/dist/pipeline/__tests__/orchestrator.test.js.map +0 -1
  795. package/dist/pipeline/__tests__/stages.test.d.ts +0 -2
  796. package/dist/pipeline/__tests__/stages.test.d.ts.map +0 -1
  797. package/dist/pipeline/__tests__/stages.test.js +0 -1695
  798. package/dist/pipeline/__tests__/stages.test.js.map +0 -1
  799. package/dist/pipeline/index.d.ts +0 -25
  800. package/dist/pipeline/index.d.ts.map +0 -1
  801. package/dist/pipeline/index.js +0 -17
  802. package/dist/pipeline/index.js.map +0 -1
  803. package/dist/pipeline/orchestrator.d.ts +0 -52
  804. package/dist/pipeline/orchestrator.d.ts.map +0 -1
  805. package/dist/pipeline/orchestrator.js +0 -505
  806. package/dist/pipeline/orchestrator.js.map +0 -1
  807. package/dist/pipeline/review-verdict.d.ts +0 -3
  808. package/dist/pipeline/review-verdict.d.ts.map +0 -1
  809. package/dist/pipeline/review-verdict.js +0 -14
  810. package/dist/pipeline/review-verdict.js.map +0 -1
  811. package/dist/pipeline/stages/code-review.d.ts +0 -35
  812. package/dist/pipeline/stages/code-review.d.ts.map +0 -1
  813. package/dist/pipeline/stages/code-review.js +0 -55
  814. package/dist/pipeline/stages/code-review.js.map +0 -1
  815. package/dist/pipeline/stages/deep-interview.d.ts +0 -15
  816. package/dist/pipeline/stages/deep-interview.d.ts.map +0 -1
  817. package/dist/pipeline/stages/deep-interview.js +0 -32
  818. package/dist/pipeline/stages/deep-interview.js.map +0 -1
  819. package/dist/pipeline/stages/ralph-verify.d.ts +0 -53
  820. package/dist/pipeline/stages/ralph-verify.d.ts.map +0 -1
  821. package/dist/pipeline/stages/ralph-verify.js +0 -89
  822. package/dist/pipeline/stages/ralph-verify.js.map +0 -1
  823. package/dist/pipeline/stages/ralplan.d.ts +0 -27
  824. package/dist/pipeline/stages/ralplan.d.ts.map +0 -1
  825. package/dist/pipeline/stages/ralplan.js +0 -180
  826. package/dist/pipeline/stages/ralplan.js.map +0 -1
  827. package/dist/pipeline/stages/team-exec.d.ts +0 -52
  828. package/dist/pipeline/stages/team-exec.d.ts.map +0 -1
  829. package/dist/pipeline/stages/team-exec.js +0 -266
  830. package/dist/pipeline/stages/team-exec.js.map +0 -1
  831. package/dist/pipeline/stages/ultragoal.d.ts +0 -23
  832. package/dist/pipeline/stages/ultragoal.d.ts.map +0 -1
  833. package/dist/pipeline/stages/ultragoal.js +0 -53
  834. package/dist/pipeline/stages/ultragoal.js.map +0 -1
  835. package/dist/pipeline/stages/ultraqa.d.ts +0 -33
  836. package/dist/pipeline/stages/ultraqa.d.ts.map +0 -1
  837. package/dist/pipeline/stages/ultraqa.js +0 -49
  838. package/dist/pipeline/stages/ultraqa.js.map +0 -1
  839. package/dist/pipeline/types.d.ts +0 -124
  840. package/dist/pipeline/types.d.ts.map +0 -1
  841. package/dist/pipeline/types.js +0 -8
  842. package/dist/pipeline/types.js.map +0 -1
  843. package/dist/ralplan/__tests__/consensus-gate.test.d.ts +0 -2
  844. package/dist/ralplan/__tests__/consensus-gate.test.d.ts.map +0 -1
  845. package/dist/ralplan/__tests__/consensus-gate.test.js +0 -88
  846. package/dist/ralplan/__tests__/consensus-gate.test.js.map +0 -1
  847. package/dist/ralplan/consensus-gate.d.ts +0 -70
  848. package/dist/ralplan/consensus-gate.d.ts.map +0 -1
  849. package/dist/ralplan/consensus-gate.js +0 -496
  850. package/dist/ralplan/consensus-gate.js.map +0 -1
  851. package/dist/scripts/notify-hook/ralph-session-resume.d.ts +0 -25
  852. package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +0 -1
  853. package/dist/scripts/notify-hook/ralph-session-resume.js +0 -377
  854. package/dist/scripts/notify-hook/ralph-session-resume.js.map +0 -1
  855. package/dist/state/__tests__/planning-gate.test.d.ts +0 -2
  856. package/dist/state/__tests__/planning-gate.test.d.ts.map +0 -1
  857. package/dist/state/__tests__/planning-gate.test.js +0 -629
  858. package/dist/state/__tests__/planning-gate.test.js.map +0 -1
  859. package/plugins/oh-my-codex/skills/autoresearch-goal/SKILL.md +0 -39
  860. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +0 -97
  861. package/plugins/oh-my-codex/skills/prometheus-strict/README.md +0 -35
  862. package/plugins/oh-my-codex/skills/prometheus-strict/SKILL.md +0 -219
  863. package/plugins/oh-my-codex/skills/ralph/SKILL.md +0 -298
  864. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +0 -190
  865. package/plugins/oh-my-codex/skills/ultrawork/references/agent-tiers.md +0 -62
  866. package/prompts/prometheus-strict-metis.md +0 -274
  867. package/prompts/prometheus-strict-momus.md +0 -82
  868. package/prompts/prometheus-strict-oracle.md +0 -107
  869. package/prompts/scholastic.md +0 -11
  870. package/prompts/sisyphus-lite.md +0 -111
  871. package/skills/ask-claude/SKILL.md +0 -12
  872. package/skills/ask-gemini/SKILL.md +0 -12
  873. package/skills/build-fix/SKILL.md +0 -10
  874. package/skills/deepsearch/SKILL.md +0 -10
  875. package/skills/ecomode/SKILL.md +0 -114
  876. package/skills/ecomode/references/agent-tiers.md +0 -61
  877. package/skills/frontend-ui-ux/SKILL.md +0 -16
  878. package/skills/help/SKILL.md +0 -10
  879. package/skills/note/SKILL.md +0 -10
  880. package/skills/prometheus-strict/README.md +0 -35
  881. package/skills/prometheus-strict/SKILL.md +0 -219
  882. package/skills/ralph-init/SKILL.md +0 -10
  883. package/skills/review/SKILL.md +0 -10
  884. package/skills/security-review/SKILL.md +0 -10
  885. package/skills/swarm/SKILL.md +0 -12
  886. package/skills/tdd/SKILL.md +0 -104
  887. package/skills/trace/SKILL.md +0 -10
  888. package/skills/visual-verdict/SKILL.md +0 -10
  889. package/skills/web-clone/SKILL.md +0 -357
  890. package/src/scripts/notify-hook/ralph-session-resume.ts +0 -466
@@ -5,177 +5,73 @@ description: Create and execute durable repo-native multi-goal plans over Codex
5
5
 
6
6
  # Ultragoal Workflow
7
7
 
8
- Use when the user asks for `ultragoal`, `create-goals`, `complete-goals`, durable multi-goal planning, or sequential execution over Codex `/goal`.
8
+ ## When to use
9
9
 
10
- ## Purpose
10
+ Use for `ultragoal`, `create-goals`, `complete-goals`, durable multi-goal planning, or sequential execution over Codex `/goal`. Read `AGENTS.md#durable-runtime-invariants-canonical-ssot` for state ownership and goal-tool boundaries.
11
11
 
12
- `ultragoal` turns a brief into repo-native artifacts and then drives a Codex goal safely through goal tools. New plans default to a stable pointer-style aggregate Codex goal for the whole durable plan in `.omx/ultragoal/goals.json`, including later accepted/appended stories under the original brief constraints, while OMX tracks G001/G002 story progress in the ledger. Ultragoal does not call Codex `/goal clear`; before multiple sequential ultragoal runs in one Codex session/thread, manually run `/goal clear` in the Codex UI so the previous completed aggregate goal does not block or confuse the next `create_goal`.
12
+ ## Inputs and preconditions
13
13
 
14
- - `.omx/ultragoal/brief.md`
15
- - `.omx/ultragoal/goals.json`
16
- - `.omx/ultragoal/ledger.jsonl` (checkpoint and structured steering audit events)
14
+ - Durable artifacts are `.omx/ultragoal/brief.md`, `.omx/ultragoal/goals.json`, and `.omx/ultragoal/ledger.jsonl`.
15
+ - New plans use aggregate Codex goal mode by default: one stable pointer objective for the plan while OMX tracks individual stories. Use `--codex-goal-mode per-story` only when explicitly requested.
16
+ - Do not call `/goal clear` from shell or this skill. After a completed run, the operator may clear the interactive Codex goal in the Codex UI before another same-thread run.
17
17
 
18
- Existing aggregate plans with the legacy enumerated objective are migrated to the stable pointer objective on read, persisted to `goals.json`, retained in `codexObjectiveAliases` for already-active hidden Codex goal reconciliation, and audited with an `aggregate_objective_migrated` ledger entry.
18
+ ## Operational steps: create
19
19
 
20
-
21
- ## State/HUD Phase Contract
22
-
23
- Ultragoal is both a tracked workflow skill and the Autopilot durable-implementation child phase. Keep the phase/HUD contract explicit at workflow boundaries:
24
-
25
- - **Standalone `$ultragoal` activation**: ensure `.omx/state[/sessions/<session>]/ultragoal-state.json` exists with `mode:"ultragoal"`, `active:true`, and a non-empty `current_phase` such as `planning` before or while goals are created. This state is a lightweight HUD/runtime declaration; `.omx/ultragoal/goals.json` and `ledger.jsonl` remain the durable goal source of truth.
26
- - **During execution**: update `current_phase` to the smallest accurate phase (`planning`, `executing`, `verifying`, `reviewing`, `checkpointing`, or `blocked`) when the visible workflow phase changes.
27
- - **Inside active Autopilot**: keep `mode:"autopilot"` active and set the supervised phase to `current_phase:"ultragoal"`; do not start a peer Autopilot replacement. Ultragoal's own mode state may still exist as child-phase detail, but Autopilot owns the parent phase.
28
- - **On handoff to code-review**: persist implementation/test/ledger evidence under Autopilot `handoff_artifacts.ultragoal`, then set Autopilot `current_phase:"code-review"`.
29
- - **On completion/blocker**: set standalone Ultragoal `active:false,current_phase:"complete"` only when all durable goals are complete; otherwise keep it active with a blocker/review-blocked phase and ledger evidence.
30
-
31
- Minimal standalone phase declaration:
32
-
33
- ```sh
34
- omx state write --input '{"mode":"ultragoal","active":true,"current_phase":"planning"}' --json
35
- ```
36
-
37
- Minimal Autopilot child-phase declaration:
38
-
39
- ```sh
40
- omx state write --input '{"mode":"autopilot","active":true,"current_phase":"ultragoal"}' --json
20
+ Run one command, then inspect the generated plan:
21
+ ```bash
22
+ omx ultragoal create-goals --brief "<brief>"
23
+ omx ultragoal create-goals --brief-file <path>
24
+ cat <brief> | omx ultragoal create-goals --from-stdin
25
+ omx ultragoal create-goals --codex-goal-mode per-story --brief "<brief>"
41
26
  ```
27
+ If refinement is needed, use explicit supported steering rather than editing durable artifacts by hand.
42
28
 
43
- ## Create goals
44
-
45
- 1. Run one of:
46
- - `omx ultragoal create-goals --brief "<brief>"`
47
- - `omx ultragoal create-goals --brief-file <path>`
48
- - `cat <brief> | omx ultragoal create-goals --from-stdin`
49
- - `omx ultragoal create-goals --codex-goal-mode per-story --brief "<brief>"` only when one Codex goal context per story is explicitly preferred
50
- 2. Inspect `.omx/ultragoal/goals.json` and refine if needed.
51
-
52
- ## Complete goals
53
-
54
- Loop until `omx ultragoal status` reports all goals complete:
29
+ ## Operational steps: execute
55
30
 
56
- 1. Run `omx ultragoal complete-goals`.
57
- 2. Read the printed handoff.
58
- 3. Call `get_goal`.
59
- 4. If no active Codex goal exists, call `create_goal` with the printed payload. In aggregate mode, if the same aggregate Codex objective is already active, continue the current OMX story without creating a new Codex goal.
60
- 5. Complete the current OMX story only.
61
- 6. Run a completion audit against the story objective and real artifacts/tests.
62
- 7. In aggregate mode, do **not** call `update_goal` for intermediate stories; checkpoint with a fresh `get_goal` snapshot whose aggregate objective is still `active`. On the final story only, first run the mandatory final cleanup/review gate below; call `update_goal({status: "complete"})` only after that gate is clean, then call `get_goal` again for a fresh `complete` snapshot.
63
- 8. Checkpoint the durable ledger with that snapshot. Intermediate aggregate checkpoints use only `--codex-goal-json`; final clean checkpoints also require `--quality-gate-json`:
64
- `omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<evidence>" --codex-goal-json <get_goal-json-or-path> [--quality-gate-json <quality-gate-json-or-path>]`
65
- 9. If blocked or failed, checkpoint failure:
66
- `omx ultragoal checkpoint --goal-id <id> --status failed --evidence "<blocker/evidence>"`
67
- 10. For non-terminal blockers, use blocked checkpoints:
68
- - legacy different completed goal: `omx ultragoal checkpoint --goal-id <id> --status blocked --evidence "<completed legacy Codex goal blocks create_goal in this thread>" --codex-goal-json <get_goal-json-or-path>`
69
- - matching native Codex `blocked` status: `omx ultragoal checkpoint --goal-id <id> --status blocked --evidence "<blocker evidence>" --codex-goal-json <matching-blocked-get_goal-json-or-path>`
70
- 11. Resume failed goals with `omx ultragoal complete-goals --retry-failed`.
31
+ Repeat until `omx ultragoal status` reports all goals complete:
71
32
 
72
- ## Dynamic steering
73
-
74
- Use `omx ultragoal steer` when real findings or blockers prove the current story decomposition should change while the aggregate objective and constraints stay fixed. Steering is explicit-only and evidence-backed; broad natural-language requests are rejected instead of guessed.
75
-
76
- Allowed mutation kinds are:
77
-
78
- - `add_subgoal`
79
- - `split_subgoal`
80
- - `reorder_pending`
81
- - `revise_pending_wording`
82
- - `annotate_ledger`
83
- - `mark_blocked_superseded`
33
+ 1. Run `omx ultragoal complete-goals` and read its handoff.
34
+ 2. Call `get_goal`. Call `create_goal` with the printed payload only when no active Codex goal exists; otherwise continue the matching aggregate objective.
35
+ 3. Complete one OMX story and audit its objective against real artifacts and verification evidence.
36
+ 4. For intermediate aggregate stories, keep the Codex goal active and checkpoint:
37
+ ```bash
38
+ omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<evidence>" --codex-goal-json <fresh-get-goal-json-or-path>
39
+ ```
40
+ 5. For a blocked/failed story, use `--status blocked|failed` with evidence; resume failed work with `omx ultragoal complete-goals --retry-failed`.
41
+ 6. On the final story, complete the final gate below before `update_goal({status: "complete"})`; then call `get_goal` again and checkpoint the fresh complete snapshot.
84
42
 
85
- Examples:
43
+ ## Explicit steering
86
44
 
87
- ```sh
88
- omx ultragoal steer --kind add_subgoal --title "Investigate blocker" --objective "Validate the blocker and report evidence." --evidence "log/test output" --rationale "The blocker changes the safe execution order." --json
45
+ Use evidence-backed directives only when the decomposition must change:
46
+ ```bash
47
+ omx ultragoal steer --kind add_subgoal --title "<title>" --objective "<objective>" --evidence "<evidence>" --rationale "<reason>" --json
89
48
  omx ultragoal steer --directive-json ./steering.json --json
90
49
  ```
50
+ Supported kinds: `add_subgoal`, `split_subgoal`, `reorder_pending`, `revise_pending_wording`, `annotate_ledger`, and `mark_blocked_superseded`. Ordinary prose does not mutate the plan; repeated structured directives dedupe.
91
51
 
92
- Steering invariants:
52
+ ## Phase/HUD handoff
93
53
 
94
- - Do not edit the aggregate Codex objective, original brief constraints, quality gates, or completion status. The aggregate objective is a stable pointer to `.omx/ultragoal/goals.json` and `.omx/ultragoal/ledger.jsonl`, not an enumeration of initial goal ids.
95
- - Do not hard-delete goals, auto-complete work, weaken verification, or silently mutate `.omx/ultragoal`.
96
- - Accepted and rejected attempts append structured audit entries to `.omx/ultragoal/ledger.jsonl`.
97
- - Superseded goals remain in `goals.json` with steering metadata and are skipped for scheduling.
98
- - Blocked goals without replacements are skipped for scheduling but still block final completion until later explicit steering replaces or supersedes them.
99
-
100
- UserPromptSubmit uses the same steering API only for structured directives such as `OMX_ULTRAGOAL_STEER: { ... }`, `omx.ultragoal.steer: { ... }`, or `omx ultragoal steer: { ... }`. Normal prose does not mutate state, and repeated prompt-submit directives dedupe by prompt signature or idempotency key.
101
-
102
- ## Use Ultragoal and Team together
103
-
104
- Use ultragoal and team together for a durable Ultragoal story that benefits from parallel execution. Ultragoal remains leader-owned: `.omx/ultragoal/goals.json` stores the story plan and `.omx/ultragoal/ledger.jsonl` stores checkpoints. Team is the parallel execution engine and returns task/evidence status to the leader.
105
-
106
- The leader checkpoints Ultragoal from Team evidence with a fresh `get_goal` snapshot:
107
-
108
- ```sh
109
- omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<team evidence mentioning .omx/ultragoal and <id>>" --codex-goal-json <fresh-get_goal-json-or-path>
54
+ At standalone activation, declare the smallest accurate phase (`planning`, `executing`, `verifying`, `reviewing`, `checkpointing`, or `blocked`):
55
+ ```bash
56
+ omx state write --input '{"mode":"ultragoal","active":true,"current_phase":"planning"}' --json
110
57
  ```
58
+ Inside Autopilot, keep the parent mode active and set `current_phase:"ultragoal"`; persist Ultragoal evidence under `handoff_artifacts.ultragoal` before a code-review handoff. Mark standalone Ultragoal complete only when every durable goal is complete.
111
59
 
112
- Workers do not own ultragoal goal state, do not create worker ultragoal ledgers, and do not checkpoint Ultragoal. Team launch remains explicit; Ultragoal does not auto-launch Team and performs no hidden Codex goal mutation.
60
+ ## Optional Team bridge
113
61
 
114
- ## Mandatory final cleanup and review gate
62
+ For parallel story execution, use the separate Team command. The leader records the Ultragoal checkpoint with a fresh `get_goal` snapshot; see the Team skill for the bridge details.
115
63
 
116
- The final ultragoal story is not complete until the active agent has run the final quality gate:
64
+ ## Final gate and exit evidence
117
65
 
118
- 1. Run targeted verification for the story.
119
- 2. Run `ai-slop-cleaner` on changed files only; if there are no relevant edits, the cleaner still runs and records a passed/no-op report.
120
- 3. Rerun verification after the cleaner pass.
121
- 4. Run the architecture-invariant audit: derive non-negotiable architecture/domain invariants from the brief/spec/interview/accepted steering/goal artifacts, list the source artifacts, and prove each required invariant with implementation, test, and independent review evidence.
122
- 5. Run `$code-review` through the independent review path. Clean means `codeReview.recommendation: "APPROVE"`, `codeReview.architectStatus: "CLEAR"`, `codeReview.independentReview` contains distinct completed `code-reviewer` and `architect` subagent evidence, and `architectureInvariantGate.status: "passed"` proves every required invariant. `COMMENT`, `WATCH`, `REQUEST CHANGES`, `BLOCK`, missing subagent evidence, unavailable delegation, same-lane/self-review, and unproved architecture invariants are non-clean.
123
- 6. If review or invariant proof is non-clean, do **not** call `update_goal`. Record durable blocker work instead:
66
+ Before final completion:
124
67
 
125
-
126
- ```sh
127
- omx ultragoal record-review-blockers --goal-id <id> --title "Resolve final code-review blockers" --objective "<blocker-resolution objective>" --evidence "<review findings>" --codex-goal-json <active-get-goal-json-or-path>
68
+ 1. Run targeted story verification.
69
+ 2. Run `ai-slop-cleaner` on changed files, then rerun verification.
70
+ 3. Audit every architecture/domain invariant from the brief/spec/accepted steering against implementation, test, and review evidence.
71
+ 4. Run `$code-review` through independent `code-reviewer` and `architect` lanes. If review or invariant proof is not clean, do not update the Codex goal; record durable blockers:
72
+ ```bash
73
+ omx ultragoal record-review-blockers --goal-id <id> --title "Resolve final code-review blockers" --objective "<objective>" --evidence "<findings>" --codex-goal-json <active-get-goal-json-or-path>
128
74
  ```
75
+ 5. If clean, call `update_goal({status: "complete"})`, call `get_goal`, and checkpoint with `--quality-gate-json` containing cleaner, verification, review, and architecture-invariant evidence.
129
76
 
130
- This marks the current story `review_blocked`, appends a pending blocker-resolution story, keeps the Codex goal active, and lets `omx ultragoal complete-goals` start the blocker next. In legacy per-story mode, the blocker may need an available Codex goal context because the old per-story Codex goal remains active/incomplete.
131
-
132
- 7. If review and invariant proof are clean, call `update_goal({status: "complete"})`, call `get_goal`, and checkpoint with a structured final gate:
133
-
134
-
135
- ```sh
136
- omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<tests/files/review evidence>" --codex-goal-json <fresh-complete-get-goal-json-or-path> --quality-gate-json <quality-gate-json-or-path>
137
- ```
138
-
139
- `--quality-gate-json` must include:
140
-
141
- ```json
142
- {
143
- "aiSlopCleaner": { "status": "passed", "evidence": "cleaner report" },
144
- "verification": { "status": "passed", "commands": ["npm test"], "evidence": "post-cleaner verification" },
145
- "codeReview": {
146
- "recommendation": "APPROVE",
147
- "architectStatus": "CLEAR",
148
- "evidence": "final review synthesis",
149
- "independentReview": {
150
- "codeReviewer": { "agentRole": "code-reviewer", "evidence": "code-reviewer subagent APPROVE evidence" },
151
- "architect": { "agentRole": "architect", "evidence": "architect subagent CLEAR evidence" }
152
- }
153
- },
154
- "architectureInvariantGate": {
155
- "status": "passed",
156
- "sourceArtifacts": [".omx/ultragoal/brief.md", ".omx/ultragoal/goals.json"],
157
- "evidence": "final invariant audit proved all required architecture/domain invariants",
158
- "invariants": [
159
- {
160
- "invariant": "Preserve the existing parser boundary.",
161
- "source": ".omx/ultragoal/brief.md#architecture-invariants",
162
- "status": "proved",
163
- "implementationEvidence": "changed files preserve the parser boundary",
164
- "testEvidence": "parser-boundary regression passed",
165
- "reviewEvidence": "architect review confirmed the boundary is intact"
166
- }
167
- ]
168
- }
169
- }
170
- ```
171
-
172
- ## Constraints
173
-
174
- - The shell command cannot directly invoke Codex interactive `/goal`; it emits a model-facing handoff for the active Codex agent.
175
- - Ultragoal intentionally does not invoke `/goal clear` or hidden `thread/goal/clear`; the model-facing tool surface only provides `get_goal`, `create_goal`, and `update_goal`.
176
- - After a completed aggregate ultragoal run, `/goal clear` is the explicit terminal cleanup step before starting another goal in the same Codex thread/session: `create_goal` starts, `update_goal({status: "complete"})` marks terminal success, and `/goal clear` removes the completed thread goal for the next same-thread goal. OMX prints this next step but does not invoke hidden clear routes.
177
- - Never call `create_goal` when `get_goal` reports a different active goal.
178
- - Never call `update_goal` unless the aggregate run or legacy per-story goal is actually complete.
179
- - In aggregate mode, intermediate story checkpoints require a matching `active` Codex snapshot; final story completion requires a matching `complete` snapshot after `update_goal`.
180
- - Completion checkpoints require read-only Codex snapshot reconciliation: pass fresh `get_goal` JSON/path with `--codex-goal-json`; shell commands and hooks must not mutate Codex goal state.
181
- - Treat `ledger.jsonl` as the durable audit trail; checkpoint after every success or failure.
77
+ Report goal ids/statuses, ledger/checkpoint paths, fresh goal snapshot evidence, review verdicts, and any blocker. Never claim completion from OMX state alone.
@@ -3,261 +3,84 @@ name: ultraqa
3
3
  description: Adversarial dynamic e2e QA workflow - generate hostile scenarios, test, verify, fix, report, and clean up
4
4
  ---
5
5
 
6
- # UltraQA Skill
7
-
8
- ## Operating Contract
9
-
10
- - Use outcome-first framing with concise, evidence-dense progress and completion reporting.
11
- - Treat newer user updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints.
12
- - If the user says `continue`, advance the current verified next step instead of restarting discovery.
13
- - UltraQA is not satisfied by a shallow build/lint/typecheck/test checklist. It must exercise the requested behavior through adversarial dynamic e2e scenarios whenever the target can be run, simulated, or harnessed safely.
14
-
15
- [ULTRAQA ACTIVATED - ADVERSARIAL DYNAMIC E2E QA CYCLING]
16
-
17
- ## Overview
18
-
19
- UltraQA finds real behavior failures by combining normal verification commands with generated end-to-end scenarios, hostile user modeling, temporary harnesses when useful, and a structured evidence report. The workflow repeats test → diagnose → fix → retest until the goal is met, a bounded stop condition is reached, or a safety boundary blocks further execution.
20
-
21
- ## Goal Parsing
22
-
23
- Parse the goal from arguments. Supported formats:
24
-
25
- | Invocation | Goal Type | What to Check |
26
- |------------|-----------|---------------|
27
- | `/ultraqa --tests` | tests | Existing tests plus adversarial dynamic e2e scenarios for the changed behavior |
28
- | `/ultraqa --build` | build | Build succeeds and generated smoke/e2e probes still run against the built artifact when applicable |
29
- | `/ultraqa --lint` | lint | Lint passes and no generated harness/test artifact violates project hygiene |
30
- | `/ultraqa --typecheck` | typecheck | Typecheck passes and generated typed harnesses compile when applicable |
31
- | `/ultraqa --custom "pattern"` | custom | Custom success pattern is verified against behavior, not trusted as misleading success output |
32
- | `/ultraqa --interactive` | interactive | CLI/service behavior is tested with generated hostile and edge-case interactions |
33
-
34
- If no structured goal is provided, interpret the argument as a custom behavior goal and derive a runnable e2e strategy from repository context.
35
-
36
- ## Required Scenario Matrix
37
-
38
- Before declaring success, create and maintain a scenario matrix. Each row must include: scenario id, intent, user/attacker model, setup, command or harness, expected signal, actual result, fixes applied, evidence, and cleanup status.
39
-
40
- The matrix must include normal-path coverage plus adversarial dynamic e2e scenarios selected from the current goal and codebase. Unless clearly irrelevant or impossible, include these hostile and edge-case classes:
41
-
42
- 1. **Malformed input**: invalid JSON, missing fields, invalid flags, oversized strings, unusual Unicode, path traversal-like values, and corrupted state files.
43
- 2. **Repeated interruptions**: repeated `continue`, stop/cancel/abort wording, interrupted command output, and retries after partial progress.
44
- 3. **Prompt injection attempts**: user text that tries to override instructions, exfiltrate secrets, skip verification, delete state, or claim false success.
45
- 4. **Cancel/resume behavior**: active state cleanup, resume detection, stale in-progress state, and cancellation followed by a fresh run.
46
- 5. **Stale state**: old `.omx/state` files, mismatched sessions, missing timestamps, and contradictory phase metadata.
47
- 6. **Dirty worktree**: pre-existing modifications, untracked generated files, and verification that UltraQA does not hide or overwrite unrelated work.
48
- 7. **Hung or long-running commands**: bounded timeout handling, killed child processes, and recovery notes.
49
- 8. **Flaky tests**: rerun strategy, failure clustering, quarantine evidence, and avoiding false green from a single lucky pass.
50
- 9. **Misleading success output**: output containing success phrases with non-zero exits, hidden failures, skipped tests, or partial command logs.
51
-
52
- ## Dynamic E2E and Temporary Harness Rules
53
-
54
- - Generate temporary tests, scripts, fixtures, or harnesses when they materially improve behavioral confidence and no existing e2e surface covers the scenario.
55
- - Prefer project-native test tools and small throwaway harnesses under a temporary directory or clearly named test fixture.
56
- - Record every generated artifact in the scenario matrix, including whether it was committed intentionally or removed during cleanup.
57
- - Use bounded runtimes and explicit timeouts for commands that can hang.
58
- - Validate exit codes and output semantics; do not trust success-looking text alone.
59
- - Do not delete, rewrite, or mask unrelated user work. Capture dirty-worktree evidence before and after generated harness work.
60
-
61
- ### Temporary Harness Generation Guardrails
62
-
63
- Generated harnesses are part of the QA evidence chain; until setup succeeds, they are evidence about the harness apparatus, not product behavior.
64
-
65
- - **Use absolute repo imports for built artifacts.** When a harness runs from `/tmp` or another scratch directory but imports repository code, resolve the repository root explicitly from the verified repo cwd and import built modules with an absolute path or `pathToFileURL(join(repoRoot, "dist", ...)).href`. Never rely on `./dist/...` from the harness file's temporary directory.
66
- - **Use a safe file writer for JS/TS harness bodies.** Prefer a small Node/Python writer or another non-interpolating file-write mechanism for harness source that contains backticks, `${...}`, shell metacharacters, or prompt-injection strings. If a shell heredoc is unavoidable, quote the delimiter and verify the written file before execution; do not use interpolating heredocs for JavaScript assertions.
67
- - **Sanitize OMX runtime env for isolated probes.** When the scenario creates a temporary repo/state tree or intentionally checks local isolation, run the probe with `OMX_ROOT` and `OMX_STATE_ROOT` unset (for example `env -u OMX_ROOT -u OMX_STATE_ROOT ...`) so ambient boxed runtime state cannot redirect reads/writes away from the scenario fixture.
68
- - **Classify harness setup failures separately.** If a generated harness fails before exercising product behavior because of import paths, shell interpolation, environment leakage, or fixture construction, record it as harness debris, fix the harness, and rerun the scenario before declaring a product defect.
69
-
70
- ## Cycle Workflow
71
-
72
- ### Cycle N (Max 5)
73
-
74
- 1. **PLAN ADVERSARIAL QA**
75
- - Restate the goal, success criteria, safety bounds, and stop condition.
76
- - Inspect repository context enough to identify runnable surfaces, test commands, state files, and cleanup paths.
77
- - Build or update the required scenario matrix before running commands.
78
-
79
- 2. **RUN BASELINE VERIFICATION**
80
- - `--tests`: Run the project's test command.
81
- - `--build`: Run the project's build command.
82
- - `--lint`: Run the project's lint command.
83
- - `--typecheck`: Run the project's type check command.
84
- - `--custom`: Run the appropriate command and check the pattern plus exit status and failure markers.
85
- - `--interactive`: Use qa-tester or an equivalent CLI/service harness:
86
- ```
87
- Use `/prompts:qa-tester` with:
88
- Goal: [describe what to verify]
89
- Service: [how to start]
90
- Test cases: [normal, hostile, malformed, interruption, resume, stale-state, dirty-worktree, hung-command, flaky, and misleading-output scenarios]
91
- ```
92
-
93
- 3. **RUN ADVERSARIAL DYNAMIC E2E SCENARIOS**
94
- - Execute the scenario matrix using existing e2e tests, generated temporary tests, or generated harnesses.
95
- - Model malicious/hostile user behavior explicitly, including prompt injection and attempts to bypass safety or verification.
96
- - Exercise malformed input, repeated interruptions, cancel/resume, stale state, dirty worktree handling, hung commands, flaky tests, and misleading success output when relevant.
97
- - Capture commands, exit codes, important output excerpts, artifacts, and cleanup status.
98
-
99
- 4. **CHECK RESULT**
100
- - **YES** only if baseline verification and adversarial e2e scenarios passed, generated artifacts are cleaned up or intentionally tracked, and the report has complete evidence.
101
- - **NO** if any scenario failed, was skipped without justification, left debris, relied on misleading output, or lacked evidence. Continue to step 5.
102
-
103
- 5. **ARCHITECT DIAGNOSIS**
104
- ```
105
- Use `/prompts:architect` with:
106
- Goal: [goal type and behavior]
107
- Scenario matrix: [rows, commands, failures, evidence]
108
- Output: [test/build/e2e/harness output]
109
- Provide root cause, safety implications, and specific fix recommendations.
110
- ```
111
-
112
- 6. **FIX ISSUES**
113
- ```
114
- Use `/prompts:executor` with:
115
- Issue: [architect diagnosis]
116
- Files: [affected files]
117
- Constraints: preserve unrelated dirty work, clean temporary harnesses, keep safety bounds
118
- Apply the fix precisely as recommended.
119
- ```
120
-
121
- 7. **CLEAN UP AND ROLLBACK**
122
- - Remove temporary harnesses, fixtures, logs, spawned processes, and state files unless they are intentional deliverables.
123
- - Roll back failed experimental edits that are not part of the final fix.
124
- - Re-check the worktree and record remaining intentional changes or residual debris.
125
-
126
- 8. **REPEAT**
127
- - Go back to step 1 with the updated scenario matrix and failure history.
128
-
129
- ## Safety Bounds
130
-
131
- UltraQA must stay inside these safety bounds:
132
-
133
- - No destructive commands such as force resets, broad deletes, secret exfiltration, credential dumping, production writes, or unbounded process spawning.
134
- - No reading or printing secrets beyond the minimum metadata needed to verify absence of leakage.
135
- - No network or external-production side effects unless the user explicitly authorized them.
136
- - No unbounded waits: use timeouts, retries with caps, and clear hung-command diagnostics.
137
- - No hiding unrelated dirty work or generated debris.
138
- - If a required scenario would violate these bounds, mark it blocked in the report with the safe substitute used.
139
-
140
- ## Exit Conditions
141
-
142
- | Condition | Action |
143
- |-----------|--------|
144
- | **Goal Met** | Exit with success: `ULTRAQA COMPLETE: Goal met after N cycles` plus the structured report |
145
- | **Cycle 5 Reached** | Exit with diagnosis: `ULTRAQA STOPPED: Max cycles` plus failures, fixes attempted, residual risks, and evidence |
146
- | **Same Failure 3x** | Exit early: `ULTRAQA STOPPED: Same failure detected 3 times` plus root cause, safety notes, and next owner |
147
- | **Safety Boundary** | Exit: `ULTRAQA BLOCKED: [destructive/credentialed/external-production/unbounded action]` plus safe substitute evidence |
148
- | **Environment Error** | Exit: `ULTRAQA ERROR: [tmux/port/dependency/hung command issue]` plus cleanup status |
149
-
150
- ## Structured Report
151
-
152
- Every terminal UltraQA result must include this report shape:
153
-
154
- ```markdown
155
- # UltraQA Report
156
-
157
- ## Goal and success criteria
158
- - Goal:
159
- - Stop condition:
160
- - Safety bounds applied:
161
-
162
- ## Scenario matrix
163
- | ID | User/attacker model | Scenario | Command/harness | Expected signal | Actual result | Status | Evidence | Cleanup |
164
- |----|---------------------|----------|-----------------|-----------------|---------------|--------|----------|---------|
165
-
166
- ## Commands run
167
- - `[exit code] command` — purpose, duration/timeout, key output evidence
168
-
169
- ## Failures found
170
- - Scenario ID, failure signal, root cause, user impact, safety impact
171
-
172
- ## Fixes applied
173
- - Files changed, rationale, linked failing scenario(s), regression evidence
174
-
175
- ## Cleanup and rollback
176
- - Generated artifacts removed or intentionally kept
177
- - State/process cleanup performed
178
- - Worktree status before/after
179
-
180
- ## Residual risks
181
- - Untested or blocked scenarios with reasons and safe substitutes
182
-
183
- ## Evidence
184
- - Test output, e2e logs, harness output, screenshots/transcripts when relevant, and rerun/flake evidence
185
- ```
186
-
187
- ## Observability
188
-
189
- Output progress each cycle:
190
-
191
- ```text
192
- [ULTRAQA Cycle 1/5] Planning adversarial scenario matrix...
193
- [ULTRAQA Cycle 1/5] Running baseline tests...
194
- [ULTRAQA Cycle 1/5] Running ADV-E2E-003 prompt-injection harness...
195
- [ULTRAQA Cycle 1/5] FAILED - stale state resume accepted misleading success output
196
- [ULTRAQA Cycle 1/5] Architect diagnosing scenario ADV-E2E-003...
197
- [ULTRAQA Cycle 1/5] Fixing: src/hooks/... - validate exit code before success phrase
198
- [ULTRAQA Cycle 1/5] Cleaning temporary harnesses and state...
199
- [ULTRAQA Cycle 2/5] PASSED - baseline + 9 adversarial scenarios pass
200
- [ULTRAQA COMPLETE] Goal met after 2 cycles
6
+ # UltraQA Task Card
7
+
8
+ Use this explicit opt-in when a runnable behavior needs adversarial dynamic end-to-end
9
+ QA. Shared operating invariants live in `templates/AGENTS.md`; this card defines the
10
+ QA matrix, evidence contract, and bounded cycling only.
11
+
12
+ ## When to use and inputs
13
+
14
+ - Use `/ultraqa --tests|--build|--lint|--typecheck|--interactive` or `/ultraqa --custom "pattern"` for the corresponding goal; without a structured goal, derive a runnable behavior goal.
15
+ - Inputs: goal, changed scope, acceptance criteria, runnable command/service, existing tests, and relevant state/cleanup paths.
16
+ - Keep outcome-first framing, local overrides for the active workflow branch, and `continue` on the current verified next step.
17
+ - If the user says `continue`, advance the current verified QA step rather than restarting discovery.
18
+ - UltraQA is not satisfied by a shallow build/lint/typecheck/test checklist: exercise requested behavior through adversarial dynamic e2e scenarios whenever it can be run, simulated, or harnessed safely.
19
+
20
+ ## Plan and scenario matrix
21
+
22
+ Before commands, record a matrix with scenario id, intent, user/attacker model, setup,
23
+ command or harness, expected signal, actual result, fixes, evidence, and cleanup.
24
+ Include a normal path and relevant hostile classes:
25
+
26
+ 1. **Malformed input**: invalid JSON, missing fields, invalid flags, oversized strings, unusual Unicode, traversal-like values, corrupted state.
27
+ 2. **Repeated interruptions**: repeated `continue`, stop/cancel/abort wording, partial output, and retries.
28
+ 3. **Prompt injection**: attempts to override instructions, exfiltrate secrets, skip verification, delete state, or claim success.
29
+ 4. **Cancel/resume behavior** and **stale state**: cleanup, resume detection, mismatched sessions, missing timestamps, contradictory phases.
30
+ 5. **Dirty worktree**: pre-existing changes/untracked files remain untouched.
31
+ 6. **Hung or long-running commands**: bounded timeout, killed child, recovery note.
32
+ 7. **Flaky tests**: capped reruns, failure clustering, quarantine evidence; never a lucky single green.
33
+ 8. **Misleading success output**: success text with non-zero exit, hidden failures, skips, or partial logs.
34
+
35
+ ## Cycle (maximum 5)
36
+
37
+ 1. **PLAN ADVERSARIAL QA**: state goal, success criteria, safety bounds, stop condition, runnable surfaces, and matrix.
38
+ 2. **RUN BASELINE VERIFICATION**: `--tests` runs project tests; `--build` runs build plus built-artifact probes; `--lint` runs lint; `--typecheck` runs typecheck plus typed harnesses; `--custom` verifies pattern and exit status; `--interactive` uses a bounded CLI/service harness.
39
+ 3. **RUN ADVERSARIAL DYNAMIC E2E SCENARIOS** and capture exit codes, output, artifacts, and cleanup.
40
+ 4. **CHECK RESULT**: pass only when baseline, adversarial scenarios, evidence, and cleanup all pass. Otherwise diagnose and fix, then repeat.
41
+ 5. **ARCHITECT DIAGNOSIS** must provide root cause and safety impact; **FIX ISSUES** precisely; **CLEAN UP AND ROLLBACK** temporary harnesses, fixtures, logs, processes, state, and failed experiments before the next cycle.
42
+
43
+ Generate temporary tests, scripts, fixtures, or harnesses only when useful. Use bounded runtimes,
44
+ project-native tools, and safe substitutes when a safety boundary blocks a scenario.
45
+ Use absolute repo imports and `pathToFileURL(join(repoRoot, "dist", ...)).href`; Never rely on `./dist` from `/tmp`.
46
+ Use a safe file writer with a non-interpolating file-write mechanism; do not use interpolating heredocs for JavaScript assertions.
47
+ Sanitize OMX runtime env for isolated probes: keep `OMX_ROOT` and `OMX_STATE_ROOT` unset and run `env -u OMX_ROOT -u OMX_STATE_ROOT`.
48
+ Classify harness setup failures separately: record it as harness debris, fix the harness, and rerun the scenario before declaring a product defect.
49
+
50
+ ## Safety, state, and exit
51
+
52
+ No destructive commands, secret exfiltration, credential dumping, production writes, or unbounded process spawning. Use no unbounded waits; preserve unrelated dirty work. If a scenario is unsafe, record it blocked and the safe substitute. Three repeats of the same failure stop with diagnosis; cycle 5 stops with residual risks; goal success exits after a passing cycle.
53
+
54
+ Use CLI-first lifecycle state and exact commands:
55
+
56
+ ```sh
57
+ omx state write --input '{"mode":"ultraqa","active":true,"current_phase":"planning","iteration":1,"started_at":"<now>","scenario_matrix":[]}' --json
58
+ omx state write --input '{"mode":"ultraqa","current_phase":"qa","iteration":<cycle>,"scenario_matrix":"<updated matrix path or summary>"}' --json
59
+ omx state write --input '{"mode":"ultraqa","current_phase":"adversarial-e2e"}' --json
60
+ omx state write --input '{"mode":"ultraqa","current_phase":"diagnose"}' --json
61
+ omx state write --input '{"mode":"ultraqa","current_phase":"fix"}' --json
62
+ omx state write --input '{"mode":"ultraqa","current_phase":"cleanup"}' --json
63
+ omx state write --input '{"mode":"ultraqa","active":false,"current_phase":"complete","completed_at":"<now>"}' --json
64
+ omx state read --input '{"mode":"ultraqa"}' --json
65
+ omx state clear --input '{"mode":"ultraqa"}' --json
201
66
  ```
202
67
 
203
- ## State Tracking
68
+ On completion, max cycles, same failure, safety boundary, or environment error, clean
69
+ state and temporary artifacts. Report cleanup status and clean temporary e2e harnesses.
70
+ Never claim complete without current evidence.
204
71
 
205
- Use the CLI-first state surface (`omx state ... --json`) for UltraQA lifecycle state. If explicit MCP compatibility tools are already available, equivalent `omx_state` calls are optional compatibility, not the default.
72
+ ## Evidence/output contract
206
73
 
207
- - **On start**:
208
- `omx state write --input '{"mode":"ultraqa","active":true,"current_phase":"planning","iteration":1,"started_at":"<now>","scenario_matrix":[]}' --json`
209
- - **On each cycle**:
210
- `omx state write --input '{"mode":"ultraqa","current_phase":"qa","iteration":<cycle>,"scenario_matrix":"<updated matrix path or summary>"}' --json`
211
- - **On adversarial e2e transition**:
212
- `omx state write --input '{"mode":"ultraqa","current_phase":"adversarial-e2e"}' --json`
213
- - **On diagnose/fix transitions**:
214
- `omx state write --input '{"mode":"ultraqa","current_phase":"diagnose"}' --json`
215
- `omx state write --input '{"mode":"ultraqa","current_phase":"fix"}' --json`
216
- - **On cleanup transition**:
217
- `omx state write --input '{"mode":"ultraqa","current_phase":"cleanup"}' --json`
218
- - **On completion**:
219
- `omx state write --input '{"mode":"ultraqa","active":false,"current_phase":"complete","completed_at":"<now>"}' --json`
220
- - **For resume detection**:
221
- `omx state read --input '{"mode":"ultraqa"}' --json`
74
+ Return `# UltraQA Report` with: **Goal and success criteria** (including stop condition
75
+ and safety bounds); **Scenario matrix** (all columns above); **Commands run** (exit code,
76
+ purpose, timeout, key output); **Failures found** (root/user/safety impact); **Fixes
77
+ applied** / **Fixes applied** (files, rationale, scenarios, regression evidence); **Cleanup and rollback**
78
+ (artifacts/processes/worktree before/after); **Residual risks**; and **Evidence**
79
+ (logs, harness output, screenshots/transcripts where relevant, rerun/flake evidence).
222
80
 
223
- ## Scenario Examples
224
-
225
- **Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work, rerun the relevant adversarial scenario, and update the report instead of restarting discovery.
226
-
227
- **Good:** The user changes only the output shape or downstream delivery step (for example `make a PR`). Preserve earlier non-conflicting workflow constraints and apply the update locally.
228
-
229
- **Good:** A CLI prints `SUCCESS` while exiting 1. Mark the misleading success output scenario failed, fix the parser or reporting path, and rerun the generated harness.
230
-
231
- **Bad:** The workflow runs only `npm test`, `npm run build`, `npm run lint`, or `npm run typecheck`, sees green output, and declares UltraQA complete without adversarial dynamic e2e coverage.
232
-
233
- **Bad:** A generated harness leaves untracked files, state, or a child process behind and the final report omits cleanup status.
234
-
235
- **Bad:** The user says `continue`, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
236
-
237
- ## Cancellation
238
-
239
- User can cancel with `/cancel`, which clears UltraQA state. Cancellation itself should be tested in cancel/resume scenarios when relevant, but UltraQA must not block an explicit user cancellation.
240
-
241
- ## Important Rules
242
-
243
- 1. **ADVERSARIAL E2E REQUIRED** - Baseline build/lint/typecheck/test commands are necessary evidence, not sufficient completion proof.
244
- 2. **SCENARIO MATRIX REQUIRED** - Track normal, hostile, malformed, interruption, injection, cancel/resume, stale-state, dirty-worktree, hung-command, flaky, and misleading-output coverage.
245
- 3. **GENERATE HARNESSES WHEN USEFUL** - Create temporary tests or harnesses when they materially improve behavioral confidence, then clean them up or commit them intentionally.
246
- 4. **PARALLEL WHEN SAFE** - Run independent diagnostics while preparing potential fixes; do not parallelize commands that mutate the same state or worktree.
247
- 5. **TRACK FAILURES** - Record each failure to detect patterns and avoid false greens.
248
- 6. **EARLY EXIT ON PATTERN** - 3x same failure = stop and surface with root cause and residual risk.
249
- 7. **CLEAR OUTPUT** - User should always know current cycle, scenario, command, status, and evidence.
250
- 8. **CLEAN UP** - Clear UltraQA state and temporary artifacts on completion, cancellation, or early stop.
251
- 9. **SAFETY FIRST** - Never exfiltrate secrets, run destructive cleanup, write to production, or wait indefinitely to satisfy a scenario.
252
-
253
- ## STATE CLEANUP ON COMPLETION
254
-
255
- When goal is met OR max cycles reached OR exiting early, run `$cancel` or call:
256
-
257
- `omx state clear --input '{"mode":"ultraqa"}' --json`
258
-
259
- Use CLI state cleanup rather than deleting files directly. Also remove temporary e2e harnesses, fixtures, and logs unless they are intentional artifacts listed in the report.
260
-
261
- ---
81
+ ## Exit condition
262
82
 
263
- Begin ULTRAQA cycling now. Parse the goal, build the adversarial dynamic e2e scenario matrix, and start cycle 1.
83
+ `ULTRAQA COMPLETE: Goal met after N cycles` only follows a passing baseline plus
84
+ adversarial matrix, clean artifacts, and complete evidence. Otherwise return the exact
85
+ bounded status: `ULTRAQA STOPPED: Max cycles`, `ULTRAQA STOPPED: Same failure detected 3 times`,
86
+ `ULTRAQA BLOCKED: ...`, or `ULTRAQA ERROR: ...` with owner and next safe step.