2025-09-28 23:17:07 -05:00
|
|
|
|
const path = require('node:path');
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
|
|
const yaml = require('js-yaml');
|
2025-09-28 23:17:07 -05:00
|
|
|
|
const { BaseIdeSetup } = require('./_base-ide');
|
|
|
|
|
|
const chalk = require('chalk');
|
2025-11-09 20:24:56 -06:00
|
|
|
|
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
2025-12-03 22:44:13 -06:00
|
|
|
|
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Gemini CLI setup handler
|
|
|
|
|
|
* Creates TOML files in .gemini/commands/ structure
|
|
|
|
|
|
*/
|
|
|
|
|
|
class GeminiSetup extends BaseIdeSetup {
|
|
|
|
|
|
constructor() {
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
super('gemini', 'Gemini CLI', false);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
this.configDir = '.gemini';
|
|
|
|
|
|
this.commandsDir = 'commands';
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
this.agentTemplatePath = path.join(__dirname, 'templates', 'gemini-agent-command.toml');
|
|
|
|
|
|
this.taskTemplatePath = path.join(__dirname, 'templates', 'gemini-task-command.toml');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Load config values from bmad installation
|
|
|
|
|
|
* @param {string} bmadDir - BMAD installation directory
|
|
|
|
|
|
* @returns {Object} Config values
|
|
|
|
|
|
*/
|
|
|
|
|
|
async loadConfigValues(bmadDir) {
|
|
|
|
|
|
const configValues = {
|
|
|
|
|
|
user_name: 'User', // Default fallback
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Try to load core config.yaml
|
|
|
|
|
|
const coreConfigPath = path.join(bmadDir, 'core', 'config.yaml');
|
|
|
|
|
|
if (await fs.pathExists(coreConfigPath)) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const configContent = await fs.readFile(coreConfigPath, 'utf8');
|
|
|
|
|
|
const config = yaml.load(configContent);
|
|
|
|
|
|
|
|
|
|
|
|
if (config.user_name) {
|
|
|
|
|
|
configValues.user_name = config.user_name;
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.warn(chalk.yellow(` Warning: Could not load config values: ${error.message}`));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return configValues;
|
2025-09-28 23:17:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Setup Gemini CLI configuration
|
|
|
|
|
|
* @param {string} projectDir - Project directory
|
|
|
|
|
|
* @param {string} bmadDir - BMAD installation directory
|
|
|
|
|
|
* @param {Object} options - Setup options
|
|
|
|
|
|
*/
|
|
|
|
|
|
async setup(projectDir, bmadDir, options = {}) {
|
|
|
|
|
|
console.log(chalk.cyan(`Setting up ${this.name}...`));
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
// Create .gemini/commands directory (flat structure with bmad- prefix)
|
2025-09-28 23:17:07 -05:00
|
|
|
|
const geminiDir = path.join(projectDir, this.configDir);
|
|
|
|
|
|
const commandsDir = path.join(geminiDir, this.commandsDir);
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
await this.ensureDir(commandsDir);
|
|
|
|
|
|
|
|
|
|
|
|
// Clean up any existing BMAD files before reinstalling
|
|
|
|
|
|
await this.cleanup(projectDir);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
2025-11-09 20:24:56 -06:00
|
|
|
|
// Generate agent launchers
|
|
|
|
|
|
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
|
|
|
|
|
|
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
|
|
|
|
|
|
|
2025-12-03 22:44:13 -06:00
|
|
|
|
// Get tasks and workflows (ALL workflows now generate commands)
|
2025-09-28 23:17:07 -05:00
|
|
|
|
const tasks = await this.getTasks(bmadDir);
|
|
|
|
|
|
|
2025-12-03 22:44:13 -06:00
|
|
|
|
// Get ALL workflows using the new workflow command generator
|
|
|
|
|
|
const workflowGenerator = new WorkflowCommandGenerator(this.bmadFolderName);
|
|
|
|
|
|
const { artifacts: workflowArtifacts, counts: workflowCounts } = await workflowGenerator.collectWorkflowArtifacts(bmadDir);
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
// Install agents as TOML files with bmad- prefix (flat structure)
|
2025-09-28 23:17:07 -05:00
|
|
|
|
let agentCount = 0;
|
2025-11-09 20:24:56 -06:00
|
|
|
|
for (const artifact of agentArtifacts) {
|
|
|
|
|
|
const tomlContent = await this.createAgentLauncherToml(artifact);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
// Flat structure: bmad-agent-{module}-{name}.toml
|
2025-11-09 20:24:56 -06:00
|
|
|
|
const tomlPath = path.join(commandsDir, `bmad-agent-${artifact.module}-${artifact.name}.toml`);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
await this.writeFile(tomlPath, tomlContent);
|
|
|
|
|
|
agentCount++;
|
|
|
|
|
|
|
2025-11-09 20:24:56 -06:00
|
|
|
|
console.log(chalk.green(` ✓ Added agent: /bmad:agents:${artifact.module}:${artifact.name}`));
|
2025-09-28 23:17:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
// Install tasks as TOML files with bmad- prefix (flat structure)
|
2025-09-28 23:17:07 -05:00
|
|
|
|
let taskCount = 0;
|
|
|
|
|
|
for (const task of tasks) {
|
|
|
|
|
|
const content = await this.readFile(task.path);
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
const tomlContent = await this.createTaskToml(task, content);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
// Flat structure: bmad-task-{module}-{name}.toml
|
|
|
|
|
|
const tomlPath = path.join(commandsDir, `bmad-task-${task.module}-${task.name}.toml`);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
await this.writeFile(tomlPath, tomlContent);
|
|
|
|
|
|
taskCount++;
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
console.log(chalk.green(` ✓ Added task: /bmad:tasks:${task.module}:${task.name}`));
|
2025-09-28 23:17:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-03 22:44:13 -06:00
|
|
|
|
// Install workflows as TOML files with bmad- prefix (flat structure)
|
|
|
|
|
|
let workflowCount = 0;
|
|
|
|
|
|
for (const artifact of workflowArtifacts) {
|
|
|
|
|
|
if (artifact.type === 'workflow-command') {
|
|
|
|
|
|
// Create TOML wrapper around workflow command content
|
|
|
|
|
|
const tomlContent = await this.createWorkflowToml(artifact);
|
|
|
|
|
|
|
|
|
|
|
|
// Flat structure: bmad-workflow-{module}-{name}.toml
|
|
|
|
|
|
const workflowName = path.basename(artifact.relativePath, '.md');
|
|
|
|
|
|
const tomlPath = path.join(commandsDir, `bmad-workflow-${artifact.module}-${workflowName}.toml`);
|
|
|
|
|
|
await this.writeFile(tomlPath, tomlContent);
|
|
|
|
|
|
workflowCount++;
|
|
|
|
|
|
|
|
|
|
|
|
console.log(chalk.green(` ✓ Added workflow: /bmad:workflows:${artifact.module}:${workflowName}`));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-28 23:17:07 -05:00
|
|
|
|
console.log(chalk.green(`✓ ${this.name} configured:`));
|
|
|
|
|
|
console.log(chalk.dim(` - ${agentCount} agents configured`));
|
|
|
|
|
|
console.log(chalk.dim(` - ${taskCount} tasks configured`));
|
2025-12-03 22:44:13 -06:00
|
|
|
|
console.log(chalk.dim(` - ${workflowCount} workflows configured`));
|
2025-09-28 23:17:07 -05:00
|
|
|
|
console.log(chalk.dim(` - Commands directory: ${path.relative(projectDir, commandsDir)}`));
|
|
|
|
|
|
console.log(chalk.dim(` - Agent activation: /bmad:agents:{agent-name}`));
|
|
|
|
|
|
console.log(chalk.dim(` - Task activation: /bmad:tasks:{task-name}`));
|
2025-12-03 22:44:13 -06:00
|
|
|
|
console.log(chalk.dim(` - Workflow activation: /bmad:workflows:{workflow-name}`));
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
success: true,
|
|
|
|
|
|
agents: agentCount,
|
|
|
|
|
|
tasks: taskCount,
|
2025-12-03 22:44:13 -06:00
|
|
|
|
workflows: workflowCount,
|
2025-09-28 23:17:07 -05:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-09 20:24:56 -06:00
|
|
|
|
/**
|
|
|
|
|
|
* Create agent launcher TOML content from artifact
|
|
|
|
|
|
*/
|
|
|
|
|
|
async createAgentLauncherToml(artifact) {
|
|
|
|
|
|
// Strip frontmatter from launcher content
|
|
|
|
|
|
const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/;
|
|
|
|
|
|
const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim();
|
|
|
|
|
|
|
|
|
|
|
|
// Extract title from launcher frontmatter
|
|
|
|
|
|
const titleMatch = artifact.content.match(/description:\s*"([^"]+)"/);
|
|
|
|
|
|
const title = titleMatch ? titleMatch[1] : this.formatTitle(artifact.name);
|
|
|
|
|
|
|
|
|
|
|
|
// Create TOML wrapper around launcher content (without frontmatter)
|
|
|
|
|
|
const description = `BMAD ${artifact.module.toUpperCase()} Agent: ${title}`;
|
|
|
|
|
|
|
|
|
|
|
|
return `description = "${description}"
|
|
|
|
|
|
prompt = """
|
|
|
|
|
|
${contentWithoutFrontmatter}
|
|
|
|
|
|
"""
|
|
|
|
|
|
`;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-28 23:17:07 -05:00
|
|
|
|
/**
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
* Create agent TOML content using template
|
2025-09-28 23:17:07 -05:00
|
|
|
|
*/
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
async createAgentToml(agent, content) {
|
2025-09-28 23:17:07 -05:00
|
|
|
|
// Extract metadata
|
|
|
|
|
|
const titleMatch = content.match(/title="([^"]+)"/);
|
|
|
|
|
|
const title = titleMatch ? titleMatch[1] : this.formatTitle(agent.name);
|
|
|
|
|
|
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
// Load template
|
|
|
|
|
|
const template = await fs.readFile(this.agentTemplatePath, 'utf8');
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
// Replace template variables
|
|
|
|
|
|
// Note: {user_name} and other {config_values} are left as-is for runtime substitution by Gemini
|
|
|
|
|
|
const tomlContent = template
|
|
|
|
|
|
.replaceAll('{{title}}', title)
|
2025-12-13 16:22:34 +08:00
|
|
|
|
.replaceAll('{_bmad}', '_bmad')
|
|
|
|
|
|
.replaceAll('{_bmad}', this.bmadFolderName)
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
.replaceAll('{{module}}', agent.module)
|
|
|
|
|
|
.replaceAll('{{name}}', agent.name);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
|
|
|
|
|
return tomlContent;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
* Create task TOML content using template
|
2025-09-28 23:17:07 -05:00
|
|
|
|
*/
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
async createTaskToml(task, content) {
|
2025-09-28 23:17:07 -05:00
|
|
|
|
// Extract task name from XML if available
|
|
|
|
|
|
const nameMatch = content.match(/<name>([^<]+)<\/name>/);
|
|
|
|
|
|
const taskName = nameMatch ? nameMatch[1] : this.formatTitle(task.name);
|
|
|
|
|
|
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
// Load template
|
|
|
|
|
|
const template = await fs.readFile(this.taskTemplatePath, 'utf8');
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
// Replace template variables
|
|
|
|
|
|
const tomlContent = template
|
|
|
|
|
|
.replaceAll('{{taskName}}', taskName)
|
2025-12-13 16:22:34 +08:00
|
|
|
|
.replaceAll('{_bmad}', '_bmad')
|
|
|
|
|
|
.replaceAll('{_bmad}', this.bmadFolderName)
|
Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
- Default installation location changed to .bmad (hidden directory) for cleaner project root organization
Web Bundle Improvements:
- All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
- Advanced elicitation capabilities integrated into standalone agents
- All bundles enhanced with party mode agent manifests
- Added default-party.csv files to bmm, bmgd, and cis module teams
- The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
- New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
Phase 4 Workflow Updates (In Progress):
- Initiated shift to separate phase 4 implementation artifacts from documentation
- Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
- Installer questions and configuration added for artifact path selection
- Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates
Additional Changes:
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- VS Code settings updated for new .bmad directory
- Party mode instructions and workflow enhanced for better orchestration
IDE Installer Updates:
- Show version number of installer in cli
- improved Installer UX
- Gemini TOML Improved to have clear loading instructions with @ commands
- All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
|
|
|
|
.replaceAll('{{module}}', task.module)
|
|
|
|
|
|
.replaceAll('{{filename}}', task.filename);
|
2025-09-28 23:17:07 -05:00
|
|
|
|
|
|
|
|
|
|
return tomlContent;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-03 22:44:13 -06:00
|
|
|
|
/**
|
|
|
|
|
|
* Create workflow TOML content from artifact
|
|
|
|
|
|
*/
|
|
|
|
|
|
async createWorkflowToml(artifact) {
|
|
|
|
|
|
// Extract description from artifact content
|
|
|
|
|
|
const descriptionMatch = artifact.content.match(/description:\s*"([^"]+)"/);
|
|
|
|
|
|
const description = descriptionMatch
|
|
|
|
|
|
? descriptionMatch[1]
|
|
|
|
|
|
: `BMAD ${artifact.module.toUpperCase()} Workflow: ${path.basename(artifact.relativePath, '.md')}`;
|
|
|
|
|
|
|
|
|
|
|
|
// Strip frontmatter from command content
|
|
|
|
|
|
const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/;
|
|
|
|
|
|
const contentWithoutFrontmatter = artifact.content.replace(frontmatterRegex, '').trim();
|
|
|
|
|
|
|
|
|
|
|
|
return `description = "${description}"
|
|
|
|
|
|
prompt = """
|
|
|
|
|
|
${contentWithoutFrontmatter}
|
|
|
|
|
|
"""
|
|
|
|
|
|
`;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-28 23:17:07 -05:00
|
|
|
|
/**
|
2025-10-28 17:18:53 -05:00
|
|
|
|
* Cleanup Gemini configuration - surgically remove only BMAD files
|
2025-09-28 23:17:07 -05:00
|
|
|
|
*/
|
|
|
|
|
|
async cleanup(projectDir) {
|
|
|
|
|
|
const fs = require('fs-extra');
|
|
|
|
|
|
const commandsDir = path.join(projectDir, this.configDir, this.commandsDir);
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
if (await fs.pathExists(commandsDir)) {
|
|
|
|
|
|
// Only remove files that start with bmad- prefix
|
|
|
|
|
|
const files = await fs.readdir(commandsDir);
|
|
|
|
|
|
let removed = 0;
|
|
|
|
|
|
|
2025-09-28 23:17:07 -05:00
|
|
|
|
for (const file of files) {
|
2025-10-28 17:18:53 -05:00
|
|
|
|
if (file.startsWith('bmad-') && file.endsWith('.toml')) {
|
|
|
|
|
|
await fs.remove(path.join(commandsDir, file));
|
|
|
|
|
|
removed++;
|
2025-09-28 23:17:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-10-28 17:18:53 -05:00
|
|
|
|
if (removed > 0) {
|
|
|
|
|
|
console.log(chalk.dim(` Cleaned up ${removed} existing BMAD files`));
|
2025-09-28 23:17:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-22 16:55:37 -06:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Install a custom agent launcher for Gemini
|
|
|
|
|
|
* @param {string} projectDir - Project directory
|
|
|
|
|
|
* @param {string} agentName - Agent name (e.g., "fred-commit-poet")
|
|
|
|
|
|
* @param {string} agentPath - Path to compiled agent (relative to project root)
|
|
|
|
|
|
* @param {Object} metadata - Agent metadata
|
|
|
|
|
|
* @returns {Object} Installation result
|
|
|
|
|
|
*/
|
|
|
|
|
|
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
|
|
|
|
|
const geminiDir = path.join(projectDir, this.configDir);
|
|
|
|
|
|
const commandsDir = path.join(geminiDir, this.commandsDir);
|
|
|
|
|
|
|
|
|
|
|
|
// Create .gemini/commands directory if it doesn't exist
|
|
|
|
|
|
await fs.ensureDir(commandsDir);
|
|
|
|
|
|
|
|
|
|
|
|
// Create custom agent launcher in TOML format
|
|
|
|
|
|
const launcherContent = `description = "Custom BMAD Agent: ${agentName}"
|
|
|
|
|
|
prompt = """
|
|
|
|
|
|
**⚠️ IMPORTANT**: Run @${agentPath} first to load the complete agent!
|
|
|
|
|
|
|
|
|
|
|
|
This is a launcher for the custom BMAD agent "${agentName}".
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
1. First run: \`${agentPath}\` to load the complete agent
|
|
|
|
|
|
2. Then use this command to activate ${agentName}
|
|
|
|
|
|
|
|
|
|
|
|
The agent will follow the persona and instructions from the main agent file.
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
*Generated by BMAD Method*
|
|
|
|
|
|
"""`;
|
|
|
|
|
|
|
|
|
|
|
|
const fileName = `bmad-custom-${agentName.toLowerCase()}.toml`;
|
|
|
|
|
|
const launcherPath = path.join(commandsDir, fileName);
|
|
|
|
|
|
|
|
|
|
|
|
// Write the launcher file
|
|
|
|
|
|
await fs.writeFile(launcherPath, launcherContent, 'utf8');
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
ide: 'gemini',
|
|
|
|
|
|
path: path.relative(projectDir, launcherPath),
|
|
|
|
|
|
command: agentName,
|
|
|
|
|
|
type: 'custom-agent-launcher',
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
2025-09-28 23:17:07 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = { GeminiSetup };
|