fix(installer): remove dead compilation refs from docs and module manager

Address review findings from PR #2080 triage:
- Remove compile-agents from CLI action docs (en, fr, zh-cn)
- Remove dead vendorCrossModuleWorkflows() and .agent.yaml skip logic
- Clean stale compilation-era comments in manifest-generator
This commit is contained in:
Alex Verkhovsky 2026-03-20 22:39:37 -06:00
parent ed7584411a
commit f46d196cac
8 changed files with 27 additions and 136 deletions

View File

@ -127,7 +127,7 @@ prompts:
### 3. Appliquer vos modifications ### 3. Appliquer vos modifications
Après modification, recompilez l'agent pour appliquer les changements : Après modification, réinstallez pour appliquer les changements :
```bash ```bash
npx bmad-method install npx bmad-method install
@ -137,17 +137,16 @@ L'installateur détecte l'installation existante et propose ces options :
| Option | Ce qu'elle fait | | Option | Ce qu'elle fait |
| ----------------------------------- | ---------------------------------------------------------------------- | | ----------------------------------- | ---------------------------------------------------------------------- |
| **Quick Update** | Met à jour tous les modules vers la dernière version et recompile tous les agents | | **Quick Update** | Met à jour tous les modules vers la dernière version et applique les personnalisations |
| **Recompile Agents** | Applique uniquement les personnalisations, sans mettre à jour les fichiers de modules |
| **Modify BMad Installation** | Flux d'installation complet pour ajouter ou supprimer des modules | | **Modify BMad Installation** | Flux d'installation complet pour ajouter ou supprimer des modules |
Pour des modifications de personnalisation uniquement, **Recompile Agents** est l'option la plus rapide. Pour des modifications de personnalisation uniquement, **Quick Update** est l'option la plus rapide.
## Résolution des problèmes ## Résolution des problèmes
**Les modifications n'apparaissent pas ?** **Les modifications n'apparaissent pas ?**
- Exécutez `npx bmad-method install` et sélectionnez **Recompile Agents** pour appliquer les modifications - Exécutez `npx bmad-method install` et sélectionnez **Quick Update** pour appliquer les modifications
- Vérifiez que votre syntaxe YAML est valide (l'indentation compte) - Vérifiez que votre syntaxe YAML est valide (l'indentation compte)
- Assurez-vous d'avoir modifié le bon fichier `.customize.yaml` pour l'agent - Assurez-vous d'avoir modifié le bon fichier `.customize.yaml` pour l'agent
@ -160,7 +159,7 @@ Pour des modifications de personnalisation uniquement, **Recompile Agents** est
**Besoin de réinitialiser un agent ?** **Besoin de réinitialiser un agent ?**
- Effacez ou supprimez le fichier `.customize.yaml` de l'agent - Effacez ou supprimez le fichier `.customize.yaml` de l'agent
- Exécutez `npx bmad-method install` et sélectionnez **Recompile Agents** pour restaurer les valeurs par défaut - Exécutez `npx bmad-method install` et sélectionnez **Quick Update** pour restaurer les valeurs par défaut
## Personnalisation des workflows ## Personnalisation des workflows

View File

