bmad-method 4.17.0 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.claude/commands/bmad-master.md +0 -1
  2. package/CHANGELOG.md +20 -0
  3. package/bmad-core/core-config.yml +0 -1
  4. package/{bmad-core → common}/tasks/create-doc.md +2 -2
  5. package/{expansion-packs/expansion-creator/common-tasks → common/tasks}/execute-checklist.md +2 -6
  6. package/common/utils/workflow-management.md +69 -0
  7. package/dist/agents/analyst.txt +2 -2
  8. package/dist/agents/architect.txt +4 -8
  9. package/dist/agents/bmad-master.txt +35 -270
  10. package/dist/agents/bmad-orchestrator.txt +33 -187
  11. package/dist/agents/dev.txt +2 -6
  12. package/dist/agents/pm.txt +4 -8
  13. package/dist/agents/po.txt +2 -6
  14. package/dist/agents/sm.txt +2 -6
  15. package/dist/agents/ux-expert.txt +4 -8
  16. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +4 -8
  17. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +2 -6
  18. package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +2 -6
  19. package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +35 -193
  20. package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +2 -2
  21. package/dist/expansion-packs/expansion-creator/agents/bmad-the-creator.txt +5 -5
  22. package/dist/teams/team-all.txt +35 -193
  23. package/dist/teams/team-fullstack.txt +35 -193
  24. package/dist/teams/team-ide-minimal.txt +35 -193
  25. package/dist/teams/team-no-ui.txt +35 -193
  26. package/docs/working-in-the-brownfield.md +2 -2
  27. package/expansion-packs/bmad-2d-phaser-game-dev/config.yml +5 -0
  28. package/expansion-packs/bmad-creator-tools/config.yml +5 -0
  29. package/expansion-packs/{expansion-creator → bmad-creator-tools}/tasks/generate-expansion-pack.md +5 -5
  30. package/expansion-packs/bmad-infrastructure-devops/config.yml +5 -0
  31. package/package.json +1 -1
  32. package/test-ide-paths.js +41 -0
  33. package/tools/builders/web-builder.js +60 -19
  34. package/tools/installer/config/ide-agent-config.yml +58 -0
  35. package/tools/installer/config/install.config.yml +0 -85
  36. package/tools/installer/lib/config-loader.js +89 -41
  37. package/tools/installer/lib/file-manager.js +1 -0
  38. package/tools/installer/lib/ide-setup.js +150 -116
  39. package/tools/installer/lib/installer.js +263 -9
  40. package/tools/installer/package.json +1 -1
  41. package/tools/lib/dependency-resolver.js +15 -0
  42. package/bmad-core/tasks/core-dump.md +0 -74
  43. package/bmad-core/tasks/execute-checklist.md +0 -97
  44. package/bmad-core/utils/file-resolution-context.md +0 -10
  45. package/bmad-core/utils/workflow-management.md +0 -223
  46. package/expansion-packs/bmad-2d-phaser-game-dev/manifest.yml +0 -45
  47. package/expansion-packs/bmad-infrastructure-devops/manifest.yml +0 -23
  48. package/expansion-packs/bmad-infrastructure-devops/tasks/create-doc.md +0 -74
  49. package/expansion-packs/expansion-creator/common-tasks/create-doc.md +0 -74
  50. package/expansion-packs/expansion-creator/manifest.yml +0 -12
  51. package/expansion-packs/expansion-creator/utils/template-format.md +0 -26
  52. package/expansion-packs/expansion-creator/utils/workflow-management.md +0 -223
  53. /package/{bmad-core → common}/utils/template-format.md +0 -0
  54. /package/expansion-packs/{expansion-creator → bmad-creator-tools}/README.md +0 -0
  55. /package/expansion-packs/{expansion-creator → bmad-creator-tools}/agents/bmad-the-creator.md +0 -0
  56. /package/expansion-packs/{expansion-creator → bmad-creator-tools}/tasks/create-agent.md +0 -0
  57. /package/expansion-packs/{expansion-creator → bmad-creator-tools}/templates/agent-teams-tmpl.md +0 -0
  58. /package/expansion-packs/{expansion-creator → bmad-creator-tools}/templates/agent-tmpl.md +0 -0
  59. /package/expansion-packs/{expansion-creator → bmad-creator-tools}/templates/expansion-pack-plan-tmpl.md +0 -0
  60. /package/{bmad-core/utils → tools/md-assets}/web-agent-startup-instructions.md +0 -0
