create-json-prd
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.
Best use case
create-json-prd is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using create-json-prd should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/create-json-prd/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How create-json-prd Compares
| Feature / Agent | create-json-prd | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# PRD Generator (JSON Only)
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.
## Inputs
Required:
- A PRD markdown file path (one of):
- `prd.md` (single-PRD dossier)
- `prd-overall.md` (multi-PRD dossier overall/spine)
- `prds/<slice_id>_<slug>/prd.md` (multi-PRD dossier slice)
- (Optional legacy naming) `prd-<slug>.md` if a dossier uses that pattern
Optional (for "no information loss"):
- Shaping inputs in the same dossier (if present): `brief.md`, `breadboard-pack.md`, `spike-investigation.md`, `risk-register.md`
If the user only provides a feature description (no PRD markdown), **NO-GO**: ask them to create `prd.md` via `$create-prd` first.
## Outputs
- Save the PRD JSON **alongside the PRD markdown** with the matching basename (per `docs/04-projects/AGENTS.md`):
- `prd.md` -> `prd.json`
- `prd-overall.md` -> `prd-overall.json`
- `prd-<slug>.md` -> `prd-<slug>.json`
- `prds/<slice_id>_<slug>/prd.md` -> `prds/<slice_id>_<slug>/prd.json`
If the prompt provides an explicit output path, save to that path instead.
## The Job
1. Read the PRD markdown and extract all details needed for a deterministic PRD JSON.
2. If required information is missing, invoke `$ask-questions-if-underspecified` and ask clarifying questions (see below).
3. **Always ask about quality gates** (commands that must pass).
4. Generate a **detailed** PRD JSON that follows the structure below and save it to the output path.
## Step 1: Clarifying Questions (When Needed)
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:
- **Problem/Goal:** What problem does this solve?
- **Core Functionality:** What are the key actions?
- **Scope/Boundaries:** What should it NOT do?
- **Success Criteria:** How do we know it's done?
- **Stack + Environment:** frameworks, hosting, runtime, database, auth approach
- **UI + Routes:** key screens, navigation, route map, layout constraints
- **Data Model + Import Format:** entities, relationships, external data shape
- **Rules/Calculations:** business logic, progression rules, edge cases
- **Quality Gates:** tests, lint, typecheck, build/dev verification (REQUIRED)
Always ask explicitly:
- **Is this a new project or an existing codebase?**
### Format Questions Like This
```
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.
```
## Step 2: JSON Structure (Required)
Output a JSON file with this shape (include detailed top-level fields so the PRD is fully self-contained):
```json
{
"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"
]
}
]
}
```
### Story + JSON Rules
- **IDs**: Sequential (`US-001`, `US-002`, ...)
- **Status**: Always `"open"` for new stories
- **DependsOn**: Use IDs only; empty array if none
- **Quality Gates**: Only at the top-level `qualityGates`
- **Acceptance Criteria**: Verifiable, specific, testable
- **Every story must include**: at least 1 example + 1 negative case
- **UI stories**: include explicit routes, components, and UI states
- **New projects**: include initial setup stories (scaffold, env/config, local dev, deploy basics, **package installs**)
- **Dependencies**: any new package/library introduced must be called out with install commands in acceptance criteria (for example `pnpm add <pkg>`), plus any required config or scripts.
- **Ordering**: if this is a new project, the **first story must be setup** (scaffold + installs + scripts + env/config). Migrations or data model work come after setup.
## No Information Loss (Critical)
Do not drop details from the PRD markdown when producing PRD JSON.
- Map PRD content into the required keys above where it fits.
- If the PRD includes additional sections (for example functional requirements, failure states/UX, verification plan, metrics/logging, rollback/disable path, risks/dependencies, links/sources), preserve them by adding **additional top-level keys** as needed. Ralph ignores unknown keys; the only hard requirements are `qualityGates[]` and `stories[]`.
## Output Requirements
- Save JSON to the chosen output path.
- The JSON file must contain **only** JSON (no Markdown PRD, no commentary).
After saving, tell the user:
`PRD JSON saved to <path>. Close this chat and run \`ralph build\`.`
## Verification
- JSON parses.
- JSON contains required keys: `version`, `project`, `overview`, `qualityGates`, `stories`.
- All PRD user stories + acceptance criteria are captured (no loss).
- Each story has:
- `status: "open"`
- `dependsOn: []` (or IDs)
- acceptance criteria including at least 1 example + 1 negative case.Related Skills
create-agent-skills
Expert guidance for creating, writing, and refining Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving existing skills, or understanding skill structure and best practices.
create-prd
Draft PRD with scope, stories, acceptance criteria, verification. Use when shaping a new feature or spec.
create-cli
Design command-line interface parameters and UX: arguments, flags, subcommands, help text, output formats, error messages, exit codes, prompts, config/env precedence, and safe/dry-run behavior. Use when you’re designing a CLI spec (before implementation) or refactoring an existing CLI’s surface area for consistency, composability, and discoverability.
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
modular-skills-architect
Map and refactor an agent context ecosystem: skills, commands/workflows, hooks, agent files, AGENTS.md templates, and docs. Output system map, module/dependency design, Register updates, and a concrete split/consolidate/rename/delete plan. Use when routing or ownership is messy.
heal-skill
This skill should be used when fixing incorrect SKILL.md files with outdated instructions or APIs.
agent-native-audit
Comprehensive agent-native architecture audit with scored principles and multi-slice review. Use for system-wide health checks or periodic audits.
write-judge-prompt
Design LLM-as-Judge evaluators for subjective criteria that code-based checks cannot handle. Use when a failure mode requires interpretation (tone, faithfulness, relevance, completeness). Do NOT use when the failure mode can be checked with code (regex, schema validation, execution tests). Do NOT use when you need to validate or calibrate the judge — use validate-evaluator instead.
validate-evaluator
Calibrate an LLM judge against human labels using data splits, TPR/TNR, and bias correction. Use after writing a judge prompt (write-judge-prompt) when you need to verify alignment before trusting its outputs. Do NOT use for code-based evaluators (those are deterministic; test with standard unit tests).
generate-synthetic-data
Create diverse synthetic test inputs for LLM pipeline evaluation using dimension-based tuple generation. Use when bootstrapping an eval dataset, when real user data is sparse, or when stress-testing specific failure hypotheses. Do NOT use when you already have 100+ representative real traces (use stratified sampling instead), or when the task is collecting production logs.
evaluate-rag
Guides evaluation of RAG pipeline retrieval and generation quality. Use when evaluating a retrieval-augmented generation system, measuring retrieval quality, assessing generation faithfulness or relevance, generating synthetic QA pairs for retrieval testing, or optimizing chunking strategies.
eval-audit
Audit an LLM eval pipeline and surface problems: missing error analysis, unvalidated judges, vanity metrics, etc. Use when inheriting an eval system, when unsure whether evals are trustworthy, or as a starting point when no eval infrastructure exists. Do NOT use when the goal is to build a new evaluator from scratch (use error-analysis, write-judge-prompt, or validate-evaluator instead).