This commit is contained in:
Frank 2026-03-18 18:59:17 -05:00 committed by GitHub
commit 641b11d38b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 41 additions and 38 deletions

View File

@ -82,11 +82,11 @@ class DependencyResolver {
// Check if this is a source directory (has 'src' subdirectory) // Check if this is a source directory (has 'src' subdirectory)
const srcDir = path.join(bmadDir, 'src'); const srcDir = path.join(bmadDir, 'src');
if (await fs.pathExists(srcDir)) { if (await fs.pathExists(srcDir)) {
// Source directory structure: src/core or src/bmm // Source directory structure: src/core-skills or src/bmm-skills
if (module === 'core') { if (module === 'core') {
moduleDir = path.join(srcDir, 'core'); moduleDir = path.join(srcDir, 'core-skills');
} else if (module === 'bmm') { } else if (module === 'bmm') {
moduleDir = path.join(srcDir, 'bmm'); moduleDir = path.join(srcDir, 'bmm-skills');
} }
} }
@ -401,8 +401,8 @@ class DependencyResolver {
const bmadPath = dep.dependency.replace(/^bmad\//, ''); const bmadPath = dep.dependency.replace(/^bmad\//, '');
// Try to resolve as if it's in src structure // Try to resolve as if it's in src structure
// bmad/core/tasks/foo.md -> src/core/tasks/foo.md // bmad/core/tasks/foo.md -> src/core-skills/tasks/foo.md
// bmad/bmm/tasks/bar.md -> src/bmm/tasks/bar.md (bmm is directly under src/) // bmad/bmm/tasks/bar.md -> src/bmm-skills/tasks/bar.md (bmm is directly under src/)
// bmad/cis/agents/bar.md -> src/modules/cis/agents/bar.md // bmad/cis/agents/bar.md -> src/modules/cis/agents/bar.md
if (bmadPath.startsWith('core/')) { if (bmadPath.startsWith('core/')) {
@ -584,11 +584,11 @@ class DependencyResolver {
const relative = path.relative(bmadDir, filePath); const relative = path.relative(bmadDir, filePath);
const parts = relative.split(path.sep); const parts = relative.split(path.sep);
// Handle source directory structure (src/core, src/bmm, or src/modules/xxx) // Handle source directory structure (src/core-skills, src/bmm-skills, or src/modules/xxx)
if (parts[0] === 'src') { if (parts[0] === 'src') {
if (parts[1] === 'core') { if (parts[1] === 'core-skills') {
return 'core'; return 'core';
} else if (parts[1] === 'bmm') { } else if (parts[1] === 'bmm-skills') {
return 'bmm'; return 'bmm';
} else if (parts[1] === 'modules' && parts.length > 2) { } else if (parts[1] === 'modules' && parts.length > 2) {
return parts[2]; return parts[2];
@ -631,11 +631,11 @@ class DependencyResolver {
let moduleBase; let moduleBase;
// Check if file is in source directory structure // Check if file is in source directory structure
if (file.includes('/src/core/') || file.includes('/src/bmm/')) { if (file.includes('/src/core-skills/') || file.includes('/src/bmm-skills/')) {
if (module === 'core') { if (module === 'core') {
moduleBase = path.join(bmadDir, 'src', 'core'); moduleBase = path.join(bmadDir, 'src', 'core-skills');
} else if (module === 'bmm') { } else if (module === 'bmm') {
moduleBase = path.join(bmadDir, 'src', 'bmm'); moduleBase = path.join(bmadDir, 'src', 'bmm-skills');
} }
} else { } else {
moduleBase = module === 'core' ? path.join(bmadDir, 'core') : path.join(bmadDir, 'modules', module); moduleBase = module === 'core' ? path.join(bmadDir, 'core') : path.join(bmadDir, 'modules', module);

View File

@ -1789,8 +1789,8 @@ class Installer {
.filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs' && entry.name !== '_memory') .filter((entry) => entry.isDirectory() && entry.name !== '_config' && entry.name !== 'docs' && entry.name !== '_memory')
.map((entry) => entry.name); .map((entry) => entry.name);
// Add core module to scan (it's installed at root level as _config, but we check src/core) // Add core module to scan (it's installed at root level as _config, but we check src/core-skills)
const coreModulePath = getSourcePath('core'); const coreModulePath = getSourcePath('core-skills');
const modulePaths = new Map(); const modulePaths = new Map();
// Map all module source paths // Map all module source paths
@ -2709,7 +2709,7 @@ class Installer {
// Get source path // Get source path
let sourcePath; let sourcePath;
if (moduleId === 'core') { if (moduleId === 'core') {
sourcePath = getSourcePath('core'); sourcePath = getSourcePath('core-skills');
} else { } else {
// First check if it's in the custom cache // First check if it's in the custom cache
if (customModuleSources.has(moduleId)) { if (customModuleSources.has(moduleId)) {

View File

@ -764,10 +764,10 @@ class Manifest {
const configs = {}; const configs = {};
for (const moduleName of modules) { for (const moduleName of modules) {
// Handle core module differently - it's in src/core not src/modules/core // Handle core module differently - it's in src/core-skills not src/modules/core
const configPath = const configPath =
moduleName === 'core' moduleName === 'core'
? path.join(process.cwd(), 'src', 'core', 'config.yaml') ? path.join(process.cwd(), 'src', 'core-skills', 'config.yaml')
: path.join(process.cwd(), 'src', 'modules', moduleName, 'config.yaml'); : path.join(process.cwd(), 'src', 'modules', moduleName, 'config.yaml');
try { try {

View File

@ -146,13 +146,13 @@ When running any workflow:
transformWorkflowPath(workflowPath) { transformWorkflowPath(workflowPath) {
let transformed = workflowPath; let transformed = workflowPath;
if (workflowPath.includes('/src/bmm/')) { if (workflowPath.includes('/src/bmm-skills/')) {
const match = workflowPath.match(/\/src\/bmm\/(.+)/); const match = workflowPath.match(/\/src\/bmm-skills\/(.+)/);
if (match) { if (match) {
transformed = `{project-root}/${this.bmadFolderName}/bmm/${match[1]}`; transformed = `{project-root}/${this.bmadFolderName}/bmm/${match[1]}`;
} }
} else if (workflowPath.includes('/src/core/')) { } else if (workflowPath.includes('/src/core-skills/')) {
const match = workflowPath.match(/\/src\/core\/(.+)/); const match = workflowPath.match(/\/src\/core-skills\/(.+)/);
if (match) { if (match) {
transformed = `{project-root}/${this.bmadFolderName}/core/${match[1]}`; transformed = `{project-root}/${this.bmadFolderName}/core/${match[1]}`;
} }

View File

@ -187,7 +187,7 @@ class ModuleManager {
/** /**
* List all available modules (excluding core which is always installed) * List all available modules (excluding core which is always installed)
* bmm is the only built-in module, directly under src/bmm * bmm is the only built-in module, directly under src/bmm-skills
* All other modules come from external-official-modules.yaml * All other modules come from external-official-modules.yaml
* @returns {Object} Object with modules array and customModules array * @returns {Object} Object with modules array and customModules array
*/ */
@ -195,10 +195,10 @@ class ModuleManager {
const modules = []; const modules = [];
const customModules = []; const customModules = [];
// Add built-in bmm module (directly under src/bmm) // Add built-in bmm module (directly under src/bmm-skills)
const bmmPath = getSourcePath('bmm'); const bmmPath = getSourcePath('bmm-skills');
if (await fs.pathExists(bmmPath)) { if (await fs.pathExists(bmmPath)) {
const bmmInfo = await this.getModuleInfo(bmmPath, 'bmm', 'src/bmm'); const bmmInfo = await this.getModuleInfo(bmmPath, 'bmm', 'src/bmm-skills');
if (bmmInfo) { if (bmmInfo) {
modules.push(bmmInfo); modules.push(bmmInfo);
} }
@ -251,7 +251,8 @@ class ModuleManager {
} }
// Mark as custom if it's using custom.yaml OR if it's outside src/bmm or src/core // Mark as custom if it's using custom.yaml OR if it's outside src/bmm or src/core
const isCustomSource = sourceDescription !== 'src/bmm' && sourceDescription !== 'src/core' && sourceDescription !== 'src/modules'; const isCustomSource =
sourceDescription !== 'src/bmm-skills' && sourceDescription !== 'src/core-skills' && sourceDescription !== 'src/modules';
const moduleInfo = { const moduleInfo = {
id: defaultName, id: defaultName,
path: modulePath, path: modulePath,
@ -300,9 +301,9 @@ class ModuleManager {
return this.customModulePaths.get(moduleCode); return this.customModulePaths.get(moduleCode);
} }
// Check for built-in bmm module (directly under src/bmm) // Check for built-in bmm module (directly under src/bmm-skills)
if (moduleCode === 'bmm') { if (moduleCode === 'bmm') {
const bmmPath = getSourcePath('bmm'); const bmmPath = getSourcePath('bmm-skills');
if (await fs.pathExists(bmmPath)) { if (await fs.pathExists(bmmPath)) {
return bmmPath; return bmmPath;
} }
@ -1141,10 +1142,10 @@ class ModuleManager {
const projectRoot = path.dirname(bmadDir); const projectRoot = path.dirname(bmadDir);
const emptyResult = { createdDirs: [], movedDirs: [], createdWdsFolders: [] }; const emptyResult = { createdDirs: [], movedDirs: [], createdWdsFolders: [] };
// Special handling for core module - it's in src/core not src/modules // Special handling for core module - it's in src/core-skills not src/modules
let sourcePath; let sourcePath;
if (moduleName === 'core') { if (moduleName === 'core') {
sourcePath = getSourcePath('core'); sourcePath = getSourcePath('core-skills');
} else { } else {
sourcePath = await this.findModuleSource(moduleName, { silent: true }); sourcePath = await this.findModuleSource(moduleName, { silent: true });
if (!sourcePath) { if (!sourcePath) {

View File

@ -16,7 +16,7 @@ function findProjectRoot(startPath = __dirname) {
try { try {
const pkg = fs.readJsonSync(packagePath); const pkg = fs.readJsonSync(packagePath);
// Check if this is the BMAD project // Check if this is the BMAD project
if (pkg.name === 'bmad-method' || fs.existsSync(path.join(currentPath, 'src', 'core'))) { if (pkg.name === 'bmad-method' || fs.existsSync(path.join(currentPath, 'src', 'core-skills'))) {
return currentPath; return currentPath;
} }
} catch { } catch {
@ -24,8 +24,8 @@ function findProjectRoot(startPath = __dirname) {
} }
} }
// Also check for src/core as a marker // Also check for src/core-skills as a marker
if (fs.existsSync(path.join(currentPath, 'src', 'core', 'agents'))) { if (fs.existsSync(path.join(currentPath, 'src', 'core-skills', 'agents'))) {
return currentPath; return currentPath;
} }
@ -61,10 +61,10 @@ function getSourcePath(...segments) {
*/ */
function getModulePath(moduleName, ...segments) { function getModulePath(moduleName, ...segments) {
if (moduleName === 'core') { if (moduleName === 'core') {
return getSourcePath('core', ...segments); return getSourcePath('core-skills', ...segments);
} }
if (moduleName === 'bmm') { if (moduleName === 'bmm') {
return getSourcePath('bmm', ...segments); return getSourcePath('bmm-skills', ...segments);
} }
return getSourcePath('modules', moduleName, ...segments); return getSourcePath('modules', moduleName, ...segments);
} }

View File

@ -495,7 +495,7 @@ class YamlXmlBuilder {
// Extract module from path (e.g., /path/to/modules/bmm/agents/pm.yaml -> bmm) // Extract module from path (e.g., /path/to/modules/bmm/agents/pm.yaml -> bmm)
// or /path/to/bmad/bmm/agents/pm.yaml -> bmm // or /path/to/bmad/bmm/agents/pm.yaml -> bmm
// or /path/to/src/bmm/agents/pm.yaml -> bmm // or /path/to/src/bmm-skills/agents/pm.yaml -> bmm
let module = 'core'; // default to core let module = 'core'; // default to core
const pathParts = agentYamlPath.split(path.sep); const pathParts = agentYamlPath.split(path.sep);
@ -515,10 +515,12 @@ class YamlXmlBuilder {
module = potentialModule; module = potentialModule;
} }
} else if (srcIndex !== -1 && pathParts[srcIndex + 1]) { } else if (srcIndex !== -1 && pathParts[srcIndex + 1]) {
// Path contains /src/{module}/ (bmm and core are directly under src/) // Path contains /src/{module}/ (bmm-skills and core-skills are directly under src/)
const potentialModule = pathParts[srcIndex + 1]; const potentialModule = pathParts[srcIndex + 1];
if (potentialModule === 'bmm' || potentialModule === 'core') { if (potentialModule === 'bmm-skills') {
module = potentialModule; module = 'bmm';
} else if (potentialModule === 'core-skills') {
module = 'core';
} }
} }