diff --git a/src/modules/bmm/docs/workflows-implementation.md b/src/modules/bmm/docs/workflows-implementation.md index 7d756097..39d6d591 100644 --- a/src/modules/bmm/docs/workflows-implementation.md +++ b/src/modules/bmm/docs/workflows-implementation.md @@ -108,7 +108,8 @@ Stories move through these states in the sprint status file: **As Needed:** -- Run `workflow-status` anytime to check progress +- Run `sprint-status` anytime in Phase 4 to inspect sprint-status.yaml and get the next implementation command +- Run `workflow-status` for cross-phase routing and project-level paths - Run `correct-course` if significant changes needed --- @@ -155,7 +156,7 @@ PRD (PM) → Architecture (Architect) ## Troubleshooting **Q: Which workflow should I run next?** -A: Run `workflow-status` - it reads the sprint status file and tells you exactly what to do. +A: Run `workflow-status` - it reads the sprint status file and tells you exactly what to do. During implementation (Phase 4) run `sprint-status` (fast check against sprint-status.yaml). **Q: Story needs significant changes mid-implementation?** A: Run `correct-course` to analyze impact and route appropriately. diff --git a/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md b/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md new file mode 100644 index 00000000..84a92ea4 --- /dev/null +++ b/src/modules/bmm/workflows/4-implementation/sprint-status/instructions.md @@ -0,0 +1,174 @@ +# Sprint Status - Multi-Mode Service + +The workflow execution engine is governed by: {project-root}/{bmad_folder}/core/tasks/workflow.xml +You MUST have already loaded and processed: {project-root}/{bmad_folder}/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} + + ❌ sprint-status.yaml not found. +Run `/bmad:bmm:workflows:sprint-planning` to generate it, then rerun sprint-status. + 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) + Count story statuses: backlog, drafted, ready-for-dev, in-progress, review, done + Count epic statuses: backlog, contexted + Detect risks: + - Stories in review but no reviewer assigned context → suggest `/bmad:bmm:workflows:code-review` + - Stories in in-progress with no ready-for-dev items behind them → keep focus on the active story + - All epics backlog/contexted but no stories drafted → prompt to run `/bmad:bmm:workflows:create-story` + + + + Pick the next recommended workflow using priority: + 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 == drafted → recommend `story-ready` + 5. Else if any story status == backlog → recommend `create-story` + 6. Else if any epic status == backlog → recommend `epic-tech-context` + 7. Else if retrospectives are optional → recommend `retrospective` + 8. 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) + + + + +## 📊 Sprint Status + +- Project: {{project}} ({{project_key}}) +- Tracking: {{tracking_system}} +- Status file: {sprint_status_file} + +**Stories:** backlog {{count_backlog}}, drafted {{count_drafted}}, ready-for-dev {{count_ready}}, in-progress {{count_in_progress}}, review {{count_review}}, done {{count_done}} + +**Epics:** backlog {{epic_backlog}}, contexted {{epic_contexted}} + +**Next Recommendation:** /bmad:bmm:workflows:{{next_workflow_id}} ({{next_story_id}}) + +{{#if risks}} +**Risks:** +{{#each risks}} + +- {{this}} + {{/each}} + {{/if}} + +{{#if by_epic}} +**Per Epic:** +{{#each by_epic}} + +- {{epic_id}}: context={{context_status}}, stories → backlog {{backlog}}, drafted {{drafted}}, ready {{ready_for_dev}}, in-progress {{in_progress}}, review {{review}}, done {{done}} + {{/each}} + {{/if}} + + + + + Pick an option: +1) Run recommended workflow now +2) Show all stories grouped by status +3) Show raw sprint-status.yaml +4) Exit +Choice: + + + Run `/bmad:bmm:workflows:{{next_workflow_id}}`. +If the command targets a story, set `story_key={{next_story_id}}` when prompted. + + + + +### Stories by Status +- In Progress: {{stories_in_progress}} +- Review: {{stories_in_review}} +- Ready for Dev: {{stories_ready_for_dev}} +- Drafted: {{stories_drafted}} +- Backlog: {{stories_backlog}} +- Done: {{stories_done}} + + + + + 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_drafted = {{count_drafted}} + count_ready = {{count_ready}} + count_in_progress = {{count_in_progress}} + count_review = {{count_review}} + count_done = {{count_done}} + epic_backlog = {{epic_backlog}} + epic_contexted = {{epic_contexted}} + warnings = {{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 file and verify it has a development_status section 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 + + is_valid = true + message = "sprint-status.yaml present and parsable" + + + diff --git a/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml b/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml new file mode 100644 index 00000000..45a4d105 --- /dev/null +++ b/src/modules/bmm/workflows/4-implementation/sprint-status/workflow.yaml @@ -0,0 +1,35 @@ +# Sprint Status - Implementation Tracker +name: sprint-status +description: "Summarize sprint-status.yaml, surface risks, and route to the right implementation workflow." +author: "BMad" + +# Critical variables from config +config_source: "{project-root}/{bmad_folder}/bmm/config.yaml" +output_folder: "{config_source}:output_folder" +user_name: "{config_source}:user_name" +communication_language: "{config_source}:communication_language" +document_output_language: "{config_source}:document_output_language" +date: system-generated +sprint_artifacts: "{config_source}:sprint_artifacts" + +# Workflow components +installed_path: "{project-root}/{bmad_folder}/bmm/workflows/4-implementation/sprint-status" +instructions: "{installed_path}/instructions.md" + +# Inputs +variables: + sprint_status_file: "{sprint_artifacts}/sprint-status.yaml || {output_folder}/sprint-status.yaml" + tracking_system: "file-system" + +# Smart input file references +input_file_patterns: + sprint_status: + description: "Sprint status file generated by sprint-planning" + whole: "{sprint_artifacts}/sprint-status.yaml || {output_folder}/sprint-status.yaml" + load_strategy: "FULL_LOAD" + +# Standalone so IDE commands get generated +standalone: true + +# No web bundle needed +web_bundle: false