@@ -560,9 +560,9 @@ Confirm with the user their preferred interaction style:
560
560
 
561
561
  ### 3. Execute Template
562
562
 
563
- - Load specified template from `templates#*` or the /templates directory
563
+ - Load specified template from `templates#*` or the `{root}/templates directory`
564
564
  - Follow ALL embedded LLM instructions within the template
565
- - Process template markup according to `utils#template-format` conventions
565
+ - Process template markup according to `utils#template-format` or `{root}/utils/template-format` conventions
566
566
 
567
567
  ### 4. Template Processing Rules
568
568
 
@@ -1429,227 +1429,73 @@ Use the **expansion-creator** pack to build your own:
1429
1429
  ==================== START: utils#workflow-management ====================
1430
1430
  # Workflow Management
1431
1431
 
1432
- This utility enables the BMAD orchestrator to manage and execute team workflows.
1432
+ Enables BMAD orchestrator to manage and execute team workflows.
1433
1433
 
1434
- ## Important: Dynamic Workflow Loading
1434
+ ## Dynamic Workflow Loading
1435
1435
 
1436
- The BMAD orchestrator MUST read the available workflows from the current team configuration's `workflows` field. Do not use hardcoded workflow lists. Each team bundle defines its own set of supported workflows based on the agents it includes.
1436
+ Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
1437
1437
 
1438
- **Critical Distinction**:
1438
+ **Key Commands**:
1439
1439
 
1440
- - When asked "what workflows are available?", show ONLY the workflows defined in the current team bundle's configuration
1441
- - Use `/agent-list` to show agents in the current bundle
1442
- - Use `/workflows` to show workflows in the current bundle, NOT any creation tasks
1443
-
1444
- ### Workflow Descriptions
1445
-
1446
- When displaying workflows, use these descriptions based on the workflow ID:
1447
-
1448
- - **greenfield-fullstack**: Build a new full-stack application from concept to development
1449
- - **brownfield-fullstack**: Enhance an existing full-stack application with new features
1450
- - **greenfield-service**: Build a new backend service or API from concept to development
1451
- - **brownfield-service**: Enhance an existing backend service or API
1452
- - **greenfield-ui**: Build a new frontend/UI application from concept to development
1453
- - **brownfield-ui**: Enhance an existing frontend/UI application
1440
+ - `/workflows` - List workflows in current bundle or workflows folder
1441
+ - `/agent-list` - Show agents in current bundle
1454
1442
 
1455
1443
  ## Workflow Commands
1456
1444
 
1457
1445
  ### /workflows
1458
1446
 
1459
- Lists all available workflows for the current team. The available workflows are determined by the team configuration and may include workflows such as:
1460
-
1461
- - greenfield-fullstack
1462
- - brownfield-fullstack
1463
- - greenfield-service
1464
- - brownfield-service
1465
- - greenfield-ui
1466
- - brownfield-ui
1467
-
1468
- The actual list depends on which team bundle is loaded. When responding to this command, display the workflows that are configured in the current team's `workflows` field.
1469
-
1470
- Example response format:
1471
-
1472
- ```text
1473
- Available workflows for [Team Name]:
1474
- 1. [workflow-id] - [Brief description based on workflow type]
1475
- 2. [workflow-id] - [Brief description based on workflow type]
1476
- [... etc. ...]
1477
-
1478
- Use /workflow-start {number or id} to begin a workflow.
1479
- ```
1447
+ Lists available workflows with titles and descriptions.
1480
1448
 
1481
1449
  ### /workflow-start {workflow-id}
1482
1450
 
1483
- Starts a specific workflow and transitions to the first agent.
1484
-
1485
- Example: `/workflow-start greenfield-fullstack`
1451
+ Starts workflow and transitions to first agent.
1486
1452
 
1487
1453
  ### /workflow-status
1488
1454
 
