bmad-method 4.17.0 → 4.18.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.
- package/.claude/commands/bmad-master.md +0 -1
- package/CHANGELOG.md +8 -0
- package/{bmad-core → common}/tasks/create-doc.md +2 -2
- package/{expansion-packs/expansion-creator/common-tasks → common/tasks}/execute-checklist.md +2 -6
- package/common/utils/workflow-management.md +69 -0
- package/dist/agents/analyst.txt +2 -2
- package/dist/agents/architect.txt +4 -8
- package/dist/agents/bmad-master.txt +35 -270
- package/dist/agents/bmad-orchestrator.txt +33 -187
- package/dist/agents/dev.txt +2 -6
- package/dist/agents/pm.txt +4 -8
- package/dist/agents/po.txt +2 -6
- package/dist/agents/sm.txt +2 -6
- package/dist/agents/ux-expert.txt +4 -8
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +4 -8
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +2 -6
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +2 -6
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +35 -193
- package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +2 -2
- package/dist/expansion-packs/expansion-creator/agents/bmad-the-creator.txt +5 -5
- package/dist/teams/team-all.txt +35 -193
- package/dist/teams/team-fullstack.txt +35 -193
- package/dist/teams/team-ide-minimal.txt +35 -193
- package/dist/teams/team-no-ui.txt +35 -193
- package/docs/working-in-the-brownfield.md +2 -2
- package/expansion-packs/expansion-creator/tasks/generate-expansion-pack.md +5 -5
- package/package.json +1 -1
- package/tools/builders/web-builder.js +60 -19
- package/tools/installer/config/install.config.yml +0 -85
- package/tools/installer/lib/config-loader.js +57 -30
- package/tools/installer/lib/file-manager.js +1 -0
- package/tools/installer/lib/ide-setup.js +44 -26
- package/tools/installer/lib/installer.js +250 -8
- package/tools/installer/package.json +1 -1
- package/tools/lib/dependency-resolver.js +15 -0
- package/bmad-core/tasks/core-dump.md +0 -74
- package/bmad-core/tasks/execute-checklist.md +0 -97
- package/bmad-core/utils/file-resolution-context.md +0 -10
- package/bmad-core/utils/workflow-management.md +0 -223
- package/expansion-packs/bmad-infrastructure-devops/tasks/create-doc.md +0 -74
- package/expansion-packs/expansion-creator/common-tasks/create-doc.md +0 -74
- package/expansion-packs/expansion-creator/utils/template-format.md +0 -26
- package/expansion-packs/expansion-creator/utils/workflow-management.md +0 -223
- /package/{bmad-core → common}/utils/template-format.md +0 -0
- /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
|
-
|
|
1432
|
+
Enables BMAD orchestrator to manage and execute team workflows.
|
|
1433
1433
|
|
|
1434
|
-
##
|
|
1434
|
+
## Dynamic Workflow Loading
|
|
1435
1435
|
|
|
1436
|
-
|
|
1436
|
+
Read available workflows from current team configuration's `workflows` field. Each team bundle defines its own supported workflows.
|
|
1437
1437
|
|
|
1438
|
-
**
|
|
1438
|
+
**Key Commands**:
|
|
1439
1439
|
|
|
1440
|
-
-
|
|
1441
|
-
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1526
|
-
|
|
1527
|
-
## Workflow Execution Flow
|
|
1528
|
-
|
|
1529
|
-
### 1. Starting a Workflow
|
|
1463
|
+
Shows next recommended agent and action.
|
|
1530
1464
|
|
|
1531
|
-
|
|
1465
|
+
## Execution Flow
|
|
1532
1466
|
|
|
1533
|
-
1. Load
|
|
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
|
-
|
|
1469
|
+
2. **Stage Transitions**: Mark complete → Check conditions → Load next agent → Pass artifacts
|
|
1540
1470
|
|
|
1541
|
-
|
|
1471
|
+
3. **Artifact Tracking**: Track status, creator, timestamps in workflow_state
|
|
1542
1472
|
|
|
1543
|
-
|
|
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
|
-
|
|
1475
|
+
## Context Passing
|
|
1550
1476
|
|
|
1551
|
-
|
|
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
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
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
|
-
|
|
1486
|
+
Handle conditional paths by asking clarifying questions when needed.
|
|
1622
1487
|
|
|
1623
|
-
|
|
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
|
-
|
|
1490
|
+
1. Show progress
|
|
1491
|
+
2. Explain transitions
|
|
1492
|
+
3. Preserve context
|
|
1493
|
+
4. Allow flexibility
|
|
1494
|
+
5. Track state
|
|
1633
1495
|
|
|
1634
|
-
##
|
|
1496
|
+
## Agent Integration
|
|
1635
1497
|
|
|
1636
|
-
|
|
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
|
|
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
|
|
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
|
|
@@ -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
|
|
439
|
+
Before proceeding, copy these essential files from common:
|
|
440
440
|
|
|
441
441
|
```bash
|
|
442
442
|
# Copy core task utilities
|
|
443
|
-
cp
|
|
444
|
-
cp
|
|
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
|
|
449
|
-
cp
|
|
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**
|
package/package.json
CHANGED
|
@@ -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
|
-
"
|
|
13
|
-
"
|
|
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[
|
|
129
|
-
delete parsed[
|
|
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[
|
|
133
|
-
parsed[
|
|
134
|
-
|
|
135
|
-
|
|
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 ||
|
|
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
|
}
|
|
@@ -8,50 +8,6 @@ installation-options:
|
|
|
8
8
|
name: Single Agent
|
|
9
9
|
description: Select and install a single agent with its dependencies
|
|
10
10
|
action: copy-agent
|
|
11
|
-
agent-dependencies:
|
|
12
|
-
core-files:
|
|
13
|
-
- bmad-core/utils/template-format.md
|
|
14
|
-
dev:
|
|
15
|
-
- bmad-core/templates/story-tmpl.md
|
|
16
|
-
- bmad-core/checklists/story-dod-checklist.md
|
|
17
|
-
pm:
|
|
18
|
-
- bmad-core/templates/prd-tmpl.md
|
|
19
|
-
- bmad-core/templates/brownfield-prd-tmpl.md
|
|
20
|
-
- bmad-core/checklists/pm-checklist.md
|
|
21
|
-
- bmad-core/checklists/change-checklist.md
|
|
22
|
-
- bmad-core/tasks/advanced-elicitation.md
|
|
23
|
-
- bmad-core/tasks/create-doc.md
|
|
24
|
-
- bmad-core/tasks/correct-course.md
|
|
25
|
-
- bmad-core/tasks/create-deep-research-prompt.md
|
|
26
|
-
- bmad-core/tasks/brownfield-create-epic.md
|
|
27
|
-
- bmad-core/tasks/brownfield-create-story.md
|
|
28
|
-
- bmad-core/tasks/execute-checklist.md
|
|
29
|
-
- bmad-core/tasks/shard-doc.md
|
|
30
|
-
architect:
|
|
31
|
-
- bmad-core/templates/architecture-tmpl.md
|
|
32
|
-
- bmad-core/checklists/architect-checklist.md
|
|
33
|
-
sm:
|
|
34
|
-
- bmad-core/templates/story-tmpl.md
|
|
35
|
-
- bmad-core/checklists/story-draft-checklist.md
|
|
36
|
-
- bmad-core/workflows/*.yml
|
|
37
|
-
po:
|
|
38
|
-
- bmad-core/checklists/po-master-checklist.md
|
|
39
|
-
- bmad-core/templates/acceptance-criteria-tmpl.md
|
|
40
|
-
analyst:
|
|
41
|
-
- bmad-core/templates/prd-tmpl.md
|
|
42
|
-
- bmad-core/tasks/advanced-elicitation.md
|
|
43
|
-
qa:
|
|
44
|
-
- bmad-core/checklists/story-dod-checklist.md
|
|
45
|
-
- bmad-core/templates/test-plan-tmpl.md
|
|
46
|
-
ux-expert:
|
|
47
|
-
- bmad-core/templates/ux-tmpl.md
|
|
48
|
-
bmad-master:
|
|
49
|
-
- bmad-core/templates/*.md
|
|
50
|
-
- bmad-core/tasks/*.md
|
|
51
|
-
- bmad-core/schemas/*.yml
|
|
52
|
-
bmad-orchestrator:
|
|
53
|
-
- bmad-core/agent-teams/*.yml
|
|
54
|
-
- bmad-core/workflows/*.yml
|
|
55
11
|
ide-configurations:
|
|
56
12
|
cursor:
|
|
57
13
|
name: Cursor
|
|
@@ -111,44 +67,3 @@ ide-configurations:
|
|
|
111
67
|
# 2. It also configures .gemini/settings.json to load all agent files.
|
|
112
68
|
# 3. Simply mention the agent in your prompt (e.g., "As @dev, ...").
|
|
113
69
|
# 4. The Gemini CLI will automatically have the context for that agent.
|
|
114
|
-
available-agents:
|
|
115
|
-
- id: analyst
|
|
116
|
-
name: Business Analyst
|
|
117
|
-
file: bmad-core/agents/analyst.md
|
|
118
|
-
description: Requirements gathering and analysis
|
|
119
|
-
- id: pm
|
|
120
|
-
name: Product Manager
|
|
121
|
-
file: bmad-core/agents/pm.md
|
|
122
|
-
description: Product strategy and roadmap planning
|
|
123
|
-
- id: architect
|
|
124
|
-
name: Solution Architect
|
|
125
|
-
file: bmad-core/agents/architect.md
|
|
126
|
-
description: Technical design and architecture
|
|
127
|
-
- id: po
|
|
128
|
-
name: Product Owner
|
|
129
|
-
file: bmad-core/agents/po.md
|
|
130
|
-
description: Backlog management and prioritization
|
|
131
|
-
- id: sm
|
|
132
|
-
name: Scrum Master
|
|
133
|
-
file: bmad-core/agents/sm.md
|
|
134
|
-
description: Agile process and story creation
|
|
135
|
-
- id: dev
|
|
136
|
-
name: Developer
|
|
137
|
-
file: bmad-core/agents/dev.md
|
|
138
|
-
description: Code implementation and testing
|
|
139
|
-
- id: qa
|
|
140
|
-
name: QA Engineer
|
|
141
|
-
file: bmad-core/agents/qa.md
|
|
142
|
-
description: Quality assurance and testing
|
|
143
|
-
- id: ux-expert
|
|
144
|
-
name: UX Expert
|
|
145
|
-
file: bmad-core/agents/ux-expert.md
|
|
146
|
-
description: User experience design
|
|
147
|
-
- id: bmad-master
|
|
148
|
-
name: BMAD Master
|
|
149
|
-
file: bmad-core/agents/bmad-master.md
|
|
150
|
-
description: BMAD framework expert and guide
|
|
151
|
-
- id: bmad-orchestrator
|
|
152
|
-
name: BMAD Orchestrator
|
|
153
|
-
file: bmad-core/agents/bmad-orchestrator.md
|
|
154
|
-
description: Multi-agent workflow coordinator
|
|
@@ -26,8 +26,47 @@ class ConfigLoader {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
async getAvailableAgents() {
|
|
29
|
-
const
|
|
30
|
-
|
|
29
|
+
const agentsDir = path.join(this.getBmadCorePath(), 'agents');
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const entries = await fs.readdir(agentsDir, { withFileTypes: true });
|
|
33
|
+
const agents = [];
|
|
34
|
+
|
|
35
|
+
for (const entry of entries) {
|
|
36
|
+
if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
37
|
+
const agentPath = path.join(agentsDir, entry.name);
|
|
38
|
+
const agentId = path.basename(entry.name, '.md');
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const agentContent = await fs.readFile(agentPath, 'utf8');
|
|
42
|
+
|
|
43
|
+
// Extract YAML block from agent file
|
|
44
|
+
const yamlMatch = agentContent.match(/```yml\n([\s\S]*?)\n```/);
|
|
45
|
+
if (yamlMatch) {
|
|
46
|
+
const yamlContent = yaml.load(yamlMatch[1]);
|
|
47
|
+
const agentConfig = yamlContent.agent || {};
|
|
48
|
+
|
|
49
|
+
agents.push({
|
|
50
|
+
id: agentId,
|
|
51
|
+
name: agentConfig.title || agentConfig.name || agentId,
|
|
52
|
+
file: `bmad-core/agents/${entry.name}`,
|
|
53
|
+
description: agentConfig.whenToUse || 'No description available'
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.warn(`Failed to read agent ${entry.name}: ${error.message}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Sort agents by name for consistent display
|
|
63
|
+
agents.sort((a, b) => a.name.localeCompare(b.name));
|
|
64
|
+
|
|
65
|
+
return agents;
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.warn(`Failed to read agents directory: ${error.message}`);
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
31
70
|
}
|
|
32
71
|
|
|
33
72
|
async getAvailableExpansionPacks() {
|
|
@@ -72,36 +111,24 @@ class ConfigLoader {
|
|
|
72
111
|
const DependencyResolver = require('../../lib/dependency-resolver');
|
|
73
112
|
const resolver = new DependencyResolver(path.join(__dirname, '..', '..', '..'));
|
|
74
113
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
depPaths.push(filePath);
|
|
90
|
-
}
|
|
114
|
+
const agentDeps = await resolver.resolveAgentDependencies(agentId);
|
|
115
|
+
|
|
116
|
+
// Convert to flat list of file paths
|
|
117
|
+
const depPaths = [];
|
|
118
|
+
|
|
119
|
+
// Core files and utilities are included automatically by DependencyResolver
|
|
120
|
+
|
|
121
|
+
// Add agent file itself is already handled by installer
|
|
122
|
+
|
|
123
|
+
// Add all resolved resources
|
|
124
|
+
for (const resource of agentDeps.resources) {
|
|
125
|
+
const filePath = `.bmad-core/${resource.type}/${resource.id}.md`;
|
|
126
|
+
if (!depPaths.includes(filePath)) {
|
|
127
|
+
depPaths.push(filePath);
|
|
91
128
|
}
|
|
92
|
-
|
|
93
|
-
return depPaths;
|
|
94
|
-
} catch (error) {
|
|
95
|
-
console.warn(`Failed to dynamically resolve dependencies for ${agentId}: ${error.message}`);
|
|
96
|
-
|
|
97
|
-
// Fall back to static config
|
|
98
|
-
const config = await this.load();
|
|
99
|
-
const dependencies = config['agent-dependencies'] || {};
|
|
100
|
-
const coreFiles = dependencies['core-files'] || [];
|
|
101
|
-
const agentDeps = dependencies[agentId] || [];
|
|
102
|
-
|
|
103
|
-
return [...coreFiles, ...agentDeps];
|
|
104
129
|
}
|
|
130
|
+
|
|
131
|
+
return depPaths;
|
|
105
132
|
}
|
|
106
133
|
|
|
107
134
|
async getIdeConfiguration(ide) {
|