en un clic
ralph
// Autonomous agent loop for completing features. Use when asked to 'use ralph', 'ralph this', or to autonomously implement a feature end-to-end. Creates prd.json with user stories, then executes them one by one until complete.
// Autonomous agent loop for completing features. Use when asked to 'use ralph', 'ralph this', or to autonomously implement a feature end-to-end. Creates prd.json with user stories, then executes them one by one until complete.
| name | ralph |
| description | Autonomous agent loop for completing features. Use when asked to 'use ralph', 'ralph this', or to autonomously implement a feature end-to-end. Creates prd.json with user stories, then executes them one by one until complete. |
Ralph is an autonomous loop that implements features by breaking them into small user stories and completing them one at a time. Each iteration is a fresh agent with clean context. Memory persists via git, progress.txt, and prd.json.
# Run ralph in current project (assumes prd.json exists)
~/skills/ralph/scripts/ralph.sh [max_iterations]
Ask clarifying questions if needed:
Generate a prd.json file in the project root:
{
"project": "[Project Name]",
"branchName": "ralph/[feature-name-kebab-case]",
"description": "[Feature description]",
"userStories": [
{
"id": "US-001",
"title": "[Story title]",
"description": "As a [user], I want [feature] so that [benefit]",
"acceptanceCriteria": [
"Criterion 1",
"Criterion 2",
"Typecheck passes"
],
"priority": 1,
"passes": false,
"notes": ""
}
]
}
~/skills/ralph/scripts/ralph.sh [max_iterations]
Default is 10 iterations.
Each story MUST be completable in ONE iteration. If you can't describe it in 2-3 sentences, it's too big.
Right-sized:
Too big (split these):
Good:
status column with default 'pending'"Bad:
Always include:
"Typecheck passes" on every story"Verify in browser using dev-browser skill" on UI storiesUser says: "use ralph to add task priorities"
You create prd.json:
{
"project": "TaskApp",
"branchName": "ralph/task-priority",
"description": "Add priority levels (high/medium/low) to tasks",
"userStories": [
{
"id": "US-001",
"title": "Add priority field to database",
"description": "As a developer, I need to store task priority.",
"acceptanceCriteria": [
"Add priority column: 'high' | 'medium' | 'low' (default 'medium')",
"Migration runs successfully",
"Typecheck passes"
],
"priority": 1,
"passes": false,
"notes": ""
},
{
"id": "US-002",
"title": "Display priority badge on task cards",
"description": "As a user, I want to see priority at a glance.",
"acceptanceCriteria": [
"Colored badge: red=high, yellow=medium, gray=low",
"Visible without hovering",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 2,
"passes": false,
"notes": ""
}
]
}
Then say:
prd.json created with 2 user stories. Run
~/skills/ralph/scripts/ralph.shto start autonomous execution.
Each iteration, a fresh agent:
prd.json and progress.txtpasses: falseprd.json to mark passes: trueprogress.txtLoop continues until all stories pass or max iterations hit.
| File | Purpose |
|---|---|
prd.json | User stories with pass/fail status |
progress.txt | Append-only learnings for future iterations |