refactor: update file paths to remove leading dot from bmad-core references

This commit is contained in:
manjaroblack
2025-08-18 09:46:16 -05:00
parent aa9777a06e
commit ed7291f2ce
41 changed files with 901 additions and 909 deletions

View File

@@ -41,22 +41,22 @@ class WebBuilder {
generateWebInstructions(bundleType, packName = null) {
// Generate dynamic web instructions based on bundle type
const rootExample = packName ? `.${packName}` : '.bmad-core';
const rootExample = packName ? `.${packName}` : 'bmad-core';
const examplePath = packName
? `.${packName}/folder/filename.md`
: '.bmad-core/folder/filename.md';
: 'bmad-core/folder/filename.md';
const personasExample = packName
? `.${packName}/personas/analyst.md`
: '.bmad-core/personas/analyst.md';
: 'bmad-core/personas/analyst.md';
const tasksExample = packName
? `.${packName}/tasks/create-story.md`
: '.bmad-core/tasks/create-story.md';
: 'bmad-core/tasks/create-story.md';
const utilitiesExample = packName
? `.${packName}/utils/template-format.md`
: '.bmad-core/utils/template-format.md';
: 'bmad-core/utils/template-format.md';
const tasksReference = packName
? `.${packName}/tasks/create-story.md`
: '.bmad-core/tasks/create-story.md';
: 'bmad-core/tasks/create-story.md';
return `# Web Agent Bundle Instructions

View File

@@ -6,7 +6,7 @@ const ignore = require('ignore');
// These complement .gitignore and are applied regardless of VCS presence.
const DEFAULT_PATTERNS = [
// Project/VCS
'**/.bmad-core/**',
'**/bmad-core/**',
'**/.git/**',
'**/.svn/**',
'**/.hg/**',

View File

@@ -254,9 +254,9 @@ async function promptInstallation() {
currentVersion === newVersion
? `(v${currentVersion} - reinstall)`
: `(v${currentVersion} → v${newVersion})`;
bmadOptionText = `Update ${coreShortTitle} ${versionInfo} .bmad-core`;
bmadOptionText = `Update ${coreShortTitle} ${versionInfo} bmad-core`;
} else {
bmadOptionText = `${coreShortTitle} (v${version}) .bmad-core`;
bmadOptionText = `${coreShortTitle} (v${version}) bmad-core`;
}
choices.push({

View File

@@ -1,7 +1,7 @@
installation-options:
full:
name: Complete BMad Core
description: Copy the entire .bmad-core folder with all agents, templates, and tools
description: Copy the entire bmad-core folder with all agents, templates, and tools
action: copy-folder
source: bmad-core
single-agent:

View File

@@ -148,7 +148,7 @@ class ConfigLoader {
// Add all resolved resources
for (const resource of agentDeps.resources) {
const filePath = `.bmad-core/${resource.type}/${resource.id}.md`;
const filePath = `bmad-core/${resource.type}/${resource.id}.md`;
if (!depPaths.includes(filePath)) {
depPaths.push(filePath);
}
@@ -229,11 +229,11 @@ class ConfigLoader {
const depPaths = [];
// Add team config file
depPaths.push(`.bmad-core/agent-teams/${teamId}.yaml`);
depPaths.push(`bmad-core/agent-teams/${teamId}.yaml`);
// Add all agents
for (const agent of teamDeps.agents) {
const filePath = `.bmad-core/agents/${agent.id}.md`;
const filePath = `bmad-core/agents/${agent.id}.md`;
if (!depPaths.includes(filePath)) {
depPaths.push(filePath);
}
@@ -241,7 +241,7 @@ class ConfigLoader {
// Add all resolved resources
for (const resource of teamDeps.resources) {
const filePath = `.bmad-core/${resource.type}/${resource.id}.${resource.type === 'workflows' ? 'yaml' : 'md'}`;
const filePath = `bmad-core/${resource.type}/${resource.id}.${resource.type === 'workflows' ? 'yaml' : 'md'}`;
if (!depPaths.includes(filePath)) {
depPaths.push(filePath);
}

View File

@@ -272,7 +272,7 @@ class FileManager {
}
async modifyCoreConfig(installDir, config) {
const coreConfigPath = path.join(installDir, '.bmad-core', 'core-config.yaml');
const coreConfigPath = path.join(installDir, 'bmad-core', 'core-config.yaml');
try {
// Read the existing core-config.yaml
@@ -382,7 +382,7 @@ class FileManager {
return false;
}
}
manifestDir = '.bmad-core';
manifestDir = 'bmad-core';
manifestFile = 'install-manifest.yaml';
}

View File

@@ -50,7 +50,7 @@ class BaseIdeSetup {
async getCoreAgentIds(installDir) {
const coreAgents = [];
const corePaths = [
path.join(installDir, '.bmad-core', 'agents'),
path.join(installDir, 'bmad-core', 'agents'),
path.join(installDir, 'bmad-core', 'agents'),
];
@@ -80,7 +80,7 @@ class BaseIdeSetup {
if (!agentPath) {
// Check installation-specific paths
const possiblePaths = [
path.join(installDir, '.bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'common', 'agents', `${agentId}.md`),
];
@@ -134,7 +134,7 @@ class BaseIdeSetup {
const dotExpansions = await resourceLocator.findFiles('.bmad-*', { cwd: installDir });
for (const dotExpansion of dotExpansions) {
if (dotExpansion !== '.bmad-core') {
if (dotExpansion !== 'bmad-core') {
const packPath = path.join(installDir, dotExpansion);
const packName = dotExpansion.slice(1); // remove the dot
expansionPacks.push({
@@ -147,7 +147,7 @@ class BaseIdeSetup {
// Check other dot folders that have config.yaml
const allDotFolders = await resourceLocator.findFiles('.*', { cwd: installDir });
for (const folder of allDotFolders) {
if (!folder.startsWith('.bmad-') && folder !== '.bmad-core') {
if (!folder.startsWith('.bmad-') && folder !== 'bmad-core') {
const packPath = path.join(installDir, folder);
const configPath = path.join(packPath, 'config.yaml');
if (await fileManager.pathExists(configPath)) {

View File

@@ -113,7 +113,7 @@ class IdeSetup extends BaseIdeSetup {
coreSlashPrefix,
coreAgents,
coreTasks,
'.bmad-core',
'bmad-core',
);
// Setup expansion pack commands
@@ -151,7 +151,7 @@ class IdeSetup extends BaseIdeSetup {
coreSlashPrefix,
coreAgents,
coreTasks,
'.bmad-core',
'bmad-core',
);
// Setup expansion pack commands
@@ -445,7 +445,7 @@ class IdeSetup extends BaseIdeSetup {
async findAgentPath(agentId, installDir) {
// Try to find the agent file in various locations
const possiblePaths = [
path.join(installDir, '.bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'agents', `${agentId}.md`),
];
@@ -469,8 +469,8 @@ class IdeSetup extends BaseIdeSetup {
const glob = require('glob');
const allAgentIds = [];
// Check core agents in .bmad-core or root
let agentsDir = path.join(installDir, '.bmad-core', 'agents');
// Check core agents in bmad-core or root
let agentsDir = path.join(installDir, 'bmad-core', 'agents');
if (!(await fileManager.pathExists(agentsDir))) {
agentsDir = path.join(installDir, 'agents');
}
@@ -495,8 +495,8 @@ class IdeSetup extends BaseIdeSetup {
async getCoreAgentIds(installDir) {
const allAgentIds = [];
// Check core agents in .bmad-core or root only
let agentsDir = path.join(installDir, '.bmad-core', 'agents');
// Check core agents in bmad-core or root only
let agentsDir = path.join(installDir, 'bmad-core', 'agents');
if (!(await fileManager.pathExists(agentsDir))) {
agentsDir = path.join(installDir, 'bmad-core', 'agents');
}
@@ -513,8 +513,8 @@ class IdeSetup extends BaseIdeSetup {
async getCoreTaskIds(installDir) {
const allTaskIds = [];
// Check core tasks in .bmad-core or root only
let tasksDir = path.join(installDir, '.bmad-core', 'tasks');
// Check core tasks in bmad-core or root only
let tasksDir = path.join(installDir, 'bmad-core', 'tasks');
if (!(await fileManager.pathExists(tasksDir))) {
tasksDir = path.join(installDir, 'bmad-core', 'tasks');
}
@@ -538,7 +538,7 @@ class IdeSetup extends BaseIdeSetup {
async getAgentTitle(agentId, installDir) {
// Try to find the agent file in various locations
const possiblePaths = [
path.join(installDir, '.bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'bmad-core', 'agents', `${agentId}.md`),
path.join(installDir, 'agents', `${agentId}.md`),
];
@@ -579,8 +579,8 @@ class IdeSetup extends BaseIdeSetup {
const glob = require('glob');
const allTaskIds = [];
// Check core tasks in .bmad-core or root
let tasksDir = path.join(installDir, '.bmad-core', 'tasks');
// Check core tasks in bmad-core or root
let tasksDir = path.join(installDir, 'bmad-core', 'tasks');
if (!(await fileManager.pathExists(tasksDir))) {
tasksDir = path.join(installDir, 'bmad-core', 'tasks');
}
@@ -623,7 +623,7 @@ class IdeSetup extends BaseIdeSetup {
async findTaskPath(taskId, installDir) {
// Try to find the task file in various locations
const possiblePaths = [
path.join(installDir, '.bmad-core', 'tasks', `${taskId}.md`),
path.join(installDir, 'bmad-core', 'tasks', `${taskId}.md`),
path.join(installDir, 'bmad-core', 'tasks', `${taskId}.md`),
path.join(installDir, 'common', 'tasks', `${taskId}.md`),
];
@@ -657,7 +657,7 @@ class IdeSetup extends BaseIdeSetup {
async getCoreSlashPrefix(installDir) {
try {
const coreConfigPath = path.join(installDir, '.bmad-core', 'core-config.yaml');
const coreConfigPath = path.join(installDir, 'bmad-core', 'core-config.yaml');
if (!(await fileManager.pathExists(coreConfigPath))) {
// Try bmad-core directory
const altConfigPath = path.join(installDir, 'bmad-core', 'core-config.yaml');
@@ -686,7 +686,7 @@ class IdeSetup extends BaseIdeSetup {
const dotExpansions = glob.sync('.bmad-*', { cwd: installDir });
for (const dotExpansion of dotExpansions) {
if (dotExpansion !== '.bmad-core') {
if (dotExpansion !== 'bmad-core') {
const packPath = path.join(installDir, dotExpansion);
const packName = dotExpansion.slice(1); // remove the dot
expansionPacks.push({
@@ -1012,7 +1012,7 @@ class IdeSetup extends BaseIdeSetup {
}
mdContent += '\n```\n\n';
mdContent += '## Project Standards\n\n';
mdContent += `- Always maintain consistency with project documentation in .bmad-core/\n`;
mdContent += `- Always maintain consistency with project documentation in bmad-core/\n`;
mdContent += `- Follow the agent's specific guidelines and constraints\n`;
mdContent += `- Update relevant project files when making changes\n`;
const relativePath = path.relative(installDir, agentPath).replaceAll('\\', '/');

View File

@@ -34,8 +34,8 @@ class Installer {
? config.directory
: path.resolve(originalCwd, config.directory);
if (path.basename(installDir) === '.bmad-core') {
// If user points directly to .bmad-core, treat its parent as the project root
if (path.basename(installDir) === 'bmad-core') {
// If user points directly to bmad-core, treat its parent as the project root
installDir = path.dirname(installDir);
}
@@ -173,8 +173,8 @@ class Installer {
return state; // clean install
}
// Check for V4 installation (has .bmad-core with manifest)
const bmadCorePath = path.join(installDir, '.bmad-core');
// Check for V4 installation (has bmad-core with manifest)
const bmadCorePath = path.join(installDir, 'bmad-core');
const manifestPath = path.join(bmadCorePath, 'install-manifest.yaml');
if (await fileManager.pathExists(manifestPath)) {
@@ -193,7 +193,7 @@ class Installer {
return state;
}
// Check for .bmad-core without manifest (broken V4 or manual copy)
// Check for bmad-core without manifest (broken V4 or manual copy)
if (await fileManager.pathExists(bmadCorePath)) {
state.type = 'unknown_existing';
state.hasBmadCore = true;
@@ -227,23 +227,19 @@ class Installer {
switch (config.installType) {
case '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 = resourceLocator.getBmadCorePath();
const bmadCoreDestDir = path.join(installDir, '.bmad-core');
await fileManager.copyDirectoryWithRootReplacement(
sourceDir,
bmadCoreDestDir,
'.bmad-core',
);
const bmadCoreDestDir = path.join(installDir, 'bmad-core');
await fileManager.copyDirectoryWithRootReplacement(sourceDir, bmadCoreDestDir, 'bmad-core');
// Copy common/ items to .bmad-core
// Copy common/ items to bmad-core
spinner.text = 'Copying common utilities...';
await this.copyCommonItems(installDir, '.bmad-core', spinner);
await this.copyCommonItems(installDir, 'bmad-core', spinner);
// Copy documentation files from docs/ to .bmad-core
// Copy documentation files from docs/ to bmad-core
spinner.text = 'Copying documentation files...';
await this.copyDocsItems(installDir, '.bmad-core', spinner);
await this.copyDocsItems(installDir, 'bmad-core', spinner);
// Get list of all files for manifest
const foundFiles = await resourceLocator.findFiles('**/*', {
@@ -251,7 +247,7 @@ class Installer {
nodir: true,
ignore: ['**/.git/**', '**/node_modules/**'],
});
files = foundFiles.map((file) => path.join('.bmad-core', file));
files = foundFiles.map((file) => path.join('bmad-core', file));
break;
}
@@ -263,16 +259,12 @@ class Installer {
const agentPath = configLoader.getAgentPath(config.agent);
const destinationAgentPath = path.join(
installDir,
'.bmad-core',
'bmad-core',
'agents',
`${config.agent}.md`,
);
await fileManager.copyFileWithRootReplacement(
agentPath,
destinationAgentPath,
'.bmad-core',
);
files.push(`.bmad-core/agents/${config.agent}.md`);
await fileManager.copyFileWithRootReplacement(agentPath, destinationAgentPath, 'bmad-core');
files.push(`bmad-core/agents/${config.agent}.md`);
// Copy dependencies
const { all: dependencies } = await resourceLocator.getAgentDependencies(config.agent);
@@ -284,15 +276,15 @@ class Installer {
if (dep.includes('*')) {
// Handle glob patterns with {root} replacement
const copiedFiles = await fileManager.copyGlobPattern(
dep.replace('.bmad-core/', ''),
dep.replace('bmad-core/', ''),
sourceBase,
path.join(installDir, '.bmad-core'),
'.bmad-core',
path.join(installDir, 'bmad-core'),
'bmad-core',
);
files.push(...copiedFiles.map((f) => `.bmad-core/${f}`));
files.push(...copiedFiles.map((f) => `bmad-core/${f}`));
} else {
// Handle single files with {root} replacement if needed
const sourcePath = path.join(sourceBase, dep.replace('.bmad-core/', ''));
const sourcePath = path.join(sourceBase, dep.replace('bmad-core/', ''));
const destinationPath = path.join(installDir, dep);
const needsRootReplacement =
@@ -300,7 +292,7 @@ class Installer {
let success = false;
success = await (needsRootReplacement
? fileManager.copyFileWithRootReplacement(sourcePath, destinationPath, '.bmad-core')
? fileManager.copyFileWithRootReplacement(sourcePath, destinationPath, 'bmad-core')
: fileManager.copyFile(sourcePath, destinationPath));
if (success) {
@@ -309,14 +301,14 @@ class Installer {
}
}
// Copy common/ items to .bmad-core
// Copy common/ items to bmad-core
spinner.text = 'Copying common utilities...';
const commonFiles = await this.copyCommonItems(installDir, '.bmad-core', spinner);
const commonFiles = await this.copyCommonItems(installDir, 'bmad-core', spinner);
files.push(...commonFiles);
// Copy documentation files from docs/ to .bmad-core
// Copy documentation files from docs/ to bmad-core
spinner.text = 'Copying documentation files...';
const documentFiles = await this.copyDocsItems(installDir, '.bmad-core', spinner);
const documentFiles = await this.copyDocsItems(installDir, 'bmad-core', spinner);
files.push(...documentFiles);
break;
@@ -336,15 +328,15 @@ class Installer {
if (dep.includes('*')) {
// Handle glob patterns with {root} replacement
const copiedFiles = await fileManager.copyGlobPattern(
dep.replace('.bmad-core/', ''),
dep.replace('bmad-core/', ''),
sourceBase,
path.join(installDir, '.bmad-core'),
'.bmad-core',
path.join(installDir, 'bmad-core'),
'bmad-core',
);
files.push(...copiedFiles.map((f) => `.bmad-core/${f}`));
files.push(...copiedFiles.map((f) => `bmad-core/${f}`));
} else {
// Handle single files with {root} replacement if needed
const sourcePath = path.join(sourceBase, dep.replace('.bmad-core/', ''));
const sourcePath = path.join(sourceBase, dep.replace('bmad-core/', ''));
const destinationPath = path.join(installDir, dep);
const needsRootReplacement =
@@ -352,7 +344,7 @@ class Installer {
let success = false;
success = await (needsRootReplacement
? fileManager.copyFileWithRootReplacement(sourcePath, destinationPath, '.bmad-core')
? fileManager.copyFileWithRootReplacement(sourcePath, destinationPath, 'bmad-core')
: fileManager.copyFile(sourcePath, destinationPath));
if (success) {
@@ -361,20 +353,20 @@ class Installer {
}
}
// Copy common/ items to .bmad-core
// Copy common/ items to bmad-core
spinner.text = 'Copying common utilities...';
const commonFiles = await this.copyCommonItems(installDir, '.bmad-core', spinner);
const commonFiles = await this.copyCommonItems(installDir, 'bmad-core', spinner);
files.push(...commonFiles);
// Copy documentation files from docs/ to .bmad-core
// Copy documentation files from docs/ to bmad-core
spinner.text = 'Copying documentation files...';
const documentFiles = await this.copyDocsItems(installDir, '.bmad-core', spinner);
const documentFiles = await this.copyDocsItems(installDir, 'bmad-core', spinner);
files.push(...documentFiles);
break;
}
case 'expansion-only': {
// Expansion-only installation - DO NOT create .bmad-core
// Expansion-only installation - DO NOT create bmad-core
// Only install expansion packs
spinner.text = 'Installing expansion packs only...';
@@ -633,7 +625,7 @@ class Installer {
console.log(` Directory: ${installDir}`);
if (state.hasBmadCore) {
console.log(' Found: .bmad-core directory (but no manifest)');
console.log(' Found: bmad-core directory (but no manifest)');
}
if (state.hasOtherFiles) {
console.log(' Found: Other files in directory');
@@ -771,7 +763,7 @@ class Installer {
// Skip the manifest file itself
if (file.endsWith('install-manifest.yaml')) continue;
const relativePath = file.replace('.bmad-core/', '');
const relativePath = file.replace('bmad-core/', '');
const destinationPath = path.join(installDir, file);
// Check if this is a common/ file that needs special processing
@@ -782,7 +774,7 @@ class Installer {
// This is a common/ file - needs template processing
const fs = require('node:fs').promises;
const content = await fs.readFile(commonSourcePath, 'utf8');
const updatedContent = content.replaceAll('{root}', '.bmad-core');
const updatedContent = content.replaceAll('{root}', 'bmad-core');
await fileManager.ensureDirectory(path.dirname(destinationPath));
await fs.writeFile(destinationPath, updatedContent, 'utf8');
spinner.text = `Restored: ${file}`;
@@ -845,8 +837,8 @@ class Installer {
async performReinstall(config, installDir, spinner) {
spinner.start('Preparing to reinstall BMad Method...');
// Remove existing .bmad-core
const bmadCorePath = path.join(installDir, '.bmad-core');
// Remove existing bmad-core
const bmadCorePath = path.join(installDir, 'bmad-core');
if (await fileManager.pathExists(bmadCorePath)) {
spinner.text = 'Removing existing installation...';
await fileManager.removeDirectory(bmadCorePath);
@@ -882,7 +874,7 @@ class Installer {
// Information about installation components
console.log(chalk.bold('\n🎯 Installation Summary:'));
if (config.installType !== 'expansion-only') {
console.log(chalk.green('✓ .bmad-core framework installed with all agents and workflows'));
console.log(chalk.green('✓ bmad-core framework installed with all agents and workflows'));
}
if (config.expansionPacks && config.expansionPacks.length > 0) {
@@ -941,7 +933,7 @@ class Installer {
// Important notice to read the user guide
console.log(
chalk.red.bold(
'\n📖 IMPORTANT: Please read the user guide at docs/user-guide.md (also installed at .bmad-core/user-guide.md)',
'\n📖 IMPORTANT: Please read the user guide at docs/user-guide.md (also installed at bmad-core/user-guide.md)',
),
);
console.log(
@@ -1787,7 +1779,7 @@ class Installer {
// Find all dot folders that might be expansion packs
const dotFolders = glob.sync('.*', {
cwd: installDir,
ignore: ['.git', '.git/**', '.bmad-core', '.bmad-core/**'],
ignore: ['.git', '.git/**', 'bmad-core', 'bmad-core/**'],
});
for (const folder of dotFolders) {
@@ -1944,22 +1936,22 @@ 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, 'install-manifest.yaml');
if (await fileManager.pathExists(manifestPath)) {
return currentDir; // Return parent directory, not .bmad-core itself
return currentDir; // Return parent directory, not bmad-core itself
}
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(), 'install-manifest.yaml');
if (await fileManager.pathExists(manifestPath)) {
return path.dirname(process.cwd()); // Return parent directory

View File

@@ -251,7 +251,7 @@ class ResourceLocator {
if (Array.isArray(deps)) {
byType[type] = deps;
for (const dep of deps) {
allDeps.push(`.bmad-core/${type}/${dep}`);
allDeps.push(`bmad-core/${type}/${dep}`);
}
}
}

View File

@@ -8,13 +8,13 @@ You are now operating as a specialized AI agent from the BMad-Method framework.
### **Resource Navigation**: This bundle contains all resources you need. Resources are marked with tags like:
- `==================== START: .bmad-core/folder/filename.md ====================`
- `==================== END: .bmad-core/folder/filename.md ====================`
- `==================== START: bmad-core/folder/filename.md ====================`
- `==================== END: bmad-core/folder/filename.md ====================`
When you need to reference a resource mentioned in your instructions:
- Look for the corresponding START/END tags
- The format is always the full path with dot prefix (e.g., `.bmad-core/personas/analyst.md`, `.bmad-core/tasks/create-story.md`)
- The format is always the full path with dot prefix (e.g., `bmad-core/personas/analyst.md`, `bmad-core/tasks/create-story.md`)
- If a section is specified (e.g., `{root}/tasks/create-story.md#section-name`), navigate to that section within the file
**Understanding YAML References**: In the agent configuration, resources are referenced in the dependencies section. For example:
@@ -29,8 +29,8 @@ dependencies:
These references map directly to bundle sections:
- `dependencies.utils: template-format` → Look for `==================== START: .bmad-core/utils/template-format.md ====================`
- `dependencies.utils: create-story` → Look for `==================== START: .bmad-core/tasks/create-story.md ====================`
- `dependencies.utils: template-format` → Look for `==================== START: bmad-core/utils/template-format.md ====================`
- `dependencies.utils: create-story` → Look for `==================== START: bmad-core/tasks/create-story.md ====================`
### **Execution Context**: You are operating in a web environment. All your capabilities and knowledge are contained within this bundle. Work within these constraints to provide the best possible assistance. You have no file system to write to, so you will maintain document history being drafted in your memory unless a canvas feature is available and the user confirms its usage.

View File

@@ -29,7 +29,7 @@ class V3ToV4Upgrader {
console.log('This tool will help you upgrade your BMad-Method V3 project to V4.\n');
console.log(chalk.cyan('What this tool does:'));
console.log('- Creates a backup of your V3 files (.bmad-v3-backup/)');
console.log('- Installs the new V4 .bmad-core structure');
console.log('- Installs the new V4 bmad-core structure');
console.log('- Preserves your PRD, Architecture, and Stories in the new format\n');
console.log(chalk.yellow('What this tool does NOT do:'));
console.log('- Modify your document content (use doc-migration-task after upgrade)');
@@ -336,12 +336,12 @@ class V3ToV4Upgrader {
try {
// Get the source bmad-core directory (without dot prefix)
const sourcePath = path.join(__dirname, '..', '..', 'bmad-core');
const destinationPath = path.join(projectPath, '.bmad-core');
const destinationPath = path.join(projectPath, 'bmad-core');
// Copy .bmad-core
// Copy bmad-core
await this.copyDirectory(sourcePath, destinationPath);
spinner.text = '✓ Copied fresh .bmad-core/ directory from V4';
console.log(chalk.green('\n✓ Copied fresh .bmad-core/ directory from V4'));
spinner.text = '✓ Copied fresh bmad-core/ directory from V4';
console.log(chalk.green('\n✓ Copied fresh bmad-core/ directory from V4'));
// Create docs directory
const docsPath = path.join(projectPath, 'docs');
@@ -516,7 +516,7 @@ class V3ToV4Upgrader {
console.log(chalk.bold.green('\n✓ Upgrade Complete!\n'));
console.log(chalk.bold('Summary:'));
console.log(`- V3 files backed up to: .bmad-v3-backup/`);
console.log(`- V4 structure installed: .bmad-core/ (fresh from V4)`);
console.log(`- V4 structure installed: bmad-core/ (fresh from V4)`);
const totalDocs =
(analysis.prdFile ? 1 : 0) +
@@ -648,16 +648,16 @@ class V3ToV4Upgrader {
const fileManager = require('../installer/lib/file-manager');
const { glob } = require('glob');
// Get all files in .bmad-core for the manifest
const bmadCorePath = path.join(projectPath, '.bmad-core');
// Get all files in bmad-core for the manifest
const bmadCorePath = path.join(projectPath, 'bmad-core');
const files = await glob('**/*', {
cwd: bmadCorePath,
nodir: true,
ignore: ['**/.git/**', '**/node_modules/**'],
});
// Prepend .bmad-core/ to file paths for manifest
const manifestFiles = files.map((file) => path.join('.bmad-core', file));
// Prepend bmad-core/ to file paths for manifest
const manifestFiles = files.map((file) => path.join('bmad-core', file));
const config = {
installType: 'full',