Convert a PRD to prd.json format for the ralphing autonomous agent. Use when you have a PRD and need to create prd.json. Triggers on: convert this prd, create prd.json, ralphing json, turn into ralphing format.
Converts a PRD to prd.json for autonomous execution by ralphing run.
Take a PRD (markdown file or text) and convert it to prd.json in your ralph directory.
{
"project": "[Project Name]",
"branchName": "feat/[feature-name-kebab-case]",
"description": "[Feature description from PRD title/intro]",
"tasks": [
{
"id": "T-1",
"type": "setup | miscellaneous | user_story",
"title": "[Task title]",
"description": "[Free-form for setup/miscellaneous. For user_story: 'As a [user], I want [feature] so that [benefit]']",
"acceptanceCriteria": [
"Criterion 1",
"Criterion 2"
],
"priority": 1,
"passes": false,
"notes": "[Task-specific notes or clarifications, Implementation decisions (e.g Tech/pattern to use), NOT what files to create or change]"
}
]
}
setup — Project scaffolding, installing dependencies, configuring tools. Description is free-form.miscellaneous — Cleanup, refactoring, non-feature work. Description is free-form.user_story — Feature work driven by user value. Description must use: "As a [user], I want [feature] so that [benefit]"All tasks share a single sequential counter: T-1, T-2, T-3, ... regardless of type.
Write to: prd.json
feat/ followed by a slug derived from the PRD titlefeat/task-priority-systemEach task must be completable in ONE ralphing iteration (one context window).
Each iteration spawns a fresh AI instance with clean context. If a task is too big, the agent runs out of context before finishing and produces broken code.
Rule of thumb: If you cannot describe the change in 2-3 sentences, it is too big.
Tasks execute in priority order. Earlier tasks must not depend on later ones. Order purely by dependency — task type does not determine position.
Correct order:
Each criterion must be something the agent can CHECK, not something vague.
status column to tasks table with default 'pending'"user_story tasks:"Typecheck passes"
For user_story tasks with testable logic, also include:
"Tests pass"
For user_story tasks that change UI, also include:
"Verify in browser using dev-browser skill"
setup and miscellaneous tasks do not require automatic criteria — use only what is verifiable for that task.
passes: false and empty notesbranchName: Derive from feature name, kebab-case, prefixed with feat/user_story tasks: always add "Typecheck passes" as final acceptance criterionsetup / miscellaneous tasks: only include criteria that are actually verifiableIf a PRD has big features, split them:
Original:
"Add user notification system"
Split into:
Each is one focused change that can be completed and verified independently.
Input PRD:
# Task Status Feature
Add ability to mark tasks with different statuses.
## Requirements
- Toggle between pending/in-progress/done on task list
- Filter list by status
- Show status badge on each task
- Persist status in database
Output prd.json:
{
"project": "TaskApp",
"branchName": "feat/task-status",
"description": "Task Status Feature - Track task progress with status indicators",
"tasks": [
{
"id": "T-1",
"type": "setup",
"title": "Install required packages",
"description": "Install any packages needed for the status feature.",
"acceptanceCriteria": [
"Dependencies installed and lockfile updated"
],
"priority": 1,
"passes": false,
"notes": ""
},
{
"id": "T-2",
"type": "user_story",
"title": "Add status field to tasks table",
"description": "As a developer, I want to store task status in the database so that status persists across sessions.",
"acceptanceCriteria": [
"Add status column: 'pending' | 'in_progress' | 'done' (default 'pending')",
"Generate and run migration successfully",
"Typecheck passes"
],
"priority": 2,
"passes": false,
"notes": ""
},
{
"id": "T-3",
"type": "user_story",
"title": "Display status badge on task cards",
"description": "As a user, I want to see task status at a glance so that I know which tasks are in progress.",
"acceptanceCriteria": [
"Each task card shows colored status badge",
"Badge colors: gray=pending, blue=in_progress, green=done",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 3,
"passes": false,
"notes": ""
},
{
"id": "T-4",
"type": "user_story",
"title": "Add status toggle to task list rows",
"description": "As a user, I want to change task status directly from the list so that I don't have to open each task.",
"acceptanceCriteria": [
"Each row has status dropdown or toggle",
"Changing status saves immediately",
"UI updates without page refresh",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 4,
"passes": false,
"notes": ""
},
{
"id": "T-5",
"type": "user_story",
"title": "Filter tasks by status",
"description": "As a user, I want to filter the list to see only certain statuses so that I can focus on relevant tasks.",
"acceptanceCriteria": [
"Filter dropdown: All | Pending | In Progress | Done",
"Filter persists in URL params",
"Typecheck passes",
"Verify in browser using dev-browser skill"
],
"priority": 5,
"passes": false,
"notes": ""
}
]
}
user_story task has "Typecheck passes" as final criterionuser_story tasks have "Verify in browser using dev-browser skill"user_story descriptions use the "As a [user]..." formatpasses: false