standardize custom agent workflow and module output, and improve module folder selection

This commit is contained in:
Brian Madison
2025-12-13 22:59:58 +08:00
parent add789a408
commit cba7cf223f
67 changed files with 815 additions and 1307 deletions

View File

@@ -333,9 +333,9 @@ async function compileAgent(yamlContent, answers = {}, agentName = '', targetPat
finalAnswers = { ...defaults, ...answers };
}
// Add agent_sidecar_folder to answers if provided in config
if (options.config && options.config.agent_sidecar_folder) {
finalAnswers.agent_sidecar_folder = options.config.agent_sidecar_folder;
// Add bmad_memory to answers if provided in config
if (options.config && options.config.bmad_memory) {
finalAnswers.bmad_memory = options.config.bmad_memory;
}
// Process templates with answers
@@ -344,10 +344,10 @@ async function compileAgent(yamlContent, answers = {}, agentName = '', targetPat
// Strip install_config from output
const cleanYaml = stripInstallConfig(processedYaml);
// Replace {agent_sidecar_folder} in XML content
// Replace {bmad_memory} in XML content
let xml = await compileToXml(cleanYaml, agentName, targetPath);
if (finalAnswers.agent_sidecar_folder) {
xml = xml.replaceAll('{agent_sidecar_folder}', finalAnswers.agent_sidecar_folder);
if (finalAnswers.bmad_memory) {
xml = xml.replaceAll('{bmad_memory}', finalAnswers.bmad_memory);
}
return {