oh-my-codex 0.7.5 → 0.8.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/README.de.md +314 -0
- package/README.es.md +295 -17
- package/README.fr.md +314 -0
- package/README.it.md +314 -0
- package/README.ja.md +296 -18
- package/README.ko.md +295 -17
- package/README.md +68 -3
- package/README.pt.md +295 -17
- package/README.ru.md +295 -17
- package/README.tr.md +314 -0
- package/README.vi.md +296 -18
- package/README.zh.md +292 -17
- package/dist/catalog/__tests__/generator.test.js +2 -0
- package/dist/catalog/__tests__/generator.test.js.map +1 -1
- package/dist/catalog/__tests__/schema.test.js +7 -0
- package/dist/catalog/__tests__/schema.test.js.map +1 -1
- package/dist/cli/__tests__/ask.test.d.ts +2 -0
- package/dist/cli/__tests__/ask.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ask.test.js +236 -0
- package/dist/cli/__tests__/ask.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js +45 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -0
- package/dist/cli/__tests__/index.test.js +43 -1
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js +15 -0
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js.map +1 -0
- package/dist/cli/__tests__/ralph.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph.test.js +40 -0
- package/dist/cli/__tests__/ralph.test.js.map +1 -0
- package/dist/cli/__tests__/setup-scope.test.js +2 -0
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
- package/dist/cli/__tests__/team-decompose.test.d.ts +2 -0
- package/dist/cli/__tests__/team-decompose.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team-decompose.test.js +67 -0
- package/dist/cli/__tests__/team-decompose.test.js.map +1 -0
- package/dist/cli/__tests__/version.test.d.ts +2 -0
- package/dist/cli/__tests__/version.test.d.ts.map +1 -0
- package/dist/cli/__tests__/version.test.js +21 -0
- package/dist/cli/__tests__/version.test.js.map +1 -0
- package/dist/cli/ask.d.ts +13 -0
- package/dist/cli/ask.d.ts.map +1 -0
- package/dist/cli/ask.js +174 -0
- package/dist/cli/ask.js.map +1 -0
- package/dist/cli/constants.d.ts +10 -0
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +10 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/doctor.js +16 -5
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +7 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +117 -43
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/ralph.d.ts +4 -0
- package/dist/cli/ralph.d.ts.map +1 -1
- package/dist/cli/ralph.js +89 -13
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts +18 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +108 -16
- package/dist/cli/team.js.map +1 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +8 -0
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js +55 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/emulator.test.js +6 -0
- package/dist/hooks/__tests__/emulator.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +44 -22
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js +59 -0
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +88 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +199 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.d.ts +11 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.js +266 -0
- package/dist/hooks/__tests__/notify-hook-visual-verdict.test.js.map +1 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js +51 -0
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.d.ts +2 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +34 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -0
- package/dist/hooks/__tests__/tmux-hook-engine.test.js +36 -1
- package/dist/hooks/__tests__/tmux-hook-engine.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-verdict-loop.test.d.ts +2 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.js +35 -0
- package/dist/hooks/__tests__/visual-verdict-loop.test.js.map +1 -0
- package/dist/hooks/agents-overlay.d.ts.map +1 -1
- package/dist/hooks/agents-overlay.js +18 -16
- package/dist/hooks/agents-overlay.js.map +1 -1
- package/dist/hooks/codebase-map.d.ts.map +1 -1
- package/dist/hooks/codebase-map.js +6 -2
- package/dist/hooks/codebase-map.js.map +1 -1
- package/dist/hooks/emulator.d.ts.map +1 -1
- package/dist/hooks/emulator.js +2 -0
- package/dist/hooks/emulator.js.map +1 -1
- package/dist/hooks/extensibility/sdk.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk.js +2 -1
- package/dist/hooks/extensibility/sdk.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +6 -0
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +2 -24
- package/dist/hud/index.js.map +1 -1
- package/dist/mcp/__tests__/team-server-cleanup.test.d.ts +2 -0
- package/dist/mcp/__tests__/team-server-cleanup.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/team-server-cleanup.test.js +219 -0
- package/dist/mcp/__tests__/team-server-cleanup.test.js.map +1 -0
- package/dist/mcp/bootstrap.d.ts +1 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +1 -0
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/code-intel-server.d.ts.map +1 -1
- package/dist/mcp/code-intel-server.js +18 -8
- package/dist/mcp/code-intel-server.js.map +1 -1
- package/dist/mcp/memory-server.js +72 -11
- package/dist/mcp/memory-server.js.map +1 -1
- package/dist/mcp/state-paths.d.ts.map +1 -1
- package/dist/mcp/state-paths.js +4 -1
- package/dist/mcp/state-paths.js.map +1 -1
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +18 -5
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/mcp/team-server.d.ts +24 -0
- package/dist/mcp/team-server.d.ts.map +1 -0
- package/dist/mcp/team-server.js +425 -0
- package/dist/mcp/team-server.js.map +1 -0
- package/dist/mcp/trace-server.d.ts.map +1 -1
- package/dist/mcp/trace-server.js +8 -3
- package/dist/mcp/trace-server.js.map +1 -1
- package/dist/notifications/__tests__/verbosity.test.js +35 -0
- package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +12 -3
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/dispatcher.d.ts.map +1 -1
- package/dist/notifications/dispatcher.js +4 -4
- package/dist/notifications/dispatcher.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +6 -2
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/session-registry.d.ts.map +1 -1
- package/dist/notifications/session-registry.js +2 -2
- package/dist/notifications/session-registry.js.map +1 -1
- package/dist/notifications/tmux.d.ts.map +1 -1
- package/dist/notifications/tmux.js +13 -4
- package/dist/notifications/tmux.js.map +1 -1
- package/dist/notifications/types.d.ts +4 -0
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/openclaw/__tests__/index.test.js +40 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -1
- package/dist/openclaw/dispatcher.d.ts.map +1 -1
- package/dist/openclaw/dispatcher.js +5 -2
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/openclaw/index.d.ts.map +1 -1
- package/dist/openclaw/index.js +1 -0
- package/dist/openclaw/index.js.map +1 -1
- package/dist/openclaw/types.d.ts +2 -0
- package/dist/openclaw/types.d.ts.map +1 -1
- package/dist/ralph/__tests__/persistence.test.js +28 -1
- package/dist/ralph/__tests__/persistence.test.js.map +1 -1
- package/dist/ralph/persistence.d.ts +21 -0
- package/dist/ralph/persistence.d.ts.map +1 -1
- package/dist/ralph/persistence.js +85 -2
- package/dist/ralph/persistence.js.map +1 -1
- package/dist/state/paths.d.ts +3 -0
- package/dist/state/paths.d.ts.map +1 -0
- package/dist/state/paths.js +2 -0
- package/dist/state/paths.js.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts +2 -0
- package/dist/team/__tests__/idle-nudge.test.d.ts.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.js +225 -0
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -0
- package/dist/team/__tests__/role-router.test.d.ts +2 -0
- package/dist/team/__tests__/role-router.test.d.ts.map +1 -0
- package/dist/team/__tests__/role-router.test.js +204 -0
- package/dist/team/__tests__/role-router.test.js.map +1 -0
- package/dist/team/__tests__/runtime-cli.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-cli.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-cli.test.js +72 -0
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.js +195 -9
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +132 -2
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.d.ts +2 -0
- package/dist/team/__tests__/state-root.test.d.ts.map +1 -0
- package/dist/team/__tests__/state-root.test.js +9 -0
- package/dist/team/__tests__/state-root.test.js.map +1 -0
- package/dist/team/__tests__/state.test.js +52 -17
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/team-ops-contract.test.d.ts +2 -0
- package/dist/team/__tests__/team-ops-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/team-ops-contract.test.js +90 -0
- package/dist/team/__tests__/team-ops-contract.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +94 -7
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +59 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/__tests__/worktree.test.js +81 -2
- package/dist/team/__tests__/worktree.test.js.map +1 -1
- package/dist/team/idle-nudge.d.ts +53 -0
- package/dist/team/idle-nudge.d.ts.map +1 -0
- package/dist/team/idle-nudge.js +140 -0
- package/dist/team/idle-nudge.js.map +1 -0
- package/dist/team/mcp-comm.d.ts +1 -1
- package/dist/team/mcp-comm.d.ts.map +1 -1
- package/dist/team/mcp-comm.js +6 -2
- package/dist/team/mcp-comm.js.map +1 -1
- package/dist/team/orchestrator.d.ts +1 -10
- package/dist/team/orchestrator.d.ts.map +1 -1
- package/dist/team/orchestrator.js +8 -0
- package/dist/team/orchestrator.js.map +1 -1
- package/dist/team/role-router.d.ts +32 -0
- package/dist/team/role-router.d.ts.map +1 -0
- package/dist/team/role-router.js +137 -0
- package/dist/team/role-router.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +18 -0
- package/dist/team/runtime-cli.d.ts.map +1 -0
- package/dist/team/runtime-cli.js +244 -0
- package/dist/team/runtime-cli.js.map +1 -0
- package/dist/team/runtime.d.ts +6 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +148 -60
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts +1 -0
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +74 -32
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/approvals.d.ts +25 -0
- package/dist/team/state/approvals.d.ts.map +1 -0
- package/dist/team/state/approvals.js +31 -0
- package/dist/team/state/approvals.js.map +1 -0
- package/dist/team/state/config.d.ts +2 -0
- package/dist/team/state/config.d.ts.map +1 -0
- package/dist/team/state/config.js +2 -0
- package/dist/team/state/config.js.map +1 -0
- package/dist/team/state/dispatch-lock.d.ts +3 -0
- package/dist/team/state/dispatch-lock.d.ts.map +1 -0
- package/dist/team/state/dispatch-lock.js +81 -0
- package/dist/team/state/dispatch-lock.js.map +1 -0
- package/dist/team/state/dispatch.d.ts +61 -0
- package/dist/team/state/dispatch.d.ts.map +1 -0
- package/dist/team/state/dispatch.js +158 -0
- package/dist/team/state/dispatch.js.map +1 -0
- package/dist/team/state/events.d.ts +2 -0
- package/dist/team/state/events.d.ts.map +1 -0
- package/dist/team/state/events.js +2 -0
- package/dist/team/state/events.js.map +1 -0
- package/dist/team/state/index.d.ts +11 -0
- package/dist/team/state/index.d.ts.map +1 -0
- package/dist/team/state/index.js +11 -0
- package/dist/team/state/index.js.map +1 -0
- package/dist/team/state/io.d.ts +2 -0
- package/dist/team/state/io.d.ts.map +1 -0
- package/dist/team/state/io.js +2 -0
- package/dist/team/state/io.js.map +1 -0
- package/dist/team/state/locks.d.ts +16 -0
- package/dist/team/state/locks.d.ts.map +1 -0
- package/dist/team/state/locks.js +201 -0
- package/dist/team/state/locks.js.map +1 -0
- package/dist/team/state/mailbox.d.ts +39 -0
- package/dist/team/state/mailbox.d.ts.map +1 -0
- package/dist/team/state/mailbox.js +58 -0
- package/dist/team/state/mailbox.js.map +1 -0
- package/dist/team/state/monitor.d.ts +96 -0
- package/dist/team/state/monitor.d.ts.map +1 -0
- package/dist/team/state/monitor.js +163 -0
- package/dist/team/state/monitor.js.map +1 -0
- package/dist/team/state/shutdown.d.ts +2 -0
- package/dist/team/state/shutdown.d.ts.map +1 -0
- package/dist/team/state/shutdown.js +2 -0
- package/dist/team/state/shutdown.js.map +1 -0
- package/dist/team/state/summary.d.ts +2 -0
- package/dist/team/state/summary.d.ts.map +1 -0
- package/dist/team/state/summary.js +2 -0
- package/dist/team/state/summary.js.map +1 -0
- package/dist/team/state/tasks.d.ts +49 -0
- package/dist/team/state/tasks.d.ts.map +1 -0
- package/dist/team/state/tasks.js +182 -0
- package/dist/team/state/tasks.js.map +1 -0
- package/dist/team/state/types.d.ts +281 -0
- package/dist/team/state/types.d.ts.map +1 -0
- package/dist/team/state/types.js +3 -0
- package/dist/team/state/types.js.map +1 -0
- package/dist/team/state/workers.d.ts +2 -0
- package/dist/team/state/workers.d.ts.map +1 -0
- package/dist/team/state/workers.js +2 -0
- package/dist/team/state/workers.js.map +1 -0
- package/dist/team/state-root.d.ts +5 -0
- package/dist/team/state-root.d.ts.map +1 -0
- package/dist/team/state-root.js +8 -0
- package/dist/team/state-root.js.map +1 -0
- package/dist/team/state.d.ts +6 -2
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +200 -881
- package/dist/team/state.js.map +1 -1
- package/dist/team/tmux-session.d.ts +42 -2
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +229 -74
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +2 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +47 -20
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/team/worktree.d.ts +5 -1
- package/dist/team/worktree.d.ts.map +1 -1
- package/dist/team/worktree.js +71 -17
- package/dist/team/worktree.js.map +1 -1
- package/dist/utils/safe-json.d.ts +3 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/safe-json.js +19 -0
- package/dist/utils/safe-json.js.map +1 -0
- package/dist/utils/sleep.d.ts +3 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +15 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/visual/__tests__/verdict.test.d.ts +2 -0
- package/dist/visual/__tests__/verdict.test.d.ts.map +1 -0
- package/dist/visual/__tests__/verdict.test.js +81 -0
- package/dist/visual/__tests__/verdict.test.js.map +1 -0
- package/dist/visual/constants.d.ts +4 -0
- package/dist/visual/constants.d.ts.map +1 -0
- package/dist/visual/constants.js +3 -0
- package/dist/visual/constants.js.map +1 -0
- package/dist/visual/verdict.d.ts +17 -0
- package/dist/visual/verdict.d.ts.map +1 -0
- package/dist/visual/verdict.js +61 -0
- package/dist/visual/verdict.js.map +1 -0
- package/package.json +10 -3
- package/scripts/ask-claude.sh +17 -0
- package/scripts/ask-gemini.sh +14 -0
- package/scripts/fixtures/ask-advisor-stub.js +12 -0
- package/scripts/notify-hook/log.js +5 -0
- package/scripts/notify-hook/team-dispatch.js +56 -1
- package/scripts/notify-hook/tmux-injection.js +45 -4
- package/scripts/notify-hook/visual-verdict.js +158 -0
- package/scripts/notify-hook.js +27 -0
- package/scripts/run-provider-advisor.js +179 -0
- package/scripts/tmux-hook-engine.js +24 -0
- package/skills/ask-claude/SKILL.md +61 -0
- package/skills/ask-gemini/SKILL.md +61 -0
- package/skills/autopilot/SKILL.md +34 -4
- package/skills/configure-notifications/SKILL.md +1 -1
- package/skills/configure-openclaw/SKILL.md +154 -157
- package/skills/deep-interview/SKILL.md +247 -0
- package/skills/doctor/SKILL.md +1 -1
- package/skills/help/SKILL.md +3 -3
- package/skills/ralph/SKILL.md +42 -11
- package/skills/ralplan/SKILL.md +17 -0
- package/skills/skill/SKILL.md +32 -32
- package/skills/team/SKILL.md +60 -0
- package/skills/visual-verdict/SKILL.md +76 -0
- package/skills/web-clone/SKILL.md +366 -0
- package/skills/worker/SKILL.md +5 -4
- package/templates/AGENTS.md +9 -0
- package/templates/catalog-manifest.json +39 -2
|
@@ -10,248 +10,245 @@ triggers:
|
|
|
10
10
|
|
|
11
11
|
# Configure OpenClaw Notifications
|
|
12
12
|
|
|
13
|
-
Set up OpenClaw as a notification gateway so OMX can route
|
|
13
|
+
Set up OpenClaw as a notification gateway so OMX can route notification events to your OpenClaw hook endpoints (or a local command gateway).
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Runtime Schema Requirement (must match OMX)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Always write OpenClaw config under:
|
|
18
|
+
- `notifications.openclaw.enabled`
|
|
19
|
+
- `notifications.openclaw.gateways`
|
|
20
|
+
- `notifications.openclaw.hooks`
|
|
18
21
|
|
|
19
|
-
**
|
|
20
|
-
- **HTTP Gateway** — OMX POSTs JSON events to your HTTP endpoint
|
|
21
|
-
- **CLI Command Gateway** — OMX runs a shell command with event data as arguments or stdin
|
|
22
|
+
Do **not** use legacy keys like `gatewayType`, `endpoint`, or top-level `command`.
|
|
22
23
|
|
|
23
24
|
## How This Skill Works
|
|
24
25
|
|
|
25
|
-
This is an interactive
|
|
26
|
+
This is an interactive setup wizard. Ask questions with AskUserQuestion, merge changes into `~/.codex/.omx-config.json`, and then run a verification flow with explicit pass/fail diagnostics.
|
|
26
27
|
|
|
27
|
-
## Step 1: Detect Existing Configuration
|
|
28
|
+
## Step 1: Detect Existing OpenClaw Configuration
|
|
28
29
|
|
|
29
30
|
```bash
|
|
30
31
|
CONFIG_FILE="$HOME/.codex/.omx-config.json"
|
|
31
32
|
|
|
32
33
|
if [ -f "$CONFIG_FILE" ]; then
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
echo "GATEWAY_TYPE=$GATEWAY_TYPE"
|
|
41
|
-
[ -n "$ENDPOINT" ] && echo "ENDPOINT=$ENDPOINT"
|
|
42
|
-
[ -n "$COMMAND" ] && echo "COMMAND=$COMMAND"
|
|
43
|
-
else
|
|
44
|
-
echo "EXISTING_CONFIG=false"
|
|
45
|
-
fi
|
|
34
|
+
OPENCLAW_ENABLED=$(jq -r '.notifications.openclaw.enabled // false' "$CONFIG_FILE" 2>/dev/null)
|
|
35
|
+
GATEWAYS=$(jq -r '.notifications.openclaw.gateways // {} | keys | join(", ")' "$CONFIG_FILE" 2>/dev/null)
|
|
36
|
+
HOOKS=$(jq -r '.notifications.openclaw.hooks // {} | keys | join(", ")' "$CONFIG_FILE" 2>/dev/null)
|
|
37
|
+
|
|
38
|
+
echo "OPENCLAW_ENABLED=$OPENCLAW_ENABLED"
|
|
39
|
+
echo "GATEWAYS=${GATEWAYS:-none}"
|
|
40
|
+
echo "HOOKS=${HOOKS:-none}"
|
|
46
41
|
else
|
|
47
42
|
echo "NO_CONFIG_FILE"
|
|
48
43
|
fi
|
|
49
44
|
```
|
|
50
45
|
|
|
51
|
-
If existing config is found, show
|
|
46
|
+
If existing config is found, show current gateways/hooks and ask whether to update or replace.
|
|
52
47
|
|
|
53
|
-
## Step 2: Choose Gateway
|
|
48
|
+
## Step 2: Choose Gateway Mode
|
|
54
49
|
|
|
55
50
|
Use AskUserQuestion:
|
|
56
51
|
|
|
57
|
-
**Question:** "Which OpenClaw gateway mode do you want to
|
|
52
|
+
**Question:** "Which OpenClaw gateway mode do you want to configure?"
|
|
58
53
|
|
|
59
54
|
**Options:**
|
|
60
|
-
1. **HTTP Gateway** - OMX
|
|
61
|
-
2. **CLI Command Gateway** - OMX
|
|
55
|
+
1. **HTTP Gateway (Recommended)** - OMX POSTs JSON to your OpenClaw hook endpoint
|
|
56
|
+
2. **CLI Command Gateway** - OMX executes a local command template
|
|
62
57
|
|
|
63
58
|
## Step 3A: HTTP Gateway Setup
|
|
64
59
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
Collect three values:
|
|
61
|
+
1. Gateway name (default: `local`)
|
|
62
|
+
2. Hook base URL (example: `http://127.0.0.1:18789`)
|
|
63
|
+
3. OpenClaw hooks token
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
Build the endpoint URL as:
|
|
66
|
+
- Delivery endpoint: `${BASE_URL%/}/hooks/agent`
|
|
67
|
+
- Optional wake smoke endpoint: `${BASE_URL%/}/hooks/wake`
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
### Required validation checks
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
- Must start with `http://` or `https://`
|
|
75
|
-
- If invalid, explain the format and ask again
|
|
71
|
+
Run these checks and report each result:
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
1) **Hook token present**
|
|
74
|
+
```bash
|
|
75
|
+
[ -n "$HOOKS_TOKEN" ] && echo "PASS token provided" || echo "FAIL token missing"
|
|
76
|
+
```
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
2) **Gateway URL format and reachability**
|
|
79
|
+
```bash
|
|
80
|
+
case "$BASE_URL" in
|
|
81
|
+
http://*|https://*) echo "PASS URL format" ;;
|
|
82
|
+
*) echo "FAIL URL must start with http:// or https://" ;;
|
|
83
|
+
esac
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
curl -sS -o /dev/null -w "HTTP %{http_code}\n" "$BASE_URL" || echo "FAIL cannot reach base URL"
|
|
86
|
+
```
|
|
82
87
|
|
|
83
|
-
**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
3) **Delivery endpoint probe (`/hooks/agent`)**
|
|
89
|
+
```bash
|
|
90
|
+
curl -sS -o /tmp/omx-openclaw-agent.json -w "HTTP %{http_code}\n" \
|
|
91
|
+
-X POST "${BASE_URL%/}/hooks/agent" \
|
|
92
|
+
-H "Authorization: Bearer $HOOKS_TOKEN" \
|
|
93
|
+
-H "Content-Type: application/json" \
|
|
94
|
+
-d '{"instruction":"OMX OpenClaw setup probe","event":"session-end","sessionId":"setup-smoke"}'
|
|
95
|
+
```
|
|
87
96
|
|
|
88
|
-
If
|
|
97
|
+
If probe is non-2xx or network fails, treat as setup failure and continue with diagnostics.
|
|
89
98
|
|
|
90
99
|
## Step 3B: CLI Command Gateway Setup
|
|
91
100
|
|
|
92
|
-
|
|
101
|
+
Collect:
|
|
102
|
+
- Gateway name (default: `local-command`)
|
|
103
|
+
- Command template (supports `{{event}}`, `{{instruction}}`, `{{sessionId}}`, `{{projectPath}}`)
|
|
93
104
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- `{session_id}` — session identifier
|
|
99
|
-
- `{project}` — project name/path
|
|
100
|
-
- `{message}` — formatted notification message
|
|
101
|
-
|
|
102
|
-
Example: `notify-send 'OMX: {event}' '{message}'`
|
|
103
|
-
Example: `~/.local/bin/my-notifier --event {event} --msg '{message}'`"
|
|
104
|
-
|
|
105
|
-
The user types their command in the "Other" field.
|
|
105
|
+
Example:
|
|
106
|
+
```bash
|
|
107
|
+
~/.local/bin/my-notifier --event {{event}} --text {{instruction}}
|
|
108
|
+
```
|
|
106
109
|
|
|
107
|
-
|
|
110
|
+
### Dual env gate (must be explained)
|
|
108
111
|
|
|
109
|
-
CLI command gateways
|
|
110
|
-
- `OMX_OPENCLAW=1` — enables the OpenClaw gateway
|
|
111
|
-
- `OMX_OPENCLAW_COMMAND=1` — specifically enables CLI command execution
|
|
112
|
+
CLI command gateways only run when **both** are set:
|
|
112
113
|
|
|
113
|
-
|
|
114
|
+
```bash
|
|
115
|
+
export OMX_OPENCLAW=1
|
|
116
|
+
export OMX_OPENCLAW_COMMAND=1
|
|
117
|
+
```
|
|
114
118
|
|
|
115
|
-
|
|
119
|
+
If `OMX_OPENCLAW_COMMAND` is missing, command gateway dispatch is blocked by design.
|
|
116
120
|
|
|
117
|
-
|
|
121
|
+
## Step 4: Select Hook Event Mappings
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
Use AskUserQuestion with multiSelect.
|
|
120
124
|
|
|
121
|
-
**
|
|
122
|
-
1. **Session end (Recommended)** - When a Codex session finishes
|
|
123
|
-
2. **Input needed** - When Codex is waiting for your response
|
|
124
|
-
3. **Session start** - When a new session begins
|
|
125
|
-
4. **Session continuing** - When a persistent mode keeps the session alive
|
|
125
|
+
**Question:** "Which OMX events should trigger OpenClaw hooks?"
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
Recommended defaults:
|
|
128
|
+
- `session-end`
|
|
129
|
+
- `ask-user-question`
|
|
128
130
|
|
|
129
|
-
|
|
131
|
+
Optional:
|
|
132
|
+
- `session-start`
|
|
133
|
+
- `session-idle`
|
|
134
|
+
- `stop`
|
|
130
135
|
|
|
131
|
-
|
|
136
|
+
For each selected event, collect a short instruction template.
|
|
132
137
|
|
|
133
|
-
|
|
134
|
-
CONFIG_FILE="$HOME/.codex/.omx-config.json"
|
|
135
|
-
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
138
|
+
## Step 5: Write Schema-Aligned Config
|
|
136
139
|
|
|
137
|
-
|
|
138
|
-
EXISTING=$(cat "$CONFIG_FILE")
|
|
139
|
-
else
|
|
140
|
-
EXISTING='{}'
|
|
141
|
-
fi
|
|
142
|
-
```
|
|
140
|
+
Always merge into `~/.codex/.omx-config.json`.
|
|
143
141
|
|
|
144
|
-
###
|
|
142
|
+
### HTTP gateway example
|
|
145
143
|
|
|
146
144
|
```bash
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
--arg
|
|
150
|
-
--arg
|
|
151
|
-
--arg headerValue "$AUTH_HEADER_VALUE" \
|
|
145
|
+
jq \
|
|
146
|
+
--arg gatewayName "$GATEWAY_NAME" \
|
|
147
|
+
--arg url "${BASE_URL%/}/hooks/agent" \
|
|
148
|
+
--arg token "$HOOKS_TOKEN" \
|
|
152
149
|
'.notifications = (.notifications // {enabled: true}) |
|
|
153
150
|
.notifications.enabled = true |
|
|
154
|
-
.notifications.openclaw = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
.notifications.openclaw = (.notifications.openclaw // {}) |
|
|
152
|
+
.notifications.openclaw.enabled = true |
|
|
153
|
+
.notifications.openclaw.gateways = (.notifications.openclaw.gateways // {}) |
|
|
154
|
+
.notifications.openclaw.gateways[$gatewayName] = {
|
|
155
|
+
type: "http",
|
|
156
|
+
url: $url,
|
|
157
|
+
headers: {"Authorization": ("Bearer " + $token)}
|
|
158
|
+
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
|
|
160
159
|
```
|
|
161
160
|
|
|
162
|
-
###
|
|
161
|
+
### Command gateway example
|
|
163
162
|
|
|
164
163
|
```bash
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
--arg command "$
|
|
164
|
+
jq \
|
|
165
|
+
--arg gatewayName "$GATEWAY_NAME" \
|
|
166
|
+
--arg command "$COMMAND_TEMPLATE" \
|
|
168
167
|
'.notifications = (.notifications // {enabled: true}) |
|
|
169
168
|
.notifications.enabled = true |
|
|
170
|
-
.notifications.openclaw = {
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
.notifications.openclaw = (.notifications.openclaw // {}) |
|
|
170
|
+
.notifications.openclaw.enabled = true |
|
|
171
|
+
.notifications.openclaw.gateways = (.notifications.openclaw.gateways // {}) |
|
|
172
|
+
.notifications.openclaw.gateways[$gatewayName] = {
|
|
173
|
+
type: "command",
|
|
173
174
|
command: $command
|
|
174
|
-
}' > "$CONFIG_FILE"
|
|
175
|
+
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
|
|
175
176
|
```
|
|
176
177
|
|
|
177
|
-
###
|
|
178
|
+
### Hook mapping example
|
|
178
179
|
|
|
179
180
|
```bash
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
'.notifications.
|
|
183
|
-
.notifications.
|
|
181
|
+
jq \
|
|
182
|
+
--arg gatewayName "$GATEWAY_NAME" \
|
|
183
|
+
'.notifications.openclaw.hooks = (.notifications.openclaw.hooks // {}) |
|
|
184
|
+
.notifications.openclaw.hooks["session-end"] = {
|
|
185
|
+
enabled: true,
|
|
186
|
+
gateway: $gatewayName,
|
|
187
|
+
instruction: "OMX task completed for {{projectPath}}"
|
|
188
|
+
} |
|
|
189
|
+
.notifications.openclaw.hooks["ask-user-question"] = {
|
|
190
|
+
enabled: true,
|
|
191
|
+
gateway: $gatewayName,
|
|
192
|
+
instruction: "OMX needs input: {{question}}"
|
|
193
|
+
}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
|
|
184
194
|
```
|
|
185
195
|
|
|
186
196
|
## Step 6: Explain Activation Gates
|
|
187
197
|
|
|
188
|
-
|
|
198
|
+
Show this exactly:
|
|
189
199
|
|
|
190
|
-
```
|
|
191
|
-
OpenClaw
|
|
192
|
-
|
|
193
|
-
OpenClaw requires environment variables to be set before it activates.
|
|
194
|
-
This prevents accidental notifications in shared or CI environments.
|
|
195
|
-
|
|
196
|
-
For HTTP Gateway:
|
|
197
|
-
export OMX_OPENCLAW=1
|
|
198
|
-
|
|
199
|
-
For CLI Command Gateway (requires both):
|
|
200
|
-
export OMX_OPENCLAW=1
|
|
201
|
-
export OMX_OPENCLAW_COMMAND=1
|
|
200
|
+
```bash
|
|
201
|
+
# Required for OpenClaw integration
|
|
202
|
+
export OMX_OPENCLAW=1
|
|
202
203
|
|
|
203
|
-
|
|
204
|
+
# Required in addition for command gateways
|
|
205
|
+
export OMX_OPENCLAW_COMMAND=1
|
|
204
206
|
```
|
|
205
207
|
|
|
206
|
-
## Step 7:
|
|
208
|
+
## Step 7: Verification Flow (required)
|
|
207
209
|
|
|
208
|
-
|
|
210
|
+
Run both checks for HTTP gateways:
|
|
209
211
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
**Question:** "Send a test notification through OpenClaw to verify the setup?"
|
|
213
|
-
|
|
214
|
-
**Options:**
|
|
215
|
-
1. **Yes, test now (Recommended)** - Run a test dispatch
|
|
216
|
-
2. **No, I'll test later** - Skip testing
|
|
217
|
-
|
|
218
|
-
### If testing HTTP Gateway:
|
|
212
|
+
### A) Wake smoke test (`/hooks/wake`)
|
|
219
213
|
|
|
220
214
|
```bash
|
|
221
|
-
curl -
|
|
215
|
+
curl -sS -X POST "${BASE_URL%/}/hooks/wake" \
|
|
216
|
+
-H "Authorization: Bearer $HOOKS_TOKEN" \
|
|
222
217
|
-H "Content-Type: application/json" \
|
|
223
|
-
|
|
224
|
-
-d '{"event":"test","message":"OMX OpenClaw test notification","session_id":"test"}' \
|
|
225
|
-
"$ENDPOINT"
|
|
218
|
+
-d '{"text":"OMX wake smoke test","mode":"now"}'
|
|
226
219
|
```
|
|
227
220
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
Replace placeholders in the command with test values and run it.
|
|
221
|
+
Expected pass signal: JSON includes `"ok":true`.
|
|
231
222
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
## Step 8: Confirm
|
|
235
|
-
|
|
236
|
-
Display the final configuration summary:
|
|
223
|
+
### B) Delivery verification (`/hooks/agent`) — not wake-only
|
|
237
224
|
|
|
225
|
+
```bash
|
|
226
|
+
curl -sS -o /tmp/omx-openclaw-delivery.json -w "HTTP %{http_code}\n" \
|
|
227
|
+
-X POST "${BASE_URL%/}/hooks/agent" \
|
|
228
|
+
-H "Authorization: Bearer $HOOKS_TOKEN" \
|
|
229
|
+
-H "Content-Type: application/json" \
|
|
230
|
+
-d '{"instruction":"OMX delivery verification","event":"session-end","sessionId":"verify-setup"}'
|
|
238
231
|
```
|
|
239
|
-
OpenClaw Gateway Configured!
|
|
240
232
|
|
|
241
|
-
|
|
242
|
-
Endpoint: https://your-server/omx-hook (HTTP only)
|
|
243
|
-
Command: notify-send 'OMX' '{message}' (CLI only)
|
|
244
|
-
Events: session-end, ask-user-question
|
|
233
|
+
Expected pass signal: HTTP 2xx and response body confirms acceptance.
|
|
245
234
|
|
|
246
|
-
|
|
235
|
+
## Step 8: Pass/Fail Diagnostics Guidance
|
|
247
236
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
237
|
+
If verification fails, guide with this checklist:
|
|
238
|
+
- **401/403** → token missing/invalid; rotate token and update `Authorization` header.
|
|
239
|
+
- **404** → wrong path; verify `/hooks/agent` and `/hooks/wake` are enabled by OpenClaw hooks config.
|
|
240
|
+
- **5xx** → OpenClaw gateway runtime issue; check gateway logs and retry.
|
|
241
|
+
- **Timeout / connection refused** → gateway URL unreachable; confirm host/port and local firewall.
|
|
242
|
+
- **Command gateway disabled** → set both `OMX_OPENCLAW=1` and `OMX_OPENCLAW_COMMAND=1`.
|
|
251
243
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
244
|
+
## Step 9: Final Summary
|
|
245
|
+
|
|
246
|
+
Show:
|
|
247
|
+
- gateway mode + gateway name
|
|
248
|
+
- mapped events
|
|
249
|
+
- whether smoke test passed
|
|
250
|
+
- whether `/hooks/agent` delivery test passed
|
|
251
|
+
- exact env vars user still needs to export in shell profile
|
|
255
252
|
|
|
256
253
|
## Environment Variable Reference
|
|
257
254
|
|
|
@@ -259,9 +256,9 @@ To configure other platforms: /configure-notifications
|
|
|
259
256
|
# Required for all OpenClaw gateways
|
|
260
257
|
export OMX_OPENCLAW=1
|
|
261
258
|
|
|
262
|
-
# Required additionally for CLI
|
|
259
|
+
# Required additionally for CLI command gateways
|
|
263
260
|
export OMX_OPENCLAW_COMMAND=1
|
|
264
261
|
|
|
265
|
-
#
|
|
266
|
-
export
|
|
262
|
+
# Optional debug logs
|
|
263
|
+
export OMX_OPENCLAW_DEBUG=1
|
|
267
264
|
```
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-interview
|
|
3
|
+
description: Socratic deep interview with mathematical ambiguity gating before execution
|
|
4
|
+
argument-hint: "<idea or vague description>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<Purpose>
|
|
8
|
+
Deep Interview implements an Ouroboros-inspired Socratic clarification loop before planning or implementation. It turns vague ideas into explicit specifications by asking targeted questions, scoring ambiguity across weighted dimensions, and gating execution until clarity reaches a configurable threshold.
|
|
9
|
+
</Purpose>
|
|
10
|
+
|
|
11
|
+
<Use_When>
|
|
12
|
+
- The request is broad, ambiguous, or missing concrete acceptance criteria
|
|
13
|
+
- The user says "deep interview", "interview me", "ask me everything", "don't assume", or "ouroboros"
|
|
14
|
+
- The user wants to avoid misaligned implementation from underspecified requirements
|
|
15
|
+
- You need a requirements artifact before handing off to `ralplan`, `autopilot`, `ralph`, or `team`
|
|
16
|
+
</Use_When>
|
|
17
|
+
|
|
18
|
+
<Do_Not_Use_When>
|
|
19
|
+
- The request already has concrete file/symbol targets and clear acceptance criteria
|
|
20
|
+
- The user explicitly asks to skip planning/interview and execute immediately
|
|
21
|
+
- The user asks for lightweight brainstorming only (use `plan` instead)
|
|
22
|
+
- A complete PRD/plan already exists and execution should start
|
|
23
|
+
</Do_Not_Use_When>
|
|
24
|
+
|
|
25
|
+
<Why_This_Exists>
|
|
26
|
+
Execution quality is usually bottlenecked by requirement clarity. A single expansion pass often misses hidden assumptions. This workflow applies Socratic pressure + quantitative ambiguity scoring so orchestration modes begin with an explicit, testable spec.
|
|
27
|
+
|
|
28
|
+
Inspired by Ouroboros (https://github.com/Q00/ouroboros) and adapted for OMX conventions.
|
|
29
|
+
</Why_This_Exists>
|
|
30
|
+
|
|
31
|
+
<Depth_Profiles>
|
|
32
|
+
- **Quick (`--quick`)**: fast pre-PRD pass; target threshold `<= 0.30`; max rounds 5
|
|
33
|
+
- **Standard (`--standard`, default)**: full requirement interview; target threshold `<= 0.20`; max rounds 12
|
|
34
|
+
- **Deep (`--deep`)**: high-rigor exploration; target threshold `<= 0.15`; max rounds 20
|
|
35
|
+
|
|
36
|
+
If no flag is provided, use **Standard**.
|
|
37
|
+
</Depth_Profiles>
|
|
38
|
+
|
|
39
|
+
<Execution_Policy>
|
|
40
|
+
- Ask ONE question per round (never batch)
|
|
41
|
+
- Target the weakest clarity dimension each round
|
|
42
|
+
- Gather codebase facts via `explore` before asking user about internals
|
|
43
|
+
- Always run a preflight context intake before the first interview question
|
|
44
|
+
- In Codex CLI, prefer `request_user_input` when available; if unavailable, fall back to concise plain-text one-question turns
|
|
45
|
+
- Re-score ambiguity after each answer and show progress transparently
|
|
46
|
+
- Do not hand off to execution while ambiguity remains above threshold unless user explicitly opts to proceed with warning
|
|
47
|
+
- Persist mode state for resume safety (`state_write` / `state_read`)
|
|
48
|
+
</Execution_Policy>
|
|
49
|
+
|
|
50
|
+
<Steps>
|
|
51
|
+
|
|
52
|
+
## Phase 0: Preflight Context Intake
|
|
53
|
+
|
|
54
|
+
1. Parse `{{ARGUMENTS}}` and derive a short task slug.
|
|
55
|
+
2. Attempt to load the latest relevant context snapshot from `.omx/context/{slug}-*.md`.
|
|
56
|
+
3. If no snapshot exists, create a minimum context snapshot with:
|
|
57
|
+
- Task statement
|
|
58
|
+
- Desired outcome
|
|
59
|
+
- Known facts/evidence
|
|
60
|
+
- Constraints
|
|
61
|
+
- Unknowns/open questions
|
|
62
|
+
- Likely codebase touchpoints
|
|
63
|
+
4. Save snapshot to `.omx/context/{slug}-{timestamp}.md` (UTC `YYYYMMDDTHHMMSSZ`) and reference it in mode state.
|
|
64
|
+
|
|
65
|
+
## Phase 1: Initialize
|
|
66
|
+
|
|
67
|
+
1. Parse `{{ARGUMENTS}}` and depth profile (`--quick|--standard|--deep`).
|
|
68
|
+
2. Detect project context:
|
|
69
|
+
- Run `explore` to classify **brownfield** (existing codebase target) vs **greenfield**.
|
|
70
|
+
- For brownfield, collect relevant codebase context before questioning.
|
|
71
|
+
3. Initialize state via `state_write(mode="deep-interview")`:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"active": true,
|
|
76
|
+
"current_phase": "deep-interview",
|
|
77
|
+
"state": {
|
|
78
|
+
"interview_id": "<uuid>",
|
|
79
|
+
"profile": "quick|standard|deep",
|
|
80
|
+
"type": "greenfield|brownfield",
|
|
81
|
+
"initial_idea": "<user input>",
|
|
82
|
+
"rounds": [],
|
|
83
|
+
"current_ambiguity": 1.0,
|
|
84
|
+
"threshold": 0.3,
|
|
85
|
+
"max_rounds": 5,
|
|
86
|
+
"challenge_modes_used": [],
|
|
87
|
+
"codebase_context": null,
|
|
88
|
+
"context_snapshot_path": ".omx/context/<slug>-<timestamp>.md"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
4. Announce kickoff with profile, threshold, and current ambiguity.
|
|
94
|
+
|
|
95
|
+
## Phase 2: Socratic Interview Loop
|
|
96
|
+
|
|
97
|
+
Repeat until ambiguity `<= threshold`, user exits with warning, or max rounds reached.
|
|
98
|
+
|
|
99
|
+
### 2a) Generate next question
|
|
100
|
+
Use:
|
|
101
|
+
- Original idea
|
|
102
|
+
- Prior Q&A rounds
|
|
103
|
+
- Current dimension scores
|
|
104
|
+
- Brownfield context (if any)
|
|
105
|
+
- Activated challenge mode injection (Phase 3)
|
|
106
|
+
|
|
107
|
+
Target the lowest-scoring dimension:
|
|
108
|
+
- Goal Clarity
|
|
109
|
+
- Constraint Clarity
|
|
110
|
+
- Success Criteria Clarity
|
|
111
|
+
- Context Clarity (brownfield only)
|
|
112
|
+
|
|
113
|
+
### 2b) Ask the question
|
|
114
|
+
Use structured user-input tooling available in the runtime (`AskUserQuestion` / equivalent) and present:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Round {n} | Target: {weakest_dimension} | Ambiguity: {score}%
|
|
118
|
+
|
|
119
|
+
{question}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 2c) Score ambiguity
|
|
123
|
+
Score each dimension in `[0.0, 1.0]` with justification + gap.
|
|
124
|
+
|
|
125
|
+
Greenfield: `ambiguity = 1 - (goal × 0.40 + constraints × 0.30 + criteria × 0.30)`
|
|
126
|
+
|
|
127
|
+
Brownfield: `ambiguity = 1 - (goal × 0.35 + constraints × 0.25 + criteria × 0.25 + context × 0.15)`
|
|
128
|
+
|
|
129
|
+
### 2d) Report progress
|
|
130
|
+
Show weighted breakdown table and next focus dimension.
|
|
131
|
+
|
|
132
|
+
### 2e) Persist state
|
|
133
|
+
Append round result and updated scores via `state_write`.
|
|
134
|
+
|
|
135
|
+
### 2f) Round controls
|
|
136
|
+
- Round 3+: allow explicit early exit with risk warning
|
|
137
|
+
- Soft warning at profile midpoint (e.g., round 3/6/10 depending on profile)
|
|
138
|
+
- Hard cap at profile `max_rounds`
|
|
139
|
+
|
|
140
|
+
## Phase 3: Challenge Modes (assumption stress tests)
|
|
141
|
+
|
|
142
|
+
Use each mode once when applicable:
|
|
143
|
+
|
|
144
|
+
- **Contrarian** (round 4+): challenge core assumptions
|
|
145
|
+
- **Simplifier** (round 6+): probe minimal viable scope
|
|
146
|
+
- **Ontologist** (round 8+ and ambiguity > 0.30): ask for essence-level reframing
|
|
147
|
+
|
|
148
|
+
Track used modes in state to prevent repetition.
|
|
149
|
+
|
|
150
|
+
## Phase 4: Crystallize Artifacts
|
|
151
|
+
|
|
152
|
+
When threshold is met (or user exits with warning / hard cap):
|
|
153
|
+
|
|
154
|
+
1. Write interview transcript summary to:
|
|
155
|
+
- `.omx/interviews/{slug}-{timestamp}.md`
|
|
156
|
+
(kept for ralph PRD compatibility)
|
|
157
|
+
2. Write execution-ready spec to:
|
|
158
|
+
- `.omx/specs/deep-interview-{slug}.md`
|
|
159
|
+
|
|
160
|
+
Spec should include:
|
|
161
|
+
- Metadata (profile, rounds, final ambiguity, threshold, context type)
|
|
162
|
+
- Context snapshot reference/path (for ralplan/team reuse)
|
|
163
|
+
- Clarity breakdown table
|
|
164
|
+
- Goal / Constraints / Non-goals
|
|
165
|
+
- Testable acceptance criteria
|
|
166
|
+
- Assumptions exposed + resolutions
|
|
167
|
+
- Technical context findings
|
|
168
|
+
- Full or condensed transcript
|
|
169
|
+
|
|
170
|
+
## Phase 5: Execution Bridge
|
|
171
|
+
|
|
172
|
+
Present execution options after artifact generation:
|
|
173
|
+
|
|
174
|
+
1. **`$ralplan` (Recommended)**
|
|
175
|
+
- Run consensus refinement on the spec:
|
|
176
|
+
- `$plan --consensus --direct <spec-path>`
|
|
177
|
+
2. **`$autopilot`**
|
|
178
|
+
- Use spec as high-clarity execution input
|
|
179
|
+
3. **`$ralph`**
|
|
180
|
+
- Sequential persistence loop using spec/criteria
|
|
181
|
+
4. **`$team`**
|
|
182
|
+
- Parallel coordinated execution using shared spec
|
|
183
|
+
5. **Refine further**
|
|
184
|
+
- Continue interview loop for lower ambiguity
|
|
185
|
+
|
|
186
|
+
**IMPORTANT:** Deep-interview is a requirements mode. On handoff, invoke the selected skill. **Do NOT implement directly** inside deep-interview.
|
|
187
|
+
|
|
188
|
+
</Steps>
|
|
189
|
+
|
|
190
|
+
<Tool_Usage>
|
|
191
|
+
- Use `explore` for codebase fact gathering
|
|
192
|
+
- Use `request_user_input` / structured user-input tool for each interview round when available
|
|
193
|
+
- If structured question tools are unavailable, use plain-text single-question rounds and keep the same stage order
|
|
194
|
+
- Use `state_write` / `state_read` for resumable mode state
|
|
195
|
+
- Read/write context snapshots under `.omx/context/`
|
|
196
|
+
- Save transcript/spec artifacts under `.omx/interviews/` and `.omx/specs/`
|
|
197
|
+
</Tool_Usage>
|
|
198
|
+
|
|
199
|
+
<Escalation_And_Stop_Conditions>
|
|
200
|
+
- User says stop/cancel/abort -> persist state and stop
|
|
201
|
+
- Ambiguity stalls for 3 rounds (+/- 0.05) -> force Ontologist mode once
|
|
202
|
+
- Max rounds reached -> proceed with explicit residual-risk warning
|
|
203
|
+
- All dimensions >= 0.9 -> allow early crystallization even before max rounds
|
|
204
|
+
</Escalation_And_Stop_Conditions>
|
|
205
|
+
|
|
206
|
+
<Final_Checklist>
|
|
207
|
+
- [ ] Preflight context snapshot exists under `.omx/context/{slug}-{timestamp}.md`
|
|
208
|
+
- [ ] Ambiguity score shown each round
|
|
209
|
+
- [ ] Weakest-dimension targeting used
|
|
210
|
+
- [ ] Challenge modes triggered at thresholds (when applicable)
|
|
211
|
+
- [ ] Transcript written to `.omx/interviews/{slug}-{timestamp}.md`
|
|
212
|
+
- [ ] Spec written to `.omx/specs/deep-interview-{slug}.md`
|
|
213
|
+
- [ ] Handoff options provided (`$ralplan`, `$autopilot`, `$ralph`, `$team`)
|
|
214
|
+
- [ ] No direct implementation performed in this mode
|
|
215
|
+
</Final_Checklist>
|
|
216
|
+
|
|
217
|
+
<Advanced>
|
|
218
|
+
## Suggested Config (optional)
|
|
219
|
+
|
|
220
|
+
```toml
|
|
221
|
+
[omx.deepInterview]
|
|
222
|
+
defaultProfile = "standard"
|
|
223
|
+
quickThreshold = 0.30
|
|
224
|
+
standardThreshold = 0.20
|
|
225
|
+
deepThreshold = 0.15
|
|
226
|
+
quickMaxRounds = 5
|
|
227
|
+
standardMaxRounds = 12
|
|
228
|
+
deepMaxRounds = 20
|
|
229
|
+
enableChallengeModes = true
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Resume
|
|
233
|
+
|
|
234
|
+
If interrupted, rerun `$deep-interview`. Resume from persisted mode state via `state_read(mode="deep-interview")`.
|
|
235
|
+
|
|
236
|
+
## Recommended 3-Stage Pipeline
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
deep-interview -> ralplan -> autopilot
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
- Stage 1 (deep-interview): clarity gate
|
|
243
|
+
- Stage 2 (ralplan): feasibility + architecture gate
|
|
244
|
+
- Stage 3 (autopilot): execution + QA + validation gate
|
|
245
|
+
</Advanced>
|
|
246
|
+
|
|
247
|
+
Task: {{ARGUMENTS}}
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -152,7 +152,7 @@ rm -f ~/.codex/hooks/stop-continuation.sh
|
|
|
152
152
|
|
|
153
153
|
### Fix: Outdated Plugin
|
|
154
154
|
```bash
|
|
155
|
-
rm -rf ~/.codex/plugins/cache/oh-my-codex
|
|
155
|
+
rm -rf ~/.codex/plugins/cache/omc/oh-my-codex
|
|
156
156
|
echo "Plugin cache cleared. Restart Codex CLI to fetch latest version."
|
|
157
157
|
```
|
|
158
158
|
|