/prd - Manage Product Requirements Document
Create, edit, and manage your Ralph Loop PRD (Product Requirements Document).
Usage
Create a New PRD
/prd create
Interactive prompt asks:
- •Project name
- •Stories (one per line, priority-based)
Generates prd.json with your specifications.
View Current PRD
/prd show
Pretty-prints the current prd.json:
- •All stories
- •Status of each
- •Priority order
- •Description
Edit a Story
/prd edit TASK-001
Opens editor for that story. Edit:
- •title
- •description
- •acceptance_criteria
- •files
- •priority
Add a Story
/prd add "Feature Title" "Description" "file1.ts,file2.ts"
Adds new story to prd.json with next available ID.
Remove a Story
/prd remove TASK-001
Removes story from prd.json (confirmation required).
Reset PRD
/prd reset
Creates fresh default PRD:
- •Wipes current prd.json
- •Creates 4 default stories
- •Fresh progress.txt
- •Confirmation required
Validate PRD
/prd validate
Checks prd.json for:
- •Valid JSON
- •Required fields per story
- •No duplicate IDs
- •At least one story
- •Proper status values
Returns errors and warnings.
Convert to JSON
/prd export
Exports prd.json in formatted JSON to stdout. Useful for piping to other tools.
Story Format
Each story should have:
{
"id": "TASK-001",
"title": "User Authentication",
"description": "Implement JWT-based login system",
"priority": 1,
"status": "pending",
"acceptance_criteria": [
"Users can login with email/password",
"JWT tokens are issued",
"Protected routes require token"
],
"files": [
"src/auth.ts",
"tests/auth.test.ts"
]
}
Status Values
- •
pending- Not yet started - •
in_progress- Currently being worked on - •
done- Completed and committed - •
blocked- Unable to complete, needs intervention
Priority
Lower number = higher priority. Ralph processes stories in priority order:
priority: 1 → Runs first priority: 2 → Runs second priority: 10 → Runs last
Best Practices
Story Titles
- •Use active verbs: "Implement X", "Add Y", "Fix Z"
- •Be specific: "Add user registration" not "User stuff"
- •One task per story
Descriptions
- •Explain the "why" and "what"
- •Reference related stories if dependencies exist
- •Mention any constraints or gotchas
Acceptance Criteria
- •Write testable criteria
- •Include edge cases
- •Be specific: "Returns 401 if token expired"
- •3-5 criteria per story
Files
- •List only files that will change
- •Include tests alongside implementation
- •Path from repo root
Integration with start-work
/prd create # Create PRD /start-work # start-work reads your PRD and runs Ralph Loop
Or for quick start with defaults:
/start-work # Auto-creates default PRD if missing
Examples
Create PRD for REST API
/prd create # Prompts: # Project name: REST API Service # Story: 1 GET /users endpoint: Fetch all users # Story: 2 POST /users endpoint: Create new user # Story: 3 Authentication middleware: Protect endpoints # Story: (blank to finish)
Edit acceptance criteria
/prd edit TASK-001 # Editor opens with TASK-001 story # Edit acceptance_criteria array # Save and close
Quick view
/prd show # See all stories, priorities, and status
Check validity
/prd validate # Returns any errors or warnings # Green light to proceed with /start-work
Workflow
Typical workflow:
- •
prd create- Define your stories - •Review each story's acceptance criteria
- •
prd validate- Ensure PRD is valid - •
start-work- Ralph Loop handles the rest - •Stories complete automatically
- •Check
progress.txtfor learnings
See Also
- •
/start-work- Begin work session with auto-init - •
/ralph- Raw Ralph Loop control - •
prd.json- The actual file (edit directly if needed) - •
library/guides/ralph-loop-guide.md- Detailed architecture docs
Philosophy: Your PRD is your work plan. Make it clear, detailed, and testable. Ralph Loop handles execution. You focus on requirements and reviewing results.