src/bmm-skills/2-plan-workflows/bmad-validate-prd/steps-v/step-v-02-format-detection.md
Detect if PRD follows BMAD format and route appropriately - classify as BMAD Standard / BMAD Variant / Non-Standard, with optional parity check for non-standard formats.
{communication_language}CRITICAL: Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
Load the complete PRD file and extract:
All Level 2 (##) headers:
PRD frontmatter:
Check if the PRD contains the following BMAD PRD core sections:
Count matches:
Based on core section count, classify:
BMAD Standard:
BMAD Variant:
Non-Standard:
Append to validation report:
## Format Detection
**PRD Structure:**
[List all ## Level 2 headers found]
**BMAD Core Sections Present:**
- Executive Summary: [Present/Missing]
- Success Criteria: [Present/Missing]
- Product Scope: [Present/Missing]
- User Journeys: [Present/Missing]
- Functional Requirements: [Present/Missing]
- Non-Functional Requirements: [Present/Missing]
**Format Classification:** [BMAD Standard / BMAD Variant / Non-Standard]
**Core Sections Present:** [count]/6
IF format is BMAD Standard or BMAD Variant:
Display: "Format Detected: {classification}
Proceeding to systematic validation checks..."
Without delay, read fully and follow: {nextStepFile} (step-v-03-density-validation.md)
IF format is Non-Standard (< 3 core sections):
Display: "Format Detected: Non-Standard PRD
This PRD does not follow BMAD standard structure (only {count}/6 core sections present).
You have options:"
Present MENU OPTIONS below for user selection
[A] Parity Check - Analyze gaps and estimate effort to reach BMAD PRD parity [B] Validate As-Is - Proceed with validation using current structure [C] Exit - Exit validation and review format findings
Master Rule: Format detection determines validation path. Non-standard PRDs require user choice before proceeding.