name: jira-epic-delivery
title: JIRA Epic Delivery Workflow
description: End-to-end workflow for delivering an epic with full JIRA tracking and three-way sync
type: delivery
category: epic-management
estimated_time: varies by epic size

agents:
  - jira
  - pm
  - architect
  - sm
  - dev
  - qa

prerequisites:
  - Epic created in JIRA
  - High-level requirements defined
  - Team allocated
  - JIRA integration configured

startup_sequence:
  - agent: jira
    task: analyze-epic
    message: "Analyzing epic structure and current state in JIRA"

discovery_phase:
  - id: 1.1
    agent: jira
    task: jira-operations
    inputs:
      mode: epic-analysis
      epic_key: "${EPIC_KEY}"
    outputs:
      - Epic details and metadata
      - Existing child issues
      - Related epics/dependencies
      - Historical epic patterns

  - id: 1.2
    agent: pm
    task: create-epic-prd
    inputs:
      - Epic requirements
      - Stakeholder needs
      - Success criteria
    outputs:
      - Epic PRD document
      - Acceptance criteria
      - Out of scope items

  - id: 1.3
    agent: architect
    task: epic-architecture-design
    inputs:
      - Epic PRD
      - System constraints
    outputs:
      - Architecture design doc
      - Component breakdown
      - Integration requirements
      - Technical risks

planning_phase:
  - id: 2.1
    agent: pm
    task: epic-story-breakdown
    inputs:
      - Epic PRD
      - Architecture design
    outputs:
      - Story list with descriptions
      - Story dependencies
      - Delivery phases
    decision_points:
      - id: D1
        name: Delivery Strategy
        description: Choose phased or complete delivery

  - id: 2.2
    agent: jira
    task: jira-operations
    inputs:
      - Story definitions
      - Epic key
    outputs:
      - Stories created in JIRA
      - Epic link established
      - Initial estimates added

  - id: 2.3
    agent: sm
    task: epic-sprint-planning
    inputs:
      - Story list
      - Team capacity
      - Dependencies
    outputs:
      - Multi-sprint plan
      - Resource allocation
      - Risk mitigation approach

  - id: 2.4
    agent: jira
    task: report
    inputs:
      mode: epic-timeline
    outputs:
      - Visual roadmap
      - Milestone tracking
      - Dependency visualization

implementation_phase:
  - id: 3.1
    agent: jira
    task: setup
    inputs:
      mode: epic-tracking
    outputs:
      - Epic burndown configured
      - Progress dashboards created
      - Automated reports scheduled

  - id: 3.2
    agent: dev
    task: implementation-kickoff
    repeats: per_sprint
    outputs:
      - Sprint implementation
      - Code commits linked
      - PR references added

  - id: 3.3
    agent: jira
    task: sync
    repeats: per_sprint
    inputs:
      mode: continuous
      scope: epic
    outputs:
      - Sync status updates
      - Discrepancy alerts
      - Remediation actions

  - id: 3.4
    agent: qa
    task: epic-test-planning
    outputs:
      - Test strategy document
      - Test case mapping
      - Regression approach

monitoring_phase:
  - id: 4.1
    agent: jira
    task: sync
    repeats: daily
    outputs:
      - Daily progress updates
      - Blocker identification
      - Burndown tracking

  - id: 4.2
    agent: pm
    task: stakeholder-updates
    repeats: weekly
    outputs:
      - Progress reports
      - Risk updates
      - Scope change requests

  - id: 4.3
    agent: jira
    task: report
    repeats: sprint_end
    inputs:
      report_type: epic-progress
    outputs:
      - Sprint delivery report
      - Velocity analysis
      - Remaining work assessment

delivery_phase:
  - id: 5.1
    agent: qa
    task: epic-acceptance-testing
    outputs:
      - Test execution results
      - Defect reports
      - Acceptance sign-off

  - id: 5.2
    agent: jira
    task: jira-operations
    inputs:
      mode: epic-completion
    outputs:
      - All stories closed
      - Acceptance criteria met
      - Documentation complete

  - id: 5.3
    agent: pm
    task: epic-retrospective
    outputs:
      - Lessons learned
      - Process improvements
      - Success metrics

  - id: 5.4
    agent: jira
    task: jira-operations
    inputs:
      mode: cleanup
      scope: epic
    outputs:
      - Orphaned issues cleaned
      - Fields standardized
      - Archive prepared

decision_points:
  - id: D1
    step: 2.1
    description: Choose delivery strategy
    options:
      - Phased delivery with MVPs
      - Complete epic delivery
      - Feature flag releases
    impacts:
      - User value timing
      - Testing complexity
      - Rollback strategy

  - id: D2
    step: 3.4
    description: Testing approach selection
    options:
      - Continuous testing per story
      - Phase-end testing
      - Full regression per sprint
    impacts:
      - Defect discovery timing
      - Resource allocation
      - Release confidence

  - id: D3
    step: 4.2
    description: Handle scope changes
    options:
      - Defer to next epic
      - Expand current epic
      - Trade-off with other stories
    impacts:
      - Delivery timeline
      - Team morale
      - Stakeholder satisfaction

outputs:
  - Completed epic in JIRA
  - All stories delivered and tested
  - Full documentation trail
  - Metrics and reports
  - Retrospective insights
  - Clean JIRA state

success_criteria:
  - All acceptance criteria met
  - No critical defects
  - Stakeholder sign-off obtained
  - Documentation complete
  - Team satisfaction maintained
  - Three-way sync consistency

automation_hooks:
  - Epic progress alerts
  - Blocked story notifications
  - Sync discrepancy warnings
  - Velocity deviation alerts
  - Scope change approvals