1489
- Shows current workflow progress, completed artifacts, and next steps.
1490
-
1491
- Example response:
1492
-
1493
- ```text
1494
- Current Workflow: Greenfield Full-Stack Development
1495
- Stage: Product Planning (2 of 6)
1496
- Completed:
1497
- ✓ Discovery & Requirements
1498
- - project-brief (completed by Mary)
1499
-
1500
- In Progress:
1501
- ⚡ Product Planning
1502
- - Create PRD (John) - awaiting input
1503
-
1504
- Next: Technical Architecture
1505
- ```
1455
+ Shows current progress, completed artifacts, and next steps.
1506
1456
 
1507
1457
  ### /workflow-resume
1508
1458
 
1509
- Resumes a workflow from where it left off, useful when starting a new chat.
1510
-
1511
- User can provide completed artifacts:
1512
-
1513
- ```text
1514
- User: /workflow-resume greenfield-fullstack
1515
- I have completed: project-brief, PRD
1516
- BMad: I see you've completed Discovery and part of Product Planning.
1517
- Based on the greenfield-fullstack workflow, the next step is:
1518
- - UX Strategy with Sally (ux-expert)
1519
-
1520
- Would you like me to load Sally to continue?
1521
- ```
1459
+ Resumes workflow from last position. User can provide completed artifacts.
1522
1460
 
1523
1461
  ### /workflow-next
1524
1462
 
1525
- Shows the next recommended agent and action in the current workflow.
1526
-
1527
- ## Workflow Execution Flow
1528
-
1529
- ### 1. Starting a Workflow
1463
+ Shows next recommended agent and action.
1530
1464
 
1531
- When a workflow is started:
1465
+ ## Execution Flow
1532
1466
 
1533
- 1. Load the workflow definition
1534
- 2. Identify the first stage and step
1535
- 3. Transition to the required agent
1536
- 4. Provide context about expected inputs/outputs
1537
- 5. Guide artifact creation
1467
+ 1. **Starting**: Load definition Identify first stage → Transition to agent → Guide artifact creation
1538
1468
 
1539
- ### 2. Stage Transitions
1469
+ 2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
1540
1470
 
1541
- After each artifact is completed:
1471
+ 3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
1542
1472
 
1543
- 1. Mark the step as complete
1544
- 2. Check transition conditions
1545
- 3. If stage is complete, move to next stage
1546
- 4. Load the appropriate agent
1547
- 5. Pass relevant artifacts as context
1473
+ 4. **Interruption Handling**: Analyze provided artifacts → Determine position → Suggest next step
1548
1474
 
1549
- ### 3. Artifact Tracking
1475
+ ## Context Passing
1550
1476
 
1551
- Track all created artifacts:
1552
-
1553
- ```yaml
1554
- workflow_state:
1555
- current_workflow: greenfield-fullstack
1556
- current_stage: planning
1557
- current_step: 2
1558
- artifacts:
1559
- project-brief:
1560
- status: completed
1561
- created_by: analyst
1562
- timestamp: 2024-01-15T10:30:00.000Z
1563
- prd:
1564
- status: in-progress
1565
- created_by: pm
1566
- started: 2024-01-15T11:00:00.000Z
1567
- ```
1477
+ When transitioning, pass:
1568
1478
 
1569
- ### 4. Workflow Interruption Handling
1570
-
1571
- When user returns after interruption:
1572
-
1573
- 1. Ask if continuing previous workflow
1574
- 2. Request any completed artifacts
1575
- 3. Analyze provided artifacts
1576
- 4. Determine workflow position
1577
- 5. Suggest next appropriate step
1578
-
1579
- Example:
1580
-
1581
- ```text
1582
- User: I'm working on a new app. Here's my PRD and architecture doc.
1583
- BMad: I see you have a PRD and architecture document. Based on these artifacts,
1584
- it looks like you're following the greenfield-fullstack workflow and have completed
1585
- stages 1-3. The next recommended step would be:
1586
-
1587
- Stage 4: Validation & Refinement
1588
- - Load Sarah (Product Owner) to validate all artifacts
1589
-
1590
- Would you like to continue with this workflow?
1591
- ```
1592
-
1593
- ## Workflow Context Passing
1594
-
1595
- When transitioning between agents, pass:
1596
-
1597
- 1. Previous artifacts created
1598
- 2. Current workflow stage
1599
- 3. Expected outputs
1600
- 4. Any decisions or constraints identified
1601
-
1602
- Example transition:
1603
-
1604
- ```text
1605
- BMad: Great! John has completed the PRD. According to the greenfield-fullstack workflow,
1606
- the next step is UX Strategy with Sally.
1607
-
1608
- /ux-expert
1609
-
1610
- Sally: I see we're in the Product Planning stage of the greenfield-fullstack workflow.
1611
- I have access to:
1612
- - Project Brief from Mary
1613
- - PRD from John
1614
-
1615
- Let's create the UX strategy and UI specifications. First, let me review
1616
- the PRD to understand the features we're designing for...
1617
- ```
1479
+ - Previous artifacts
1480
+ - Current workflow stage
1481
+ - Expected outputs
1482
+ - Decisions/constraints
1618
1483
 
