oh-my-codex 0.14.4 → 0.15.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 (614) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/Cargo.lock +6 -6
  3. package/Cargo.toml +2 -1
  4. package/README.md +40 -7
  5. package/crates/omx-explore/Cargo.toml +1 -0
  6. package/crates/omx-explore/src/main.rs +246 -24
  7. package/crates/omx-mux/Cargo.toml +1 -0
  8. package/crates/omx-runtime/Cargo.toml +1 -0
  9. package/crates/omx-runtime-core/Cargo.toml +1 -0
  10. package/crates/omx-runtime-core/src/dispatch.rs +2 -1
  11. package/crates/omx-runtime-core/src/engine.rs +2 -2
  12. package/crates/omx-runtime-core/src/mailbox.rs +2 -1
  13. package/crates/omx-sparkshell/Cargo.toml +1 -0
  14. package/crates/omx-sparkshell/src/codex_bridge.rs +1 -0
  15. package/crates/omx-sparkshell/src/prompt.rs +1 -0
  16. package/crates/omx-sparkshell/src/threshold.rs +1 -0
  17. package/dist/agents/__tests__/native-config.test.js +98 -4
  18. package/dist/agents/__tests__/native-config.test.js.map +1 -1
  19. package/dist/agents/native-config.d.ts +4 -0
  20. package/dist/agents/native-config.d.ts.map +1 -1
  21. package/dist/agents/native-config.js +19 -3
  22. package/dist/agents/native-config.js.map +1 -1
  23. package/dist/agents/policy.d.ts +10 -0
  24. package/dist/agents/policy.d.ts.map +1 -0
  25. package/dist/agents/policy.js +61 -0
  26. package/dist/agents/policy.js.map +1 -0
  27. package/dist/catalog/__tests__/generator.test.js +2 -0
  28. package/dist/catalog/__tests__/generator.test.js.map +1 -1
  29. package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts +2 -0
  30. package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts.map +1 -0
  31. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +72 -0
  32. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -0
  33. package/dist/catalog/installable.d.ts +5 -0
  34. package/dist/catalog/installable.d.ts.map +1 -0
  35. package/dist/catalog/installable.js +13 -0
  36. package/dist/catalog/installable.js.map +1 -0
  37. package/dist/catalog/skill-mirror.d.ts +20 -0
  38. package/dist/catalog/skill-mirror.d.ts.map +1 -0
  39. package/dist/catalog/skill-mirror.js +104 -0
  40. package/dist/catalog/skill-mirror.js.map +1 -0
  41. package/dist/cli/__tests__/ask.test.js +4 -1
  42. package/dist/cli/__tests__/ask.test.js.map +1 -1
  43. package/dist/cli/__tests__/codex-plugin-layout.test.d.ts +2 -0
  44. package/dist/cli/__tests__/codex-plugin-layout.test.d.ts.map +1 -0
  45. package/dist/cli/__tests__/codex-plugin-layout.test.js +210 -0
  46. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -0
  47. package/dist/cli/__tests__/doctor-team.test.js +46 -1
  48. package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
  49. package/dist/cli/__tests__/doctor-warning-copy.test.js +225 -111
  50. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  51. package/dist/cli/__tests__/exec.test.js +96 -1
  52. package/dist/cli/__tests__/exec.test.js.map +1 -1
  53. package/dist/cli/__tests__/explore.test.js +26 -9
  54. package/dist/cli/__tests__/explore.test.js.map +1 -1
  55. package/dist/cli/__tests__/index.test.js +301 -7
  56. package/dist/cli/__tests__/index.test.js.map +1 -1
  57. package/dist/cli/__tests__/launch-fallback.test.js +358 -4
  58. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  59. package/dist/cli/__tests__/list.test.d.ts +2 -0
  60. package/dist/cli/__tests__/list.test.d.ts.map +1 -0
  61. package/dist/cli/__tests__/list.test.js +38 -0
  62. package/dist/cli/__tests__/list.test.js.map +1 -0
  63. package/dist/cli/__tests__/mcp-parity.test.js +86 -0
  64. package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
  65. package/dist/cli/__tests__/mcp-serve.test.d.ts +2 -0
  66. package/dist/cli/__tests__/mcp-serve.test.d.ts.map +1 -0
  67. package/dist/cli/__tests__/mcp-serve.test.js +38 -0
  68. package/dist/cli/__tests__/mcp-serve.test.js.map +1 -0
  69. package/dist/cli/__tests__/nested-help-routing.test.js +1 -0
  70. package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
  71. package/dist/cli/__tests__/package-bin-contract.test.js +58 -3
  72. package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
  73. package/dist/cli/__tests__/question.test.js +209 -5
  74. package/dist/cli/__tests__/question.test.js.map +1 -1
  75. package/dist/cli/__tests__/setup-agents-overwrite.test.js +146 -3
  76. package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
  77. package/dist/cli/__tests__/setup-install-mode.test.d.ts +2 -0
  78. package/dist/cli/__tests__/setup-install-mode.test.d.ts.map +1 -0
  79. package/dist/cli/__tests__/setup-install-mode.test.js +873 -0
  80. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -0
  81. package/dist/cli/__tests__/setup-prompts-overwrite.test.js +83 -22
  82. package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
  83. package/dist/cli/__tests__/setup-refresh.test.js +120 -2
  84. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  85. package/dist/cli/__tests__/setup-skills-overwrite.test.js +32 -13
  86. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  87. package/dist/cli/__tests__/sidecar.test.d.ts +2 -0
  88. package/dist/cli/__tests__/sidecar.test.d.ts.map +1 -0
  89. package/dist/cli/__tests__/sidecar.test.js +24 -0
  90. package/dist/cli/__tests__/sidecar.test.js.map +1 -0
  91. package/dist/cli/__tests__/team.test.js +90 -42
  92. package/dist/cli/__tests__/team.test.js.map +1 -1
  93. package/dist/cli/__tests__/version-sync-contract.test.js +11 -0
  94. package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
  95. package/dist/cli/codex-home.d.ts +4 -5
  96. package/dist/cli/codex-home.d.ts.map +1 -1
  97. package/dist/cli/codex-home.js +9 -37
  98. package/dist/cli/codex-home.js.map +1 -1
  99. package/dist/cli/doctor.d.ts +1 -1
  100. package/dist/cli/doctor.d.ts.map +1 -1
  101. package/dist/cli/doctor.js +509 -278
  102. package/dist/cli/doctor.js.map +1 -1
  103. package/dist/cli/index.d.ts +13 -5
  104. package/dist/cli/index.d.ts.map +1 -1
  105. package/dist/cli/index.js +351 -60
  106. package/dist/cli/index.js.map +1 -1
  107. package/dist/cli/list.d.ts +2 -0
  108. package/dist/cli/list.d.ts.map +1 -0
  109. package/dist/cli/list.js +40 -0
  110. package/dist/cli/list.js.map +1 -0
  111. package/dist/cli/mcp-serve.d.ts +12 -0
  112. package/dist/cli/mcp-serve.d.ts.map +1 -0
  113. package/dist/cli/mcp-serve.js +63 -0
  114. package/dist/cli/mcp-serve.js.map +1 -0
  115. package/dist/cli/plugin-marketplace.d.ts +13 -0
  116. package/dist/cli/plugin-marketplace.d.ts.map +1 -0
  117. package/dist/cli/plugin-marketplace.js +77 -0
  118. package/dist/cli/plugin-marketplace.js.map +1 -0
  119. package/dist/cli/question.d.ts.map +1 -1
  120. package/dist/cli/question.js +27 -2
  121. package/dist/cli/question.js.map +1 -1
  122. package/dist/cli/setup-preferences.d.ts +20 -0
  123. package/dist/cli/setup-preferences.d.ts.map +1 -0
  124. package/dist/cli/setup-preferences.js +71 -0
  125. package/dist/cli/setup-preferences.js.map +1 -0
  126. package/dist/cli/setup.d.ts +12 -3
  127. package/dist/cli/setup.d.ts.map +1 -1
  128. package/dist/cli/setup.js +1080 -254
  129. package/dist/cli/setup.js.map +1 -1
  130. package/dist/cli/team.d.ts +1 -0
  131. package/dist/cli/team.d.ts.map +1 -1
  132. package/dist/cli/team.js +22 -3
  133. package/dist/cli/team.js.map +1 -1
  134. package/dist/cli/uninstall.d.ts.map +1 -1
  135. package/dist/cli/uninstall.js +2 -8
  136. package/dist/cli/uninstall.js.map +1 -1
  137. package/dist/config/__tests__/generator-idempotent.test.js +100 -3
  138. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  139. package/dist/config/__tests__/generator-notify.test.js +6 -5
  140. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  141. package/dist/config/__tests__/generator-status-line-presets.test.d.ts +2 -0
  142. package/dist/config/__tests__/generator-status-line-presets.test.d.ts.map +1 -0
  143. package/dist/config/__tests__/generator-status-line-presets.test.js +203 -0
  144. package/dist/config/__tests__/generator-status-line-presets.test.js.map +1 -0
  145. package/dist/config/__tests__/models.test.js +35 -2
  146. package/dist/config/__tests__/models.test.js.map +1 -1
  147. package/dist/config/codex-hooks.d.ts.map +1 -1
  148. package/dist/config/codex-hooks.js +2 -7
  149. package/dist/config/codex-hooks.js.map +1 -1
  150. package/dist/config/generator.d.ts +10 -0
  151. package/dist/config/generator.d.ts.map +1 -1
  152. package/dist/config/generator.js +259 -76
  153. package/dist/config/generator.js.map +1 -1
  154. package/dist/config/models.d.ts +13 -3
  155. package/dist/config/models.d.ts.map +1 -1
  156. package/dist/config/models.js +25 -5
  157. package/dist/config/models.js.map +1 -1
  158. package/dist/config/omx-first-party-mcp.d.ts +18 -0
  159. package/dist/config/omx-first-party-mcp.d.ts.map +1 -0
  160. package/dist/config/omx-first-party-mcp.js +76 -0
  161. package/dist/config/omx-first-party-mcp.js.map +1 -0
  162. package/dist/document-refresh/__tests__/enforcer.test.d.ts +2 -0
  163. package/dist/document-refresh/__tests__/enforcer.test.d.ts.map +1 -0
  164. package/dist/document-refresh/__tests__/enforcer.test.js +128 -0
  165. package/dist/document-refresh/__tests__/enforcer.test.js.map +1 -0
  166. package/dist/document-refresh/config.d.ts +9 -0
  167. package/dist/document-refresh/config.d.ts.map +1 -0
  168. package/dist/document-refresh/config.js +70 -0
  169. package/dist/document-refresh/config.js.map +1 -0
  170. package/dist/document-refresh/enforcer.d.ts +43 -0
  171. package/dist/document-refresh/enforcer.d.ts.map +1 -0
  172. package/dist/document-refresh/enforcer.js +329 -0
  173. package/dist/document-refresh/enforcer.js.map +1 -0
  174. package/dist/exec/followup.d.ts +44 -0
  175. package/dist/exec/followup.d.ts.map +1 -0
  176. package/dist/exec/followup.js +349 -0
  177. package/dist/exec/followup.js.map +1 -0
  178. package/dist/hooks/__tests__/codebase-map.test.js +63 -1
  179. package/dist/hooks/__tests__/codebase-map.test.js.map +1 -1
  180. package/dist/hooks/__tests__/deep-interview-contract.test.js +10 -7
  181. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  182. package/dist/hooks/__tests__/keyword-detector.test.js +89 -0
  183. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  184. package/dist/hooks/__tests__/notify-fallback-watcher.test.js +84 -1
  185. package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
  186. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +23 -2
  187. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
  188. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +43 -0
  189. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
  190. package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +17 -0
  191. package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
  192. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +53 -0
  193. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
  194. package/dist/hooks/__tests__/notify-hook-regression-205.test.js +4 -4
  195. package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
  196. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +103 -0
  197. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
  198. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +27 -13
  199. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  200. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts +2 -0
  201. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts.map +1 -0
  202. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js +35 -0
  203. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -0
  204. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +70 -3
  205. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
  206. package/dist/hooks/__tests__/pre-context-gate-skills.test.js +5 -0
  207. package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
  208. package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +3 -2
  209. package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
  210. package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts +2 -0
  211. package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts.map +1 -0
  212. package/dist/hooks/__tests__/prompt-refactor-contract.test.js +22 -0
  213. package/dist/hooks/__tests__/prompt-refactor-contract.test.js.map +1 -0
  214. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts +2 -0
  215. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts.map +1 -0
  216. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +28 -0
  217. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -0
  218. package/dist/hooks/__tests__/triage-heuristic.test.js +59 -4
  219. package/dist/hooks/__tests__/triage-heuristic.test.js.map +1 -1
  220. package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts +2 -0
  221. package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts.map +1 -0
  222. package/dist/hooks/__tests__/visual-ralph-skill.test.js +44 -0
  223. package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -0
  224. package/dist/hooks/codebase-map.d.ts.map +1 -1
  225. package/dist/hooks/codebase-map.js +83 -6
  226. package/dist/hooks/codebase-map.js.map +1 -1
  227. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  228. package/dist/hooks/keyword-detector.js +19 -14
  229. package/dist/hooks/keyword-detector.js.map +1 -1
  230. package/dist/hooks/prompt-guidance-contract.d.ts +6 -0
  231. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  232. package/dist/hooks/prompt-guidance-contract.js +89 -0
  233. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  234. package/dist/hooks/session.d.ts +2 -0
  235. package/dist/hooks/session.d.ts.map +1 -1
  236. package/dist/hooks/session.js +6 -0
  237. package/dist/hooks/session.js.map +1 -1
  238. package/dist/hooks/triage-heuristic.d.ts +2 -2
  239. package/dist/hooks/triage-heuristic.d.ts.map +1 -1
  240. package/dist/hooks/triage-heuristic.js +97 -20
  241. package/dist/hooks/triage-heuristic.js.map +1 -1
  242. package/dist/hooks/triage-state.d.ts +1 -1
  243. package/dist/hooks/triage-state.d.ts.map +1 -1
  244. package/dist/hooks/triage-state.js +2 -1
  245. package/dist/hooks/triage-state.js.map +1 -1
  246. package/dist/hud/__tests__/index.test.js +4 -4
  247. package/dist/hud/__tests__/index.test.js.map +1 -1
  248. package/dist/hud/__tests__/state.test.js +4 -0
  249. package/dist/hud/__tests__/state.test.js.map +1 -1
  250. package/dist/hud/__tests__/types.test.js +27 -0
  251. package/dist/hud/__tests__/types.test.js.map +1 -1
  252. package/dist/hud/state.d.ts.map +1 -1
  253. package/dist/hud/state.js +8 -0
  254. package/dist/hud/state.js.map +1 -1
  255. package/dist/hud/types.d.ts +9 -0
  256. package/dist/hud/types.d.ts.map +1 -1
  257. package/dist/hud/types.js +3 -0
  258. package/dist/hud/types.js.map +1 -1
  259. package/dist/mcp/__tests__/bootstrap.test.js +45 -5
  260. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  261. package/dist/mcp/__tests__/server-lifecycle.test.js +50 -7
  262. package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
  263. package/dist/mcp/__tests__/state-server.test.js +67 -9
  264. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  265. package/dist/mcp/bootstrap.d.ts +12 -1
  266. package/dist/mcp/bootstrap.d.ts.map +1 -1
  267. package/dist/mcp/bootstrap.js +87 -29
  268. package/dist/mcp/bootstrap.js.map +1 -1
  269. package/dist/mcp/state-server.d.ts +5 -11
  270. package/dist/mcp/state-server.d.ts.map +1 -1
  271. package/dist/mcp/state-server.js +16 -432
  272. package/dist/mcp/state-server.js.map +1 -1
  273. package/dist/planning/__tests__/artifacts.test.js +152 -1
  274. package/dist/planning/__tests__/artifacts.test.js.map +1 -1
  275. package/dist/planning/artifacts.d.ts +9 -0
  276. package/dist/planning/artifacts.d.ts.map +1 -1
  277. package/dist/planning/artifacts.js +60 -1
  278. package/dist/planning/artifacts.js.map +1 -1
  279. package/dist/question/__tests__/deep-interview.test.js +1 -1
  280. package/dist/question/__tests__/deep-interview.test.js.map +1 -1
  281. package/dist/question/__tests__/renderer.test.js +70 -0
  282. package/dist/question/__tests__/renderer.test.js.map +1 -1
  283. package/dist/question/__tests__/ui.test.js +49 -0
  284. package/dist/question/__tests__/ui.test.js.map +1 -1
  285. package/dist/question/renderer.d.ts +14 -1
  286. package/dist/question/renderer.d.ts.map +1 -1
  287. package/dist/question/renderer.js +109 -10
  288. package/dist/question/renderer.js.map +1 -1
  289. package/dist/question/state.d.ts +2 -0
  290. package/dist/question/state.d.ts.map +1 -1
  291. package/dist/question/state.js +4 -0
  292. package/dist/question/state.js.map +1 -1
  293. package/dist/question/types.d.ts +2 -1
  294. package/dist/question/types.d.ts.map +1 -1
  295. package/dist/question/types.js.map +1 -1
  296. package/dist/question/ui.d.ts.map +1 -1
  297. package/dist/question/ui.js +28 -8
  298. package/dist/question/ui.js.map +1 -1
  299. package/dist/runtime/__tests__/bridge.test.js +143 -1
  300. package/dist/runtime/__tests__/bridge.test.js.map +1 -1
  301. package/dist/runtime/bridge.d.ts +21 -0
  302. package/dist/runtime/bridge.d.ts.map +1 -1
  303. package/dist/runtime/bridge.js +54 -4
  304. package/dist/runtime/bridge.js.map +1 -1
  305. package/dist/scripts/__tests__/codex-native-hook.test.js +1904 -230
  306. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  307. package/dist/scripts/__tests__/generate-release-body.test.js +90 -1
  308. package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -1
  309. package/dist/scripts/__tests__/hook-derived-watcher.test.js +110 -2
  310. package/dist/scripts/__tests__/hook-derived-watcher.test.js.map +1 -1
  311. package/dist/scripts/__tests__/postinstall.test.js +7 -93
  312. package/dist/scripts/__tests__/postinstall.test.js.map +1 -1
  313. package/dist/scripts/__tests__/prompt-inventory.test.d.ts +2 -0
  314. package/dist/scripts/__tests__/prompt-inventory.test.d.ts.map +1 -0
  315. package/dist/scripts/__tests__/prompt-inventory.test.js +56 -0
  316. package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -0
  317. package/dist/scripts/__tests__/run-test-files.test.d.ts +2 -0
  318. package/dist/scripts/__tests__/run-test-files.test.d.ts.map +1 -0
  319. package/dist/scripts/__tests__/run-test-files.test.js +62 -0
  320. package/dist/scripts/__tests__/run-test-files.test.js.map +1 -0
  321. package/dist/scripts/__tests__/smoke-packed-install.test.js +13 -1
  322. package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
  323. package/dist/scripts/__tests__/verify-native-agents.test.d.ts +2 -0
  324. package/dist/scripts/__tests__/verify-native-agents.test.d.ts.map +1 -0
  325. package/dist/scripts/__tests__/verify-native-agents.test.js +166 -0
  326. package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -0
  327. package/dist/scripts/codex-execution-surface.d.ts +16 -0
  328. package/dist/scripts/codex-execution-surface.d.ts.map +1 -0
  329. package/dist/scripts/codex-execution-surface.js +42 -0
  330. package/dist/scripts/codex-execution-surface.js.map +1 -0
  331. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  332. package/dist/scripts/codex-native-hook.js +418 -76
  333. package/dist/scripts/codex-native-hook.js.map +1 -1
  334. package/dist/scripts/codex-native-pre-post.d.ts +8 -0
  335. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  336. package/dist/scripts/codex-native-pre-post.js +133 -19
  337. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  338. package/dist/scripts/generate-release-body.d.ts +1 -0
  339. package/dist/scripts/generate-release-body.d.ts.map +1 -1
  340. package/dist/scripts/generate-release-body.js +32 -3
  341. package/dist/scripts/generate-release-body.js.map +1 -1
  342. package/dist/scripts/hook-derived-watcher.js +46 -7
  343. package/dist/scripts/hook-derived-watcher.js.map +1 -1
  344. package/dist/scripts/notify-fallback-watcher.js +59 -9
  345. package/dist/scripts/notify-fallback-watcher.js.map +1 -1
  346. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts +2 -0
  347. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts.map +1 -0
  348. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js +153 -0
  349. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js.map +1 -0
  350. package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
  351. package/dist/scripts/notify-hook/managed-tmux.js +18 -1
  352. package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
  353. package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
  354. package/dist/scripts/notify-hook/process-runner.js +7 -3
  355. package/dist/scripts/notify-hook/process-runner.js.map +1 -1
  356. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  357. package/dist/scripts/notify-hook/team-dispatch.js +96 -11
  358. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  359. package/dist/scripts/notify-hook/team-tmux-guard.js +3 -3
  360. package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts +34 -0
  361. package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts.map +1 -0
  362. package/dist/scripts/notify-hook/team-worker-posttooluse.js +434 -0
  363. package/dist/scripts/notify-hook/team-worker-posttooluse.js.map +1 -0
  364. package/dist/scripts/notify-hook/team-worker.d.ts +1 -1
  365. package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
  366. package/dist/scripts/notify-hook/team-worker.js +3 -43
  367. package/dist/scripts/notify-hook/team-worker.js.map +1 -1
  368. package/dist/scripts/notify-hook.js +36 -5
  369. package/dist/scripts/notify-hook.js.map +1 -1
  370. package/dist/scripts/postinstall.d.ts +1 -5
  371. package/dist/scripts/postinstall.d.ts.map +1 -1
  372. package/dist/scripts/postinstall.js +3 -42
  373. package/dist/scripts/postinstall.js.map +1 -1
  374. package/dist/scripts/prompt-inventory.d.ts +29 -0
  375. package/dist/scripts/prompt-inventory.d.ts.map +1 -0
  376. package/dist/scripts/prompt-inventory.js +178 -0
  377. package/dist/scripts/prompt-inventory.js.map +1 -0
  378. package/dist/scripts/run-test-files.js +32 -2
  379. package/dist/scripts/run-test-files.js.map +1 -1
  380. package/dist/scripts/smoke-packed-install.d.ts +3 -0
  381. package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
  382. package/dist/scripts/smoke-packed-install.js +9 -1
  383. package/dist/scripts/smoke-packed-install.js.map +1 -1
  384. package/dist/scripts/sync-plugin-mirror.d.ts +13 -0
  385. package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -0
  386. package/dist/scripts/sync-plugin-mirror.js +242 -0
  387. package/dist/scripts/sync-plugin-mirror.js.map +1 -0
  388. package/dist/scripts/verify-native-agents.d.ts +16 -0
  389. package/dist/scripts/verify-native-agents.d.ts.map +1 -0
  390. package/dist/scripts/verify-native-agents.js +188 -0
  391. package/dist/scripts/verify-native-agents.js.map +1 -0
  392. package/dist/session-history/search.d.ts.map +1 -1
  393. package/dist/session-history/search.js +7 -2
  394. package/dist/session-history/search.js.map +1 -1
  395. package/dist/sidecar/__tests__/boundary.test.d.ts +2 -0
  396. package/dist/sidecar/__tests__/boundary.test.d.ts.map +1 -0
  397. package/dist/sidecar/__tests__/boundary.test.js +48 -0
  398. package/dist/sidecar/__tests__/boundary.test.js.map +1 -0
  399. package/dist/sidecar/__tests__/collector.test.d.ts +2 -0
  400. package/dist/sidecar/__tests__/collector.test.d.ts.map +1 -0
  401. package/dist/sidecar/__tests__/collector.test.js +162 -0
  402. package/dist/sidecar/__tests__/collector.test.js.map +1 -0
  403. package/dist/sidecar/__tests__/render.test.d.ts +2 -0
  404. package/dist/sidecar/__tests__/render.test.d.ts.map +1 -0
  405. package/dist/sidecar/__tests__/render.test.js +67 -0
  406. package/dist/sidecar/__tests__/render.test.js.map +1 -0
  407. package/dist/sidecar/__tests__/tmux.test.d.ts +2 -0
  408. package/dist/sidecar/__tests__/tmux.test.d.ts.map +1 -0
  409. package/dist/sidecar/__tests__/tmux.test.js +30 -0
  410. package/dist/sidecar/__tests__/tmux.test.js.map +1 -0
  411. package/dist/sidecar/__tests__/watch.test.d.ts +2 -0
  412. package/dist/sidecar/__tests__/watch.test.d.ts.map +1 -0
  413. package/dist/sidecar/__tests__/watch.test.js +42 -0
  414. package/dist/sidecar/__tests__/watch.test.js.map +1 -0
  415. package/dist/sidecar/collector.d.ts +4 -0
  416. package/dist/sidecar/collector.d.ts.map +1 -0
  417. package/dist/sidecar/collector.js +377 -0
  418. package/dist/sidecar/collector.js.map +1 -0
  419. package/dist/sidecar/index.d.ts +25 -0
  420. package/dist/sidecar/index.d.ts.map +1 -0
  421. package/dist/sidecar/index.js +165 -0
  422. package/dist/sidecar/index.js.map +1 -0
  423. package/dist/sidecar/render.d.ts +3 -0
  424. package/dist/sidecar/render.d.ts.map +1 -0
  425. package/dist/sidecar/render.js +72 -0
  426. package/dist/sidecar/render.js.map +1 -0
  427. package/dist/sidecar/tmux.d.ts +13 -0
  428. package/dist/sidecar/tmux.d.ts.map +1 -0
  429. package/dist/sidecar/tmux.js +44 -0
  430. package/dist/sidecar/tmux.js.map +1 -0
  431. package/dist/sidecar/types.d.ts +125 -0
  432. package/dist/sidecar/types.d.ts.map +1 -0
  433. package/dist/sidecar/types.js +2 -0
  434. package/dist/sidecar/types.js.map +1 -0
  435. package/dist/state/__tests__/operations.test.js +50 -22
  436. package/dist/state/__tests__/operations.test.js.map +1 -1
  437. package/dist/state/operations.d.ts +1 -1
  438. package/dist/state/operations.d.ts.map +1 -1
  439. package/dist/state/operations.js +19 -7
  440. package/dist/state/operations.js.map +1 -1
  441. package/dist/team/__tests__/commit-hygiene.test.d.ts +2 -0
  442. package/dist/team/__tests__/commit-hygiene.test.d.ts.map +1 -0
  443. package/dist/team/__tests__/commit-hygiene.test.js +93 -0
  444. package/dist/team/__tests__/commit-hygiene.test.js.map +1 -0
  445. package/dist/team/__tests__/delegation-policy.test.d.ts +2 -0
  446. package/dist/team/__tests__/delegation-policy.test.d.ts.map +1 -0
  447. package/dist/team/__tests__/delegation-policy.test.js +69 -0
  448. package/dist/team/__tests__/delegation-policy.test.js.map +1 -0
  449. package/dist/team/__tests__/events.test.js +54 -4
  450. package/dist/team/__tests__/events.test.js.map +1 -1
  451. package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts +2 -0
  452. package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts.map +1 -0
  453. package/dist/team/__tests__/hook-primary-e2e-contract.test.js +78 -0
  454. package/dist/team/__tests__/hook-primary-e2e-contract.test.js.map +1 -0
  455. package/dist/team/__tests__/model-contract.test.js +18 -2
  456. package/dist/team/__tests__/model-contract.test.js.map +1 -1
  457. package/dist/team/__tests__/repo-aware-decomposition.test.d.ts +2 -0
  458. package/dist/team/__tests__/repo-aware-decomposition.test.d.ts.map +1 -0
  459. package/dist/team/__tests__/repo-aware-decomposition.test.js +95 -0
  460. package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -0
  461. package/dist/team/__tests__/runtime.test.js +677 -17
  462. package/dist/team/__tests__/runtime.test.js.map +1 -1
  463. package/dist/team/__tests__/state-root.test.js +177 -1
  464. package/dist/team/__tests__/state-root.test.js.map +1 -1
  465. package/dist/team/__tests__/state.test.js +110 -0
  466. package/dist/team/__tests__/state.test.js.map +1 -1
  467. package/dist/team/__tests__/tmux-session.test.js +301 -2
  468. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  469. package/dist/team/__tests__/worker-bootstrap.test.js +94 -0
  470. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  471. package/dist/team/commit-hygiene.d.ts +22 -3
  472. package/dist/team/commit-hygiene.d.ts.map +1 -1
  473. package/dist/team/commit-hygiene.js +134 -2
  474. package/dist/team/commit-hygiene.js.map +1 -1
  475. package/dist/team/contracts.d.ts +1 -1
  476. package/dist/team/contracts.d.ts.map +1 -1
  477. package/dist/team/contracts.js +2 -0
  478. package/dist/team/contracts.js.map +1 -1
  479. package/dist/team/dag-schema.d.ts +38 -0
  480. package/dist/team/dag-schema.d.ts.map +1 -0
  481. package/dist/team/dag-schema.js +221 -0
  482. package/dist/team/dag-schema.js.map +1 -0
  483. package/dist/team/delegation-policy.d.ts +3 -0
  484. package/dist/team/delegation-policy.d.ts.map +1 -0
  485. package/dist/team/delegation-policy.js +82 -0
  486. package/dist/team/delegation-policy.js.map +1 -0
  487. package/dist/team/model-contract.d.ts +3 -1
  488. package/dist/team/model-contract.d.ts.map +1 -1
  489. package/dist/team/model-contract.js +44 -5
  490. package/dist/team/model-contract.js.map +1 -1
  491. package/dist/team/repo-aware-decomposition.d.ts +60 -0
  492. package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
  493. package/dist/team/repo-aware-decomposition.js +229 -0
  494. package/dist/team/repo-aware-decomposition.js.map +1 -0
  495. package/dist/team/runtime.d.ts +34 -0
  496. package/dist/team/runtime.d.ts.map +1 -1
  497. package/dist/team/runtime.js +191 -50
  498. package/dist/team/runtime.js.map +1 -1
  499. package/dist/team/state/tasks.d.ts.map +1 -1
  500. package/dist/team/state/tasks.js +33 -0
  501. package/dist/team/state/tasks.js.map +1 -1
  502. package/dist/team/state/types.d.ts +23 -1
  503. package/dist/team/state/types.d.ts.map +1 -1
  504. package/dist/team/state/types.js.map +1 -1
  505. package/dist/team/state-root.d.ts +35 -0
  506. package/dist/team/state-root.d.ts.map +1 -1
  507. package/dist/team/state-root.js +281 -1
  508. package/dist/team/state-root.js.map +1 -1
  509. package/dist/team/state.d.ts +27 -1
  510. package/dist/team/state.d.ts.map +1 -1
  511. package/dist/team/state.js +6 -0
  512. package/dist/team/state.js.map +1 -1
  513. package/dist/team/tmux-session.d.ts +1 -0
  514. package/dist/team/tmux-session.d.ts.map +1 -1
  515. package/dist/team/tmux-session.js +83 -6
  516. package/dist/team/tmux-session.js.map +1 -1
  517. package/dist/team/worker-bootstrap.d.ts +3 -0
  518. package/dist/team/worker-bootstrap.d.ts.map +1 -1
  519. package/dist/team/worker-bootstrap.js +77 -4
  520. package/dist/team/worker-bootstrap.js.map +1 -1
  521. package/dist/utils/__tests__/agents-model-table.test.js +8 -0
  522. package/dist/utils/__tests__/agents-model-table.test.js.map +1 -1
  523. package/dist/utils/__tests__/paths.test.js +42 -9
  524. package/dist/utils/__tests__/paths.test.js.map +1 -1
  525. package/dist/utils/agents-md.d.ts +3 -0
  526. package/dist/utils/agents-md.d.ts.map +1 -1
  527. package/dist/utils/agents-md.js +25 -0
  528. package/dist/utils/agents-md.js.map +1 -1
  529. package/dist/utils/agents-model-table.d.ts.map +1 -1
  530. package/dist/utils/agents-model-table.js +2 -3
  531. package/dist/utils/agents-model-table.js.map +1 -1
  532. package/package.json +14 -7
  533. package/plugins/oh-my-codex/.app.json +3 -0
  534. package/plugins/oh-my-codex/.codex-plugin/plugin.json +30 -0
  535. package/plugins/oh-my-codex/.mcp.json +44 -0
  536. package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +114 -0
  537. package/plugins/oh-my-codex/skills/analyze/SKILL.md +148 -0
  538. package/plugins/oh-my-codex/skills/ask-claude/SKILL.md +61 -0
  539. package/plugins/oh-my-codex/skills/ask-gemini/SKILL.md +61 -0
  540. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +231 -0
  541. package/plugins/oh-my-codex/skills/autoresearch/SKILL.md +68 -0
  542. package/plugins/oh-my-codex/skills/cancel/SKILL.md +399 -0
  543. package/plugins/oh-my-codex/skills/code-review/SKILL.md +290 -0
  544. package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +287 -0
  545. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +464 -0
  546. package/plugins/oh-my-codex/skills/doctor/SKILL.md +239 -0
  547. package/plugins/oh-my-codex/skills/help/SKILL.md +202 -0
  548. package/plugins/oh-my-codex/skills/hud/SKILL.md +98 -0
  549. package/plugins/oh-my-codex/skills/note/SKILL.md +62 -0
  550. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +135 -0
  551. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +86 -0
  552. package/plugins/oh-my-codex/skills/plan/SKILL.md +276 -0
  553. package/plugins/oh-my-codex/skills/ralph/SKILL.md +269 -0
  554. package/plugins/oh-my-codex/skills/ralplan/SKILL.md +162 -0
  555. package/plugins/oh-my-codex/skills/security-review/SKILL.md +300 -0
  556. package/plugins/oh-my-codex/skills/skill/SKILL.md +835 -0
  557. package/plugins/oh-my-codex/skills/team/SKILL.md +510 -0
  558. package/plugins/oh-my-codex/skills/trace/SKILL.md +33 -0
  559. package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +143 -0
  560. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +175 -0
  561. package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +153 -0
  562. package/plugins/oh-my-codex/skills/visual-verdict/SKILL.md +76 -0
  563. package/plugins/oh-my-codex/skills/wiki/SKILL.md +57 -0
  564. package/plugins/oh-my-codex/skills/worker/SKILL.md +106 -0
  565. package/prompts/critic.md +35 -83
  566. package/prompts/executor.md +32 -109
  567. package/prompts/explore-harness.md +1 -1
  568. package/prompts/explore.md +37 -90
  569. package/prompts/planner.md +28 -58
  570. package/prompts/researcher.md +46 -78
  571. package/prompts/verifier.md +23 -31
  572. package/skills/autopilot/SKILL.md +1 -4
  573. package/skills/deep-interview/SKILL.md +8 -5
  574. package/skills/doctor/SKILL.md +45 -17
  575. package/skills/help/SKILL.md +2 -2
  576. package/skills/omx-setup/SKILL.md +52 -9
  577. package/skills/plan/SKILL.md +1 -4
  578. package/skills/ralph/SKILL.md +3 -5
  579. package/skills/ralplan/SKILL.md +2 -6
  580. package/skills/team/SKILL.md +2 -5
  581. package/skills/ultraqa/SKILL.md +1 -4
  582. package/skills/ultrawork/SKILL.md +2 -3
  583. package/skills/visual-ralph/SKILL.md +153 -0
  584. package/skills/web-clone/SKILL.md +12 -354
  585. package/src/scripts/__tests__/codex-native-hook.test.ts +2306 -224
  586. package/src/scripts/__tests__/generate-release-body.test.ts +109 -0
  587. package/src/scripts/__tests__/hook-derived-watcher.test.ts +132 -2
  588. package/src/scripts/__tests__/postinstall.test.ts +7 -104
  589. package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
  590. package/src/scripts/__tests__/run-test-files.test.ts +72 -0
  591. package/src/scripts/__tests__/smoke-packed-install.test.ts +15 -0
  592. package/src/scripts/__tests__/verify-native-agents.test.ts +204 -0
  593. package/src/scripts/codex-execution-surface.ts +73 -0
  594. package/src/scripts/codex-native-hook.ts +579 -82
  595. package/src/scripts/codex-native-pre-post.ts +157 -19
  596. package/src/scripts/generate-release-body.ts +34 -2
  597. package/src/scripts/hook-derived-watcher.ts +51 -8
  598. package/src/scripts/notify-fallback-watcher.ts +65 -9
  599. package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
  600. package/src/scripts/notify-hook/managed-tmux.ts +22 -4
  601. package/src/scripts/notify-hook/process-runner.ts +7 -3
  602. package/src/scripts/notify-hook/team-dispatch.ts +103 -11
  603. package/src/scripts/notify-hook/team-tmux-guard.ts +3 -3
  604. package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
  605. package/src/scripts/notify-hook/team-worker.ts +4 -48
  606. package/src/scripts/notify-hook.ts +36 -5
  607. package/src/scripts/postinstall.ts +4 -58
  608. package/src/scripts/prompt-inventory.ts +218 -0
  609. package/src/scripts/run-test-files.ts +41 -2
  610. package/src/scripts/smoke-packed-install.ts +10 -1
  611. package/src/scripts/sync-plugin-mirror.ts +360 -0
  612. package/src/scripts/verify-native-agents.ts +245 -0
  613. package/templates/AGENTS.md +26 -91
  614. package/templates/catalog-manifest.json +16 -1
