From be83d1deaa7b5c2ca5d26c02511d010dfddeb51d Mon Sep 17 00:00:00 2001 From: Jonah Schulte Date: Sun, 25 Jan 2026 23:51:05 -0500 Subject: [PATCH] fix: sync src/bmm with src/modules/bmm batch-super-dev workflow src/bmm was out of sync (1103 lines vs 1261 lines). Now both have Step 0 as Load sprint-status (correct). This is what gets published to npm and copied by bmad install. --- .../batch-super-dev/instructions.md | 440 ++++++++++++------ 1 file changed, 299 insertions(+), 141 deletions(-) diff --git a/src/bmm/workflows/4-implementation/batch-super-dev/instructions.md b/src/bmm/workflows/4-implementation/batch-super-dev/instructions.md index a14e5df8..dd1757f6 100644 --- a/src/bmm/workflows/4-implementation/batch-super-dev/instructions.md +++ b/src/bmm/workflows/4-implementation/batch-super-dev/instructions.md @@ -51,86 +51,14 @@ This workflow helps you "mind the gap" between story requirements and codebase r - - Present execution mode options to user - - -╔═══════════════════════════════════════════════════════════════════╗ -║ BATCH SUPER-DEV: Execution Mode Selection ║ -╚═══════════════════════════════════════════════════════════════════╝ - -⚕️ HOSPITAL-GRADE CODE STANDARDS ACTIVE ⚕️ -Lives are at stake. All code must meet safety-critical reliability standards. - -Choose execution mode: - -[I] INTERACTIVE CHECKPOINT MODE (Recommended for oversight) - - After each story completes, pause for your review - - You approve before proceeding to next story - - Allows course correction if issues detected - - Best for: Critical features, new team members, complex epics - -[A] FULLY AUTONOMOUS MODE (Maximum quality, zero interaction) - - Process all selected stories without pausing - - ENHANCED quality standards (even more rigorous than interactive) - - Hospital-grade code verification at every step - - NO shortcuts, NO skimping, NO corner-cutting - - Best for: Well-defined stories, experienced implementation - -⚠️ AUTONOMOUS MODE = HIGHER QUALITY, NOT LOWER -In autonomous mode, quality standards are ENHANCED because there's no -human oversight in the loop. Every decision is double-checked. - -QUALITY >> DURATION. We prioritize correctness over speed. - -Which mode? [I/A]: - - - Read user input - - - Set execution_mode = "interactive_checkpoint" - -✅ Interactive Checkpoint Mode Selected - -After each story implementation: -- Full quality report displayed -- You approve before next story begins -- Allows real-time oversight and intervention - - - - - Set execution_mode = "fully_autonomous" - -⚕️ Fully Autonomous Mode Selected - HOSPITAL-GRADE STANDARDS ENFORCED - -Quality enhancements for autonomous mode: -✅ Double validation at each step -✅ Comprehensive error checking -✅ Detailed audit trail generation -✅ Zero-tolerance for shortcuts -✅ Hospital-grade code verification - -Processing will continue until ALL selected stories complete. -NO human interaction required until completion. - -QUALITY OVER SPEED: Taking time to ensure correctness. - - Activate hospital_grade_mode = true - Set quality_multiplier = 1.5 - - - Store execution_mode for use in subsequent steps - - - + Read {sprint_status} file Parse metadata: project, project_key, tracking_system Parse development_status map - Filter stories with status = "ready-for-dev" + Filter stories with status = "ready-for-dev" OR "backlog" Exclude entries that are epics (keys starting with "epic-") or retrospectives (keys ending with "-retrospective") + Group by status: ready_for_dev_stories, backlog_stories Further filter stories to only include those starting with "{filter_by_epic}-" @@ -140,17 +68,19 @@ QUALITY OVER SPEED: Taking time to ensure correctness. Sort filtered stories by epic number, then story number (e.g., 1-1, 1-2, 2-1, 3-1) Store as: ready_for_dev_stories (list of story keys) - - ✅ No ready-for-dev stories found. + + ✅ No available stories found (ready-for-dev or backlog). All stories are either in-progress, review, or done! -Run `/bmad:bmm:workflows:sprint-status` to see current status. +Run `/bmad_bmm_sprint-status` to see current status. Exit workflow + + Combine both lists: available_stories = ready_for_dev_stories + backlog_stories - + Read comment field for each story from sprint-status.yaml (text after # on the same line) For each story, verify story file exists using COMPREHENSIVE naming pattern detection: @@ -193,99 +123,66 @@ Run `/bmad:bmm:workflows:sprint-status` to see current status. Mark stories as: ✅ (file exists), ❌ (file missing), 🔄 (already implemented but not marked done) -## 📦 Ready-for-Dev Stories ({{count}}) +## 📦 Available Stories ({{count}}) {{#if filter_by_epic}} **Filtered by Epic {{filter_by_epic}}** {{/if}} +{{#if ready_for_dev_stories.length > 0}} +### Ready for Dev ({{ready_for_dev_stories.length}}) {{#each ready_for_dev_stories}} -{{@index}}. **{{key}}** {{file_status_icon}} +{{@index}}. **{{key}}** {{file_status_icon}} {{sprint_status}} {{#if comment}}→ {{comment}}{{/if}} {{#if file_path}} File: {{file_path}}{{/if}} {{/each}} +{{/if}} + +{{#if backlog_stories.length > 0}} +### Backlog ({{backlog_stories.length}}) +{{#each backlog_stories}} +{{@index}}. **{{key}}** {{file_status_icon}} [BACKLOG] + {{#if comment}}→ {{comment}}{{/if}} + {{#if file_path}} File: {{file_path}}{{else}} Needs story creation{{/if}} +{{/each}} +{{/if}} --- **Legend:** - ✅ Story file exists, ready to implement - 🔄 Already implemented, just needs status update - ❌ Story file missing, needs creation first +- [BACKLOG] Story needs gap analysis before implementation **Total:** {{count}} stories available **Max batch size:** {{max_stories}} stories - + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔍 VALIDATING STORY FILES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - For each story in ready_for_dev_stories: + For each story in available_stories (ready_for_dev + backlog): Check if story file exists (already done in Step 2) - -📝 Story {{story_key}}: File missing - - - Create story file with gap analysis? (yes/no): - - - -⚠️ STORY CREATION REQUIRES MANUAL WORKFLOW EXECUTION - -**Story:** {{story_key}} -**Status:** File missing or incomplete - -**Problem:** -Agents cannot invoke /create-story-with-gap-analysis workflow autonomously. -This workflow requires: -- Interactive user prompts -- Context-heavy codebase scanning -- Gap analysis decision-making - -**Required Action:** - -1. **Exit this batch execution:** - - Remaining stories will be skipped - - Batch will continue with valid stories only - -2. **Regenerate story manually:** - ``` - /create-story-with-gap-analysis - ``` - When prompted, provide: - - Story key: {{story_key}} - - Epic: {epic from parent story} - - Scope: {widget list or feature description} - -3. **Validate story format:** - ``` - ./scripts/validate-all-stories.sh - ``` - Must show: "✅ All stories ready for batch execution!" - -4. **Re-run batch-super-dev:** - - Story will now be properly formatted - - Can be executed in next batch run - -**Skipping story {{story_key}} from current batch execution.** - - - Mark story for removal from selection - Add to skipped_stories list with reason: "Story creation requires manual workflow (agents cannot invoke /create-story)" - Add to manual_actions_required list: "Regenerate {{story_key}} with /create-story-with-gap-analysis" + + 📝 Story {{story_key}}: BACKLOG - will create basic story file + Mark story as needs_story_creation = true + Mark story.creation_workflow = "/create-story" (lightweight, no gap analysis) + Mark story as validated (will create in next step) - - ⏭️ Skipping story {{story_key}} (file missing, user declined creation) + + ❌ Story {{story_key}}: File MISSING but status is ready-for-dev Mark story for removal from selection - Add to skipped_stories list with reason: "User declined story creation" + Add to skipped_stories list with reason: "Story file missing (status ready-for-dev but no file)" @@ -458,7 +355,7 @@ Run `/bmad:bmm:workflows:sprint-status` to see status. - + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📊 SCORING STORY COMPLEXITY @@ -580,7 +477,7 @@ Run /create-story or /validate-create-story to create proper story files, then r - + **Select stories to process:** @@ -627,14 +524,275 @@ Only the first {{max_stories}} will be processed. ## 📋 Selected Stories ({{count}}) {{#each selected_stories}} -{{@index}}. {{key}} +{{@index}}. {{key}} {{#if is_backlog}}[BACKLOG - needs story creation]{{/if}} {{/each}} **Estimated time:** {{count}} stories × 30-60 min/story = {{estimated_hours}} hours - + + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +🔍 IMPLEMENTATION READINESS CHECK +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Validating selected stories for quality and completeness... + + + For each selected story: + + + Read story file: {{story_file_path}} + + + + ⚠️ {{story_key}}: No story file (BACKLOG) - will create during execution + Mark story as needs_creation + Continue to next story + + + + ❌ {{story_key}}: Story file MISSING but status is ready-for-dev (inconsistent state) + Add to validation_failures list + Continue to next story + + + + + Validate story completeness: + - Count sections (need 12) + - Check Current State word count (need ≥100) + - Check gap analysis markers (✅/❌) + - Count Acceptance Criteria (need ≥3) + - Count unchecked tasks (need ≥3) + + + + ❌ {{story_key}}: INSUFFICIENT TASKS ({{task_count}}/3 minimum) + Add to validation_failures: "{{story_key}}: Only {{task_count}} tasks" + + + + ⚠️ {{story_key}}: Story incomplete ({{sections_found}}/12 sections{{#if !gap_analysis}}, no gap analysis{{/if}}) + Add to validation_warnings: "{{story_key}}: Needs regeneration" + + + + ✅ {{story_key}}: Valid and ready + Add to validated_stories list + + + + + + +❌ **Validation Failures ({{validation_failures.length}}):** + +{{#each validation_failures}} + - {{this}} +{{/each}} + +These stories CANNOT be processed. Options: +1. Remove them from selection +2. Fix them manually +3. Cancel batch execution + + + Remove failed stories and continue? (yes/no): + + + Remove validation_failures from selected_stories + ✅ Removed {{validation_failures.length}} invalid stories. Continuing with {{selected_stories.length}} valid stories. + + + + ❌ Batch processing cancelled. Please fix story validation issues first. + Exit workflow + + + + + +⚠️ **Validation Warnings ({{validation_warnings.length}}):** + +{{#each validation_warnings}} + - {{this}} +{{/each}} + +These stories have quality issues but can still be processed. +Recommend regenerating with /create-story-with-gap-analysis for better quality. + + + Continue with these stories anyway? (yes/no): + + + ❌ Batch processing cancelled. + Exit workflow + + + + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +✅ Implementation Readiness: PASS +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +**Validated:** {{validated_stories.length}} stories +**Needs Creation:** {{needs_creation.length}} stories (BACKLOG) +**Quality:** All stories meet minimum standards +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + + + + + ✅ All stories have files - skipping story creation + Jump to Step 3 + + + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +📝 BATCH STORY CREATION +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +{{needs_creation.length}} stories need creation (BACKLOG status): +{{#each needs_creation}} + - {{story_key}} +{{/each}} + +These will be created using /create-story (lightweight, no gap analysis). +Gap analysis will happen just-in-time during implementation (Step 2 of super-dev-pipeline). + + + Create these {{needs_creation.length}} story files now? (yes/no): + + + ⏭️ Skipping story creation. These stories will be removed from batch. + Remove needs_creation stories from selected_stories + + + ❌ No stories remaining after removing backlog stories. Exiting. + Exit workflow + + + + For each story in needs_creation: + + + 📝 Creating story {{@index}}/{{needs_creation.length}}: {{story_key}}... + + Invoke workflow: /bmad_bmm_create-story + Parameters: + - story_key: {{story_key}} + - epic_num: {{epic_num}} + - mode: batch (auto-approve, minimal prompts) + + + + ✅ Story created: {{story_key}} + Mark story.needs_story_creation = false + + + + ❌ Failed to create story: {{story_key}} + Add to failed_creations list + Remove from selected_stories + + + + + +⚠️ {{failed_creations.length}} stories failed creation: +{{#each failed_creations}} + - {{this}} +{{/each}} + +These will be skipped in batch execution. + + + + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +✅ Story Creation Complete +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +**Created:** {{needs_creation.length - failed_creations.length}} stories +**Failed:** {{failed_creations.length}} stories +**Ready for implementation:** {{selected_stories.length}} stories + +Note: Gap analysis will happen just-in-time during implementation. +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + + + + +╔═══════════════════════════════════════════════════════════════════╗ +║ BATCH SUPER-DEV: Execution Mode Selection ║ +╚═══════════════════════════════════════════════════════════════════╝ + +⚕️ HOSPITAL-GRADE CODE STANDARDS ACTIVE ⚕️ +Lives are at stake. All code must meet safety-critical reliability standards. + + + +**Choose execution mode:** + +[I] INTERACTIVE CHECKPOINT MODE (Recommended for oversight) + - After each story completes, pause for your review + - You approve before proceeding to next story + - Allows course correction if issues detected + - Best for: Critical features, new team members, complex epics + +[A] FULLY AUTONOMOUS MODE (Maximum quality, zero interaction) + - Process all selected stories without pausing + - ENHANCED quality standards (even more rigorous than interactive) + - Hospital-grade code verification at every step + - NO shortcuts, NO skimping, NO corner-cutting + - Best for: Well-defined stories, experienced implementation + +⚠️ AUTONOMOUS MODE = HIGHER QUALITY, NOT LOWER +In autonomous mode, quality standards are ENHANCED because there's no +human oversight in the loop. Every decision is double-checked. + +QUALITY >> DURATION. We prioritize correctness over speed. + +Which mode? [I/A]: + + + Read user input + + + Set execution_mode = "interactive_checkpoint" + +✅ Interactive Checkpoint Mode Selected + +After each story implementation: +- Full quality report displayed +- You approve before next story begins +- Allows real-time oversight and intervention + + + + + Set execution_mode = "fully_autonomous" + +⚕️ Fully Autonomous Mode Selected - HOSPITAL-GRADE STANDARDS ENFORCED + +Quality enhancements for autonomous mode: +✅ Double validation at each step +✅ Comprehensive error checking +✅ Detailed audit trail generation +✅ Zero-tolerance for shortcuts +✅ Hospital-grade code verification + +Processing will continue until ALL selected stories complete. +NO human interaction required until completion. + +QUALITY OVER SPEED: Taking time to ensure correctness. + + Activate hospital_grade_mode = true + Set quality_multiplier = 1.5 + + **How should these stories be processed?**