Skip to content

Commit 0bf5dca

Browse files
Brian MadisonBrian Madison
authored andcommitted
tools fix
1 parent fdfaa1f commit 0bf5dca

File tree

2 files changed

+47
-11
lines changed

2 files changed

+47
-11
lines changed

tools/installer/config/install.config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ installation-options:
1717
# These are the core files that should be included with any single agent installation
1818
agent-dependencies:
1919
core-files:
20-
- ".bmad-core/data/bmad-kb.md"
21-
- ".bmad-core/data/technical-preferences.md"
20+
# Only files that truly every agent needs should go here
21+
# Most dependencies should be declared in the agent YAML itself
2222
- ".bmad-core/utils/template-format.md"
2323

2424
# Agent-specific dependencies (parsed from agent files or explicitly defined)
@@ -28,8 +28,17 @@ agent-dependencies:
2828

2929
pm:
3030
- ".bmad-core/templates/prd-tmpl.md"
31+
- ".bmad-core/templates/brownfield-prd-tmpl.md"
3132
- ".bmad-core/checklists/pm-checklist.md"
33+
- ".bmad-core/checklists/change-checklist.md"
3234
- ".bmad-core/tasks/advanced-elicitation.md"
35+
- ".bmad-core/tasks/create-doc.md"
36+
- ".bmad-core/tasks/correct-course.md"
37+
- ".bmad-core/tasks/create-deep-research-prompt.md"
38+
- ".bmad-core/tasks/brownfield-create-epic.md"
39+
- ".bmad-core/tasks/brownfield-create-story.md"
40+
- ".bmad-core/tasks/execute-checklist.md"
41+
- ".bmad-core/tasks/shard-doc.md"
3342

3443
architect:
3544
- ".bmad-core/templates/architecture-tmpl.md"

tools/installer/lib/config-loader.js

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,43 @@ class ConfigLoader {
3131
}
3232

3333
async getAgentDependencies(agentId) {
34-
const config = await this.load();
35-
const dependencies = config['agent-dependencies'] || {};
36-
37-
// Always include core files
38-
const coreFiles = dependencies['core-files'] || [];
39-
40-
// Add agent-specific dependencies
41-
const agentDeps = dependencies[agentId] || [];
34+
// Use DependencyResolver to dynamically parse agent dependencies
35+
const DependencyResolver = require('../../lib/dependency-resolver');
36+
const resolver = new DependencyResolver(path.join(__dirname, '..', '..', '..'));
4237

43-
return [...coreFiles, ...agentDeps];
38+
try {
39+
const agentDeps = await resolver.resolveAgentDependencies(agentId);
40+
41+
// Convert to flat list of file paths
42+
const depPaths = [];
43+
44+
// Add core files
45+
const config = await this.load();
46+
const coreFiles = config['agent-dependencies']?.['core-files'] || [];
47+
depPaths.push(...coreFiles);
48+
49+
// Add agent file itself is already handled by installer
50+
51+
// Add all resolved resources
52+
for (const resource of agentDeps.resources) {
53+
const filePath = `.bmad-core/${resource.type}/${resource.id}.md`;
54+
if (!depPaths.includes(filePath)) {
55+
depPaths.push(filePath);
56+
}
57+
}
58+
59+
return depPaths;
60+
} catch (error) {
61+
console.warn(`Failed to dynamically resolve dependencies for ${agentId}: ${error.message}`);
62+
63+
// Fall back to static config
64+
const config = await this.load();
65+
const dependencies = config['agent-dependencies'] || {};
66+
const coreFiles = dependencies['core-files'] || [];
67+
const agentDeps = dependencies[agentId] || [];
68+
69+
return [...coreFiles, ...agentDeps];
70+
}
4471
}
4572

4673
async getIdeConfiguration(ide) {

0 commit comments

Comments
 (0)