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)
This commit is contained in:
parent
73f4bd701b
commit
2496017a5b
|
|
@ -75,8 +75,43 @@ Run `/bmad:bmm:workflows:sprint-status` to see current status.</output>
|
||||||
<step n="2" goal="Display available stories with details">
|
<step n="2" goal="Display available stories with details">
|
||||||
<action>Read comment field for each story from sprint-status.yaml (text after # on the same line)</action>
|
<action>Read comment field for each story from sprint-status.yaml (text after # on the same line)</action>
|
||||||
|
|
||||||
<action>For each story, verify story file exists using multiple naming patterns:</action>
|
<action>For each story, verify story file exists using COMPREHENSIVE naming pattern detection:</action>
|
||||||
<action>Try in order: 1) {sprint_artifacts}/{story_key}.md, 2) {sprint_artifacts}/story-{story_key}.md, 3) {sprint_artifacts}/{story_key_with_dots}.md</action>
|
|
||||||
|
<substep n="2a" title="Parse story key to extract epic and story numbers">
|
||||||
|
<action>Parse story_key (e.g., "20-9-megamenu-navigation" or "20-9") to extract:</action>
|
||||||
|
<action> - epic_num: first number (e.g., "20")</action>
|
||||||
|
<action> - story_num: second number (e.g., "9")</action>
|
||||||
|
<action> - optional_suffix: everything after second number (e.g., "-megamenu-navigation" or empty)</action>
|
||||||
|
<example>Input: "20-9-megamenu-navigation" → epic=20, story=9, suffix="-megamenu-navigation"</example>
|
||||||
|
<example>Input: "20-11" → epic=20, story=11, suffix=""</example>
|
||||||
|
</substep>
|
||||||
|
|
||||||
|
<substep n="2b" title="Try multiple file patterns using Glob tool">
|
||||||
|
<action>Use Glob tool to search for files matching these patterns (in priority order):</action>
|
||||||
|
|
||||||
|
<pattern n="1">story-{epic_num}.{story_num}.md</pattern>
|
||||||
|
<example>story-20.9.md (DOT notation, no suffix)</example>
|
||||||
|
|
||||||
|
<pattern n="2">story-{epic_num}.{story_num}*.md</pattern>
|
||||||
|
<example>story-20.9-megamenu-navigation.md (DOT notation WITH suffix - use Glob wildcard)</example>
|
||||||
|
|
||||||
|
<pattern n="3">{epic_num}-{story_num}.md</pattern>
|
||||||
|
<example>20-9.md (HYPHEN notation, no "story-" prefix)</example>
|
||||||
|
|
||||||
|
<pattern n="4">{epic_num}-{story_num}*.md</pattern>
|
||||||
|
<example>20-9-megamenu-navigation.md (HYPHEN notation WITH suffix)</example>
|
||||||
|
|
||||||
|
<pattern n="5">story-{story_key}.md</pattern>
|
||||||
|
<example>story-20-9-megamenu-navigation.md (literal story_key with "story-" prefix)</example>
|
||||||
|
|
||||||
|
<pattern n="6">{story_key}.md</pattern>
|
||||||
|
<example>20-9-megamenu-navigation.md (literal story_key)</example>
|
||||||
|
|
||||||
|
<action>Stop at first match and store file_path</action>
|
||||||
|
<action>If NO match found after all 6 patterns → file_status = ❌ MISSING</action>
|
||||||
|
<action>If match found → file_status = ✅ EXISTS</action>
|
||||||
|
</substep>
|
||||||
|
|
||||||
<action>Mark stories as: ✅ (file exists), ❌ (file missing), 🔄 (already implemented but not marked done)</action>
|
<action>Mark stories as: ✅ (file exists), ❌ (file missing), 🔄 (already implemented but not marked done)</action>
|
||||||
|
|
||||||
<output>
|
<output>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ header: "Creative Innovation Suite (CIS) Module"
|
||||||
subheader: "No custom configuration required - uses Core settings only"
|
subheader: "No custom configuration required - uses Core settings only"
|
||||||
default_selected: false # This module will not be selected by default for new installations
|
default_selected: false # This module will not be selected by default for new installations
|
||||||
|
|
||||||
|
|
||||||
# Variables from Core Config inserted:
|
# Variables from Core Config inserted:
|
||||||
## user_name
|
## user_name
|
||||||
## communication_language
|
## communication_language
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue