<task id="bmad/bmm/tasks/daily-standup.xml" name="Daily Standup">
  <llm critical="true">
    <i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
    <i>DO NOT skip steps or change the sequence</i>
    <i>HALT immediately when halt-conditions are met</i>
    <i>Each andlt;actionandgt; within andlt;stepandgt; is a REQUIRED action to complete that step</i>
    <i>Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution</i>
  </llm>
  <flow>
    <step n="1" title="Project Context Discovery">
      <action>Check for stories folder at {project-root}{output_folder}/stories/ directory</action>
      <action>Find current story by identifying highest numbered story file</action>
      <action>Read story status (In Progress, Ready for Review, etc.)</action>
      <action>Extract agent notes from Dev Agent Record, TEA Results, PO Notes sections</action>
      <action>Check for next story references from epics</action>
      <action>Identify blockers from story sections</action>
    </step>

    <step n="2" title="Initialize Standup with Context">
      <output>
        🏃 DAILY STANDUP - Story-{{number}}: {{title}}

        Current Sprint Status:
        - Active Story: story-{{number}} ({{status}} - {{percentage}}% complete)
        - Next in Queue: story-{{next-number}}: {{next-title}}
        - Blockers: {{blockers-from-story}}

        Team assembled based on story participants:
        {{ List Agents from {project-root}/bmad/_cfg/agent-party.xml }}
      </output>
    </step>

    <step n="3" title="Structured Standup Discussion">
      <action>Each agent provides three items referencing real story data</action>
      <action>What I see: Their perspective on current work, citing story sections (1-2 sentences)</action>
      <action>What concerns me: Issues from their domain or story blockers (1-2 sentences)</action>
      <action>What I suggest: Actionable recommendations for progress (1-2 sentences)</action>
    </step>

    <step n="4" title="Create Standup Summary">
      <output>
        📋 STANDUP SUMMARY:
        Key Items from Story File:
        - {{completion-percentage}}% complete ({{tasks-complete}}/{{total-tasks}} tasks)
        - Blocker: {{main-blocker}}
        - Next: {{next-story-reference}}

        Action Items:
        - {{agent}}: {{action-item}}
        - {{agent}}: {{action-item}}
        - {{agent}}: {{action-item}}

        Need extended discussion? Use *party-mode for detailed breakout.
      </output>
    </step>
  </flow>

  <agent-selection>
    <context type="prd-review">
      <i>Primary: Sarah (PO), Mary (Analyst), Winston (Architect)</i>
      <i>Secondary: Murat (TEA), James (Dev)</i>
    </context>
    <context type="story-planning">
      <i>Primary: Sarah (PO), Bob (SM), James (Dev)</i>
      <i>Secondary: Murat (TEA)</i>
    </context>
    <context type="architecture-review">
      <i>Primary: Winston (Architect), James (Dev), Murat (TEA)</i>
      <i>Secondary: Sarah (PO)</i>
    </context>
    <context type="implementation">
      <i>Primary: James (Dev), Murat (TEA), Winston (Architect)</i>
      <i>Secondary: Sarah (PO)</i>
    </context>
  </agent-selection>

  <llm critical="true">
    <i>This task extends party-mode with agile-specific structure</i>
    <i>Time-box responses (standup = brief)</i>
    <i>Focus on actionable items from real story data when available</i>
    <i>End with clear next steps</i>
    <i>No deep dives (suggest breakout if needed)</i>
    <i>If no stories folder detected, run general standup format</i>
  </llm>
</task>