schema standardization and bmad ide orchesatrtor can do anything
This commit is contained in:
@@ -12,8 +12,8 @@ const BundleOptimizer = require('../lib/bundle-optimizer');
|
||||
class WebBuilder {
|
||||
constructor(rootPath = process.cwd()) {
|
||||
this.rootPath = rootPath;
|
||||
this.agentsPath = path.join(rootPath, 'agents');
|
||||
this.teamsPath = path.join(rootPath, 'agent-teams');
|
||||
this.agentsPath = path.join(rootPath, 'bmad-core', 'agents');
|
||||
this.teamsPath = path.join(rootPath, 'bmad-core', 'agent-teams');
|
||||
this.outputPath = path.join(rootPath, 'dist');
|
||||
this.sampleUpdatePath = path.join(rootPath, 'web-bundles');
|
||||
this.resolver = new DependencyResolver(rootPath);
|
||||
@@ -277,11 +277,6 @@ class WebBuilder {
|
||||
let content = this.createOrchestratorPrompt(bundle, config);
|
||||
|
||||
content += '\n\n';
|
||||
|
||||
// Add bundle metadata as a comment
|
||||
content += `<!-- Bundle: ${bundle.metadata.name} -->\n`;
|
||||
content += `<!-- Generated: ${bundle.metadata.generatedAt} -->\n`;
|
||||
content += `<!-- Environment: web -->\n\n`;
|
||||
|
||||
// Add agent configurations section
|
||||
content += `==================== START: agent-config ====================\n`;
|
||||
|
||||
@@ -124,20 +124,24 @@ class BundleOptimizer {
|
||||
const sections = [];
|
||||
|
||||
// Create personas section
|
||||
// For team bundles, exclude BMAD from personas since it's already the orchestrator
|
||||
if (Object.keys(bundle.resources.personas).length > 0) {
|
||||
const personasContent = Object.entries(bundle.resources.personas)
|
||||
.filter(([id, persona]) => id !== 'bmad') // Exclude BMAD from personas section
|
||||
.map(([id, persona]) =>
|
||||
`==================== START: personas#${id} ====================\n` +
|
||||
persona.content +
|
||||
`\n==================== END: personas#${id} ====================`
|
||||
).join('\n\n');
|
||||
|
||||
sections.push({
|
||||
name: 'personas',
|
||||
filename: 'personas.txt',
|
||||
content: personasContent,
|
||||
size: personasContent.length
|
||||
});
|
||||
if (personasContent) { // Only add section if there's content after filtering
|
||||
sections.push({
|
||||
name: 'personas',
|
||||
filename: 'personas.txt',
|
||||
content: personasContent,
|
||||
size: personasContent.length
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Create other resource sections
|
||||
|
||||
@@ -10,7 +10,7 @@ const yaml = require('js-yaml');
|
||||
class DependencyResolver {
|
||||
constructor(rootPath = process.cwd()) {
|
||||
this.rootPath = rootPath;
|
||||
this.agentsPath = path.join(rootPath, 'agents');
|
||||
this.agentsPath = path.join(rootPath, 'bmad-core', 'agents');
|
||||
this.corePath = path.join(rootPath, 'bmad-core');
|
||||
this.cache = new Map();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user