# Ralph

Self-referential loop until task completion with configurable verification reviewer

- Repository: https://github.com/Yeachan-Heo/oh-my-claudecode (40492 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Yeachan-Heo/oh-my-claudecode --skill ralph -g -a claude-code -y`
Codex: `npx skills add Yeachan-Heo/oh-my-claudecode --skill ralph -g -a codex -y`
Cursor: `npx skills add Yeachan-Heo/oh-my-claudecode --skill ralph -g -a cursor -y`
Gemini CLI: `npx skills add Yeachan-Heo/oh-my-claudecode --skill ralph -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Yeachan-Heo/oh-my-claudecode`

## Description

Self-referential loop until task completion with configurable verification reviewer

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

[RALPH - ITERATION {{ITERATION}}/{{MAX}}]

Your previous attempt did not output the completion promise. Continue working on the task.

<Purpose>
Ralph is a PRD-driven persistence loop that keeps working on a task until ALL user stories in prd.json have passes: true and are reviewer-verified. It combines session persistence, automatic retry on failure, structured story tracking, and mandatory verification before completion.
</Purpose>
<Precondition_Feedback_Gate>
NON-NEGOTIABLE, runs before any story work and at every verification gate:

1. FIRST ITERATION, before picking a story: run `omc ralph verify --write-baseline --session <sessionId>` (session id: read OMC_SESSION_ID if set, `omc ralph afk` exports it, else the one in the Ralph continuation context / active PRD path; use the SAME id for every call in this run). This records the feedback baseline. If the command is unavailable or denied, STOP and report the failure, do not fall back to hand-rolled judgment.
2. EVERY verification gate (story verification, post-deslop re-verification): run `omc ralph verify --session <sessionId>` and obey the exit code, 0 = pass (baseline-only failures are recorded warnings, never a story failure), 1 = new failures to fix.
3. NEVER hand-roll the feedback diff (running the suite yourself and eyeballing the output is exactly the failure mode this gate exists to prevent).
</Precondition_Feedback_Gate>


<Use_When>

- Task requires guaranteed completion with verification (not just "do your best")
- User says "ralph", "don't stop", "must complete", "finish this", or "keep going until done"
- Work may span multiple iterations and needs persistence across retries
- Task benefits from structured PRD-driven execution with reviewer sign-off
  </Use_When>

<Do_Not_Use_When>

The rest: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/HEAD/skills/ralph/SKILL.md
