Execute Ralph Task
Execute the next incomplete task from the Ralph PRD and update progress.
When to Use
- •When asked to "execute the next task", "run ralph", or "complete a user story"
- •To autonomously implement one task from the service architecture refactor
- •To maintain continuity across Ralph iterations
Instructions
- •
Read the Current PRD:
- •Open
ralph/prd.json - •Find the user story with the highest priority where
passes: false - •Note the story ID, title, and acceptance criteria
- •Open
- •
Read Progress Context:
- •Open
ralph/progress.txt - •Review the "Codebase Patterns" section (top of file)
- •Review recent task implementations to understand patterns and learnings
- •Open
- •
Checkout Branch:
- •Read
branchNamefromprd.json - •Ensure you're on the correct branch:
git checkout <branchName> - •Create branch from main if it doesn't exist:
git checkout -b <branchName>
- •Read
- •
Implement the Task:
- •Follow the acceptance criteria precisely
- •Match existing code patterns in the codebase
- •Write clean, focused code (avoid over-engineering)
- •Keep changes minimal and related
- •
Quality Checks:
- •Run
npm run check(formatting, linting, type-checking) - •If fails, run
npm run fixto auto-resolve issues - •Run
npm run buildto verify all workspaces build - •Run
npm run testif tests exist for this area
- •Run
- •
Update PRD:
- •Open
ralph/prd.json - •Set
passes: truefor the completed story - •Save the file
- •Document in Progress Log:
- •Append to
ralph/progress.txt(never replace) - •Format:
- •Commit Changes:
- •Load the
commit-changeskill - •Follow the commit message format from INSTRUCTIONS.md
- •Use message format:
feat: [Story Title]
- •Load the
code
## [Date/Time] - [Story ID] - What was implemented - Files changed - Quality checks passed - **Learnings for future iterations:** - Patterns discovered - Gotchas encountered - Useful context ---
Important Notes
- •One task per iteration: Never implement multiple user stories at once
- •Check acceptance criteria: Task is NOT done until ALL criteria pass
- •Frontend stories: For UI changes, use dev-browser skill to verify in browser
- •Error handling: Services should throw errors, not swallow them
- •No debugging output in code: Remove console logs before committing
- •Follow existing patterns: Match code style and architecture decisions
Stop Condition
When the current task is complete:
Output: <promise>COMPLETE</promise>
NEVER DO MORE THAN ONE TASK AT A TIME