PRD to JSON
Use this skill to convert .prd/prd-*.md into .prd/prd.json for Ralph.
Inputs
- If multiple PRD files exist, ask which one to convert.
- If no PRD file exists, instruct the user to run
/prd-discoveryfirst.
Workflow
-
Find the PRD
- Look for
.prd/prd-*.md. - If one file exists, use it. Otherwise ask the user to choose.
- Look for
-
Parse the PRD
- Extract title, overview, and user stories.
- For each story, capture id, title, description, and acceptance criteria.
-
Validate content
- Each story must be completable in one iteration.
- Stories must be ordered by dependency.
- Acceptance criteria must be verifiable.
- Every story must include "Typecheck/lint/test passes".
- UI stories must include "Verify in browser".
-
Generate JSON
- Use the template structure.
- Set
passes: falseon all stories. - Use double quotes and valid JSON.
-
Save output
- Write to
.prd/prd.json. - Create
.prdif missing.
- Write to
-
Report
- Summarize the number of stories and the generated branch name.
- Suggest running Ralph next.