@ -28,7 +28,7 @@ Nécessite [Node.js](https://nodejs.org) v20+ et `npx` (inclus avec npm).
| `--modules <modules>` | IDs de modules séparés par des virgules | `--modules bmm,bmb` | | `--modules <modules>` | IDs de modules séparés par des virgules | `--modules bmm,bmb` |
| `--tools <outils>` | IDs d'outils/IDE séparés par des virgules (utilisez `none` pour ignorer) | `--tools claude-code,cursor` ou `--tools none` | | `--tools <outils>` | IDs d'outils/IDE séparés par des virgules (utilisez `none` pour ignorer) | `--tools claude-code,cursor` ou `--tools none` |
| `--custom-content <chemins>` | Chemins vers des modules personnalisés séparés par des virgules | `--custom-content ~/my-module,~/another-module` | | `--custom-content <chemins>` | Chemins vers des modules personnalisés séparés par des virgules | `--custom-content ~/my-module,~/another-module` |
| `--action <type>` | Action pour les installations existantes : `install` (par défaut), `update`, `quick-update`, ou `compile-agents` | `--action quick-update` | | `--action <type>` | Action pour les installations existantes : `install` (par défaut), `update`, ou `quick-update` | `--action quick-update` |
### Configuration principale ### Configuration principale
@ -121,7 +121,7 @@ npx bmad-method install \
## Ce que vous obtenez ## Ce que vous obtenez
- Un répertoire `_bmad/` entièrement configuré dans votre projet - Un répertoire `_bmad/` entièrement configuré dans votre projet
- Des agents et des flux de travail compilés pour vos modules et outils sélectionnés - Des agents et des flux de travail configurés pour vos modules et outils sélectionnés
- Un dossier `_bmad-output/` pour les artefacts générés - Un dossier `_bmad-output/` pour les artefacts générés
## Validation et gestion des erreurs ## Validation et gestion des erreurs
@ -132,7 +132,7 @@ BMad valide toutes les options fournis :
- **Modules** — Avertit des IDs de modules invalides (mais n'échoue pas) - **Modules** — Avertit des IDs de modules invalides (mais n'échoue pas)
- **Tools** — Avertit des IDs d'outils invalides (mais n'échoue pas) - **Tools** — Avertit des IDs d'outils invalides (mais n'échoue pas)
- **Custom Content** — Chaque chemin doit contenir un fichier `module.yaml` valide - **Custom Content** — Chaque chemin doit contenir un fichier `module.yaml` valide
- **Action** — Doit être l'une des suivantes : `install`, `update`, `quick-update`, `compile-agents` - **Action** — Doit être l'une des suivantes : `install`, `update`, `quick-update`
Les valeurs invalides entraîneront soit : Les valeurs invalides entraîneront soit :
1. Laffichage dun message d'erreur suivi dun exit (pour les options critiques comme le répertoire) 1. Laffichage dun message d'erreur suivi dun exit (pour les options critiques comme le répertoire)

View File

@ -128,7 +128,7 @@ prompts:
### 3. Apply Your Changes ### 3. Apply Your Changes
After editing, recompile the agent to apply changes: After editing, reinstall to apply changes:
```bash ```bash
npx bmad-method install npx bmad-method install
@ -138,17 +138,16 @@ The installer detects the existing installation and offers these options:
| Option | What It Does | | Option | What It Does |
| ---------------------------- | ------------------------------------------------------------------- | | ---------------------------- | ------------------------------------------------------------------- |
| **Quick Update** | Updates all modules to the latest version and recompiles all agents | | **Quick Update** | Updates all modules to the latest version and applies customizations |
| **Recompile Agents** | Applies customizations only, without updating module files |
| **Modify BMad Installation** | Full installation flow for adding or removing modules | | **Modify BMad Installation** | Full installation flow for adding or removing modules |
For customization-only changes, **Recompile Agents** is the fastest option. For customization-only changes, **Quick Update** is the fastest option.
## Troubleshooting ## Troubleshooting
**Changes not appearing?** **Changes not appearing?**
- Run `npx bmad-method install` and select **Recompile Agents** to apply changes - Run `npx bmad-method install` and select **Quick Update** to apply changes
- Check that your YAML syntax is valid (indentation matters) - Check that your YAML syntax is valid (indentation matters)
- Verify you edited the correct `.customize.yaml` file for the agent - Verify you edited the correct `.customize.yaml` file for the agent
@ -161,7 +160,7 @@ For customization-only changes, **Recompile Agents** is the fastest option.
**Need to reset an agent?** **Need to reset an agent?**
- Clear or delete the agent's `.customize.yaml` file - Clear or delete the agent's `.customize.yaml` file
- Run `npx bmad-method install` and select **Recompile Agents** to restore defaults - Run `npx bmad-method install` and select **Quick Update** to restore defaults
## Workflow Customization ## Workflow Customization

View File

