From f2f72fd47610b712679308d5fa90deae772ad582 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Sat, 13 Dec 2025 09:04:31 -0700 Subject: [PATCH] fix: recompile agents during module update to get latest source changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tools/cli/installers/lib/core/installer.js | 6 ++++++ tools/cli/installers/lib/modules/manager.js | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/tools/cli/installers/lib/core/installer.js b/tools/cli/installers/lib/core/installer.js index 9063f5d9..fcfe076e 100644 --- a/tools/cli/installers/lib/core/installer.js +++ b/tools/cli/installers/lib/core/installer.js @@ -2222,6 +2222,12 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice: } else { // Selective update - preserve user modifications 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'); } } diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js index 3b152a99..f4568301 100644 --- a/tools/cli/installers/lib/modules/manager.js +++ b/tools/cli/installers/lib/modules/manager.js @@ -507,6 +507,10 @@ class ModuleManager { } else { // Selective update - preserve user modifications await this.syncModule(sourcePath, targetPath); + + // Recompile agents (#1133) + await this.compileModuleAgents(sourcePath, targetPath, moduleName, bmadDir); + await this.processAgentFiles(targetPath, moduleName); } return {