--- name: write-a-prd description: "Generate a Product Requirements Document from a task description, user intent, or PRD outline. Structure the PRD with sections: Overview, Problem Statement, Goals, Scope, Features, Acceptance Criteria, Metrics. Use this when the Planner or Orchestrator needs to formalize requirements before decomposing into implementation steps." --- # Write a PRD — generate a Product Requirements Document Formalizes task intent into a structured PRD that serves as input to the Planner or Orchestrator. ## When to use - **Planner phase:** Before decomposing a task into steps, generate a PRD to align on requirements. - **Orchestrator setup:** Before running the autonomous loop, generate/refine a PRD. - **Specification clarity:** Task description is vague; PRD forces clarity on scope + acceptance criteria. ## Template A PRD for Blaze.LlmGateway tasks typically has: ```markdown # PRD: ## Overview ## Problem Statement ## Goals - - ## Scope ### In scope - - ### Out of scope - ## Features ### Feature 1: ### Feature 2: ## Acceptance Criteria - [ ] Criterion 1 (testable, specific) - [ ] Criterion 2 (testable, specific) - [ ] Blaze.LlmGateway-specific: builds with `-warnaserror`, 95% code coverage, ADR-0008 compliant ## Success Metrics - ## Dependencies - ## Open Questions - ``` ## Output location - **Primary:** `Docs/PRD/.md` (long-lived, blessed version). - **Per-run copy (optional):** `Docs/squad/runs/-/prd.md` (working copy for this run). ## Examples from Blaze.LlmGateway See `Docs/PRD/blaze-llmgateway-prd.md` for a system-level PRD. Task-specific PRDs are smaller and focused on a single feature or component (e.g., "add a circuit breaker to LlmRoutingChatClient"). ## Quality checks Before marking the PRD complete: - **Acceptance criteria are testable** (not vague). - **Scope is clear** (in/out sections are disjoint and complete). - **No missing context** (team knows what "done" looks like). - **Blaze.LlmGateway constraints** are listed (MEAI usage, quality gate, ADRs). ## See also - `squad-plan` command — invoked after PRD is approved, decomposes into ordered steps. - Planner agent — reads the PRD and generates spec.md + plan.md.