Codex-native adaptation of Ralph, originally created by Ryan Carson / Snark Tank in snarktank/ralph.
This repo keeps the two reusable skills:
skills/prd: generate a markdown PRDskills/ralph: convert a PRD intoprd.json
It also includes a Codex-focused loop:
ralph.sh: repeatedly runscodex execagainst the current repoCODEX.md: the base prompt used for each iteration
- The runner is Codex-first and defaults to
codex - Each iteration is executed from the actual git project root
- The script generates a per-iteration prompt with absolute paths for
prd.jsonandprogress.txt - Completion detection is based on Codex's final message, not the full CLI transcript
- The loop stops early if an iteration produces no durable update to
prd.jsonorprogress.txt
- Codex CLI installed and authenticated
jqinstalled- A git repository for the project you want Ralph to work on
Copy the skill folders into your Codex skills directory:
mkdir -p ~/.codex/skills
cp -R skills/prd ~/.codex/skills/
cp -R skills/ralph ~/.codex/skills/Restart Codex after installing new skills.
Create a PRD:
Load the prd skill and create a PRD for [feature]
Convert the PRD into prd.json:
Load the ralph skill and convert tasks/prd-[feature-name].md to prd.json
From the target project root:
./ralph.sh 10or explicitly:
./ralph.sh --tool codex 10The loop will:
- Read
prd.json - Pick the next unfinished story by priority
- Ask Codex to complete one story
- Require progress to be appended to
progress.txt - Mark the story complete in
prd.json - Repeat until all stories pass or the iteration limit is reached
CODEX.md: base Codex instructions for each iterationralph.sh: Codex runnerprd.json.example: sample task fileskills/prd/SKILL.md: PRD generation skillskills/ralph/SKILL.md: PRD-to-JSON conversion skill
This project is an adaptation of Ralph by Ryan Carson / Snark Tank.
- Original repository:
snarktank/ralph - Original pattern write-up referenced by that repo: Geoffrey Huntley's Ralph pattern
This repo keeps the core workflow idea and adapts the loop, prompt, and skills for Codex CLI.