1619
1484
  ## Multi-Path Workflows
1620
1485
 
1621
- Some workflows may have multiple paths:
1486
+ Handle conditional paths by asking clarifying questions when needed.
1622
1487
 
1623
- ```yaml
1624
- conditional_paths:
1625
- - condition: project_type == 'mobile'
1626
- next_stage: mobile-specific-design
1627
- - condition: project_type == 'web'
1628
- next_stage: web-architecture
1629
- - default: fullstack-architecture
1630
- ```
1488
+ ## Best Practices
1631
1489
 
1632
- Handle these by asking clarifying questions when needed.
1490
+ 1. Show progress
1491
+ 2. Explain transitions
1492
+ 3. Preserve context
1493
+ 4. Allow flexibility
1494
+ 5. Track state
1633
1495
 
1634
- ## Workflow Best Practices
1496
+ ## Agent Integration
1635
1497
 
1636
- 1. **Always show progress** - Users should know where they are
1637
- 2. **Explain transitions** - Why moving to next agent
1638
- 3. **Preserve context** - Pass relevant information forward
1639
- 4. **Allow flexibility** - Users can skip or modify steps
1640
- 5. **Track everything** - Maintain complete workflow state
1641
-
1642
- ## Integration with Agents
1643
-
1644
- Each agent should be workflow-aware:
1645
-
1646
- - Know which workflow is active
1647
- - Understand their role in the workflow
1648
- - Access previous artifacts
1649
- - Know expected outputs
1650
- - Guide toward workflow goals
1651
-
1652
- This creates a seamless experience where the entire team works together toward the workflow's objectives.
1498
+ Agents should be workflow-aware: know active workflow, their role, access artifacts, understand expected outputs.
1653
1499
  ==================== END: utils#workflow-management ====================
1654
1500
 
1655
1501
  ==================== START: utils#template-format ====================
@@ -3733,13 +3579,9 @@ The story creation is successful when:
3733
3579
 
3734
3580
  This task provides instructions for validating documentation against checklists. The agent MUST follow these instructions to ensure thorough and systematic validation of documents.
3735
3581
 
3736
- ## Context
3737
-
3738
- The BMAD Method uses various checklists to ensure quality and completeness of different artifacts. Each checklist contains embedded prompts and instructions to guide the LLM through thorough validation and advanced elicitation. The checklists automatically identify their required artifacts and guide the validation process.
3739
-
3740
3582
  ## Available Checklists
3741
3583
 
3742
- If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the bmad-core/checklists folder to select the appropriate one to run.
3584
+ If the user asks or does not specify a specific checklist, list the checklists available to the agent persona. If the task is being run not with a specific agent, tell the user to check the {root}/checklists folder to select the appropriate one to run.
3743
3585
 
3744
3586
  ## Instructions
3745
3587
 
@@ -3748,7 +3590,7 @@ If the user asks or does not specify a specific checklist, list the checklists a
3748
3590
  - If user or the task being run provides a checklist name:
3749
3591
  - Try fuzzy matching (e.g. "architecture checklist" -> "architect-checklist")
3750
3592
  - If multiple matches found, ask user to clarify
3751
- - Load the appropriate checklist from bmad-core/checklists/
3593
+ - Load the appropriate checklist from {root}/checklists/
3752
3594
  - If no checklist specified:
3753
3595
  - Ask the user which checklist they want to use
3754
3596
  - Present the available options from the files in the checklists folder
@@ -116,7 +116,7 @@ The analyst will generate comprehensive documentation of everything.
116
116
 
