Generate a Product Requirements Document (PRD) as JSON for Ralph by converting an existing PRD markdown file. Triggers on: create a prd, write prd for, plan this feature, requirements for, spec out.
64
81%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Create a structured JSON PRD that Ralph can execute deterministically. This PRD is the single source of truth for stories, gates, and status.
This skill ingests PRD markdown written via $create-prd (for example prd.md / prd-overall.md / prds/<slice_id>_<slug>/prd.md) and produces the matching PRD JSON.
Important: Do NOT implement anything. Only generate JSON.
Required:
prd.md (single-PRD dossier)prd-overall.md (multi-PRD dossier overall/spine)prds/<slice_id>_<slug>/prd.md (multi-PRD dossier slice)prd-<slug>.md if a dossier uses that patternOptional (for "no information loss"):
brief.md, breadboard-pack.md, spike-investigation.md, risk-register.mdIf the user only provides a feature description (no PRD markdown), NO-GO: ask them to create prd.md via $create-prd first.
docs/04-projects/AGENTS.md):
prd.md -> prd.jsonprd-overall.md -> prd-overall.jsonprd-<slug>.md -> prd-<slug>.jsonprds/<slice_id>_<slug>/prd.md -> prds/<slice_id>_<slug>/prd.jsonIf the prompt provides an explicit output path, save to that path instead.
$ask-questions-if-underspecified and ask clarifying questions (see below).Only ask questions when the PRD markdown is missing required inputs for the JSON shape. If you need to ask questions, use $ask-questions-if-underspecified and follow its workflow.
Ask 5-10 clarifying questions (with lettered options), in batches of up to 5 at a time (ask 5, wait for answers, then ask the next batch if needed). Focus on:
Always ask explicitly:
1. What quality commands must pass for each story?
A. pnpm test
B. pnpm run lint
C. pnpm run typecheck
D. Other: [specify]
2. What UI screens/routes are required?
A. Minimal (1-2 pages)
B. Basic app shell (dashboard + detail pages)
C. Full routing map (list all routes)
D. Other: [specify]
Note: All example questions and options are illustrative only. Do not copy them verbatim into the PRD JSON unless the user explicitly chooses them.Output a JSON file with this shape (include detailed top-level fields so the PRD is fully self-contained):
{
"version": 1,
"project": "Feature Name",
"overview": "Short problem + solution summary",
"goals": [
"Goal 1",
"Goal 2"
],
"nonGoals": [
"Explicitly out of scope items"
],
"successMetrics": [
"How success is measured"
],
"openQuestions": [
"Remaining unknowns"
],
"stack": {
"framework": "TanStack Start",
"hosting": "Cloudflare",
"database": "D1",
"auth": "describe approach"
},
"routes": [
{ "path": "/", "name": "Home", "purpose": "..." }
],
"uiNotes": [
"Layout or component requirements"
],
"dataModel": [
{ "entity": "Workout", "fields": ["id", "userId", "date", "notes"] }
],
"importFormat": {
"description": "Expected JSON shape",
"example": { "programName": "..." }
},
"rules": [
"Key business rules / calculations"
],
"qualityGates": ["pnpm test"],
"stories": [
{
"id": "US-001",
"title": "Short story title",
"status": "open",
"dependsOn": [],
"description": "As a [user], I want [feature] so that [benefit].",
"acceptanceCriteria": [
"Specific verifiable criterion",
"Example: a valid input behaves as expected",
"Negative case: invalid input returns a safe error"
]
}
]
}US-001, US-002, ...)"open" for new storiesqualityGatespnpm add <pkg>), plus any required config or scripts.Do not drop details from the PRD markdown when producing PRD JSON.
qualityGates[] and stories[].After saving, tell the user:
PRD JSON saved to <path>. Close this chat and run \ralph build`.`
version, project, overview, qualityGates, stories.status: "open"dependsOn: [] (or IDs)marchatton/agent-skills
a0eadb2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.