# Sprint Status - Multi-Mode Service
The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml
You MUST have already loaded and processed: {project-root}/_bmad/bmm/workflows/4-implementation/sprint-status/workflow.yaml
Modes: interactive (default), validate, data
⚠️ ABSOLUTELY NO TIME ESTIMATES. Do NOT mention hours, days, weeks, or timelines.
Set mode = {{mode}} if provided by caller; otherwise mode = "interactive"
Jump to Step 20
Jump to Step 30
Continue to Step 1
Try {sprint_status_file}
Exit workflow
Continue to Step 2
Read the FULL file: {sprint_status_file}
Parse fields: generated, project, project_key, tracking_system, story_location
Parse development_status map. Classify keys:
- Epics: keys starting with "epic-" (and not ending with "-retrospective")
- Retrospectives: keys ending with "-retrospective"
- Stories: everything else (e.g., 1-2-login-form)
Map legacy story status "drafted" → "ready-for-dev"
Count story statuses: backlog, ready-for-dev, in-progress, review, done
Map legacy epic status "contexted" → "in-progress"
Count epic statuses: backlog, in-progress, done
Count retrospective statuses: optional, done
Validate all statuses against known values:
- Valid story statuses: backlog, ready-for-dev, in-progress, review, done, drafted (legacy)
- Valid epic statuses: backlog, in-progress, done, contexted (legacy)
- Valid retrospective statuses: optional, done
How should these be corrected?
{{#each invalid_entries}}
{{@index}}. {{key}}: "{{status}}" → [select valid status]
{{/each}}
Enter corrections (e.g., "1=in-progress, 2=backlog") or "skip" to continue without fixing:
Update sprint-status.yaml with corrected values
Re-parse the file with corrected statuses
Detect risks:
- IF any story has status "review": suggest `/bmad:bmm:workflows:code-review`
- IF any story has status "in-progress" AND no stories have status "ready-for-dev": recommend staying focused on active story
- IF all epics have status "backlog" AND no stories have status "ready-for-dev": prompt `/bmad:bmm:workflows:create-story`
- IF `generated` timestamp is more than 7 days old: warn "sprint-status.yaml may be stale"
- IF any story key doesn't match an epic pattern (e.g., story "5-1-..." but no "epic-5"): warn "orphaned story detected"
- IF any epic has status in-progress but has no associated stories: warn "in-progress epic has no stories"
Pick the next recommended workflow using priority:
When selecting "first" story: sort by epic number, then story number (e.g., 1-1 before 1-2 before 2-1)
1. If any story status == in-progress → recommend `dev-story` for the first in-progress story
2. Else if any story status == review → recommend `code-review` for the first review story
3. Else if any story status == ready-for-dev → recommend `dev-story`
4. Else if any story status == backlog → recommend `create-story`
5. Else if any retrospective status == optional → recommend `retrospective`
6. Else → All implementation items done; suggest `workflow-status` to plan next phase
Store selected recommendation as: next_story_id, next_workflow_id, next_agent (SM/DEV as appropriate)
Pick an option:
1) Run recommended workflow now
2) Show all stories grouped by status
3) Show raw sprint-status.yaml
4) Exit
Choice:
Display the full contents of {sprint_status_file}
Exit workflow
Load and parse {sprint_status_file} same as Step 2
Compute recommendation same as Step 3
next_workflow_id = {{next_workflow_id}}
next_story_id = {{next_story_id}}
count_backlog = {{count_backlog}}
count_ready = {{count_ready}}
count_in_progress = {{count_in_progress}}
count_review = {{count_review}}
count_done = {{count_done}}
epic_backlog = {{epic_backlog}}
epic_in_progress = {{epic_in_progress}}
epic_done = {{epic_done}}
risks = {{risks}}
Return to caller
Check that {sprint_status_file} exists
is_valid = false
error = "sprint-status.yaml missing"
suggestion = "Run sprint-planning to create it"
Return
Read and parse {sprint_status_file}
Validate required metadata fields exist: generated, project, project_key, tracking_system, story_location
is_valid = false
error = "Missing required field(s): {{missing_fields}}"
suggestion = "Re-run sprint-planning or add missing fields manually"
Return
Verify development_status section exists with at least one entry
is_valid = false
error = "development_status missing or empty"
suggestion = "Re-run sprint-planning or repair the file manually"
Return
Validate all status values against known valid statuses:
- Stories: backlog, ready-for-dev, in-progress, review, done (legacy: drafted)
- Epics: backlog, in-progress, done (legacy: contexted)
- Retrospectives: optional, done
is_valid = false
error = "Invalid status values: {{invalid_entries}}"
suggestion = "Fix invalid statuses in sprint-status.yaml"
Return
is_valid = true
message = "sprint-status.yaml valid: metadata complete, all statuses recognized"