mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
feat: add documentation website with Docusaurus build pipeline (#1177)
* feat: add documentation website with Docusaurus build pipeline
* feat(docs): add AI discovery meta tags for llms.txt files
- Add global headTags with ai-terms, llms, llms-full meta tags
- Update landing page link to clarify AI context purpose
* fix(docs): restore accidentally deleted faq.md and glossary.md
Files were removed in 12dd97fe during path restructuring.
* fix(docs): update broken project-readme links to GitHub URL
* feat(schema): add compound trigger format validation
This commit is contained in:
@@ -2,7 +2,7 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const yaml = require('yaml');
|
||||
const chalk = require('chalk');
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const { getProjectRoot, getModulePath } = require('../../../lib/project-root');
|
||||
const { CLIUtils } = require('../../../lib/cli-utils');
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const ora = require('ora');
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const { Detector } = require('./detector');
|
||||
const { Manifest } = require('./manifest');
|
||||
const { ModuleManager } = require('../modules/manager');
|
||||
const { IdeManager } = require('../ide/manager');
|
||||
const { FileOps } = require('../../../lib/file-ops');
|
||||
const { Config } = require('../../../lib/config');
|
||||
const { XmlHandler } = require('../../../lib/agent/xml-handler');
|
||||
const { XmlHandler } = require('../../../lib/xml-handler');
|
||||
const { DependencyResolver } = require('./dependency-resolver');
|
||||
const { ConfigCollector } = require('./config-collector');
|
||||
const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root');
|
||||
@@ -297,41 +297,49 @@ class Installer {
|
||||
console.log('\n'); // Add spacing before IDE questions
|
||||
|
||||
for (const ide of newlySelectedIdes) {
|
||||
// Get IDE handler and check if it needs interactive configuration
|
||||
try {
|
||||
// Dynamically load the IDE setup module
|
||||
const ideModule = require(`../ide/${ide}`);
|
||||
// List of IDEs that have interactive prompts
|
||||
//TODO: Why is this here, hardcoding this list here is bad, fix me!
|
||||
const needsPrompts = ['claude-code', 'github-copilot', 'roo', 'cline', 'auggie', 'codex', 'qwen', 'gemini', 'rovo-dev'].includes(
|
||||
ide,
|
||||
);
|
||||
|
||||
// Get the setup class (handle different export formats)
|
||||
let SetupClass;
|
||||
const className =
|
||||
ide
|
||||
.split('-')
|
||||
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
||||
.join('') + 'Setup';
|
||||
if (needsPrompts) {
|
||||
// Get IDE handler and collect configuration
|
||||
try {
|
||||
// Dynamically load the IDE setup module
|
||||
const ideModule = require(`../ide/${ide}`);
|
||||
|
||||
if (ideModule[className]) {
|
||||
SetupClass = ideModule[className];
|
||||
} else if (ideModule.default) {
|
||||
SetupClass = ideModule.default;
|
||||
} else {
|
||||
continue;
|
||||
// Get the setup class (handle different export formats)
|
||||
let SetupClass;
|
||||
const className =
|
||||
ide
|
||||
.split('-')
|
||||
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
||||
.join('') + 'Setup';
|
||||
|
||||
if (ideModule[className]) {
|
||||
SetupClass = ideModule[className];
|
||||
} else if (ideModule.default) {
|
||||
SetupClass = ideModule.default;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
const ideSetup = new SetupClass();
|
||||
|
||||
// Check if this IDE has a collectConfiguration method
|
||||
if (typeof ideSetup.collectConfiguration === 'function') {
|
||||
console.log(chalk.cyan(`\nConfiguring ${ide}...`));
|
||||
ideConfigurations[ide] = await ideSetup.collectConfiguration({
|
||||
selectedModules: selectedModules || [],
|
||||
projectDir,
|
||||
bmadDir,
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
// IDE doesn't have a setup file or collectConfiguration method
|
||||
console.warn(chalk.yellow(`Warning: Could not load configuration for ${ide}`));
|
||||
}
|
||||
|
||||
const ideSetup = new SetupClass();
|
||||
|
||||
// Check if this IDE has a collectConfiguration method (no hardcoding needed!)
|
||||
if (typeof ideSetup.collectConfiguration === 'function') {
|
||||
console.log(chalk.cyan(`\nConfiguring ${ide}...`));
|
||||
ideConfigurations[ide] = await ideSetup.collectConfiguration({
|
||||
selectedModules: selectedModules || [],
|
||||
projectDir,
|
||||
bmadDir,
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
// IDE doesn't have a setup file or collectConfiguration method
|
||||
console.warn(chalk.yellow(`Warning: Could not load configuration for ${ide}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -835,6 +843,8 @@ class Installer {
|
||||
allModules = allModules.filter((m) => m !== 'core');
|
||||
}
|
||||
|
||||
const modulesToInstall = allModules;
|
||||
|
||||
// For dependency resolution, we only need regular modules (not custom modules)
|
||||
// Custom modules are already installed in _bmad and don't need dependency resolution from source
|
||||
const regularModulesForResolution = allModules.filter((module) => {
|
||||
@@ -1213,19 +1223,17 @@ class Installer {
|
||||
console.log(chalk.dim('Remove these .bak files it no longer needed\n'));
|
||||
}
|
||||
|
||||
// Display completion message (skip if requested, e.g., for quick updates)
|
||||
if (!config._skipCompletion) {
|
||||
const { UI } = require('../../../lib/ui');
|
||||
const ui = new UI();
|
||||
ui.showInstallSummary({
|
||||
path: bmadDir,
|
||||
modules: config.modules,
|
||||
ides: config.ides,
|
||||
customFiles: customFiles.length > 0 ? customFiles : undefined,
|
||||
ttsInjectedFiles: this.enableAgentVibes && this.ttsInjectedFiles.length > 0 ? this.ttsInjectedFiles : undefined,
|
||||
agentVibesEnabled: this.enableAgentVibes || false,
|
||||
});
|
||||
}
|
||||
// Display completion message
|
||||
const { UI } = require('../../../lib/ui');
|
||||
const ui = new UI();
|
||||
ui.showInstallSummary({
|
||||
path: bmadDir,
|
||||
modules: config.modules,
|
||||
ides: config.ides,
|
||||
customFiles: customFiles.length > 0 ? customFiles : undefined,
|
||||
ttsInjectedFiles: this.enableAgentVibes && this.ttsInjectedFiles.length > 0 ? this.ttsInjectedFiles : undefined,
|
||||
agentVibesEnabled: this.enableAgentVibes || false,
|
||||
});
|
||||
|
||||
return {
|
||||
success: true,
|
||||
@@ -1505,7 +1513,9 @@ class Installer {
|
||||
* @param {string} bmadDir - BMAD installation directory
|
||||
* @param {Object} coreFiles - Core files to install
|
||||
*/
|
||||
async installCoreWithDependencies(bmadDir) {
|
||||
async installCoreWithDependencies(bmadDir, coreFiles) {
|
||||
const sourcePath = getModulePath('core');
|
||||
const targetPath = path.join(bmadDir, 'core');
|
||||
await this.installCore(bmadDir);
|
||||
}
|
||||
|
||||
@@ -1515,7 +1525,7 @@ class Installer {
|
||||
* @param {string} bmadDir - BMAD installation directory
|
||||
* @param {Object} moduleFiles - Module files to install
|
||||
*/
|
||||
async installModuleWithDependencies(moduleName, bmadDir) {
|
||||
async installModuleWithDependencies(moduleName, bmadDir, moduleFiles) {
|
||||
// Get module configuration for conditional installation
|
||||
const moduleConfig = this.configCollector.collectedConfig[moduleName] || {};
|
||||
|
||||
@@ -1787,6 +1797,7 @@ class Installer {
|
||||
}
|
||||
|
||||
const agentName = agentFile.replace('.md', '');
|
||||
const mdPath = path.join(agentsPath, agentFile);
|
||||
const customizePath = path.join(cfgAgentsDir, `${moduleName}-${agentName}.customize.yaml`);
|
||||
|
||||
// For .md files that are already compiled, we don't need to do much
|
||||
@@ -2000,9 +2011,8 @@ class Installer {
|
||||
_existingModules: installedModules, // Pass all installed modules for manifest generation
|
||||
};
|
||||
|
||||
// Call the standard install method, but skip UI completion for quick updates
|
||||
installConfig._skipCompletion = true;
|
||||
await this.install(installConfig);
|
||||
// Call the standard install method
|
||||
const result = await this.install(installConfig);
|
||||
|
||||
// Only succeed the spinner if it's still spinning
|
||||
// (install method might have stopped it if folder name changed)
|
||||
@@ -2130,7 +2140,7 @@ class Installer {
|
||||
* Private: Prompt for update action
|
||||
*/
|
||||
async promptUpdateAction() {
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
return await inquirer.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
@@ -2160,7 +2170,7 @@ class Installer {
|
||||
return !name.startsWith('_bmad'); // Everything else is manual cleanup
|
||||
});
|
||||
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
|
||||
// Show warning for other offending paths FIRST
|
||||
if (otherOffenders.length > 0) {
|
||||
@@ -2459,7 +2469,7 @@ class Installer {
|
||||
|
||||
console.log(chalk.yellow(`\n⚠️ Found ${customModulesWithMissingSources.length} custom module(s) with missing sources:`));
|
||||
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
let keptCount = 0;
|
||||
let updatedCount = 0;
|
||||
let removedCount = 0;
|
||||
|
||||
@@ -3,7 +3,7 @@ const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const yaml = require('yaml');
|
||||
const { FileOps } = require('../../../lib/file-ops');
|
||||
const { XmlHandler } = require('../../../lib/agent/xml-handler');
|
||||
const { XmlHandler } = require('../../../lib/xml-handler');
|
||||
|
||||
/**
|
||||
* Handler for custom content (custom.yaml)
|
||||
@@ -311,7 +311,7 @@ class CustomHandler {
|
||||
// Read and compile the YAML
|
||||
try {
|
||||
const yamlContent = await fs.readFile(agentFile, 'utf8');
|
||||
const { compileAgent } = require('../../../lib/agent/yaml-xml-builder');
|
||||
const { compileAgent } = require('../../../lib/agent/compiler');
|
||||
|
||||
// Create customize template if it doesn't exist
|
||||
if (!(await fs.pathExists(customizePath))) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const { XmlHandler } = require('../../../lib/agent/xml-handler');
|
||||
const { XmlHandler } = require('../../../lib/xml-handler');
|
||||
const { getSourcePath } = require('../../../lib/project-root');
|
||||
|
||||
/**
|
||||
@@ -493,6 +493,11 @@ class BaseIdeSetup {
|
||||
// Replace placeholders
|
||||
let processed = content;
|
||||
|
||||
// Inject activation block for agent files FIRST (before replacements)
|
||||
if (metadata.name && content.includes('<agent')) {
|
||||
processed = this.xmlHandler.injectActivationSimple(processed, metadata);
|
||||
}
|
||||
|
||||
// Only replace {project-root} if a specific projectDir is provided
|
||||
// Otherwise leave the placeholder intact
|
||||
// Note: Don't add trailing slash - paths in source include leading slash
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator');
|
||||
@@ -59,7 +58,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
|
||||
if (config.subagentChoices.install !== 'none') {
|
||||
// Ask for installation location
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const locationAnswer = await inquirer.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
@@ -89,9 +88,9 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
* @param {string} projectDir - Project directory
|
||||
*/
|
||||
async cleanup(projectDir) {
|
||||
const bmadWorkflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir, 'bmad');
|
||||
const bmadWorkflowsDir = path.join(projectDir, this.configDir, this.workflowsDir, 'bmad');
|
||||
|
||||
if (await this.exists(bmadWorkflowsDir)) {
|
||||
if (await fs.pathExists(bmadWorkflowsDir)) {
|
||||
await fs.remove(bmadWorkflowsDir);
|
||||
console.log(chalk.dim(` Removed old BMAD workflows from ${this.name}`));
|
||||
}
|
||||
@@ -113,9 +112,9 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
await this.cleanup(projectDir);
|
||||
|
||||
// Create .agent/workflows directory structure
|
||||
const agentDir = PathUtils.getConfigDir(projectDir, this.configDir);
|
||||
const workflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir);
|
||||
const bmadWorkflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir, 'bmad');
|
||||
const agentDir = path.join(projectDir, this.configDir);
|
||||
const workflowsDir = path.join(agentDir, this.workflowsDir);
|
||||
const bmadWorkflowsDir = path.join(workflowsDir, 'bmad');
|
||||
|
||||
await this.ensureDir(bmadWorkflowsDir);
|
||||
|
||||
@@ -191,7 +190,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
* Read and process file content
|
||||
*/
|
||||
async readAndProcess(filePath, metadata) {
|
||||
const content = await this.readFile(filePath);
|
||||
const content = await fs.readFile(filePath, 'utf8');
|
||||
return this.processContent(content, metadata);
|
||||
}
|
||||
|
||||
@@ -211,7 +210,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
|
||||
// Add core agents
|
||||
const corePath = getModulePath('core');
|
||||
if (await this.exists(path.join(corePath, 'agents'))) {
|
||||
if (await fs.pathExists(path.join(corePath, 'agents'))) {
|
||||
const coreAgents = await getAgentsFromDir(path.join(corePath, 'agents'), 'core');
|
||||
agents.push(...coreAgents);
|
||||
}
|
||||
@@ -221,7 +220,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
const modulePath = path.join(sourceDir, moduleName);
|
||||
const agentsPath = path.join(modulePath, 'agents');
|
||||
|
||||
if (await this.exists(agentsPath)) {
|
||||
if (await fs.pathExists(agentsPath)) {
|
||||
const moduleAgents = await getAgentsFromDir(agentsPath, moduleName);
|
||||
agents.push(...moduleAgents);
|
||||
}
|
||||
@@ -298,7 +297,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
choices = await this.promptSubagentInstallation(config.subagents);
|
||||
|
||||
if (choices.install !== 'none') {
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const locationAnswer = await inquirer.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
@@ -335,7 +334,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
* Prompt user for subagent installation preferences
|
||||
*/
|
||||
async promptSubagentInstallation(subagentConfig) {
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
|
||||
// First ask if they want to install subagents
|
||||
const { install } = await inquirer.prompt([
|
||||
@@ -388,7 +387,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
const targetPath = path.join(projectDir, injection.file);
|
||||
|
||||
if (await this.exists(targetPath)) {
|
||||
let content = await this.readFile(targetPath);
|
||||
let content = await fs.readFile(targetPath, 'utf8');
|
||||
const marker = `<!-- IDE-INJECT-POINT: ${injection.point} -->`;
|
||||
|
||||
if (content.includes(marker)) {
|
||||
@@ -400,7 +399,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
content = content.replace(marker, injectionContent);
|
||||
await this.writeFile(targetPath, content);
|
||||
await fs.writeFile(targetPath, content);
|
||||
console.log(chalk.dim(` Injected: ${injection.point} → ${injection.file}`));
|
||||
}
|
||||
}
|
||||
@@ -418,7 +417,7 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
targetDir = path.join(os.homedir(), '.agent', 'agents');
|
||||
console.log(chalk.dim(` Installing subagents globally to: ~/.agent/agents/`));
|
||||
} else {
|
||||
targetDir = PathUtils.getIdeSubDir(projectDir, '.agent', 'agents');
|
||||
targetDir = path.join(projectDir, '.agent', 'agents');
|
||||
console.log(chalk.dim(` Installing subagents to project: .agent/agents/`));
|
||||
}
|
||||
|
||||
@@ -465,11 +464,11 @@ class AntigravitySetup extends BaseIdeSetup {
|
||||
*/
|
||||
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
||||
// Create .agent/workflows/bmad directory structure (same as regular agents)
|
||||
const agentDir = PathUtils.getConfigDir(projectDir, this.configDir);
|
||||
const workflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir);
|
||||
const bmadWorkflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir, 'bmad');
|
||||
const agentDir = path.join(projectDir, this.configDir);
|
||||
const workflowsDir = path.join(agentDir, this.workflowsDir);
|
||||
const bmadWorkflowsDir = path.join(workflowsDir, 'bmad');
|
||||
|
||||
await this.ensureDir(bmadWorkflowsDir);
|
||||
await fs.ensureDir(bmadWorkflowsDir);
|
||||
|
||||
// Create custom agent launcher with same pattern as regular agents
|
||||
const launcherContent = `name: '${agentName}'
|
||||
@@ -494,7 +493,7 @@ usage: |
|
||||
const launcherPath = path.join(bmadWorkflowsDir, fileName);
|
||||
|
||||
// Write the launcher file
|
||||
await this.writeFile(launcherPath, launcherContent);
|
||||
await fs.writeFile(launcherPath, launcherContent, 'utf8');
|
||||
|
||||
return {
|
||||
ide: 'antigravity',
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
|
||||
@@ -26,7 +25,7 @@ class AuggieSetup extends BaseIdeSetup {
|
||||
console.log(chalk.cyan(`Setting up ${this.name}...`));
|
||||
|
||||
// Always use project directory
|
||||
const location = PathUtils.getIdeSubDir(projectDir, '.augment', 'commands');
|
||||
const location = path.join(projectDir, '.augment', 'commands');
|
||||
|
||||
// Clean up old BMAD installation first
|
||||
await this.cleanup(projectDir);
|
||||
@@ -53,11 +52,11 @@ class AuggieSetup extends BaseIdeSetup {
|
||||
content: artifact.content,
|
||||
}));
|
||||
|
||||
const bmadCommandsDir = PathUtils.getIdeSubDir(location, 'bmad');
|
||||
const agentsDir = PathUtils.getIdeSubDir(bmadCommandsDir, 'agents');
|
||||
const tasksDir = PathUtils.getIdeSubDir(bmadCommandsDir, 'tasks');
|
||||
const toolsDir = PathUtils.getIdeSubDir(bmadCommandsDir, 'tools');
|
||||
const workflowsDir = PathUtils.getIdeSubDir(bmadCommandsDir, 'workflows');
|
||||
const bmadCommandsDir = path.join(location, 'bmad');
|
||||
const agentsDir = path.join(bmadCommandsDir, 'agents');
|
||||
const tasksDir = path.join(bmadCommandsDir, 'tasks');
|
||||
const toolsDir = path.join(bmadCommandsDir, 'tools');
|
||||
const workflowsDir = path.join(bmadCommandsDir, 'workflows');
|
||||
|
||||
await this.ensureDir(agentsDir);
|
||||
await this.ensureDir(tasksDir);
|
||||
@@ -180,10 +179,10 @@ BMAD ${workflow.module.toUpperCase()} module
|
||||
const fs = require('fs-extra');
|
||||
|
||||
// Only clean up project directory
|
||||
const location = PathUtils.getIdeSubDir(projectDir, '.augment', 'commands');
|
||||
const location = path.join(projectDir, '.augment', 'commands');
|
||||
const bmadDir = path.join(location, 'bmad');
|
||||
|
||||
if (await this.exists(bmadDir)) {
|
||||
if (await fs.pathExists(bmadDir)) {
|
||||
await fs.remove(bmadDir);
|
||||
console.log(chalk.dim(` Removed old BMAD commands`));
|
||||
}
|
||||
@@ -199,12 +198,12 @@ BMAD ${workflow.module.toUpperCase()} module
|
||||
*/
|
||||
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
||||
// Auggie uses .augment/commands directory
|
||||
const location = PathUtils.getIdeSubDir(projectDir, '.augment', 'commands');
|
||||
const bmadCommandsDir = PathUtils.getIdeSubDir(location, 'bmad');
|
||||
const agentsDir = PathUtils.getIdeSubDir(bmadCommandsDir, 'agents');
|
||||
const location = path.join(projectDir, '.augment', 'commands');
|
||||
const bmadCommandsDir = path.join(location, 'bmad');
|
||||
const agentsDir = path.join(bmadCommandsDir, 'agents');
|
||||
|
||||
// Create .augment/commands/bmad/agents directory if it doesn't exist
|
||||
await this.ensureDir(agentsDir);
|
||||
await fs.ensureDir(agentsDir);
|
||||
|
||||
// Create custom agent launcher
|
||||
const launcherContent = `---
|
||||
@@ -231,7 +230,7 @@ BMAD Custom agent
|
||||
const launcherPath = path.join(agentsDir, fileName);
|
||||
|
||||
// Write the launcher file
|
||||
await this.writeFile(launcherPath, launcherContent);
|
||||
await fs.writeFile(launcherPath, launcherContent, 'utf8');
|
||||
|
||||
return {
|
||||
ide: 'auggie',
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator');
|
||||
@@ -49,7 +48,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
|
||||
try {
|
||||
// Load injection configuration
|
||||
const configContent = await this.readFile(injectionConfigPath);
|
||||
const configContent = await fs.readFile(injectionConfigPath, 'utf8');
|
||||
const injectionConfig = yaml.parse(configContent);
|
||||
|
||||
// Ask about subagents if they exist and we haven't asked yet
|
||||
@@ -58,7 +57,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
|
||||
if (config.subagentChoices.install !== 'none') {
|
||||
// Ask for installation location
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const locationAnswer = await inquirer.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
@@ -88,9 +87,9 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
* @param {string} projectDir - Project directory
|
||||
*/
|
||||
async cleanup(projectDir) {
|
||||
const bmadCommandsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
const bmadCommandsDir = path.join(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
|
||||
if (await this.exists(bmadCommandsDir)) {
|
||||
if (await fs.pathExists(bmadCommandsDir)) {
|
||||
await fs.remove(bmadCommandsDir);
|
||||
console.log(chalk.dim(` Removed old BMAD commands from ${this.name}`));
|
||||
}
|
||||
@@ -112,9 +111,9 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
await this.cleanup(projectDir);
|
||||
|
||||
// Create .claude/commands directory structure
|
||||
const claudeDir = PathUtils.getConfigDir(projectDir, this.configDir);
|
||||
const commandsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir);
|
||||
const bmadCommandsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
const claudeDir = path.join(projectDir, this.configDir);
|
||||
const commandsDir = path.join(claudeDir, this.commandsDir);
|
||||
const bmadCommandsDir = path.join(commandsDir, 'bmad');
|
||||
|
||||
await this.ensureDir(bmadCommandsDir);
|
||||
|
||||
@@ -160,7 +159,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
let workflowCommandCount = 0;
|
||||
for (const artifact of workflowArtifacts) {
|
||||
if (artifact.type === 'workflow-command') {
|
||||
const moduleWorkflowsDir = PathUtils.getIdeSubDir(bmadCommandsDir, artifact.module, 'workflows');
|
||||
const moduleWorkflowsDir = path.join(bmadCommandsDir, artifact.module, 'workflows');
|
||||
await this.ensureDir(moduleWorkflowsDir);
|
||||
const commandPath = path.join(moduleWorkflowsDir, path.basename(artifact.relativePath));
|
||||
await this.writeFile(commandPath, artifact.content);
|
||||
@@ -199,7 +198,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
* Read and process file content
|
||||
*/
|
||||
async readAndProcess(filePath, metadata) {
|
||||
const content = await this.readFile(filePath);
|
||||
const content = await fs.readFile(filePath, 'utf8');
|
||||
return this.processContent(content, metadata);
|
||||
}
|
||||
|
||||
@@ -219,7 +218,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
|
||||
// Add core agents
|
||||
const corePath = getModulePath('core');
|
||||
if (await this.exists(path.join(corePath, 'agents'))) {
|
||||
if (await fs.pathExists(path.join(corePath, 'agents'))) {
|
||||
const coreAgents = await getAgentsFromDir(path.join(corePath, 'agents'), 'core');
|
||||
agents.push(...coreAgents);
|
||||
}
|
||||
@@ -229,7 +228,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
const modulePath = path.join(sourceDir, moduleName);
|
||||
const agentsPath = path.join(modulePath, 'agents');
|
||||
|
||||
if (await this.exists(agentsPath)) {
|
||||
if (await fs.pathExists(agentsPath)) {
|
||||
const moduleAgents = await getAgentsFromDir(agentsPath, moduleName);
|
||||
agents.push(...moduleAgents);
|
||||
}
|
||||
@@ -306,7 +305,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
choices = await this.promptSubagentInstallation(config.subagents);
|
||||
|
||||
if (choices.install !== 'none') {
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const locationAnswer = await inquirer.prompt([
|
||||
{
|
||||
type: 'list',
|
||||
@@ -343,7 +342,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
* Prompt user for subagent installation preferences
|
||||
*/
|
||||
async promptSubagentInstallation(subagentConfig) {
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
|
||||
// First ask if they want to install subagents
|
||||
const { install } = await inquirer.prompt([
|
||||
@@ -396,7 +395,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
const targetPath = path.join(projectDir, injection.file);
|
||||
|
||||
if (await this.exists(targetPath)) {
|
||||
let content = await this.readFile(targetPath);
|
||||
let content = await fs.readFile(targetPath, 'utf8');
|
||||
const marker = `<!-- IDE-INJECT-POINT: ${injection.point} -->`;
|
||||
|
||||
if (content.includes(marker)) {
|
||||
@@ -408,7 +407,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
content = content.replace(marker, injectionContent);
|
||||
await this.writeFile(targetPath, content);
|
||||
await fs.writeFile(targetPath, content);
|
||||
console.log(chalk.dim(` Injected: ${injection.point} → ${injection.file}`));
|
||||
}
|
||||
}
|
||||
@@ -426,7 +425,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
targetDir = path.join(os.homedir(), '.claude', 'agents');
|
||||
console.log(chalk.dim(` Installing subagents globally to: ~/.claude/agents/`));
|
||||
} else {
|
||||
targetDir = PathUtils.getIdeSubDir(projectDir, '.claude', 'agents');
|
||||
targetDir = path.join(projectDir, '.claude', 'agents');
|
||||
console.log(chalk.dim(` Installing subagents to project: .claude/agents/`));
|
||||
}
|
||||
|
||||
@@ -472,7 +471,7 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
||||
* @returns {Object|null} Info about created command
|
||||
*/
|
||||
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
||||
const customAgentsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir, 'bmad', 'custom', 'agents');
|
||||
const customAgentsDir = path.join(projectDir, this.configDir, this.commandsDir, 'bmad', 'custom', 'agents');
|
||||
|
||||
if (!(await this.exists(path.join(projectDir, this.configDir)))) {
|
||||
return null; // IDE not configured for this project
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { getAgentsFromBmad, getTasksFromBmad } = require('./shared/bmad-artifacts');
|
||||
@@ -27,8 +26,9 @@ class ClineSetup extends BaseIdeSetup {
|
||||
async setup(projectDir, bmadDir, options = {}) {
|
||||
console.log(chalk.cyan(`Setting up ${this.name}...`));
|
||||
|
||||
// Create .clinerules/workflows directory using shared utilities
|
||||
const workflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir);
|
||||
// Create .clinerules/workflows directory
|
||||
const clineDir = path.join(projectDir, this.configDir);
|
||||
const workflowsDir = path.join(clineDir, this.workflowsDir);
|
||||
|
||||
await this.ensureDir(workflowsDir);
|
||||
|
||||
@@ -72,9 +72,9 @@ class ClineSetup extends BaseIdeSetup {
|
||||
* Detect Cline installation by checking for .clinerules/workflows directory
|
||||
*/
|
||||
async detect(projectDir) {
|
||||
const workflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir);
|
||||
const workflowsDir = path.join(projectDir, this.configDir, this.workflowsDir);
|
||||
|
||||
if (!(await this.exists(workflowsDir))) {
|
||||
if (!(await fs.pathExists(workflowsDir))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ class ClineSetup extends BaseIdeSetup {
|
||||
|
||||
for (const artifact of artifacts) {
|
||||
const flattenedName = this.flattenFilename(artifact.relativePath);
|
||||
const targetPath = PathUtils.joinSafe(destDir, flattenedName);
|
||||
await this.writeFile(targetPath, artifact.content);
|
||||
const targetPath = path.join(destDir, flattenedName);
|
||||
await fs.writeFile(targetPath, artifact.content);
|
||||
written++;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ class ClineSetup extends BaseIdeSetup {
|
||||
* Cleanup Cline configuration
|
||||
*/
|
||||
async cleanup(projectDir) {
|
||||
const workflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir);
|
||||
const workflowsDir = path.join(projectDir, this.configDir, this.workflowsDir);
|
||||
await this.clearOldBmadFiles(workflowsDir);
|
||||
console.log(chalk.dim(`Removed ${this.name} BMAD configuration`));
|
||||
}
|
||||
@@ -218,10 +218,11 @@ class ClineSetup extends BaseIdeSetup {
|
||||
* @returns {Object} Installation result
|
||||
*/
|
||||
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
||||
const workflowsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.workflowsDir);
|
||||
const clineDir = path.join(projectDir, this.configDir);
|
||||
const workflowsDir = path.join(clineDir, this.workflowsDir);
|
||||
|
||||
// Create .clinerules/workflows directory if it doesn't exist
|
||||
await this.ensureDir(workflowsDir);
|
||||
await fs.ensureDir(workflowsDir);
|
||||
|
||||
// Create custom agent launcher workflow
|
||||
const launcherContent = `name: ${agentName}
|
||||
|
||||
@@ -3,7 +3,6 @@ const fs = require('fs-extra');
|
||||
const os = require('node:os');
|
||||
const chalk = require('chalk');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { getTasksFromBmad } = require('./shared/bmad-artifacts');
|
||||
@@ -22,7 +21,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
* @returns {Object} Collected configuration
|
||||
*/
|
||||
async collectConfiguration(options = {}) {
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
|
||||
let confirmed = false;
|
||||
let installLocation = 'global';
|
||||
@@ -131,7 +130,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
const projectSpecificDir = this.getCodexPromptDir(projectDir_local, 'project');
|
||||
|
||||
// Check global location
|
||||
if (await this.exists(globalDir)) {
|
||||
if (await fs.pathExists(globalDir)) {
|
||||
const entries = await fs.readdir(globalDir);
|
||||
if (entries.some((entry) => entry.startsWith('bmad-'))) {
|
||||
return true;
|
||||
@@ -139,7 +138,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
// Check project-specific location
|
||||
if (await this.exists(projectSpecificDir)) {
|
||||
if (await fs.pathExists(projectSpecificDir)) {
|
||||
const entries = await fs.readdir(projectSpecificDir);
|
||||
if (entries.some((entry) => entry.startsWith('bmad-'))) {
|
||||
return true;
|
||||
@@ -208,7 +207,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
|
||||
getCodexPromptDir(projectDir = null, location = 'global') {
|
||||
if (location === 'project' && projectDir) {
|
||||
return PathUtils.getIdeSubDir(projectDir, '.codex', 'prompts');
|
||||
return path.join(projectDir, '.codex', 'prompts');
|
||||
}
|
||||
return path.join(os.homedir(), '.codex', 'prompts');
|
||||
}
|
||||
@@ -219,7 +218,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
for (const artifact of artifacts) {
|
||||
const flattenedName = this.flattenFilename(artifact.relativePath);
|
||||
const targetPath = path.join(destDir, flattenedName);
|
||||
await this.writeFile(targetPath, artifact.content);
|
||||
await fs.writeFile(targetPath, artifact.content);
|
||||
written++;
|
||||
}
|
||||
|
||||
@@ -227,7 +226,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
async clearOldBmadFiles(destDir) {
|
||||
if (!(await this.exists(destDir))) {
|
||||
if (!(await fs.pathExists(destDir))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -249,7 +248,7 @@ class CodexSetup extends BaseIdeSetup {
|
||||
}
|
||||
|
||||
async readAndProcessWithProject(filePath, metadata, projectDir) {
|
||||
const content = await this.readFile(filePath);
|
||||
const content = await fs.readFile(filePath, 'utf8');
|
||||
return super.processContent(content, metadata, projectDir);
|
||||
}
|
||||
|
||||
@@ -377,7 +376,7 @@ You must fully embody this agent's persona and follow all activation instruction
|
||||
|
||||
const fileName = `bmad-custom-agents-${agentName}.md`;
|
||||
const launcherPath = path.join(destDir, fileName);
|
||||
await this.writeFile(launcherPath, launcherContent);
|
||||
await fs.writeFile(launcherPath, launcherContent, 'utf8');
|
||||
|
||||
return {
|
||||
path: path.relative(projectDir, launcherPath),
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
|
||||
@@ -27,8 +26,8 @@ class CrushSetup extends BaseIdeSetup {
|
||||
console.log(chalk.cyan(`Setting up ${this.name}...`));
|
||||
|
||||
// Create .crush/commands/bmad directory structure
|
||||
const crushDir = PathUtils.getConfigDir(projectDir, this.configDir);
|
||||
const commandsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
const crushDir = path.join(projectDir, this.configDir);
|
||||
const commandsDir = path.join(crushDir, this.commandsDir, 'bmad');
|
||||
|
||||
await this.ensureDir(commandsDir);
|
||||
|
||||
@@ -243,9 +242,9 @@ Part of the BMAD ${workflow.module.toUpperCase()} module.
|
||||
*/
|
||||
async cleanup(projectDir) {
|
||||
const fs = require('fs-extra');
|
||||
const bmadCommandsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
const bmadCommandsDir = path.join(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
|
||||
if (await this.exists(bmadCommandsDir)) {
|
||||
if (await fs.pathExists(bmadCommandsDir)) {
|
||||
await fs.remove(bmadCommandsDir);
|
||||
console.log(chalk.dim(`Removed BMAD commands from Crush`));
|
||||
}
|
||||
@@ -260,8 +259,8 @@ Part of the BMAD ${workflow.module.toUpperCase()} module.
|
||||
* @returns {Object} Installation result
|
||||
*/
|
||||
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
||||
const crushDir = PathUtils.getConfigDir(projectDir, this.configDir);
|
||||
const bmadCommandsDir = PathUtils.getIdeSubDir(projectDir, this.configDir, this.commandsDir, 'bmad');
|
||||
const crushDir = path.join(projectDir, this.configDir);
|
||||
const bmadCommandsDir = path.join(crushDir, this.commandsDir, 'bmad');
|
||||
|
||||
// Create .crush/commands/bmad directory if it doesn't exist
|
||||
await fs.ensureDir(bmadCommandsDir);
|
||||
@@ -287,7 +286,7 @@ The agent will follow the persona and instructions from the main agent file.
|
||||
const launcherPath = path.join(bmadCommandsDir, fileName);
|
||||
|
||||
// Write the launcher file
|
||||
await this.writeFile(launcherPath, launcherContent);
|
||||
await fs.writeFile(launcherPath, launcherContent, 'utf8');
|
||||
|
||||
return {
|
||||
ide: 'crush',
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ const fs = require('fs-extra');
|
||||
const yaml = require('yaml');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
const path = require('node:path');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const inquirer = require('inquirer').default || require('inquirer');
|
||||
const inquirer = require('inquirer');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@ const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const fs = require('fs-extra');
|
||||
const yaml = require('yaml');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
|
||||
/**
|
||||
* Kiro CLI setup handler for BMad Method
|
||||
|
||||
@@ -4,7 +4,6 @@ const os = require('node:os');
|
||||
const chalk = require('chalk');
|
||||
const yaml = require('yaml');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { getAgentsFromBmad, getTasksFromBmad } = require('./shared/bmad-artifacts');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
const { WorkflowCommandGenerator } = require('./shared/workflow-command-generator');
|
||||
const { TaskToolCommandGenerator } = require('./shared/task-tool-command-generator');
|
||||
|
||||
@@ -2,7 +2,6 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const path = require('node:path');
|
||||
const { BaseIdeSetup } = require('./_base-ide');
|
||||
const chalk = require('chalk');
|
||||
const { FileOps, PathUtils } = require('../../../lib/file-ops');
|
||||
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,9 +2,9 @@ const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const yaml = require('yaml');
|
||||
const chalk = require('chalk');
|
||||
const { XmlHandler } = require('../../../lib/agent/xml-handler');
|
||||
const { XmlHandler } = require('../../../lib/xml-handler');
|
||||
const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root');
|
||||
const { filterCustomizationData } = require('../../../lib/agent/yaml-xml-builder');
|
||||
const { filterCustomizationData } = require('../../../lib/agent/compiler');
|
||||
|
||||
/**
|
||||
* Manages the installation, updating, and removal of BMAD modules.
|
||||
@@ -757,7 +757,7 @@ class ModuleManager {
|
||||
// Read and compile the YAML
|
||||
try {
|
||||
const yamlContent = await fs.readFile(sourceYamlPath, 'utf8');
|
||||
const { compileAgent } = require('../../../lib/agent/yaml-xml-builder');
|
||||
const { compileAgent } = require('../../../lib/agent/compiler');
|
||||
|
||||
// Create customize template if it doesn't exist
|
||||
if (!(await fs.pathExists(customizePath))) {
|
||||
@@ -952,7 +952,7 @@ class ModuleManager {
|
||||
// // Check if content has agent XML and no activation block
|
||||
// if (content.includes('<agent') && !content.includes('<activation')) {
|
||||
// // Inject the activation block using XML handler
|
||||
// // TODO: Reimplement activation injection if needed
|
||||
// content = this.xmlHandler.injectActivationSimple(content);
|
||||
// await fs.writeFile(agentFile, content, 'utf8');
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user