Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codex/skills/ralph-loop-governor/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Use the roadmap directory for active run artifacts: the executor prompt, status,

If the user's Claude Code exposes the plugin command as `/ralph-loop`, tell them to use that command name with the same prompt and flags.

Optional Hermes path: when Hermes is available and the user wants unattended TUI unblocking, configure `scripts/ralph-loop-hermes-bridge.py` with the Claude settings and Codex notify fragments in `assets/`. The bridge must be optional: missing Hermes or a missing webhook URL is a successful no-op, and the manual copy/paste flow still works. Hermes is a passive unblocker, not a second active coding governor: it should answer blocking TUI prompts, retry after usage/rate limits, or handle max-iteration/restart handoffs with the minimum safe action needed to keep Codex/Ralph running, then return control to the normal governor/executor loop.

6. If restarting Ralph to consume corrections, use a quoted prompt:

```text
Expand All @@ -77,6 +79,7 @@ If the user's Claude Code exposes the plugin command as `/ralph-loop`, tell them

## Monitoring Workflow

- If the optional Hermes bridge is configured, treat Hermes as a passive TUI unblocker between the executor and governor, not as a second active coding governor. It may alert on early stops, blocked language, permission requests, tool failures, usage/rate limits, max-iteration stops, or `COMANDO_RALPH:` handoffs. It may answer a blocking prompt, retry/continue after an appropriate wait, or hand restart state to Codex. It must not proactively review or correct code, choose the next implementation slice merely because a commit landed, replace final gatekeeping, close corrections without evidence, or accept `RALPH_DONE`.
- Write the monitor outside the target repo unless the user asks otherwise, for example `~/workspace/<repo>-<feature>-ralph-loop-monitor.md`.
- When the user reports "Ralph started", "Loop started", or equivalent, enter the active monitor loop immediately. Do not only record the start.
- Use a 5-minute interval by default unless the user requested a different interval. The interval is a real idle wait: stop monitoring work, run no intermediate checks, send no progress updates, and do no parallel review or implementation work until the wait expires.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python3 .codex/skills/ralph-loop-governor/scripts/ralph-loop-hermes-bridge.py --source claude-code --event Notification --project <feature> --session <tmux-session-or-pane> --status-file docs/roadmap/<feature>/status.md --correction-queue docs/roadmap/<feature>/correction-queue.md --gates-file docs/roadmap/<feature>/gates.md"
}
]
}
],
"PermissionRequest": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python3 .codex/skills/ralph-loop-governor/scripts/ralph-loop-hermes-bridge.py --source claude-code --event PermissionRequest --project <feature> --session <tmux-session-or-pane> --status-file docs/roadmap/<feature>/status.md --correction-queue docs/roadmap/<feature>/correction-queue.md --gates-file docs/roadmap/<feature>/gates.md"
}
]
}
],
"PostToolUseFailure": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python3 .codex/skills/ralph-loop-governor/scripts/ralph-loop-hermes-bridge.py --source claude-code --event PostToolUseFailure --project <feature> --session <tmux-session-or-pane> --status-file docs/roadmap/<feature>/status.md --correction-queue docs/roadmap/<feature>/correction-queue.md --gates-file docs/roadmap/<feature>/gates.md"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python3 .codex/skills/ralph-loop-governor/scripts/ralph-loop-hermes-bridge.py --source claude-code --event Stop --project <feature> --session <tmux-session-or-pane> --status-file docs/roadmap/<feature>/status.md --correction-queue docs/roadmap/<feature>/correction-queue.md --gates-file docs/roadmap/<feature>/gates.md"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Optional Codex-side notification hook for Ralph Loop governor runs.
# Merge this into the Codex config used for the run, then replace placeholders.
# If RALPH_HERMES_WEBHOOK_URL and .ralph-loop/hermes-webhook-url are absent,
# the bridge exits 0 and the manual workflow is unchanged.

notify = [
"python3",
".codex/skills/ralph-loop-governor/scripts/ralph-loop-hermes-bridge.py",
"--source", "codex",
"--event", "agent-turn-complete",
"--project", "<feature>",
"--session", "<codex-session-or-pane>",
"--status-file", "docs/roadmap/<feature>/status.md",
"--correction-queue", "docs/roadmap/<feature>/correction-queue.md",
"--gates-file", "docs/roadmap/<feature>/gates.md",
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ You are implementing `<feature name>` in this repository.

Codex is acting as architect and gatekeeper. It may update correction and gate files while you work. Treat those files as blocking input.

If the optional Hermes negotiator bridge is configured, Claude/Codex hooks may notify Hermes when you stop early, ask a question, hit a permission/tool failure, or appear blocked. Hermes is allowed to help translate between executor instructions and governor decisions, but it is not the final Done judge.

Codex will actively review your code with focused subagents and steer this run through `correction-queue.md`, `gates.md`, and updates to this prompt. Those review findings are part of the implementation contract, not optional advice. Expect Codex to reject `RALPH_DONE` if subagent findings remain open.

## Read First
Expand Down
Loading