oh-my-codex 0.20.3 → 0.21.0
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 +35 -18
- package/Cargo.toml +1 -1
- package/README.md +22 -19
- package/crates/omx-runtime/Cargo.toml +3 -0
- package/crates/omx-runtime/src/main.rs +390 -0
- package/crates/omx-runtime/tests/execution.rs +264 -0
- package/dist/adapt/__tests__/herdr-target.test.d.ts +2 -0
- package/dist/adapt/__tests__/herdr-target.test.d.ts.map +1 -0
- package/dist/adapt/__tests__/herdr-target.test.js +72 -0
- package/dist/adapt/__tests__/herdr-target.test.js.map +1 -0
- package/dist/adapt/contracts.d.ts +1 -1
- package/dist/adapt/contracts.d.ts.map +1 -1
- package/dist/adapt/contracts.js +1 -1
- package/dist/adapt/contracts.js.map +1 -1
- package/dist/adapt/herdr/__tests__/authority.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/authority.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/authority.test.js +49 -0
- package/dist/adapt/herdr/__tests__/authority.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/bridge.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/bridge.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/bridge.test.js +176 -0
- package/dist/adapt/herdr/__tests__/bridge.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.js +45 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/semantic.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/semantic.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/semantic.test.js +130 -0
- package/dist/adapt/herdr/__tests__/semantic.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.js +54 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.js +104 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/team-map.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/team-map.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/team-map.test.js +46 -0
- package/dist/adapt/herdr/__tests__/team-map.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/transport.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/transport.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/transport.test.js +160 -0
- package/dist/adapt/herdr/__tests__/transport.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/wiring.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/wiring.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/wiring.test.js +118 -0
- package/dist/adapt/herdr/__tests__/wiring.test.js.map +1 -0
- package/dist/adapt/herdr/authority.d.ts +34 -0
- package/dist/adapt/herdr/authority.d.ts.map +1 -0
- package/dist/adapt/herdr/authority.js +71 -0
- package/dist/adapt/herdr/authority.js.map +1 -0
- package/dist/adapt/herdr/bridge.d.ts +84 -0
- package/dist/adapt/herdr/bridge.d.ts.map +1 -0
- package/dist/adapt/herdr/bridge.js +222 -0
- package/dist/adapt/herdr/bridge.js.map +1 -0
- package/dist/adapt/herdr/sanitize.d.ts +20 -0
- package/dist/adapt/herdr/sanitize.d.ts.map +1 -0
- package/dist/adapt/herdr/sanitize.js +70 -0
- package/dist/adapt/herdr/sanitize.js.map +1 -0
- package/dist/adapt/herdr/semantic.d.ts +67 -0
- package/dist/adapt/herdr/semantic.d.ts.map +1 -0
- package/dist/adapt/herdr/semantic.js +170 -0
- package/dist/adapt/herdr/semantic.js.map +1 -0
- package/dist/adapt/herdr/seq-store.d.ts +32 -0
- package/dist/adapt/herdr/seq-store.d.ts.map +1 -0
- package/dist/adapt/herdr/seq-store.js +126 -0
- package/dist/adapt/herdr/seq-store.js.map +1 -0
- package/dist/adapt/herdr/team-map.d.ts +30 -0
- package/dist/adapt/herdr/team-map.d.ts.map +1 -0
- package/dist/adapt/herdr/team-map.js +37 -0
- package/dist/adapt/herdr/team-map.js.map +1 -0
- package/dist/adapt/herdr/transport.d.ts +115 -0
- package/dist/adapt/herdr/transport.d.ts.map +1 -0
- package/dist/adapt/herdr/transport.js +260 -0
- package/dist/adapt/herdr/transport.js.map +1 -0
- package/dist/adapt/herdr/wiring.d.ts +24 -0
- package/dist/adapt/herdr/wiring.d.ts.map +1 -0
- package/dist/adapt/herdr/wiring.js +62 -0
- package/dist/adapt/herdr/wiring.js.map +1 -0
- package/dist/adapt/herdr.d.ts +19 -0
- package/dist/adapt/herdr.d.ts.map +1 -0
- package/dist/adapt/herdr.js +115 -0
- package/dist/adapt/herdr.js.map +1 -0
- package/dist/adapt/index.d.ts +4 -0
- package/dist/adapt/index.d.ts.map +1 -1
- package/dist/adapt/index.js +48 -0
- package/dist/adapt/index.js.map +1 -1
- package/dist/adapt/registry.d.ts.map +1 -1
- package/dist/adapt/registry.js +11 -0
- package/dist/adapt/registry.js.map +1 -1
- package/dist/agents/__tests__/definitions.test.js +0 -27
- package/dist/agents/__tests__/definitions.test.js.map +1 -1
- package/dist/agents/__tests__/native-config.test.js +3 -8
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +0 -41
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/policy.d.ts.map +1 -1
- package/dist/agents/policy.js +0 -1
- package/dist/agents/policy.js.map +1 -1
- package/dist/auth/__tests__/hotswap.test.js +60 -1
- package/dist/auth/__tests__/hotswap.test.js.map +1 -1
- package/dist/auth/__tests__/storage.test.js +33 -1
- package/dist/auth/__tests__/storage.test.js.map +1 -1
- package/dist/auth/hotswap.d.ts +16 -2
- package/dist/auth/hotswap.d.ts.map +1 -1
- package/dist/auth/hotswap.js +22 -7
- package/dist/auth/hotswap.js.map +1 -1
- package/dist/auth/storage.js +1 -1
- package/dist/auth/storage.js.map +1 -1
- package/dist/autopilot/__tests__/completion-gate-advisory.test.d.ts +2 -0
- package/dist/autopilot/__tests__/completion-gate-advisory.test.d.ts.map +1 -0
- package/dist/autopilot/__tests__/completion-gate-advisory.test.js +383 -0
- package/dist/autopilot/__tests__/completion-gate-advisory.test.js.map +1 -0
- package/dist/autopilot/completion-gate.d.ts +6 -1
- package/dist/autopilot/completion-gate.d.ts.map +1 -1
- package/dist/autopilot/completion-gate.js +247 -7
- package/dist/autopilot/completion-gate.js.map +1 -1
- package/dist/catalog/__tests__/generator.test.js +15 -10
- package/dist/catalog/__tests__/generator.test.js.map +1 -1
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +13 -7
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -1
- package/dist/catalog/__tests__/schema.test.js +3 -5
- package/dist/catalog/__tests__/schema.test.js.map +1 -1
- package/dist/catalog/schema.js +1 -1
- package/dist/catalog/schema.js.map +1 -1
- package/dist/cli/__tests__/agents-init.test.js +4 -23
- package/dist/cli/__tests__/agents-init.test.js.map +1 -1
- package/dist/cli/__tests__/api.test.js +61 -24
- package/dist/cli/__tests__/api.test.js.map +1 -1
- package/dist/cli/__tests__/auth.test.js +3 -1
- package/dist/cli/__tests__/auth.test.js.map +1 -1
- package/dist/cli/__tests__/autopilot.test.d.ts +2 -0
- package/dist/cli/__tests__/autopilot.test.d.ts.map +1 -0
- package/dist/cli/__tests__/autopilot.test.js +143 -0
- package/dist/cli/__tests__/autopilot.test.js.map +1 -0
- package/dist/cli/__tests__/codex-feature-probe.test.js +66 -1
- package/dist/cli/__tests__/codex-feature-probe.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +76 -4
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/detached-leader-teardown.test.d.ts +2 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.d.ts.map +1 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.js +473 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.js +103 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.js +206 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-team.test.js +85 -0
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +38 -6
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +75 -0
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +621 -460
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +1125 -143
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-parity.test.js +4 -3
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/native-assets.test.js +398 -16
- package/dist/cli/__tests__/native-assets.test.js.map +1 -1
- package/dist/cli/__tests__/native-hook-claim-journal.test.js +53 -5
- package/dist/cli/__tests__/native-hook-claim-journal.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +5 -8
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-deslop-contract.test.js +4 -18
- package/dist/cli/__tests__/ralph-deslop-contract.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +4 -30
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js +4 -15
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js.map +1 -1
- package/dist/cli/__tests__/ralph.test.js +2 -2
- package/dist/cli/__tests__/ralph.test.js.map +1 -1
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js +57 -57
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js.map +1 -1
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.d.ts +2 -0
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.js +56 -0
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.js.map +1 -0
- package/dist/cli/__tests__/ralplan.test.js +131 -14
- package/dist/cli/__tests__/ralplan.test.js.map +1 -1
- package/dist/cli/__tests__/session-scoped-runtime.test.js +1153 -43
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
- package/dist/cli/__tests__/session-search-help.test.js +65 -3
- package/dist/cli/__tests__/session-search-help.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +57 -55
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +34 -0
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -1
- package/dist/cli/__tests__/setup-hooks-trust-e2e.test.js +1 -1
- package/dist/cli/__tests__/setup-hooks-trust-e2e.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +258 -26
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +1 -1
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +3 -6
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/setup-skills-overwrite.test.js +180 -21
- package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +93 -41
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +45 -1
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +161 -2
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +73 -28
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/__tests__/update.test.js +749 -177
- package/dist/cli/__tests__/update.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +32 -2
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/api.d.ts.map +1 -1
- package/dist/cli/api.js +9 -10
- package/dist/cli/api.js.map +1 -1
- package/dist/cli/autopilot.d.ts +8 -0
- package/dist/cli/autopilot.d.ts.map +1 -0
- package/dist/cli/autopilot.js +160 -0
- package/dist/cli/autopilot.js.map +1 -0
- package/dist/cli/codex-feature-probe.d.ts +16 -0
- package/dist/cli/codex-feature-probe.d.ts.map +1 -1
- package/dist/cli/codex-feature-probe.js +44 -0
- package/dist/cli/codex-feature-probe.js.map +1 -1
- package/dist/cli/codex-home.d.ts.map +1 -1
- package/dist/cli/codex-home.js +7 -4
- package/dist/cli/codex-home.js.map +1 -1
- package/dist/cli/doctor.d.ts +29 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +433 -19
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +231 -12
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2354 -724
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp-parity.d.ts.map +1 -1
- package/dist/cli/mcp-parity.js +7 -3
- package/dist/cli/mcp-parity.js.map +1 -1
- package/dist/cli/native-assets.d.ts +26 -1
- package/dist/cli/native-assets.d.ts.map +1 -1
- package/dist/cli/native-assets.js +448 -51
- package/dist/cli/native-assets.js.map +1 -1
- package/dist/cli/native-hook-claim-journal.d.ts +8 -4
- package/dist/cli/native-hook-claim-journal.d.ts.map +1 -1
- package/dist/cli/native-hook-claim-journal.js +30 -8
- package/dist/cli/native-hook-claim-journal.js.map +1 -1
- package/dist/cli/package-manager-ownership.d.ts +69 -0
- package/dist/cli/package-manager-ownership.d.ts.map +1 -0
- package/dist/cli/package-manager-ownership.js +338 -0
- package/dist/cli/package-manager-ownership.js.map +1 -0
- 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 +123 -55
- package/dist/cli/plugin-marketplace.js.map +1 -1
- package/dist/cli/ralph.js +2 -2
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/ralplan.d.ts +6 -2
- package/dist/cli/ralplan.d.ts.map +1 -1
- package/dist/cli/ralplan.js +134 -34
- package/dist/cli/ralplan.js.map +1 -1
- package/dist/cli/session-search.d.ts.map +1 -1
- package/dist/cli/session-search.js +38 -1
- package/dist/cli/session-search.js.map +1 -1
- package/dist/cli/setup-preferences.d.ts +15 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -1
- package/dist/cli/setup-preferences.js +27 -1
- package/dist/cli/setup-preferences.js.map +1 -1
- package/dist/cli/setup.d.ts +6 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +425 -215
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.d.ts.map +1 -1
- package/dist/cli/sparkshell.js +52 -9
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/ultragoal.d.ts +1 -1
- package/dist/cli/ultragoal.d.ts.map +1 -1
- package/dist/cli/ultragoal.js +10 -7
- package/dist/cli/ultragoal.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +27 -28
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/update-worker.d.ts +2 -0
- package/dist/cli/update-worker.d.ts.map +1 -0
- package/dist/cli/update-worker.js +142 -0
- package/dist/cli/update-worker.js.map +1 -0
- package/dist/cli/update.d.ts +16 -23
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +212 -241
- package/dist/cli/update.js.map +1 -1
- package/dist/compat/__tests__/upgrade-from-0-20.test.d.ts +2 -0
- package/dist/compat/__tests__/upgrade-from-0-20.test.d.ts.map +1 -0
- package/dist/compat/__tests__/upgrade-from-0-20.test.js +109 -0
- package/dist/compat/__tests__/upgrade-from-0-20.test.js.map +1 -0
- package/dist/compat/upgrade-from-0-20.d.ts +64 -0
- package/dist/compat/upgrade-from-0-20.d.ts.map +1 -0
- package/dist/compat/upgrade-from-0-20.js +276 -0
- package/dist/compat/upgrade-from-0-20.js.map +1 -0
- package/dist/config/__tests__/generator-idempotent.test.js +173 -29
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +3 -1
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/generator.d.ts +25 -3
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +113 -35
- package/dist/config/generator.js.map +1 -1
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.js +25 -0
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.js.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.d.ts +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.js +2 -0
- package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
- package/dist/hooks/__tests__/agents-overlay.test.js +3 -1
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -1
- package/dist/hooks/__tests__/analyze-skill-contract.test.js +24 -31
- package/dist/hooks/__tests__/analyze-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/anti-slop-workflow.test.js +66 -135
- package/dist/hooks/__tests__/anti-slop-workflow.test.js.map +1 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +47 -106
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/code-review-skill-contract.test.js +16 -18
- package/dist/hooks/__tests__/code-review-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +2 -14
- package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts.map +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +56 -234
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +1 -3
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/design-skill.test.js +18 -16
- package/dist/hooks/__tests__/design-skill.test.js.map +1 -1
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js +24 -20
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.d.ts +2 -0
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.js +164 -0
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.js.map +1 -0
- package/dist/hooks/__tests__/issue-3497-hook-simplification.test.d.ts +2 -0
- package/dist/hooks/__tests__/issue-3497-hook-simplification.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/issue-3497-hook-simplification.test.js +169 -0
- package/dist/hooks/__tests__/issue-3497-hook-simplification.test.js.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.js +226 -858
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +176 -14
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +1 -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 +33 -21
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +27 -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 +10 -118
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +14 -904
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js +7 -0
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js +5 -5
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +7 -7
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +11 -8
- 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 +7 -6
- 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.js +2 -1
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +1 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +19 -21
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js +23 -3
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +23 -28
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
- package/dist/hooks/__tests__/research-workflow-boundaries.test.js +9 -8
- package/dist/hooks/__tests__/research-workflow-boundaries.test.js.map +1 -1
- package/dist/hooks/__tests__/session.test.js +3656 -656
- package/dist/hooks/__tests__/session.test.js.map +1 -1
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.js +13 -22
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -1
- package/dist/hooks/__tests__/skill-guidance-contract.test.js +3 -13
- package/dist/hooks/__tests__/skill-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/sunset-routing-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/sunset-routing-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/sunset-routing-contract.test.js +172 -0
- package/dist/hooks/__tests__/sunset-routing-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +2 -2
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/tmux-hook-engine.test.js +18 -3
- package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-ralph-skill.test.js +20 -17
- package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-verdict-loop.test.js +17 -18
- package/dist/hooks/__tests__/visual-verdict-loop.test.js.map +1 -1
- package/dist/hooks/agents-overlay.js +1 -1
- package/dist/hooks/agents-overlay.js.map +1 -1
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js +108 -2
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -1
- package/dist/hooks/extensibility/__tests__/sdk.test.js +151 -1
- package/dist/hooks/extensibility/__tests__/sdk.test.js.map +1 -1
- package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
- package/dist/hooks/extensibility/dispatcher.js +20 -3
- package/dist/hooks/extensibility/dispatcher.js.map +1 -1
- package/dist/hooks/extensibility/plugin-runner.js +1 -0
- package/dist/hooks/extensibility/plugin-runner.js.map +1 -1
- package/dist/hooks/extensibility/runtime.d.ts.map +1 -1
- package/dist/hooks/extensibility/runtime.js.map +1 -1
- package/dist/hooks/extensibility/sdk/paths.d.ts +1 -1
- package/dist/hooks/extensibility/sdk/paths.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk/paths.js +2 -2
- package/dist/hooks/extensibility/sdk/paths.js.map +1 -1
- package/dist/hooks/extensibility/sdk/runtime-state.d.ts +1 -1
- package/dist/hooks/extensibility/sdk/runtime-state.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk/runtime-state.js +55 -15
- package/dist/hooks/extensibility/sdk/runtime-state.js.map +1 -1
- package/dist/hooks/extensibility/sdk.d.ts +1 -0
- package/dist/hooks/extensibility/sdk.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk.js +1 -1
- package/dist/hooks/extensibility/sdk.js.map +1 -1
- package/dist/hooks/extensibility/types.d.ts +7 -0
- package/dist/hooks/extensibility/types.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.d.ts +6 -47
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +156 -268
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +14 -26
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hooks/native/capability-warnings.d.ts +16 -0
- package/dist/hooks/native/capability-warnings.d.ts.map +1 -0
- package/dist/hooks/native/capability-warnings.js +40 -0
- package/dist/hooks/native/capability-warnings.js.map +1 -0
- package/dist/hooks/native/index.d.ts +17 -0
- package/dist/hooks/native/index.d.ts.map +1 -0
- package/dist/hooks/native/index.js +17 -0
- package/dist/hooks/native/index.js.map +1 -0
- package/dist/hooks/native/pre-tool-use-advisory.d.ts +17 -0
- package/dist/hooks/native/pre-tool-use-advisory.d.ts.map +1 -0
- package/dist/hooks/native/pre-tool-use-advisory.js +112 -0
- package/dist/hooks/native/pre-tool-use-advisory.js.map +1 -0
- package/dist/hooks/native/types.d.ts +30 -0
- package/dist/hooks/native/types.d.ts.map +1 -0
- package/dist/hooks/native/types.js +22 -0
- package/dist/hooks/native/types.js.map +1 -0
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +46 -93
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hooks/session.d.ts +197 -18
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +1939 -271
- package/dist/hooks/session.js.map +1 -1
- package/dist/hooks/sunset-stub.d.ts +17 -0
- package/dist/hooks/sunset-stub.d.ts.map +1 -0
- package/dist/hooks/sunset-stub.js +125 -0
- package/dist/hooks/sunset-stub.js.map +1 -0
- package/dist/hud/__tests__/hud-tmux-injection.test.js +6 -6
- package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +26 -16
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +83 -78
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/__tests__/state.test.js +36 -31
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/tmux-split-realtmux.test.d.ts +2 -0
- package/dist/hud/__tests__/tmux-split-realtmux.test.d.ts.map +1 -0
- package/dist/hud/__tests__/tmux-split-realtmux.test.js +112 -0
- package/dist/hud/__tests__/tmux-split-realtmux.test.js.map +1 -0
- package/dist/hud/__tests__/tmux.test.js +217 -198
- package/dist/hud/__tests__/tmux.test.js.map +1 -1
- package/dist/hud/tmux.d.ts +43 -4
- package/dist/hud/tmux.d.ts.map +1 -1
- package/dist/hud/tmux.js +1025 -139
- package/dist/hud/tmux.js.map +1 -1
- package/dist/leader/__tests__/contract.test.js +71 -34
- package/dist/leader/__tests__/contract.test.js.map +1 -1
- package/dist/leader/contract.d.ts +1 -6
- package/dist/leader/contract.d.ts.map +1 -1
- package/dist/leader/contract.js +25 -24
- package/dist/leader/contract.js.map +1 -1
- package/dist/mcp/__tests__/hermes-bridge.test.js +17 -0
- package/dist/mcp/__tests__/hermes-bridge.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +4 -4
- package/dist/mcp/__tests__/state-paths.test.js +735 -4
- package/dist/mcp/__tests__/state-paths.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server-ralph-phase.test.js +29 -4
- package/dist/mcp/__tests__/state-server-ralph-phase.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server-schema.test.js +13 -3
- package/dist/mcp/__tests__/state-server-schema.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +11 -1033
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/__tests__/trace-server.test.js +2 -2
- package/dist/mcp/__tests__/trace-server.test.js.map +1 -1
- package/dist/mcp/hermes-bridge.d.ts.map +1 -1
- package/dist/mcp/hermes-bridge.js +2 -2
- package/dist/mcp/hermes-bridge.js.map +1 -1
- package/dist/mcp/state-paths.d.ts +78 -4
- package/dist/mcp/state-paths.d.ts.map +1 -1
- package/dist/mcp/state-paths.js +543 -40
- package/dist/mcp/state-paths.js.map +1 -1
- package/dist/mcp/state-server.d.ts +68 -97
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +116 -67
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/modes/__tests__/base-autopilot-gates.test.js +1 -168
- package/dist/modes/__tests__/base-autopilot-gates.test.js.map +1 -1
- package/dist/modes/__tests__/base-autoresearch-contract.test.js +1 -85
- package/dist/modes/__tests__/base-autoresearch-contract.test.js.map +1 -1
- package/dist/modes/__tests__/base-multi-state-compat.test.js +1 -35
- package/dist/modes/__tests__/base-multi-state-compat.test.js.map +1 -1
- package/dist/modes/__tests__/base-session-scope.test.js +10 -158
- package/dist/modes/__tests__/base-session-scope.test.js.map +1 -1
- package/dist/modes/base.d.ts +6 -6
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +116 -90
- package/dist/modes/base.js.map +1 -1
- package/dist/native-assets/archive.d.ts +17 -0
- package/dist/native-assets/archive.d.ts.map +1 -0
- package/dist/native-assets/archive.js +238 -0
- package/dist/native-assets/archive.js.map +1 -0
- package/dist/native-assets/policy.d.ts +42 -0
- package/dist/native-assets/policy.d.ts.map +1 -0
- package/dist/native-assets/policy.js +155 -0
- package/dist/native-assets/policy.js.map +1 -0
- package/dist/notifications/__tests__/formatter.test.js +8 -0
- package/dist/notifications/__tests__/formatter.test.js.map +1 -1
- package/dist/notifications/__tests__/template-engine.test.js +8 -0
- package/dist/notifications/__tests__/template-engine.test.js.map +1 -1
- package/dist/notifications/formatter.js +1 -1
- package/dist/notifications/formatter.js.map +1 -1
- package/dist/notifications/template-engine.js +1 -1
- package/dist/notifications/template-engine.js.map +1 -1
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js +0 -21
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -1
- package/dist/question/autopilot-wait.d.ts.map +1 -1
- package/dist/question/autopilot-wait.js +2 -2
- package/dist/question/autopilot-wait.js.map +1 -1
- package/dist/question/deep-interview.d.ts +1 -2
- package/dist/question/deep-interview.d.ts.map +1 -1
- package/dist/question/deep-interview.js +4 -4
- package/dist/question/deep-interview.js.map +1 -1
- package/dist/ralplan/__tests__/documented-leader-preflight.test.js +328 -39
- package/dist/ralplan/__tests__/documented-leader-preflight.test.js.map +1 -1
- package/dist/ralplan/__tests__/runtime.test.js +56 -821
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -1
- package/dist/ralplan/documented-leader-preflight.d.ts +15 -8
- package/dist/ralplan/documented-leader-preflight.d.ts.map +1 -1
- package/dist/ralplan/documented-leader-preflight.js +356 -54
- package/dist/ralplan/documented-leader-preflight.js.map +1 -1
- package/dist/ralplan/runtime.d.ts +2 -2
- package/dist/ralplan/runtime.d.ts.map +1 -1
- package/dist/ralplan/runtime.js +145 -163
- package/dist/ralplan/runtime.js.map +1 -1
- package/dist/runtime/bridge.d.ts.map +1 -1
- package/dist/runtime/bridge.js +45 -0
- package/dist/runtime/bridge.js.map +1 -1
- package/dist/runtime/run-state.d.ts +5 -1
- package/dist/runtime/run-state.d.ts.map +1 -1
- package/dist/runtime/run-state.js +15 -8
- package/dist/runtime/run-state.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +12490 -19414
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/docs-site-contract.test.js +2 -2
- package/dist/scripts/__tests__/docs-site-contract.test.js.map +1 -1
- package/dist/scripts/__tests__/generated-artifact-drift.test.d.ts +2 -0
- package/dist/scripts/__tests__/generated-artifact-drift.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/generated-artifact-drift.test.js +84 -0
- package/dist/scripts/__tests__/generated-artifact-drift.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.js +235 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.js +188 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.js +207 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.js +156 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.js +191 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.js +40 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.js +63 -0
- package/dist/scripts/__tests__/issue-3481-conductor-deadlock.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.js +65 -0
- package/dist/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.js +189 -0
- package/dist/scripts/__tests__/issue-3536-external-team-state-root.test.js.map +1 -0
- package/dist/scripts/__tests__/notify-state-io.test.js +26 -0
- package/dist/scripts/__tests__/notify-state-io.test.js.map +1 -1
- package/dist/scripts/__tests__/notify-tmux-injection.test.js +23 -1
- package/dist/scripts/__tests__/notify-tmux-injection.test.js.map +1 -1
- package/dist/scripts/__tests__/postinstall.test.js +19 -1
- package/dist/scripts/__tests__/postinstall.test.js.map +1 -1
- package/dist/scripts/__tests__/prompt-inventory.test.js +54 -1
- package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -1
- package/dist/scripts/__tests__/reasoning-artifact-contract.test.js +2 -2
- package/dist/scripts/__tests__/reasoning-artifact-contract.test.js.map +1 -1
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js +46 -60
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js.map +1 -1
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js +60 -25
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js.map +1 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js +168 -20
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/__tests__/verify-native-release-assets.test.d.ts +2 -0
- package/dist/scripts/__tests__/verify-native-release-assets.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/verify-native-release-assets.test.js +235 -0
- package/dist/scripts/__tests__/verify-native-release-assets.test.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts +51 -2
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +3648 -1332
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts +9 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +33 -22
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/generate-native-release-manifest.js +80 -51
- package/dist/scripts/generate-native-release-manifest.js.map +1 -1
- package/dist/scripts/notify-fallback-watcher.js +28 -39
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.d.ts +2 -48
- package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.js +1 -0
- package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/state-io.d.ts.map +1 -1
- package/dist/scripts/notify-hook/state-io.js +5 -0
- package/dist/scripts/notify-hook/state-io.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +8 -5
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.js +32 -3
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +3 -2
- package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.js +23 -3
- package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +45 -5
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.d.ts +1 -0
- package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js +4 -1
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/notify-hook.d.ts.map +1 -1
- package/dist/scripts/notify-hook.js +71 -124
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/postinstall-advisory.d.ts +14 -0
- package/dist/scripts/postinstall-advisory.d.ts.map +1 -0
- package/dist/scripts/postinstall-advisory.js +49 -0
- package/dist/scripts/postinstall-advisory.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +1 -1
- package/dist/scripts/postinstall.d.ts.map +1 -1
- package/dist/scripts/postinstall.js +1 -1
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/scripts/prompt-inventory.d.ts +39 -0
- package/dist/scripts/prompt-inventory.d.ts.map +1 -1
- package/dist/scripts/prompt-inventory.js +108 -3
- package/dist/scripts/prompt-inventory.js.map +1 -1
- package/dist/scripts/run-compiled-ci.js +2 -0
- package/dist/scripts/run-compiled-ci.js.map +1 -1
- package/dist/scripts/run-test-files.js +1 -0
- package/dist/scripts/run-test-files.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +32 -1
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +407 -60
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -1
- package/dist/scripts/sync-plugin-mirror.js +16 -1
- package/dist/scripts/sync-plugin-mirror.js.map +1 -1
- package/dist/scripts/sync-prompt-guidance-fragments.js +62 -20
- package/dist/scripts/sync-prompt-guidance-fragments.js.map +1 -1
- package/dist/scripts/tmux-hook-engine.d.ts +1 -1
- package/dist/scripts/tmux-hook-engine.d.ts.map +1 -1
- package/dist/scripts/tmux-hook-engine.js +3 -3
- package/dist/scripts/tmux-hook-engine.js.map +1 -1
- package/dist/scripts/verify-capabilities-lock.d.ts +3 -0
- package/dist/scripts/verify-capabilities-lock.d.ts.map +1 -0
- package/dist/scripts/verify-capabilities-lock.js +22 -0
- package/dist/scripts/verify-capabilities-lock.js.map +1 -0
- package/dist/scripts/verify-native-release-assets.js +37 -23
- package/dist/scripts/verify-native-release-assets.js.map +1 -1
- package/dist/state/__tests__/authority-decreasing.test.d.ts +2 -0
- package/dist/state/__tests__/authority-decreasing.test.d.ts.map +1 -0
- package/dist/state/__tests__/authority-decreasing.test.js +78 -0
- package/dist/state/__tests__/authority-decreasing.test.js.map +1 -0
- package/dist/state/__tests__/handoff-carrier.test.d.ts +2 -0
- package/dist/state/__tests__/handoff-carrier.test.d.ts.map +1 -0
- package/dist/state/__tests__/handoff-carrier.test.js +96 -0
- package/dist/state/__tests__/handoff-carrier.test.js.map +1 -0
- package/dist/state/__tests__/mode-state-context.test.js +12 -5
- package/dist/state/__tests__/mode-state-context.test.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +870 -2517
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/single-writer-invariant.test.d.ts +2 -0
- package/dist/state/__tests__/single-writer-invariant.test.d.ts.map +1 -0
- package/dist/state/__tests__/single-writer-invariant.test.js +342 -0
- package/dist/state/__tests__/single-writer-invariant.test.js.map +1 -0
- package/dist/state/__tests__/skill-active.test.js +400 -2
- package/dist/state/__tests__/skill-active.test.js.map +1 -1
- package/dist/state/__tests__/stale-state-neutralization.test.d.ts +2 -0
- package/dist/state/__tests__/stale-state-neutralization.test.d.ts.map +1 -0
- package/dist/state/__tests__/stale-state-neutralization.test.js +84 -0
- package/dist/state/__tests__/stale-state-neutralization.test.js.map +1 -0
- package/dist/state/__tests__/workflow-transition.test.js +20 -33
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
- package/dist/state/handoff-carrier.d.ts +46 -0
- package/dist/state/handoff-carrier.d.ts.map +1 -0
- package/dist/state/handoff-carrier.js +85 -0
- package/dist/state/handoff-carrier.js.map +1 -0
- package/dist/state/mode-state-context.d.ts +3 -0
- package/dist/state/mode-state-context.d.ts.map +1 -1
- package/dist/state/mode-state-context.js +27 -13
- package/dist/state/mode-state-context.js.map +1 -1
- package/dist/state/namespace-owners.d.ts +34 -0
- package/dist/state/namespace-owners.d.ts.map +1 -0
- package/dist/state/namespace-owners.js +127 -0
- package/dist/state/namespace-owners.js.map +1 -0
- package/dist/state/operations.d.ts +9 -4
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +194 -235
- package/dist/state/operations.js.map +1 -1
- package/dist/state/skill-active.d.ts +18 -1
- package/dist/state/skill-active.d.ts.map +1 -1
- package/dist/state/skill-active.js +421 -31
- package/dist/state/skill-active.js.map +1 -1
- package/dist/state/workflow-transition-reconcile.d.ts +3 -0
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
- package/dist/state/workflow-transition-reconcile.js +11 -31
- package/dist/state/workflow-transition-reconcile.js.map +1 -1
- package/dist/state/workflow-transition.d.ts +1 -27
- package/dist/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js +9 -790
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js +27 -0
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js.map +1 -1
- package/dist/subagents/__tests__/tracker.test.js +837 -1048
- package/dist/subagents/__tests__/tracker.test.js.map +1 -1
- package/dist/subagents/tracker.d.ts +64 -60
- package/dist/subagents/tracker.d.ts.map +1 -1
- package/dist/subagents/tracker.js +809 -358
- package/dist/subagents/tracker.js.map +1 -1
- package/dist/team/__tests__/api-interop.test.js +1 -0
- package/dist/team/__tests__/api-interop.test.js.map +1 -1
- package/dist/team/__tests__/delivery-e2e-smoke.test.js +6 -7
- package/dist/team/__tests__/delivery-e2e-smoke.test.js.map +1 -1
- package/dist/team/__tests__/mcp-comm.test.js +104 -3
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -1
- package/dist/team/__tests__/notice-ledger.test.d.ts +2 -0
- package/dist/team/__tests__/notice-ledger.test.d.ts.map +1 -0
- package/dist/team/__tests__/notice-ledger.test.js +131 -0
- package/dist/team/__tests__/notice-ledger.test.js.map +1 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.d.ts +2 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.d.ts.map +1 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.js +410 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.js.map +1 -0
- package/dist/team/__tests__/phase-controller.test.js +20 -0
- package/dist/team/__tests__/phase-controller.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +725 -59
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +269 -245
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.js +117 -2
- package/dist/team/__tests__/state-root.test.js.map +1 -1
- package/dist/team/__tests__/team-ops-contract.test.js +1 -0
- package/dist/team/__tests__/team-ops-contract.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +1093 -101
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.js +159 -0
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.js.map +1 -0
- package/dist/team/__tests__/tmux-test-fixture.d.ts +69 -0
- package/dist/team/__tests__/tmux-test-fixture.d.ts.map +1 -1
- package/dist/team/__tests__/tmux-test-fixture.js +242 -15
- package/dist/team/__tests__/tmux-test-fixture.js.map +1 -1
- package/dist/team/__tests__/tmux-test-fixture.test.js +177 -1
- package/dist/team/__tests__/tmux-test-fixture.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +11 -13
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/__tests__/worker-provenance.test.d.ts +2 -0
- package/dist/team/__tests__/worker-provenance.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-provenance.test.js +251 -0
- package/dist/team/__tests__/worker-provenance.test.js.map +1 -0
- package/dist/team/__tests__/worker-runtime-identity.test.js +45 -72
- package/dist/team/__tests__/worker-runtime-identity.test.js.map +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +14 -8
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/mcp-comm.d.ts.map +1 -1
- package/dist/team/mcp-comm.js +3 -8
- package/dist/team/mcp-comm.js.map +1 -1
- package/dist/team/notice-ledger.d.ts +54 -0
- package/dist/team/notice-ledger.d.ts.map +1 -0
- package/dist/team/notice-ledger.js +259 -0
- package/dist/team/notice-ledger.js.map +1 -0
- package/dist/team/phase-controller.d.ts.map +1 -1
- package/dist/team/phase-controller.js +2 -0
- package/dist/team/phase-controller.js.map +1 -1
- package/dist/team/runtime.d.ts +3 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +314 -142
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +161 -91
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/monitor.d.ts +10 -0
- package/dist/team/state/monitor.d.ts.map +1 -1
- package/dist/team/state/monitor.js +13 -0
- package/dist/team/state/monitor.js.map +1 -1
- package/dist/team/state/types.d.ts +15 -0
- 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 +12 -0
- package/dist/team/state-root.d.ts.map +1 -1
- package/dist/team/state-root.js +177 -0
- package/dist/team/state-root.js.map +1 -1
- package/dist/team/state.d.ts +19 -0
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +47 -1
- package/dist/team/state.js.map +1 -1
- package/dist/team/team-ops.d.ts +1 -0
- package/dist/team/team-ops.d.ts.map +1 -1
- package/dist/team/team-ops.js +1 -0
- package/dist/team/team-ops.js.map +1 -1
- package/dist/team/tmux-session.d.ts +42 -4
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +572 -196
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/ultragoal-context.d.ts +1 -0
- package/dist/team/ultragoal-context.d.ts.map +1 -1
- package/dist/team/ultragoal-context.js +2 -0
- package/dist/team/ultragoal-context.js.map +1 -1
- package/dist/team/worker-provenance.d.ts +35 -0
- package/dist/team/worker-provenance.d.ts.map +1 -0
- package/dist/team/worker-provenance.js +213 -0
- package/dist/team/worker-provenance.js.map +1 -0
- package/dist/ultragoal/__tests__/artifacts.test.js +1053 -2
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
- package/dist/ultragoal/__tests__/docs-contract.test.js +89 -59
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
- package/dist/ultragoal/artifacts.d.ts +36 -1
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +267 -51
- package/dist/ultragoal/artifacts.js.map +1 -1
- package/dist/url-reader/__tests__/url-reader.test.js +14 -0
- package/dist/url-reader/__tests__/url-reader.test.js.map +1 -1
- package/dist/url-reader/index.js +5 -3
- package/dist/url-reader/index.js.map +1 -1
- package/dist/utils/__tests__/file-durability.test.js +58 -1
- package/dist/utils/__tests__/file-durability.test.js.map +1 -1
- package/dist/utils/__tests__/paths.test.js +21 -1
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/__tests__/version.test.js +17 -0
- package/dist/utils/__tests__/version.test.js.map +1 -1
- package/dist/utils/file-durability.d.ts +10 -0
- package/dist/utils/file-durability.d.ts.map +1 -1
- package/dist/utils/file-durability.js +34 -4
- package/dist/utils/file-durability.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +14 -6
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/version.d.ts.map +1 -1
- package/dist/utils/version.js +2 -1
- package/dist/utils/version.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +49 -4
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js +60 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
- package/dist/verification/__tests__/native-release-manifest.test.js +157 -4
- package/dist/verification/__tests__/native-release-manifest.test.js.map +1 -1
- package/package.json +17 -6
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +81 -17
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +60 -135
- package/plugins/oh-my-codex/skills/analyze/SKILL.md +35 -111
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +72 -163
- package/plugins/oh-my-codex/skills/cancel/SKILL.md +33 -392
- package/plugins/oh-my-codex/skills/code-review/SKILL.md +66 -256
- package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +30 -216
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +11 -10
- package/plugins/oh-my-codex/skills/design/SKILL.md +32 -132
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +56 -177
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +35 -116
- package/plugins/oh-my-codex/skills/plan/SKILL.md +45 -228
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +20 -22
- package/plugins/oh-my-codex/skills/skill/SKILL.md +82 -807
- package/plugins/oh-my-codex/skills/team/SKILL.md +32 -520
- package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +47 -150
- package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +75 -252
- package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +33 -111
- package/plugins/oh-my-codex/skills/worker/SKILL.md +40 -113
- package/prompts/analyst.md +27 -107
- package/prompts/api-reviewer.md +17 -84
- package/prompts/architect.md +31 -70
- package/prompts/code-reviewer.md +18 -107
- package/prompts/code-simplifier.md +32 -110
- package/prompts/critic.md +32 -54
- package/prompts/dependency-expert.md +37 -107
- package/prompts/designer.md +40 -107
- package/prompts/executor.md +26 -75
- package/prompts/information-architect.md +51 -200
- package/prompts/performance-reviewer.md +17 -81
- package/prompts/planner.md +33 -76
- package/prompts/product-analyst.md +65 -280
- package/prompts/product-manager.md +48 -216
- package/prompts/qa-tester.md +33 -104
- package/prompts/quality-reviewer.md +17 -93
- package/prompts/quality-strategist.md +31 -255
- package/prompts/researcher.md +32 -89
- package/prompts/security-reviewer.md +12 -98
- package/prompts/test-engineer.md +29 -110
- package/prompts/ux-researcher.md +46 -300
- package/prompts/verifier.md +23 -51
- package/skills/ai-slop-cleaner/SKILL.md +60 -135
- package/skills/analyze/SKILL.md +35 -111
- package/skills/autopilot/SKILL.md +72 -163
- package/skills/autoresearch-goal/SKILL.md +6 -31
- package/skills/cancel/SKILL.md +33 -392
- package/skills/code-review/SKILL.md +66 -256
- package/skills/configure-notifications/SKILL.md +30 -216
- package/skills/deep-interview/SKILL.md +11 -10
- package/skills/design/SKILL.md +32 -132
- package/skills/doctor/SKILL.md +56 -177
- package/skills/omx-setup/SKILL.md +35 -116
- package/skills/pipeline/SKILL.md +6 -89
- package/skills/plan/SKILL.md +45 -228
- package/skills/ralph/SKILL.md +6 -290
- package/skills/ralplan/SKILL.md +20 -22
- package/skills/skill/SKILL.md +82 -807
- package/skills/team/SKILL.md +32 -520
- package/skills/ultragoal/SKILL.md +47 -150
- package/skills/ultraqa/SKILL.md +75 -252
- package/skills/ultrawork/SKILL.md +6 -182
- package/skills/visual-ralph/SKILL.md +33 -111
- package/skills/worker/SKILL.md +40 -113
- package/src/scripts/__tests__/codex-native-hook.test.ts +18888 -28799
- package/src/scripts/__tests__/docs-site-contract.test.ts +2 -2
- package/src/scripts/__tests__/generated-artifact-drift.test.ts +97 -0
- package/src/scripts/__tests__/issue-3293-callsite-parity.test.ts +197 -0
- package/src/scripts/__tests__/issue-3293-cancel-transaction.test.ts +189 -0
- package/src/scripts/__tests__/issue-3293-hook-owned-cancel.test.ts +186 -0
- package/src/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.ts +177 -0
- package/src/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.ts +201 -0
- package/src/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.ts +43 -0
- package/src/scripts/__tests__/issue-3481-conductor-deadlock.test.ts +77 -0
- package/src/scripts/__tests__/issue-3486-pretooluse-lock-regression.test.ts +95 -0
- package/src/scripts/__tests__/issue-3536-external-team-state-root.test.ts +216 -0
- package/src/scripts/__tests__/notify-state-io.test.ts +29 -0
- package/src/scripts/__tests__/notify-tmux-injection.test.ts +26 -1
- package/src/scripts/__tests__/postinstall.test.ts +23 -1
- package/src/scripts/__tests__/prompt-inventory.test.ts +62 -1
- package/src/scripts/__tests__/reasoning-artifact-contract.test.ts +1 -2
- package/src/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.ts +49 -59
- package/src/scripts/__tests__/role-intent-durable-recovery-3181.test.ts +61 -27
- package/src/scripts/__tests__/smoke-packed-install.test.ts +223 -23
- package/src/scripts/__tests__/verify-native-release-assets.test.ts +240 -0
- package/src/scripts/codex-native-hook.ts +3618 -1383
- package/src/scripts/codex-native-pre-post.ts +50 -24
- package/src/scripts/generate-native-release-manifest.ts +83 -79
- package/src/scripts/notify-fallback-watcher.ts +38 -38
- package/src/scripts/notify-hook/auto-nudge.ts +1 -0
- package/src/scripts/notify-hook/state-io.ts +11 -0
- package/src/scripts/notify-hook/team-dispatch.ts +8 -5
- package/src/scripts/notify-hook/team-leader-nudge.ts +32 -4
- package/src/scripts/notify-hook/team-tmux-guard.ts +3 -1
- package/src/scripts/notify-hook/team-worker-stop.ts +23 -4
- package/src/scripts/notify-hook/team-worker.ts +43 -5
- package/src/scripts/notify-hook/tmux-injection.ts +5 -1
- package/src/scripts/notify-hook.ts +76 -124
- package/src/scripts/postinstall-advisory.ts +67 -0
- package/src/scripts/postinstall.ts +1 -1
- package/src/scripts/prompt-inventory.ts +142 -3
- package/src/scripts/run-compiled-ci.ts +2 -0
- package/src/scripts/run-test-files.ts +1 -0
- package/src/scripts/smoke-packed-install.ts +440 -59
- package/src/scripts/sync-plugin-mirror.ts +17 -1
- package/src/scripts/sync-prompt-guidance-fragments.ts +59 -22
- package/src/scripts/tmux-hook-engine.ts +3 -3
- package/src/scripts/verify-capabilities-lock.ts +23 -0
- package/src/scripts/verify-native-release-assets.ts +39 -31
- package/templates/AGENTS.md +45 -9
- package/templates/catalog-manifest.json +6 -146
- package/dist/autopilot/__tests__/deep-interview-gate.test.d.ts +0 -2
- package/dist/autopilot/__tests__/deep-interview-gate.test.d.ts.map +0 -1
- package/dist/autopilot/__tests__/deep-interview-gate.test.js +0 -215
- package/dist/autopilot/__tests__/deep-interview-gate.test.js.map +0 -1
- package/dist/autopilot/__tests__/ralplan-gate.test.d.ts +0 -2
- package/dist/autopilot/__tests__/ralplan-gate.test.d.ts.map +0 -1
- package/dist/autopilot/__tests__/ralplan-gate.test.js +0 -1361
- package/dist/autopilot/__tests__/ralplan-gate.test.js.map +0 -1
- package/dist/autopilot/deep-interview-gate.d.ts +0 -18
- package/dist/autopilot/deep-interview-gate.d.ts.map +0 -1
- package/dist/autopilot/deep-interview-gate.js +0 -396
- package/dist/autopilot/deep-interview-gate.js.map +0 -1
- package/dist/autopilot/ralplan-gate.d.ts +0 -18
- package/dist/autopilot/ralplan-gate.d.ts.map +0 -1
- package/dist/autopilot/ralplan-gate.js +0 -148
- package/dist/autopilot/ralplan-gate.js.map +0 -1
- package/dist/hooks/__tests__/prometheus-strict-contract.test.d.ts +0 -2
- package/dist/hooks/__tests__/prometheus-strict-contract.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/prometheus-strict-contract.test.js +0 -320
- package/dist/hooks/__tests__/prometheus-strict-contract.test.js.map +0 -1
- package/dist/pipeline/__tests__/orchestrator.test.d.ts +0 -2
- package/dist/pipeline/__tests__/orchestrator.test.d.ts.map +0 -1
- package/dist/pipeline/__tests__/orchestrator.test.js +0 -770
- package/dist/pipeline/__tests__/orchestrator.test.js.map +0 -1
- package/dist/pipeline/__tests__/stages.test.d.ts +0 -2
- package/dist/pipeline/__tests__/stages.test.d.ts.map +0 -1
- package/dist/pipeline/__tests__/stages.test.js +0 -1778
- package/dist/pipeline/__tests__/stages.test.js.map +0 -1
- package/dist/pipeline/index.d.ts +0 -25
- package/dist/pipeline/index.d.ts.map +0 -1
- package/dist/pipeline/index.js +0 -17
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/orchestrator.d.ts +0 -52
- package/dist/pipeline/orchestrator.d.ts.map +0 -1
- package/dist/pipeline/orchestrator.js +0 -399
- package/dist/pipeline/orchestrator.js.map +0 -1
- package/dist/pipeline/review-verdict.d.ts +0 -3
- package/dist/pipeline/review-verdict.d.ts.map +0 -1
- package/dist/pipeline/review-verdict.js +0 -14
- package/dist/pipeline/review-verdict.js.map +0 -1
- package/dist/pipeline/stages/code-review.d.ts +0 -35
- package/dist/pipeline/stages/code-review.d.ts.map +0 -1
- package/dist/pipeline/stages/code-review.js +0 -55
- package/dist/pipeline/stages/code-review.js.map +0 -1
- package/dist/pipeline/stages/deep-interview.d.ts +0 -15
- package/dist/pipeline/stages/deep-interview.d.ts.map +0 -1
- package/dist/pipeline/stages/deep-interview.js +0 -32
- package/dist/pipeline/stages/deep-interview.js.map +0 -1
- package/dist/pipeline/stages/ralph-verify.d.ts +0 -53
- package/dist/pipeline/stages/ralph-verify.d.ts.map +0 -1
- package/dist/pipeline/stages/ralph-verify.js +0 -89
- package/dist/pipeline/stages/ralph-verify.js.map +0 -1
- package/dist/pipeline/stages/ralplan.d.ts +0 -27
- package/dist/pipeline/stages/ralplan.d.ts.map +0 -1
- package/dist/pipeline/stages/ralplan.js +0 -152
- package/dist/pipeline/stages/ralplan.js.map +0 -1
- package/dist/pipeline/stages/team-exec.d.ts +0 -52
- package/dist/pipeline/stages/team-exec.d.ts.map +0 -1
- package/dist/pipeline/stages/team-exec.js +0 -266
- package/dist/pipeline/stages/team-exec.js.map +0 -1
- package/dist/pipeline/stages/ultragoal.d.ts +0 -23
- package/dist/pipeline/stages/ultragoal.d.ts.map +0 -1
- package/dist/pipeline/stages/ultragoal.js +0 -53
- package/dist/pipeline/stages/ultragoal.js.map +0 -1
- package/dist/pipeline/stages/ultraqa.d.ts +0 -33
- package/dist/pipeline/stages/ultraqa.d.ts.map +0 -1
- package/dist/pipeline/stages/ultraqa.js +0 -49
- package/dist/pipeline/stages/ultraqa.js.map +0 -1
- package/dist/pipeline/types.d.ts +0 -124
- package/dist/pipeline/types.d.ts.map +0 -1
- package/dist/pipeline/types.js +0 -8
- package/dist/pipeline/types.js.map +0 -1
- package/dist/ralplan/__tests__/consensus-gate.test.d.ts +0 -2
- package/dist/ralplan/__tests__/consensus-gate.test.d.ts.map +0 -1
- package/dist/ralplan/__tests__/consensus-gate.test.js +0 -1455
- package/dist/ralplan/__tests__/consensus-gate.test.js.map +0 -1
- package/dist/ralplan/consensus-gate.d.ts +0 -62
- package/dist/ralplan/consensus-gate.d.ts.map +0 -1
- package/dist/ralplan/consensus-gate.js +0 -760
- package/dist/ralplan/consensus-gate.js.map +0 -1
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts +0 -25
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +0 -1
- package/dist/scripts/notify-hook/ralph-session-resume.js +0 -377
- package/dist/scripts/notify-hook/ralph-session-resume.js.map +0 -1
- package/dist/state/__tests__/planning-gate.test.d.ts +0 -2
- package/dist/state/__tests__/planning-gate.test.d.ts.map +0 -1
- package/dist/state/__tests__/planning-gate.test.js +0 -629
- package/dist/state/__tests__/planning-gate.test.js.map +0 -1
- package/plugins/oh-my-codex/skills/autoresearch-goal/SKILL.md +0 -39
- package/plugins/oh-my-codex/skills/pipeline/SKILL.md +0 -97
- package/plugins/oh-my-codex/skills/prometheus-strict/README.md +0 -35
- package/plugins/oh-my-codex/skills/prometheus-strict/SKILL.md +0 -219
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +0 -298
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +0 -190
- package/plugins/oh-my-codex/skills/ultrawork/references/agent-tiers.md +0 -62
- package/prompts/prometheus-strict-metis.md +0 -274
- package/prompts/prometheus-strict-momus.md +0 -82
- package/prompts/prometheus-strict-oracle.md +0 -107
- package/prompts/scholastic.md +0 -11
- package/prompts/sisyphus-lite.md +0 -111
- package/skills/ask-claude/SKILL.md +0 -12
- package/skills/ask-gemini/SKILL.md +0 -12
- package/skills/build-fix/SKILL.md +0 -10
- package/skills/deepsearch/SKILL.md +0 -10
- package/skills/ecomode/SKILL.md +0 -114
- package/skills/ecomode/references/agent-tiers.md +0 -61
- package/skills/frontend-ui-ux/SKILL.md +0 -16
- package/skills/help/SKILL.md +0 -10
- package/skills/note/SKILL.md +0 -10
- package/skills/prometheus-strict/README.md +0 -35
- package/skills/prometheus-strict/SKILL.md +0 -219
- package/skills/ralph-init/SKILL.md +0 -10
- package/skills/review/SKILL.md +0 -10
- package/skills/security-review/SKILL.md +0 -10
- package/skills/swarm/SKILL.md +0 -12
- package/skills/tdd/SKILL.md +0 -104
- package/skills/trace/SKILL.md +0 -10
- package/skills/visual-verdict/SKILL.md +0 -10
- package/skills/web-clone/SKILL.md +0 -357
- package/src/scripts/notify-hook/ralph-session-resume.ts +0 -466
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { describe, it } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { existsSync, realpathSync } from 'node:fs';
|
|
4
5
|
import { join } from 'node:path';
|
|
5
|
-
import { tmpdir } from 'node:os';
|
|
6
|
-
import {
|
|
6
|
+
import { tmpdir as osTmpdir } from 'node:os';
|
|
7
|
+
import { __resetSessionPointerTransactionDependenciesForTests, __setSessionPointerTransactionDependenciesForTests, } from '../../hooks/session.js';
|
|
8
|
+
import { addUltragoalGoal, assertUltragoalWritableLifecycleAuthority, buildCodexGoalInstruction, checkpointUltragoal, createUltragoalPlan, isFinalRunCompletionCandidate, isUltragoalDone, readUltragoalPlan, recordFinalReviewBlockers, steerUltragoal, startNextUltragoal, summarizeUltragoalPlan, ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE, UltragoalError, validateUltragoalSteeringProposal, } from '../artifacts.js';
|
|
7
9
|
import { LEADER_CONDUCTOR_BLOCK, buildUnsupportedNativeSubagentGuidance } from '../../leader/contract.js';
|
|
8
10
|
import { steeringFixtures } from './steering-fixtures.js';
|
|
11
|
+
const tmpdir = () => realpathSync(osTmpdir());
|
|
9
12
|
async function withTempRepo(run) {
|
|
10
13
|
const cwd = await mkdtemp(join(tmpdir(), 'omx-ultragoal-'));
|
|
11
14
|
try {
|
|
@@ -39,6 +42,35 @@ function cleanQualityGate() {
|
|
|
39
42
|
function escapeRegExp(value) {
|
|
40
43
|
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
41
44
|
}
|
|
45
|
+
function aggregateFixtureGoal(id, status, extra = {}) {
|
|
46
|
+
return {
|
|
47
|
+
id,
|
|
48
|
+
title: id,
|
|
49
|
+
objective: `${id} work.`,
|
|
50
|
+
status,
|
|
51
|
+
attempt: 1,
|
|
52
|
+
createdAt: '2026-01-01T00:00:00.000Z',
|
|
53
|
+
updatedAt: '2026-01-01T00:00:00.000Z',
|
|
54
|
+
...extra,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
async function writeAggregateFixturePlan(cwd, activeGoalId, goals) {
|
|
58
|
+
await mkdir(join(cwd, '.omx/ultragoal'), { recursive: true });
|
|
59
|
+
await writeFile(join(cwd, '.omx/ultragoal/brief.md'), 'aggregate terminalization fixture\n');
|
|
60
|
+
await writeFile(join(cwd, '.omx/ultragoal/goals.json'), `${JSON.stringify({
|
|
61
|
+
version: 1,
|
|
62
|
+
createdAt: '2026-01-01T00:00:00.000Z',
|
|
63
|
+
updatedAt: '2026-01-01T00:00:00.000Z',
|
|
64
|
+
briefPath: '.omx/ultragoal/brief.md',
|
|
65
|
+
goalsPath: '.omx/ultragoal/goals.json',
|
|
66
|
+
ledgerPath: '.omx/ultragoal/ledger.jsonl',
|
|
67
|
+
codexGoalMode: 'aggregate',
|
|
68
|
+
codexObjective: ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE,
|
|
69
|
+
activeGoalId,
|
|
70
|
+
goals,
|
|
71
|
+
}, null, 2)}\n`);
|
|
72
|
+
await writeFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), '');
|
|
73
|
+
}
|
|
42
74
|
async function writeFixturePlan(cwd, plan) {
|
|
43
75
|
await mkdir(join(cwd, '.omx/ultragoal'), { recursive: true });
|
|
44
76
|
await writeFile(join(cwd, '.omx/ultragoal/brief.md'), 'G001-core-steering-model fixture for .omx/ultragoal steering behavior.\n');
|
|
@@ -441,6 +473,7 @@ describe('ultragoal artifacts', () => {
|
|
|
441
473
|
goalId: first.goal.id,
|
|
442
474
|
status: 'complete',
|
|
443
475
|
evidence: 'Actual planned work done for .omx/ultragoal/goals.json G001-first; validation complete; reviews clean.',
|
|
476
|
+
strict: true,
|
|
444
477
|
codexGoal: { goal: { objective: taskObjective, status: 'complete' } },
|
|
445
478
|
}), /quality-gate-json|quality gate/i);
|
|
446
479
|
});
|
|
@@ -491,6 +524,11 @@ describe('ultragoal artifacts', () => {
|
|
|
491
524
|
evidence: 'first audit passed',
|
|
492
525
|
codexGoal: { goal: { objective: aggregateObjective, status: 'active' } },
|
|
493
526
|
});
|
|
527
|
+
const midRunPlan = await readUltragoalPlan(cwd);
|
|
528
|
+
assert.equal(midRunPlan.goals.find((goal) => goal.id === 'G001-first')?.status, 'complete');
|
|
529
|
+
assert.equal(midRunPlan.goals.find((goal) => goal.id === 'G002-second')?.status, 'pending');
|
|
530
|
+
assert.equal(midRunPlan.aggregateCompletion, undefined);
|
|
531
|
+
assert.equal(summarizeUltragoalPlan(midRunPlan).aggregateComplete, false);
|
|
494
532
|
const second = await startNextUltragoal(cwd);
|
|
495
533
|
await checkpointUltragoal(cwd, {
|
|
496
534
|
goalId: second.goal.id,
|
|
@@ -500,8 +538,16 @@ describe('ultragoal artifacts', () => {
|
|
|
500
538
|
qualityGate: cleanQualityGate(),
|
|
501
539
|
});
|
|
502
540
|
const plan = await readUltragoalPlan(cwd);
|
|
541
|
+
assert.equal(plan.goals.find((goal) => goal.id === second.goal.id)?.status, 'complete');
|
|
503
542
|
assert.equal(plan.goals.every((goal) => goal.status === 'complete'), true);
|
|
504
543
|
assert.equal(plan.activeGoalId, undefined);
|
|
544
|
+
assert.equal(plan.aggregateCompletion?.status, 'complete');
|
|
545
|
+
const summary = summarizeUltragoalPlan(plan);
|
|
546
|
+
assert.equal(summary.aggregateComplete, true);
|
|
547
|
+
assert.equal(summary.artifactComplete, true);
|
|
548
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
549
|
+
assert.equal((ledger.match(/"event":"goal_completed"/g) ?? []).length, 2);
|
|
550
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 1);
|
|
505
551
|
});
|
|
506
552
|
});
|
|
507
553
|
it('treats existing v1 plans without mode metadata as legacy per-story plans', async () => {
|
|
@@ -740,6 +786,437 @@ describe('ultragoal artifacts', () => {
|
|
|
740
786
|
assert.match(ledger, /"event":"aggregate_completed"/);
|
|
741
787
|
});
|
|
742
788
|
});
|
|
789
|
+
it('does not terminalize through a one-way designated resolver pointer', async () => {
|
|
790
|
+
await withTempRepo(async (cwd) => {
|
|
791
|
+
await createUltragoalPlan(cwd, {
|
|
792
|
+
brief: 'brief',
|
|
793
|
+
goals: [{ title: 'Final', objective: 'Complete final milestone.' }],
|
|
794
|
+
});
|
|
795
|
+
const started = await startNextUltragoal(cwd);
|
|
796
|
+
const objective = started.plan.codexObjective;
|
|
797
|
+
const blocked = await recordFinalReviewBlockers(cwd, {
|
|
798
|
+
goalId: started.goal.id,
|
|
799
|
+
title: 'Resolve final code-review blockers',
|
|
800
|
+
objective: 'Fix final code-review blockers and rerun final gates.',
|
|
801
|
+
evidence: 'code-reviewer REQUEST CHANGES before resolver',
|
|
802
|
+
codexGoal: { goal: { objective, status: 'active' } },
|
|
803
|
+
});
|
|
804
|
+
const resolver = await startNextUltragoal(cwd);
|
|
805
|
+
assert.equal(resolver.goal?.id, blocked.addedGoal.id);
|
|
806
|
+
const planPath = join(cwd, '.omx/ultragoal/goals.json');
|
|
807
|
+
const tampered = JSON.parse(await readFile(planPath, 'utf-8'));
|
|
808
|
+
const resolverGoal = tampered.goals.find((goal) => goal.id === resolver.goal.id);
|
|
809
|
+
delete resolverGoal.resolvesReviewBlockedGoalId;
|
|
810
|
+
await writeFile(planPath, `${JSON.stringify(tampered, null, 2)}\n`);
|
|
811
|
+
const parentBeforeCheckpoint = tampered.goals.find((goal) => goal.id === blocked.blockedGoal.id);
|
|
812
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, resolverGoal), true);
|
|
813
|
+
assert.equal(parentBeforeCheckpoint?.reviewBlockerResolution?.resolverGoalId, resolverGoal.id);
|
|
814
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
815
|
+
goalId: resolverGoal.id,
|
|
816
|
+
status: 'complete',
|
|
817
|
+
evidence: `${resolverGoal.id} fixed blockers; final gate passed for .omx/ultragoal/goals.json`,
|
|
818
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
819
|
+
qualityGate: cleanQualityGate(),
|
|
820
|
+
});
|
|
821
|
+
const parent = completed.goals.find((goal) => goal.id === blocked.blockedGoal.id);
|
|
822
|
+
const completedResolver = completed.goals.find((goal) => goal.id === resolverGoal.id);
|
|
823
|
+
const summary = summarizeUltragoalPlan(completed);
|
|
824
|
+
assert.equal(completedResolver?.status, 'complete');
|
|
825
|
+
assert.equal(parent?.status, 'review_blocked');
|
|
826
|
+
assert.equal(parent?.reviewBlockerResolution?.resolverGoalId, resolverGoal.id);
|
|
827
|
+
assert.equal(completed.aggregateCompletion, undefined);
|
|
828
|
+
assert.equal(summary.reviewBlocked, 1);
|
|
829
|
+
assert.equal(summary.aggregateComplete, false);
|
|
830
|
+
assert.equal(summary.artifactComplete, false);
|
|
831
|
+
assert.equal(isUltragoalDone(completed), false);
|
|
832
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
833
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
834
|
+
});
|
|
835
|
+
});
|
|
836
|
+
it('does not terminalize when two unresolved review-blocked parents point at one resolver', async () => {
|
|
837
|
+
await withTempRepo(async (cwd) => {
|
|
838
|
+
await createUltragoalPlan(cwd, {
|
|
839
|
+
brief: 'brief',
|
|
840
|
+
goals: [{ title: 'Final', objective: 'Complete final milestone.' }],
|
|
841
|
+
});
|
|
842
|
+
const started = await startNextUltragoal(cwd);
|
|
843
|
+
const objective = started.plan.codexObjective;
|
|
844
|
+
const blocked = await recordFinalReviewBlockers(cwd, {
|
|
845
|
+
goalId: started.goal.id,
|
|
846
|
+
title: 'Resolve final code-review blockers',
|
|
847
|
+
objective: 'Fix final code-review blockers and rerun final gates.',
|
|
848
|
+
evidence: 'code-reviewer REQUEST CHANGES before resolver',
|
|
849
|
+
codexGoal: { goal: { objective, status: 'active' } },
|
|
850
|
+
});
|
|
851
|
+
const resolver = await startNextUltragoal(cwd);
|
|
852
|
+
assert.equal(resolver.goal?.id, blocked.addedGoal.id);
|
|
853
|
+
const planPath = join(cwd, '.omx/ultragoal/goals.json');
|
|
854
|
+
const tampered = JSON.parse(await readFile(planPath, 'utf-8'));
|
|
855
|
+
const resolverGoal = tampered.goals.find((goal) => goal.id === resolver.goal.id);
|
|
856
|
+
const originalParent = tampered.goals.find((goal) => goal.id === blocked.blockedGoal.id);
|
|
857
|
+
tampered.goals.push({
|
|
858
|
+
...originalParent,
|
|
859
|
+
id: 'G999-forged-second-parent',
|
|
860
|
+
title: 'Forged second review-blocked parent',
|
|
861
|
+
objective: 'Forge a second unresolved review-blocked parent.',
|
|
862
|
+
status: 'review_blocked',
|
|
863
|
+
reviewBlockerResolution: {
|
|
864
|
+
resolverGoalId: resolverGoal.id,
|
|
865
|
+
status: 'pending',
|
|
866
|
+
evidence: 'forged second parent',
|
|
867
|
+
},
|
|
868
|
+
});
|
|
869
|
+
await writeFile(planPath, `${JSON.stringify(tampered, null, 2)}\n`);
|
|
870
|
+
assert.equal(tampered.goals.filter((goal) => goal.status === 'review_blocked').length, 2);
|
|
871
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, resolverGoal), true);
|
|
872
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
873
|
+
goalId: resolverGoal.id,
|
|
874
|
+
status: 'complete',
|
|
875
|
+
evidence: `${resolverGoal.id} fixed blockers; final gate passed for .omx/ultragoal/goals.json`,
|
|
876
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
877
|
+
qualityGate: cleanQualityGate(),
|
|
878
|
+
});
|
|
879
|
+
const originalParentAfter = completed.goals.find((goal) => goal.id === originalParent.id);
|
|
880
|
+
const secondParentAfter = completed.goals.find((goal) => goal.id === 'G999-forged-second-parent');
|
|
881
|
+
const completedResolver = completed.goals.find((goal) => goal.id === resolverGoal.id);
|
|
882
|
+
const summary = summarizeUltragoalPlan(completed);
|
|
883
|
+
assert.equal(completedResolver?.status, 'complete');
|
|
884
|
+
assert.equal(originalParentAfter?.status, 'complete');
|
|
885
|
+
assert.equal(originalParentAfter?.reviewBlockerResolution?.status, 'complete');
|
|
886
|
+
assert.equal(secondParentAfter?.status, 'review_blocked');
|
|
887
|
+
assert.equal(secondParentAfter?.reviewBlockerResolution?.status, 'pending');
|
|
888
|
+
assert.equal(completed.aggregateCompletion, undefined);
|
|
889
|
+
assert.equal(summary.reviewBlocked, 1);
|
|
890
|
+
assert.equal(summary.aggregateComplete, false);
|
|
891
|
+
assert.equal(summary.artifactComplete, false);
|
|
892
|
+
assert.equal(isUltragoalDone(completed), false);
|
|
893
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
894
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
895
|
+
});
|
|
896
|
+
});
|
|
897
|
+
it('does not terminalize when a review-blocked parent names a resolver whose back-pointer targets another parent', async () => {
|
|
898
|
+
await withTempRepo(async (cwd) => {
|
|
899
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
900
|
+
await writeAggregateFixturePlan(cwd, 'G004-final', [
|
|
901
|
+
aggregateFixtureGoal('G001-parent', 'review_blocked', {
|
|
902
|
+
reviewBlockerResolution: {
|
|
903
|
+
resolverGoalId: 'G002-resolver',
|
|
904
|
+
status: 'complete',
|
|
905
|
+
resolvedAt: '2026-01-01T00:00:00.000Z',
|
|
906
|
+
evidence: 'forged resolution metadata',
|
|
907
|
+
},
|
|
908
|
+
}),
|
|
909
|
+
aggregateFixtureGoal('G002-resolver', 'complete', {
|
|
910
|
+
completedAt: '2026-01-01T00:00:00.000Z',
|
|
911
|
+
evidence: 'resolver done',
|
|
912
|
+
resolvesReviewBlockedGoalId: 'G003-other',
|
|
913
|
+
}),
|
|
914
|
+
aggregateFixtureGoal('G003-other', 'complete', { completedAt: '2026-01-01T00:00:00.000Z', evidence: 'other done' }),
|
|
915
|
+
aggregateFixtureGoal('G004-final', 'in_progress', { startedAt: '2026-01-01T00:00:00.000Z' }),
|
|
916
|
+
]);
|
|
917
|
+
const tampered = await readUltragoalPlan(cwd);
|
|
918
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, tampered.goals.find((goal) => goal.id === 'G004-final')), false);
|
|
919
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
920
|
+
goalId: 'G004-final',
|
|
921
|
+
status: 'complete',
|
|
922
|
+
evidence: 'G004-final completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
923
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
924
|
+
qualityGate: cleanQualityGate(),
|
|
925
|
+
}), /not complete|objective mismatch|Completed task-scoped aggregate reconciliation/);
|
|
926
|
+
const plan = await readUltragoalPlan(cwd);
|
|
927
|
+
assert.equal(plan.goals.find((goal) => goal.id === 'G001-parent')?.status, 'review_blocked');
|
|
928
|
+
assert.equal(plan.aggregateCompletion, undefined);
|
|
929
|
+
assert.equal(summarizeUltragoalPlan(plan).aggregateComplete, false);
|
|
930
|
+
assert.equal(isUltragoalDone(plan), false);
|
|
931
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
932
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
933
|
+
});
|
|
934
|
+
});
|
|
935
|
+
it('does not terminalize when a falsely-resolved parent coexists with a legitimate designated resolver', async () => {
|
|
936
|
+
await withTempRepo(async (cwd) => {
|
|
937
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
938
|
+
await writeAggregateFixturePlan(cwd, 'G004-resolver-b', [
|
|
939
|
+
aggregateFixtureGoal('G001-parent-a', 'review_blocked', {
|
|
940
|
+
reviewBlockerResolution: {
|
|
941
|
+
resolverGoalId: 'G002-resolver-a',
|
|
942
|
+
status: 'complete',
|
|
943
|
+
resolvedAt: '2026-01-01T00:00:00.000Z',
|
|
944
|
+
evidence: 'forged resolution metadata for parent A',
|
|
945
|
+
},
|
|
946
|
+
}),
|
|
947
|
+
aggregateFixtureGoal('G002-resolver-a', 'complete', {
|
|
948
|
+
completedAt: '2026-01-01T00:00:00.000Z',
|
|
949
|
+
evidence: 'resolver A done',
|
|
950
|
+
resolvesReviewBlockedGoalId: 'G009-elsewhere',
|
|
951
|
+
}),
|
|
952
|
+
aggregateFixtureGoal('G003-parent-b', 'review_blocked', {
|
|
953
|
+
reviewBlockerResolution: {
|
|
954
|
+
resolverGoalId: 'G004-resolver-b',
|
|
955
|
+
status: 'pending',
|
|
956
|
+
evidence: 'legitimate blocker for parent B',
|
|
957
|
+
},
|
|
958
|
+
}),
|
|
959
|
+
aggregateFixtureGoal('G004-resolver-b', 'in_progress', {
|
|
960
|
+
startedAt: '2026-01-01T00:00:00.000Z',
|
|
961
|
+
resolvesReviewBlockedGoalId: 'G003-parent-b',
|
|
962
|
+
}),
|
|
963
|
+
]);
|
|
964
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
965
|
+
goalId: 'G004-resolver-b',
|
|
966
|
+
status: 'complete',
|
|
967
|
+
evidence: 'G004-resolver-b completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
968
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
969
|
+
qualityGate: cleanQualityGate(),
|
|
970
|
+
}), /not complete|objective mismatch|Completed task-scoped aggregate reconciliation/);
|
|
971
|
+
const plan = await readUltragoalPlan(cwd);
|
|
972
|
+
assert.equal(plan.goals.find((goal) => goal.id === 'G001-parent-a')?.status, 'review_blocked');
|
|
973
|
+
assert.equal(plan.aggregateCompletion, undefined);
|
|
974
|
+
assert.equal(summarizeUltragoalPlan(plan).aggregateComplete, false);
|
|
975
|
+
assert.equal(isUltragoalDone(plan), false);
|
|
976
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
977
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
978
|
+
});
|
|
979
|
+
});
|
|
980
|
+
it('does not treat a self-referential review-blocker resolver as a designated resolver', async () => {
|
|
981
|
+
await withTempRepo(async (cwd) => {
|
|
982
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
983
|
+
await writeAggregateFixturePlan(cwd, 'G001-self', [
|
|
984
|
+
aggregateFixtureGoal('G001-self', 'review_blocked', {
|
|
985
|
+
reviewBlockerResolution: {
|
|
986
|
+
resolverGoalId: 'G001-self',
|
|
987
|
+
status: 'pending',
|
|
988
|
+
evidence: 'self-referential resolver metadata',
|
|
989
|
+
},
|
|
990
|
+
resolvesReviewBlockedGoalId: 'G001-self',
|
|
991
|
+
}),
|
|
992
|
+
]);
|
|
993
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
994
|
+
goalId: 'G001-self',
|
|
995
|
+
status: 'complete',
|
|
996
|
+
evidence: 'G001-self completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
997
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
998
|
+
qualityGate: cleanQualityGate(),
|
|
999
|
+
});
|
|
1000
|
+
assert.equal(completed.aggregateCompletion, undefined);
|
|
1001
|
+
assert.equal(summarizeUltragoalPlan(completed).aggregateComplete, false);
|
|
1002
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1003
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
1004
|
+
});
|
|
1005
|
+
});
|
|
1006
|
+
it('does not terminalize when the final aggregate candidate is steering-blocked', async () => {
|
|
1007
|
+
await withTempRepo(async (cwd) => {
|
|
1008
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
1009
|
+
await writeAggregateFixturePlan(cwd, 'G002-target', [
|
|
1010
|
+
aggregateFixtureGoal('G001-first', 'complete', { completedAt: '2026-01-01T00:00:00.000Z', evidence: 'first done' }),
|
|
1011
|
+
aggregateFixtureGoal('G002-target', 'in_progress', { startedAt: '2026-01-01T00:00:00.000Z', steeringStatus: 'blocked' }),
|
|
1012
|
+
]);
|
|
1013
|
+
const tampered = await readUltragoalPlan(cwd);
|
|
1014
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, tampered.goals.find((goal) => goal.id === 'G002-target')), true);
|
|
1015
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
1016
|
+
goalId: 'G002-target',
|
|
1017
|
+
status: 'complete',
|
|
1018
|
+
evidence: 'G002-target completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
1019
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1020
|
+
qualityGate: cleanQualityGate(),
|
|
1021
|
+
});
|
|
1022
|
+
assert.equal(completed.goals.find((goal) => goal.id === 'G002-target')?.steeringStatus, 'blocked');
|
|
1023
|
+
assert.equal(completed.aggregateCompletion, undefined);
|
|
1024
|
+
assert.equal(summarizeUltragoalPlan(completed).aggregateComplete, false);
|
|
1025
|
+
assert.equal(isUltragoalDone(completed), false);
|
|
1026
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1027
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
1028
|
+
});
|
|
1029
|
+
});
|
|
1030
|
+
it('does not terminalize when duplicate goal ids hide an unresolved row', async () => {
|
|
1031
|
+
await withTempRepo(async (cwd) => {
|
|
1032
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
1033
|
+
await writeAggregateFixturePlan(cwd, 'G002-dup', [
|
|
1034
|
+
aggregateFixtureGoal('G001-first', 'complete', { completedAt: '2026-01-01T00:00:00.000Z', evidence: 'first done' }),
|
|
1035
|
+
aggregateFixtureGoal('G002-dup', 'in_progress', { startedAt: '2026-01-01T00:00:00.000Z' }),
|
|
1036
|
+
aggregateFixtureGoal('G002-dup', 'pending'),
|
|
1037
|
+
]);
|
|
1038
|
+
const tampered = await readUltragoalPlan(cwd);
|
|
1039
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, tampered.goals.find((goal) => goal.id === 'G002-dup')), true);
|
|
1040
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
1041
|
+
goalId: 'G002-dup',
|
|
1042
|
+
status: 'complete',
|
|
1043
|
+
evidence: 'G002-dup completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
1044
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1045
|
+
qualityGate: cleanQualityGate(),
|
|
1046
|
+
});
|
|
1047
|
+
assert.equal(completed.goals.filter((goal) => goal.id === 'G002-dup' && goal.status === 'pending').length, 1);
|
|
1048
|
+
assert.equal(completed.aggregateCompletion, undefined);
|
|
1049
|
+
assert.equal(summarizeUltragoalPlan(completed).aggregateComplete, false);
|
|
1050
|
+
assert.equal(isUltragoalDone(completed), false);
|
|
1051
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1052
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
1053
|
+
});
|
|
1054
|
+
});
|
|
1055
|
+
it('does not terminalize a final aggregate candidate that is not the active in-progress goal', async () => {
|
|
1056
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
1057
|
+
for (const unowned of ['pending', 'failed', 'needs_user_decision']) {
|
|
1058
|
+
await withTempRepo(async (cwd) => {
|
|
1059
|
+
await writeAggregateFixturePlan(cwd, 'G002-target', [
|
|
1060
|
+
aggregateFixtureGoal('G001-first', 'complete', { completedAt: '2026-01-01T00:00:00.000Z', evidence: 'first done' }),
|
|
1061
|
+
aggregateFixtureGoal('G002-target', unowned),
|
|
1062
|
+
]);
|
|
1063
|
+
const tampered = await readUltragoalPlan(cwd);
|
|
1064
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, tampered.goals.find((goal) => goal.id === 'G002-target')), true);
|
|
1065
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
1066
|
+
goalId: 'G002-target',
|
|
1067
|
+
status: 'complete',
|
|
1068
|
+
evidence: 'G002-target completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
1069
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1070
|
+
qualityGate: cleanQualityGate(),
|
|
1071
|
+
});
|
|
1072
|
+
assert.equal(completed.aggregateCompletion, undefined, unowned);
|
|
1073
|
+
assert.equal(summarizeUltragoalPlan(completed).aggregateComplete, false, unowned);
|
|
1074
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1075
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0, unowned);
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
it('keeps terminal aggregate completion idempotent under repeated and concurrent final checkpoints', async () => {
|
|
1080
|
+
await withTempRepo(async (cwd) => {
|
|
1081
|
+
await createUltragoalPlan(cwd, {
|
|
1082
|
+
brief: 'brief',
|
|
1083
|
+
goals: [
|
|
1084
|
+
{ title: 'First', objective: 'Complete first milestone.' },
|
|
1085
|
+
{ title: 'Second', objective: 'Complete second milestone.' },
|
|
1086
|
+
],
|
|
1087
|
+
});
|
|
1088
|
+
const first = await startNextUltragoal(cwd);
|
|
1089
|
+
const aggregateObjective = first.plan.codexObjective;
|
|
1090
|
+
await checkpointUltragoal(cwd, {
|
|
1091
|
+
goalId: first.goal.id,
|
|
1092
|
+
status: 'complete',
|
|
1093
|
+
evidence: 'first audit passed',
|
|
1094
|
+
codexGoal: { goal: { objective: aggregateObjective, status: 'active' } },
|
|
1095
|
+
});
|
|
1096
|
+
const second = await startNextUltragoal(cwd);
|
|
1097
|
+
const terminal = await checkpointUltragoal(cwd, {
|
|
1098
|
+
goalId: second.goal.id,
|
|
1099
|
+
status: 'complete',
|
|
1100
|
+
evidence: 'final audit passed',
|
|
1101
|
+
codexGoal: { goal: { objective: aggregateObjective, status: 'complete' } },
|
|
1102
|
+
qualityGate: cleanQualityGate(),
|
|
1103
|
+
});
|
|
1104
|
+
const firstCompletedAt = terminal.aggregateCompletion?.completedAt;
|
|
1105
|
+
assert.equal(terminal.aggregateCompletion?.status, 'complete');
|
|
1106
|
+
assert.ok(firstCompletedAt);
|
|
1107
|
+
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
1108
|
+
await checkpointUltragoal(cwd, {
|
|
1109
|
+
goalId: second.goal.id,
|
|
1110
|
+
status: 'complete',
|
|
1111
|
+
evidence: `repeated terminal checkpoint ${attempt}`,
|
|
1112
|
+
codexGoal: { goal: { objective: aggregateObjective, status: 'complete' } },
|
|
1113
|
+
qualityGate: cleanQualityGate(),
|
|
1114
|
+
}).catch(() => undefined);
|
|
1115
|
+
}
|
|
1116
|
+
await Promise.allSettled(Array.from({ length: 5 }, (_, index) => checkpointUltragoal(cwd, {
|
|
1117
|
+
goalId: second.goal.id,
|
|
1118
|
+
status: 'complete',
|
|
1119
|
+
evidence: `concurrent terminal checkpoint ${index}`,
|
|
1120
|
+
codexGoal: { goal: { objective: aggregateObjective, status: 'complete' } },
|
|
1121
|
+
qualityGate: cleanQualityGate(),
|
|
1122
|
+
})));
|
|
1123
|
+
const plan = await readUltragoalPlan(cwd);
|
|
1124
|
+
assert.equal(plan.aggregateCompletion?.status, 'complete');
|
|
1125
|
+
assert.equal(plan.aggregateCompletion?.completedAt, firstCompletedAt);
|
|
1126
|
+
assert.equal(summarizeUltragoalPlan(plan).aggregateComplete, true);
|
|
1127
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1128
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 1);
|
|
1129
|
+
});
|
|
1130
|
+
});
|
|
1131
|
+
it('pins allowActiveFinalCodexGoal as a required negative condition for terminal aggregate completion', async () => {
|
|
1132
|
+
await withTempRepo(async (cwd) => {
|
|
1133
|
+
await createUltragoalPlan(cwd, {
|
|
1134
|
+
brief: 'brief',
|
|
1135
|
+
goals: [
|
|
1136
|
+
{ title: 'First', objective: 'Complete first milestone.' },
|
|
1137
|
+
{ title: 'Second', objective: 'Complete second milestone.' },
|
|
1138
|
+
],
|
|
1139
|
+
});
|
|
1140
|
+
const first = await startNextUltragoal(cwd);
|
|
1141
|
+
const aggregateObjective = first.plan.codexObjective;
|
|
1142
|
+
await checkpointUltragoal(cwd, {
|
|
1143
|
+
goalId: first.goal.id,
|
|
1144
|
+
status: 'complete',
|
|
1145
|
+
evidence: 'first audit passed',
|
|
1146
|
+
codexGoal: { goal: { objective: aggregateObjective, status: 'active' } },
|
|
1147
|
+
});
|
|
1148
|
+
const second = await startNextUltragoal(cwd);
|
|
1149
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
1150
|
+
goalId: second.goal.id,
|
|
1151
|
+
status: 'complete',
|
|
1152
|
+
evidence: 'final story completed while the aggregate Codex goal stays active',
|
|
1153
|
+
codexGoal: { goal: { objective: aggregateObjective, status: 'active' } },
|
|
1154
|
+
allowActiveFinalCodexGoal: true,
|
|
1155
|
+
});
|
|
1156
|
+
assert.equal(completed.goals.find((goal) => goal.id === second.goal.id)?.status, 'complete');
|
|
1157
|
+
assert.equal(completed.aggregateCompletion, undefined);
|
|
1158
|
+
assert.equal(summarizeUltragoalPlan(completed).aggregateComplete, false);
|
|
1159
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1160
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0);
|
|
1161
|
+
});
|
|
1162
|
+
});
|
|
1163
|
+
it('does not terminalize an in-progress final candidate whose activeGoalId pointer does not match', async () => {
|
|
1164
|
+
const objective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
1165
|
+
for (const activePointer of ['G001-first', undefined]) {
|
|
1166
|
+
await withTempRepo(async (cwd) => {
|
|
1167
|
+
await writeAggregateFixturePlan(cwd, activePointer, [
|
|
1168
|
+
aggregateFixtureGoal('G001-first', 'complete', { completedAt: '2026-01-01T00:00:00.000Z', evidence: 'first done' }),
|
|
1169
|
+
aggregateFixtureGoal('G002-target', 'in_progress', { startedAt: '2026-01-01T00:00:00.000Z' }),
|
|
1170
|
+
]);
|
|
1171
|
+
const tampered = await readUltragoalPlan(cwd);
|
|
1172
|
+
const target = tampered.goals.find((goal) => goal.id === 'G002-target');
|
|
1173
|
+
assert.equal(target.status, 'in_progress');
|
|
1174
|
+
assert.equal(isFinalRunCompletionCandidate(tampered, target), true);
|
|
1175
|
+
const completed = await checkpointUltragoal(cwd, {
|
|
1176
|
+
goalId: 'G002-target',
|
|
1177
|
+
status: 'complete',
|
|
1178
|
+
evidence: 'G002-target completed planned work for .omx/ultragoal/goals.json; validation complete; reviews clean.',
|
|
1179
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1180
|
+
qualityGate: cleanQualityGate(),
|
|
1181
|
+
});
|
|
1182
|
+
assert.equal(completed.aggregateCompletion, undefined, String(activePointer));
|
|
1183
|
+
assert.equal(summarizeUltragoalPlan(completed).aggregateComplete, false, String(activePointer));
|
|
1184
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1185
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 0, String(activePointer));
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
});
|
|
1189
|
+
it('freezes a completed aggregate plan against post-terminal failure checkpoints and goal additions', async () => {
|
|
1190
|
+
await withTempRepo(async (cwd) => {
|
|
1191
|
+
await createUltragoalPlan(cwd, {
|
|
1192
|
+
brief: 'brief',
|
|
1193
|
+
goals: [{ title: 'Only', objective: 'Complete the only milestone.' }],
|
|
1194
|
+
});
|
|
1195
|
+
const started = await startNextUltragoal(cwd);
|
|
1196
|
+
const terminal = await checkpointUltragoal(cwd, {
|
|
1197
|
+
goalId: started.goal.id,
|
|
1198
|
+
status: 'complete',
|
|
1199
|
+
evidence: 'terminal aggregate checkpoint',
|
|
1200
|
+
codexGoal: { goal: { objective: started.plan.codexObjective, status: 'complete' } },
|
|
1201
|
+
qualityGate: cleanQualityGate(),
|
|
1202
|
+
});
|
|
1203
|
+
assert.equal(terminal.aggregateCompletion?.status, 'complete');
|
|
1204
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
1205
|
+
goalId: started.goal.id,
|
|
1206
|
+
status: 'failed',
|
|
1207
|
+
evidence: 'post-terminal failure attempt',
|
|
1208
|
+
}), /after the aggregate ultragoal plan is complete/);
|
|
1209
|
+
await assert.rejects(() => addUltragoalGoal(cwd, { title: 'Post terminal', objective: 'Added after completion.' }), /already completed aggregate ultragoal plan/);
|
|
1210
|
+
const plan = await readUltragoalPlan(cwd);
|
|
1211
|
+
assert.equal(plan.goals.length, 1);
|
|
1212
|
+
assert.equal(plan.goals[0]?.status, 'complete');
|
|
1213
|
+
assert.equal(plan.aggregateCompletion?.status, 'complete');
|
|
1214
|
+
assert.equal(summarizeUltragoalPlan(plan).aggregateComplete, true);
|
|
1215
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
1216
|
+
assert.equal((ledger.match(/"event":"aggregate_completed"/g) ?? []).length, 1);
|
|
1217
|
+
assert.equal((ledger.match(/"event":"goal_failed"/g) ?? []).length, 0);
|
|
1218
|
+
});
|
|
1219
|
+
});
|
|
743
1220
|
it('does not reconcile a review-blocked parent from a non-designated resolver goal', async () => {
|
|
744
1221
|
await withTempRepo(async (cwd) => {
|
|
745
1222
|
await createUltragoalPlan(cwd, {
|
|
@@ -872,12 +1349,14 @@ describe('ultragoal artifacts', () => {
|
|
|
872
1349
|
status: 'complete',
|
|
873
1350
|
evidence: 'tests passed',
|
|
874
1351
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1352
|
+
strict: true,
|
|
875
1353
|
}), /quality-gate-json|quality gate/i);
|
|
876
1354
|
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
877
1355
|
goalId: started.goal.id,
|
|
878
1356
|
status: 'complete',
|
|
879
1357
|
evidence: 'tests passed',
|
|
880
1358
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1359
|
+
strict: true,
|
|
881
1360
|
qualityGate: {
|
|
882
1361
|
...cleanQualityGate(),
|
|
883
1362
|
codeReview: { recommendation: 'COMMENT', architectStatus: 'CLEAR', evidence: 'not clean' },
|
|
@@ -888,6 +1367,7 @@ describe('ultragoal artifacts', () => {
|
|
|
888
1367
|
status: 'complete',
|
|
889
1368
|
evidence: 'tests passed',
|
|
890
1369
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1370
|
+
strict: true,
|
|
891
1371
|
qualityGate: {
|
|
892
1372
|
...cleanQualityGate(),
|
|
893
1373
|
aiSlopCleaner: { status: 'not_applicable', evidence: 'skipped cleaner' },
|
|
@@ -898,6 +1378,7 @@ describe('ultragoal artifacts', () => {
|
|
|
898
1378
|
status: 'complete',
|
|
899
1379
|
evidence: 'tests passed',
|
|
900
1380
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1381
|
+
strict: true,
|
|
901
1382
|
qualityGate: {
|
|
902
1383
|
...cleanQualityGate(),
|
|
903
1384
|
codeReview: {
|
|
@@ -912,6 +1393,7 @@ describe('ultragoal artifacts', () => {
|
|
|
912
1393
|
status: 'complete',
|
|
913
1394
|
evidence: 'tests passed',
|
|
914
1395
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1396
|
+
strict: true,
|
|
915
1397
|
qualityGate: {
|
|
916
1398
|
...cleanQualityGate(),
|
|
917
1399
|
codeReview: {
|
|
@@ -932,6 +1414,7 @@ describe('ultragoal artifacts', () => {
|
|
|
932
1414
|
status: 'complete',
|
|
933
1415
|
evidence: 'tests passed',
|
|
934
1416
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1417
|
+
strict: true,
|
|
935
1418
|
qualityGate: {
|
|
936
1419
|
...cleanQualityGate(),
|
|
937
1420
|
codeReview: {
|
|
@@ -950,6 +1433,7 @@ describe('ultragoal artifacts', () => {
|
|
|
950
1433
|
status: 'complete',
|
|
951
1434
|
evidence: 'tests passed',
|
|
952
1435
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1436
|
+
strict: true,
|
|
953
1437
|
qualityGate: {
|
|
954
1438
|
...cleanQualityGate(),
|
|
955
1439
|
codeReview: {
|
|
@@ -996,6 +1480,7 @@ describe('ultragoal artifacts', () => {
|
|
|
996
1480
|
status: 'complete',
|
|
997
1481
|
evidence: 'tests passed',
|
|
998
1482
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1483
|
+
strict: true,
|
|
999
1484
|
qualityGate: cleanQualityGate(),
|
|
1000
1485
|
}), /missing proof for required invariant from \.omx\/ultragoal\/brief\.md: Preserve the existing parser boundary/i);
|
|
1001
1486
|
await checkpointUltragoal(cwd, {
|
|
@@ -1064,6 +1549,7 @@ describe('ultragoal artifacts', () => {
|
|
|
1064
1549
|
status: 'complete',
|
|
1065
1550
|
evidence: 'tests passed',
|
|
1066
1551
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1552
|
+
strict: true,
|
|
1067
1553
|
qualityGate: {
|
|
1068
1554
|
...cleanQualityGate(),
|
|
1069
1555
|
architectureInvariantGate: {
|
|
@@ -1120,6 +1606,7 @@ describe('ultragoal artifacts', () => {
|
|
|
1120
1606
|
status: 'complete',
|
|
1121
1607
|
evidence: 'tests passed',
|
|
1122
1608
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1609
|
+
strict: true,
|
|
1123
1610
|
qualityGate: {
|
|
1124
1611
|
...cleanQualityGate(),
|
|
1125
1612
|
architectureInvariantGate: {
|
|
@@ -1144,6 +1631,7 @@ describe('ultragoal artifacts', () => {
|
|
|
1144
1631
|
status: 'complete',
|
|
1145
1632
|
evidence: 'tests passed',
|
|
1146
1633
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1634
|
+
strict: true,
|
|
1147
1635
|
qualityGate: {
|
|
1148
1636
|
...cleanQualityGate(),
|
|
1149
1637
|
architectureInvariantGate: {
|
|
@@ -1178,6 +1666,7 @@ describe('ultragoal artifacts', () => {
|
|
|
1178
1666
|
status: 'complete',
|
|
1179
1667
|
evidence: 'tests passed',
|
|
1180
1668
|
codexGoal: { goal: { objective, status: 'complete' } },
|
|
1669
|
+
strict: true,
|
|
1181
1670
|
qualityGate: {
|
|
1182
1671
|
...cleanQualityGate(),
|
|
1183
1672
|
architectureInvariantGate: {
|
|
@@ -1757,6 +2246,41 @@ describe('ultragoal artifacts', () => {
|
|
|
1757
2246
|
}), /different completed legacy Codex goal/);
|
|
1758
2247
|
});
|
|
1759
2248
|
});
|
|
2249
|
+
it('records matching native blocked Codex goal checkpoints as non-terminal', async () => {
|
|
2250
|
+
await withTempRepo(async (cwd) => {
|
|
2251
|
+
await createUltragoalPlan(cwd, {
|
|
2252
|
+
brief: 'brief',
|
|
2253
|
+
goals: [
|
|
2254
|
+
{ title: 'First', objective: 'Complete first milestone.' },
|
|
2255
|
+
],
|
|
2256
|
+
});
|
|
2257
|
+
const first = await startNextUltragoal(cwd);
|
|
2258
|
+
const objective = first.plan.codexObjective ?? first.goal.objective;
|
|
2259
|
+
const plan = await checkpointUltragoal(cwd, {
|
|
2260
|
+
goalId: first.goal.id,
|
|
2261
|
+
status: 'blocked',
|
|
2262
|
+
evidence: 'native matching blocked needs attention',
|
|
2263
|
+
codexGoal: { goal: { objective, status: 'blocked' } },
|
|
2264
|
+
});
|
|
2265
|
+
const goal = plan.goals.find((item) => item.id === first.goal.id);
|
|
2266
|
+
assert.equal(goal?.status, 'in_progress');
|
|
2267
|
+
assert.equal(plan.activeGoalId, first.goal.id);
|
|
2268
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
2269
|
+
assert.match(ledger, /"event":"goal_blocked"/);
|
|
2270
|
+
assert.match(ledger, /Native Codex goal status is blocked/);
|
|
2271
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
2272
|
+
goalId: first.goal.id,
|
|
2273
|
+
status: 'blocked',
|
|
2274
|
+
codexGoal: { goal: { objective, status: 'blocked' } },
|
|
2275
|
+
}), /--evidence/);
|
|
2276
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
2277
|
+
goalId: first.goal.id,
|
|
2278
|
+
status: 'blocked',
|
|
2279
|
+
evidence: 'foreign blocked goal',
|
|
2280
|
+
codexGoal: { goal: { objective: 'Different blocked work', status: 'blocked' } },
|
|
2281
|
+
}), /objective mismatch/);
|
|
2282
|
+
});
|
|
2283
|
+
});
|
|
1760
2284
|
it('steers a split pending goal through superseded lifecycle without weakening completion gates', async () => {
|
|
1761
2285
|
await withTempRepo(async (cwd) => {
|
|
1762
2286
|
await createUltragoalPlan(cwd, {
|
|
@@ -1891,5 +2415,532 @@ describe('ultragoal artifacts', () => {
|
|
|
1891
2415
|
assert.equal((ledger.match(/"event":"steering_accepted"/g) ?? []).length, 1);
|
|
1892
2416
|
});
|
|
1893
2417
|
});
|
|
2418
|
+
it('preserves root-mode bootstrap when OMX_SESSION_ID is absent', async () => {
|
|
2419
|
+
await withTempRepo(async (cwd) => {
|
|
2420
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2421
|
+
delete process.env.OMX_SESSION_ID;
|
|
2422
|
+
try {
|
|
2423
|
+
const plan = await createUltragoalPlan(cwd, { brief: '- Root-mode goal' });
|
|
2424
|
+
assert.equal(plan.goals.length, 1);
|
|
2425
|
+
assert.equal(existsSync(join(cwd, '.omx/ultragoal/brief.md')), true);
|
|
2426
|
+
assert.equal(existsSync(join(cwd, '.omx/ultragoal/goals.json')), true);
|
|
2427
|
+
assert.equal(existsSync(join(cwd, '.omx/ultragoal/ledger.jsonl')), true);
|
|
2428
|
+
}
|
|
2429
|
+
finally {
|
|
2430
|
+
if (typeof previousEnv === 'string')
|
|
2431
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2432
|
+
else
|
|
2433
|
+
delete process.env.OMX_SESSION_ID;
|
|
2434
|
+
}
|
|
2435
|
+
});
|
|
2436
|
+
});
|
|
2437
|
+
for (const [label, malformedSessionId] of [
|
|
2438
|
+
['path separator', 'bad/session'],
|
|
2439
|
+
['overlong value', 'x'.repeat(65)],
|
|
2440
|
+
]) {
|
|
2441
|
+
it(`rejects root-mode bootstrap for a nonempty OMX_SESSION_ID with ${label}`, async () => {
|
|
2442
|
+
await withTempRepo(async (cwd) => {
|
|
2443
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2444
|
+
process.env.OMX_SESSION_ID = malformedSessionId;
|
|
2445
|
+
try {
|
|
2446
|
+
await assert.rejects(() => createUltragoalPlan(cwd, { brief: '- Must not persist' }), /OMX_SESSION_ID/);
|
|
2447
|
+
assert.equal(existsSync(join(cwd, '.omx/ultragoal')), false);
|
|
2448
|
+
}
|
|
2449
|
+
finally {
|
|
2450
|
+
if (typeof previousEnv === 'string')
|
|
2451
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2452
|
+
else
|
|
2453
|
+
delete process.env.OMX_SESSION_ID;
|
|
2454
|
+
}
|
|
2455
|
+
});
|
|
2456
|
+
});
|
|
2457
|
+
}
|
|
2458
|
+
it('rejects a malformed OMX_SESSION_ID even when a live selected session exists', async () => {
|
|
2459
|
+
await withTempRepo(async (cwd) => {
|
|
2460
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2461
|
+
process.env.OMX_SESSION_ID = 'bad/session';
|
|
2462
|
+
try {
|
|
2463
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2464
|
+
await mkdir(stateDir, { recursive: true });
|
|
2465
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({ session_id: 'sess-live', cwd }));
|
|
2466
|
+
await assert.rejects(() => createUltragoalPlan(cwd, { brief: '- Must not persist' }), /OMX_SESSION_ID/);
|
|
2467
|
+
assert.equal(existsSync(join(cwd, '.omx/ultragoal')), false);
|
|
2468
|
+
}
|
|
2469
|
+
finally {
|
|
2470
|
+
if (typeof previousEnv === 'string')
|
|
2471
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2472
|
+
else
|
|
2473
|
+
delete process.env.OMX_SESSION_ID;
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
});
|
|
2477
|
+
it('preserves unbound compatibility for mutations of an existing plan', async () => {
|
|
2478
|
+
await withTempRepo(async (cwd) => {
|
|
2479
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2480
|
+
delete process.env.OMX_SESSION_ID;
|
|
2481
|
+
try {
|
|
2482
|
+
await createUltragoalPlan(cwd, { brief: '- Initial goal' });
|
|
2483
|
+
process.env.OMX_SESSION_ID = 'sess-compat';
|
|
2484
|
+
const added = await addUltragoalGoal(cwd, {
|
|
2485
|
+
title: 'Compatibility goal',
|
|
2486
|
+
objective: 'Preserve the existing-plan compatibility path.',
|
|
2487
|
+
});
|
|
2488
|
+
assert.equal(added.plan.goals.length, 2);
|
|
2489
|
+
assert.equal(added.goal.title, 'Compatibility goal');
|
|
2490
|
+
const ledger = await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
2491
|
+
assert.match(ledger, /"event":"goal_added"/);
|
|
2492
|
+
}
|
|
2493
|
+
finally {
|
|
2494
|
+
if (typeof previousEnv === 'string')
|
|
2495
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2496
|
+
else
|
|
2497
|
+
delete process.env.OMX_SESSION_ID;
|
|
2498
|
+
}
|
|
2499
|
+
});
|
|
2500
|
+
});
|
|
2501
|
+
it('blocks durable ultragoal mutations while the selected pointer is stale-dead and no exact session is bound', async () => {
|
|
2502
|
+
await withTempRepo(async (cwd) => {
|
|
2503
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2504
|
+
delete process.env.OMX_SESSION_ID;
|
|
2505
|
+
__setSessionPointerTransactionDependenciesForTests({ probePid: () => 'dead' });
|
|
2506
|
+
try {
|
|
2507
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2508
|
+
await mkdir(stateDir, { recursive: true });
|
|
2509
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({ session_id: 'sess-stale-dead', cwd, pid: 8388607 }));
|
|
2510
|
+
await assert.rejects(() => createUltragoalPlan(cwd, { brief: '- Ship the fix' }), (error) => {
|
|
2511
|
+
assert.match(String(error), /writable lifecycle authority/);
|
|
2512
|
+
assert.match(String(error), /OMX_SESSION_ID/);
|
|
2513
|
+
return true;
|
|
2514
|
+
});
|
|
2515
|
+
assert.equal(existsSync(join(cwd, '.omx', 'ultragoal', 'goals.json')), false);
|
|
2516
|
+
}
|
|
2517
|
+
finally {
|
|
2518
|
+
if (typeof previousEnv === 'string')
|
|
2519
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2520
|
+
__resetSessionPointerTransactionDependenciesForTests();
|
|
2521
|
+
}
|
|
2522
|
+
});
|
|
2523
|
+
});
|
|
2524
|
+
it('allows durable ultragoal mutations after exact-session reconciliation of a stale-dead pointer', async () => {
|
|
2525
|
+
await withTempRepo(async (cwd) => {
|
|
2526
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2527
|
+
process.env.OMX_SESSION_ID = 'sess-current';
|
|
2528
|
+
__setSessionPointerTransactionDependenciesForTests({ probePid: () => 'dead' });
|
|
2529
|
+
try {
|
|
2530
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2531
|
+
await mkdir(stateDir, { recursive: true });
|
|
2532
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({ session_id: 'sess-stale-dead', cwd, pid: 8388607 }));
|
|
2533
|
+
const plan = await createUltragoalPlan(cwd, { brief: '- Ship the fix' });
|
|
2534
|
+
assert.equal(plan.goals.length, 1);
|
|
2535
|
+
assert.equal(existsSync(join(cwd, '.omx', 'ultragoal', 'goals.json')), true);
|
|
2536
|
+
}
|
|
2537
|
+
finally {
|
|
2538
|
+
if (typeof previousEnv === 'string')
|
|
2539
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2540
|
+
else
|
|
2541
|
+
delete process.env.OMX_SESSION_ID;
|
|
2542
|
+
__resetSessionPointerTransactionDependenciesForTests();
|
|
2543
|
+
}
|
|
2544
|
+
});
|
|
2545
|
+
});
|
|
2546
|
+
it('gates every durable ultragoal mutator while the selected pointer is stale-dead and no exact session is bound', async () => {
|
|
2547
|
+
await withTempRepo(async (cwd) => {
|
|
2548
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2549
|
+
delete process.env.OMX_SESSION_ID;
|
|
2550
|
+
__setSessionPointerTransactionDependenciesForTests({ probePid: () => 'dead' });
|
|
2551
|
+
try {
|
|
2552
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2553
|
+
await mkdir(stateDir, { recursive: true });
|
|
2554
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({ session_id: 'sess-stale-dead', cwd, pid: 8388607 }));
|
|
2555
|
+
const attempts = [
|
|
2556
|
+
['createUltragoalPlan', () => createUltragoalPlan(cwd, { brief: '- Ship the fix' })],
|
|
2557
|
+
['addUltragoalGoal', () => addUltragoalGoal(cwd, { title: 'Later', objective: 'Later objective.' })],
|
|
2558
|
+
['steerUltragoal', () => steerUltragoal(cwd, {
|
|
2559
|
+
kind: 'add_subgoal',
|
|
2560
|
+
source: 'user_prompt_submit',
|
|
2561
|
+
title: 'Later',
|
|
2562
|
+
objective: 'Later objective.',
|
|
2563
|
+
evidence: 'prompt-submit evidence',
|
|
2564
|
+
rationale: 'bounded explicit directive requires one follow-up only',
|
|
2565
|
+
idempotencyKey: 'gate-check',
|
|
2566
|
+
})],
|
|
2567
|
+
['startNextUltragoal', () => startNextUltragoal(cwd)],
|
|
2568
|
+
['checkpointUltragoal', () => checkpointUltragoal(cwd, { goalId: 'G001-ship-the-fix', status: 'complete', evidence: 'done' })],
|
|
2569
|
+
['recordFinalReviewBlockers', () => recordFinalReviewBlockers(cwd, { goalId: 'G001-ship-the-fix', title: 'Blocker', objective: 'Resolve blocker.' })],
|
|
2570
|
+
];
|
|
2571
|
+
for (const [name, attempt] of attempts) {
|
|
2572
|
+
await assert.rejects(attempt, (error) => {
|
|
2573
|
+
assert.match(String(error), /writable lifecycle authority/, name);
|
|
2574
|
+
return true;
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2577
|
+
assert.equal(existsSync(join(cwd, '.omx', 'ultragoal', 'goals.json')), false);
|
|
2578
|
+
}
|
|
2579
|
+
finally {
|
|
2580
|
+
if (typeof previousEnv === 'string')
|
|
2581
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2582
|
+
__resetSessionPointerTransactionDependenciesForTests();
|
|
2583
|
+
}
|
|
2584
|
+
});
|
|
2585
|
+
});
|
|
2586
|
+
it('propagates non-compatibility resolver failures instead of permitting durable mutation', async () => {
|
|
2587
|
+
await withTempRepo(async (cwd) => {
|
|
2588
|
+
const allowedRoot = await mkdtemp(join(tmpdir(), 'omx-ultragoal-allowlist-'));
|
|
2589
|
+
const prevAllowlist = process.env.OMX_MCP_WORKDIR_ROOTS;
|
|
2590
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2591
|
+
delete process.env.OMX_SESSION_ID;
|
|
2592
|
+
process.env.OMX_MCP_WORKDIR_ROOTS = allowedRoot;
|
|
2593
|
+
try {
|
|
2594
|
+
await assert.rejects(() => createUltragoalPlan(cwd, { brief: '- Ship the fix' }), /outside allowed roots/);
|
|
2595
|
+
assert.equal(existsSync(join(cwd, '.omx', 'ultragoal', 'goals.json')), false);
|
|
2596
|
+
}
|
|
2597
|
+
finally {
|
|
2598
|
+
if (typeof prevAllowlist === 'string')
|
|
2599
|
+
process.env.OMX_MCP_WORKDIR_ROOTS = prevAllowlist;
|
|
2600
|
+
else
|
|
2601
|
+
delete process.env.OMX_MCP_WORKDIR_ROOTS;
|
|
2602
|
+
if (typeof previousEnv === 'string')
|
|
2603
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2604
|
+
await rm(allowedRoot, { recursive: true, force: true });
|
|
2605
|
+
}
|
|
2606
|
+
});
|
|
2607
|
+
});
|
|
2608
|
+
it('fails closed when a live selected pointer does not match OMX_SESSION_ID', async () => {
|
|
2609
|
+
await withTempRepo(async (cwd) => {
|
|
2610
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2611
|
+
process.env.OMX_SESSION_ID = 'sess-unmatched';
|
|
2612
|
+
try {
|
|
2613
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2614
|
+
await mkdir(stateDir, { recursive: true });
|
|
2615
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({ session_id: 'sess-live', cwd }));
|
|
2616
|
+
await assert.rejects(() => createUltragoalPlan(cwd, { brief: '- Ship the fix' }), /does not match the live session/);
|
|
2617
|
+
assert.equal(existsSync(join(cwd, '.omx', 'ultragoal', 'goals.json')), false);
|
|
2618
|
+
}
|
|
2619
|
+
finally {
|
|
2620
|
+
if (typeof previousEnv === 'string')
|
|
2621
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2622
|
+
else
|
|
2623
|
+
delete process.env.OMX_SESSION_ID;
|
|
2624
|
+
}
|
|
2625
|
+
});
|
|
2626
|
+
});
|
|
2627
|
+
it('refuses read-path legacy objective migration while writable lifecycle authority is unrestored', async () => {
|
|
2628
|
+
await withTempRepo(async (cwd) => {
|
|
2629
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2630
|
+
delete process.env.OMX_SESSION_ID;
|
|
2631
|
+
__setSessionPointerTransactionDependenciesForTests({ probePid: () => 'dead' });
|
|
2632
|
+
try {
|
|
2633
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2634
|
+
await mkdir(stateDir, { recursive: true });
|
|
2635
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({ session_id: 'sess-stale-dead', cwd, pid: 8388607 }));
|
|
2636
|
+
await mkdir(join(cwd, '.omx/ultragoal'), { recursive: true });
|
|
2637
|
+
const legacyObjective = 'Complete all ultragoal stories in .omx/ultragoal/goals.json: G001-first First';
|
|
2638
|
+
const legacyPlan = `${JSON.stringify({
|
|
2639
|
+
version: 1,
|
|
2640
|
+
createdAt: '2026-05-04T10:00:00.000Z',
|
|
2641
|
+
updatedAt: '2026-05-04T10:00:00.000Z',
|
|
2642
|
+
briefPath: '.omx/ultragoal/brief.md',
|
|
2643
|
+
goalsPath: '.omx/ultragoal/goals.json',
|
|
2644
|
+
ledgerPath: '.omx/ultragoal/ledger.jsonl',
|
|
2645
|
+
codexGoalMode: 'aggregate',
|
|
2646
|
+
codexObjective: legacyObjective,
|
|
2647
|
+
goals: [
|
|
2648
|
+
{ id: 'G001-first', title: 'First', objective: 'Complete first.', status: 'pending', attempt: 0, createdAt: '2026-05-04T10:00:00.000Z', updatedAt: '2026-05-04T10:00:00.000Z' },
|
|
2649
|
+
],
|
|
2650
|
+
}, null, 2)}\n`;
|
|
2651
|
+
await writeFile(join(cwd, '.omx/ultragoal/goals.json'), legacyPlan);
|
|
2652
|
+
await writeFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), '');
|
|
2653
|
+
await assert.rejects(() => readUltragoalPlan(cwd), /writable lifecycle authority/);
|
|
2654
|
+
// No durable transition happened: the plan bytes and ledger are untouched.
|
|
2655
|
+
assert.equal(await readFile(join(cwd, '.omx/ultragoal/goals.json'), 'utf-8'), legacyPlan);
|
|
2656
|
+
assert.equal(await readFile(join(cwd, '.omx/ultragoal/ledger.jsonl'), 'utf-8'), '');
|
|
2657
|
+
}
|
|
2658
|
+
finally {
|
|
2659
|
+
if (typeof previousEnv === 'string')
|
|
2660
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2661
|
+
__resetSessionPointerTransactionDependenciesForTests();
|
|
2662
|
+
}
|
|
2663
|
+
});
|
|
2664
|
+
});
|
|
2665
|
+
it('T16 compares the full writable authority token around ultragoal mutation locks', async () => {
|
|
2666
|
+
await withTempRepo(async (cwd) => {
|
|
2667
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2668
|
+
const stateDir = join(cwd, '.omx/state');
|
|
2669
|
+
const pointerPath = join(stateDir, 'session.json');
|
|
2670
|
+
const pointer = (sessionId) => JSON.stringify({ session_id: sessionId, cwd, state_root: stateDir });
|
|
2671
|
+
const goalsPath = join(cwd, '.omx/ultragoal/goals.json');
|
|
2672
|
+
const ledgerPath = join(cwd, '.omx/ultragoal/ledger.jsonl');
|
|
2673
|
+
const lockPath = join(cwd, '.omx/ultragoal/.mutation.lock');
|
|
2674
|
+
delete process.env.OMX_SESSION_ID;
|
|
2675
|
+
try {
|
|
2676
|
+
await mkdir(stateDir, { recursive: true });
|
|
2677
|
+
await createUltragoalPlan(cwd, { brief: '- Initial goal' });
|
|
2678
|
+
process.env.OMX_SESSION_ID = 'sess-compat';
|
|
2679
|
+
await writeFile(lockPath, 'held');
|
|
2680
|
+
setTimeout(() => { void rm(lockPath, { force: true }); }, 25);
|
|
2681
|
+
await addUltragoalGoal(cwd, { title: 'Stable compatibility authority', objective: 'Mutation proceeds.' });
|
|
2682
|
+
await writeFile(pointerPath, pointer('sess-compat'));
|
|
2683
|
+
await addUltragoalGoal(cwd, { title: 'Stable resolved authority', objective: 'Mutation proceeds.' });
|
|
2684
|
+
for (const [kind, beforeLock, change] of [
|
|
2685
|
+
['resolved to different live session', async () => writeFile(pointerPath, pointer('sess-compat')), async () => { process.env.OMX_SESSION_ID = 'sess-replacement'; await writeFile(pointerPath, pointer('sess-replacement')); }],
|
|
2686
|
+
['resolved to compatibility', async () => writeFile(pointerPath, pointer('sess-compat')), async () => rm(pointerPath)],
|
|
2687
|
+
['compatibility to resolved', async () => rm(pointerPath, { force: true }), async () => writeFile(pointerPath, pointer('sess-compat'))],
|
|
2688
|
+
]) {
|
|
2689
|
+
process.env.OMX_SESSION_ID = 'sess-compat';
|
|
2690
|
+
await beforeLock();
|
|
2691
|
+
const beforeGoals = await readFile(goalsPath, 'utf-8');
|
|
2692
|
+
const beforeLedger = await readFile(ledgerPath, 'utf-8');
|
|
2693
|
+
await writeFile(lockPath, 'held');
|
|
2694
|
+
setTimeout(() => { void change(); }, 20);
|
|
2695
|
+
setTimeout(() => { void rm(lockPath, { force: true }); }, 45);
|
|
2696
|
+
await assert.rejects(() => addUltragoalGoal(cwd, { title: kind, objective: 'Must not persist.' }), UltragoalError);
|
|
2697
|
+
assert.equal(await readFile(goalsPath, 'utf-8'), beforeGoals);
|
|
2698
|
+
assert.equal(await readFile(ledgerPath, 'utf-8'), beforeLedger);
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
finally {
|
|
2702
|
+
await rm(lockPath, { force: true });
|
|
2703
|
+
if (typeof previousEnv === 'string')
|
|
2704
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2705
|
+
else
|
|
2706
|
+
delete process.env.OMX_SESSION_ID;
|
|
2707
|
+
}
|
|
2708
|
+
});
|
|
2709
|
+
});
|
|
2710
|
+
describe('canonical state paths in nested projects', () => {
|
|
2711
|
+
async function withNestedRepo(run) {
|
|
2712
|
+
const repo = await mkdtemp(join(tmpdir(), 'omx-ultragoal-nested-'));
|
|
2713
|
+
try {
|
|
2714
|
+
// A real git worktree root plus pre-existing root-level state that must never be selected.
|
|
2715
|
+
await mkdir(join(repo, '.git'), { recursive: true });
|
|
2716
|
+
await mkdir(join(repo, '.omx/ultragoal'), { recursive: true });
|
|
2717
|
+
await writeFile(join(repo, '.omx/ultragoal/goals.json'), '{"version":1,"goals":[]}\n');
|
|
2718
|
+
await writeFile(join(repo, '.omx/ultragoal/ledger.jsonl'), '');
|
|
2719
|
+
const subproject = join(repo, 'subproject');
|
|
2720
|
+
await mkdir(subproject, { recursive: true });
|
|
2721
|
+
return await run({ repo, subproject });
|
|
2722
|
+
}
|
|
2723
|
+
finally {
|
|
2724
|
+
await rm(repo, { recursive: true, force: true });
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
it('binds the aggregate objective to the subtree state root', async () => {
|
|
2728
|
+
await withNestedRepo(async ({ subproject }) => {
|
|
2729
|
+
const plan = await createUltragoalPlan(subproject, { brief: 'Ship the nested feature' });
|
|
2730
|
+
assert.equal(plan.statePathPrefix, 'subproject');
|
|
2731
|
+
assert.match(plan.codexObjective ?? '', /subproject\/\.omx\/ultragoal\/goals\.json/);
|
|
2732
|
+
assert.match(plan.codexObjective ?? '', /subproject\/\.omx\/ultragoal\/ledger\.jsonl/);
|
|
2733
|
+
assert.notEqual(plan.codexObjective, ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE);
|
|
2734
|
+
});
|
|
2735
|
+
});
|
|
2736
|
+
it('keeps repository-root launches byte-identical to the root objective', async () => {
|
|
2737
|
+
await withNestedRepo(async ({ repo }) => {
|
|
2738
|
+
const plan = await createUltragoalPlan(repo, { brief: 'Ship the root feature', force: true });
|
|
2739
|
+
assert.equal(plan.statePathPrefix, undefined);
|
|
2740
|
+
assert.equal(plan.codexObjective, ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE);
|
|
2741
|
+
});
|
|
2742
|
+
});
|
|
2743
|
+
it('renders the aggregate handoff header with canonical state paths', async () => {
|
|
2744
|
+
await withNestedRepo(async ({ subproject }) => {
|
|
2745
|
+
await createUltragoalPlan(subproject, { brief: 'Ship the nested feature' });
|
|
2746
|
+
const started = await startNextUltragoal(subproject);
|
|
2747
|
+
const instruction = buildCodexGoalInstruction(started.goal, started.plan);
|
|
2748
|
+
assert.match(instruction, /Plan: subproject\/\.omx\/ultragoal\/goals\.json/);
|
|
2749
|
+
assert.match(instruction, /Ledger: subproject\/\.omx\/ultragoal\/ledger\.jsonl/);
|
|
2750
|
+
});
|
|
2751
|
+
});
|
|
2752
|
+
it('reconciles the prefixed objective and rejects the ambiguous bare objective', async () => {
|
|
2753
|
+
await withNestedRepo(async ({ subproject }) => {
|
|
2754
|
+
const created = await createUltragoalPlan(subproject, { brief: 'Ship the nested feature' });
|
|
2755
|
+
const started = await startNextUltragoal(subproject);
|
|
2756
|
+
const checkpointed = await checkpointUltragoal(subproject, {
|
|
2757
|
+
goalId: started.goal.id,
|
|
2758
|
+
status: 'complete',
|
|
2759
|
+
evidence: 'tests passed',
|
|
2760
|
+
codexGoal: { goal: { objective: created.codexObjective, status: 'complete' } },
|
|
2761
|
+
qualityGate: cleanQualityGate(),
|
|
2762
|
+
});
|
|
2763
|
+
assert.equal(checkpointed.goals[0]?.status, 'complete');
|
|
2764
|
+
// A reader that resolved the bare `.omx/...` reference from the repo root must not match.
|
|
2765
|
+
await assert.rejects(checkpointUltragoal(subproject, {
|
|
2766
|
+
goalId: started.goal.id,
|
|
2767
|
+
status: 'complete',
|
|
2768
|
+
evidence: 'tests passed',
|
|
2769
|
+
codexGoal: { goal: { objective: ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE, status: 'complete' } },
|
|
2770
|
+
qualityGate: cleanQualityGate(),
|
|
2771
|
+
}));
|
|
2772
|
+
});
|
|
2773
|
+
});
|
|
2774
|
+
it('migrates a pre-existing nested plan and leaves root plans untouched', async () => {
|
|
2775
|
+
await withNestedRepo(async ({ repo, subproject }) => {
|
|
2776
|
+
await createUltragoalPlan(subproject, { brief: 'Ship the nested feature' });
|
|
2777
|
+
const planPath = join(subproject, '.omx/ultragoal/goals.json');
|
|
2778
|
+
const stale = JSON.parse(await readFile(planPath, 'utf-8'));
|
|
2779
|
+
stale.codexObjective = ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE;
|
|
2780
|
+
delete stale.statePathPrefix;
|
|
2781
|
+
await writeFile(planPath, `${JSON.stringify(stale, null, 2)}\n`);
|
|
2782
|
+
const migrated = await readUltragoalPlan(subproject);
|
|
2783
|
+
assert.equal(migrated.statePathPrefix, 'subproject');
|
|
2784
|
+
assert.match(migrated.codexObjective ?? '', /subproject\/\.omx\/ultragoal\/goals\.json/);
|
|
2785
|
+
assert.deepEqual(migrated.codexObjectiveAliases, [ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE]);
|
|
2786
|
+
const ledger = await readFile(join(subproject, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
2787
|
+
assert.match(ledger, /"event":"aggregate_objective_migrated"/);
|
|
2788
|
+
assert.match(ledger, /canonical repo-root-relative state paths/);
|
|
2789
|
+
// The already-active hidden Codex goal keeps reconciling through the retained alias.
|
|
2790
|
+
const started = await startNextUltragoal(subproject);
|
|
2791
|
+
const checkpointed = await checkpointUltragoal(subproject, {
|
|
2792
|
+
goalId: started.goal.id,
|
|
2793
|
+
status: 'complete',
|
|
2794
|
+
evidence: 'tests passed',
|
|
2795
|
+
codexGoal: { goal: { objective: ULTRAGOAL_AGGREGATE_CODEX_OBJECTIVE, status: 'complete' } },
|
|
2796
|
+
qualityGate: cleanQualityGate(),
|
|
2797
|
+
});
|
|
2798
|
+
assert.equal(checkpointed.goals[0]?.status, 'complete');
|
|
2799
|
+
const rootPlan = await createUltragoalPlan(repo, { brief: 'Ship the root feature', force: true });
|
|
2800
|
+
const rootLedgerBefore = await readFile(join(repo, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
2801
|
+
const reread = await readUltragoalPlan(repo);
|
|
2802
|
+
const rootLedgerAfter = await readFile(join(repo, '.omx/ultragoal/ledger.jsonl'), 'utf-8');
|
|
2803
|
+
assert.equal(reread.codexObjective, rootPlan.codexObjective);
|
|
2804
|
+
assert.equal(reread.codexObjectiveAliases, undefined);
|
|
2805
|
+
assert.equal(rootLedgerAfter, rootLedgerBefore);
|
|
2806
|
+
});
|
|
2807
|
+
});
|
|
2808
|
+
});
|
|
2809
|
+
it('allows durable Ultragoal mutations for an exact-match identity-indeterminate pointer and rejects mismatches', async () => {
|
|
2810
|
+
await withTempRepo(async (cwd) => {
|
|
2811
|
+
const previousEnv = process.env.OMX_SESSION_ID;
|
|
2812
|
+
const sessionId = 'sess-indeterminate';
|
|
2813
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
2814
|
+
try {
|
|
2815
|
+
await mkdir(stateDir, { recursive: true });
|
|
2816
|
+
await writeFile(join(stateDir, 'session.json'), JSON.stringify({
|
|
2817
|
+
session_id: sessionId,
|
|
2818
|
+
cwd,
|
|
2819
|
+
state_root: stateDir,
|
|
2820
|
+
pid: 8388607,
|
|
2821
|
+
}));
|
|
2822
|
+
__setSessionPointerTransactionDependenciesForTests({ probePid: () => 'indeterminate' });
|
|
2823
|
+
process.env.OMX_SESSION_ID = sessionId;
|
|
2824
|
+
const plan = await createUltragoalPlan(cwd, { brief: '- Ship the indeterminate recovery' });
|
|
2825
|
+
assert.equal(plan.goals.length, 1);
|
|
2826
|
+
assert.equal(existsSync(join(cwd, '.omx', 'ultragoal', 'goals.json')), true);
|
|
2827
|
+
const authority = await assertUltragoalWritableLifecycleAuthority(cwd);
|
|
2828
|
+
assert.deepEqual(authority, {
|
|
2829
|
+
kind: 'resolved',
|
|
2830
|
+
source: 'session',
|
|
2831
|
+
sessionId,
|
|
2832
|
+
stateDir: join(stateDir, 'sessions', sessionId),
|
|
2833
|
+
});
|
|
2834
|
+
const goalsPath = join(cwd, '.omx', 'ultragoal', 'goals.json');
|
|
2835
|
+
const beforeMismatch = await readFile(goalsPath, 'utf-8');
|
|
2836
|
+
process.env.OMX_SESSION_ID = 'sess-foreign';
|
|
2837
|
+
// withUltragoalMutationLock calls assertUltragoalWritableLifecycleAuthority before and after lock
|
|
2838
|
+
// acquisition, and that helper calls resolveWritableStateScope, so its point-in-time revalidation
|
|
2839
|
+
// inherits this exact-match branch for free with no separate production-code change needed.
|
|
2840
|
+
await assert.rejects(() => addUltragoalGoal(cwd, { title: 'Must not persist', objective: 'Foreign session mutation.' }), (error) => {
|
|
2841
|
+
assert.match(String(error), /writable lifecycle authority/);
|
|
2842
|
+
return true;
|
|
2843
|
+
});
|
|
2844
|
+
assert.equal(await readFile(goalsPath, 'utf-8'), beforeMismatch);
|
|
2845
|
+
}
|
|
2846
|
+
finally {
|
|
2847
|
+
if (typeof previousEnv === 'string')
|
|
2848
|
+
process.env.OMX_SESSION_ID = previousEnv;
|
|
2849
|
+
else
|
|
2850
|
+
delete process.env.OMX_SESSION_ID;
|
|
2851
|
+
__resetSessionPointerTransactionDependenciesForTests();
|
|
2852
|
+
}
|
|
2853
|
+
});
|
|
2854
|
+
});
|
|
2855
|
+
});
|
|
2856
|
+
it('ordinary final checkpoint completes without cohort gate; strict requires it', async () => {
|
|
2857
|
+
await withTempRepo(async (cwd) => {
|
|
2858
|
+
await createUltragoalPlan(cwd, {
|
|
2859
|
+
brief: 'brief',
|
|
2860
|
+
goals: [{ title: 'Final', objective: 'Complete final milestone.' }],
|
|
2861
|
+
});
|
|
2862
|
+
const started = await startNextUltragoal(cwd);
|
|
2863
|
+
const objective = started.plan.codexObjective;
|
|
2864
|
+
// Ordinary (default) completes with no cohort gate.
|
|
2865
|
+
await checkpointUltragoal(cwd, {
|
|
2866
|
+
goalId: started.goal.id,
|
|
2867
|
+
status: 'complete',
|
|
2868
|
+
evidence: 'tests passed',
|
|
2869
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
2870
|
+
});
|
|
2871
|
+
const plan = await readUltragoalPlan(cwd);
|
|
2872
|
+
assert.equal(plan.goals[0]?.status, 'complete');
|
|
2873
|
+
assert.equal(isUltragoalDone(plan), true);
|
|
2874
|
+
});
|
|
2875
|
+
await withTempRepo(async (cwd) => {
|
|
2876
|
+
await createUltragoalPlan(cwd, {
|
|
2877
|
+
brief: 'brief',
|
|
2878
|
+
goals: [{ title: 'Final', objective: 'Complete final milestone.' }],
|
|
2879
|
+
});
|
|
2880
|
+
const started = await startNextUltragoal(cwd);
|
|
2881
|
+
const objective = started.plan.codexObjective;
|
|
2882
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
2883
|
+
goalId: started.goal.id,
|
|
2884
|
+
status: 'complete',
|
|
2885
|
+
evidence: 'tests passed',
|
|
2886
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
2887
|
+
strict: true,
|
|
2888
|
+
}), /quality-gate-json|quality gate/i);
|
|
2889
|
+
// Strict with valid gate succeeds.
|
|
2890
|
+
await checkpointUltragoal(cwd, {
|
|
2891
|
+
goalId: started.goal.id,
|
|
2892
|
+
status: 'complete',
|
|
2893
|
+
evidence: 'tests passed',
|
|
2894
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
2895
|
+
qualityGate: cleanQualityGate(),
|
|
2896
|
+
strict: true,
|
|
2897
|
+
});
|
|
2898
|
+
const plan = await readUltragoalPlan(cwd);
|
|
2899
|
+
assert.equal(plan.goals[0]?.status, 'complete');
|
|
2900
|
+
});
|
|
2901
|
+
});
|
|
2902
|
+
it('ordinary treats review lanes as advisory while strict enforces them', async () => {
|
|
2903
|
+
await withTempRepo(async (cwd) => {
|
|
2904
|
+
await createUltragoalPlan(cwd, {
|
|
2905
|
+
brief: 'brief',
|
|
2906
|
+
goals: [{ title: 'Final', objective: 'Complete final milestone.' }],
|
|
2907
|
+
});
|
|
2908
|
+
const started = await startNextUltragoal(cwd);
|
|
2909
|
+
const objective = started.plan.codexObjective;
|
|
2910
|
+
const advisoryGate = {
|
|
2911
|
+
...cleanQualityGate(),
|
|
2912
|
+
codeReview: { recommendation: 'COMMENT', architectStatus: 'CLEAR', evidence: 'advisory only' },
|
|
2913
|
+
};
|
|
2914
|
+
// Ordinary ignores cohort fields and completes.
|
|
2915
|
+
await checkpointUltragoal(cwd, {
|
|
2916
|
+
goalId: started.goal.id,
|
|
2917
|
+
status: 'complete',
|
|
2918
|
+
evidence: 'tests passed',
|
|
2919
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
2920
|
+
qualityGate: advisoryGate,
|
|
2921
|
+
});
|
|
2922
|
+
const plan = await readUltragoalPlan(cwd);
|
|
2923
|
+
assert.equal(plan.goals[0]?.status, 'complete');
|
|
2924
|
+
});
|
|
2925
|
+
await withTempRepo(async (cwd) => {
|
|
2926
|
+
await createUltragoalPlan(cwd, {
|
|
2927
|
+
brief: 'brief',
|
|
2928
|
+
goals: [{ title: 'Final', objective: 'Complete final milestone.' }],
|
|
2929
|
+
});
|
|
2930
|
+
const started = await startNextUltragoal(cwd);
|
|
2931
|
+
const objective = started.plan.codexObjective;
|
|
2932
|
+
const advisoryGate = {
|
|
2933
|
+
...cleanQualityGate(),
|
|
2934
|
+
codeReview: { recommendation: 'COMMENT', architectStatus: 'CLEAR', evidence: 'advisory only' },
|
|
2935
|
+
};
|
|
2936
|
+
await assert.rejects(() => checkpointUltragoal(cwd, {
|
|
2937
|
+
goalId: started.goal.id,
|
|
2938
|
+
status: 'complete',
|
|
2939
|
+
evidence: 'tests passed',
|
|
2940
|
+
codexGoal: { goal: { objective, status: 'complete' } },
|
|
2941
|
+
qualityGate: advisoryGate,
|
|
2942
|
+
strict: true,
|
|
2943
|
+
}), /APPROVE/);
|
|
2944
|
+
});
|
|
1894
2945
|
});
|
|
1895
2946
|
//# sourceMappingURL=artifacts.test.js.map
|