oh-my-codex 0.15.0 → 0.15.2
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 +5 -5
- package/Cargo.toml +1 -1
- package/README.md +36 -5
- package/crates/omx-explore/src/main.rs +222 -12
- package/dist/agents/__tests__/native-config.test.js +40 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts +1 -0
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +6 -1
- package/dist/agents/native-config.js.map +1 -1
- package/dist/agents/policy.d.ts +1 -0
- package/dist/agents/policy.d.ts.map +1 -1
- package/dist/agents/policy.js +4 -0
- package/dist/agents/policy.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js +37 -13
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-team.test.js +46 -1
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +225 -111
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +96 -1
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +15 -2
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +292 -3
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +223 -0
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-parity.test.js +86 -0
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +23 -0
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +76 -11
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +140 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +310 -4
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +78 -19
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +79 -2
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/sidecar.test.d.ts +2 -0
- package/dist/cli/__tests__/sidecar.test.d.ts.map +1 -0
- package/dist/cli/__tests__/sidecar.test.js +24 -0
- package/dist/cli/__tests__/sidecar.test.js.map +1 -0
- package/dist/cli/__tests__/team.test.js +54 -7
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/autoresearch-guided.d.ts.map +1 -1
- package/dist/cli/autoresearch-guided.js +12 -4
- package/dist/cli/autoresearch-guided.js.map +1 -1
- package/dist/cli/codex-home.d.ts +4 -6
- package/dist/cli/codex-home.d.ts.map +1 -1
- package/dist/cli/codex-home.js +9 -41
- package/dist/cli/codex-home.js.map +1 -1
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +509 -279
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +6 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +284 -25
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/omx.js +3 -1
- package/dist/cli/omx.js.map +1 -1
- package/dist/cli/plugin-marketplace.d.ts +13 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -0
- package/dist/cli/plugin-marketplace.js +77 -0
- package/dist/cli/plugin-marketplace.js.map +1 -0
- package/dist/cli/question.d.ts +1 -1
- package/dist/cli/question.d.ts.map +1 -1
- package/dist/cli/question.js +26 -12
- package/dist/cli/question.js.map +1 -1
- package/dist/cli/setup-preferences.d.ts +20 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -0
- package/dist/cli/setup-preferences.js +71 -0
- package/dist/cli/setup-preferences.js.map +1 -0
- package/dist/cli/setup.d.ts +7 -5
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +271 -152
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts +1 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +70 -15
- package/dist/cli/team.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +100 -3
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +6 -5
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts +2 -0
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js +203 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js.map +1 -0
- package/dist/config/__tests__/models.test.js +23 -1
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/generator.d.ts +9 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +184 -16
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +5 -1
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +12 -2
- package/dist/config/models.js.map +1 -1
- package/dist/exec/followup.d.ts +44 -0
- package/dist/exec/followup.d.ts.map +1 -0
- package/dist/exec/followup.js +349 -0
- package/dist/exec/followup.js.map +1 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +37 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/codebase-map.test.js +63 -1
- package/dist/hooks/__tests__/codebase-map.test.js.map +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +5 -5
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +12 -9
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +25 -18
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +23 -2
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +45 -2
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +17 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +121 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js +4 -4
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +103 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +2 -2
- 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 +27 -13
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js +35 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +215 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +70 -3
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +5 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +3 -2
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +9 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js +22 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js.map +1 -0
- package/dist/hooks/codebase-map.d.ts.map +1 -1
- package/dist/hooks/codebase-map.js +83 -6
- package/dist/hooks/codebase-map.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +35 -4
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/prompt-guidance-contract.d.ts +6 -0
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +117 -13
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hooks/session.d.ts +2 -0
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +6 -0
- package/dist/hooks/session.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +4 -4
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/state.test.js +4 -0
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/types.test.js +27 -0
- package/dist/hud/__tests__/types.test.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +8 -0
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +9 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +3 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +23 -5
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +50 -7
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +70 -12
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +10 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +71 -26
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/state-server.d.ts +5 -11
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +16 -432
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/modes/__tests__/base-autoresearch-contract.test.js +1 -1
- package/dist/modes/__tests__/base-autoresearch-contract.test.js.map +1 -1
- package/dist/pipeline/__tests__/orchestrator.test.js +89 -5
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +98 -1
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/pipeline/index.d.ts +5 -3
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/index.js +4 -3
- package/dist/pipeline/index.js.map +1 -1
- package/dist/pipeline/orchestrator.d.ts +7 -6
- package/dist/pipeline/orchestrator.d.ts.map +1 -1
- package/dist/pipeline/orchestrator.js +90 -11
- package/dist/pipeline/orchestrator.js.map +1 -1
- package/dist/pipeline/review-verdict.d.ts +3 -0
- package/dist/pipeline/review-verdict.d.ts.map +1 -0
- package/dist/pipeline/review-verdict.js +14 -0
- package/dist/pipeline/review-verdict.js.map +1 -0
- package/dist/pipeline/stages/code-review.d.ts +33 -0
- package/dist/pipeline/stages/code-review.d.ts.map +1 -0
- package/dist/pipeline/stages/code-review.js +51 -0
- package/dist/pipeline/stages/code-review.js.map +1 -0
- package/dist/pipeline/stages/ralph-verify.d.ts +12 -2
- package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -1
- package/dist/pipeline/stages/ralph-verify.js +24 -6
- package/dist/pipeline/stages/ralph-verify.js.map +1 -1
- package/dist/pipeline/stages/ralplan.d.ts +1 -1
- package/dist/pipeline/stages/ralplan.d.ts.map +1 -1
- package/dist/pipeline/stages/ralplan.js +21 -1
- package/dist/pipeline/stages/ralplan.js.map +1 -1
- package/dist/pipeline/types.d.ts +14 -7
- package/dist/pipeline/types.d.ts.map +1 -1
- package/dist/pipeline/types.js +2 -2
- package/dist/planning/__tests__/artifacts.test.js +152 -1
- package/dist/planning/__tests__/artifacts.test.js.map +1 -1
- package/dist/planning/artifacts.d.ts +9 -0
- package/dist/planning/artifacts.d.ts.map +1 -1
- package/dist/planning/artifacts.js +60 -1
- package/dist/planning/artifacts.js.map +1 -1
- package/dist/question/__tests__/client.test.js +23 -3
- package/dist/question/__tests__/client.test.js.map +1 -1
- package/dist/question/__tests__/renderer.test.js +148 -37
- package/dist/question/__tests__/renderer.test.js.map +1 -1
- package/dist/question/__tests__/types.test.js +21 -0
- package/dist/question/__tests__/types.test.js.map +1 -1
- package/dist/question/__tests__/ui.test.js +155 -7
- package/dist/question/__tests__/ui.test.js.map +1 -1
- package/dist/question/client.d.ts +14 -4
- package/dist/question/client.d.ts.map +1 -1
- package/dist/question/client.js.map +1 -1
- package/dist/question/renderer.d.ts +11 -1
- package/dist/question/renderer.d.ts.map +1 -1
- package/dist/question/renderer.js +102 -7
- package/dist/question/renderer.js.map +1 -1
- package/dist/question/state.d.ts +2 -2
- package/dist/question/state.d.ts.map +1 -1
- package/dist/question/state.js +26 -17
- package/dist/question/state.js.map +1 -1
- package/dist/question/types.d.ts +25 -1
- package/dist/question/types.d.ts.map +1 -1
- package/dist/question/types.js +48 -13
- package/dist/question/types.js.map +1 -1
- package/dist/question/ui.d.ts +15 -2
- package/dist/question/ui.d.ts.map +1 -1
- package/dist/question/ui.js +268 -162
- package/dist/question/ui.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +415 -94
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/generate-release-body.test.js +36 -0
- package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -1
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts +2 -0
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js +56 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +232 -54
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +12 -9
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/generate-release-body.d.ts.map +1 -1
- package/dist/scripts/generate-release-body.js +12 -3
- package/dist/scripts/generate-release-body.js.map +1 -1
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts +2 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts.map +1 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js +153 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js.map +1 -0
- package/dist/scripts/notify-hook/managed-tmux.d.ts +4 -2
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +188 -6
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
- package/dist/scripts/notify-hook/process-runner.js +7 -3
- package/dist/scripts/notify-hook/process-runner.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +96 -11
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +3 -3
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts +34 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js +434 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js.map +1 -0
- package/dist/scripts/notify-hook/team-worker.d.ts +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +3 -43
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js +25 -4
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/notify-hook.js +36 -5
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/prompt-inventory.d.ts +29 -0
- package/dist/scripts/prompt-inventory.d.ts.map +1 -0
- package/dist/scripts/prompt-inventory.js +178 -0
- package/dist/scripts/prompt-inventory.js.map +1 -0
- package/dist/scripts/run-test-files.js +1 -0
- package/dist/scripts/run-test-files.js.map +1 -1
- package/dist/sidecar/__tests__/boundary.test.d.ts +2 -0
- package/dist/sidecar/__tests__/boundary.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/boundary.test.js +48 -0
- package/dist/sidecar/__tests__/boundary.test.js.map +1 -0
- package/dist/sidecar/__tests__/collector.test.d.ts +2 -0
- package/dist/sidecar/__tests__/collector.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/collector.test.js +162 -0
- package/dist/sidecar/__tests__/collector.test.js.map +1 -0
- package/dist/sidecar/__tests__/render.test.d.ts +2 -0
- package/dist/sidecar/__tests__/render.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/render.test.js +67 -0
- package/dist/sidecar/__tests__/render.test.js.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts +2 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.js +30 -0
- package/dist/sidecar/__tests__/tmux.test.js.map +1 -0
- package/dist/sidecar/__tests__/watch.test.d.ts +2 -0
- package/dist/sidecar/__tests__/watch.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/watch.test.js +42 -0
- package/dist/sidecar/__tests__/watch.test.js.map +1 -0
- package/dist/sidecar/collector.d.ts +4 -0
- package/dist/sidecar/collector.d.ts.map +1 -0
- package/dist/sidecar/collector.js +377 -0
- package/dist/sidecar/collector.js.map +1 -0
- package/dist/sidecar/index.d.ts +25 -0
- package/dist/sidecar/index.d.ts.map +1 -0
- package/dist/sidecar/index.js +165 -0
- package/dist/sidecar/index.js.map +1 -0
- package/dist/sidecar/render.d.ts +3 -0
- package/dist/sidecar/render.d.ts.map +1 -0
- package/dist/sidecar/render.js +72 -0
- package/dist/sidecar/render.js.map +1 -0
- package/dist/sidecar/tmux.d.ts +13 -0
- package/dist/sidecar/tmux.d.ts.map +1 -0
- package/dist/sidecar/tmux.js +44 -0
- package/dist/sidecar/tmux.js.map +1 -0
- package/dist/sidecar/types.d.ts +125 -0
- package/dist/sidecar/types.d.ts.map +1 -0
- package/dist/sidecar/types.js +2 -0
- package/dist/sidecar/types.js.map +1 -0
- package/dist/state/__tests__/operations.test.js +50 -22
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/workflow-transition.test.js +9 -1
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
- package/dist/state/operations.d.ts +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +19 -7
- package/dist/state/operations.js.map +1 -1
- package/dist/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js +1 -0
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/team/__tests__/commit-hygiene.test.d.ts +2 -0
- package/dist/team/__tests__/commit-hygiene.test.d.ts.map +1 -0
- package/dist/team/__tests__/commit-hygiene.test.js +93 -0
- package/dist/team/__tests__/commit-hygiene.test.js.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts +2 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.js +69 -0
- package/dist/team/__tests__/delegation-policy.test.js.map +1 -0
- package/dist/team/__tests__/events.test.js +54 -4
- package/dist/team/__tests__/events.test.js.map +1 -1
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts +2 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js +78 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +16 -0
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts +2 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts.map +1 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js +95 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.js +623 -14
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.js +177 -1
- package/dist/team/__tests__/state-root.test.js.map +1 -1
- package/dist/team/__tests__/state.test.js +110 -0
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +399 -2
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +94 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/commit-hygiene.d.ts +22 -3
- package/dist/team/commit-hygiene.d.ts.map +1 -1
- package/dist/team/commit-hygiene.js +134 -2
- package/dist/team/commit-hygiene.js.map +1 -1
- package/dist/team/contracts.d.ts +1 -1
- package/dist/team/contracts.d.ts.map +1 -1
- package/dist/team/contracts.js +2 -0
- package/dist/team/contracts.js.map +1 -1
- package/dist/team/dag-schema.d.ts +38 -0
- package/dist/team/dag-schema.d.ts.map +1 -0
- package/dist/team/dag-schema.js +221 -0
- package/dist/team/dag-schema.js.map +1 -0
- package/dist/team/delegation-policy.d.ts +3 -0
- package/dist/team/delegation-policy.d.ts.map +1 -0
- package/dist/team/delegation-policy.js +82 -0
- package/dist/team/delegation-policy.js.map +1 -0
- package/dist/team/model-contract.d.ts +3 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +44 -5
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/repo-aware-decomposition.d.ts +60 -0
- package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
- package/dist/team/repo-aware-decomposition.js +229 -0
- package/dist/team/repo-aware-decomposition.js.map +1 -0
- package/dist/team/runtime.d.ts +27 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +172 -52
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/state/tasks.d.ts.map +1 -1
- package/dist/team/state/tasks.js +33 -0
- package/dist/team/state/tasks.js.map +1 -1
- package/dist/team/state/types.d.ts +23 -1
- package/dist/team/state/types.d.ts.map +1 -1
- package/dist/team/state/types.js.map +1 -1
- package/dist/team/state-root.d.ts +35 -0
- package/dist/team/state-root.d.ts.map +1 -1
- package/dist/team/state-root.js +281 -1
- package/dist/team/state-root.js.map +1 -1
- package/dist/team/state.d.ts +27 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +6 -0
- package/dist/team/state.js.map +1 -1
- package/dist/team/tmux-session.d.ts +1 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +105 -6
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +3 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +77 -4
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/utils/agents-md.d.ts +3 -0
- package/dist/utils/agents-md.d.ts.map +1 -1
- package/dist/utils/agents-md.js +25 -0
- package/dist/utils/agents-md.js.map +1 -1
- package/package.json +3 -2
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +2 -2
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/analyze/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +134 -205
- package/plugins/oh-my-codex/skills/code-review/SKILL.md +4 -4
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +14 -7
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/help/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +41 -10
- package/plugins/oh-my-codex/skills/plan/SKILL.md +12 -14
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +2 -4
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +5 -9
- package/plugins/oh-my-codex/skills/security-review/SKILL.md +4 -4
- package/plugins/oh-my-codex/skills/team/SKILL.md +2 -5
- package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +2 -5
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +2 -3
- package/prompts/analyst.md +2 -2
- package/prompts/api-reviewer.md +2 -2
- package/prompts/architect.md +2 -2
- package/prompts/build-fixer.md +2 -2
- package/prompts/code-reviewer.md +15 -5
- package/prompts/code-simplifier.md +1 -1
- package/prompts/critic.md +35 -83
- package/prompts/debugger.md +2 -2
- package/prompts/dependency-expert.md +2 -2
- package/prompts/designer.md +2 -2
- package/prompts/executor.md +40 -114
- package/prompts/explore-harness.md +1 -1
- package/prompts/explore.md +37 -90
- package/prompts/git-master.md +2 -2
- package/prompts/information-architect.md +1 -1
- package/prompts/performance-reviewer.md +2 -2
- package/prompts/planner.md +35 -62
- package/prompts/product-analyst.md +2 -2
- package/prompts/product-manager.md +2 -2
- package/prompts/qa-tester.md +2 -2
- package/prompts/quality-reviewer.md +2 -2
- package/prompts/quality-strategist.md +2 -2
- package/prompts/researcher.md +46 -78
- package/prompts/security-reviewer.md +2 -2
- package/prompts/sisyphus-lite.md +2 -2
- package/prompts/style-reviewer.md +2 -2
- package/prompts/team-executor.md +1 -1
- package/prompts/test-engineer.md +2 -2
- package/prompts/ux-researcher.md +2 -2
- package/prompts/verifier.md +29 -34
- package/prompts/vision.md +2 -2
- package/prompts/writer.md +2 -2
- package/skills/ai-slop-cleaner/SKILL.md +1 -1
- package/skills/analyze/SKILL.md +1 -1
- package/skills/autopilot/SKILL.md +134 -205
- package/skills/build-fix/SKILL.md +4 -4
- package/skills/code-review/SKILL.md +4 -4
- package/skills/deep-interview/SKILL.md +14 -7
- package/skills/doctor/SKILL.md +1 -1
- package/skills/help/SKILL.md +1 -1
- package/skills/omx-setup/SKILL.md +41 -10
- package/skills/plan/SKILL.md +12 -14
- package/skills/ralph/SKILL.md +2 -4
- package/skills/ralplan/SKILL.md +5 -9
- package/skills/security-review/SKILL.md +4 -4
- package/skills/team/SKILL.md +2 -5
- package/skills/ultraqa/SKILL.md +2 -5
- package/skills/ultrawork/SKILL.md +2 -3
- package/src/scripts/__tests__/codex-native-hook.test.ts +502 -94
- package/src/scripts/__tests__/generate-release-body.test.ts +41 -0
- package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
- package/src/scripts/codex-native-hook.ts +293 -61
- package/src/scripts/codex-native-pre-post.ts +10 -8
- package/src/scripts/generate-release-body.ts +13 -2
- package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
- package/src/scripts/notify-hook/managed-tmux.ts +196 -9
- package/src/scripts/notify-hook/process-runner.ts +7 -3
- package/src/scripts/notify-hook/team-dispatch.ts +103 -11
- package/src/scripts/notify-hook/team-tmux-guard.ts +3 -3
- package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
- package/src/scripts/notify-hook/team-worker.ts +4 -48
- package/src/scripts/notify-hook/tmux-injection.ts +24 -6
- package/src/scripts/notify-hook.ts +36 -5
- package/src/scripts/prompt-inventory.ts +218 -0
- package/src/scripts/run-test-files.ts +1 -0
- package/templates/AGENTS.md +34 -95
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
import { writeFile, appendFile, mkdir, readFile } from 'fs/promises';
|
|
22
22
|
import { existsSync } from 'fs';
|
|
23
|
-
import { dirname, join } from 'path';
|
|
23
|
+
import { dirname, join, resolve } from 'path';
|
|
24
24
|
|
|
25
25
|
import { safeString, asNumber } from './notify-hook/utils.js';
|
|
26
26
|
import {
|
|
@@ -183,9 +183,11 @@ async function main() {
|
|
|
183
183
|
const parsedTeamWorker = parseTeamWorkerEnv(teamWorkerEnv);
|
|
184
184
|
const isTeamWorker = !!parsedTeamWorker;
|
|
185
185
|
|
|
186
|
-
const
|
|
186
|
+
const resolvedWorkerStateDir = (isTeamWorker && parsedTeamWorker)
|
|
187
187
|
? await resolveTeamStateDirForWorker(cwd, parsedTeamWorker)
|
|
188
|
-
:
|
|
188
|
+
: null;
|
|
189
|
+
const workerStateRootResolved = !isTeamWorker || !!resolvedWorkerStateDir;
|
|
190
|
+
const stateDir = resolvedWorkerStateDir || join(cwd, '.omx', 'state');
|
|
189
191
|
const logsDir = join(cwd, '.omx', 'logs');
|
|
190
192
|
const omxDir = join(cwd, '.omx');
|
|
191
193
|
let currentOmxSessionId = '';
|
|
@@ -193,12 +195,15 @@ async function main() {
|
|
|
193
195
|
|
|
194
196
|
// Ensure directories exist
|
|
195
197
|
await mkdir(logsDir, { recursive: true }).catch(() => {});
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
if (workerStateRootResolved) {
|
|
199
|
+
await mkdir(stateDir, { recursive: true }).catch(() => {});
|
|
200
|
+
currentOmxSessionId = await readCurrentSessionId(stateDir).catch(() => '') || '';
|
|
201
|
+
}
|
|
198
202
|
|
|
199
203
|
// Turn-level dedupe prevents double-processing when native notify and fallback
|
|
200
204
|
// watcher both emit the same completed turn.
|
|
201
205
|
try {
|
|
206
|
+
if (!workerStateRootResolved) throw new Error('worker_state_root_unresolved');
|
|
202
207
|
const turnId = safeString(payload['turn-id'] || payload.turn_id || '');
|
|
203
208
|
if (turnId) {
|
|
204
209
|
const now = Date.now();
|
|
@@ -268,6 +273,32 @@ async function main() {
|
|
|
268
273
|
return;
|
|
269
274
|
}
|
|
270
275
|
|
|
276
|
+
if (isTeamWorker && !workerStateRootResolved) {
|
|
277
|
+
await logNotifyHookEvent(logsDir, {
|
|
278
|
+
timestamp: new Date().toISOString(),
|
|
279
|
+
level: 'warn',
|
|
280
|
+
type: 'team_worker_state_root_unresolved',
|
|
281
|
+
team_worker: teamWorkerEnv || null,
|
|
282
|
+
reason: 'skip_team_worker_state_mutations',
|
|
283
|
+
}).catch(() => {});
|
|
284
|
+
|
|
285
|
+
// Keep the fail-closed worker state-root behavior for normal team-worker
|
|
286
|
+
// mutations, but allow the narrow auto-nudge path to use an explicitly
|
|
287
|
+
// supplied, already-existing worker state root. Auto-nudge only needs the
|
|
288
|
+
// worker-scoped state files/pane anchor and should not fall back to creating
|
|
289
|
+
// local `.omx/state` when identity resolution failed.
|
|
290
|
+
const explicitWorkerStateRoot = safeString(process.env.OMX_TEAM_STATE_ROOT || '').trim();
|
|
291
|
+
const autoNudgeStateDir = explicitWorkerStateRoot ? resolve(cwd, explicitWorkerStateRoot) : '';
|
|
292
|
+
if (autoNudgeStateDir && existsSync(autoNudgeStateDir)) {
|
|
293
|
+
try {
|
|
294
|
+
await maybeAutoNudge({ cwd, stateDir: autoNudgeStateDir, logsDir, payload });
|
|
295
|
+
} catch {
|
|
296
|
+
// Non-critical
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
|
|
271
302
|
// Reconcile Ralph ownership for same-Codex-session continuation before
|
|
272
303
|
// lifecycle counters or injection read the active scope.
|
|
273
304
|
if (!isTeamWorker) {
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
3
|
+
import { join, relative } from 'node:path';
|
|
4
|
+
|
|
5
|
+
export interface PromptSurfaceInventory {
|
|
6
|
+
path: string;
|
|
7
|
+
lines: number;
|
|
8
|
+
approximateTokens: number;
|
|
9
|
+
absoluteDirectiveCount: number;
|
|
10
|
+
markers: Record<string, number>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface DuplicateFragmentFamily {
|
|
14
|
+
text: string;
|
|
15
|
+
count: number;
|
|
16
|
+
paths: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface PromptInventoryReport {
|
|
20
|
+
generatedAt: string;
|
|
21
|
+
root: string;
|
|
22
|
+
totals: {
|
|
23
|
+
files: number;
|
|
24
|
+
lines: number;
|
|
25
|
+
approximateTokens: number;
|
|
26
|
+
absoluteDirectiveCount: number;
|
|
27
|
+
};
|
|
28
|
+
surfaces: PromptSurfaceInventory[];
|
|
29
|
+
duplicateFragmentFamilies: DuplicateFragmentFamily[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const PROMPT_SURFACE_FILES = [
|
|
33
|
+
'AGENTS.md',
|
|
34
|
+
'templates/AGENTS.md',
|
|
35
|
+
'docs/prompt-guidance-contract.md',
|
|
36
|
+
'docs/guidance-schema.md',
|
|
37
|
+
'src/hooks/prompt-guidance-contract.ts',
|
|
38
|
+
'src/config/generator.ts',
|
|
39
|
+
'src/cli/setup.ts',
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
const PROMPT_SURFACE_DIRS = [
|
|
43
|
+
'prompts',
|
|
44
|
+
'skills',
|
|
45
|
+
'templates/model-instructions',
|
|
46
|
+
'docs/prompt-guidance-fragments',
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const MARKERS = [
|
|
50
|
+
'<!-- OMX:RUNTIME:START -->',
|
|
51
|
+
'<!-- OMX:RUNTIME:END -->',
|
|
52
|
+
'<!-- OMX:TEAM:WORKER:START -->',
|
|
53
|
+
'<!-- OMX:TEAM:WORKER:END -->',
|
|
54
|
+
'<!-- OMX:MODELS:START -->',
|
|
55
|
+
'<!-- OMX:MODELS:END -->',
|
|
56
|
+
'<!-- omx:generated:agents-md -->',
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const ABSOLUTE_DIRECTIVE_PATTERN = /\b(MUST(?:\s+NOT)?|DO NOT|DON'T|NEVER|ALWAYS|REQUIRED|REQUIRE|ONLY|STOP|ASK only|AUTO-CONTINUE|KEEP GOING)\b/i;
|
|
60
|
+
|
|
61
|
+
function walkFiles(root: string, dir: string, out: string[]): void {
|
|
62
|
+
const absoluteDir = join(root, dir);
|
|
63
|
+
if (!existsSync(absoluteDir)) return;
|
|
64
|
+
for (const entry of readdirSync(absoluteDir)) {
|
|
65
|
+
const rel = join(dir, entry);
|
|
66
|
+
const absolute = join(root, rel);
|
|
67
|
+
const stats = statSync(absolute);
|
|
68
|
+
if (stats.isDirectory()) {
|
|
69
|
+
walkFiles(root, rel, out);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (stats.isFile() && /\.(md|ts)$/.test(entry)) {
|
|
73
|
+
out.push(rel);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function listPromptSurfacePaths(root = process.cwd()): string[] {
|
|
79
|
+
const paths = new Set<string>();
|
|
80
|
+
for (const file of PROMPT_SURFACE_FILES) {
|
|
81
|
+
if (existsSync(join(root, file))) paths.add(file);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const walked: string[] = [];
|
|
85
|
+
for (const dir of PROMPT_SURFACE_DIRS) walkFiles(root, dir, walked);
|
|
86
|
+
for (const path of walked) paths.add(path);
|
|
87
|
+
|
|
88
|
+
return [...paths].sort();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function countOccurrences(text: string, needle: string): number {
|
|
92
|
+
let count = 0;
|
|
93
|
+
let index = text.indexOf(needle);
|
|
94
|
+
while (index !== -1) {
|
|
95
|
+
count += 1;
|
|
96
|
+
index = text.indexOf(needle, index + needle.length);
|
|
97
|
+
}
|
|
98
|
+
return count;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function approximateTokenCount(text: string): number {
|
|
102
|
+
return text.match(/[\p{L}\p{N}_'-]+|[^\s]/gu)?.length ?? 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function countAbsoluteDirectives(text: string): number {
|
|
106
|
+
return text
|
|
107
|
+
.split(/\r?\n/)
|
|
108
|
+
.filter((line) => ABSOLUTE_DIRECTIVE_PATTERN.test(line))
|
|
109
|
+
.length;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function inventorySurface(root: string, path: string): PromptSurfaceInventory {
|
|
113
|
+
const text = readFileSync(join(root, path), 'utf-8');
|
|
114
|
+
const markers = Object.fromEntries(MARKERS.map((marker) => [marker, countOccurrences(text, marker)]));
|
|
115
|
+
return {
|
|
116
|
+
path,
|
|
117
|
+
lines: text.length === 0 ? 0 : text.split(/\r?\n/).length,
|
|
118
|
+
approximateTokens: approximateTokenCount(text),
|
|
119
|
+
absoluteDirectiveCount: countAbsoluteDirectives(text),
|
|
120
|
+
markers,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function normalizeFragmentLine(line: string): string | null {
|
|
125
|
+
const normalized = line.replace(/\s+/g, ' ').trim();
|
|
126
|
+
if (normalized.length < 60) return null;
|
|
127
|
+
if (/^[-*#>|`]+$/.test(normalized)) return null;
|
|
128
|
+
return normalized;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function duplicateFragmentFamilies(root: string, paths: string[]): DuplicateFragmentFamily[] {
|
|
132
|
+
const occurrences = new Map<string, Set<string>>();
|
|
133
|
+
for (const path of paths) {
|
|
134
|
+
const text = readFileSync(join(root, path), 'utf-8');
|
|
135
|
+
for (const line of text.split(/\r?\n/)) {
|
|
136
|
+
const normalized = normalizeFragmentLine(line);
|
|
137
|
+
if (!normalized) continue;
|
|
138
|
+
const pathsWithLine = occurrences.get(normalized) ?? new Set<string>();
|
|
139
|
+
pathsWithLine.add(path);
|
|
140
|
+
occurrences.set(normalized, pathsWithLine);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return [...occurrences.entries()]
|
|
145
|
+
.map(([text, pathSet]) => ({ text, count: pathSet.size, paths: [...pathSet].sort() }))
|
|
146
|
+
.filter((family) => family.count > 1)
|
|
147
|
+
.sort((a, b) => b.count - a.count || a.text.localeCompare(b.text))
|
|
148
|
+
.slice(0, 50);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function buildPromptInventory(root = process.cwd(), generatedAt = new Date().toISOString()): PromptInventoryReport {
|
|
152
|
+
const resolvedRoot = root;
|
|
153
|
+
const paths = listPromptSurfacePaths(resolvedRoot);
|
|
154
|
+
const surfaces = paths.map((path) => inventorySurface(resolvedRoot, path));
|
|
155
|
+
return {
|
|
156
|
+
generatedAt,
|
|
157
|
+
root: resolvedRoot,
|
|
158
|
+
totals: {
|
|
159
|
+
files: surfaces.length,
|
|
160
|
+
lines: surfaces.reduce((sum, surface) => sum + surface.lines, 0),
|
|
161
|
+
approximateTokens: surfaces.reduce((sum, surface) => sum + surface.approximateTokens, 0),
|
|
162
|
+
absoluteDirectiveCount: surfaces.reduce((sum, surface) => sum + surface.absoluteDirectiveCount, 0),
|
|
163
|
+
},
|
|
164
|
+
surfaces,
|
|
165
|
+
duplicateFragmentFamilies: duplicateFragmentFamilies(resolvedRoot, paths),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function renderPromptInventoryMarkdown(report: PromptInventoryReport): string {
|
|
170
|
+
const rows = report.surfaces.map((surface) => {
|
|
171
|
+
const markerHits = Object.entries(surface.markers)
|
|
172
|
+
.filter(([, count]) => count > 0)
|
|
173
|
+
.map(([marker, count]) => `${marker} (${count})`)
|
|
174
|
+
.join('<br>');
|
|
175
|
+
return `| ${surface.path} | ${surface.lines} | ${surface.approximateTokens} | ${surface.absoluteDirectiveCount} | ${markerHits || '—'} |`;
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
const duplicates = report.duplicateFragmentFamilies.length === 0
|
|
179
|
+
? ['- None detected.']
|
|
180
|
+
: report.duplicateFragmentFamilies.map(
|
|
181
|
+
(family) => `- ${family.count} files: ${family.text}\n - ${family.paths.join(', ')}`,
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
return [
|
|
185
|
+
'# Prompt Inventory',
|
|
186
|
+
'',
|
|
187
|
+
`Generated: ${report.generatedAt}`,
|
|
188
|
+
`Root: ${relative(process.cwd(), report.root) || '.'}`,
|
|
189
|
+
'',
|
|
190
|
+
'## Totals',
|
|
191
|
+
'',
|
|
192
|
+
`- Files: ${report.totals.files}`,
|
|
193
|
+
`- Lines: ${report.totals.lines}`,
|
|
194
|
+
`- Approximate tokens: ${report.totals.approximateTokens}`,
|
|
195
|
+
`- Absolute directive lines: ${report.totals.absoluteDirectiveCount}`,
|
|
196
|
+
'',
|
|
197
|
+
'## Surfaces',
|
|
198
|
+
'',
|
|
199
|
+
'| Path | Lines | Approx. tokens | Absolute directive lines | Markers |',
|
|
200
|
+
'| --- | ---: | ---: | ---: | --- |',
|
|
201
|
+
...rows,
|
|
202
|
+
'',
|
|
203
|
+
'## Duplicated fragment families',
|
|
204
|
+
'',
|
|
205
|
+
...duplicates,
|
|
206
|
+
'',
|
|
207
|
+
].join('\n');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
211
|
+
const root = process.argv.includes('--root') ? process.argv[process.argv.indexOf('--root') + 1] : process.cwd();
|
|
212
|
+
const report = buildPromptInventory(root);
|
|
213
|
+
if (process.argv.includes('--json')) {
|
|
214
|
+
console.log(JSON.stringify(report, null, 2));
|
|
215
|
+
} else {
|
|
216
|
+
console.log(renderPromptInventoryMarkdown(report));
|
|
217
|
+
}
|
|
218
|
+
}
|
package/templates/AGENTS.md
CHANGED
|
@@ -37,99 +37,59 @@ Keep runtime marker contracts stable and non-destructive when overlays are appli
|
|
|
37
37
|
- Check official documentation before implementing with unfamiliar SDKs, frameworks, or APIs.
|
|
38
38
|
- Within a single Codex session or team pane, use Codex native subagents for independent, bounded parallel subtasks when that improves throughput.
|
|
39
39
|
<!-- OMX:GUIDANCE:OPERATING:START -->
|
|
40
|
-
- Default to
|
|
41
|
-
-
|
|
40
|
+
- Default to outcome-first, quality-focused responses: identify the user's target result, success criteria, constraints, available evidence, expected output, and stop condition before adding process detail.
|
|
41
|
+
- Keep collaboration style short and direct. Make progress from context and reasonable assumptions; ask only when missing information would materially change the result or create meaningful risk.
|
|
42
|
+
- Start multi-step or tool-heavy work with a concise visible preamble that acknowledges the request and names the first step; keep later updates brief and evidence-based.
|
|
43
|
+
- Proceed automatically on clear, low-risk, reversible next steps; ask only for irreversible, credential-gated, external-production, destructive, or materially scope-changing actions.
|
|
42
44
|
- AUTO-CONTINUE for clear, already-requested, low-risk, reversible, local edit-test-verify work; keep inspecting, editing, testing, and verifying without permission handoff.
|
|
43
45
|
- ASK only for destructive, irreversible, credential-gated, external-production, or materially scope-changing actions, or when missing authority blocks progress.
|
|
44
46
|
- On AUTO-CONTINUE branches, do not use permission-handoff phrasing; state the next action or evidence-backed result.
|
|
45
47
|
- Keep going unless blocked; finish the current safe branch before asking for confirmation or handoff.
|
|
46
48
|
- Ask only when blocked by missing information, missing authority, or an irreversible/destructive branch.
|
|
49
|
+
- Use absolute language only for true invariants: safety, security, side-effect boundaries, required output fields, workflow state transitions, and product contracts.
|
|
47
50
|
- Do not ask or instruct humans to perform ordinary non-destructive, reversible actions; execute those safe reversible OMX/runtime operations and ordinary commands yourself.
|
|
48
51
|
- Treat OMX runtime manipulation, state transitions, and ordinary command execution as agent responsibilities when they are safe and reversible.
|
|
49
52
|
- Treat newer user task updates as local overrides for the active task while preserving earlier non-conflicting instructions.
|
|
50
53
|
- When the user provides newer same-thread evidence (for example logs, stack traces, or test output), treat it as the current source of truth, re-evaluate earlier hypotheses against it, and do not anchor on older evidence unless the user reaffirms it.
|
|
51
|
-
- Persist with tool use
|
|
52
|
-
- More effort does not mean reflexive web/tool escalation;
|
|
54
|
+
- Persist with retrieval, inspection, diagnostics, tests, or tool use only while they materially improve correctness, required citations, validation, or safe execution; stop once the core request is answerable with sufficient evidence.
|
|
55
|
+
- More effort does not mean reflexive web/tool escalation; re-evaluate low/medium effort and the smallest useful tool loop before escalating reasoning or retrieval.
|
|
53
56
|
<!-- OMX:GUIDANCE:OPERATING:END -->
|
|
54
57
|
</operating_principles>
|
|
55
58
|
|
|
56
59
|
## Working agreements
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- Prefer deletion over addition.
|
|
60
|
-
- Reuse existing utils and patterns before introducing new abstractions.
|
|
61
|
-
- No new dependencies without explicit request.
|
|
60
|
+
- For cleanup/refactor/deslop work, write a cleanup plan and lock behavior with regression tests before editing when coverage is missing.
|
|
61
|
+
- Prefer deletion, existing utilities, and existing patterns before new abstractions; add dependencies only when explicitly requested.
|
|
62
62
|
- Keep diffs small, reviewable, and reversible.
|
|
63
|
-
-
|
|
64
|
-
- Final reports must include changed files, simplifications made, and remaining risks.
|
|
63
|
+
- Verify with lint, typecheck, tests, and static analysis after changes; final reports include changed files, simplifications, and remaining risks.
|
|
65
64
|
|
|
66
65
|
<lore_commit_protocol>
|
|
67
66
|
## Lore Commit Protocol
|
|
68
67
|
|
|
69
|
-
Every commit message must follow the Lore protocol
|
|
70
|
-
Commits are not just labels on diffs; they are the atomic unit of institutional knowledge.
|
|
68
|
+
Every commit message must follow the Lore protocol: a concise decision record using git-native trailers.
|
|
71
69
|
|
|
72
70
|
### Format
|
|
73
71
|
|
|
74
72
|
```
|
|
75
73
|
<intent line: why the change was made, not what changed>
|
|
76
74
|
|
|
77
|
-
<body:
|
|
75
|
+
<optional concise body: constraints and approach rationale>
|
|
78
76
|
|
|
79
77
|
Constraint: <external constraint that shaped the decision>
|
|
80
78
|
Rejected: <alternative considered> | <reason for rejection>
|
|
81
79
|
Confidence: <low|medium|high>
|
|
82
80
|
Scope-risk: <narrow|moderate|broad>
|
|
83
81
|
Directive: <forward-looking warning for future modifiers>
|
|
84
|
-
Tested: <what was verified
|
|
82
|
+
Tested: <what was verified>
|
|
85
83
|
Not-tested: <known gaps in verification>
|
|
86
84
|
```
|
|
87
85
|
|
|
88
86
|
### Rules
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
6. **`Not-tested:` is honest.** Declaring known verification gaps is more valuable than pretending everything is covered.
|
|
96
|
-
7. **All trailers use git-native trailer format** (key-value after a blank line). No custom parsing required.
|
|
97
|
-
|
|
98
|
-
### Example
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
Prevent silent session drops during long-running operations
|
|
102
|
-
|
|
103
|
-
The auth service returns inconsistent status codes on token
|
|
104
|
-
expiry, so the interceptor catches all 4xx responses and
|
|
105
|
-
triggers an inline refresh.
|
|
106
|
-
|
|
107
|
-
Constraint: Auth service does not support token introspection
|
|
108
|
-
Constraint: Must not add latency to non-expired-token paths
|
|
109
|
-
Rejected: Extend token TTL to 24h | security policy violation
|
|
110
|
-
Rejected: Background refresh on timer | race condition with concurrent requests
|
|
111
|
-
Confidence: high
|
|
112
|
-
Scope-risk: narrow
|
|
113
|
-
Directive: Error handling is intentionally broad (all 4xx) — do not narrow without verifying upstream behavior
|
|
114
|
-
Tested: Single expired token refresh (unit)
|
|
115
|
-
Not-tested: Auth service cold-start > 500ms behavior
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Trailer Vocabulary
|
|
119
|
-
|
|
120
|
-
| Trailer | Purpose |
|
|
121
|
-
|---------|---------|
|
|
122
|
-
| `Constraint:` | External constraint that shaped the decision |
|
|
123
|
-
| `Rejected:` | Alternative considered and why it was rejected |
|
|
124
|
-
| `Confidence:` | Author's confidence level (low/medium/high) |
|
|
125
|
-
| `Scope-risk:` | How broadly the change affects the system (narrow/moderate/broad) |
|
|
126
|
-
| `Reversibility:` | How easily the change can be undone (clean/messy/irreversible) |
|
|
127
|
-
| `Directive:` | Forward-looking instruction for future modifiers |
|
|
128
|
-
| `Tested:` | What verification was performed |
|
|
129
|
-
| `Not-tested:` | Known gaps in verification |
|
|
130
|
-
| `Related:` | Links to related commits, issues, or decisions |
|
|
131
|
-
|
|
132
|
-
Teams may introduce domain-specific trailers without breaking compatibility.
|
|
88
|
+
- Intent line first; describe why, not what.
|
|
89
|
+
- Use trailers only when they add decision context.
|
|
90
|
+
- Use `Rejected:` for alternatives future agents should not re-explore.
|
|
91
|
+
- Use `Directive:` for warnings, `Constraint:` for external forces, and `Not-tested:` for known verification gaps.
|
|
92
|
+
- Teams may introduce domain-specific trailers without breaking compatibility.
|
|
133
93
|
</lore_commit_protocol>
|
|
134
94
|
|
|
135
95
|
---
|
|
@@ -204,13 +164,7 @@ Leader/workflow routing contract:
|
|
|
204
164
|
---
|
|
205
165
|
|
|
206
166
|
<agent_catalog>
|
|
207
|
-
Key roles:
|
|
208
|
-
- `explore` — fast codebase search and mapping
|
|
209
|
-
- `planner` — work plans and sequencing
|
|
210
|
-
- `architect` — read-only analysis, diagnosis, tradeoffs
|
|
211
|
-
- `debugger` — root-cause analysis
|
|
212
|
-
- `executor` — implementation and refactoring
|
|
213
|
-
- `verifier` — completion evidence and validation
|
|
167
|
+
Key roles: `explore` (repo search/mapping), `planner` (plans/sequencing), `architect` (read-only design/diagnosis), `debugger` (root cause), `executor` (implementation/refactoring), and `verifier` (completion evidence).
|
|
214
168
|
|
|
215
169
|
Research/discovery specialists:
|
|
216
170
|
- `explore` — first-stop repository lookup and symbol/file mapping
|
|
@@ -227,14 +181,14 @@ Keyword routing is implemented primarily by native `UserPromptSubmit` hooks and
|
|
|
227
181
|
|
|
228
182
|
Fallback behavior when hook context is unavailable:
|
|
229
183
|
- Explicit `$name` invocations run left-to-right and override implicit keywords.
|
|
230
|
-
- Bare skill names do not activate skills by themselves; skill-name activation requires explicit `$skill` invocation. Natural-language routing phrases may still map to a workflow when they are not just the bare skill name. Examples: `analyze` / `investigate` → `$analyze` for read-only deep analysis with ranked synthesis, explicit confidence, and concrete file references; `deep interview`, `interview`, `don't assume`, or `ouroboros` → `$deep-interview
|
|
184
|
+
- Bare skill names do not activate skills by themselves; skill-name activation requires explicit `$skill` invocation. Natural-language routing phrases may still map to a workflow when they are not just the bare skill name. Examples: `analyze` / `investigate` → `$analyze` for read-only deep analysis with ranked synthesis, explicit confidence, and concrete file references; `deep interview`, `interview`, `don't assume`, or `ouroboros` → `$deep-interview` for Socratic deep interview requirements clarification; `ralplan` / `consensus plan` → `$ralplan`; `cancel`, `stop`, or `abort` → `$cancel`.
|
|
231
185
|
- Keep the detailed keyword list in `src/hooks/keyword-registry.ts`; do not duplicate that table here.
|
|
232
186
|
|
|
233
187
|
Runtime availability gate:
|
|
234
188
|
- Treat `autopilot`, `ralph`, `ultrawork`, `ultraqa`, `team`/`swarm`, and `ecomode` as **OMX runtime workflows**, not generic prompt aliases.
|
|
235
189
|
- Auto-activate runtime workflows only when the current session is actually running under OMX CLI/runtime (for example, launched via `omx`, with OMX session overlay/runtime state available, or when the user explicitly asks to run `omx ...` in the shell).
|
|
236
190
|
- In Codex App or plain Codex sessions without OMX runtime, do **not** treat those keywords alone as activation. Explain that they require OMX CLI runtime support and are not directly available there, and continue with the nearest App-safe surface (`deep-interview`, `ralplan`, `plan`, or native subagents) unless the user explicitly wants you to launch OMX CLI from shell first.
|
|
237
|
-
- When deep-interview is active in OMX CLI/runtime, ask interview
|
|
191
|
+
- When deep-interview is active in attached-tmux OMX CLI/runtime, ask each interview round via `omx question` as a temporary popup-style renderer over the leader pane; after launching `omx question` in a background terminal, wait for that terminal to finish and read the JSON answer before continuing; preserve the leader pane with `OMX_QUESTION_RETURN_PANE=$TMUX_PANE` (or an explicit `%pane` value) when invoking it through Bash/tool paths, prefer `answers[0].answer` / `answers[]` from the response and use legacy `answer` only as fallback, and respect Stop-hook blocking while a deep-interview question obligation is pending. Deep-interview remains one question per round; do not batch multiple interview rounds into one `questions[]` form. Outside tmux or native surfaces that cannot render `omx question` should use the native structured question path when available, otherwise ask exactly one concise plain-text question and wait for the answer.
|
|
238
192
|
|
|
239
193
|
<triage_routing>
|
|
240
194
|
## Triage: advisory prompt-routing context
|
|
@@ -259,15 +213,13 @@ Ralph / Ralplan execution gate:
|
|
|
259
213
|
---
|
|
260
214
|
|
|
261
215
|
<skills>
|
|
262
|
-
Skills are workflow commands.
|
|
263
|
-
Core workflows include `autopilot`, `ralph`, `ultrawork`, `visual-verdict`, `visual-ralph`, `ecomode`, `team`, `swarm`, `ultraqa`, `plan`, `deep-interview` (Socratic deep interview, Ouroboros-inspired), and `ralplan`.
|
|
264
|
-
Utilities include `cancel`, `note`, `doctor`, `help`, and `trace`.
|
|
216
|
+
Skills are workflow commands. Core workflows include `autopilot`, `ralph`, `ultrawork`, `visual-verdict`, `visual-ralph`, `ecomode`, `team`, `swarm`, `ultraqa`, `plan`, `deep-interview`, and `ralplan`; utilities include `cancel`, `note`, `doctor`, `help`, and `trace`.
|
|
265
217
|
</skills>
|
|
266
218
|
|
|
267
219
|
---
|
|
268
220
|
|
|
269
221
|
<team_compositions>
|
|
270
|
-
|
|
222
|
+
Use explicit team orchestration for feature development, bug investigation, code review, UX audit, and similar multi-lane work when coordination value outweighs overhead.
|
|
271
223
|
</team_compositions>
|
|
272
224
|
|
|
273
225
|
---
|
|
@@ -309,33 +261,23 @@ Sizing guidance:
|
|
|
309
261
|
- Large or security/architectural changes: thorough verification
|
|
310
262
|
|
|
311
263
|
<!-- OMX:GUIDANCE:VERIFYSEQ:START -->
|
|
312
|
-
Verification loop:
|
|
264
|
+
Verification loop: define the claim and success criteria, run the smallest validation that can prove it, read the output, then report with evidence. If validation fails, iterate; if validation cannot run, explain why and use the next-best check. Keep evidence summaries concise but sufficient.
|
|
313
265
|
|
|
314
266
|
- Run dependent tasks sequentially; verify prerequisites before starting downstream actions.
|
|
315
267
|
- If a task update changes only the current branch of work, apply it locally and continue without reinterpreting unrelated standing instructions.
|
|
316
|
-
-
|
|
268
|
+
- For coding work, prefer targeted tests for changed behavior, then typecheck/lint/build/smoke checks when applicable; do not claim completion without fresh evidence or an explicit validation gap.
|
|
269
|
+
- When correctness depends on retrieval, diagnostics, tests, or other tools, continue only until the task is grounded and verified; avoid extra loops that only improve phrasing or gather nonessential evidence.
|
|
317
270
|
<!-- OMX:GUIDANCE:VERIFYSEQ:END -->
|
|
318
271
|
</verification>
|
|
319
272
|
|
|
320
273
|
<execution_protocols>
|
|
321
|
-
Mode selection:
|
|
322
|
-
- Use `$deep-interview` first when the request is broad, intent/boundaries are unclear, or the user says not to assume.
|
|
323
|
-
- Use `$ralplan` when the requirements are clear enough but architecture, tradeoffs, or test strategy still need consensus.
|
|
324
|
-
- Use `$team` when the approved plan has multiple independent lanes, shared blockers, or durable coordination needs.
|
|
325
|
-
- Use `$ralph` when the approved plan should stay in a persistent completion / verification loop with one owner.
|
|
326
|
-
- Otherwise execute directly in solo mode.
|
|
327
|
-
- Do not change modes casually; switch only when evidence shows the current lane is mismatched or blocked.
|
|
274
|
+
Mode selection: use `$deep-interview` for unclear intent/boundaries; `$ralplan` for consensus on architecture, tradeoffs, or tests; `$team` for approved multi-lane work; `$ralph` for persistent single-owner completion/verification loops; otherwise execute directly in solo mode. Switch modes only when evidence shows the current lane is mismatched or blocked.
|
|
328
275
|
|
|
329
276
|
Command routing:
|
|
330
277
|
- When `USE_OMX_EXPLORE_CMD` enables advisory routing, strongly prefer `omx explore` as the default surface for simple read-only repository lookup tasks (files, symbols, patterns, relationships).
|
|
331
278
|
- For simple file/symbol lookups, use `omx explore` FIRST before attempting full code analysis.
|
|
332
279
|
|
|
333
|
-
When to use what:
|
|
334
|
-
- Use `omx explore --prompt ...` for simple read-only lookups.
|
|
335
|
-
- Use `omx sparkshell` for noisy read-only shell commands, bounded verification runs, repo-wide listing/search, or tmux-pane summaries; `omx sparkshell --tmux-pane ...` is explicit opt-in.
|
|
336
|
-
- Keep ambiguous, implementation-heavy, edit-heavy, or non-shell-only work on the richer normal path.
|
|
337
|
-
- `omx explore` is a shell-only, allowlisted, read-only path; do not rely on it for edits, tests, diagnostics, MCP/web access, or complex shell composition.
|
|
338
|
-
- If `omx explore` or `omx sparkshell` is incomplete or ambiguous, retry narrower and gracefully fall back to the normal path.
|
|
280
|
+
Use `omx explore --prompt ...` for simple read-only lookups through the shell-only, allowlisted, read-only path. Use `omx sparkshell` for noisy read-only shell commands, bounded verification, repo-wide listing/search, or explicit `omx sparkshell --tmux-pane` summaries. Treat sparkshell as explicit opt-in. When to use what: keep ambiguous, implementation-heavy, edit-heavy, diagnostics, tests, MCP/web, and complex shell work on the normal path; if `omx explore` or `omx sparkshell` is incomplete, retry narrower or gracefully fall back to the normal path.
|
|
339
281
|
|
|
340
282
|
Leader vs worker:
|
|
341
283
|
- The leader chooses the mode, keeps the brief current, delegates bounded work, and owns verification plus stop/escalate calls.
|
|
@@ -353,18 +295,15 @@ Output contract:
|
|
|
353
295
|
- Keep rationale once; do not restate the full plan every turn.
|
|
354
296
|
- Expand only for risk, handoff, or explicit user request.
|
|
355
297
|
|
|
356
|
-
Parallelization:
|
|
357
|
-
- Run independent tasks in parallel.
|
|
358
|
-
- Run dependent tasks sequentially.
|
|
359
|
-
- Use background execution for builds and tests when helpful.
|
|
360
|
-
- Prefer Team mode only when its coordination value outweighs its overhead.
|
|
361
|
-
- If correctness depends on retrieval, diagnostics, tests, or other tools, continue using them until the task is grounded and verified.
|
|
298
|
+
Parallelization: run independent tasks in parallel, dependent tasks sequentially, and long builds/tests in the background when helpful. Prefer Team mode only when coordination value outweighs overhead. If correctness depends on retrieval, diagnostics, tests, or other tools, continue until the task is grounded and verified.
|
|
362
299
|
|
|
363
300
|
Anti-slop workflow:
|
|
364
301
|
- Cleanup/refactor/deslop work still follows the same `$deep-interview` -> `$ralplan` -> `$team`/`$ralph` path; use `$ai-slop-cleaner` as a bounded helper inside the chosen execution lane, not as a competing top-level workflow.
|
|
365
|
-
-
|
|
366
|
-
- Prefer deletion
|
|
367
|
-
-
|
|
302
|
+
- Write a cleanup plan before modifying code; lock existing behavior with regression tests first, then make one smell-focused pass at a time.
|
|
303
|
+
- Prefer deletion over addition, and prefer reuse plus boundary repair over new layers.
|
|
304
|
+
- No new dependencies without explicit request.
|
|
305
|
+
- Run lint, typecheck, tests, and static analysis before claiming completion.
|
|
306
|
+
- Keep writer/reviewer pass separation for cleanup plans and approvals; preserve writer/reviewer pass separation explicitly.
|
|
368
307
|
|
|
369
308
|
Visual iteration gate:
|
|
370
309
|
- For visual tasks, run `$visual-verdict` every iteration before the next edit.
|