bmad-method 4.27.3 ā 4.27.5
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/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +2 -2
- package/bmad-core/agents/bmad-master.md +0 -2
- package/bmad-core/agents/bmad-orchestrator.md +0 -1
- package/bmad-core/data/bmad-kb.md +5 -12
- package/dist/agents/analyst.txt +2 -9
- package/dist/agents/architect.txt +3 -11
- package/dist/agents/bmad-master.txt +8 -53
- package/dist/agents/bmad-orchestrator.txt +2 -39
- package/dist/agents/pm.txt +3 -3
- package/dist/expansion-packs/bmad-2d-phaser-game-dev/teams/phaser-2d-nodejs-game-team.txt +0 -30
- package/dist/teams/team-all.txt +8 -53
- package/dist/teams/team-fullstack.txt +8 -53
- package/dist/teams/team-ide-minimal.txt +2 -39
- package/dist/teams/team-no-ui.txt +8 -53
- package/{GUIDING-PRINCIPLES.md ā docs/GUIDING-PRINCIPLES.md} +19 -13
- package/docs/template-markup-references.md +86 -0
- package/expansion-packs/bmad-infrastructure-devops/data/bmad-kb.md +307 -2
- package/package.json +1 -1
- package/tools/installer/bin/bmad.js +83 -0
- package/tools/installer/lib/file-manager.js +28 -0
- package/tools/installer/lib/ide-setup.js +41 -33
- package/tools/installer/lib/installer.js +8 -1
- package/tools/installer/package.json +1 -1
- package/common/utils/template-format.md +0 -26
|
@@ -224,6 +224,58 @@ async function promptInstallation() {
|
|
|
224
224
|
answers.installType = selectedItems.includes('bmad-core') ? 'full' : 'expansion-only';
|
|
225
225
|
answers.expansionPacks = selectedItems.filter(item => item !== 'bmad-core');
|
|
226
226
|
|
|
227
|
+
// Ask sharding questions if installing BMad core
|
|
228
|
+
if (selectedItems.includes('bmad-core')) {
|
|
229
|
+
console.log(chalk.cyan('\nš Document Organization Settings'));
|
|
230
|
+
console.log(chalk.dim('Configure how your project documentation should be organized.\n'));
|
|
231
|
+
|
|
232
|
+
// Ask about PRD sharding
|
|
233
|
+
const { prdSharded } = await inquirer.prompt([
|
|
234
|
+
{
|
|
235
|
+
type: 'confirm',
|
|
236
|
+
name: 'prdSharded',
|
|
237
|
+
message: 'Will the PRD (Product Requirements Document) be sharded into multiple files?',
|
|
238
|
+
default: true
|
|
239
|
+
}
|
|
240
|
+
]);
|
|
241
|
+
answers.prdSharded = prdSharded;
|
|
242
|
+
|
|
243
|
+
// Ask about architecture sharding
|
|
244
|
+
const { architectureSharded } = await inquirer.prompt([
|
|
245
|
+
{
|
|
246
|
+
type: 'confirm',
|
|
247
|
+
name: 'architectureSharded',
|
|
248
|
+
message: 'Will the architecture documentation be sharded into multiple files?',
|
|
249
|
+
default: true
|
|
250
|
+
}
|
|
251
|
+
]);
|
|
252
|
+
answers.architectureSharded = architectureSharded;
|
|
253
|
+
|
|
254
|
+
// Show warning if architecture sharding is disabled
|
|
255
|
+
if (!architectureSharded) {
|
|
256
|
+
console.log(chalk.yellow.bold('\nā ļø IMPORTANT: Architecture Sharding Disabled'));
|
|
257
|
+
console.log(chalk.yellow('With architecture sharding disabled, you should still create the files listed'));
|
|
258
|
+
console.log(chalk.yellow('in devLoadAlwaysFiles (like coding-standards.md, tech-stack.md, source-tree.md)'));
|
|
259
|
+
console.log(chalk.yellow('as these are used by the dev agent at runtime.'));
|
|
260
|
+
console.log(chalk.yellow('\nAlternatively, you can remove these files from the devLoadAlwaysFiles list'));
|
|
261
|
+
console.log(chalk.yellow('in your core-config.yaml after installation.'));
|
|
262
|
+
|
|
263
|
+
const { acknowledge } = await inquirer.prompt([
|
|
264
|
+
{
|
|
265
|
+
type: 'confirm',
|
|
266
|
+
name: 'acknowledge',
|
|
267
|
+
message: 'Do you acknowledge this requirement and want to proceed?',
|
|
268
|
+
default: false
|
|
269
|
+
}
|
|
270
|
+
]);
|
|
271
|
+
|
|
272
|
+
if (!acknowledge) {
|
|
273
|
+
console.log(chalk.red('Installation cancelled.'));
|
|
274
|
+
process.exit(0);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
227
279
|
// Ask for IDE configuration
|
|
228
280
|
const { ides } = await inquirer.prompt([
|
|
229
281
|
{
|
|
@@ -246,6 +298,37 @@ async function promptInstallation() {
|
|
|
246
298
|
// Use selected IDEs directly
|
|
247
299
|
answers.ides = ides;
|
|
248
300
|
|
|
301
|
+
// Configure GitHub Copilot immediately if selected
|
|
302
|
+
if (ides.includes('github-copilot')) {
|
|
303
|
+
console.log(chalk.cyan('\nš§ GitHub Copilot Configuration'));
|
|
304
|
+
console.log(chalk.dim('BMad works best with specific VS Code settings for optimal agent experience.\n'));
|
|
305
|
+
|
|
306
|
+
const { configChoice } = await inquirer.prompt([
|
|
307
|
+
{
|
|
308
|
+
type: 'list',
|
|
309
|
+
name: 'configChoice',
|
|
310
|
+
message: chalk.yellow('How would you like to configure GitHub Copilot settings?'),
|
|
311
|
+
choices: [
|
|
312
|
+
{
|
|
313
|
+
name: 'Use recommended defaults (fastest setup)',
|
|
314
|
+
value: 'defaults'
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: 'Configure each setting manually (customize to your preferences)',
|
|
318
|
+
value: 'manual'
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: 'Skip settings configuration (I\'ll configure manually later)',
|
|
322
|
+
value: 'skip'
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
default: 'defaults'
|
|
326
|
+
}
|
|
327
|
+
]);
|
|
328
|
+
|
|
329
|
+
answers.githubCopilotConfig = { configChoice };
|
|
330
|
+
}
|
|
331
|
+
|
|
249
332
|
// Ask for web bundles installation
|
|
250
333
|
const { includeWebBundles } = await inquirer.prompt([
|
|
251
334
|
{
|
|
@@ -271,6 +271,34 @@ class FileManager {
|
|
|
271
271
|
|
|
272
272
|
return manifest;
|
|
273
273
|
}
|
|
274
|
+
|
|
275
|
+
async modifyCoreConfig(installDir, config) {
|
|
276
|
+
const coreConfigPath = path.join(installDir, '.bmad-core', 'core-config.yaml');
|
|
277
|
+
|
|
278
|
+
try {
|
|
279
|
+
// Read the existing core-config.yaml
|
|
280
|
+
const coreConfigContent = await fs.readFile(coreConfigPath, 'utf8');
|
|
281
|
+
const coreConfig = yaml.load(coreConfigContent);
|
|
282
|
+
|
|
283
|
+
// Modify sharding settings if provided
|
|
284
|
+
if (config.prdSharded !== undefined) {
|
|
285
|
+
coreConfig.prd.prdSharded = config.prdSharded;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (config.architectureSharded !== undefined) {
|
|
289
|
+
coreConfig.architecture.architectureSharded = config.architectureSharded;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Write back the modified config
|
|
293
|
+
await fs.writeFile(coreConfigPath, yaml.dump(coreConfig, { indent: 2 }));
|
|
294
|
+
|
|
295
|
+
return true;
|
|
296
|
+
} catch (error) {
|
|
297
|
+
await initializeModules();
|
|
298
|
+
console.error(chalk.red(`Failed to modify core-config.yaml:`), error.message);
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
274
302
|
}
|
|
275
303
|
|
|
276
304
|
module.exports = new FileManager();
|
|
@@ -41,7 +41,7 @@ class IdeSetup {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
async setup(ide, installDir, selectedAgent = null, spinner = null) {
|
|
44
|
+
async setup(ide, installDir, selectedAgent = null, spinner = null, preConfiguredSettings = null) {
|
|
45
45
|
await initializeModules();
|
|
46
46
|
const ideConfig = await configLoader.getIdeConfiguration(ide);
|
|
47
47
|
|
|
@@ -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.setupGitHubCopilot(installDir, selectedAgent, spinner);
|
|
69
|
+
return this.setupGitHubCopilot(installDir, selectedAgent, spinner, preConfiguredSettings);
|
|
70
70
|
default:
|
|
71
71
|
console.log(chalk.yellow(`\nIDE ${ide} not yet supported`));
|
|
72
72
|
return false;
|
|
@@ -566,11 +566,11 @@ class IdeSetup {
|
|
|
566
566
|
return true;
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
async setupGitHubCopilot(installDir, selectedAgent, spinner = null) {
|
|
569
|
+
async setupGitHubCopilot(installDir, selectedAgent, spinner = null, preConfiguredSettings = null) {
|
|
570
570
|
await initializeModules();
|
|
571
571
|
|
|
572
572
|
// Configure VS Code workspace settings first to avoid UI conflicts with loading spinners
|
|
573
|
-
await this.configureVsCodeSettings(installDir, spinner);
|
|
573
|
+
await this.configureVsCodeSettings(installDir, spinner, preConfiguredSettings);
|
|
574
574
|
|
|
575
575
|
const chatmodesDir = path.join(installDir, ".github", "chatmodes");
|
|
576
576
|
const agents = selectedAgent ? [selectedAgent] : await this.getAllAgentIds(installDir);
|
|
@@ -616,7 +616,7 @@ tools: ['changes', 'codebase', 'fetch', 'findTestFiles', 'githubRepo', 'problems
|
|
|
616
616
|
return true;
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
-
async configureVsCodeSettings(installDir, spinner) {
|
|
619
|
+
async configureVsCodeSettings(installDir, spinner, preConfiguredSettings = null) {
|
|
620
620
|
await initializeModules(); // Ensure inquirer is loaded
|
|
621
621
|
const vscodeDir = path.join(installDir, ".vscode");
|
|
622
622
|
const settingsPath = path.join(vscodeDir, "settings.json");
|
|
@@ -636,34 +636,42 @@ tools: ['changes', 'codebase', 'fetch', 'findTestFiles', 'githubRepo', 'problems
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
-
//
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
639
|
+
// Use pre-configured settings if provided, otherwise prompt
|
|
640
|
+
let configChoice;
|
|
641
|
+
if (preConfiguredSettings && preConfiguredSettings.configChoice) {
|
|
642
|
+
configChoice = preConfiguredSettings.configChoice;
|
|
643
|
+
console.log(chalk.dim(`Using pre-configured GitHub Copilot settings: ${configChoice}`));
|
|
644
|
+
} else {
|
|
645
|
+
// Clear any previous output and add spacing to avoid conflicts with loaders
|
|
646
|
+
console.log('\n'.repeat(2));
|
|
647
|
+
console.log(chalk.blue("š§ Github Copilot Agent Settings Configuration"));
|
|
648
|
+
console.log(chalk.dim("BMad works best with specific VS Code settings for optimal agent experience."));
|
|
649
|
+
console.log(''); // Add extra spacing
|
|
650
|
+
|
|
651
|
+
const response = await inquirer.prompt([
|
|
652
|
+
{
|
|
653
|
+
type: 'list',
|
|
654
|
+
name: 'configChoice',
|
|
655
|
+
message: chalk.yellow('How would you like to configure GitHub Copilot settings?'),
|
|
656
|
+
choices: [
|
|
657
|
+
{
|
|
658
|
+
name: 'Use recommended defaults (fastest setup)',
|
|
659
|
+
value: 'defaults'
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
name: 'Configure each setting manually (customize to your preferences)',
|
|
663
|
+
value: 'manual'
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
name: 'Skip settings configuration (I\'ll configure manually later)',
|
|
667
|
+
value: 'skip'
|
|
668
|
+
}
|
|
669
|
+
],
|
|
670
|
+
default: 'defaults'
|
|
671
|
+
}
|
|
672
|
+
]);
|
|
673
|
+
configChoice = response.configChoice;
|
|
674
|
+
}
|
|
667
675
|
|
|
668
676
|
let bmadSettings = {};
|
|
669
677
|
|
|
@@ -373,10 +373,17 @@ class Installer {
|
|
|
373
373
|
if (ides.length > 0) {
|
|
374
374
|
for (const ide of ides) {
|
|
375
375
|
spinner.text = `Setting up ${ide} integration...`;
|
|
376
|
-
|
|
376
|
+
const preConfiguredSettings = ide === 'github-copilot' ? config.githubCopilotConfig : null;
|
|
377
|
+
await ideSetup.setup(ide, installDir, config.agent, spinner, preConfiguredSettings);
|
|
377
378
|
}
|
|
378
379
|
}
|
|
379
380
|
|
|
381
|
+
// Modify core-config.yaml if sharding preferences were provided
|
|
382
|
+
if (config.installType !== "expansion-only" && (config.prdSharded !== undefined || config.architectureSharded !== undefined)) {
|
|
383
|
+
spinner.text = "Configuring document sharding settings...";
|
|
384
|
+
await fileManager.modifyCoreConfig(installDir, config);
|
|
385
|
+
}
|
|
386
|
+
|
|
380
387
|
// Create manifest (skip for expansion-only installations)
|
|
381
388
|
if (config.installType !== "expansion-only") {
|
|
382
389
|
spinner.text = "Creating installation manifest...";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Template Format Conventions
|
|
2
|
-
|
|
3
|
-
Templates in the BMad method use standardized markup for AI processing. These conventions ensure consistent document generation.
|
|
4
|
-
|
|
5
|
-
## Template Markup Elements
|
|
6
|
-
|
|
7
|
-
- **{{placeholders}}**: Variables to be replaced with actual content
|
|
8
|
-
- **[[LLM: instructions]]**: Internal processing instructions for AI agents (never shown to users)
|
|
9
|
-
- **REPEAT** sections: Content blocks that may be repeated as needed
|
|
10
|
-
- **^^CONDITION^^** blocks: Conditional content included only if criteria are met
|
|
11
|
-
- **@{examples}**: Example content for guidance (never output to users)
|
|
12
|
-
|
|
13
|
-
## Processing Rules
|
|
14
|
-
|
|
15
|
-
- Replace all {{placeholders}} with project-specific content
|
|
16
|
-
- Execute all [[LLM: instructions]] internally without showing users
|
|
17
|
-
- Process conditional and repeat blocks as specified
|
|
18
|
-
- Use examples for guidance but never include them in final output
|
|
19
|
-
- Present only clean, formatted content to users
|
|
20
|
-
|
|
21
|
-
## Critical Guidelines
|
|
22
|
-
|
|
23
|
-
- **NEVER display template markup, LLM instructions, or examples to users**
|
|
24
|
-
- Template elements are for AI processing only
|
|
25
|
-
- Focus on faithful template execution and clean output
|
|
26
|
-
- All template-specific instructions are embedded within templates
|