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.
- package/.agents/plugins/marketplace.json +20 -0
- package/Cargo.lock +6 -6
- package/Cargo.toml +2 -1
- package/README.md +40 -7
- package/crates/omx-explore/Cargo.toml +1 -0
- package/crates/omx-explore/src/main.rs +246 -24
- package/crates/omx-mux/Cargo.toml +1 -0
- package/crates/omx-runtime/Cargo.toml +1 -0
- package/crates/omx-runtime-core/Cargo.toml +1 -0
- package/crates/omx-runtime-core/src/dispatch.rs +2 -1
- package/crates/omx-runtime-core/src/engine.rs +2 -2
- package/crates/omx-runtime-core/src/mailbox.rs +2 -1
- package/crates/omx-sparkshell/Cargo.toml +1 -0
- package/crates/omx-sparkshell/src/codex_bridge.rs +1 -0
- package/crates/omx-sparkshell/src/prompt.rs +1 -0
- package/crates/omx-sparkshell/src/threshold.rs +1 -0
- package/dist/agents/__tests__/native-config.test.js +98 -4
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts +4 -0
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +19 -3
- package/dist/agents/native-config.js.map +1 -1
- package/dist/agents/policy.d.ts +10 -0
- package/dist/agents/policy.d.ts.map +1 -0
- package/dist/agents/policy.js +61 -0
- package/dist/agents/policy.js.map +1 -0
- package/dist/catalog/__tests__/generator.test.js +2 -0
- package/dist/catalog/__tests__/generator.test.js.map +1 -1
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts +2 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts.map +1 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +72 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -0
- package/dist/catalog/installable.d.ts +5 -0
- package/dist/catalog/installable.d.ts.map +1 -0
- package/dist/catalog/installable.js +13 -0
- package/dist/catalog/installable.js.map +1 -0
- package/dist/catalog/skill-mirror.d.ts +20 -0
- package/dist/catalog/skill-mirror.d.ts.map +1 -0
- package/dist/catalog/skill-mirror.js +104 -0
- package/dist/catalog/skill-mirror.js.map +1 -0
- package/dist/cli/__tests__/ask.test.js +4 -1
- package/dist/cli/__tests__/ask.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.d.ts +2 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.d.ts.map +1 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js +210 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-team.test.js +46 -1
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +225 -111
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +96 -1
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +26 -9
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +301 -7
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +358 -4
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/list.test.d.ts +2 -0
- package/dist/cli/__tests__/list.test.d.ts.map +1 -0
- package/dist/cli/__tests__/list.test.js +38 -0
- package/dist/cli/__tests__/list.test.js.map +1 -0
- package/dist/cli/__tests__/mcp-parity.test.js +86 -0
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-serve.test.d.ts +2 -0
- package/dist/cli/__tests__/mcp-serve.test.d.ts.map +1 -0
- package/dist/cli/__tests__/mcp-serve.test.js +38 -0
- package/dist/cli/__tests__/mcp-serve.test.js.map +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +58 -3
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +209 -5
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +146 -3
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-install-mode.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-install-mode.test.js +873 -0
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -0
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +83 -22
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +120 -2
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/setup-skills-overwrite.test.js +32 -13
- package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/sidecar.test.d.ts +2 -0
- package/dist/cli/__tests__/sidecar.test.d.ts.map +1 -0
- package/dist/cli/__tests__/sidecar.test.js +24 -0
- package/dist/cli/__tests__/sidecar.test.js.map +1 -0
- package/dist/cli/__tests__/team.test.js +90 -42
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/version-sync-contract.test.js +11 -0
- package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
- package/dist/cli/codex-home.d.ts +4 -5
- package/dist/cli/codex-home.d.ts.map +1 -1
- package/dist/cli/codex-home.js +9 -37
- package/dist/cli/codex-home.js.map +1 -1
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +509 -278
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +13 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +351 -60
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/list.d.ts +2 -0
- package/dist/cli/list.d.ts.map +1 -0
- package/dist/cli/list.js +40 -0
- package/dist/cli/list.js.map +1 -0
- package/dist/cli/mcp-serve.d.ts +12 -0
- package/dist/cli/mcp-serve.d.ts.map +1 -0
- package/dist/cli/mcp-serve.js +63 -0
- package/dist/cli/mcp-serve.js.map +1 -0
- package/dist/cli/plugin-marketplace.d.ts +13 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -0
- package/dist/cli/plugin-marketplace.js +77 -0
- package/dist/cli/plugin-marketplace.js.map +1 -0
- package/dist/cli/question.d.ts.map +1 -1
- package/dist/cli/question.js +27 -2
- package/dist/cli/question.js.map +1 -1
- package/dist/cli/setup-preferences.d.ts +20 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -0
- package/dist/cli/setup-preferences.js +71 -0
- package/dist/cli/setup-preferences.js.map +1 -0
- package/dist/cli/setup.d.ts +12 -3
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1080 -254
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts +1 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +22 -3
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +2 -8
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +100 -3
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +6 -5
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts +2 -0
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js +203 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js.map +1 -0
- package/dist/config/__tests__/models.test.js +35 -2
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/codex-hooks.d.ts.map +1 -1
- package/dist/config/codex-hooks.js +2 -7
- package/dist/config/codex-hooks.js.map +1 -1
- package/dist/config/generator.d.ts +10 -0
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +259 -76
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +13 -3
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +25 -5
- package/dist/config/models.js.map +1 -1
- package/dist/config/omx-first-party-mcp.d.ts +18 -0
- package/dist/config/omx-first-party-mcp.d.ts.map +1 -0
- package/dist/config/omx-first-party-mcp.js +76 -0
- package/dist/config/omx-first-party-mcp.js.map +1 -0
- package/dist/document-refresh/__tests__/enforcer.test.d.ts +2 -0
- package/dist/document-refresh/__tests__/enforcer.test.d.ts.map +1 -0
- package/dist/document-refresh/__tests__/enforcer.test.js +128 -0
- package/dist/document-refresh/__tests__/enforcer.test.js.map +1 -0
- package/dist/document-refresh/config.d.ts +9 -0
- package/dist/document-refresh/config.d.ts.map +1 -0
- package/dist/document-refresh/config.js +70 -0
- package/dist/document-refresh/config.js.map +1 -0
- package/dist/document-refresh/enforcer.d.ts +43 -0
- package/dist/document-refresh/enforcer.d.ts.map +1 -0
- package/dist/document-refresh/enforcer.js +329 -0
- package/dist/document-refresh/enforcer.js.map +1 -0
- package/dist/exec/followup.d.ts +44 -0
- package/dist/exec/followup.d.ts.map +1 -0
- package/dist/exec/followup.js +349 -0
- package/dist/exec/followup.js.map +1 -0
- package/dist/hooks/__tests__/codebase-map.test.js +63 -1
- package/dist/hooks/__tests__/codebase-map.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +10 -7
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +89 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +84 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +23 -2
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +43 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +17 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +53 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js +4 -4
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +103 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +27 -13
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js +35 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +70 -3
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +5 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +3 -2
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js +22 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +28 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-heuristic.test.js +59 -4
- package/dist/hooks/__tests__/triage-heuristic.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts +2 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.js +44 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -0
- package/dist/hooks/codebase-map.d.ts.map +1 -1
- package/dist/hooks/codebase-map.js +83 -6
- package/dist/hooks/codebase-map.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +19 -14
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/prompt-guidance-contract.d.ts +6 -0
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +89 -0
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hooks/session.d.ts +2 -0
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +6 -0
- package/dist/hooks/session.js.map +1 -1
- package/dist/hooks/triage-heuristic.d.ts +2 -2
- package/dist/hooks/triage-heuristic.d.ts.map +1 -1
- package/dist/hooks/triage-heuristic.js +97 -20
- package/dist/hooks/triage-heuristic.js.map +1 -1
- package/dist/hooks/triage-state.d.ts +1 -1
- package/dist/hooks/triage-state.d.ts.map +1 -1
- package/dist/hooks/triage-state.js +2 -1
- package/dist/hooks/triage-state.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +4 -4
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/state.test.js +4 -0
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/types.test.js +27 -0
- package/dist/hud/__tests__/types.test.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +8 -0
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +9 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +3 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +45 -5
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +50 -7
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +67 -9
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +12 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +87 -29
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/state-server.d.ts +5 -11
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +16 -432
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/planning/__tests__/artifacts.test.js +152 -1
- package/dist/planning/__tests__/artifacts.test.js.map +1 -1
- package/dist/planning/artifacts.d.ts +9 -0
- package/dist/planning/artifacts.d.ts.map +1 -1
- package/dist/planning/artifacts.js +60 -1
- package/dist/planning/artifacts.js.map +1 -1
- package/dist/question/__tests__/deep-interview.test.js +1 -1
- package/dist/question/__tests__/deep-interview.test.js.map +1 -1
- package/dist/question/__tests__/renderer.test.js +70 -0
- package/dist/question/__tests__/renderer.test.js.map +1 -1
- package/dist/question/__tests__/ui.test.js +49 -0
- package/dist/question/__tests__/ui.test.js.map +1 -1
- package/dist/question/renderer.d.ts +14 -1
- package/dist/question/renderer.d.ts.map +1 -1
- package/dist/question/renderer.js +109 -10
- package/dist/question/renderer.js.map +1 -1
- package/dist/question/state.d.ts +2 -0
- package/dist/question/state.d.ts.map +1 -1
- package/dist/question/state.js +4 -0
- package/dist/question/state.js.map +1 -1
- package/dist/question/types.d.ts +2 -1
- package/dist/question/types.d.ts.map +1 -1
- package/dist/question/types.js.map +1 -1
- package/dist/question/ui.d.ts.map +1 -1
- package/dist/question/ui.js +28 -8
- package/dist/question/ui.js.map +1 -1
- package/dist/runtime/__tests__/bridge.test.js +143 -1
- package/dist/runtime/__tests__/bridge.test.js.map +1 -1
- package/dist/runtime/bridge.d.ts +21 -0
- package/dist/runtime/bridge.d.ts.map +1 -1
- package/dist/runtime/bridge.js +54 -4
- package/dist/runtime/bridge.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +1904 -230
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/generate-release-body.test.js +90 -1
- package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -1
- package/dist/scripts/__tests__/hook-derived-watcher.test.js +110 -2
- package/dist/scripts/__tests__/hook-derived-watcher.test.js.map +1 -1
- package/dist/scripts/__tests__/postinstall.test.js +7 -93
- package/dist/scripts/__tests__/postinstall.test.js.map +1 -1
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts +2 -0
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js +56 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.d.ts +2 -0
- package/dist/scripts/__tests__/run-test-files.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.js +62 -0
- package/dist/scripts/__tests__/run-test-files.test.js.map +1 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.js +13 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/__tests__/verify-native-agents.test.d.ts +2 -0
- package/dist/scripts/__tests__/verify-native-agents.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/verify-native-agents.test.js +166 -0
- package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -0
- package/dist/scripts/codex-execution-surface.d.ts +16 -0
- package/dist/scripts/codex-execution-surface.d.ts.map +1 -0
- package/dist/scripts/codex-execution-surface.js +42 -0
- package/dist/scripts/codex-execution-surface.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +418 -76
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts +8 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +133 -19
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/generate-release-body.d.ts +1 -0
- package/dist/scripts/generate-release-body.d.ts.map +1 -1
- package/dist/scripts/generate-release-body.js +32 -3
- package/dist/scripts/generate-release-body.js.map +1 -1
- package/dist/scripts/hook-derived-watcher.js +46 -7
- package/dist/scripts/hook-derived-watcher.js.map +1 -1
- package/dist/scripts/notify-fallback-watcher.js +59 -9
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts +2 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts.map +1 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js +153 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js.map +1 -0
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +18 -1
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
- package/dist/scripts/notify-hook/process-runner.js +7 -3
- package/dist/scripts/notify-hook/process-runner.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +96 -11
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +3 -3
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts +34 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js +434 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js.map +1 -0
- package/dist/scripts/notify-hook/team-worker.d.ts +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +3 -43
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook.js +36 -5
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/postinstall.d.ts +1 -5
- package/dist/scripts/postinstall.d.ts.map +1 -1
- package/dist/scripts/postinstall.js +3 -42
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/scripts/prompt-inventory.d.ts +29 -0
- package/dist/scripts/prompt-inventory.d.ts.map +1 -0
- package/dist/scripts/prompt-inventory.js +178 -0
- package/dist/scripts/prompt-inventory.js.map +1 -0
- package/dist/scripts/run-test-files.js +32 -2
- package/dist/scripts/run-test-files.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +3 -0
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +9 -1
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/scripts/sync-plugin-mirror.d.ts +13 -0
- package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -0
- package/dist/scripts/sync-plugin-mirror.js +242 -0
- package/dist/scripts/sync-plugin-mirror.js.map +1 -0
- package/dist/scripts/verify-native-agents.d.ts +16 -0
- package/dist/scripts/verify-native-agents.d.ts.map +1 -0
- package/dist/scripts/verify-native-agents.js +188 -0
- package/dist/scripts/verify-native-agents.js.map +1 -0
- package/dist/session-history/search.d.ts.map +1 -1
- package/dist/session-history/search.js +7 -2
- package/dist/session-history/search.js.map +1 -1
- package/dist/sidecar/__tests__/boundary.test.d.ts +2 -0
- package/dist/sidecar/__tests__/boundary.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/boundary.test.js +48 -0
- package/dist/sidecar/__tests__/boundary.test.js.map +1 -0
- package/dist/sidecar/__tests__/collector.test.d.ts +2 -0
- package/dist/sidecar/__tests__/collector.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/collector.test.js +162 -0
- package/dist/sidecar/__tests__/collector.test.js.map +1 -0
- package/dist/sidecar/__tests__/render.test.d.ts +2 -0
- package/dist/sidecar/__tests__/render.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/render.test.js +67 -0
- package/dist/sidecar/__tests__/render.test.js.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts +2 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.js +30 -0
- package/dist/sidecar/__tests__/tmux.test.js.map +1 -0
- package/dist/sidecar/__tests__/watch.test.d.ts +2 -0
- package/dist/sidecar/__tests__/watch.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/watch.test.js +42 -0
- package/dist/sidecar/__tests__/watch.test.js.map +1 -0
- package/dist/sidecar/collector.d.ts +4 -0
- package/dist/sidecar/collector.d.ts.map +1 -0
- package/dist/sidecar/collector.js +377 -0
- package/dist/sidecar/collector.js.map +1 -0
- package/dist/sidecar/index.d.ts +25 -0
- package/dist/sidecar/index.d.ts.map +1 -0
- package/dist/sidecar/index.js +165 -0
- package/dist/sidecar/index.js.map +1 -0
- package/dist/sidecar/render.d.ts +3 -0
- package/dist/sidecar/render.d.ts.map +1 -0
- package/dist/sidecar/render.js +72 -0
- package/dist/sidecar/render.js.map +1 -0
- package/dist/sidecar/tmux.d.ts +13 -0
- package/dist/sidecar/tmux.d.ts.map +1 -0
- package/dist/sidecar/tmux.js +44 -0
- package/dist/sidecar/tmux.js.map +1 -0
- package/dist/sidecar/types.d.ts +125 -0
- package/dist/sidecar/types.d.ts.map +1 -0
- package/dist/sidecar/types.js +2 -0
- package/dist/sidecar/types.js.map +1 -0
- package/dist/state/__tests__/operations.test.js +50 -22
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/operations.d.ts +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +19 -7
- package/dist/state/operations.js.map +1 -1
- package/dist/team/__tests__/commit-hygiene.test.d.ts +2 -0
- package/dist/team/__tests__/commit-hygiene.test.d.ts.map +1 -0
- package/dist/team/__tests__/commit-hygiene.test.js +93 -0
- package/dist/team/__tests__/commit-hygiene.test.js.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts +2 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.js +69 -0
- package/dist/team/__tests__/delegation-policy.test.js.map +1 -0
- package/dist/team/__tests__/events.test.js +54 -4
- package/dist/team/__tests__/events.test.js.map +1 -1
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts +2 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js +78 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +18 -2
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts +2 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts.map +1 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js +95 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.js +677 -17
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.js +177 -1
- package/dist/team/__tests__/state-root.test.js.map +1 -1
- package/dist/team/__tests__/state.test.js +110 -0
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +301 -2
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +94 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/commit-hygiene.d.ts +22 -3
- package/dist/team/commit-hygiene.d.ts.map +1 -1
- package/dist/team/commit-hygiene.js +134 -2
- package/dist/team/commit-hygiene.js.map +1 -1
- package/dist/team/contracts.d.ts +1 -1
- package/dist/team/contracts.d.ts.map +1 -1
- package/dist/team/contracts.js +2 -0
- package/dist/team/contracts.js.map +1 -1
- package/dist/team/dag-schema.d.ts +38 -0
- package/dist/team/dag-schema.d.ts.map +1 -0
- package/dist/team/dag-schema.js +221 -0
- package/dist/team/dag-schema.js.map +1 -0
- package/dist/team/delegation-policy.d.ts +3 -0
- package/dist/team/delegation-policy.d.ts.map +1 -0
- package/dist/team/delegation-policy.js +82 -0
- package/dist/team/delegation-policy.js.map +1 -0
- package/dist/team/model-contract.d.ts +3 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +44 -5
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/repo-aware-decomposition.d.ts +60 -0
- package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
- package/dist/team/repo-aware-decomposition.js +229 -0
- package/dist/team/repo-aware-decomposition.js.map +1 -0
- package/dist/team/runtime.d.ts +34 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +191 -50
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/state/tasks.d.ts.map +1 -1
- package/dist/team/state/tasks.js +33 -0
- package/dist/team/state/tasks.js.map +1 -1
- package/dist/team/state/types.d.ts +23 -1
- package/dist/team/state/types.d.ts.map +1 -1
- package/dist/team/state/types.js.map +1 -1
- package/dist/team/state-root.d.ts +35 -0
- package/dist/team/state-root.d.ts.map +1 -1
- package/dist/team/state-root.js +281 -1
- package/dist/team/state-root.js.map +1 -1
- package/dist/team/state.d.ts +27 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +6 -0
- package/dist/team/state.js.map +1 -1
- package/dist/team/tmux-session.d.ts +1 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +83 -6
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +3 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +77 -4
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/utils/__tests__/agents-model-table.test.js +8 -0
- package/dist/utils/__tests__/agents-model-table.test.js.map +1 -1
- package/dist/utils/__tests__/paths.test.js +42 -9
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/agents-md.d.ts +3 -0
- package/dist/utils/agents-md.d.ts.map +1 -1
- package/dist/utils/agents-md.js +25 -0
- package/dist/utils/agents-md.js.map +1 -1
- package/dist/utils/agents-model-table.d.ts.map +1 -1
- package/dist/utils/agents-model-table.js +2 -3
- package/dist/utils/agents-model-table.js.map +1 -1
- package/package.json +14 -7
- package/plugins/oh-my-codex/.app.json +3 -0
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +30 -0
- package/plugins/oh-my-codex/.mcp.json +44 -0
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +114 -0
- package/plugins/oh-my-codex/skills/analyze/SKILL.md +148 -0
- package/plugins/oh-my-codex/skills/ask-claude/SKILL.md +61 -0
- package/plugins/oh-my-codex/skills/ask-gemini/SKILL.md +61 -0
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +231 -0
- package/plugins/oh-my-codex/skills/autoresearch/SKILL.md +68 -0
- package/plugins/oh-my-codex/skills/cancel/SKILL.md +399 -0
- package/plugins/oh-my-codex/skills/code-review/SKILL.md +290 -0
- package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +287 -0
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +464 -0
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +239 -0
- package/plugins/oh-my-codex/skills/help/SKILL.md +202 -0
- package/plugins/oh-my-codex/skills/hud/SKILL.md +98 -0
- package/plugins/oh-my-codex/skills/note/SKILL.md +62 -0
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +135 -0
- package/plugins/oh-my-codex/skills/pipeline/SKILL.md +86 -0
- package/plugins/oh-my-codex/skills/plan/SKILL.md +276 -0
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +269 -0
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +162 -0
- package/plugins/oh-my-codex/skills/security-review/SKILL.md +300 -0
- package/plugins/oh-my-codex/skills/skill/SKILL.md +835 -0
- package/plugins/oh-my-codex/skills/team/SKILL.md +510 -0
- package/plugins/oh-my-codex/skills/trace/SKILL.md +33 -0
- package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +143 -0
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +175 -0
- package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +153 -0
- package/plugins/oh-my-codex/skills/visual-verdict/SKILL.md +76 -0
- package/plugins/oh-my-codex/skills/wiki/SKILL.md +57 -0
- package/plugins/oh-my-codex/skills/worker/SKILL.md +106 -0
- package/prompts/critic.md +35 -83
- package/prompts/executor.md +32 -109
- package/prompts/explore-harness.md +1 -1
- package/prompts/explore.md +37 -90
- package/prompts/planner.md +28 -58
- package/prompts/researcher.md +46 -78
- package/prompts/verifier.md +23 -31
- package/skills/autopilot/SKILL.md +1 -4
- package/skills/deep-interview/SKILL.md +8 -5
- package/skills/doctor/SKILL.md +45 -17
- package/skills/help/SKILL.md +2 -2
- package/skills/omx-setup/SKILL.md +52 -9
- package/skills/plan/SKILL.md +1 -4
- package/skills/ralph/SKILL.md +3 -5
- package/skills/ralplan/SKILL.md +2 -6
- package/skills/team/SKILL.md +2 -5
- package/skills/ultraqa/SKILL.md +1 -4
- package/skills/ultrawork/SKILL.md +2 -3
- package/skills/visual-ralph/SKILL.md +153 -0
- package/skills/web-clone/SKILL.md +12 -354
- package/src/scripts/__tests__/codex-native-hook.test.ts +2306 -224
- package/src/scripts/__tests__/generate-release-body.test.ts +109 -0
- package/src/scripts/__tests__/hook-derived-watcher.test.ts +132 -2
- package/src/scripts/__tests__/postinstall.test.ts +7 -104
- package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
- package/src/scripts/__tests__/run-test-files.test.ts +72 -0
- package/src/scripts/__tests__/smoke-packed-install.test.ts +15 -0
- package/src/scripts/__tests__/verify-native-agents.test.ts +204 -0
- package/src/scripts/codex-execution-surface.ts +73 -0
- package/src/scripts/codex-native-hook.ts +579 -82
- package/src/scripts/codex-native-pre-post.ts +157 -19
- package/src/scripts/generate-release-body.ts +34 -2
- package/src/scripts/hook-derived-watcher.ts +51 -8
- package/src/scripts/notify-fallback-watcher.ts +65 -9
- package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
- package/src/scripts/notify-hook/managed-tmux.ts +22 -4
- package/src/scripts/notify-hook/process-runner.ts +7 -3
- package/src/scripts/notify-hook/team-dispatch.ts +103 -11
- package/src/scripts/notify-hook/team-tmux-guard.ts +3 -3
- package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
- package/src/scripts/notify-hook/team-worker.ts +4 -48
- package/src/scripts/notify-hook.ts +36 -5
- package/src/scripts/postinstall.ts +4 -58
- package/src/scripts/prompt-inventory.ts +218 -0
- package/src/scripts/run-test-files.ts +41 -2
- package/src/scripts/smoke-packed-install.ts +10 -1
- package/src/scripts/sync-plugin-mirror.ts +360 -0
- package/src/scripts/verify-native-agents.ts +245 -0
- package/templates/AGENTS.md +26 -91
- 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
|