#!/bin/bash set -euo pipefail #…

Community ralph loop for review, sourced from github. Verified exit condition, evaluator-gated.

prompt
→ Claude
#!/bin/bash set -euo pipefail # ────────────────────────────────────────────────────────────────────── # ralph.sh — autonomous implementation loop # # Three-role architecture: # Planner (Opus) : decomposes plan into task slices # Executor (Sonnet): implements the current task slice # Reviewer (Opus) : periodic outside-eye review, catches drift # # The reviewer is called in two places, both periodic: # - mid-task (inside the executor's inner loop), to catch executor drift # within a single task slice # - outer-cycle (between planner cycles), to catch planner drift # across a window of planner cycles # # Usage: # ./ralph.sh <implementation plan.md> # ./ralph.sh <implementation plan.md> --sonnet-only # flat loop, no reviewer # ./ralph.sh <implementation plan.md> --resume # resume from last checkpoint # # Environment variables: # RALPH DIR — directory containing prompt files (default: script dir) # PLANNER MODEL — model for the planner (default: opus) # SONNET MODEL — model for execution (default: sonnet) # OPUS MODEL — model for the reviewer (default: opus) # MAX INNER — max Sonnet iterations per task
claude-code

Source: hila-shemer

More review loops

Check codex-watch PRs

/loopnew

Run every 15 minutes to find and display all open pull requests labeled codex-watch.

prompt
→ Claude
/loop 15m check every open PR labeled codex-watch
reviewlow risk

Audit code diffs, ship clean

/goalnew

Run code review on each step's diff, stop when zero findings or after 3 rounds.

prompt
→ Claude
/goal /codex review reports zero real-or-regression findings on every step's diff (the verdict pasted in full each round); or stop after 3 rounds, reporting anything unresolved
reviewlow risk

The nested perfect loop

/loopnew

A loop wrapping a goal wrapping a review: every 30 minutes, drive all PR review comments to resolved via /review, 10 turns max per pass.

prompt
→ Claude
/loop 30m /goal all PR review comments resolved via /review, stop after 10 turns
reviewhigh risk