@@ -0,0 +1,399 @@
1
+ ---
2
+ name: cancel
3
+ description: Cancel any active OMX mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline, team)
4
+ ---
5
+
6
+ # Cancel Skill
7
+
8
+ Intelligent cancellation that detects and cancels the active OMX mode.
9
+
10
+ **The cancel skill is the standard way to complete and exit any OMX mode.**
11
+ When the stop hook detects work is complete, it instructs the LLM to invoke
12
+ this skill for proper state cleanup. If cancel fails or is interrupted,
13
+ retry with `--force` flag, or wait for the 2-hour staleness timeout as
14
+ a last resort.
15
+
16
+ ## What It Does
17
+
18
+ Automatically detects which mode is active and cancels it:
19
+ - **Autopilot**: Stops workflow, preserves progress for resume
20
+ - **Ralph**: Stops persistence loop, clears linked ultrawork if applicable
21
+ - **Ultrawork**: Stops parallel execution (standalone or linked)
22
+ - **Ecomode**: Stops token-efficient parallel execution (standalone or linked to ralph)
23
+ - **UltraQA**: Stops QA cycling workflow
24
+ - **Swarm**: Stops coordinated agent swarm, releases claimed tasks
25
+ - **Ultrapilot**: Stops parallel autopilot workers
26
+ - **Pipeline**: Stops sequential agent pipeline
27
+ - **Team**: Sends shutdown inbox to all workers, waits for exit, kills tmux session, and clears team state
28
+
29
+ ## Usage
30
+
31
+ ```
32
+ /cancel
33
+ ```
34
+
35
+ Or say: "cancelomc", "stopomc"
36
+
37
+ ## Auto-Detection
38
+
39
+ `/cancel` follows the session-aware state contract:
40
+ - By default the command inspects the current session via `state_list_active` and `state_get_status`, navigating `.omx/state/sessions/{sessionId}/…` to discover which mode is active.
41
+ - When a session id is provided or already known, that session-scoped path is authoritative. Legacy files in `.omx/state/*.json` are consulted only as a compatibility fallback if the session id is missing or empty.
42
+ - Swarm is a shared SQLite/marker mode (`.omx/state/swarm.db` / `.omx/state/swarm-active.marker`) and is not session-scoped.
43
+ - The default cleanup flow calls `state_clear` with the session id to remove only the matching session files; modes stay bound to their originating session.
44
+
45
+ ## Normative Ralph cancellation post-conditions (MUST)
46
+
47
+ For Ralph-targeted cancellation (standalone or linked), completion is defined by post-conditions:
48
+
49
+ 1. Target Ralph state is terminalized, not silently removed:
50
+ - `active=false`
51
+ - `current_phase='cancelled'`
52
+ - `completed_at` is set (ISO timestamp)
53
+ 2. If Ralph is linked to Ultrawork or Ecomode in the same scope, that linked mode is also terminalized/non-active.
54
+ 4. Cancellation MUST remain scope-safe: no mutation of unrelated sessions.
55
+
56
+ See: `docs/contracts/ralph-cancel-contract.md`.
57
+
58
+ Active modes are still cancelled in dependency order:
59
+ 1. Autopilot (includes linked ralph/ultraqa/ecomode cleanup)
60
+ 2. Ralph (cleans its linked ultrawork or ecomode)
61
+ 3. Ultrawork (standalone)
62
+ 4. Ecomode (standalone)
63
+ 5. UltraQA (standalone)
64
+ 6. Swarm (standalone)
65
+ 7. Ultrapilot (standalone)
66
+ 8. Pipeline (standalone)
67
+ 9. Team (tmux-based)
68
+ 10. Plan Consensus (standalone)
69
+
70
+ ## Normative Ralph post-conditions (MUST)
71
+
72
+ When cancellation targets Ralph state in a scope, completion requires all of the following:
73
+
74
+ 1. Ralph state is terminal in that same scope: `active=false`, `current_phase='cancelled'` (or linked terminal phase), and `completed_at` is set.
75
+ 2. Linked Ultrawork/Ecomode in the same scope is also terminal/non-active.
76
+ 4. Unrelated sessions are untouched.
77
+
78
+ ## Force Clear All
79
+
80
+ Use `--force` or `--all` when you need to erase every session plus legacy artifacts, e.g., to reset the workspace entirely.
81
+
82
+ ```
83
+ /cancel --force
84
+ ```
85
+
86
+ ```
87
+ /cancel --all
88
+ ```
89
+
90
+ Steps under the hood:
91
+ 1. `state_list_active` enumerates `.omx/state/sessions/{sessionId}/…` to find every known session.
92
+ 2. `state_clear` runs once per session to drop that session’s files.
93
+ 3. A global `state_clear` without `session_id` removes legacy files under `.omx/state/*.json`, `.omx/state/swarm*.db`, and compatibility artifacts (see list).
94
+ 4. Team artifacts (`.omx/state/team/*/`, tmux sessions matching `omx-team-*`) are best-effort cleared as part of the legacy fallback.
95
+
96
+ Every `state_clear` command honors the `session_id` argument, so even force mode still uses the session-aware paths first before deleting legacy files.
97
+
98
+ Legacy compatibility list (removed only under `--force`/`--all`):
99
+ - `.omx/state/autopilot-state.json`
100
+ - `.omx/state/ralph-state.json`
101
+ - `.omx/state/ralph-plan-state.json`
102
+ - `.omx/state/ralph-verification.json`
103
+ - `.omx/state/ultrawork-state.json`
104
+ - `.omx/state/ecomode-state.json`
105
+ - `.omx/state/ultraqa-state.json`
106
+ - `.omx/state/swarm.db`
107
+ - `.omx/state/swarm.db-wal`
108
+ - `.omx/state/swarm.db-shm`
109
+ - `.omx/state/swarm-active.marker`
110
+ - `.omx/state/swarm-tasks.db`
111
+ - `.omx/state/ultrapilot-state.json`
112
+ - `.omx/state/ultrapilot-ownership.json`
113
+ - `.omx/state/pipeline-state.json`
114
+ - `.omx/state/plan-consensus.json`
115
+ - `.omx/state/ralplan-state.json`
116
+ - `.omx/state/boulder.json`
117
+ - `.omx/state/hud-state.json`
118
+ - `.omx/state/subagent-tracking.json`
119
+ - `.omx/state/subagent-tracker.lock`
120
+ - `.omx/state/rate-limit-daemon.pid`
121
+ - `.omx/state/rate-limit-daemon.log`
122
+ - `.omx/state/checkpoints/` (directory)
123
+ - `.omx/state/sessions/` (empty directory cleanup after clearing sessions)
124
+
125
+ ## Implementation Steps
126
+
127
+ When you invoke this skill:
128
+
129
+ ### 1. Parse Arguments
130
+
131
+ ```bash
132
+ # Check for --force or --all flags
133
+ FORCE_MODE=false
134
+ if [[ "$*" == *"--force"* ]] || [[ "$*" == *"--all"* ]]; then
135
+ FORCE_MODE=true
136
+ fi
137
+ ```
138
+
139
+ ### 2. Detect Active Modes
140
+
141
+ The skill now relies on the session-aware state contract rather than hard-coded file paths:
142
+ 1. Call `state_list_active` to enumerate `.omx/state/sessions/{sessionId}/…` and discover every active session.
143
+ 2. For each session id, call `state_get_status` to learn which mode is running (`autopilot`, `ralph`, `ultrawork`, etc.) and whether dependent modes exist.
144
+ 3. If a `session_id` was supplied to `/cancel`, skip legacy fallback entirely and operate solely within that session path; otherwise, consult legacy files in `.omx/state/*.json` only if the state tools report no active session. Swarm remains a shared SQLite/marker mode outside session scoping.
145
+ 4. Any cancellation logic in this doc mirrors the dependency order discovered via state tools (autopilot → ralph → …).
146
+
147
+ ### 3A. Force Mode (if --force or --all)
148
+
149
+ Use force mode to clear every session plus legacy artifacts via `state_clear`. Direct file removal is reserved for legacy cleanup when the state tools report no active sessions.
150
+
151
+ ### 3B. Smart Cancellation (default)
152
+
153
+ #### If Team Active (tmux-based)
154
+
155
+ Teams are detected by checking for config files in `.omx/state/team/`:
156
+
157
+ ```bash
158
+ # Check for active teams
159
+ ls .omx/state/team/*/config.json 2>/dev/null
160
+ ```
161
+
162
+ **Two-pass cancellation protocol:**
163
+
164
+ **Pass 1: Graceful Shutdown**
165
+ ```
166
+ For each team found in .omx/state/team/:
167
+ 1. Read config.json to get team_name and workers list
168
+ 2. For each worker:
169
+ a. Write shutdown inbox to .omx/state/team/{name}/workers/{worker}/inbox.md
170
+ b. Send short trigger via tmux send-keys
171
+ c. Wait up to 15 seconds for worker tmux pane to exit
172
+ d. If still alive: mark as unresponsive
173
+ ```
174
+
175
+ **Pass 2: Force Kill**
176
+ ```
177
+ After graceful pass:
178
+ 1. For each remaining alive worker:
179
+ a. Send C-c via tmux send-keys
180
+ b. Wait 2 seconds
181
+ c. Kill the tmux window if still alive
182
+ 2. Destroy the tmux session: tmux kill-session -t omx-team-{name}
183
+ ```
184
+
185
+ **Cleanup:**
186
+ ```
187
+ 1. Strip AGENTS.md team worker overlay (<!-- OMX:TEAM:WORKER:START/END -->)
188
+ 2. Remove team state directory: rm -rf .omx/state/team/{name}/
189
+ 3. Clear team mode state: state_clear(mode="team")
190
+ 4. Emit structured cancel report
191
+ ```
192
+
193
+ **Structured Cancel Report:**
194
+ ```
195
+ Team "{team_name}" cancelled:
196
+ - Workers signaled: N
197
+ - Graceful exits: M
198
+ - Force killed: K
199
+ - tmux session destroyed: yes/no
200
+ - State cleaned up: yes/no
201
+ ```
202
+
203
+ **Implementation note:** The cancel skill is executed by the LLM, not as a bash script. When you detect an active team:
204
+ 1. Check `.omx/state/team/*/config.json` for active teams
205
+ 2. For each worker in config.workers, write shutdown inbox and send trigger
206
+ 3. Wait briefly for workers to exit (15s timeout)
207
+ 4. Force kill remaining workers via tmux
208
+ 5. Destroy tmux session: `tmux kill-session -t omx-team-{name}`
209
+ 6. Strip AGENTS.md overlay
210
+ 7. Remove state: `rm -rf .omx/state/team/{name}/`
211
+ 8. `state_clear(mode="team")`
212
+ 9. Report structured summary to user
213
+
214
+ #### If Autopilot Active
215
+
216
+ Call `cancelAutopilot()` from `src/hooks/autopilot/cancel.ts:27-78`:
217
+
218
+ ```bash
219
+ # Autopilot handles its own cleanup + ralph + ultraqa
220
+ # Just mark autopilot as inactive (preserves state for resume)
221
+ if [[ -f .omx/state/autopilot-state.json ]]; then
222
+ # Clean up ralph if active
223
+ if [[ -f .omx/state/ralph-state.json ]]; then
224
+ RALPH_STATE=$(cat .omx/state/ralph-state.json)
225
+ LINKED_UW=$(echo "$RALPH_STATE" | jq -r '.linked_ultrawork // false')
226
+
227
+ # Clean linked ultrawork first
228
+ if [[ "$LINKED_UW" == "true" ]] && [[ -f .omx/state/ultrawork-state.json ]]; then
229
+ rm -f .omx/state/ultrawork-state.json
230
+ echo "Cleaned up: ultrawork (linked to ralph)"
231
+ fi
232
+
233
+ # Clean ralph
234
+ rm -f .omx/state/ralph-state.json
235
+ rm -f .omx/state/ralph-verification.json
236
+ echo "Cleaned up: ralph"
237
+ fi
238
+
239
+ # Clean up ultraqa if active
240
+ if [[ -f .omx/state/ultraqa-state.json ]]; then
241
+ rm -f .omx/state/ultraqa-state.json
242
+ echo "Cleaned up: ultraqa"
243
+ fi
244
+
245
+ # Mark autopilot inactive but preserve state
246
+ CURRENT_STATE=$(cat .omx/state/autopilot-state.json)
247
+ CURRENT_PHASE=$(echo "$CURRENT_STATE" | jq -r '.phase // "unknown"')
248
+ echo "$CURRENT_STATE" | jq '.active = false' > .omx/state/autopilot-state.json
249
+
250
+ echo "Autopilot cancelled at phase: $CURRENT_PHASE. Progress preserved for resume."
251
+ echo "Run /autopilot to resume."
252
+ fi
253
+ ```
254
+
255
+ #### If Ralph Active (but not Autopilot)
256
+
257
+ Call `clearRalphState()` + `clearLinkedUltraworkState()` from `src/hooks/ralph-loop/index.ts:147-182`:
258
+
259
+ ```bash
260
+ if [[ -f .omx/state/ralph-state.json ]]; then
261
+ # Check if ultrawork is linked
262
+ RALPH_STATE=$(cat .omx/state/ralph-state.json)
263
+ LINKED_UW=$(echo "$RALPH_STATE" | jq -r '.linked_ultrawork // false')
264
+
265
+ # Clean linked ultrawork first
266
+ if [[ "$LINKED_UW" == "true" ]] && [[ -f .omx/state/ultrawork-state.json ]]; then
267
+ UW_STATE=$(cat .omx/state/ultrawork-state.json)
268
+ UW_LINKED=$(echo "$UW_STATE" | jq -r '.linked_to_ralph // false')
269
+
270
+ # Only clear if it was linked to ralph
271
+ if [[ "$UW_LINKED" == "true" ]]; then
272
+ rm -f .omx/state/ultrawork-state.json
273
+ echo "Cleaned up: ultrawork (linked to ralph)"
274
+ fi
275
+ fi
276
+
277
+ # Clean ralph state
278
+ rm -f .omx/state/ralph-state.json
279
+ rm -f .omx/state/ralph-plan-state.json
280
+ rm -f .omx/state/ralph-verification.json
281
+
282
+ echo "Ralph cancelled. Persistent mode deactivated."
283
+ fi
284
+ ```
285
+
286
+ #### If Ultrawork Active (standalone, not linked)
287
+
288
+ Call `deactivateUltrawork()` from `src/hooks/ultrawork/index.ts:150-173`:
289
+
290
+ ```bash
291
+ if [[ -f .omx/state/ultrawork-state.json ]]; then
292
+ # Check if linked to ralph
293
+ UW_STATE=$(cat .omx/state/ultrawork-state.json)
294
+ LINKED=$(echo "$UW_STATE" | jq -r '.linked_to_ralph // false')
295
+
296
+ if [[ "$LINKED" == "true" ]]; then
297
+ echo "Ultrawork is linked to Ralph. Use /cancel to cancel both."
298
+ exit 1
299
+ fi
300
+
301
+ # Remove local state
302
+ rm -f .omx/state/ultrawork-state.json
303
+
304
+ echo "Ultrawork cancelled. Parallel execution mode deactivated."
305
+ fi
306
+ ```
307
+
308
+ #### If UltraQA Active (standalone)
309
+
310
+ Call `clearUltraQAState()` from `src/hooks/ultraqa/index.ts:107-120`:
311
+
312
+ ```bash
313
+ if [[ -f .omx/state/ultraqa-state.json ]]; then
314
+ rm -f .omx/state/ultraqa-state.json
315
+ echo "UltraQA cancelled. QA cycling workflow stopped."
316
+ fi
317
+ ```
318
+
319
+ #### No Active Modes
320
+
321
+ ```bash
322
+ echo "No active OMX modes detected."
323
+ echo ""
324
+ echo "Checked for:"
325
+ echo " - Autopilot (.omx/state/autopilot-state.json)"
326
+ echo " - Ralph (.omx/state/ralph-state.json)"
327
+ echo " - Ultrawork (.omx/state/ultrawork-state.json)"
328
+ echo " - UltraQA (.omx/state/ultraqa-state.json)"
329
+ echo ""
330
+ echo "Use --force to clear all state files anyway."
331
+ ```
332
+
333
+ ## Implementation Notes
334
+
335
+ The cancel skill runs as follows:
336
+ 1. Parse the `--force` / `--all` flags, tracking whether cleanup should span every session or stay scoped to the current session id.
337
+ 2. Use `state_list_active` to enumerate known session ids and `state_get_status` to learn the active mode (`autopilot`, `ralph`, `ultrawork`, etc.) for each session.
338
+ 3. When operating in default mode, call `state_clear` with that session_id to remove only the session’s files, then run mode-specific cleanup (autopilot → ralph → …) based on the state tool signals.
339
+ 4. In force mode, iterate every active session, call `state_clear` per session, then run a global `state_clear` without `session_id` to drop legacy files (`.omx/state/*.json`, compatibility artifacts) and report success. Swarm remains a shared SQLite/marker mode outside session scoping.
340
+ 5. Team artifacts (`.omx/state/team/*/`, tmux sessions matching `omx-team-*`) remain best-effort cleanup items invoked during the legacy/global pass.
341
+
342
+ State tools always honor the `session_id` argument, so even force mode still clears the session-scoped paths before deleting compatibility-only legacy state.
343
+
344
+ Mode-specific subsections below describe what extra cleanup each handler performs after the state-wide operations finish.
345
+ ## Messages Reference
346
+
347
+ | Mode | Success Message |
348
+ |------|-----------------|
349
+ | Autopilot | "Autopilot cancelled at phase: {phase}. Progress preserved for resume." |
350
+ | Ralph | "Ralph cancelled. Persistent mode deactivated." |
351
+ | Ultrawork | "Ultrawork cancelled. Parallel execution mode deactivated." |
352
+ | Ecomode | "Ecomode cancelled. Token-efficient execution mode deactivated." |
353
+ | UltraQA | "UltraQA cancelled. QA cycling workflow stopped." |
354
+ | Swarm | "Swarm cancelled. Coordinated agents stopped." |
355
+ | Ultrapilot | "Ultrapilot cancelled. Parallel autopilot workers stopped." |
356
+ | Pipeline | "Pipeline cancelled. Sequential agent chain stopped." |
357
+ | Team | "Team cancelled. Teammates shut down and cleaned up." |
358
+ | Plan Consensus | "Plan Consensus cancelled. Planning session ended." |
359
+ | Force | "All OMX modes cleared. You are free to start fresh." |
360
+ | None | "No active OMX modes detected." |
361
+
362
+ ## What Gets Preserved
363
+
364
+ | Mode | State Preserved | Resume Command |
365
+ |------|-----------------|----------------|
366
+ | Autopilot | Yes (phase, files, spec, plan, verdicts) | `/autopilot` |
367
+ | Ralph | No | N/A |
368
+ | Ultrawork | No | N/A |
369
+ | UltraQA | No | N/A |
370
+ | Swarm | No | N/A |
371
+ | Ultrapilot | No | N/A |
372
+ | Pipeline | No | N/A |
373
+ | Plan Consensus | Yes (plan file path preserved) | N/A |
374
+
375
+ ## Notes
376
+
377
+ - **Dependency-aware**: Autopilot cancellation cleans up Ralph and UltraQA
378
+ - **Link-aware**: Ralph cancellation cleans up linked Ultrawork or Ecomode
379
+ - **Safe**: Only clears linked Ultrawork, preserves standalone Ultrawork
380
+ - **Local-only**: Clears state files in `.omx/state/` directory
381
+ - **Resume-friendly**: Autopilot state is preserved for seamless resume
382
+ - **Team-aware**: Detects tmux-based teams and performs graceful shutdown with force-kill fallback
383
+
384
+ ## Tmux Team Cleanup
385
+
386
+ When cancelling team mode, the cancel skill should:
387
+
388
+ 1. **Kill all team tmux sessions**: `tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^omx-team-'` and kill each
389
+ 2. **Remove team state directories**: `rm -rf .omx/state/team/*/`
390
+ 3. **Strip AGENTS.md overlay**: Remove content between `<!-- OMX:TEAM:WORKER:START -->` and `<!-- OMX:TEAM:WORKER:END -->`
391
+
392
+ ### Force Clear Addition
393
+
394
+ When `--force` is used, also clean up:
395
+ ```bash
396
+ rm -rf .omx/state/team/ # All team state
397
+ # Kill all omx-team-* tmux sessions
398
+ tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^omx-team-' | while read s; do tmux kill-session -t "$s" 2>/dev/null; done
399
+ ```
@@ -0,0 +1,290 @@
1
+ ---
2
+ name: code-review
3
+ description: Run a comprehensive code review
4
+ ---
5
+
6
+ # Code Review Skill
7
+
8
+ Conduct a thorough code review for quality, security, and maintainability with severity-rated feedback.
9
+
10
+ ## When to Use
11
+
12
+ This skill activates when:
13
+ - User requests "review this code", "code review"
14
+ - Before merging a pull request
15
+ - After implementing a major feature
16
+ - User wants quality assessment
17
+
18
+ ## GPT-5.4 Guidance Alignment
19
+
20
+ - Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail.
21
+ - Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints.
22
+ - If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the review is grounded.
23
+ - Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent.
24
+
25
+ Delegates to the `code-reviewer` and `architect` agents in parallel for a two-lane review:
26
+
27
+ 1. **Identify Changes**
28
+ - Run `git diff` to find changed files
29
+ - Determine scope of review (specific files or entire PR)
30
+
31
+ 2. **Launch Parallel Review Lanes**
32
+ - **`code-reviewer` lane** - owns spec compliance, security, code quality, performance, and maintainability findings
33
+ - **`architect` lane** - owns the devil's-advocate / design-tradeoff perspective
34
+ - Both lanes run in parallel and produce distinct outputs before final synthesis
35
+
36
+ 3. **Review Categories**
37
+ - **Security** - Hardcoded secrets, injection risks, XSS, CSRF
38
+ - **Code Quality** - Function size, complexity, nesting depth
39
+ - **Performance** - Algorithm efficiency, N+1 queries, caching
40
+ - **Best Practices** - Naming, documentation, error handling
41
+ - **Maintainability** - Duplication, coupling, testability
42
+
43
+ 4. **Severity Rating**
44
+ - **CRITICAL** - Security vulnerability (must fix before merge)
45
+ - **HIGH** - Bug or major code smell (should fix before merge)
46
+ - **MEDIUM** - Minor issue (fix when possible)
47
+ - **LOW** - Style/suggestion (consider fixing)
48
+
49
+ 5. **Architectural Status Contract**
50
+ - **CLEAR** - No unresolved architectural blocker was found
51
+ - **WATCH** - Non-blocking design/tradeoff concern that must appear in the final synthesis
52
+ - **BLOCK** - Unresolved design concern that prevents a merge-ready verdict
53
+
54
+ 6. **Specific Recommendations**
55
+ - File:line locations for each issue
56
+ - Concrete fix suggestions
57
+ - Code examples where applicable
58
+
59
+ 7. **Final Synthesis**
60
+ - Combine the `code-reviewer` recommendation and the architect status into one final verdict
61
+ - Deterministic merge gating rules:
62
+ - If architect status is **BLOCK**, final recommendation is **REQUEST CHANGES**
63
+ - Else if `code-reviewer` recommendation is **REQUEST CHANGES**, final recommendation is **REQUEST CHANGES**
64
+ - Else if architect status is **WATCH**, final recommendation is **COMMENT**
65
+ - Else final recommendation follows the `code-reviewer` lane
66
+ - The final report must make architect blockers impossible to miss
67
+
68
+ ## Agent Delegation
69
+
70
+ ```
71
+ delegate(
72
+ role="code-reviewer",
73
+ tier="THOROUGH",
74
+ prompt="CODE REVIEW TASK
75
+
76
+ Review code changes for quality, security, and maintainability.
77
+
78
+ This is the code/spec/security lane. Do not absorb architectural ownership.
79
+
80
+ Scope: [git diff or specific files]
81
+
82
+ Review Checklist:
83
+ - Security vulnerabilities (OWASP Top 10)
84
+ - Code quality (complexity, duplication)
85
+ - Performance issues (N+1, inefficient algorithms)
86
+ - Best practices (naming, documentation, error handling)
87
+ - Maintainability (coupling, testability)
88
+
89
+ Output: Code review report with:
90
+ - Files reviewed count
91
+ - Issues by severity (CRITICAL, HIGH, MEDIUM, LOW)
92
+ - Specific file:line locations
93
+ - Fix recommendations
94
+ - Approval recommendation (APPROVE / REQUEST CHANGES / COMMENT)"
95
+ )
96
+
97
+ delegate(
98
+ role="architect",
99
+ tier="THOROUGH",
100
+ prompt="ARCHITECTURE / DEVIL'S-ADVOCATE REVIEW TASK
101
+
102
+ Review the same code changes from the architecture/tradeoff perspective.
103
+
104
+ Scope: [git diff or specific files]
105
+
106
+ Focus:
107
+ - System boundaries and interfaces
108
+ - Hidden coupling or long-term maintainability risks
109
+ - Tradeoff tension the main reviewer might miss
110
+ - Strongest counterargument against approving as-is
111
+
112
+ Output:
113
+ - Architectural Status: CLEAR / WATCH / BLOCK
114
+ - File:line evidence for each concern
115
+ - Concrete tradeoff or design recommendation"
116
+ )
117
+
118
+ Run both lanes in parallel, then synthesize them with the deterministic rules above.
119
+ ```
120
+
121
+ ## External Model Consultation (Preferred)
122
+
123
+ The code-reviewer agent SHOULD consult Codex for cross-validation.
124
+
125
+ ### Protocol
126
+ 1. **Form your OWN review FIRST** - Complete the review independently
127
+ 2. **Consult for validation** - Cross-check findings with Codex
128
+ 3. **Critically evaluate** - Never blindly adopt external findings
129
+ 4. **Graceful fallback** - Never block if tools unavailable
130
+
131
+ ### When to Consult
132
+ - Security-sensitive code changes
133
+ - Complex architectural patterns
134
+ - Unfamiliar codebases or languages
135
+ - High-stakes production code
136
+
137
+ ### When to Skip
138
+ - Simple refactoring
139
+ - Well-understood patterns
140
+ - Time-critical reviews
141
+ - Small, isolated changes
142
+
143
+ ### Tool Usage
144
+ Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools.
145
+ Use `mcp__x__ask_codex` with `agent_role: "code-reviewer"`.
146
+ If ToolSearch finds no MCP tools, fall back to the `code-reviewer` agent.
147
+
148
+ **Note:** Codex calls can take up to 1 hour. Consider the review timeline before consulting.
149
+
150
+ ## Output Format
151
+
152
+ ```
153
+ CODE REVIEW REPORT
154
+ ==================
155
+
156
+ Files Reviewed: 8
157
+ Total Issues: 12
158
+ Architectural Status: WATCH
159
+
160
+ CRITICAL (0)
161
+ -----------
162
+ (none)
163
+
164
+ HIGH (0)
165
+ --------
166
+ (none)
167
+
168
+ MEDIUM (7)
169
+ ----------
170
+ 1. src/api/auth.ts:42
171
+ Issue: Email normalization logic is duplicated instead of reusing the shared helper
172
+ Risk: Validation rules can drift between authentication paths
173
+ Fix: Route both paths through the shared normalization helper
174
+
175
+ 2. src/components/UserProfile.tsx:89
176
+ Issue: Derived permissions are recalculated on every render
177
+ Risk: Avoidable work during profile refreshes
178
+ Fix: Memoize the derived permissions list or compute it upstream
179
+
180
+ 3. src/utils/validation.ts:15
181
+ Issue: Form-layer and server-layer validation messages are defined separately
182
+ Risk: User-facing validation guidance can become inconsistent
183
+ Fix: Share one validation message helper across both call sites
184
+
185
+ LOW (5)
186
+ -------
187
+ ...
188
+
189
+ ARCHITECTURE WATCHLIST
190
+ ----------------------
191
+ - src/review/orchestrator.ts:88
192
+ Concern: Review result synthesis relies on implicit ordering rather than an explicit blocker contract
193
+ Status: WATCH
194
+ Recommendation: Define deterministic merge gating before expanding reviewers
195
+
196
+ SYNTHESIS
197
+ ---------
198
+ - code-reviewer recommendation: COMMENT
199
+ - architect status: WATCH
200
+ - final recommendation: COMMENT
201
+
202
+ RECOMMENDATION: COMMENT
203
+
204
+ Address any WATCH concerns before treating the change as merge-ready.
205
+ ```
206
+
207
+ ## Review Checklist
208
+
209
+ The `code-reviewer` lane checks:
210
+
211
+ ### Security
212
+ - [ ] No hardcoded secrets (API keys, passwords, tokens)
213
+ - [ ] All user inputs sanitized
214
+ - [ ] SQL/NoSQL injection prevention
215
+ - [ ] XSS prevention (escaped outputs)
216
+ - [ ] CSRF protection on state-changing operations
217
+ - [ ] Authentication/authorization properly enforced
218
+
219
+ ### Code Quality
220
+ - [ ] Functions < 50 lines (guideline)
221
+ - [ ] Cyclomatic complexity < 10
222
+ - [ ] No deeply nested code (> 4 levels)
223
+ - [ ] No duplicate logic (DRY principle)
224
+ - [ ] Clear, descriptive naming
225
+
226
+ ### Performance
227
+ - [ ] No N+1 query patterns
228
+ - [ ] Appropriate caching where applicable
229
+ - [ ] Efficient algorithms (avoid O(n²) when O(n) possible)
230
+ - [ ] No unnecessary re-renders (React/Vue)
231
+
232
+ ### Best Practices
233
+ - [ ] Error handling present and appropriate
234
+ - [ ] Logging at appropriate levels
235
+ - [ ] Documentation for public APIs
236
+ - [ ] Tests for critical paths
237
+ - [ ] No commented-out code
238
+
239
+ ## Architect Lane Checklist
240
+
241
+ The `architect` lane checks:
242
+
243
+ - [ ] Boundary or interface changes are explicit
244
+ - [ ] New coupling/tradeoff risks are surfaced
245
+ - [ ] Long-horizon maintainability concerns are evidence-backed
246
+ - [ ] Architectural status is one of `CLEAR`, `WATCH`, or `BLOCK`
247
+ - [ ] Any `BLOCK` concern cites the reason merge-ready status should be withheld
248
+
249
+ ## Approval Criteria
250
+
251
+ **APPROVE** - `code-reviewer` returns APPROVE and architect status is `CLEAR`
252
+ **REQUEST CHANGES** - `code-reviewer` returns REQUEST CHANGES or architect status is `BLOCK`
253
+ **COMMENT** - `code-reviewer` returns COMMENT with architect status `CLEAR`, architect status is `WATCH`, or only LOW/MEDIUM improvements remain
254
+
255
+
256
+ ## Scenario Examples
257
+
258
+ **Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.
259
+
260
+ **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.
261
+
262
+ **Bad:** The user says `continue`, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
263
+
264
+ ## Use with Other Skills
265
+
266
+ **With Team:**
267
+ ```
268
+ /team "review recent auth changes and report findings"
269
+ ```
270
+ Includes coordinated review execution across specialized agents.
271
+
272
+ **With Ralph:**
273
+ ```
274
+ /ralph code-review then fix all issues
275
+ ```
276
+ On the explicit Ralph path, review findings should flow into automatic fix follow-up without another permission prompt. Plain `code-review` itself remains read-only and does **not** promise auto-fix.
277
+
278
+ **With Ultrawork:**
279
+ ```
280
+ /ultrawork review all files in src/
281
+ ```
282
+ Parallel code review across multiple files.
283
+
284
+ ## Best Practices
285
+
286
+ - **Review early** - Catch issues before they compound
287
+ - **Review often** - Small, frequent reviews better than huge ones
288
+ - **Address CRITICAL/HIGH first** - Fix security and bugs immediately
289
+ - **Consider context** - Some "issues" may be intentional trade-offs
290
+ - **Learn from reviews** - Use feedback to improve coding practices