bmad-method 4.26.0 → 4.27.1
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/.vscode/settings.json +2 -0
- package/CHANGELOG.md +22 -0
- package/README.md +29 -282
- package/bmad-core/agent-teams/team-all.yaml +6 -6
- package/bmad-core/agent-teams/team-fullstack.yaml +6 -6
- package/bmad-core/agent-teams/team-no-ui.yaml +2 -2
- package/bmad-core/agents/analyst.md +17 -18
- package/bmad-core/agents/architect.md +15 -18
- package/bmad-core/agents/bmad-master.md +56 -53
- package/bmad-core/agents/bmad-orchestrator.md +24 -23
- package/bmad-core/agents/dev.md +10 -10
- package/bmad-core/agents/pm.md +17 -20
- package/bmad-core/agents/po.md +12 -15
- package/bmad-core/agents/qa.md +7 -8
- package/bmad-core/agents/sm.md +8 -13
- package/bmad-core/agents/ux-expert.md +7 -11
- package/bmad-core/core-config.yaml +1 -1
- package/bmad-core/data/bmad-kb.md +74 -15
- package/bmad-core/data/brainstorming-techniques.md +36 -0
- package/bmad-core/data/elicitation-methods.md +134 -0
- package/bmad-core/tasks/advanced-elicitation.md +82 -57
- package/bmad-core/tasks/facilitate-brainstorming-session.md +136 -0
- package/bmad-core/templates/architecture-tmpl.yaml +658 -0
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
- package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +805 -0
- package/bmad-core/templates/market-research-tmpl.yaml +252 -0
- package/bmad-core/templates/prd-tmpl.yaml +202 -0
- package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
- package/bmad-core/templates/story-tmpl.yaml +137 -0
- package/bmad-core/utils/plan-management.md +9 -13
- package/bmad-core/workflows/greenfield-service.yaml +1 -1
- package/common/tasks/create-doc.md +55 -67
- package/common/utils/bmad-doc-template.md +325 -0
- package/dist/agents/analyst.txt +1312 -1193
- package/dist/agents/architect.txt +2484 -2895
- package/dist/agents/bmad-master.txt +4680 -4897
- package/dist/agents/bmad-orchestrator.txt +400 -195
- package/dist/agents/dev.txt +21 -24
- package/dist/agents/pm.txt +590 -619
- package/dist/agents/po.txt +178 -130
- package/dist/agents/qa.txt +159 -48
- package/dist/agents/sm.txt +166 -120
- package/dist/agents/ux-expert.txt +436 -544
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.txt +1283 -1260
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.txt +642 -591
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.txt +284 -268
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +9258 -4977
- package/dist/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.txt +388 -325
- package/dist/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.txt +1144 -1165
- package/dist/teams/team-all.txt +4885 -4967
- package/dist/teams/team-fullstack.txt +5621 -5693
- package/dist/teams/team-ide-minimal.txt +604 -333
- package/dist/teams/team-no-ui.txt +5209 -5213
- package/docs/agentic-tools/github-copilot-guide.md +29 -9
- package/docs/bmad-workflow-guide.md +2 -2
- package/expansion-packs/bmad-2d-phaser-game-dev/agent-teams/phaser-2d-nodejs-game-team.yaml +2 -2
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-designer.md +17 -15
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-developer.md +13 -11
- package/expansion-packs/bmad-2d-phaser-game-dev/agents/game-sm.md +13 -11
- package/expansion-packs/bmad-2d-phaser-game-dev/config.yaml +1 -1
- package/expansion-packs/bmad-2d-phaser-game-dev/tasks/create-game-story.md +2 -2
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.yaml +613 -0
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.yaml +356 -0
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.yaml +343 -0
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.yaml +253 -0
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.yaml +484 -0
- package/expansion-packs/bmad-creator-tools/agents/bmad-the-creator.md +14 -12
- package/expansion-packs/bmad-creator-tools/config.yaml +1 -1
- package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.yaml +178 -0
- package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.yaml +154 -0
- package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.yaml +120 -0
- package/expansion-packs/bmad-infrastructure-devops/agents/infra-devops-platform.md +14 -14
- package/expansion-packs/bmad-infrastructure-devops/config.yaml +1 -1
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.yaml +424 -0
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.yaml +629 -0
- package/package.json +1 -1
- package/tools/builders/web-builder.js +170 -95
- package/tools/installer/config/install.config.yaml +2 -2
- package/tools/installer/lib/ide-setup.js +2 -2
- package/tools/installer/package.json +1 -1
- package/tools/lib/dependency-resolver.js +11 -22
- package/tools/md-assets/web-agent-startup-instructions.md +10 -10
- package/bmad-core/tasks/brainstorming-techniques.md +0 -238
- package/bmad-core/templates/architecture-tmpl.md +0 -776
- package/bmad-core/templates/brownfield-architecture-tmpl.md +0 -544
- package/bmad-core/templates/brownfield-prd-tmpl.md +0 -266
- package/bmad-core/templates/competitor-analysis-tmpl.md +0 -291
- package/bmad-core/templates/front-end-architecture-tmpl.md +0 -175
- package/bmad-core/templates/front-end-spec-tmpl.md +0 -413
- package/bmad-core/templates/fullstack-architecture-tmpl.md +0 -1018
- package/bmad-core/templates/market-research-tmpl.md +0 -263
- package/bmad-core/templates/prd-tmpl.md +0 -202
- package/bmad-core/templates/project-brief-tmpl.md +0 -232
- package/bmad-core/templates/story-tmpl.md +0 -58
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-architecture-tmpl.md +0 -560
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-brief-tmpl.md +0 -345
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-design-doc-tmpl.md +0 -331
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/game-story-tmpl.md +0 -235
- package/expansion-packs/bmad-2d-phaser-game-dev/templates/level-design-doc-tmpl.md +0 -470
- package/expansion-packs/bmad-creator-tools/templates/agent-teams-tmpl.md +0 -154
- package/expansion-packs/bmad-creator-tools/templates/agent-tmpl.md +0 -143
- package/expansion-packs/bmad-creator-tools/templates/expansion-pack-plan-tmpl.md +0 -91
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-architecture-tmpl.md +0 -415
- package/expansion-packs/bmad-infrastructure-devops/templates/infrastructure-platform-from-arch-tmpl.md +0 -0
|
@@ -21,6 +21,76 @@ class WebBuilder {
|
|
|
21
21
|
return yaml.load(content);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
convertToWebPath(filePath, bundleRoot = 'bmad-core') {
|
|
25
|
+
// Convert absolute paths to web bundle paths with dot prefix
|
|
26
|
+
// All resources get installed under the bundle root, so use that path
|
|
27
|
+
const relativePath = path.relative(this.rootDir, filePath);
|
|
28
|
+
const pathParts = relativePath.split(path.sep);
|
|
29
|
+
|
|
30
|
+
let resourcePath;
|
|
31
|
+
if (pathParts[0] === 'expansion-packs') {
|
|
32
|
+
// For expansion packs, remove 'expansion-packs/packname' and use the rest
|
|
33
|
+
resourcePath = pathParts.slice(2).join('/');
|
|
34
|
+
} else {
|
|
35
|
+
// For bmad-core, common, etc., remove the first part
|
|
36
|
+
resourcePath = pathParts.slice(1).join('/');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return `.${bundleRoot}/${resourcePath}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
generateWebInstructions(bundleType, packName = null) {
|
|
43
|
+
// Generate dynamic web instructions based on bundle type
|
|
44
|
+
const rootExample = packName ? `.${packName}` : '.bmad-core';
|
|
45
|
+
const examplePath = packName ? `.${packName}/folder/filename.md` : '.bmad-core/folder/filename.md';
|
|
46
|
+
const personasExample = packName ? `.${packName}/personas/analyst.md` : '.bmad-core/personas/analyst.md';
|
|
47
|
+
const tasksExample = packName ? `.${packName}/tasks/create-story.md` : '.bmad-core/tasks/create-story.md';
|
|
48
|
+
const utilsExample = packName ? `.${packName}/utils/template-format.md` : '.bmad-core/utils/template-format.md';
|
|
49
|
+
const tasksRef = packName ? `.${packName}/tasks/create-story.md` : '.bmad-core/tasks/create-story.md';
|
|
50
|
+
|
|
51
|
+
return `# Web Agent Bundle Instructions
|
|
52
|
+
|
|
53
|
+
You are now operating as a specialized AI agent from the BMad-Method framework. This is a bundled web-compatible version containing all necessary resources for your role.
|
|
54
|
+
|
|
55
|
+
## Important Instructions
|
|
56
|
+
|
|
57
|
+
1. **Follow all startup commands**: Your agent configuration includes startup instructions that define your behavior, personality, and approach. These MUST be followed exactly.
|
|
58
|
+
|
|
59
|
+
2. **Resource Navigation**: This bundle contains all resources you need. Resources are marked with tags like:
|
|
60
|
+
|
|
61
|
+
- \`==================== START: ${examplePath} ====================\`
|
|
62
|
+
- \`==================== END: ${examplePath} ====================\`
|
|
63
|
+
|
|
64
|
+
When you need to reference a resource mentioned in your instructions:
|
|
65
|
+
|
|
66
|
+
- Look for the corresponding START/END tags
|
|
67
|
+
- The format is always the full path with dot prefix (e.g., \`${personasExample}\`, \`${tasksExample}\`)
|
|
68
|
+
- If a section is specified (e.g., \`{root}/tasks/create-story.md#section-name\`), navigate to that section within the file
|
|
69
|
+
|
|
70
|
+
**Understanding YAML References**: In the agent configuration, resources are referenced in the dependencies section. For example:
|
|
71
|
+
|
|
72
|
+
\`\`\`yaml
|
|
73
|
+
dependencies:
|
|
74
|
+
utils:
|
|
75
|
+
- template-format
|
|
76
|
+
tasks:
|
|
77
|
+
- create-story
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
These references map directly to bundle sections:
|
|
81
|
+
|
|
82
|
+
- \`utils: template-format\` → Look for \`==================== START: ${utilsExample} ====================\`
|
|
83
|
+
- \`tasks: create-story\` → Look for \`==================== START: ${tasksRef} ====================\`
|
|
84
|
+
|
|
85
|
+
3. **Execution Context**: You are operating in a web environment. All your capabilities and knowledge are contained within this bundle. Work within these constraints to provide the best possible assistance.
|
|
86
|
+
|
|
87
|
+
4. **Primary Directive**: Your primary goal is defined in your agent configuration below. Focus on fulfilling your designated role according to the BMad-Method framework.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
|
|
24
94
|
async cleanOutputDirs() {
|
|
25
95
|
for (const dir of this.outputDirs) {
|
|
26
96
|
try {
|
|
@@ -73,16 +143,18 @@ class WebBuilder {
|
|
|
73
143
|
|
|
74
144
|
async buildAgentBundle(agentId) {
|
|
75
145
|
const dependencies = await this.resolver.resolveAgentDependencies(agentId);
|
|
76
|
-
const template =
|
|
146
|
+
const template = this.generateWebInstructions('agent');
|
|
77
147
|
|
|
78
148
|
const sections = [template];
|
|
79
149
|
|
|
80
150
|
// Add agent configuration
|
|
81
|
-
|
|
151
|
+
const agentPath = this.convertToWebPath(dependencies.agent.path, 'bmad-core');
|
|
152
|
+
sections.push(this.formatSection(agentPath, dependencies.agent.content, 'bmad-core'));
|
|
82
153
|
|
|
83
154
|
// Add all dependencies
|
|
84
155
|
for (const resource of dependencies.resources) {
|
|
85
|
-
|
|
156
|
+
const resourcePath = this.convertToWebPath(resource.path, 'bmad-core');
|
|
157
|
+
sections.push(this.formatSection(resourcePath, resource.content, 'bmad-core'));
|
|
86
158
|
}
|
|
87
159
|
|
|
88
160
|
return sections.join("\n");
|
|
@@ -90,21 +162,24 @@ class WebBuilder {
|
|
|
90
162
|
|
|
91
163
|
async buildTeamBundle(teamId) {
|
|
92
164
|
const dependencies = await this.resolver.resolveTeamDependencies(teamId);
|
|
93
|
-
const template =
|
|
165
|
+
const template = this.generateWebInstructions('team');
|
|
94
166
|
|
|
95
167
|
const sections = [template];
|
|
96
168
|
|
|
97
169
|
// Add team configuration
|
|
98
|
-
|
|
170
|
+
const teamPath = this.convertToWebPath(dependencies.team.path, 'bmad-core');
|
|
171
|
+
sections.push(this.formatSection(teamPath, dependencies.team.content, 'bmad-core'));
|
|
99
172
|
|
|
100
173
|
// Add all agents
|
|
101
174
|
for (const agent of dependencies.agents) {
|
|
102
|
-
|
|
175
|
+
const agentPath = this.convertToWebPath(agent.path, 'bmad-core');
|
|
176
|
+
sections.push(this.formatSection(agentPath, agent.content, 'bmad-core'));
|
|
103
177
|
}
|
|
104
178
|
|
|
105
179
|
// Add all deduplicated resources
|
|
106
180
|
for (const resource of dependencies.resources) {
|
|
107
|
-
|
|
181
|
+
const resourcePath = this.convertToWebPath(resource.path, 'bmad-core');
|
|
182
|
+
sections.push(this.formatSection(resourcePath, resource.content, 'bmad-core'));
|
|
108
183
|
}
|
|
109
184
|
|
|
110
185
|
return sections.join("\n");
|
|
@@ -136,6 +211,7 @@ class WebBuilder {
|
|
|
136
211
|
parsed["activation-instructions"] = parsed["activation-instructions"].filter(
|
|
137
212
|
(instruction) => {
|
|
138
213
|
return (
|
|
214
|
+
typeof instruction === 'string' &&
|
|
139
215
|
!instruction.startsWith("IDE-FILE-RESOLUTION:") &&
|
|
140
216
|
!instruction.startsWith("REQUEST-RESOLUTION:")
|
|
141
217
|
);
|
|
@@ -161,14 +237,17 @@ class WebBuilder {
|
|
|
161
237
|
}
|
|
162
238
|
}
|
|
163
239
|
|
|
164
|
-
formatSection(path, content) {
|
|
240
|
+
formatSection(path, content, bundleRoot = 'bmad-core') {
|
|
165
241
|
const separator = "====================";
|
|
166
242
|
|
|
167
243
|
// Process agent content if this is an agent file
|
|
168
|
-
if (path.
|
|
244
|
+
if (path.includes("/agents/")) {
|
|
169
245
|
content = this.processAgentContent(content);
|
|
170
246
|
}
|
|
171
247
|
|
|
248
|
+
// Replace {root} references with the actual bundle root
|
|
249
|
+
content = this.replaceRootReferences(content, bundleRoot);
|
|
250
|
+
|
|
172
251
|
return [
|
|
173
252
|
`${separator} START: ${path} ${separator}`,
|
|
174
253
|
content.trim(),
|
|
@@ -177,6 +256,11 @@ class WebBuilder {
|
|
|
177
256
|
].join("\n");
|
|
178
257
|
}
|
|
179
258
|
|
|
259
|
+
replaceRootReferences(content, bundleRoot) {
|
|
260
|
+
// Replace {root} with the appropriate bundle root path
|
|
261
|
+
return content.replace(/\{root\}/g, `.${bundleRoot}`);
|
|
262
|
+
}
|
|
263
|
+
|
|
180
264
|
async validate() {
|
|
181
265
|
console.log("Validating agent configurations...");
|
|
182
266
|
const agents = await this.resolver.listAgents();
|
|
@@ -288,13 +372,14 @@ class WebBuilder {
|
|
|
288
372
|
}
|
|
289
373
|
|
|
290
374
|
async buildExpansionAgentBundle(packName, packDir, agentName) {
|
|
291
|
-
const template =
|
|
375
|
+
const template = this.generateWebInstructions('expansion-agent', packName);
|
|
292
376
|
const sections = [template];
|
|
293
377
|
|
|
294
378
|
// Add agent configuration
|
|
295
379
|
const agentPath = path.join(packDir, "agents", `${agentName}.md`);
|
|
296
380
|
const agentContent = await fs.readFile(agentPath, "utf8");
|
|
297
|
-
|
|
381
|
+
const agentWebPath = this.convertToWebPath(agentPath, packName);
|
|
382
|
+
sections.push(this.formatSection(agentWebPath, agentContent, packName));
|
|
298
383
|
|
|
299
384
|
// Resolve and add agent dependencies
|
|
300
385
|
const yamlContent = yamlUtils.extractYamlFromAgent(agentContent);
|
|
@@ -309,64 +394,57 @@ class WebBuilder {
|
|
|
309
394
|
if (Array.isArray(resources)) {
|
|
310
395
|
for (const resourceName of resources) {
|
|
311
396
|
let found = false;
|
|
312
|
-
const extensions = [".md", ".yaml"];
|
|
313
397
|
|
|
314
398
|
// Try expansion pack first
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
// Not in expansion pack, continue
|
|
326
|
-
}
|
|
399
|
+
const resourcePath = path.join(packDir, resourceType, resourceName);
|
|
400
|
+
try {
|
|
401
|
+
const resourceContent = await fs.readFile(resourcePath, "utf8");
|
|
402
|
+
const resourceWebPath = this.convertToWebPath(resourcePath, packName);
|
|
403
|
+
sections.push(
|
|
404
|
+
this.formatSection(resourceWebPath, resourceContent, packName)
|
|
405
|
+
);
|
|
406
|
+
found = true;
|
|
407
|
+
} catch (error) {
|
|
408
|
+
// Not in expansion pack, continue
|
|
327
409
|
}
|
|
328
410
|
|
|
329
411
|
// If not found in expansion pack, try core
|
|
330
412
|
if (!found) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
413
|
+
const corePath = path.join(
|
|
414
|
+
this.rootDir,
|
|
415
|
+
"bmad-core",
|
|
416
|
+
resourceType,
|
|
417
|
+
resourceName
|
|
418
|
+
);
|
|
419
|
+
try {
|
|
420
|
+
const coreContent = await fs.readFile(corePath, "utf8");
|
|
421
|
+
const coreWebPath = this.convertToWebPath(corePath, packName);
|
|
422
|
+
sections.push(
|
|
423
|
+
this.formatSection(coreWebPath, coreContent, packName)
|
|
337
424
|
);
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
this.formatSection(`${resourceType}#${resourceName}`, coreContent)
|
|
342
|
-
);
|
|
343
|
-
found = true;
|
|
344
|
-
break;
|
|
345
|
-
} catch (error) {
|
|
346
|
-
// Not in core either, continue
|
|
347
|
-
}
|
|
425
|
+
found = true;
|
|
426
|
+
} catch (error) {
|
|
427
|
+
// Not in core either, continue
|
|
348
428
|
}
|
|
349
429
|
}
|
|
350
430
|
|
|
351
431
|
// If not found in core, try common folder
|
|
352
432
|
if (!found) {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
433
|
+
const commonPath = path.join(
|
|
434
|
+
this.rootDir,
|
|
435
|
+
"common",
|
|
436
|
+
resourceType,
|
|
437
|
+
resourceName
|
|
438
|
+
);
|
|
439
|
+
try {
|
|
440
|
+
const commonContent = await fs.readFile(commonPath, "utf8");
|
|
441
|
+
const commonWebPath = this.convertToWebPath(commonPath, packName);
|
|
442
|
+
sections.push(
|
|
443
|
+
this.formatSection(commonWebPath, commonContent, packName)
|
|
359
444
|
);
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
this.formatSection(`${resourceType}#${resourceName}`, commonContent)
|
|
364
|
-
);
|
|
365
|
-
found = true;
|
|
366
|
-
break;
|
|
367
|
-
} catch (error) {
|
|
368
|
-
// Not in common either, continue
|
|
369
|
-
}
|
|
445
|
+
found = true;
|
|
446
|
+
} catch (error) {
|
|
447
|
+
// Not in common either, continue
|
|
370
448
|
}
|
|
371
449
|
}
|
|
372
450
|
|
|
@@ -388,7 +466,7 @@ class WebBuilder {
|
|
|
388
466
|
}
|
|
389
467
|
|
|
390
468
|
async buildExpansionTeamBundle(packName, packDir, teamConfigPath) {
|
|
391
|
-
const template =
|
|
469
|
+
const template = this.generateWebInstructions('expansion-team', packName);
|
|
392
470
|
|
|
393
471
|
const sections = [template];
|
|
394
472
|
|
|
@@ -396,7 +474,8 @@ class WebBuilder {
|
|
|
396
474
|
const teamContent = await fs.readFile(teamConfigPath, "utf8");
|
|
397
475
|
const teamFileName = path.basename(teamConfigPath, ".yaml");
|
|
398
476
|
const teamConfig = this.parseYaml(teamContent);
|
|
399
|
-
|
|
477
|
+
const teamWebPath = this.convertToWebPath(teamConfigPath, packName);
|
|
478
|
+
sections.push(this.formatSection(teamWebPath, teamContent, packName));
|
|
400
479
|
|
|
401
480
|
// Get list of expansion pack agents
|
|
402
481
|
const expansionAgents = new Set();
|
|
@@ -421,8 +500,7 @@ class WebBuilder {
|
|
|
421
500
|
for (const resourceFile of resourceFiles.filter(
|
|
422
501
|
(f) => f.endsWith(".md") || f.endsWith(".yaml")
|
|
423
502
|
)) {
|
|
424
|
-
|
|
425
|
-
expansionResources.set(`${resourceDir}#${fileName}`, true);
|
|
503
|
+
expansionResources.set(`${resourceDir}#${resourceFile}`, true);
|
|
426
504
|
}
|
|
427
505
|
} catch (error) {
|
|
428
506
|
// Directory might not exist, that's fine
|
|
@@ -446,7 +524,8 @@ class WebBuilder {
|
|
|
446
524
|
// Use expansion pack version (override)
|
|
447
525
|
const agentPath = path.join(agentsDir, `${agentId}.md`);
|
|
448
526
|
const agentContent = await fs.readFile(agentPath, "utf8");
|
|
449
|
-
|
|
527
|
+
const expansionAgentWebPath = this.convertToWebPath(agentPath, packName);
|
|
528
|
+
sections.push(this.formatSection(expansionAgentWebPath, agentContent, packName));
|
|
450
529
|
|
|
451
530
|
// Parse and collect dependencies from expansion agent
|
|
452
531
|
const agentYaml = agentContent.match(/```yaml\n([\s\S]*?)\n```/);
|
|
@@ -474,7 +553,8 @@ class WebBuilder {
|
|
|
474
553
|
try {
|
|
475
554
|
const coreAgentPath = path.join(this.rootDir, "bmad-core", "agents", `${agentId}.md`);
|
|
476
555
|
const coreAgentContent = await fs.readFile(coreAgentPath, "utf8");
|
|
477
|
-
|
|
556
|
+
const coreAgentWebPath = this.convertToWebPath(coreAgentPath, packName);
|
|
557
|
+
sections.push(this.formatSection(coreAgentWebPath, coreAgentContent, packName));
|
|
478
558
|
|
|
479
559
|
// Parse and collect dependencies from core agent
|
|
480
560
|
const yamlContent = yamlUtils.extractYamlFromAgent(coreAgentContent, true);
|
|
@@ -507,52 +587,45 @@ class WebBuilder {
|
|
|
507
587
|
// Always prefer expansion pack versions if they exist
|
|
508
588
|
for (const [key, dep] of allDependencies) {
|
|
509
589
|
let found = false;
|
|
510
|
-
const extensions = [".md", ".yaml"];
|
|
511
590
|
|
|
512
591
|
// Always check expansion pack first, even if the dependency came from a core agent
|
|
513
592
|
if (expansionResources.has(key)) {
|
|
514
593
|
// We know it exists in expansion pack, find and load it
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
// Try next extension
|
|
525
|
-
}
|
|
594
|
+
const expansionPath = path.join(packDir, dep.type, dep.name);
|
|
595
|
+
try {
|
|
596
|
+
const content = await fs.readFile(expansionPath, "utf8");
|
|
597
|
+
const expansionWebPath = this.convertToWebPath(expansionPath, packName);
|
|
598
|
+
sections.push(this.formatSection(expansionWebPath, content, packName));
|
|
599
|
+
console.log(` ✓ Using expansion override for ${key}`);
|
|
600
|
+
found = true;
|
|
601
|
+
} catch (error) {
|
|
602
|
+
// Try next extension
|
|
526
603
|
}
|
|
527
604
|
}
|
|
528
605
|
|
|
529
606
|
// If not found in expansion pack (or doesn't exist there), try core
|
|
530
607
|
if (!found) {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
// Not in core either, continue
|
|
540
|
-
}
|
|
608
|
+
const corePath = path.join(this.rootDir, "bmad-core", dep.type, dep.name);
|
|
609
|
+
try {
|
|
610
|
+
const content = await fs.readFile(corePath, "utf8");
|
|
611
|
+
const coreWebPath = this.convertToWebPath(corePath, packName);
|
|
612
|
+
sections.push(this.formatSection(coreWebPath, content, packName));
|
|
613
|
+
found = true;
|
|
614
|
+
} catch (error) {
|
|
615
|
+
// Not in core either, continue
|
|
541
616
|
}
|
|
542
617
|
}
|
|
543
618
|
|
|
544
619
|
// If not found in core, try common folder
|
|
545
620
|
if (!found) {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
// Not in common either, continue
|
|
555
|
-
}
|
|
621
|
+
const commonPath = path.join(this.rootDir, "common", dep.type, dep.name);
|
|
622
|
+
try {
|
|
623
|
+
const content = await fs.readFile(commonPath, "utf8");
|
|
624
|
+
const commonWebPath = this.convertToWebPath(commonPath, packName);
|
|
625
|
+
sections.push(this.formatSection(commonWebPath, content, packName));
|
|
626
|
+
found = true;
|
|
627
|
+
} catch (error) {
|
|
628
|
+
// Not in common either, continue
|
|
556
629
|
}
|
|
557
630
|
}
|
|
558
631
|
|
|
@@ -576,7 +649,9 @@ class WebBuilder {
|
|
|
576
649
|
// Only add if not already included as a dependency
|
|
577
650
|
const resourceKey = `${resourceDir}#${fileName}`;
|
|
578
651
|
if (!allDependencies.has(resourceKey)) {
|
|
579
|
-
|
|
652
|
+
const fullResourcePath = path.join(resourcePath, resourceFile);
|
|
653
|
+
const resourceWebPath = this.convertToWebPath(fullResourcePath, packName);
|
|
654
|
+
sections.push(this.formatSection(resourceWebPath, fileContent, packName));
|
|
580
655
|
}
|
|
581
656
|
}
|
|
582
657
|
} catch (error) {
|
|
@@ -86,6 +86,6 @@ ide-configurations:
|
|
|
86
86
|
# 1. The installer creates a .github/chatmodes/ directory in your project
|
|
87
87
|
# 2. Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
|
|
88
88
|
# 3. The agent will adopt that persona for the conversation
|
|
89
|
-
# 4. Requires VS Code 1.
|
|
89
|
+
# 4. Requires VS Code 1.101+ with `chat.agent.enabled: true` in settings
|
|
90
90
|
# 5. Agent files are stored in .github/chatmodes/
|
|
91
|
-
# 6. Use
|
|
91
|
+
# 6. Use `*help` to see available commands and agents
|
|
@@ -66,7 +66,7 @@ class IdeSetup {
|
|
|
66
66
|
case "gemini":
|
|
67
67
|
return this.setupGeminiCli(installDir, selectedAgent);
|
|
68
68
|
case "github-copilot":
|
|
69
|
-
return this.
|
|
69
|
+
return this.setupGitHubCopilot(installDir, selectedAgent, spinner);
|
|
70
70
|
default:
|
|
71
71
|
console.log(chalk.yellow(`\nIDE ${ide} not yet supported`));
|
|
72
72
|
return false;
|
|
@@ -566,7 +566,7 @@ class IdeSetup {
|
|
|
566
566
|
return true;
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
async
|
|
569
|
+
async setupGitHubCopilot(installDir, selectedAgent, spinner = null) {
|
|
570
570
|
await initializeModules();
|
|
571
571
|
|
|
572
572
|
// Configure VS Code workspace settings first to avoid UI conflicts with loading spinners
|
|
@@ -26,7 +26,7 @@ class DependencyResolver {
|
|
|
26
26
|
const dependencies = {
|
|
27
27
|
agent: {
|
|
28
28
|
id: agentId,
|
|
29
|
-
path:
|
|
29
|
+
path: agentPath,
|
|
30
30
|
content: agentContent,
|
|
31
31
|
config: agentConfig
|
|
32
32
|
},
|
|
@@ -56,7 +56,7 @@ class DependencyResolver {
|
|
|
56
56
|
const dependencies = {
|
|
57
57
|
team: {
|
|
58
58
|
id: teamId,
|
|
59
|
-
path:
|
|
59
|
+
path: teamPath,
|
|
60
60
|
content: teamContent,
|
|
61
61
|
config: teamConfig
|
|
62
62
|
},
|
|
@@ -116,31 +116,20 @@ class DependencyResolver {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
try {
|
|
119
|
-
const extensions = ['.md', '.yaml'];
|
|
120
119
|
let content = null;
|
|
121
120
|
let filePath = null;
|
|
122
121
|
|
|
123
122
|
// First try bmad-core
|
|
124
|
-
|
|
123
|
+
try {
|
|
124
|
+
filePath = path.join(this.bmadCore, type, id);
|
|
125
|
+
content = await fs.readFile(filePath, 'utf8');
|
|
126
|
+
} catch (e) {
|
|
127
|
+
// If not found in bmad-core, try common folder
|
|
125
128
|
try {
|
|
126
|
-
filePath = path.join(this.
|
|
129
|
+
filePath = path.join(this.common, type, id);
|
|
127
130
|
content = await fs.readFile(filePath, 'utf8');
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
// Try next extension
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// If not found in bmad-core, try common folder
|
|
135
|
-
if (!content) {
|
|
136
|
-
for (const ext of extensions) {
|
|
137
|
-
try {
|
|
138
|
-
filePath = path.join(this.common, type, `${id}${ext}`);
|
|
139
|
-
content = await fs.readFile(filePath, 'utf8');
|
|
140
|
-
break;
|
|
141
|
-
} catch (e) {
|
|
142
|
-
// Try next extension
|
|
143
|
-
}
|
|
131
|
+
} catch (e2) {
|
|
132
|
+
// File not found in either location
|
|
144
133
|
}
|
|
145
134
|
}
|
|
146
135
|
|
|
@@ -152,7 +141,7 @@ class DependencyResolver {
|
|
|
152
141
|
const resource = {
|
|
153
142
|
type,
|
|
154
143
|
id,
|
|
155
|
-
path:
|
|
144
|
+
path: filePath,
|
|
156
145
|
content
|
|
157
146
|
};
|
|
158
147
|
|
|
@@ -4,18 +4,18 @@ You are now operating as a specialized AI agent from the BMad-Method framework.
|
|
|
4
4
|
|
|
5
5
|
## Important Instructions
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### **Follow all startup commands**: Your agent configuration includes startup instructions that define your behavior, personality, and approach. These MUST be followed exactly.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### **Resource Navigation**: This bundle contains all resources you need. Resources are marked with tags like:
|
|
10
10
|
|
|
11
|
-
- `==================== START: folder
|
|
12
|
-
- `==================== END: folder
|
|
11
|
+
- `==================== START: .bmad-core/folder/filename.md ====================`
|
|
12
|
+
- `==================== END: .bmad-core/folder/filename.md ====================`
|
|
13
13
|
|
|
14
14
|
When you need to reference a resource mentioned in your instructions:
|
|
15
15
|
|
|
16
16
|
- Look for the corresponding START/END tags
|
|
17
|
-
- The format is always
|
|
18
|
-
- If a section is specified (e.g., `tasks
|
|
17
|
+
- The format is always the full path with dot prefix (e.g., `.bmad-core/personas/analyst.md`, `.bmad-core/tasks/create-story.md`)
|
|
18
|
+
- If a section is specified (e.g., `{root}/tasks/create-story.md#section-name`), navigate to that section within the file
|
|
19
19
|
|
|
20
20
|
**Understanding YAML References**: In the agent configuration, resources are referenced in the dependencies section. For example:
|
|
21
21
|
|
|
@@ -29,11 +29,11 @@ dependencies:
|
|
|
29
29
|
|
|
30
30
|
These references map directly to bundle sections:
|
|
31
31
|
|
|
32
|
-
- `utils: template-format` → Look for `==================== START: utils
|
|
33
|
-
- `
|
|
32
|
+
- `dependencies.utils: template-format` → Look for `==================== START: .bmad-core/utils/template-format.md ====================`
|
|
33
|
+
- `dependencies.utils: create-story` → Look for `==================== START: .bmad-core/tasks/create-story.md ====================`
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
### **Execution Context**: You are operating in a web environment. All your capabilities and knowledge are contained within this bundle. Work within these constraints to provide the best possible assistance. You have no file system to write to, so you will maintain document history being drafted in your memory unless a canvas feature is available and the user confirms its usage.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
## **Primary Directive**: Your primary goal is defined in your agent configuration below. Focus on fulfilling your designated role explicitly as defined.
|
|
38
38
|
|
|
39
39
|
---
|