The Ralph Workflow
An autonomous coding agent that solves the AI context window problem through external memory and atomic task execution.
The Solution: External Memory
AGENTS.md
Project-wide context document that any AI can read to understand:
- • Tech stack and conventions
- • File structure patterns
- • Code style guidelines
- • Security requirements
- • Testing standards
progress.txt
Iteration history that tracks:
- • Completed tasks
- • Current iteration number
- • Blockers encountered
- • Decisions made
- • Files modified
How Ralph Works
Read Context
Ralph reads AGENTS.md and progress.txt to understand the project and what's been done
Pick One Task
Selects the next uncompleted task from PRD.md (sized for ~10 minutes of work)
Execute Task
Implements the task following project patterns in AGENTS.md
Update Progress
Marks task complete in progress.txt with notes on what was done
Loop or Exit
Either continues to next task or exits for human review
Atomic Task Design
Each task in PRD.md must be atomic—completable in ~10 minutes without dependencies:
❌ Bad Task
"Build the user dashboard with charts, settings, and profile management"
✓ Good Tasks
• Create dashboard layout component
• Add revenue chart molecule
• Build settings form organism
• Implement profile avatar upload
Running Ralph
Unix/Mac (Bash)
chmod +x ralph.sh
./ralph.shWindows (PowerShell)
.\ralph.ps1Key Benefits
Persistent Memory
Context survives across sessions via external files
Consistent Output
Atomic tasks produce complete, tested code every time
Pattern Adherence
AGENTS.md ensures uniform code style across iterations