markdown
---
name: autonomous-pattern
description: "Convert PRDs to prd.json format for the autonomous agent pattern. Use when you have an existing PRD and need to convert it to the JSON format used by the agent loop. Triggers on: convert this prd, turn this into agent format, create prd.json from this, agent json."
---
# PRD Converter for Autonomous Agent Pattern
Converts existing PRDs to the `prd.json` format used for autonomous execution.
---
## The Job
Take a PRD (markdown file or text) and convert it to `prd.json` in the repository root.
---
## Output Format
```json
{
"project": "[Project Name]",
"branchName": "autonomous/[feature-name-kebab-case]",
"description": "[Feature description from PRD title/intro]",
"userStories": [
{
"id": "US-001",
"title": "[Story title]",
"description": "As a [user], I want [feature] so that [benefit]",
"acceptanceCriteria": [
"Criterion 1",
"Criterion 2",
"Typecheck passes"
],
"priority": 1,
"passes": false,
"notes": ""
}
]
}
```
---
## Story Size: The Number One Rule
**Each story must be completable in ONE agent iteration (one context window).**
The agent spawns a fresh AI instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.
... (rest of guidance preserved from original, with references to "Ralph" removed and generalized)