@ -28,7 +28,7 @@ Requires [Node.js](https://nodejs.org) v20+ and `npx` (included with npm).
| `--modules <modules>` | Comma-separated module IDs | `--modules bmm,bmb` | | `--modules <modules>` | Comma-separated module IDs | `--modules bmm,bmb` |
| `--tools <tools>` | Comma-separated tool/IDE IDs (use `none` to skip) | `--tools claude-code,cursor` or `--tools none` | | `--tools <tools>` | Comma-separated tool/IDE IDs (use `none` to skip) | `--tools claude-code,cursor` or `--tools none` |
| `--custom-content <paths>` | Comma-separated paths to custom modules | `--custom-content ~/my-module,~/another-module` | | `--custom-content <paths>` | Comma-separated paths to custom modules | `--custom-content ~/my-module,~/another-module` |
| `--action <type>` | Action for existing installations: `install` (default), `update`, `quick-update`, or `compile-agents` | `--action quick-update` | | `--action <type>` | Action for existing installations: `install` (default), `update`, or `quick-update` | `--action quick-update` |
### Core Configuration ### Core Configuration
@ -121,7 +121,7 @@ npx bmad-method install \
## What You Get ## What You Get
- A fully configured `_bmad/` directory in your project - A fully configured `_bmad/` directory in your project
- Compiled agents and workflows for your selected modules and tools - Agents and workflows configured for your selected modules and tools
- A `_bmad-output/` folder for generated artifacts - A `_bmad-output/` folder for generated artifacts
## Validation and Error Handling ## Validation and Error Handling
@ -132,7 +132,7 @@ BMad validates all provided flags:
- **Modules** — Warns about invalid module IDs (but won't fail) - **Modules** — Warns about invalid module IDs (but won't fail)
- **Tools** — Warns about invalid tool IDs (but won't fail) - **Tools** — Warns about invalid tool IDs (but won't fail)
- **Custom Content** — Each path must contain a valid `module.yaml` file - **Custom Content** — Each path must contain a valid `module.yaml` file
- **Action** — Must be one of: `install`, `update`, `quick-update`, `compile-agents` - **Action** — Must be one of: `install`, `update`, `quick-update`
Invalid values will either: Invalid values will either:
1. Show an error and exit (for critical options like directory) 1. Show an error and exit (for critical options like directory)

View File

@ -128,7 +128,7 @@ prompts:
### 3. 应用您的更改 ### 3. 应用您的更改
编辑后,重新编译智能体以应用更改: 编辑后,重新安装以应用更改:
```bash ```bash
npx bmad-method install npx bmad-method install
@ -138,17 +138,16 @@ npx bmad-method install
| Option | What It Does | | Option | What It Does |
| ---------------------------- | ------------------------------------------------------------------- | | ---------------------------- | ------------------------------------------------------------------- |
| **Quick Update** | 将所有模块更新到最新版本并重新编译所有智能体 | | **Quick Update** | 将所有模块更新到最新版本并应用自定义配置 |
| **Recompile Agents** | 仅应用自定义配置,不更新模块文件 |
| **Modify BMad Installation** | 用于添加或删除模块的完整安装流程 | | **Modify BMad Installation** | 用于添加或删除模块的完整安装流程 |
对于仅自定义配置的更改,**Recompile Agents** 是最快的选项。 对于仅自定义配置的更改,**Quick Update** 是最快的选项。
## 故障排除 ## 故障排除
**更改未生效?** **更改未生效?**
- 运行 `npx bmad-method install` 并选择 **Recompile Agents** 以应用更改 - 运行 `npx bmad-method install` 并选择 **Quick Update** 以应用更改
- 检查您的 YAML 语法是否有效(缩进很重要) - 检查您的 YAML 语法是否有效(缩进很重要)
- 验证您编辑的是该智能体正确的 `.customize.yaml` 文件 - 验证您编辑的是该智能体正确的 `.customize.yaml` 文件
@ -161,7 +160,7 @@ npx bmad-method install
**需要重置智能体?** **需要重置智能体?**
- 清空或删除智能体的 `.customize.yaml` 文件 - 清空或删除智能体的 `.customize.yaml` 文件
- 运行 `npx bmad-method install` 并选择 **Recompile Agents** 以恢复默认设置 - 运行 `npx bmad-method install` 并选择 **Quick Update** 以恢复默认设置
## 工作流自定义 ## 工作流自定义

View File

@ -28,7 +28,7 @@ sidebar:
| `--modules <modules>` | 逗号分隔的模块 ID | `--modules bmm,bmb` | | `--modules <modules>` | 逗号分隔的模块 ID | `--modules bmm,bmb` |
| `--tools <tools>` | 逗号分隔的工具/IDE ID使用 `none` 跳过) | `--tools claude-code,cursor``--tools none` | | `--tools <tools>` | 逗号分隔的工具/IDE ID使用 `none` 跳过) | `--tools claude-code,cursor``--tools none` |
| `--custom-content <paths>` | 逗号分隔的自定义模块路径 | `--custom-content ~/my-module,~/another-module` | | `--custom-content <paths>` | 逗号分隔的自定义模块路径 | `--custom-content ~/my-module,~/another-module` |
| `--action <type>` | 对现有安装的操作:`install`(默认)、`update`、`quick-update` 或 `compile-agents` | `--action quick-update` | | `--action <type>` | 对现有安装的操作:`install`(默认)、`update``quick-update` | `--action quick-update` |
### 核心配置 ### 核心配置
@ -121,7 +121,7 @@ npx bmad-method install \
## 安装结果 ## 安装结果
- 项目中完全配置的 `_bmad/` 目录 - 项目中完全配置的 `_bmad/` 目录
- 为所选模块和工具编译的智能体和工作流 - 为所选模块和工具配置的智能体和工作流
- 用于生成产物的 `_bmad-output/` 文件夹 - 用于生成产物的 `_bmad-output/` 文件夹
## 验证和错误处理 ## 验证和错误处理
@ -132,7 +132,7 @@ BMad 会验证所有提供的标志:
- **模块** — 对无效的模块 ID 发出警告(但不会失败) - **模块** — 对无效的模块 ID 发出警告(但不会失败)
- **工具** — 对无效的工具 ID 发出警告(但不会失败) - **工具** — 对无效的工具 ID 发出警告(但不会失败)
- **自定义内容** — 每个路径必须包含有效的 `module.yaml` 文件 - **自定义内容** — 每个路径必须包含有效的 `module.yaml` 文件
- **操作** — 必须是以下之一:`install`、`update`、`quick-update`、`compile-agents` - **操作** — 必须是以下之一:`install`、`update`、`quick-update`
无效值将: 无效值将:
1. 显示错误并退出(对于目录等关键选项) 1. 显示错误并退出(对于目录等关键选项)

