moved bmad-core to dot folder so when adding to project it is clear its not part of the project it is added to

This commit is contained in:
Brian Madison
2025-06-13 19:11:17 -05:00
parent 03241a73d6
commit 7c71e1f815
86 changed files with 87 additions and 28247 deletions

View File

@@ -50,8 +50,8 @@ class ConfigLoader {
}
getBmadCorePath() {
// Get the path to bmad-core relative to the installer (now under tools)
return path.join(__dirname, '..', '..', '..', 'bmad-core');
// Get the path to .bmad-core relative to the installer (now under tools)
return path.join(__dirname, '..', '..', '..', '.bmad-core');
}
getAgentPath(agentId) {

View File

@@ -32,8 +32,8 @@ class IdeSetup {
await fileManager.ensureDirectory(cursorRulesDir);
for (const agentId of agents) {
// Check if bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentPath = path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`);
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentPath = path.join(installDir, '.bmad-core', 'agents', `${agentId}.md`);
if (!await fileManager.pathExists(agentPath)) {
agentPath = path.join(installDir, 'agents', `${agentId}.md`);
}
@@ -63,7 +63,7 @@ class IdeSetup {
}
mdcContent += '\n```\n\n';
mdcContent += '## File Reference\n\n';
mdcContent += `The complete agent definition is available in [bmad-core/agents/${agentId}.md](mdc:bmad-core/agents/${agentId}.md).\n\n`;
mdcContent += `The complete agent definition is available in [.bmad-core/agents/${agentId}.md](mdc:.bmad-core/agents/${agentId}.md).\n\n`;
mdcContent += '## Usage\n\n';
mdcContent += `When the user types \`@${agentId}\`, activate this ${this.getAgentTitle(agentId)} persona and follow all instructions defined in the YML configuration above.\n`;
@@ -84,8 +84,8 @@ class IdeSetup {
await fileManager.ensureDirectory(commandsDir);
for (const agentId of agents) {
// Check if bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentPath = path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`);
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentPath = path.join(installDir, '.bmad-core', 'agents', `${agentId}.md`);
if (!await fileManager.pathExists(agentPath)) {
agentPath = path.join(installDir, 'agents', `${agentId}.md`);
}
@@ -117,8 +117,8 @@ class IdeSetup {
await fileManager.ensureDirectory(windsurfRulesDir);
for (const agentId of agents) {
// Check if bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentPath = path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`);
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentPath = path.join(installDir, '.bmad-core', 'agents', `${agentId}.md`);
if (!await fileManager.pathExists(agentPath)) {
agentPath = path.join(installDir, 'agents', `${agentId}.md`);
}
@@ -143,7 +143,7 @@ class IdeSetup {
}
mdContent += '\n```\n\n';
mdContent += '## File Reference\n\n';
mdContent += `The complete agent definition is available in [bmad-core/agents/${agentId}.md](bmad-core/agents/${agentId}.md).\n\n`;
mdContent += `The complete agent definition is available in [.bmad-core/agents/${agentId}.md](.bmad-core/agents/${agentId}.md).\n\n`;
mdContent += '## Usage\n\n';
mdContent += `When the user types \`@${agentId}\`, activate this ${this.getAgentTitle(agentId)} persona and follow all instructions defined in the YML configuration above.\n`;
@@ -158,8 +158,8 @@ class IdeSetup {
}
async getAllAgentIds(installDir) {
// Check if bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentsDir = path.join(installDir, 'bmad-core', 'agents');
// Check if .bmad-core is a subdirectory (full install) or if agents are in root (single agent install)
let agentsDir = path.join(installDir, '.bmad-core', 'agents');
if (!await fileManager.pathExists(agentsDir)) {
agentsDir = path.join(installDir, 'agents');
}

View File

@@ -26,10 +26,10 @@ class Installer {
let files = [];
if (config.installType === 'full') {
// Full installation - copy entire bmad-core folder as a subdirectory
spinner.text = 'Copying complete bmad-core folder...';
// Full installation - copy entire .bmad-core folder as a subdirectory
spinner.text = 'Copying complete .bmad-core folder...';
const sourceDir = configLoader.getBmadCorePath();
const bmadCoreDestDir = path.join(installDir, 'bmad-core');
const bmadCoreDestDir = path.join(installDir, '.bmad-core');
await fileManager.copyDirectory(sourceDir, bmadCoreDestDir);
// Get list of all files for manifest
@@ -38,7 +38,7 @@ class Installer {
cwd: bmadCoreDestDir,
nodir: true,
ignore: ['**/.git/**', '**/node_modules/**']
}).map(file => path.join('bmad-core', file));
}).map(file => path.join('.bmad-core', file));
} else if (config.installType === 'single-agent') {
// Single agent installation
@@ -60,18 +60,18 @@ class Installer {
if (dep.includes('*')) {
// Handle glob patterns
const copiedFiles = await fileManager.copyGlobPattern(
dep.replace('bmad-core/', ''),
dep.replace('.bmad-core/', ''),
sourceBase,
installDir
);
files.push(...copiedFiles);
} else {
// Handle single files
const sourcePath = path.join(sourceBase, dep.replace('bmad-core/', ''));
const destPath = path.join(installDir, dep.replace('bmad-core/', ''));
const sourcePath = path.join(sourceBase, dep.replace('.bmad-core/', ''));
const destPath = path.join(installDir, dep.replace('.bmad-core/', ''));
if (await fileManager.copyFile(sourcePath, destPath)) {
files.push(dep.replace('bmad-core/', ''));
files.push(dep.replace('.bmad-core/', ''));
}
}
}
@@ -80,7 +80,7 @@ class Installer {
// Set up IDE integration if requested
if (config.ide) {
spinner.text = `Setting up ${config.ide} integration...`;
// For full installations, IDE rules should be in the root install dir, not bmad-core
// For full installations, IDE rules should be in the root install dir, not .bmad-core
await ideSetup.setup(config.ide, installDir, config.agent);
}
@@ -240,11 +240,11 @@ class Installer {
}
async findInstallation() {
// Look for bmad-core in current directory or parent directories
// Look for .bmad-core in current directory or parent directories
let currentDir = process.cwd();
while (currentDir !== path.dirname(currentDir)) {
const bmadDir = path.join(currentDir, 'bmad-core');
const bmadDir = path.join(currentDir, '.bmad-core');
const manifestPath = path.join(bmadDir, '.bmad', 'install-manifest.yml');
if (await fileManager.pathExists(manifestPath)) {
@@ -254,8 +254,8 @@ class Installer {
currentDir = path.dirname(currentDir);
}
// Also check if we're inside a bmad-core directory
if (path.basename(process.cwd()) === 'bmad-core') {
// Also check if we're inside a .bmad-core directory
if (path.basename(process.cwd()) === '.bmad-core') {
const manifestPath = path.join(process.cwd(), '.bmad', 'install-manifest.yml');
if (await fileManager.pathExists(manifestPath)) {
return process.cwd();