{ "id": "US-001", "title": "Add status field to tasks table", "passes": true}{ "id": "US-002", "title": "Display status badge on task cards", "passes": true}{ "id": "US-003", "title": "Add status toggle to task list rows", "passes": false}
passes: true means the story is complete. Ralph picks the highest priority story where passes: false.
# View full progress logcat scripts/ralph/progress.txt# View just the last 50 linestail -50 scripts/ralph/progress.txt# Search for a specific storycat scripts/ralph/progress.txt | grep -A10 "US-003"
# Last 10 commitsgit log --oneline -10# Commits from Ralph feature branchgit log main..ralph/task-status --oneline# See what changed in the last commitgit show HEAD
Look for repeated error messages or failed quality checks.
2
Check if story is too large
The story might be too big for one context window. Check if Ralph is getting close but running out of context.Solution: Split the story into smaller pieces in prd.json.
3
Check acceptance criteria
Are the criteria verifiable? Vague criteria cause confusion.❌ Bad: “Make it work correctly”✅ Good: “Status dropdown shows three options: Pending, In Progress, Done”
4
Check quality commands
Verify your project’s quality checks actually work:
npm run typechecknpm run lintnpm test
If they fail, Ralph can’t pass them either.
Ralph is not finding the prd.json file
Symptoms: Error about missing prd.jsonSolution:
# Check if prd.json existsls scripts/ralph/prd.json# If missing, create one from your PRD:# Load the ralph skill and convert tasks/prd-feature.md to prd.json# Or manually create in the correct locationcat scripts/ralph/prd.json
The prd.json file must be in the same directory as ralph.sh and prompt.md/CLAUDE.md.
Quality checks are passing but Ralph says they failed
Symptoms: You can run npm run typecheck successfully, but Ralph reports failuresDebugging:
1
Check exit codes
Ralph checks exit codes. Make sure your commands exit with code 0 on success:
npm run typecheckecho $? # Should be 0
2
Check command output
Some commands output warnings that Ralph might interpret as failures.Add --quiet flags or redirect stderr if needed:
npm run typecheck 2>/dev/null
3
Test commands in isolation
Run each quality check command manually to see what Ralph sees:
cd your-projectnpm run typechecknpm run lintnpm test -- --passWithNoTests
Ralph committed broken code
Symptoms: CI is failing, or you manually found bugsThis is serious. Broken code compounds across iterations.Solution:
1
Stop Ralph immediately
Press Ctrl+C to stop the loop
2
Fix the broken commit manually
# Check out the branchgit checkout ralph/your-feature# Fix the issue# ...# Commit the fixgit add .git commit -m "fix: correct issue from US-003"
3
Update progress.txt
Add a manual entry explaining what was fixed:
## 2026-03-11 15:00 - Manual Fix- Fixed bug in US-003 where status dropdown was not updating- Issue: Missing revalidatePath() call- **Learning**: Always call revalidatePath() after mutations---
4
Improve quality checks
Update your prompt.md/CLAUDE.md to catch this type of error:
## Common Gotchas- After mutations, always call revalidatePath("/path")
5
Resume Ralph
./scripts/ralph/ralph.sh
Prevention: Make sure your quality checks actually catch errors. Add tests, linting rules, and type checks.
Ralph is not updating AGENTS.md files
Symptoms: progress.txt shows learnings but AGENTS.md files are not being updatedDebugging:
1
Check if AGENTS.md files exist
find . -name "AGENTS.md" -type f
Ralph only updates existing files. Create them if needed:
echo "# Agent Instructions" > src/app/AGENTS.md
2
Check your prompt template
Ensure prompt.md (for Amp) or CLAUDE.md (for Claude Code) includes instructions to update these files.See Customizing Prompts for details.
3
Check if learnings are generic enough
Ralph should only add reusable patterns, not story-specific details.✅ Good: “Use revalidatePath() after mutations”❌ Too specific: “Added a blue badge to the task card”
Browser verification is failing
Symptoms: Stories with “Verify in browser” are not completingSolution: See Browser Verification for detailed debugging steps.Quick checks:
# Is dev server running?lsof -i :3000# Can you access it?curl http://localhost:3000# Is dev-browser skill installed?ls ~/.config/amp/skills/ | grep browser
When Ralph runs, you’ll see output from both the bash loop and the AI tool:
=============================================================== Ralph Iteration 3 of 10 (amp)===============================================================[Amp output begins here...]Reading prd.json...Picking story US-003: Add status toggle to task list rowsImplementing changes...Running typecheck... ✓Committing changes...Updating prd.json...Appending to progress.txt...[Amp output ends]Iteration 3 complete. Continuing...
If you see Ralph repeating the same story across multiple iterations, check progress.txt for what’s blocking it.