117
117
  #### Option A: Full Brownfield Workflow (Recommended for Major Changes)
118
118
 
119
- **1. Create Brownfield PRD**
119
+ **1. Create Brownfield PRD**:
120
120
 
121
121
  ```bash
122
122
  @pm
@@ -143,7 +143,7 @@ The PM agent will:
143
143
  - "What are the critical constraints we must respect?"
144
144
  - "What is your timeline and team size?"
145
145
 
146
- **2. Create Brownfield Architecture**
146
+ **2. Create Brownfield Architecture**:
147
147
 
148
148
  ```bash
149
149
  @architect
@@ -0,0 +1,5 @@
1
+ name: bmad-2d-phaser-game-dev
2
+ version: 1.1.0
3
+ short-title: 2D game development with Phaser 3 & TypeScript
4
+ description: 2D Game Development expansion pack for BMAD Method - Phaser 3 & TypeScript focused
5
+ author: Brian (BMad)
@@ -0,0 +1,5 @@
1
+ name: bmad-creator-tools
2
+ version: 1.0.0
3
+ short-title: Tools for creating BMAD framework components
4
+ description: Tools for creating and extending BMAD framework components.
5
+ author: Brian (BMad)
@@ -436,17 +436,17 @@ IMPORTANT: Work through plan.md checklist systematically!
436
436
 
437
437
  **Step 2: Copy Core Utilities**
438
438
 
439
- Before proceeding, copy these essential files from bmad-core:
439
+ Before proceeding, copy these essential files from common:
440
440
 
441
441
  ```bash
442
442
  # Copy core task utilities
443
- cp bmad-core/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
444
- cp bmad-core/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
443
+ cp common/tasks/create-doc.md expansion-packs/{pack-name}/tasks/
444
+ cp common/tasks/execute-checklist.md expansion-packs/{pack-name}/tasks/
445
445
 
446
446
  # Copy core utility files
447
447
  mkdir -p expansion-packs/{pack-name}/utils
448
- cp bmad-core/utils/template-format.md expansion-packs/{pack-name}/utils/
449
- cp bmad-core/utils/workflow-management.md expansion-packs/{pack-name}/utils/
448
+ cp common/utils/template-format.md expansion-packs/{pack-name}/utils/
449
+ cp common/utils/workflow-management.md expansion-packs/{pack-name}/utils/
450
450
  ```
451
451
 
452
452
  **Step 3: Technical Implementation**
@@ -0,0 +1,5 @@
1
+ name: bmad-infrastructure-devops
2
+ version: 1.0.0
3
+ short-title: Infrastructure and DevOps capabilities
4
+ description: This expansion pack extends BMAD Method with comprehensive infrastructure and DevOps capabilities. It's designed for teams that need to define, implement, and manage cloud infrastructure alongside their application development.
5
+ author: Brian (BMad)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmad-method",
3
- "version": "4.17.0",
3
+ "version": "4.19.0",
4
4
  "description": "Breakthrough Method of Agile AI-driven Development",
5
5
  "main": "tools/cli.js",
