Convert markdown PRDs to executable JSON format. Use after creating a PRD with the prd skill to generate the prd.json for autonomous task completion.
Convert markdown PRDs to executable JSON format for autonomous task completion.
The PRD defines the end state via tasks with verification steps. The agent decides HOW to get there.
.opencode/state/<prd-name>/ directory.opencode/state/<prd-name>/prd.md.opencode/state/<prd-name>/prd.json.opencode/state/<prd-name>/progress.txtState folder structure:
.opencode/state/<prd-name>/
├── prd.md # Original markdown PRD (moved from project root)
├── prd.json # Converted JSON for task execution
└── progress.txt # Empty file to track progress
{
"prdName": "<prd-name>",
"tasks": [
{
"id": "functional-1",
"category": "functional",
"description": "User can register with email and password",
"steps": [
"POST /api/auth/register with valid email/password",
"Verify 201 response with user object",
"Verify password not in response",
"Attempt duplicate email, verify 409"
],
"passes": false
}
],
"context": {
"patterns": ["API routes: src/routes/items.ts"],
"keyFiles": ["src/db/schema.ts"],
"nonGoals": ["OAuth/social login", "Password reset"]
}
}
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier, e.g. "db-1", "api-auth" |
category | string | Grouping: "functional", "ui", "api", "security", "testing" |
description | string | What the task does when complete |
steps | string[] | Verification steps - how to test it works |
passes | boolean | Set to true when ALL steps verified |
Keep tasks small and focused:
### Title [category] becomes a taskid as <category>-<number> or descriptive slugdescription**Verification:** become stepspasses always starts as falsecontext.patterns - existing code patterns to followcontext.keyFiles - files to explore firstcontext.nonGoals - explicit scope boundariesREAD-ONLY except:
passes: Set to true when ALL verification steps passNEVER edit or remove tasks - This could lead to missing functionality.
Derive from PRD title:
# PRD: User Authentication -> "prdName": "user-authentication"Tell the user:
PRD converted and moved to .opencode/state/<prd-name>/
- prd.md (moved from <original-path>)
- prd.json (generated)
- progress.txt (empty)
PRD: <prd-name>
Tasks: X total
To complete tasks:
/complete-next-task <prd-name>