fix: correct workflow command defaults and bmm document config paths
This commit is contained in:
parent
454ae910f9
commit
cfdb2db0f5
|
|
@ -7,7 +7,7 @@ author: "BMad"
|
|||
parent_workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md"
|
||||
|
||||
# Critical variables inherited from parent
|
||||
config_source: "{project-root}/_bmad/bmb/config.yaml"
|
||||
config_source: "{project-root}/_bmad/bmm/config.yaml"
|
||||
output_folder: "{config_source}:output_folder"
|
||||
user_name: "{config_source}:user_name"
|
||||
date: system-generated
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ author: "BMad"
|
|||
parent_workflow: "{project-root}/_bmad/bmm/workflows/document-project/workflow.md"
|
||||
|
||||
# Critical variables inherited from parent
|
||||
config_source: "{project-root}/_bmad/bmb/config.yaml"
|
||||
config_source: "{project-root}/_bmad/bmm/config.yaml"
|
||||
output_folder: "{config_source}:output_folder"
|
||||
user_name: "{config_source}:user_name"
|
||||
date: system-generated
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ const path = require('node:path');
|
|||
const fs = require('fs-extra');
|
||||
const { YamlXmlBuilder } = require('../tools/cli/lib/yaml-xml-builder');
|
||||
const { ManifestGenerator } = require('../tools/cli/installers/lib/core/manifest-generator');
|
||||
const { WorkflowCommandGenerator } = require('../tools/cli/installers/lib/ide/shared/workflow-command-generator');
|
||||
const { BMAD_FOLDER_NAME } = require('../tools/cli/installers/lib/ide/shared/path-utils');
|
||||
|
||||
// ANSI colors
|
||||
const colors = {
|
||||
|
|
@ -207,6 +209,24 @@ async function runTests() {
|
|||
|
||||
console.log('');
|
||||
|
||||
// ============================================================
|
||||
// Test 4: Workflow Command Generator Defaults
|
||||
// ============================================================
|
||||
console.log(`${colors.yellow}Test Suite 4: Workflow Generator Defaults${colors.reset}\n`);
|
||||
|
||||
try {
|
||||
const workflowGenerator = new WorkflowCommandGenerator();
|
||||
assert(
|
||||
workflowGenerator.bmadFolderName === BMAD_FOLDER_NAME,
|
||||
'Workflow generator default BMAD folder matches shared constant',
|
||||
`Expected "${BMAD_FOLDER_NAME}", got "${workflowGenerator.bmadFolderName}"`,
|
||||
);
|
||||
} catch (error) {
|
||||
assert(false, 'Workflow generator default path is valid', error.message);
|
||||
}
|
||||
|
||||
console.log('');
|
||||
|
||||
// ============================================================
|
||||
// Test 5: QA Agent Compilation
|
||||
// ============================================================
|
||||
|
|
@ -236,6 +256,36 @@ async function runTests() {
|
|||
|
||||
console.log('');
|
||||
|
||||
// ============================================================
|
||||
// Test 9: Guard against incorrect module config references
|
||||
// ============================================================
|
||||
console.log(`${colors.yellow}Test Suite 9: BMM Config Reference Guard${colors.reset}\n`);
|
||||
|
||||
try {
|
||||
const searchTargets = [path.join(projectRoot, 'src', 'bmm', 'workflows', 'document-project', 'workflows')];
|
||||
const allowedExtensions = new Set(['.yaml', '.yml']);
|
||||
const forbiddenRef = '{project-root}/_bmad/bmb/config.yaml';
|
||||
const offenders = [];
|
||||
|
||||
const files = await collectFiles(searchTargets, allowedExtensions);
|
||||
for (const fullPath of files) {
|
||||
const content = await fs.readFile(fullPath, 'utf8');
|
||||
if (content.includes(forbiddenRef)) {
|
||||
offenders.push(path.relative(projectRoot, fullPath));
|
||||
}
|
||||
}
|
||||
|
||||
assert(
|
||||
offenders.length === 0,
|
||||
'No bmm workflow configs should reference _bmad/bmb/config.yaml',
|
||||
offenders.length > 0 ? offenders.join(', ') : '',
|
||||
);
|
||||
} catch (error) {
|
||||
assert(false, 'BMM config reference guard runs', error.message);
|
||||
}
|
||||
|
||||
console.log('');
|
||||
|
||||
// ============================================================
|
||||
// Test 6: Guard against advanced-elicitation XML references
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Reference in New Issue