fix: recompile agents during module update to get latest source changes

The update() and updateCore() methods were only syncing files without
recompiling agents. Since compiled .md agent files are always newer
than their source .agent.yaml files, mtime-based skip logic prevented
agent updates.

Now both methods call compileModuleAgents() after syncing, ensuring
agents are rebuilt from fresh source YAML. User customizations remain
safe in separate .customize.yaml files.

Fixed in two places:
- ModuleManager.update() for module agents (bmm, bmb, etc.)
- Installer.updateCore() for core agents (bmad-master)

Fixes: https://github.com/bmad-code-org/BMAD-METHOD/issues/1133

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Verkhovsky 2025-12-13 09:04:31 -07:00
parent 4c65f3a006
commit f2f72fd476
2 changed files with 10 additions and 0 deletions

View File

@ -2222,6 +2222,12 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
} else { } else {
// Selective update - preserve user modifications // Selective update - preserve user modifications
await this.fileOps.syncDirectory(sourcePath, targetPath); await this.fileOps.syncDirectory(sourcePath, targetPath);
// Recompile agents (#1133)
const { ModuleManager } = require('../modules/manager');
const moduleManager = new ModuleManager();
await moduleManager.compileModuleAgents(sourcePath, targetPath, 'core', bmadDir);
await this.processAgentFiles(targetPath, 'core');
} }
} }

View File

@ -507,6 +507,10 @@ class ModuleManager {
} else { } else {
// Selective update - preserve user modifications // Selective update - preserve user modifications
await this.syncModule(sourcePath, targetPath); await this.syncModule(sourcePath, targetPath);
// Recompile agents (#1133)
await this.compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir);
await this.processAgentFiles(targetPath, moduleName);
} }
return { return {