workflow:
  id: bmad-integration-example
  name: BMAD Method Integration Example
  description: Example workflow showing complete BMAD integration with parallel story execution
  type: example
  scenario:
    description: "4 stories ready for parallel development"
    stories:
      - "Story 1.1: Setup Database Schema"
      - "Story 1.2: Create User API Endpoints"
      - "Story 2.1: Build Login UI Component"
      - "Story 2.2: Implement Authentication Flow"
  execution_steps:
    - step: 1
      name: Validate Story Format
      agent: sm
      commands:
        - "*checklist story-draft-checklist"
      validation:
        - All stories follow BMAD template
        - Status is "Approved" or "Draft" with override
        - Dev Notes are complete
        - Testing requirements specified
    - step: 2
      name: Analyze Dependencies
      command: "/stories:analyze"
      output:
        - Dependency matrix showing file overlaps
        - Conflict potential assessment
        - Recommended wave grouping
    - step: 3
      name: Execute Parallel Development
      command: "/stories --waves 2,2 --sophistication 1"
      behavior:
        wave_1:
          - "Story 1.1 assigned to Dev Agent Alpha"
          - "Story 2.1 assigned to Dev Agent Beta"
          - "Each works in isolated worktree"
          - "Innovation dimensions: efficiency, testing"
        wave_2:
          - "Story 1.2 assigned to Dev Agent Gamma"
          - "Story 2.2 assigned to Dev Agent Delta"
          - "Innovation dimensions: architecture, documentation"
    - step: 4
      name: Monitor Progress
      command: "/stories:status"
      tracking:
        - Real-time task completion
        - Debug log entries
        - Quality metrics
        - DoD compliance
    - step: 5
      name: Quality Gates
      automatic: true
      checks:
        - Jest tests pass
        - Coverage > 80%
        - ESLint no errors
        - DoD checklist complete
    - step: 6
      name: Progressive Enhancement
      command: "Automatic wave 2 with sophistication 2"
      behavior:
        - Agents enhance previous implementation
        - Add optimizations
        - Improve error handling
        - Expand test coverage
    - step: 7
      name: Integration & Merge
      command: "/stories:merge all"
      process:
        - Automated conflict detection
        - Guided resolution
        - Final integration tests
        - Story status updates
  key_features:
    - BMAD story format validation
    - Dev Agent Record tracking
    - Sequential task execution
    - DoD enforcement at each wave
    - Innovation dimension assignment
    - Context optimization
    - Progressive sophistication
  expected_outcomes:
    - All stories completed in parallel
    - Each implementation unique
    - Quality standards maintained
    - Reduced development time
    - Comprehensive test coverage