6
6
  "bin": {
@@ -0,0 +1,41 @@
1
+ // Test script to verify IDE setup paths for expansion pack agents
2
+ const path = require('path');
3
+ const fs = require('fs-extra');
4
+
5
+ // Simulate the findAgentPath logic
6
+ function simulateFindAgentPath(agentId, installDir) {
7
+ const possiblePaths = [
8
+ path.join(installDir, ".bmad-core", "agents", `${agentId}.md`),
9
+ path.join(installDir, "agents", `${agentId}.md`),
10
+ // Expansion pack paths
11
+ path.join(installDir, ".bmad-2d-phaser-game-dev", "agents", `${agentId}.md`),
12
+ path.join(installDir, ".bmad-infrastructure-devops", "agents", `${agentId}.md`),
13
+ path.join(installDir, ".bmad-creator-tools", "agents", `${agentId}.md`)
14
+ ];
15
+
16
+ // Simulate finding the agent in an expansion pack
17
+ if (agentId === 'game-developer') {
18
+ return path.join(installDir, ".bmad-2d-phaser-game-dev", "agents", `${agentId}.md`);
19
+ }
20
+
21
+ // Default to core
22
+ return path.join(installDir, ".bmad-core", "agents", `${agentId}.md`);
23
+ }
24
+
25
+ // Test different scenarios
26
+ const testDir = '/project';
27
+ const agents = ['dev', 'game-developer', 'infra-devops-platform'];
28
+
29
+ console.log('Testing IDE path references:\n');
30
+
31
+ agents.forEach(agentId => {
32
+ const agentPath = simulateFindAgentPath(agentId, testDir);
33
+ const relativePath = path.relative(testDir, agentPath).replace(/\\/g, '/');
34
+
35
+ console.log(`Agent: ${agentId}`);
36
+ console.log(` Full path: ${agentPath}`);
37
+ console.log(` Relative path: ${relativePath}`);
38
+ console.log(` Roo customInstructions: CRITICAL Read the full YML from ${relativePath} ...`);
39
+ console.log(` Cursor MDC reference: [${relativePath}](mdc:${relativePath})`);
40
+ console.log('');
41
+ });
@@ -9,8 +9,8 @@ class WebBuilder {
9
9
  this.resolver = new DependencyResolver(this.rootDir);
10
10
  this.templatePath = path.join(
11
11
  this.rootDir,
12
- "bmad-core",
13
- "utils",
12
+ "tools",
13
+ "md-assets",
14
14
  "web-agent-startup-instructions.md"
15
15
  );
16
16
  }
@@ -117,35 +117,39 @@ class WebBuilder {
117
117
  const yamlContent = yamlMatch[1];
118
118
  const yamlStartIndex = content.indexOf(yamlMatch[0]);
119
119
  const yamlEndIndex = yamlStartIndex + yamlMatch[0].length;
120
-
120
+
121
121
  // Parse YAML and remove root and IDE-FILE-RESOLUTION properties
122
122
  try {
123
123
  const yaml = require("js-yaml");
124
124
  const parsed = yaml.load(yamlContent);
125
-
125
+
126
126
  // Remove the properties if they exist at root level
127
127
  delete parsed.root;
128
- delete parsed['IDE-FILE-RESOLUTION'];
129
- delete parsed['REQUEST-RESOLUTION'];
130
-
128
+ delete parsed["IDE-FILE-RESOLUTION"];
129
+ delete parsed["REQUEST-RESOLUTION"];
130
+
131
131
  // Also remove from activation-instructions if they exist
132
- if (parsed['activation-instructions'] && Array.isArray(parsed['activation-instructions'])) {
133
- parsed['activation-instructions'] = parsed['activation-instructions'].filter(instruction => {
134
- return !instruction.startsWith('IDE-FILE-RESOLUTION:') &&
135
- !instruction.startsWith('REQUEST-RESOLUTION:');
136
- });
132
+ if (parsed["activation-instructions"] && Array.isArray(parsed["activation-instructions"])) {
133
+ parsed["activation-instructions"] = parsed["activation-instructions"].filter(
134
+ (instruction) => {
135
+ return (
136
+ !instruction.startsWith("IDE-FILE-RESOLUTION:") &&
137
+ !instruction.startsWith("REQUEST-RESOLUTION:")
138
+ );
139
+ }
140
+ );
137
141
  }
138
-
142
+
139
143
  // Reconstruct the YAML
140
144
  const cleanedYaml = yaml.dump(parsed, { lineWidth: -1 });
141
-
145
+
142
146
  // Get the agent name from the YAML for the header
143
- const agentName = parsed.agent?.id || 'agent';
144
-
147
+ const agentName = parsed.agent?.id || "agent";
148
+
145
149
  // Build the new content with just the agent header and YAML
146
150
  const newHeader = `# ${agentName}\n\nCRITICAL: Read the full YML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n`;
147
151
  const afterYaml = content.substring(yamlEndIndex);
148
-
152
+
149
153
  return newHeader + "```yaml\n" + cleanedYaml.trim() + "\n```" + afterYaml;
150
154
  } catch (error) {
151
155
  console.warn("Failed to process agent YAML:", error.message);
@@ -156,12 +160,12 @@ class WebBuilder {
156
160
 
157
161
  formatSection(path, content) {
158
162
  const separator = "====================";
159
-
163
+
160
164
  // Process agent content if this is an agent file
161
165
  if (path.startsWith("agents#")) {
162
166
  content = this.processAgentContent(content);
163
167
  }
164
-
168
+
165
169
  return [
166
170
  `${separator} START: ${path} ${separator}`,
167
171
  content.trim(),
@@ -341,6 +345,28 @@ class WebBuilder {
341
345
  }
342
346
  }
343
347
 
348
+ // If not found in core, try common folder
349
+ if (!found) {
350
+ for (const ext of extensions) {
351
+ const commonPath = path.join(
352
+ this.rootDir,
353
+ "common",
354
+ resourceType,
355
+ `${resourceName}${ext}`
356
+ );
357
+ try {
358
+ const commonContent = await fs.readFile(commonPath, "utf8");
359
+ sections.push(
360
+ this.formatSection(`${resourceType}#${resourceName}`, commonContent)
361
+ );
362
+ found = true;
363
+ break;
364
+ } catch (error) {
365
+ // Not in common either, continue
366
+ }
367
+ }
368
+ }
369
+
344
370
  if (!found) {
345
371
  console.warn(
346
372
  ` ⚠ Dependency ${resourceType}#${resourceName} not found in expansion pack or core`
@@ -516,6 +542,21 @@ class WebBuilder {
516
542
  }
517
543
  }
518
544
 
545
+ // If not found in core, try common folder
546
+ if (!found) {
547
+ for (const ext of extensions) {
548
+ const commonPath = path.join(this.rootDir, "common", dep.type, `${dep.name}${ext}`);
549
+ try {
550
+ const content = await fs.readFile(commonPath, "utf8");
551
+ sections.push(this.formatSection(key, content));
552
+ found = true;
553
+ break;
554
+ } catch (error) {
555
+ // Not in common either, continue
556
+ }
557
+ }
558
+ }
559
+
519
560
  if (!found) {
520
561
  console.warn(` ⚠ Dependency ${key} not found in expansion pack or core`);
521
562
  }
@@ -0,0 +1,58 @@
1
+ # IDE-specific agent configurations
2
+ # This file defines agent-specific settings for different IDEs
3
+
4
+ # Roo Code file permissions
5
+ # Each agent can have restricted file access based on regex patterns
6
+ # If an agent is not listed here, it gets full edit access
7
+ roo-permissions:
8
+ # Core agents
9
+ analyst:
10
+ fileRegex: "\\.(md|txt)$"
11
+ description: "Documentation and text files"
12
+ pm:
13
+ fileRegex: "\\.(md|txt)$"
14
+ description: "Product documentation"
15
+ architect:
16
+ fileRegex: "\\.(md|txt|yml|yaml|json)$"
17
+ description: "Architecture docs and configs"
18
+ qa:
19
+ fileRegex: "\\.(test|spec)\\.(js|ts|jsx|tsx)$|\\.md$"
20
+ description: "Test files and documentation"
21
+ ux-expert:
22
+ fileRegex: "\\.(md|css|scss|html|jsx|tsx)$"
23
+ description: "Design-related files"
24
+ po:
25
+ fileRegex: "\\.(md|txt)$"
26
+ description: "Story and requirement docs"
27
+ sm:
28
+ fileRegex: "\\.(md|txt)$"
29
+ description: "Process and planning docs"
30
+ # Expansion pack agents
31
+ game-designer:
32
+ fileRegex: "\\.(md|txt|json|yaml|yml)$"
33
+ description: "Game design documents and configs"
34
+ game-sm:
35
+ fileRegex: "\\.(md|txt)$"
36
+ description: "Game project management docs"
37
+
38
+ # Cline agent ordering
39
+ # Lower numbers appear first in the list
40
+ # Agents not listed get order 99
41
+ cline-order:
42
+ # Core agents
43
+ bmad-master: 1
44
+ bmad-orchestrator: 2
45
+ pm: 3
46
+ analyst: 4
47
+ architect: 5
48
+ po: 6
49
+ sm: 7
50
+ dev: 8
51
+ qa: 9
52
+ ux-expert: 10
53
+ # Expansion pack agents
54
+ bmad-the-creator: 11
55
+ game-designer: 12
56
+ game-developer: 13
57
+ game-sm: 14
58
+ infra-devops-platform: 15