---
name: myai-dev-prd
description: Turn a brief into a PRD, epics, and gated story files
---

Turn a project brief into requirements, epics, and an implementable backlog.

Invokes the `myaidev-prd` skill, which runs four subagents: PRD author, epic planner, story
shardist (one per epic, in parallel), and the constitution gate.

## Usage

```bash
/myai-dev-prd
/myai-dev-prd --epics-only
/myai-dev-prd --max-stories 20
/myai-dev-prd --gate=report        # record violations without blocking
```

## Options

| Option | Description | Default |
|--------|-------------|---------|
| `--brief` | Path to the brief | `docs/product/brief.md` |
| `--epics-only` | Stop after epics | `false` |
| `--max-stories` | Cap total stories | unbounded |
| `--reshard` | Regenerate stories for existing epics | `false` |
| `--gate` | `strict` blocks on blockers, `report` records only | `strict` |

## What It Does

1. Writes the PRD: FR-n and NFR-n requirements, each with GIVEN-WHEN-THEN criteria, each
   traced back to the brief
2. Groups requirements into 2–6 epics — every functional requirement in exactly one, so
   nothing is orphaned or built twice
3. Shards each epic into stories that pass INVEST, in parallel
4. Gates every artifact against the constitution and stamps the result into each story
5. Revises what fails, up to two cycles, then reports what still blocks

## Output

```
docs/product/
├── prd.md            # FR-n / NFR-n with acceptance criteria
├── epics/            # sequenced bodies of work
├── stories/          # the unit of work
├── reviews/          # constitution gate reports
└── backlog.json      # derived index
```

Stories that pass the gate become `ready`. Stories that fail stay `draft` and will not
build until fixed.

Requires a brief and a constitution — run `/myai-dev-discover` first.
