| name | generating-prd-md-from-userstory-md |
| description | Transforms UserStory.md into PRD.md by extracting features and converting user stories into functional requirements. |
| model | haiku |
| allowed-tools | Read, Write |
PRD Generation from User Story
Converts docs/UserStory.md into docs/PRD.md with structured functional requirements.
Purpose
Bridges the gap between user-focused stories and implementation-ready requirements by converting narrative descriptions into technical requirements.
Workflow
-
Read inputs
- Read
ralph/docs/templates/prd.md.template - follow its structure exactly
- Read
docs/UserStory.md - parse all sections: Problem, Users, Value, Stories, Criteria, Constraints
-
Extract and convert
- User stories → Functional requirements (WHAT the system must do)
- Success criteria + Constraints → Non-functional requirements (HOW it performs)
- Group by functional area (CLI, API, Storage, etc.)
-
Generate PRD.md
- Follow template structure and PARSER REQUIREMENT comments
- Project Overview: Combine problem statement + value proposition
- Functional Requirements: Organized by feature area
- Non-Functional Requirements: Performance, usability, platform
- Story Breakdown: Include
(depends: STORY-XXX) when story B requires story A to complete first
- Out of Scope: Copy from UserStory.md
-
Validate against template
- Verify output matches
ralph/docs/templates/prd.md.template structure
- Check PARSER REQUIREMENT elements are present (headings, checkboxes, story format)
-
Save
- Backup existing PRD.md as
PRD.md.bak if overwriting
- Write to
docs/PRD.md
- Suggest:
make ralph_prd_json
Conversion Examples
User Story → Functional Requirement:
- "As a developer, I want to add tasks from CLI" → "CLI command:
task add "description""
Success Criteria → Non-Functional:
- "Operations in < 5 seconds" → "Performance: All CLI operations complete in < 5 seconds"
Constraints → Non-Functional:
- "Must work on Linux, macOS, Windows" → "Platform Support: Cross-platform compatibility"
Usage
make ralph_prd_md
Next Steps
make ralph_prd_json
make ralph_run