SubAgents in sub folders. installer improvements. BMM Flow document added

This commit is contained in:
Brian Madison
2025-10-01 09:12:21 -05:00
parent 56e7a61bd3
commit 25c3d50673
20 changed files with 41 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ prompt:
# This is injected into the custom agent activation rules
user_name:
prompt: "What is your name?"
default: "Jane"
default: "BMad User"
result: "{value}"
# This is injected into the custom agent activation rules

View File

@@ -605,19 +605,48 @@ class ClaudeCodeSetup extends BaseIdeSetup {
filesToCopy = choices.selected;
}
// Copy selected subagent files
for (const file of filesToCopy) {
const sourcePath = path.join(sourceDir, file);
const targetPath = path.join(targetDir, file);
// Recursively find all matching files in source directory
const findFileInSource = async (filename) => {
const { glob } = require('glob');
const pattern = path.join(sourceDir, '**', filename);
const files = await glob(pattern);
return files[0]; // Return first match
};
if (await this.exists(sourcePath)) {
await fs.copyFile(sourcePath, targetPath);
console.log(chalk.green(` ✓ Installed: ${file.replace('.md', '')}`));
// Copy selected subagent files
let copiedCount = 0;
for (const file of filesToCopy) {
try {
const sourcePath = await findFileInSource(file);
if (sourcePath && (await this.exists(sourcePath))) {
// Extract subfolder name if file is in a subfolder
const relPath = path.relative(sourceDir, sourcePath);
const subFolder = path.dirname(relPath);
// Create corresponding subfolder in target if needed
let targetPath;
if (subFolder && subFolder !== '.') {
const targetSubDir = path.join(targetDir, subFolder);
await this.ensureDir(targetSubDir);
targetPath = path.join(targetSubDir, file);
} else {
targetPath = path.join(targetDir, file);
}
await fs.copyFile(sourcePath, targetPath);
console.log(chalk.green(` ✓ Installed: ${subFolder === '.' ? '' : subFolder + '/'}${file.replace('.md', '')}`));
copiedCount++;
} else {
console.log(chalk.yellow(` ⚠ Not found: ${file}`));
}
} catch (error) {
console.log(chalk.yellow(` ⚠ Error copying ${file}: ${error.message}`));
}
}
if (filesToCopy.length > 0) {
console.log(chalk.dim(` Total subagents installed: ${filesToCopy.length}`));
if (copiedCount > 0) {
console.log(chalk.dim(` Total subagents installed: ${copiedCount}`));
}
}
}

View File

@@ -10,6 +10,8 @@ Aside from stability and bug fixes found during the alpha period - the main focu
- DONE: if you modify an installed file and upgrade, the file will be saved as a .bak file and the installer will inform you.
- DONE: Game Agents comms style WAY to over the top - reduced a bit.
- need to nest subagents for better organization.
- DONE: Quick note on BMM v6 Flow
- DONE: CC SubAgents installed to subfolders now.
- IN PROGRESS - Team Web Bundler functional
- IN PROGRESS - bmm `testarch` integrated into the BMM workflow's after aligned with the rest of bmad method flow.
- IN PROGRESS - Document new agent workflows.