Compare commits

..

No commits in common. "46c43c1fcb77fc78dcc9c39651623d78d6a73a2e" and "9c1dec7f37ba6beb6cf6b0a97e7e4e1e6ffb328b" have entirely different histories.

2 changed files with 2 additions and 44 deletions

View File

@ -10,15 +10,9 @@ const ui = new UI();
module.exports = {
command: 'install',
description: 'Install BMAD Core agents and tools',
options: [['-d, --debug', 'Enable debug output for manifest generation']],
options: [],
action: async (options) => {
try {
// Set debug flag as environment variable for all components
if (options.debug) {
process.env.BMAD_DEBUG_MANIFEST = 'true';
console.log(chalk.cyan('Debug mode enabled\n'));
}
const config = await ui.promptInstall();
// Handle cancel

View File

@ -121,16 +121,8 @@ class ManifestGenerator {
async getWorkflowsFromPath(basePath, moduleName) {
const workflows = [];
const workflowsPath = path.join(basePath, 'workflows');
const debug = process.env.BMAD_DEBUG_MANIFEST === 'true';
if (debug) {
console.log(`[DEBUG] Scanning workflows in: ${workflowsPath}`);
}
if (!(await fs.pathExists(workflowsPath))) {
if (debug) {
console.log(`[DEBUG] Workflows path does not exist: ${workflowsPath}`);
}
return workflows;
}
@ -147,13 +139,8 @@ class ManifestGenerator {
await findWorkflows(fullPath, newRelativePath);
} else if (entry.name === 'workflow.yaml' || entry.name === 'workflow.md') {
// Parse workflow file (both YAML and MD formats)
if (debug) {
console.log(`[DEBUG] Found workflow file: ${fullPath}`);
}
try {
// Read and normalize line endings (fix Windows CRLF issues)
const rawContent = await fs.readFile(fullPath, 'utf8');
const content = rawContent.replaceAll('\r\n', '\n').replaceAll('\r', '\n');
const content = await fs.readFile(fullPath, 'utf8');
let workflow;
if (entry.name === 'workflow.yaml') {
@ -163,23 +150,13 @@ class ManifestGenerator {
// Parse MD workflow with YAML frontmatter
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
if (!frontmatterMatch) {
if (debug) {
console.log(`[DEBUG] Skipped (no frontmatter): ${fullPath}`);
}
continue; // Skip MD files without frontmatter
}
workflow = yaml.parse(frontmatterMatch[1]);
}
if (debug) {
console.log(`[DEBUG] Parsed: name="${workflow.name}", description=${workflow.description ? 'OK' : 'MISSING'}`);
}
// Skip template workflows (those with placeholder values)
if (workflow.name && workflow.name.includes('{') && workflow.name.includes('}')) {
if (debug) {
console.log(`[DEBUG] Skipped (template placeholder): ${workflow.name}`);
}
continue;
}
@ -205,14 +182,6 @@ class ManifestGenerator {
module: moduleName,
path: installPath,
});
if (debug) {
console.log(`[DEBUG] ✓ Added workflow: ${workflow.name} (${moduleName})`);
}
} else {
if (debug) {
console.log(`[DEBUG] Skipped (missing name or description): ${fullPath}`);
}
}
} catch (error) {
console.warn(`Warning: Failed to parse workflow at ${fullPath}: ${error.message}`);
@ -222,11 +191,6 @@ class ManifestGenerator {
};
await findWorkflows(workflowsPath);
if (debug) {
console.log(`[DEBUG] Total workflows found in ${moduleName}: ${workflows.length}`);
}
return workflows;
}