3.2 KiB
3.2 KiB
GitHub Issue #494 Fix Plan: bmad-master Dependency Resolution Bug
Issue Summary
The bmad-master agent incorrectly resolves dependency paths due to missing variable interpolation syntax in the IDE-FILE-RESOLUTION documentation. Line 14 shows Dependencies map to root/type/name instead of Dependencies map to {root}/{type}/{name}, causing the agent to treat "root" as a literal directory name rather than a variable placeholder.
Root Cause Analysis
- File:
bmad-core/agents/bmad-master.md:14 - Problem: Missing curly braces in variable interpolation syntax
- Current:
Dependencies map to root/type/name - Expected:
Dependencies map to {root}/{type}/{name} - Impact: Agent resolves paths like
bmad/tasks/create-doc.mdinstead of.bmad/tasks/create-doc.md
Fix Strategy
Phase 1: Detection and Analysis
- Locate the problematic file - Find
bmad-core/agents/bmad-master.md - Identify the exact line - Line 14 with the incorrect path format
- Analyze dependency resolution logic - Understand how paths are processed
- Document current behavior - Create test cases showing the bug
Phase 2: Test Development
- Create detection tests - Tests that reproduce the bug
- Create validation tests - Tests that verify the fix works
- Create regression tests - Ensure fix doesn't break other functionality
- Test path resolution logic - Verify variable interpolation works correctly
Phase 3: Implementation
- Fix the documentation - Add proper curly braces
{root}/{type}/{name} - Update any related code - Ensure path resolution logic handles variables correctly
- Validate file references - Check if other files have similar issues
- Update examples - Ensure documentation examples are consistent
Phase 4: Testing and Validation
- Run detection tests - Confirm they fail before fix, pass after fix
- Run validation tests - Verify correct path resolution
- Run regression tests - Ensure no side effects
- Test with real scenarios - Use actual bmad-master agent tasks
Phase 5: Deployment
- Apply the fix - Implement the corrected syntax
- Verify in different environments - Test across different IDEs and setups
- Document the change - Update any related documentation
- Close the issue - Confirm resolution and update GitHub issue
Files to Investigate
bmad-core/agents/bmad-master.md- Primary file with the bug- Any path resolution utilities or modules
- Test files related to bmad-master agent
- Configuration files that might use similar syntax
- Documentation files with dependency mapping examples
Success Criteria
- ✅ Bug is detected and reproduced with tests
- ✅ Fix corrects variable interpolation syntax
- ✅ All tests pass after fix implementation
- ✅ Path resolution works correctly (
{root}→.bmad) - ✅ No regression in existing functionality
- ✅ Agent can successfully locate project dependencies
Risk Assessment
- Low Risk: Documentation fix with minimal code impact
- Testing Required: Ensure variable interpolation works across all use cases
- Compatibility: Verify fix works with all supported IDEs and models