/ralph-plan — Generate or Refine the PRD
Usage
/ralph-plan [description]
Description
Analyzes the current codebase and generates or refines PRD.md tasks. Use this to break down a feature request into right-sized tasks for the ralph loop.
Instructions
- •
Read the current PRD.md, CLAUDE.md, and AGENTS.md.
- •
If a description argument is provided, generate new PRD tasks for that feature. If no argument, analyze the existing PRD for task sizing issues.
- •
For each task, ensure:
- •It can be completed in one context window (~one ralph iteration)
- •It has clear acceptance criteria
- •It lists expected files to touch
- •It follows the dependency order (foundational tasks first)
- •It touches no more than 5 files
- •
If tasks are too large, split them. If tasks are too small, consolidate them.
- •
Present the proposed PRD changes to the user for approval before writing.
- •
After approval, update PRD.md with the new/refined tasks.
Task Sizing Guide
| Too small | Right-sized | Too large |
|---|---|---|
| Add one import | Implement one function with tests | Build entire feature end-to-end |
| Fix a typo | Add one API endpoint | Refactor whole module |
| Rename one variable | Create one component | Multi-file integration |
Model
sonnet