You are converting a PRD (Product Requirements Document) into Ralph's prd.json format.
Read the PRD file at: {{PRD_FILE}}
Create a .ralph/current/prd.json file with this exact structure:
{
"project": "{{PROJECT_NAME}}",
"branchName": "{{BRANCH_NAME}}",
"description": "[Description from PRD title/intro]",
"userStories": [
{
"id": "P{{PHASE_NUMBER}}-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": ""
}
]
}The branch name is provided by run.sh: {{BRANCH_NAME}}
Use this exact value for the branchName field in prd.json. Do NOT construct the branch name yourself.
-
Each user story in the PRD becomes one JSON entry - do not merge or split unless a story is clearly too large for one iteration.
-
IDs: Phase-prefixed, sequential:
P{{PHASE_NUMBER}}-US-001,P{{PHASE_NUMBER}}-US-002, etc. -
Priority: Matches the order from the PRD (first story = priority 1). Stories must be ordered by dependency: schema/data first, then backend, then UI.
-
All stories start with:
"passes": falseand"notes": "" -
Acceptance criteria must be verifiable - convert any vague criteria to specific, checkable ones.
-
Always include "Typecheck passes" (or equivalent quality check) in every story's acceptance criteria.
-
For UI stories, include "Verify in browser using dev-browser skill" in acceptance criteria.
Before writing prd.json, verify each story is small enough for one Ralph iteration:
- Can be described in 2-3 sentences
- Touches a focused set of files
- Has 3-6 acceptance criteria
If any story seems too large, split it into multiple smaller stories.
- Read the PRD at
{{PRD_FILE}} - Convert it to prd.json following the rules above
- Write the result to
.ralph/current/prd.json - Validate the JSON is well-formed
Important: Only create prd.json. Do NOT implement any code. Do NOT modify the PRD. Do NOT run run.sh.