Node 20, installer improvements, agent improvements and Expansion Pack for game dev (#232)
* feat: add expansion pack installation system with game dev and infrastructure expansion packs - Added expansion pack discovery and installation to BMAD installer - Supports interactive and CLI installation of expansion packs - Expansion pack files install to destination root (.bmad-core) - Added game development expansion pack (.bmad-2d-phaser-game-dev) - Game designer, developer, and scrum master agents - Game-specific templates, tasks, workflows, and guidelines - Specialized for Phaser 3 + TypeScript development - Added infrastructure devops expansion pack (.bmad-infrastructure-devops) - Platform engineering agent and infrastructure templates - Expansion pack agents automatically integrate with IDE rules - Added list:expansions command and --expansion-packs CLI option 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> * alpha expansion packs and installer update to support installing expansion packs optionally * node20 --------- Co-authored-by: Brian Madison <brianmadison@Brians-MacBook-Pro.local> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -261,6 +261,10 @@ class Installer {
|
||||
}
|
||||
}
|
||||
|
||||
// Install expansion packs if requested
|
||||
const expansionFiles = await this.installExpansionPacks(installDir, config.expansionPacks, spinner);
|
||||
files.push(...expansionFiles);
|
||||
|
||||
// Set up IDE integration if requested
|
||||
const ides = config.ides || (config.ide ? [config.ide] : []);
|
||||
if (ides.length > 0) {
|
||||
@@ -505,6 +509,11 @@ class Installer {
|
||||
console.log(chalk.bold("\n🎯 Installation Summary:"));
|
||||
console.log(chalk.green("✓ .bmad-core framework installed with all agents and workflows"));
|
||||
|
||||
if (config.expansionPacks && config.expansionPacks.length > 0) {
|
||||
const packNames = config.expansionPacks.join(", ");
|
||||
console.log(chalk.green(`✓ Expansion packs installed: ${packNames}`));
|
||||
}
|
||||
|
||||
if (ides.length > 0) {
|
||||
const ideNames = ides.map(ide => {
|
||||
const ideConfig = configLoader.getIdeConfiguration(ide);
|
||||
@@ -569,6 +578,33 @@ class Installer {
|
||||
);
|
||||
}
|
||||
|
||||
async listExpansionPacks() {
|
||||
// Initialize ES modules
|
||||
await initializeModules();
|
||||
const expansionPacks = await this.getAvailableExpansionPacks();
|
||||
|
||||
console.log(chalk.bold("\nAvailable BMAD Expansion Packs:\n"));
|
||||
|
||||
if (expansionPacks.length === 0) {
|
||||
console.log(chalk.yellow("No expansion packs found."));
|
||||
return;
|
||||
}
|
||||
|
||||
for (const pack of expansionPacks) {
|
||||
console.log(chalk.cyan(` ${pack.id.padEnd(20)}`),
|
||||
`${pack.name} v${pack.version}`);
|
||||
console.log(chalk.dim(` ${' '.repeat(22)}${pack.description}`));
|
||||
if (pack.author && pack.author !== 'Unknown') {
|
||||
console.log(chalk.dim(` ${' '.repeat(22)}by ${pack.author}`));
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
console.log(
|
||||
chalk.dim("Install with: npx bmad-method install --full --expansion-packs <id>\n")
|
||||
);
|
||||
}
|
||||
|
||||
async showStatus() {
|
||||
// Initialize ES modules
|
||||
await initializeModules();
|
||||
@@ -624,6 +660,96 @@ class Installer {
|
||||
return configLoader.getAvailableAgents();
|
||||
}
|
||||
|
||||
async getAvailableExpansionPacks() {
|
||||
return configLoader.getAvailableExpansionPacks();
|
||||
}
|
||||
|
||||
async installExpansionPacks(installDir, selectedPacks, spinner) {
|
||||
if (!selectedPacks || selectedPacks.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const installedFiles = [];
|
||||
const glob = require('glob');
|
||||
|
||||
for (const packId of selectedPacks) {
|
||||
spinner.text = `Installing expansion pack: ${packId}...`;
|
||||
|
||||
try {
|
||||
const expansionPacks = await this.getAvailableExpansionPacks();
|
||||
const pack = expansionPacks.find(p => p.id === packId);
|
||||
|
||||
if (!pack) {
|
||||
console.warn(`Expansion pack ${packId} not found, skipping...`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const expansionPackDir = path.dirname(pack.manifestPath);
|
||||
|
||||
// Define the folders to copy from expansion packs to .bmad-core
|
||||
const foldersToSync = [
|
||||
'agents',
|
||||
'agent-teams',
|
||||
'templates',
|
||||
'tasks',
|
||||
'checklists',
|
||||
'workflows',
|
||||
'data',
|
||||
'utils',
|
||||
'schemas'
|
||||
];
|
||||
|
||||
// Copy each folder if it exists
|
||||
for (const folder of foldersToSync) {
|
||||
const sourceFolder = path.join(expansionPackDir, folder);
|
||||
|
||||
// Check if folder exists in expansion pack
|
||||
if (await fileManager.pathExists(sourceFolder)) {
|
||||
// Get all files in this folder
|
||||
const files = glob.sync('**/*', {
|
||||
cwd: sourceFolder,
|
||||
nodir: true
|
||||
});
|
||||
|
||||
// Copy each file to the destination
|
||||
for (const file of files) {
|
||||
const sourcePath = path.join(sourceFolder, file);
|
||||
const destPath = path.join(installDir, '.bmad-core', folder, file);
|
||||
|
||||
if (await fileManager.copyFile(sourcePath, destPath)) {
|
||||
installedFiles.push(path.join('.bmad-core', folder, file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Also copy web-bundles if they exist (to a different location)
|
||||
const webBundlesSource = path.join(expansionPackDir, 'web-bundles');
|
||||
if (await fileManager.pathExists(webBundlesSource)) {
|
||||
const files = glob.sync('**/*', {
|
||||
cwd: webBundlesSource,
|
||||
nodir: true
|
||||
});
|
||||
|
||||
for (const file of files) {
|
||||
const sourcePath = path.join(webBundlesSource, file);
|
||||
const destPath = path.join(installDir, '.bmad-core', 'web-bundles', 'expansion-packs', packId, file);
|
||||
|
||||
if (await fileManager.copyFile(sourcePath, destPath)) {
|
||||
installedFiles.push(path.join('.bmad-core', 'web-bundles', 'expansion-packs', packId, file));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(chalk.green(`✓ Installed expansion pack: ${pack.name}`));
|
||||
} catch (error) {
|
||||
console.error(chalk.red(`Failed to install expansion pack ${packId}: ${error.message}`));
|
||||
}
|
||||
}
|
||||
|
||||
return installedFiles;
|
||||
}
|
||||
|
||||
async findInstallation() {
|
||||
// Look for .bmad-core in current directory or parent directories
|
||||
let currentDir = process.cwd();
|
||||
|
||||
Reference in New Issue
Block a user