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

@@ -1887,7 +1887,6 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
// Determine project directory (parent of bmad/ directory)
const bmadDir = path.dirname(modulePath);
const projectDir = path.dirname(bmadDir);
const cfgAgentsDir = path.join(bmadDir, '_config', 'agents');
// Ensure _config/agents directory exists
@@ -2116,7 +2115,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
answers.memories = customizeData.memories;
}
// Get core config for agent_sidecar_folder
// Get core config for bmad_memory
const coreConfigPath = path.join(bmadDir, 'bmb', 'config.yaml');
let coreConfig = {};
if (await fs.pathExists(coreConfigPath)) {

View File

@@ -875,7 +875,7 @@ class ModuleManager {
}
}
// Load core config to get agent_sidecar_folder
// Load core config to get bmad_memory
const coreConfigPath = path.join(bmadDir, 'bmb', 'config.yaml');
let coreConfig = {};

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 {