View File

@ -515,7 +515,7 @@ class ManifestGenerator {
/** /**
* Get agents from a directory recursively * Get agents from a directory recursively
* Only includes compiled .md files (not .agent.yaml source files) * Only includes .md files with agent content
*/ */
async getAgentsFromDir(dirPath, moduleName, relativePath = '') { async getAgentsFromDir(dirPath, moduleName, relativePath = '') {
// Skip directories claimed by collectSkills // Skip directories claimed by collectSkills
@ -572,7 +572,7 @@ class ManifestGenerator {
const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name; const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
const subDirAgents = await this.getAgentsFromDir(fullPath, moduleName, newRelativePath); const subDirAgents = await this.getAgentsFromDir(fullPath, moduleName, newRelativePath);
agents.push(...subDirAgents); agents.push(...subDirAgents);
} else if (entry.name.endsWith('.md') && !entry.name.endsWith('.agent.yaml') && entry.name.toLowerCase() !== 'readme.md') { } else if (entry.name.endsWith('.md') && entry.name.toLowerCase() !== 'readme.md') {
const content = await fs.readFile(fullPath, 'utf8'); const content = await fs.readFile(fullPath, 'utf8');
// Skip files that don't contain <agent> tag (e.g., README files) // Skip files that don't contain <agent> tag (e.g., README files)

View File

@ -457,10 +457,6 @@ class ModuleManager {
await fs.remove(targetPath); await fs.remove(targetPath);
} }
// Vendor cross-module workflows BEFORE copying
// This reads source agent.yaml files and copies referenced workflows
await this.vendorCrossModuleWorkflows(sourcePath, targetPath, moduleName);
// Copy module files with filtering // Copy module files with filtering
await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig); await this.copyModuleWithFiltering(sourcePath, targetPath, fileTrackingCallback, options.moduleConfig);
@ -606,9 +602,7 @@ class ModuleManager {
continue; continue;
} }
// Only skip sidecar directories - they are handled separately during agent compilation // Skip sidecar directories - these contain agent-specific assets not needed at install time
// But still allow other files in agent directories
const isInAgentDirectory = file.startsWith('agents/');
const isInSidecarDirectory = path const isInSidecarDirectory = path
.dirname(file) .dirname(file)
.split('/') .split('/')
@ -630,11 +624,6 @@ class ModuleManager {
continue; continue;
} }
// Skip .agent.yaml files - they will be compiled separately
if (file.endsWith('.agent.yaml')) {
continue;
}
const sourceFile = path.join(sourcePath, file); const sourceFile = path.join(sourcePath, file);
const targetFile = path.join(targetPath, file); const targetFile = path.join(targetPath, file);
@ -687,101 +676,6 @@ class ModuleManager {
return agentFiles; return agentFiles;
} }
/**
* Vendor cross-module workflows referenced in agent files
* Scans SOURCE agent.yaml files for workflow-install and copies workflows to destination
* @param {string} sourcePath - Source module path
* @param {string} targetPath - Target module path (destination)
* @param {string} moduleName - Module name being installed
*/
async vendorCrossModuleWorkflows(sourcePath, targetPath, moduleName) {
const sourceAgentsPath = path.join(sourcePath, 'agents');
// Check if source agents directory exists
if (!(await fs.pathExists(sourceAgentsPath))) {
return; // No agents to process
}
// Get all agent YAML files from source
const agentFiles = await fs.readdir(sourceAgentsPath);
const yamlFiles = agentFiles.filter((f) => f.endsWith('.agent.yaml') || f.endsWith('.yaml'));
if (yamlFiles.length === 0) {
return; // No YAML agent files
}
let workflowsVendored = false;
for (const agentFile of yamlFiles) {
const agentPath = path.join(sourceAgentsPath, agentFile);
const agentYaml = yaml.parse(await fs.readFile(agentPath, 'utf8'));
// Check if agent has menu items with workflow-install
const menuItems = agentYaml?.agent?.menu || [];
const workflowInstallItems = menuItems.filter((item) => item['workflow-install']);
if (workflowInstallItems.length === 0) {
continue; // No workflow-install in this agent
}
if (!workflowsVendored) {
await prompts.log.info(`\n Vendoring cross-module workflows for ${moduleName}...`);
workflowsVendored = true;
}
await prompts.log.message(` Processing: ${agentFile}`);
for (const item of workflowInstallItems) {
const sourceWorkflowPath = item.exec; // Where to copy FROM
const installWorkflowPath = item['workflow-install']; // Where to copy TO
// Parse SOURCE workflow path
// Example: {project-root}/_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md
const sourceMatch = sourceWorkflowPath.match(/\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/);
if (!sourceMatch) {
await prompts.log.warn(` Could not parse workflow path: ${sourceWorkflowPath}`);
continue;
}
const [, sourceModule, sourceWorkflowSubPath] = sourceMatch;
// Parse INSTALL workflow path
// Example: {project-root}/_bmad/bmgd/workflows/4-production/create-story/workflow.md
const installMatch = installWorkflowPath.match(/\{project-root\}\/(?:_bmad)\/([^/]+)\/workflows\/(.+)/);
if (!installMatch) {
await prompts.log.warn(` Could not parse workflow-install path: ${installWorkflowPath}`);
continue;
}
const installWorkflowSubPath = installMatch[2];
const sourceModulePath = getModulePath(sourceModule);
const actualSourceWorkflowPath = path.join(sourceModulePath, 'workflows', sourceWorkflowSubPath.replace(/\/workflow\.md$/, ''));
const actualDestWorkflowPath = path.join(targetPath, 'workflows', installWorkflowSubPath.replace(/\/workflow\.md$/, ''));
// Check if source workflow exists
if (!(await fs.pathExists(actualSourceWorkflowPath))) {
await prompts.log.warn(` Source workflow not found: ${actualSourceWorkflowPath}`);
continue;
}
// Copy the entire workflow folder
await prompts.log.message(
` Vendoring: ${sourceModule}/workflows/${sourceWorkflowSubPath.replace(/\/workflow\.md$/, '')}${moduleName}/workflows/${installWorkflowSubPath.replace(/\/workflow\.md$/, '')}`,
);
await fs.ensureDir(path.dirname(actualDestWorkflowPath));
// Copy the workflow directory recursively with placeholder replacement
await this.copyDirectoryWithPlaceholderReplacement(actualSourceWorkflowPath, actualDestWorkflowPath);
}
}
if (workflowsVendored) {
await prompts.log.success(` Workflow vendoring complete\n`);
}
}
/** /**
* Create directories declared in module.yaml's `directories` key * Create directories declared in module.yaml's `directories` key
* This replaces the security-risky module installer pattern with declarative config * This replaces the security-risky module installer pattern with declarative config