Skip to content

Autonomous Mode

Ralph loops over ready work until the spec ships, blocks, or hits the iteration cap.

Terminal window
scripts/ralph/ralph.sh
scripts/ralph/ralph.sh --watch
scripts/ralph/ralph.sh --watch verbose

Configure in scripts/ralph/config.env:

Terminal window
REQUIRE_PLAN_REVIEW=1
PLAN_REVIEW=codex
WORK_REVIEW=codex

Supported review backends include RepoPrompt, Codex, Copilot, and none. Production Ralph runs should use a real review backend.

Ralph should not invent new scope. Each loop must:

  1. Re-read the spec and ready task.
  2. Check current git state.
  3. Execute only the ready work.
  4. Run configured review.
  5. Record receipt state.
  6. Stop on blocker, missing requirement, or unsafe ambiguity.
flowchart LR
  Ready["Ready task"] --> Execute["Fresh execution"]
  Execute --> Review["Review backend"]
  Review --> Receipt["Receipt"]
  Receipt -->|pass| Continue["Continue"]
  Receipt -->|block| Human["Human handover"]

In teams, Ralph should run after product and technical ownership have already happened:

Terminal window
/flow-next:interview fn-1 --scope=business
/flow-next:interview fn-1 --scope=technical
/flow-next:plan-review fn-1
scripts/ralph/ralph_once.sh

Do not use Ralph as a substitute for product clarification. It is an execution loop, not a product owner.

Terminal window
scripts/ralph/ralph.sh --watch
scripts/ralph/ralph.sh --watch verbose

Use watch mode when you want to keep the Ralph terminal visible during a long run. It shows the current task, review state, receipts, and stop reason without requiring a separate global TUI install.

  • Review verdict is not shippable.
  • Required command or tool is unavailable.
  • The ready task requires a decision outside the spec.
  • Git state is unexpectedly dirty.
  • Evidence cannot be produced.
  • Iteration cap is reached.

A clean stop is success. It preserves the handover so a human can decide the next step.