From 2496017a5b670268a845ec5bfb44009b7c889962 Mon Sep 17 00:00:00 2001 From: Jonah Schulte Date: Thu, 8 Jan 2026 08:08:38 -0500 Subject: [PATCH] fix(batch-super-dev): Add comprehensive file discovery for DOT and HYPHEN notation Problem: - Workflow failed to find story files using DOT notation (story-20.9.md) - Only checked hyphen patterns (20-9.md, story-20-9.md) - Caused false "file missing" errors for existing stories Solution: - Parse story_key to extract epic_num and story_num - Try 6 patterns in priority order: 1. story-{epic}.{story}.md (DOT, no suffix) 2. story-{epic}.{story}*.md (DOT with suffix, glob) 3. {epic}-{story}.md (HYPHEN, no prefix) 4. {epic}-{story}*.md (HYPHEN with suffix) 5. story-{story_key}.md (literal with prefix) 6. {story_key}.md (literal) - Use Glob tool for wildcard matching - Explicit examples for each pattern Impact: - Correctly finds story-20.9-megamenu-navigation.md - Handles both naming conventions automatically - No more false missing file errors Tested with: Stories 20.9, 20.10, 20.11 (all found correctly) --- .../batch-super-dev/instructions.md | 39 ++++++++++++++++++- src/modules/cis/module.yaml | 1 - 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md b/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md index be66012f..2242d558 100644 --- a/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md +++ b/src/modules/bmm/workflows/4-implementation/batch-super-dev/instructions.md @@ -75,8 +75,43 @@ Run `/bmad:bmm:workflows:sprint-status` to see current status. Read comment field for each story from sprint-status.yaml (text after # on the same line) - For each story, verify story file exists using multiple naming patterns: - Try in order: 1) {sprint_artifacts}/{story_key}.md, 2) {sprint_artifacts}/story-{story_key}.md, 3) {sprint_artifacts}/{story_key_with_dots}.md + For each story, verify story file exists using COMPREHENSIVE naming pattern detection: + + + Parse story_key (e.g., "20-9-megamenu-navigation" or "20-9") to extract: + - epic_num: first number (e.g., "20") + - story_num: second number (e.g., "9") + - optional_suffix: everything after second number (e.g., "-megamenu-navigation" or empty) + Input: "20-9-megamenu-navigation" → epic=20, story=9, suffix="-megamenu-navigation" + Input: "20-11" → epic=20, story=11, suffix="" + + + + Use Glob tool to search for files matching these patterns (in priority order): + + story-{epic_num}.{story_num}.md + story-20.9.md (DOT notation, no suffix) + + story-{epic_num}.{story_num}*.md + story-20.9-megamenu-navigation.md (DOT notation WITH suffix - use Glob wildcard) + + {epic_num}-{story_num}.md + 20-9.md (HYPHEN notation, no "story-" prefix) + + {epic_num}-{story_num}*.md + 20-9-megamenu-navigation.md (HYPHEN notation WITH suffix) + + story-{story_key}.md + story-20-9-megamenu-navigation.md (literal story_key with "story-" prefix) + + {story_key}.md + 20-9-megamenu-navigation.md (literal story_key) + + Stop at first match and store file_path + If NO match found after all 6 patterns → file_status = ❌ MISSING + If match found → file_status = ✅ EXISTS + + Mark stories as: ✅ (file exists), ❌ (file missing), 🔄 (already implemented but not marked done) diff --git a/src/modules/cis/module.yaml b/src/modules/cis/module.yaml index 02ce7ca9..f03960d0 100644 --- a/src/modules/cis/module.yaml +++ b/src/modules/cis/module.yaml @@ -4,7 +4,6 @@ header: "Creative Innovation Suite (CIS) Module" subheader: "No custom configuration required - uses Core settings only" default_selected: false # This module will not be selected by default for new installations - # Variables from Core Config inserted: ## user_name ## communication_language