oh-my-codex 0.18.13 → 0.18.15
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/Cargo.lock +6 -6
- package/Cargo.toml +1 -1
- package/README.md +41 -18
- package/dist/agents/__tests__/native-config.test.js +62 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +15 -2
- package/dist/agents/native-config.js.map +1 -1
- package/dist/autopilot/__tests__/fsm.test.js +7 -0
- package/dist/autopilot/__tests__/fsm.test.js.map +1 -1
- package/dist/autopilot/__tests__/planner-routing.test.d.ts +2 -0
- package/dist/autopilot/__tests__/planner-routing.test.d.ts.map +1 -0
- package/dist/autopilot/__tests__/planner-routing.test.js +74 -0
- package/dist/autopilot/__tests__/planner-routing.test.js.map +1 -0
- package/dist/autopilot/__tests__/ralplan-gate.test.js +315 -0
- package/dist/autopilot/__tests__/ralplan-gate.test.js.map +1 -1
- package/dist/autopilot/completion-gate.js +1 -1
- package/dist/autopilot/completion-gate.js.map +1 -1
- package/dist/autopilot/fsm.d.ts +2 -2
- package/dist/autopilot/fsm.d.ts.map +1 -1
- package/dist/autopilot/fsm.js +3 -0
- package/dist/autopilot/fsm.js.map +1 -1
- package/dist/autopilot/planner-routing.d.ts +21 -0
- package/dist/autopilot/planner-routing.d.ts.map +1 -0
- package/dist/autopilot/planner-routing.js +59 -0
- package/dist/autopilot/planner-routing.js.map +1 -0
- package/dist/autopilot/ralplan-gate.d.ts.map +1 -1
- package/dist/autopilot/ralplan-gate.js +30 -0
- package/dist/autopilot/ralplan-gate.js.map +1 -1
- package/dist/autoresearch/goal.d.ts.map +1 -1
- package/dist/autoresearch/goal.js +10 -1
- package/dist/autoresearch/goal.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-goal.test.js +33 -0
- package/dist/cli/__tests__/autoresearch-goal.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js +3 -0
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +30 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-artifact-ownership.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-artifact-ownership.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-artifact-ownership.test.js +158 -0
- package/dist/cli/__tests__/doctor-artifact-ownership.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-explore-deprecated.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-explore-deprecated.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-explore-deprecated.test.js +33 -0
- package/dist/cli/__tests__/doctor-explore-deprecated.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-spark-routing.test.js +13 -0
- package/dist/cli/__tests__/doctor-spark-routing.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +132 -2
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +5 -0
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-parity.test.js +40 -0
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/nested-help-routing.test.js +4 -0
- package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +7 -1
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/performance-goal.test.js +22 -0
- package/dist/cli/__tests__/performance-goal.test.js.map +1 -1
- package/dist/cli/__tests__/plugin-marketplace-idempotent.test.d.ts +2 -0
- package/dist/cli/__tests__/plugin-marketplace-idempotent.test.d.ts.map +1 -0
- package/dist/cli/__tests__/plugin-marketplace-idempotent.test.js +64 -0
- package/dist/cli/__tests__/plugin-marketplace-idempotent.test.js.map +1 -0
- package/dist/cli/__tests__/resume.test.js +96 -0
- package/dist/cli/__tests__/resume.test.js.map +1 -1
- package/dist/cli/__tests__/session-scoped-runtime.test.js +162 -0
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
- package/dist/cli/__tests__/session-search.test.js +36 -0
- package/dist/cli/__tests__/session-search.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +70 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +33 -0
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +17 -3
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +37 -0
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/update.test.js +81 -2
- package/dist/cli/__tests__/update.test.js.map +1 -1
- package/dist/cli/__tests__/url.test.d.ts +2 -0
- package/dist/cli/__tests__/url.test.d.ts.map +1 -0
- package/dist/cli/__tests__/url.test.js +82 -0
- package/dist/cli/__tests__/url.test.js.map +1 -0
- package/dist/cli/autoresearch-goal.d.ts.map +1 -1
- package/dist/cli/autoresearch-goal.js +2 -1
- package/dist/cli/autoresearch-goal.js.map +1 -1
- package/dist/cli/autoresearch-intake.d.ts.map +1 -1
- package/dist/cli/autoresearch-intake.js +2 -0
- package/dist/cli/autoresearch-intake.js.map +1 -1
- package/dist/cli/doctor.d.ts +39 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +460 -40
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +71 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/performance-goal.d.ts.map +1 -1
- package/dist/cli/performance-goal.js +4 -2
- package/dist/cli/performance-goal.js.map +1 -1
- package/dist/cli/plugin-marketplace.d.ts +1 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -1
- package/dist/cli/plugin-marketplace.js +88 -67
- package/dist/cli/plugin-marketplace.js.map +1 -1
- package/dist/cli/project-runtime-codex-homes.d.ts +2 -0
- package/dist/cli/project-runtime-codex-homes.d.ts.map +1 -1
- package/dist/cli/project-runtime-codex-homes.js +112 -5
- package/dist/cli/project-runtime-codex-homes.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +15 -6
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/ultragoal.d.ts.map +1 -1
- package/dist/cli/ultragoal.js +5 -1
- package/dist/cli/ultragoal.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +23 -4
- package/dist/cli/update.js.map +1 -1
- package/dist/cli/url.d.ts +8 -0
- package/dist/cli/url.d.ts.map +1 -0
- package/dist/cli/url.js +69 -0
- package/dist/cli/url.js.map +1 -0
- package/dist/config/__tests__/codex-hooks.test.js +20 -4
- package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
- package/dist/config/__tests__/models.test.js +21 -1
- 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 +1 -4
- package/dist/config/codex-hooks.js.map +1 -1
- package/dist/config/models.d.ts +5 -0
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +23 -0
- package/dist/config/models.js.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.d.ts +2 -0
- package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.js +10 -0
- package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +7 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +46 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +100 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +75 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +225 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +75 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +563 -0
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +187 -12
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +225 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.js +0 -0
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +75 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +4 -0
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +137 -2
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/__tests__/state.test.js +107 -0
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/tmux.test.js +17 -0
- package/dist/hud/__tests__/tmux.test.js.map +1 -1
- package/dist/hud/reconcile.d.ts.map +1 -1
- package/dist/hud/reconcile.js +21 -7
- package/dist/hud/reconcile.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +9 -0
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +43 -5
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +6 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +24 -1
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/state-paths.test.js +53 -0
- package/dist/mcp/__tests__/state-paths.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +2 -0
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +32 -6
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/state-paths.d.ts.map +1 -1
- package/dist/mcp/state-paths.js +11 -5
- package/dist/mcp/state-paths.js.map +1 -1
- package/dist/modes/__tests__/base-autopilot-gates.test.js +48 -0
- package/dist/modes/__tests__/base-autopilot-gates.test.js.map +1 -1
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +1 -0
- package/dist/modes/base.js.map +1 -1
- package/dist/notifications/__tests__/http-client.test.js +9 -0
- package/dist/notifications/__tests__/http-client.test.js.map +1 -1
- package/dist/notifications/http-client.js +1 -1
- package/dist/notifications/http-client.js.map +1 -1
- package/dist/performance-goal/artifacts.d.ts.map +1 -1
- package/dist/performance-goal/artifacts.js +10 -1
- package/dist/performance-goal/artifacts.js.map +1 -1
- package/dist/ralplan/__tests__/consensus-gate.test.js +112 -0
- package/dist/ralplan/__tests__/consensus-gate.test.js.map +1 -1
- package/dist/ralplan/consensus-gate.d.ts +23 -0
- package/dist/ralplan/consensus-gate.d.ts.map +1 -1
- package/dist/ralplan/consensus-gate.js +133 -21
- package/dist/ralplan/consensus-gate.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +1251 -13
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +601 -24
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts +1 -0
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.js +279 -86
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +87 -8
- package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/run-compiled-ci.d.ts +2 -0
- package/dist/scripts/run-compiled-ci.d.ts.map +1 -0
- package/dist/scripts/run-compiled-ci.js +77 -0
- package/dist/scripts/run-compiled-ci.js.map +1 -0
- package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -1
- package/dist/scripts/sync-plugin-mirror.js +1 -0
- package/dist/scripts/sync-plugin-mirror.js.map +1 -1
- package/dist/session-history/search.d.ts.map +1 -1
- package/dist/session-history/search.js +24 -9
- package/dist/session-history/search.js.map +1 -1
- package/dist/sidecar/__tests__/args.test.d.ts +2 -0
- package/dist/sidecar/__tests__/args.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/args.test.js +18 -0
- package/dist/sidecar/__tests__/args.test.js.map +1 -0
- package/dist/sidecar/index.d.ts.map +1 -1
- package/dist/sidecar/index.js +12 -4
- package/dist/sidecar/index.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +107 -3
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +57 -2
- package/dist/state/operations.js.map +1 -1
- package/dist/team/__tests__/delivery-e2e-smoke.test.js +22 -1
- package/dist/team/__tests__/delivery-e2e-smoke.test.js.map +1 -1
- package/dist/team/__tests__/model-contract.test.js +57 -1
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +1468 -110
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +63 -0
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/state.test.js +24 -1
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +512 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +42 -9
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/model-contract.d.ts +16 -0
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +41 -1
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +116 -30
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +9 -1
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/types.d.ts +2 -0
- package/dist/team/state/types.d.ts.map +1 -1
- package/dist/team/state/types.js.map +1 -1
- package/dist/team/state.d.ts +3 -0
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +20 -0
- package/dist/team/state.js.map +1 -1
- package/dist/team/tmux-session.d.ts +38 -3
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +275 -36
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +26 -1
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/ultragoal/__tests__/artifacts.test.js +388 -0
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
- package/dist/ultragoal/__tests__/docs-contract.test.js +3 -0
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
- package/dist/ultragoal/artifacts.d.ts +23 -0
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +275 -12
- package/dist/ultragoal/artifacts.js.map +1 -1
- package/dist/url-reader/__tests__/url-reader.test.d.ts +2 -0
- package/dist/url-reader/__tests__/url-reader.test.d.ts.map +1 -0
- package/dist/url-reader/__tests__/url-reader.test.js +433 -0
- package/dist/url-reader/__tests__/url-reader.test.js.map +1 -0
- package/dist/url-reader/index.d.ts +4 -0
- package/dist/url-reader/index.d.ts.map +1 -0
- package/dist/url-reader/index.js +522 -0
- package/dist/url-reader/index.js.map +1 -0
- package/dist/url-reader/types.d.ts +41 -0
- package/dist/url-reader/types.d.ts.map +1 -0
- package/dist/url-reader/types.js +2 -0
- package/dist/url-reader/types.js.map +1 -0
- package/dist/utils/__tests__/agents-md.test.js +39 -1
- package/dist/utils/__tests__/agents-md.test.js.map +1 -1
- package/dist/utils/__tests__/agents-model-table.test.js +28 -0
- package/dist/utils/__tests__/agents-model-table.test.js.map +1 -1
- package/dist/utils/agents-md.d.ts +4 -0
- package/dist/utils/agents-md.d.ts.map +1 -1
- package/dist/utils/agents-md.js +28 -0
- package/dist/utils/agents-md.js.map +1 -1
- package/dist/utils/agents-model-table.d.ts +7 -3
- package/dist/utils/agents-model-table.d.ts.map +1 -1
- package/dist/utils/agents-model-table.js +16 -8
- package/dist/utils/agents-model-table.js.map +1 -1
- package/dist/utils/platform-command.d.ts +7 -1
- package/dist/utils/platform-command.d.ts.map +1 -1
- package/dist/utils/platform-command.js +12 -1
- package/dist/utils/platform-command.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +4 -0
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- package/dist/vscode/__tests__/index.test.d.ts +2 -0
- package/dist/vscode/__tests__/index.test.d.ts.map +1 -0
- package/dist/vscode/__tests__/index.test.js +236 -0
- package/dist/vscode/__tests__/index.test.js.map +1 -0
- package/dist/vscode/index.d.ts +76 -0
- package/dist/vscode/index.d.ts.map +1 -0
- package/dist/vscode/index.js +196 -0
- package/dist/vscode/index.js.map +1 -0
- package/package.json +3 -3
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +59 -8
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +9 -5
- package/plugins/oh-my-codex/skills/autoresearch-goal/SKILL.md +3 -0
- package/plugins/oh-my-codex/skills/performance-goal/SKILL.md +3 -0
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +22 -4
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +2 -2
- package/plugins/oh-my-codex/skills/ultrawork/references/agent-tiers.md +61 -0
- package/skills/autopilot/SKILL.md +9 -5
- package/skills/autoresearch-goal/SKILL.md +3 -0
- package/skills/ecomode/SKILL.md +1 -1
- package/skills/ecomode/references/agent-tiers.md +61 -0
- package/skills/performance-goal/SKILL.md +3 -0
- package/skills/ralplan/SKILL.md +1 -1
- package/skills/ultragoal/SKILL.md +22 -4
- package/skills/ultrawork/SKILL.md +2 -2
- package/skills/ultrawork/references/agent-tiers.md +61 -0
- package/src/scripts/__tests__/codex-native-hook.test.ts +1560 -181
- package/src/scripts/codex-native-hook.ts +663 -24
- package/src/scripts/notify-hook/team-leader-nudge.ts +298 -91
- package/src/scripts/notify-hook/team-tmux-guard.ts +92 -8
- package/src/scripts/notify-hook/tmux-injection.ts +1 -1
- package/src/scripts/run-compiled-ci.ts +85 -0
- package/src/scripts/sync-plugin-mirror.ts +1 -0
- package/templates/AGENTS.md +6 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from 'node:child_process';
|
|
3
|
+
import { extname } from 'node:path';
|
|
3
4
|
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
4
5
|
import { dirname, join, resolve } from 'node:path';
|
|
5
6
|
import { fileURLToPath } from 'node:url';
|
|
@@ -118,6 +119,18 @@ function detectStopHookInput(input) {
|
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
function detectCompactHookInput(input) {
|
|
123
|
+
const text = input.toString('utf8');
|
|
124
|
+
try {
|
|
125
|
+
const parsed = JSON.parse(text);
|
|
126
|
+
const eventName = parsed?.hook_event_name ?? parsed?.hookEventName ?? parsed?.event ?? parsed?.name;
|
|
127
|
+
return eventName === 'PreCompact' || eventName === 'PostCompact';
|
|
128
|
+
} catch {
|
|
129
|
+
const eventName = extractTopLevelHookEventName(text);
|
|
130
|
+
return eventName === 'PreCompact' || eventName === 'PostCompact';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
121
134
|
async function readBoundedStdin() {
|
|
122
135
|
const chunks = [];
|
|
123
136
|
let totalBytes = 0;
|
|
@@ -149,13 +162,21 @@ function writeStopFallback(stopReason, detail) {
|
|
|
149
162
|
process.exitCode = 0;
|
|
150
163
|
}
|
|
151
164
|
|
|
152
|
-
function
|
|
165
|
+
function writeCompactFallback() {
|
|
166
|
+
process.exitCode = 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function failLauncher(error, isStop, isCompact, stopReason = 'plugin_stop_hook_launcher_failure') {
|
|
153
170
|
const detail = error instanceof Error ? error.message : String(error);
|
|
154
171
|
console.error(`[oh-my-codex] ${detail}`);
|
|
155
172
|
if (isStop) {
|
|
156
173
|
writeStopFallback(stopReason, detail);
|
|
157
174
|
return;
|
|
158
175
|
}
|
|
176
|
+
if (isCompact) {
|
|
177
|
+
writeCompactFallback();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
159
180
|
process.exitCode = 1;
|
|
160
181
|
}
|
|
161
182
|
|
|
@@ -184,6 +205,22 @@ function readConfiguredLauncher() {
|
|
|
184
205
|
return readPinnedLauncher() ?? { command: 'omx', argsPrefix: [] };
|
|
185
206
|
}
|
|
186
207
|
|
|
208
|
+
function buildSpawnOptions(command) {
|
|
209
|
+
const options = {
|
|
210
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
211
|
+
env: process.env,
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
if (process.platform !== 'win32') return options;
|
|
215
|
+
|
|
216
|
+
const extension = extname(command).toLowerCase();
|
|
217
|
+
if (extension === '.exe' || extension === '.com') {
|
|
218
|
+
return { ...options, windowsHide: true };
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return { ...options, shell: true, windowsHide: true };
|
|
222
|
+
}
|
|
223
|
+
|
|
187
224
|
function readJsonFile(path) {
|
|
188
225
|
try {
|
|
189
226
|
return JSON.parse(readFileSync(path, 'utf8'));
|
|
@@ -292,6 +329,7 @@ function writeJsonNoop() {
|
|
|
292
329
|
async function main() {
|
|
293
330
|
const { input, oversized, totalBytes } = await readBoundedStdin();
|
|
294
331
|
const isStop = detectStopHookInput(input);
|
|
332
|
+
const isCompact = detectCompactHookInput(input);
|
|
295
333
|
|
|
296
334
|
if (oversized) {
|
|
297
335
|
const message = `plugin hook stdin exceeded ${MAX_WRAPPER_STDIN_BYTES} bytes before launcher delegation; totalBytes>${totalBytes}`;
|
|
@@ -313,16 +351,12 @@ async function main() {
|
|
|
313
351
|
try {
|
|
314
352
|
launcher = readConfiguredLauncher();
|
|
315
353
|
} catch (error) {
|
|
316
|
-
failLauncher(error, isStop);
|
|
354
|
+
failLauncher(error, isStop, isCompact);
|
|
317
355
|
return;
|
|
318
356
|
}
|
|
319
357
|
|
|
320
358
|
const { command, argsPrefix } = launcher;
|
|
321
|
-
const child = spawn(command, [...argsPrefix, 'codex-native-hook'],
|
|
322
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
323
|
-
env: process.env,
|
|
324
|
-
shell: process.platform === 'win32',
|
|
325
|
-
});
|
|
359
|
+
const child = spawn(command, [...argsPrefix, 'codex-native-hook'], buildSpawnOptions(command));
|
|
326
360
|
|
|
327
361
|
const stdoutChunks = [];
|
|
328
362
|
let stdoutBytes = 0;
|
|
@@ -348,7 +382,7 @@ async function main() {
|
|
|
348
382
|
child.kill();
|
|
349
383
|
}
|
|
350
384
|
}
|
|
351
|
-
} else {
|
|
385
|
+
} else if (!isCompact) {
|
|
352
386
|
process.stdout.write(chunk);
|
|
353
387
|
}
|
|
354
388
|
});
|
|
@@ -377,6 +411,11 @@ async function main() {
|
|
|
377
411
|
return;
|
|
378
412
|
}
|
|
379
413
|
|
|
414
|
+
if (isCompact) {
|
|
415
|
+
process.exitCode = 0;
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
|
|
380
419
|
if (isStop && stdoutBytes === 0) {
|
|
381
420
|
if (childSpawnError) {
|
|
382
421
|
writeStopFallback('plugin_stop_hook_launcher_spawn_error', `failed to launch ${command} codex-native-hook: ${childSpawnError.message}`);
|
|
@@ -398,6 +437,18 @@ async function main() {
|
|
|
398
437
|
return;
|
|
399
438
|
}
|
|
400
439
|
|
|
440
|
+
if (isCompact) {
|
|
441
|
+
if (childSpawnError) {
|
|
442
|
+
console.error(`[oh-my-codex] failed to launch ${command} codex-native-hook: ${childSpawnError.message}`);
|
|
443
|
+
} else if (signal) {
|
|
444
|
+
console.error(`[oh-my-codex] codex-native-hook terminated by ${signal}`);
|
|
445
|
+
} else if (code && code !== 0) {
|
|
446
|
+
console.error(`[oh-my-codex] codex-native-hook exited with code ${code}`);
|
|
447
|
+
}
|
|
448
|
+
process.exitCode = 0;
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
|
|
401
452
|
if (childSpawnError) {
|
|
402
453
|
console.error(`[oh-my-codex] failed to launch ${command} codex-native-hook: ${childSpawnError.message}`);
|
|
403
454
|
process.exitCode = 1;
|
|
@@ -37,7 +37,8 @@ Autopilot must not run a separate broad expansion/planning/execution/QA/validati
|
|
|
37
37
|
|
|
38
38
|
2. **Phase `ralplan`** — consensus planning gate
|
|
39
39
|
- Ground the task with pre-context intake and the deep-interview artifact.
|
|
40
|
-
-
|
|
40
|
+
- Current ownership rule: Autopilot records `planning_routing` in state before heavy planning. When the Autopilot/main model resolves to a cheap/mini lane (for example `o4-mini`, `*-mini`, `*spark*`, or an explicitly cheap/economy/lite model name), the initial planning/decomposition owner is dedicated `[planner]`; otherwise `[main]` may keep ownership for backward compatibility. A configured `agentModels.planner` is an explicit opt-in that forces dedicated `[planner]` ownership even when `[main]` is not cheap/mini.
|
|
41
|
+
- Run or resume `$ralplan` to produce/update PRD and test-spec artifacts. If `planning_routing.owner` is `planner`, use the dedicated `[planner]` role for the initial Planner draft/decomposition before the Architect→Critic consensus gates.
|
|
41
42
|
- PRD/test-spec files alone are not completion evidence. Ralplan may hand off only after durable consensus evidence records a subsequent `Architect` approval first and a subsequent `Critic` approval second.
|
|
42
43
|
- When returning from a non-clean review or QA pass, include `return_to_ralplan_reason` and the findings as first-class planning input.
|
|
43
44
|
- If either review is missing, blocked, out of order, or non-approving, remain in `ralplan` or report an explicit blocker/max-iteration outcome; do not progress to `$ultragoal`, `$team`, `$ralph`, or implementation.
|
|
@@ -53,7 +54,7 @@ Autopilot must not run a separate broad expansion/planning/execution/QA/validati
|
|
|
53
54
|
- Run `$code-review` on the diff/artifacts produced by `$ultragoal`.
|
|
54
55
|
- A clean review means final recommendation `APPROVE` with architectural status `CLEAR`.
|
|
55
56
|
- `COMMENT`, `REQUEST CHANGES`, any architectural `WATCH`/`BLOCK`, or any unresolved finding is not clean.
|
|
56
|
-
- If not clean, increment the review cycle, persist `review_verdict`, set `
|
|
57
|
+
- If not clean because the implementation must be repaired, increment the review cycle, persist `review_verdict`, set `current_phase:"rework"`, and carry the findings as the sanctioned execution-fix input. Return to Phase `ralplan` only when the review shows the plan/requirements are wrong or incomplete.
|
|
57
58
|
|
|
58
59
|
5. **Phase `ultraqa`** — adversarial QA gate
|
|
59
60
|
- Run `$ultraqa` after a clean code review when user-facing behavior, workflows, CLI/runtime behavior, integration surfaces, or regression risk warrant adversarial QA.
|
|
@@ -84,7 +85,7 @@ Before Phase `deep-interview` or `ralplan` starts or resumes:
|
|
|
84
85
|
- Always execute the recommended phases in order: `deep-interview`, then `ralplan`, then `ultragoal`, then `code-review`, then `ultraqa`.
|
|
85
86
|
- `$team` is conditional and explicit: use it only within an Ultragoal story when parallel execution materially improves throughput, quality, or safety.
|
|
86
87
|
- Never skip directly from vague/freeform expansion to implementation; unclear input must be clarified and planned through `$deep-interview` and `$ralplan`.
|
|
87
|
-
- A non-clean `$code-review`
|
|
88
|
+
- A non-clean `$code-review` that requires implementation repair enters Phase `rework`; a non-clean review that changes the plan/requirements, or failed `$ultraqa`, returns to `$ralplan`.
|
|
88
89
|
- Each phase must write/update Autopilot state before handing off.
|
|
89
90
|
- Use existing hooks, `.omx/state`, `$deep-interview`, `$ralplan`, `$ultragoal`, optional `$team`, `$code-review`, `$ultraqa`, and pipeline primitives; do not invent a separate execution framework.
|
|
90
91
|
- Preserve legacy compatibility: if a user explicitly requests the old Ralph execution lane, use `$ralph` as an intentional alternate execution phase, but do not present it as Autopilot's default recommended loop.
|
|
@@ -140,8 +141,9 @@ Required fields:
|
|
|
140
141
|
- **On missing ralplan consensus evidence**: keep `current_phase:"ralplan"`, persist `ralplan_consensus_gate.complete:false` with `blocked_reason`, and report an explicit blocker or max-iteration outcome instead of handing off to execution.
|
|
141
142
|
- **On ultragoal -> code-review**: set `current_phase:"code-review"`, persist implementation/test/ledger evidence under `handoff_artifacts.ultragoal`.
|
|
142
143
|
- **On code-review -> ultraqa**: set `current_phase:"ultraqa"` only after a real `$code-review` stage/subagent has produced durable evidence; persist the clean review under `handoff_artifacts.code_review` with its source thread/tool/stage reference. Do not author `review_verdict:{clean:true}` from the leader's own summary.
|
|
144
|
+
- **On non-clean code-review requiring implementation repair**: increment `review_cycle`, set `current_phase:"rework"`, persist `review_verdict`, persist the phase handoff under `handoff_artifacts.code_review`, and keep the fix scoped to the review findings before returning to `code-review`.
|
|
143
145
|
- **On clean review + passed/skipped QA**: set `active:false`, `current_phase:"complete"`, persist `review_verdict:{recommendation:"APPROVE", architectural_status:"CLEAR", clean:true}`, `qa_verdict:{clean:true, skipped:<boolean>, reason:<string|null>}`, and `completed_at` only when both gates have durable source evidence. Required evidence is either (a) actual `$code-review`/`$ultraqa` stage or native-subagent/thread/tool records, or (b) for QA only, an explicit persisted skip reason for a documented docs-only/trivially non-runtime condition. If that evidence is missing, keep the active phase at `code-review` or `ultraqa` and record a blocker instead of self-attesting a clean gate.
|
|
144
|
-
- **On non-clean review or failed QA**: increment `iteration` and `review_cycle`, set `current_phase:"ralplan"`, persist `review_verdict` or `qa_verdict`, persist the phase handoff, and set `return_to_ralplan_reason` to a concise findings-driven reason.
|
|
146
|
+
- **On non-clean review requiring plan changes or failed QA**: increment `iteration` and `review_cycle`, set `current_phase:"ralplan"`, persist `review_verdict` or `qa_verdict`, persist the phase handoff, and set `return_to_ralplan_reason` to a concise findings-driven reason.
|
|
145
147
|
- **Legacy Ralph state**: if a user explicitly selected the legacy Ralph execution lane, phase names and handoff keys may include `ralph`; preserve and resume them rather than rewriting history to Ultragoal.
|
|
146
148
|
- **On cancellation**: run `$cancel`; preserve progress for resume rather than deleting handoff artifacts.
|
|
147
149
|
</State_Management>
|
|
@@ -151,6 +153,7 @@ When the user says `continue`, `resume`, or `keep going` while Autopilot is acti
|
|
|
151
153
|
- `deep-interview`: clarify requirements and record the handoff artifact.
|
|
152
154
|
- `ralplan`: run/update consensus planning from current handoffs and any `return_to_ralplan_reason`.
|
|
153
155
|
- `ultragoal`: execute the approved plan durably and record verification/ledger evidence.
|
|
156
|
+
- `rework`: perform only the implementation fixes required by the current code-review findings, record fresh implementation/verification evidence, and return to `code-review`.
|
|
154
157
|
- `team`: continue explicit team work only when it is nested under the active Ultragoal story and report evidence back to the leader.
|
|
155
158
|
- `code-review`: review the current diff and decide clean vs return-to-ralplan.
|
|
156
159
|
- `ultraqa`: run or explicitly skip adversarial QA based on the documented condition, then finish if clean or transition to `ralplan` with findings if not clean.
|
|
@@ -167,7 +170,7 @@ Autopilot may be represented by the configurable pipeline orchestrator (`src/pip
|
|
|
167
170
|
deep-interview -> ralplan -> ultragoal -> code-review -> ultraqa
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
Pipeline state should use `current_phase` values that match the same phase names (`deep-interview`, `ralplan`, `ultragoal`, `code-review`, `ultraqa`, `complete`, `failed`) and should carry `iteration`, `review_cycle`, `handoff_artifacts`, `review_verdict`, `qa_verdict`, and `return_to_ralplan_reason` alongside stage results. `$team` is not a default pipeline stage; it is an explicit conditional execution engine inside an Ultragoal story.
|
|
173
|
+
Pipeline state should use `current_phase` values that match the same phase names (`deep-interview`, `ralplan`, `ultragoal`, `rework`, `code-review`, `ultraqa`, `complete`, `failed`) and should carry `iteration`, `review_cycle`, `handoff_artifacts`, `review_verdict`, `qa_verdict`, and `return_to_ralplan_reason` alongside stage results. `$team` is not a default pipeline stage; it is an explicit conditional execution engine inside an Ultragoal story.
|
|
171
174
|
</Pipeline_Orchestrator>
|
|
172
175
|
|
|
173
176
|
<Escalation_And_Stop_Conditions>
|
|
@@ -181,6 +184,7 @@ Pipeline state should use `current_phase` values that match the same phase names
|
|
|
181
184
|
- [ ] Phase `deep-interview` produced/updated clarified requirements or a concise spec
|
|
182
185
|
- [ ] Phase `ralplan` produced/updated approved planning artifacts and durable sequential evidence from a subsequent `Architect` approval followed by a subsequent `Critic` approval
|
|
183
186
|
- [ ] Phase `ultragoal` implemented and verified the plan with fresh evidence and durable ledger/checkpoint references
|
|
187
|
+
- [ ] Phase `rework` was used for implementation-only review fixes when applicable, with findings scoped to a fresh code-review cycle
|
|
184
188
|
- [ ] `$team` was used only if the active Ultragoal story needed coordinated parallel work, or explicitly recorded as not needed
|
|
185
189
|
- [ ] Phase `code-review` returned a clean verdict (`APPROVE` + `CLEAR`)
|
|
186
190
|
- [ ] Phase `ultraqa` passed, or was explicitly skipped because the change was docs-only/trivially non-runtime with evidence
|
|
@@ -31,6 +31,9 @@ Use this workflow when a research mission should be bound to Codex goal-mode foc
|
|
|
31
31
|
5. Completion is blocked until professor-critic validation records `verdict=pass`. After the mission audit passes, call `update_goal({status: "complete"})`, call `get_goal` again, then run:
|
|
32
32
|
`omx autoresearch-goal complete --slug <slug> --codex-goal-json <get_goal-json-or-path>`
|
|
33
33
|
6. Treat the completion command as read-only reconciliation plus durable OMX state update; hooks and shell commands must not mutate Codex goal state.
|
|
34
|
+
7. After the completion command succeeds, run `/goal clear` in the Codex UI before starting another goal in this same thread/session. OMX prints this terminal cleanup step but does not invoke hidden clear routes.
|
|
34
35
|
|
|
35
36
|
## Completion gate
|
|
36
37
|
A passing professor-critic artifact and a matching complete Codex `get_goal` snapshot are required. Assistant prose, partial tests, or a failed/blocked verdict are not sufficient.
|
|
38
|
+
|
|
39
|
+
Lifecycle: `create_goal` starts the Codex thread goal, `update_goal({status: "complete"})` marks terminal success after the professor-critic and audit pass, and `/goal clear` removes the completed thread goal when another same-thread goal is needed. OMX shell commands and hooks reconcile snapshots and print the cleanup instruction; they must not mutate hidden Codex goal state.
|
|
@@ -55,6 +55,7 @@ omx performance-goal complete --slug startup-latency --evidence "final evaluator
|
|
|
55
55
|
- call `create_goal` only when no active goal exists and the objective is explicit;
|
|
56
56
|
- work only against the evaluator contract;
|
|
57
57
|
- after evaluator pass and completion audit, call `update_goal({status: "complete"})`, call `get_goal` again, and pass that snapshot to `omx performance-goal complete --codex-goal-json`;
|
|
58
|
+
- after `omx performance-goal complete` succeeds, run `/goal clear` in the Codex UI before starting another goal in this same thread/session; OMX prints this terminal cleanup step but does not invoke hidden clear routes;
|
|
58
59
|
3. Optimize in small reversible patches.
|
|
59
60
|
4. Run the evaluator and related regression tests.
|
|
60
61
|
5. Record each pass/fail/blocker with `checkpoint`.
|
|
@@ -63,3 +64,5 @@ omx performance-goal complete --slug startup-latency --evidence "final evaluator
|
|
|
63
64
|
## Completion Gate
|
|
64
65
|
|
|
65
66
|
A performance goal is incomplete unless `.omx/goals/performance/<slug>/state.json` contains a `lastValidation.status` of `pass` and `omx performance-goal complete` receives a matching complete Codex `get_goal` snapshot via `--codex-goal-json`. Passing ordinary tests alone is not sufficient unless they are the declared evaluator contract.
|
|
67
|
+
|
|
68
|
+
Lifecycle: `create_goal` starts the Codex thread goal, `update_goal({status: "complete"})` marks terminal success after the evaluator and audit pass, and `/goal clear` removes the completed thread goal when another same-thread goal is needed. OMX shell commands and hooks reconcile snapshots and print the cleanup instruction; they must not mutate hidden Codex goal state.
|
|
@@ -42,7 +42,7 @@ $plan --consensus --interactive <arguments>
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
The consensus workflow:
|
|
45
|
-
1. **Planner** creates an adaptive plan (right-sized to task scope; do not default to exactly five steps) and a compact **RALPLAN-DR summary** before review:
|
|
45
|
+
1. **Planner** creates an adaptive plan (right-sized to task scope; do not default to exactly five steps) and a compact **RALPLAN-DR summary** before review. Current `[main]` vs `[planner]` behavior: standalone `$ralplan` may be authored by the active main planning lane unless the caller/runtime supplies a dedicated planner routing record; inside `$autopilot`, state field `planning_routing.owner:"planner"` means the initial Planner draft/decomposition must use dedicated `[planner]`. Set `.omx-config.json` `agentModels.planner` to opt into a specific planner model and force dedicated planner ownership for complex Autopilot planning even when `[main]` is not cheap/mini. The RALPLAN-DR summary includes:
|
|
46
46
|
- Principles (3-5)
|
|
47
47
|
- Decision Drivers (top 3)
|
|
48
48
|
- Viable Options (>=2) with bounded pros/cons
|
|
@@ -94,8 +94,10 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
94
94
|
1. Run targeted verification for the story.
|
|
95
95
|
2. Run `ai-slop-cleaner` on changed files only; if there are no relevant edits, the cleaner still runs and records a passed/no-op report.
|
|
96
96
|
3. Rerun verification after the cleaner pass.
|
|
97
|
-
4. Run
|
|
98
|
-
5.
|
|
97
|
+
4. Run the architecture-invariant audit: derive non-negotiable architecture/domain invariants from the brief/spec/interview/accepted steering/goal artifacts, list the source artifacts, and prove each required invariant with implementation, test, and independent review evidence.
|
|
98
|
+
5. Run `$code-review` through the independent review path. Clean means `codeReview.recommendation: "APPROVE"`, `codeReview.architectStatus: "CLEAR"`, `codeReview.independentReview` contains distinct completed `code-reviewer` and `architect` subagent evidence, and `architectureInvariantGate.status: "passed"` proves every required invariant. `COMMENT`, `WATCH`, `REQUEST CHANGES`, `BLOCK`, missing subagent evidence, unavailable delegation, same-lane/self-review, and unproved architecture invariants are non-clean.
|
|
99
|
+
6. If review or invariant proof is non-clean, do **not** call `update_goal`. Record durable blocker work instead:
|
|
100
|
+
|
|
99
101
|
|
|
100
102
|
```sh
|
|
101
103
|
omx ultragoal record-review-blockers --goal-id <id> --title "Resolve final code-review blockers" --objective "<blocker-resolution objective>" --evidence "<review findings>" --codex-goal-json <active-get-goal-json-or-path>
|
|
@@ -103,7 +105,8 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
103
105
|
|
|
104
106
|
This marks the current story `review_blocked`, appends a pending blocker-resolution story, keeps the Codex goal active, and lets `omx ultragoal complete-goals` start the blocker next. In legacy per-story mode, the blocker may need an available Codex goal context because the old per-story Codex goal remains active/incomplete.
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
7. If review and invariant proof are clean, call `update_goal({status: "complete"})`, call `get_goal`, and checkpoint with a structured final gate:
|
|
109
|
+
|
|
107
110
|
|
|
108
111
|
```sh
|
|
109
112
|
omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<tests/files/review evidence>" --codex-goal-json <fresh-complete-get-goal-json-or-path> --quality-gate-json <quality-gate-json-or-path>
|
|
@@ -123,6 +126,21 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
123
126
|
"codeReviewer": { "agentRole": "code-reviewer", "evidence": "code-reviewer subagent APPROVE evidence" },
|
|
124
127
|
"architect": { "agentRole": "architect", "evidence": "architect subagent CLEAR evidence" }
|
|
125
128
|
}
|
|
129
|
+
},
|
|
130
|
+
"architectureInvariantGate": {
|
|
131
|
+
"status": "passed",
|
|
132
|
+
"sourceArtifacts": [".omx/ultragoal/brief.md", ".omx/ultragoal/goals.json"],
|
|
133
|
+
"evidence": "final invariant audit proved all required architecture/domain invariants",
|
|
134
|
+
"invariants": [
|
|
135
|
+
{
|
|
136
|
+
"invariant": "Preserve the existing parser boundary.",
|
|
137
|
+
"source": ".omx/ultragoal/brief.md#architecture-invariants",
|
|
138
|
+
"status": "proved",
|
|
139
|
+
"implementationEvidence": "changed files preserve the parser boundary",
|
|
140
|
+
"testEvidence": "parser-boundary regression passed",
|
|
141
|
+
"reviewEvidence": "architect review confirmed the boundary is intact"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
126
144
|
}
|
|
127
145
|
}
|
|
128
146
|
```
|
|
@@ -131,7 +149,7 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
131
149
|
|
|
132
150
|
- The shell command cannot directly invoke Codex interactive `/goal`; it emits a model-facing handoff for the active Codex agent.
|
|
133
151
|
- Ultragoal intentionally does not invoke `/goal clear` or hidden `thread/goal/clear`; the model-facing tool surface only provides `get_goal`, `create_goal`, and `update_goal`.
|
|
134
|
-
- After a completed aggregate ultragoal run, clear the
|
|
152
|
+
- After a completed aggregate ultragoal run, `/goal clear` is the explicit terminal cleanup step before starting another goal in the same Codex thread/session: `create_goal` starts, `update_goal({status: "complete"})` marks terminal success, and `/goal clear` removes the completed thread goal for the next same-thread goal. OMX prints this next step but does not invoke hidden clear routes.
|
|
135
153
|
- Never call `create_goal` when `get_goal` reports a different active goal.
|
|
136
154
|
- Never call `update_goal` unless the aggregate run or legacy per-story goal is actually complete.
|
|
137
155
|
- In aggregate mode, intermediate story checkpoints require a matching `active` Codex snapshot; final story completion requires a matching `complete` snapshot after `update_goal`.
|
|
@@ -35,7 +35,7 @@ Sequential task execution wastes time when tasks are independent. Ultrawork keep
|
|
|
35
35
|
- When useful, run a direct-tool lane and one or more background evidence lanes at the same time. Evidence lanes can cover docs, tests, regression mapping, or bounded repo analysis.
|
|
36
36
|
- Fire independent agent calls simultaneously -- never serialize independent work.
|
|
37
37
|
- Always pass the `model` parameter explicitly when delegating.
|
|
38
|
-
- Read `
|
|
38
|
+
- Read `references/agent-tiers.md` before first delegation for agent selection guidance.
|
|
39
39
|
- Auto-delegate `researcher` when official docs, version-aware framework guidance, best practices, or external dependency behavior materially affect task correctness; treat it as an evidence lane, not a replacement primary workflow.
|
|
40
40
|
- Use `run_in_background: true` for operations over ~30 seconds (installs, builds, tests).
|
|
41
41
|
- Run quick commands (git status, file reads, simple checks) in the foreground.
|
|
@@ -44,7 +44,7 @@ Sequential task execution wastes time when tasks are independent. Ultrawork keep
|
|
|
44
44
|
</Execution_Policy>
|
|
45
45
|
|
|
46
46
|
<Steps>
|
|
47
|
-
1. **Read agent reference**: Load `
|
|
47
|
+
1. **Read agent reference**: Load `references/agent-tiers.md` for tier selection.
|
|
48
48
|
2. **Context + certainty check**:
|
|
49
49
|
- State the task intent in one sentence.
|
|
50
50
|
- List the constraints and unknowns that could invalidate a quick fix.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Agent Tiers
|
|
2
|
+
|
|
3
|
+
This file defines practical tier guidance for OMX agent routing.
|
|
4
|
+
|
|
5
|
+
## Mental Model
|
|
6
|
+
|
|
7
|
+
OMX now separates three concepts:
|
|
8
|
+
|
|
9
|
+
- `role`: what the agent is responsible for (`executor`, `planner`, `architect`)
|
|
10
|
+
- `tier`: how much reasoning/cost to spend (`LOW`, `STANDARD`, `THOROUGH`)
|
|
11
|
+
- `posture`: how the role behaves (`frontier-orchestrator`, `deep-worker`, `fast-lane`)
|
|
12
|
+
- `exactModel`: optional role pin that bypasses tier defaults when a role needs a
|
|
13
|
+
specific model contract.
|
|
14
|
+
|
|
15
|
+
Use role to choose responsibility, tier to choose depth, and posture to choose operating style.
|
|
16
|
+
|
|
17
|
+
## Tiers
|
|
18
|
+
|
|
19
|
+
- `LOW`:
|
|
20
|
+
Fast lookups and narrow checks.
|
|
21
|
+
Use for simple exploration, style checks, and lightweight doc edits.
|
|
22
|
+
Typical roles: `explore`, `style-reviewer`, `writer`.
|
|
23
|
+
|
|
24
|
+
- `STANDARD`:
|
|
25
|
+
Default tier for implementation, debugging, and normal verification.
|
|
26
|
+
Typical roles: `executor`, `debugger`, `test-engineer`, `quality-reviewer`.
|
|
27
|
+
|
|
28
|
+
- `THOROUGH`:
|
|
29
|
+
Use for architectural, security-sensitive, or high-impact multi-file work.
|
|
30
|
+
Typical roles: `architect`, `critic`, `security-reviewer`, `executor`.
|
|
31
|
+
Note: `deep-executor` is deprecated; route implementation to `executor`.
|
|
32
|
+
|
|
33
|
+
## Selection Rules
|
|
34
|
+
|
|
35
|
+
1. Start at `STANDARD` for most code changes.
|
|
36
|
+
2. Use `LOW` only when the task is bounded and non-invasive.
|
|
37
|
+
3. Escalate to `THOROUGH` for:
|
|
38
|
+
- security/auth/trust-boundary changes
|
|
39
|
+
- architectural decisions with system-wide impact
|
|
40
|
+
- large refactors across many files
|
|
41
|
+
4. For Ralph completion checks, use at least `STANDARD` architect verification.
|
|
42
|
+
|
|
43
|
+
## Posture Guidance
|
|
44
|
+
|
|
45
|
+
- `frontier-orchestrator`:
|
|
46
|
+
- Best for steerable frontier models and leader-style roles.
|
|
47
|
+
- Prioritizes intent classification, delegation, verification, and architectural judgment.
|
|
48
|
+
- Typical roles: `planner`, `analyst`, `architect`, `critic`, `code-reviewer`.
|
|
49
|
+
- Ralplan keeps `planner` and `architect` in this posture but pins them to
|
|
50
|
+
exact `gpt-5.4-mini` with high reasoning; the `critic` consensus gate stays
|
|
51
|
+
on the frontier lane.
|
|
52
|
+
|
|
53
|
+
- `deep-worker`:
|
|
54
|
+
- Best for implementation-heavy roles that should carry work to completion.
|
|
55
|
+
- Prioritizes direct execution, minimal diffs, and strict verification.
|
|
56
|
+
- Typical roles: `executor`, `debugger`, `test-engineer`, `build-fixer`.
|
|
57
|
+
|
|
58
|
+
- `fast-lane`:
|
|
59
|
+
- Best for cheap/fast models used for triage, search, and narrow synthesis.
|
|
60
|
+
- Prioritizes quick routing, concise search, and escalation over deep autonomous work.
|
|
61
|
+
- Typical roles: `explore`, `writer`, and lightweight research/search specialists.
|
|
@@ -37,7 +37,8 @@ Autopilot must not run a separate broad expansion/planning/execution/QA/validati
|
|
|
37
37
|
|
|
38
38
|
2. **Phase `ralplan`** — consensus planning gate
|
|
39
39
|
- Ground the task with pre-context intake and the deep-interview artifact.
|
|
40
|
-
-
|
|
40
|
+
- Current ownership rule: Autopilot records `planning_routing` in state before heavy planning. When the Autopilot/main model resolves to a cheap/mini lane (for example `o4-mini`, `*-mini`, `*spark*`, or an explicitly cheap/economy/lite model name), the initial planning/decomposition owner is dedicated `[planner]`; otherwise `[main]` may keep ownership for backward compatibility. A configured `agentModels.planner` is an explicit opt-in that forces dedicated `[planner]` ownership even when `[main]` is not cheap/mini.
|
|
41
|
+
- Run or resume `$ralplan` to produce/update PRD and test-spec artifacts. If `planning_routing.owner` is `planner`, use the dedicated `[planner]` role for the initial Planner draft/decomposition before the Architect→Critic consensus gates.
|
|
41
42
|
- PRD/test-spec files alone are not completion evidence. Ralplan may hand off only after durable consensus evidence records a subsequent `Architect` approval first and a subsequent `Critic` approval second.
|
|
42
43
|
- When returning from a non-clean review or QA pass, include `return_to_ralplan_reason` and the findings as first-class planning input.
|
|
43
44
|
- If either review is missing, blocked, out of order, or non-approving, remain in `ralplan` or report an explicit blocker/max-iteration outcome; do not progress to `$ultragoal`, `$team`, `$ralph`, or implementation.
|
|
@@ -53,7 +54,7 @@ Autopilot must not run a separate broad expansion/planning/execution/QA/validati
|
|
|
53
54
|
- Run `$code-review` on the diff/artifacts produced by `$ultragoal`.
|
|
54
55
|
- A clean review means final recommendation `APPROVE` with architectural status `CLEAR`.
|
|
55
56
|
- `COMMENT`, `REQUEST CHANGES`, any architectural `WATCH`/`BLOCK`, or any unresolved finding is not clean.
|
|
56
|
-
- If not clean, increment the review cycle, persist `review_verdict`, set `
|
|
57
|
+
- If not clean because the implementation must be repaired, increment the review cycle, persist `review_verdict`, set `current_phase:"rework"`, and carry the findings as the sanctioned execution-fix input. Return to Phase `ralplan` only when the review shows the plan/requirements are wrong or incomplete.
|
|
57
58
|
|
|
58
59
|
5. **Phase `ultraqa`** — adversarial QA gate
|
|
59
60
|
- Run `$ultraqa` after a clean code review when user-facing behavior, workflows, CLI/runtime behavior, integration surfaces, or regression risk warrant adversarial QA.
|
|
@@ -84,7 +85,7 @@ Before Phase `deep-interview` or `ralplan` starts or resumes:
|
|
|
84
85
|
- Always execute the recommended phases in order: `deep-interview`, then `ralplan`, then `ultragoal`, then `code-review`, then `ultraqa`.
|
|
85
86
|
- `$team` is conditional and explicit: use it only within an Ultragoal story when parallel execution materially improves throughput, quality, or safety.
|
|
86
87
|
- Never skip directly from vague/freeform expansion to implementation; unclear input must be clarified and planned through `$deep-interview` and `$ralplan`.
|
|
87
|
-
- A non-clean `$code-review`
|
|
88
|
+
- A non-clean `$code-review` that requires implementation repair enters Phase `rework`; a non-clean review that changes the plan/requirements, or failed `$ultraqa`, returns to `$ralplan`.
|
|
88
89
|
- Each phase must write/update Autopilot state before handing off.
|
|
89
90
|
- Use existing hooks, `.omx/state`, `$deep-interview`, `$ralplan`, `$ultragoal`, optional `$team`, `$code-review`, `$ultraqa`, and pipeline primitives; do not invent a separate execution framework.
|
|
90
91
|
- Preserve legacy compatibility: if a user explicitly requests the old Ralph execution lane, use `$ralph` as an intentional alternate execution phase, but do not present it as Autopilot's default recommended loop.
|
|
@@ -140,8 +141,9 @@ Required fields:
|
|
|
140
141
|
- **On missing ralplan consensus evidence**: keep `current_phase:"ralplan"`, persist `ralplan_consensus_gate.complete:false` with `blocked_reason`, and report an explicit blocker or max-iteration outcome instead of handing off to execution.
|
|
141
142
|
- **On ultragoal -> code-review**: set `current_phase:"code-review"`, persist implementation/test/ledger evidence under `handoff_artifacts.ultragoal`.
|
|
142
143
|
- **On code-review -> ultraqa**: set `current_phase:"ultraqa"` only after a real `$code-review` stage/subagent has produced durable evidence; persist the clean review under `handoff_artifacts.code_review` with its source thread/tool/stage reference. Do not author `review_verdict:{clean:true}` from the leader's own summary.
|
|
144
|
+
- **On non-clean code-review requiring implementation repair**: increment `review_cycle`, set `current_phase:"rework"`, persist `review_verdict`, persist the phase handoff under `handoff_artifacts.code_review`, and keep the fix scoped to the review findings before returning to `code-review`.
|
|
143
145
|
- **On clean review + passed/skipped QA**: set `active:false`, `current_phase:"complete"`, persist `review_verdict:{recommendation:"APPROVE", architectural_status:"CLEAR", clean:true}`, `qa_verdict:{clean:true, skipped:<boolean>, reason:<string|null>}`, and `completed_at` only when both gates have durable source evidence. Required evidence is either (a) actual `$code-review`/`$ultraqa` stage or native-subagent/thread/tool records, or (b) for QA only, an explicit persisted skip reason for a documented docs-only/trivially non-runtime condition. If that evidence is missing, keep the active phase at `code-review` or `ultraqa` and record a blocker instead of self-attesting a clean gate.
|
|
144
|
-
- **On non-clean review or failed QA**: increment `iteration` and `review_cycle`, set `current_phase:"ralplan"`, persist `review_verdict` or `qa_verdict`, persist the phase handoff, and set `return_to_ralplan_reason` to a concise findings-driven reason.
|
|
146
|
+
- **On non-clean review requiring plan changes or failed QA**: increment `iteration` and `review_cycle`, set `current_phase:"ralplan"`, persist `review_verdict` or `qa_verdict`, persist the phase handoff, and set `return_to_ralplan_reason` to a concise findings-driven reason.
|
|
145
147
|
- **Legacy Ralph state**: if a user explicitly selected the legacy Ralph execution lane, phase names and handoff keys may include `ralph`; preserve and resume them rather than rewriting history to Ultragoal.
|
|
146
148
|
- **On cancellation**: run `$cancel`; preserve progress for resume rather than deleting handoff artifacts.
|
|
147
149
|
</State_Management>
|
|
@@ -151,6 +153,7 @@ When the user says `continue`, `resume`, or `keep going` while Autopilot is acti
|
|
|
151
153
|
- `deep-interview`: clarify requirements and record the handoff artifact.
|
|
152
154
|
- `ralplan`: run/update consensus planning from current handoffs and any `return_to_ralplan_reason`.
|
|
153
155
|
- `ultragoal`: execute the approved plan durably and record verification/ledger evidence.
|
|
156
|
+
- `rework`: perform only the implementation fixes required by the current code-review findings, record fresh implementation/verification evidence, and return to `code-review`.
|
|
154
157
|
- `team`: continue explicit team work only when it is nested under the active Ultragoal story and report evidence back to the leader.
|
|
155
158
|
- `code-review`: review the current diff and decide clean vs return-to-ralplan.
|
|
156
159
|
- `ultraqa`: run or explicitly skip adversarial QA based on the documented condition, then finish if clean or transition to `ralplan` with findings if not clean.
|
|
@@ -167,7 +170,7 @@ Autopilot may be represented by the configurable pipeline orchestrator (`src/pip
|
|
|
167
170
|
deep-interview -> ralplan -> ultragoal -> code-review -> ultraqa
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
Pipeline state should use `current_phase` values that match the same phase names (`deep-interview`, `ralplan`, `ultragoal`, `code-review`, `ultraqa`, `complete`, `failed`) and should carry `iteration`, `review_cycle`, `handoff_artifacts`, `review_verdict`, `qa_verdict`, and `return_to_ralplan_reason` alongside stage results. `$team` is not a default pipeline stage; it is an explicit conditional execution engine inside an Ultragoal story.
|
|
173
|
+
Pipeline state should use `current_phase` values that match the same phase names (`deep-interview`, `ralplan`, `ultragoal`, `rework`, `code-review`, `ultraqa`, `complete`, `failed`) and should carry `iteration`, `review_cycle`, `handoff_artifacts`, `review_verdict`, `qa_verdict`, and `return_to_ralplan_reason` alongside stage results. `$team` is not a default pipeline stage; it is an explicit conditional execution engine inside an Ultragoal story.
|
|
171
174
|
</Pipeline_Orchestrator>
|
|
172
175
|
|
|
173
176
|
<Escalation_And_Stop_Conditions>
|
|
@@ -181,6 +184,7 @@ Pipeline state should use `current_phase` values that match the same phase names
|
|
|
181
184
|
- [ ] Phase `deep-interview` produced/updated clarified requirements or a concise spec
|
|
182
185
|
- [ ] Phase `ralplan` produced/updated approved planning artifacts and durable sequential evidence from a subsequent `Architect` approval followed by a subsequent `Critic` approval
|
|
183
186
|
- [ ] Phase `ultragoal` implemented and verified the plan with fresh evidence and durable ledger/checkpoint references
|
|
187
|
+
- [ ] Phase `rework` was used for implementation-only review fixes when applicable, with findings scoped to a fresh code-review cycle
|
|
184
188
|
- [ ] `$team` was used only if the active Ultragoal story needed coordinated parallel work, or explicitly recorded as not needed
|
|
185
189
|
- [ ] Phase `code-review` returned a clean verdict (`APPROVE` + `CLEAR`)
|
|
186
190
|
- [ ] Phase `ultraqa` passed, or was explicitly skipped because the change was docs-only/trivially non-runtime with evidence
|
|
@@ -31,6 +31,9 @@ Use this workflow when a research mission should be bound to Codex goal-mode foc
|
|
|
31
31
|
5. Completion is blocked until professor-critic validation records `verdict=pass`. After the mission audit passes, call `update_goal({status: "complete"})`, call `get_goal` again, then run:
|
|
32
32
|
`omx autoresearch-goal complete --slug <slug> --codex-goal-json <get_goal-json-or-path>`
|
|
33
33
|
6. Treat the completion command as read-only reconciliation plus durable OMX state update; hooks and shell commands must not mutate Codex goal state.
|
|
34
|
+
7. After the completion command succeeds, run `/goal clear` in the Codex UI before starting another goal in this same thread/session. OMX prints this terminal cleanup step but does not invoke hidden clear routes.
|
|
34
35
|
|
|
35
36
|
## Completion gate
|
|
36
37
|
A passing professor-critic artifact and a matching complete Codex `get_goal` snapshot are required. Assistant prose, partial tests, or a failed/blocked verdict are not sufficient.
|
|
38
|
+
|
|
39
|
+
Lifecycle: `create_goal` starts the Codex thread goal, `update_goal({status: "complete"})` marks terminal success after the professor-critic and audit pass, and `/goal clear` removes the completed thread goal when another same-thread goal is needed. OMX shell commands and hooks reconcile snapshots and print the cleanup instruction; they must not mutate hidden Codex goal state.
|
package/skills/ecomode/SKILL.md
CHANGED
|
@@ -47,7 +47,7 @@ Ecomode is a modifier that combines with execution modes:
|
|
|
47
47
|
|
|
48
48
|
**FIRST ACTION:** Before delegating any work, read the agent reference file:
|
|
49
49
|
```
|
|
50
|
-
Read file:
|
|
50
|
+
Read file: references/agent-tiers.md
|
|
51
51
|
```
|
|
52
52
|
This provides the complete agent tier matrix, MCP tool assignments, and selection guidance.
|
|
53
53
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Agent Tiers
|
|
2
|
+
|
|
3
|
+
This file defines practical tier guidance for OMX agent routing.
|
|
4
|
+
|
|
5
|
+
## Mental Model
|
|
6
|
+
|
|
7
|
+
OMX now separates three concepts:
|
|
8
|
+
|
|
9
|
+
- `role`: what the agent is responsible for (`executor`, `planner`, `architect`)
|
|
10
|
+
- `tier`: how much reasoning/cost to spend (`LOW`, `STANDARD`, `THOROUGH`)
|
|
11
|
+
- `posture`: how the role behaves (`frontier-orchestrator`, `deep-worker`, `fast-lane`)
|
|
12
|
+
- `exactModel`: optional role pin that bypasses tier defaults when a role needs a
|
|
13
|
+
specific model contract.
|
|
14
|
+
|
|
15
|
+
Use role to choose responsibility, tier to choose depth, and posture to choose operating style.
|
|
16
|
+
|
|
17
|
+
## Tiers
|
|
18
|
+
|
|
19
|
+
- `LOW`:
|
|
20
|
+
Fast lookups and narrow checks.
|
|
21
|
+
Use for simple exploration, style checks, and lightweight doc edits.
|
|
22
|
+
Typical roles: `explore`, `style-reviewer`, `writer`.
|
|
23
|
+
|
|
24
|
+
- `STANDARD`:
|
|
25
|
+
Default tier for implementation, debugging, and normal verification.
|
|
26
|
+
Typical roles: `executor`, `debugger`, `test-engineer`, `quality-reviewer`.
|
|
27
|
+
|
|
28
|
+
- `THOROUGH`:
|
|
29
|
+
Use for architectural, security-sensitive, or high-impact multi-file work.
|
|
30
|
+
Typical roles: `architect`, `critic`, `security-reviewer`, `executor`.
|
|
31
|
+
Note: `deep-executor` is deprecated; route implementation to `executor`.
|
|
32
|
+
|
|
33
|
+
## Selection Rules
|
|
34
|
+
|
|
35
|
+
1. Start at `STANDARD` for most code changes.
|
|
36
|
+
2. Use `LOW` only when the task is bounded and non-invasive.
|
|
37
|
+
3. Escalate to `THOROUGH` for:
|
|
38
|
+
- security/auth/trust-boundary changes
|
|
39
|
+
- architectural decisions with system-wide impact
|
|
40
|
+
- large refactors across many files
|
|
41
|
+
4. For Ralph completion checks, use at least `STANDARD` architect verification.
|
|
42
|
+
|
|
43
|
+
## Posture Guidance
|
|
44
|
+
|
|
45
|
+
- `frontier-orchestrator`:
|
|
46
|
+
- Best for steerable frontier models and leader-style roles.
|
|
47
|
+
- Prioritizes intent classification, delegation, verification, and architectural judgment.
|
|
48
|
+
- Typical roles: `planner`, `analyst`, `architect`, `critic`, `code-reviewer`.
|
|
49
|
+
- Ralplan keeps `planner` and `architect` in this posture but pins them to
|
|
50
|
+
exact `gpt-5.4-mini` with high reasoning; the `critic` consensus gate stays
|
|
51
|
+
on the frontier lane.
|
|
52
|
+
|
|
53
|
+
- `deep-worker`:
|
|
54
|
+
- Best for implementation-heavy roles that should carry work to completion.
|
|
55
|
+
- Prioritizes direct execution, minimal diffs, and strict verification.
|
|
56
|
+
- Typical roles: `executor`, `debugger`, `test-engineer`, `build-fixer`.
|
|
57
|
+
|
|
58
|
+
- `fast-lane`:
|
|
59
|
+
- Best for cheap/fast models used for triage, search, and narrow synthesis.
|
|
60
|
+
- Prioritizes quick routing, concise search, and escalation over deep autonomous work.
|
|
61
|
+
- Typical roles: `explore`, `writer`, and lightweight research/search specialists.
|
|
@@ -55,6 +55,7 @@ omx performance-goal complete --slug startup-latency --evidence "final evaluator
|
|
|
55
55
|
- call `create_goal` only when no active goal exists and the objective is explicit;
|
|
56
56
|
- work only against the evaluator contract;
|
|
57
57
|
- after evaluator pass and completion audit, call `update_goal({status: "complete"})`, call `get_goal` again, and pass that snapshot to `omx performance-goal complete --codex-goal-json`;
|
|
58
|
+
- after `omx performance-goal complete` succeeds, run `/goal clear` in the Codex UI before starting another goal in this same thread/session; OMX prints this terminal cleanup step but does not invoke hidden clear routes;
|
|
58
59
|
3. Optimize in small reversible patches.
|
|
59
60
|
4. Run the evaluator and related regression tests.
|
|
60
61
|
5. Record each pass/fail/blocker with `checkpoint`.
|
|
@@ -63,3 +64,5 @@ omx performance-goal complete --slug startup-latency --evidence "final evaluator
|
|
|
63
64
|
## Completion Gate
|
|
64
65
|
|
|
65
66
|
A performance goal is incomplete unless `.omx/goals/performance/<slug>/state.json` contains a `lastValidation.status` of `pass` and `omx performance-goal complete` receives a matching complete Codex `get_goal` snapshot via `--codex-goal-json`. Passing ordinary tests alone is not sufficient unless they are the declared evaluator contract.
|
|
67
|
+
|
|
68
|
+
Lifecycle: `create_goal` starts the Codex thread goal, `update_goal({status: "complete"})` marks terminal success after the evaluator and audit pass, and `/goal clear` removes the completed thread goal when another same-thread goal is needed. OMX shell commands and hooks reconcile snapshots and print the cleanup instruction; they must not mutate hidden Codex goal state.
|
package/skills/ralplan/SKILL.md
CHANGED
|
@@ -42,7 +42,7 @@ $plan --consensus --interactive <arguments>
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
The consensus workflow:
|
|
45
|
-
1. **Planner** creates an adaptive plan (right-sized to task scope; do not default to exactly five steps) and a compact **RALPLAN-DR summary** before review:
|
|
45
|
+
1. **Planner** creates an adaptive plan (right-sized to task scope; do not default to exactly five steps) and a compact **RALPLAN-DR summary** before review. Current `[main]` vs `[planner]` behavior: standalone `$ralplan` may be authored by the active main planning lane unless the caller/runtime supplies a dedicated planner routing record; inside `$autopilot`, state field `planning_routing.owner:"planner"` means the initial Planner draft/decomposition must use dedicated `[planner]`. Set `.omx-config.json` `agentModels.planner` to opt into a specific planner model and force dedicated planner ownership for complex Autopilot planning even when `[main]` is not cheap/mini. The RALPLAN-DR summary includes:
|
|
46
46
|
- Principles (3-5)
|
|
47
47
|
- Decision Drivers (top 3)
|
|
48
48
|
- Viable Options (>=2) with bounded pros/cons
|
|
@@ -94,8 +94,10 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
94
94
|
1. Run targeted verification for the story.
|
|
95
95
|
2. Run `ai-slop-cleaner` on changed files only; if there are no relevant edits, the cleaner still runs and records a passed/no-op report.
|
|
96
96
|
3. Rerun verification after the cleaner pass.
|
|
97
|
-
4. Run
|
|
98
|
-
5.
|
|
97
|
+
4. Run the architecture-invariant audit: derive non-negotiable architecture/domain invariants from the brief/spec/interview/accepted steering/goal artifacts, list the source artifacts, and prove each required invariant with implementation, test, and independent review evidence.
|
|
98
|
+
5. Run `$code-review` through the independent review path. Clean means `codeReview.recommendation: "APPROVE"`, `codeReview.architectStatus: "CLEAR"`, `codeReview.independentReview` contains distinct completed `code-reviewer` and `architect` subagent evidence, and `architectureInvariantGate.status: "passed"` proves every required invariant. `COMMENT`, `WATCH`, `REQUEST CHANGES`, `BLOCK`, missing subagent evidence, unavailable delegation, same-lane/self-review, and unproved architecture invariants are non-clean.
|
|
99
|
+
6. If review or invariant proof is non-clean, do **not** call `update_goal`. Record durable blocker work instead:
|
|
100
|
+
|
|
99
101
|
|
|
100
102
|
```sh
|
|
101
103
|
omx ultragoal record-review-blockers --goal-id <id> --title "Resolve final code-review blockers" --objective "<blocker-resolution objective>" --evidence "<review findings>" --codex-goal-json <active-get-goal-json-or-path>
|
|
@@ -103,7 +105,8 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
103
105
|
|
|
104
106
|
This marks the current story `review_blocked`, appends a pending blocker-resolution story, keeps the Codex goal active, and lets `omx ultragoal complete-goals` start the blocker next. In legacy per-story mode, the blocker may need an available Codex goal context because the old per-story Codex goal remains active/incomplete.
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
7. If review and invariant proof are clean, call `update_goal({status: "complete"})`, call `get_goal`, and checkpoint with a structured final gate:
|
|
109
|
+
|
|
107
110
|
|
|
108
111
|
```sh
|
|
109
112
|
omx ultragoal checkpoint --goal-id <id> --status complete --evidence "<tests/files/review evidence>" --codex-goal-json <fresh-complete-get-goal-json-or-path> --quality-gate-json <quality-gate-json-or-path>
|
|
@@ -123,6 +126,21 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
123
126
|
"codeReviewer": { "agentRole": "code-reviewer", "evidence": "code-reviewer subagent APPROVE evidence" },
|
|
124
127
|
"architect": { "agentRole": "architect", "evidence": "architect subagent CLEAR evidence" }
|
|
125
128
|
}
|
|
129
|
+
},
|
|
130
|
+
"architectureInvariantGate": {
|
|
131
|
+
"status": "passed",
|
|
132
|
+
"sourceArtifacts": [".omx/ultragoal/brief.md", ".omx/ultragoal/goals.json"],
|
|
133
|
+
"evidence": "final invariant audit proved all required architecture/domain invariants",
|
|
134
|
+
"invariants": [
|
|
135
|
+
{
|
|
136
|
+
"invariant": "Preserve the existing parser boundary.",
|
|
137
|
+
"source": ".omx/ultragoal/brief.md#architecture-invariants",
|
|
138
|
+
"status": "proved",
|
|
139
|
+
"implementationEvidence": "changed files preserve the parser boundary",
|
|
140
|
+
"testEvidence": "parser-boundary regression passed",
|
|
141
|
+
"reviewEvidence": "architect review confirmed the boundary is intact"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
126
144
|
}
|
|
127
145
|
}
|
|
128
146
|
```
|
|
@@ -131,7 +149,7 @@ The final ultragoal story is not complete until the active agent has run the fin
|
|
|
131
149
|
|
|
132
150
|
- The shell command cannot directly invoke Codex interactive `/goal`; it emits a model-facing handoff for the active Codex agent.
|
|
133
151
|
- Ultragoal intentionally does not invoke `/goal clear` or hidden `thread/goal/clear`; the model-facing tool surface only provides `get_goal`, `create_goal`, and `update_goal`.
|
|
134
|
-
- After a completed aggregate ultragoal run, clear the
|
|
152
|
+
- After a completed aggregate ultragoal run, `/goal clear` is the explicit terminal cleanup step before starting another goal in the same Codex thread/session: `create_goal` starts, `update_goal({status: "complete"})` marks terminal success, and `/goal clear` removes the completed thread goal for the next same-thread goal. OMX prints this next step but does not invoke hidden clear routes.
|
|
135
153
|
- Never call `create_goal` when `get_goal` reports a different active goal.
|
|
136
154
|
- Never call `update_goal` unless the aggregate run or legacy per-story goal is actually complete.
|
|
137
155
|
- In aggregate mode, intermediate story checkpoints require a matching `active` Codex snapshot; final story completion requires a matching `complete` snapshot after `update_goal`.
|