# Stage 0: Intake

## Purpose

Parse the PRD into discrete, pipeline-ready briefs.

## Input

- `docs/PRD.md` (must conform to Mosaic PRD template)

## Process

1. Validate PRD has all required sections (per Mosaic PRD guide)
2. Extract user stories / functional requirements as individual briefs
3. Identify dependencies between briefs
4. Propose execution order (dependency-aware)
5. Estimate pipeline complexity per brief (full pipeline vs lightweight)

## Output

- `briefs/` directory with one `brief-NNN.md` per work unit
- `briefs/INDEX.md` — dependency graph + proposed order
- Each brief contains:
  - Source PRD reference
  - Scope (what this brief covers)
  - Success criteria (from PRD acceptance criteria)
  - Estimated complexity (project/feature = full pipeline, small fix = direct to coding)
  - Dependencies on other briefs

## Agent

- Model: Sonnet
- Role: Brief Extractor — mechanical decomposition, no creative decisions

## Brief Classification

Intake assigns a `class` to each brief, which determines which pipeline stages run:

| Class       | Stages                                 | When to use                                                                   |
| ----------- | -------------------------------------- | ----------------------------------------------------------------------------- |
| `strategic` | Full pipeline: BOD → BA → Planning 1-3 | Architecture decisions, new features, integrations, pricing, security, budget |
| `technical` | Skip BOD: BA → Planning 1-3            | Refactors, UI tweaks, bugfixes, style changes, cleanup                        |
| `hotfix`    | Skip BOD + BA: Planning 3 only         | Urgent patches, typo fixes, one-liner changes                                 |

### Classification priority

1. **CLI flag** (`--class`) — always wins
2. **YAML frontmatter** — `class:` field in the brief's `---` block
3. **Auto-classify** — keyword analysis of brief text:
   - Strategic keywords: security, pricing, architecture, integration, budget, strategy, compliance, migration, partnership, launch
   - Technical keywords: bugfix, bug, refactor, ui, style, tweak, typo, lint, cleanup, rename, hotfix, patch, css, format
   - Default (no match): strategic (full pipeline)

### Force flags

- `--force-board` — run BOD stage regardless of class

## Gate: intake-complete

### Mechanical

- [ ] PRD exists and has all required sections
- [ ] At least one brief extracted
- [ ] Each brief has scope + success criteria
- [ ] Dependency graph has no cycles
- [ ] Brief class assigned (strategic, technical, or hotfix)

### Gate Reviewer

- "Are these briefs well-scoped? Any that should be split or merged?"
