bmad-method 6.0.0-Beta.1 → 6.0.0-Beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/package.json +1 -1
- package/src/bmm/module-help.csv +31 -31
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +1 -1
- package/src/core/module-help.csv +8 -8
- package/tools/cli/installers/lib/core/installer.js +26 -40
- package/tools/cli/installers/lib/ide/_config-driven.js +423 -0
- package/tools/cli/installers/lib/ide/codex.js +40 -12
- package/tools/cli/installers/lib/ide/manager.js +65 -38
- package/tools/cli/installers/lib/ide/platform-codes.js +100 -0
- package/tools/cli/installers/lib/ide/platform-codes.yaml +241 -0
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +19 -5
- package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +5 -0
- package/tools/cli/installers/lib/ide/shared/path-utils.js +166 -50
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +7 -5
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +21 -3
- package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +8 -0
- package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +15 -0
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +14 -0
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +6 -0
- package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +9 -0
- package/tools/cli/installers/lib/ide/templates/combined/trae.md +9 -0
- package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +10 -0
- package/tools/cli/installers/lib/ide/templates/split/gemini/body.md +10 -0
- package/tools/cli/installers/lib/ide/templates/split/gemini/header.toml +2 -0
- package/tools/cli/installers/lib/ide/templates/split/opencode/body.md +10 -0
- package/tools/cli/installers/lib/ide/templates/split/opencode/header.md +4 -0
- package/tools/cli/lib/ui.js +19 -75
- package/tools/cli/installers/lib/ide/STANDARDIZATION_PLAN.md +0 -208
- package/tools/cli/installers/lib/ide/antigravity.js +0 -474
- package/tools/cli/installers/lib/ide/auggie.js +0 -244
- package/tools/cli/installers/lib/ide/claude-code.js +0 -506
- package/tools/cli/installers/lib/ide/cline.js +0 -272
- package/tools/cli/installers/lib/ide/crush.js +0 -149
- package/tools/cli/installers/lib/ide/cursor.js +0 -160
- package/tools/cli/installers/lib/ide/gemini.js +0 -301
- package/tools/cli/installers/lib/ide/github-copilot.js +0 -383
- package/tools/cli/installers/lib/ide/iflow.js +0 -191
- package/tools/cli/installers/lib/ide/opencode.js +0 -257
- package/tools/cli/installers/lib/ide/qwen.js +0 -372
- package/tools/cli/installers/lib/ide/roo.js +0 -273
- package/tools/cli/installers/lib/ide/rovo-dev.js +0 -290
- package/tools/cli/installers/lib/ide/trae.js +0 -313
- package/tools/cli/installers/lib/ide/windsurf.js +0 -258
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
const path = require('node:path');
|
|
2
|
-
const { BaseIdeSetup } = require('./_base-ide');
|
|
3
|
-
const chalk = require('chalk');
|
|
4
|
-
const { AgentCommandGenerator } = require('./shared/agent-command-generator');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Windsurf IDE setup handler
|
|
8
|
-
*/
|
|
9
|
-
class WindsurfSetup extends BaseIdeSetup {
|
|
10
|
-
constructor() {
|
|
11
|
-
super('windsurf', 'Windsurf', true); // preferred IDE
|
|
12
|
-
this.configDir = '.windsurf';
|
|
13
|
-
this.workflowsDir = 'workflows';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Setup Windsurf IDE configuration
|
|
18
|
-
* @param {string} projectDir - Project directory
|
|
19
|
-
* @param {string} bmadDir - BMAD installation directory
|
|
20
|
-
* @param {Object} options - Setup options
|
|
21
|
-
*/
|
|
22
|
-
async setup(projectDir, bmadDir, options = {}) {
|
|
23
|
-
console.log(chalk.cyan(`Setting up ${this.name}...`));
|
|
24
|
-
|
|
25
|
-
// Create .windsurf/workflows/bmad directory structure
|
|
26
|
-
const windsurfDir = path.join(projectDir, this.configDir);
|
|
27
|
-
const workflowsDir = path.join(windsurfDir, this.workflowsDir);
|
|
28
|
-
const bmadWorkflowsDir = path.join(workflowsDir, 'bmad');
|
|
29
|
-
|
|
30
|
-
await this.ensureDir(bmadWorkflowsDir);
|
|
31
|
-
|
|
32
|
-
// Clean up any existing BMAD workflows before reinstalling
|
|
33
|
-
await this.cleanup(projectDir);
|
|
34
|
-
|
|
35
|
-
// Generate agent launchers
|
|
36
|
-
const agentGen = new AgentCommandGenerator(this.bmadFolderName);
|
|
37
|
-
const { artifacts: agentArtifacts } = await agentGen.collectAgentArtifacts(bmadDir, options.selectedModules || []);
|
|
38
|
-
|
|
39
|
-
// Convert artifacts to agent format for module organization
|
|
40
|
-
const agents = agentArtifacts.map((a) => ({ module: a.module, name: a.name }));
|
|
41
|
-
|
|
42
|
-
// Get tasks, tools, and workflows (standalone only)
|
|
43
|
-
const tasks = await this.getTasks(bmadDir, true);
|
|
44
|
-
const tools = await this.getTools(bmadDir, true);
|
|
45
|
-
const workflows = await this.getWorkflows(bmadDir, true);
|
|
46
|
-
|
|
47
|
-
// Create directories for each module under bmad/
|
|
48
|
-
const modules = new Set();
|
|
49
|
-
for (const item of [...agents, ...tasks, ...tools, ...workflows]) modules.add(item.module);
|
|
50
|
-
|
|
51
|
-
for (const module of modules) {
|
|
52
|
-
await this.ensureDir(path.join(bmadWorkflowsDir, module));
|
|
53
|
-
await this.ensureDir(path.join(bmadWorkflowsDir, module, 'agents'));
|
|
54
|
-
await this.ensureDir(path.join(bmadWorkflowsDir, module, 'tasks'));
|
|
55
|
-
await this.ensureDir(path.join(bmadWorkflowsDir, module, 'tools'));
|
|
56
|
-
await this.ensureDir(path.join(bmadWorkflowsDir, module, 'workflows'));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Process agent launchers as workflows with organized structure
|
|
60
|
-
let agentCount = 0;
|
|
61
|
-
for (const artifact of agentArtifacts) {
|
|
62
|
-
const processedContent = this.createWorkflowContent({ module: artifact.module, name: artifact.name }, artifact.content);
|
|
63
|
-
|
|
64
|
-
// Organized path: bmad/module/agents/agent-name.md
|
|
65
|
-
const targetPath = path.join(bmadWorkflowsDir, artifact.module, 'agents', `${artifact.name}.md`);
|
|
66
|
-
await this.writeFile(targetPath, processedContent);
|
|
67
|
-
agentCount++;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Process tasks as workflows with organized structure
|
|
71
|
-
let taskCount = 0;
|
|
72
|
-
for (const task of tasks) {
|
|
73
|
-
const content = await this.readFile(task.path);
|
|
74
|
-
const processedContent = this.createTaskWorkflowContent(task, content);
|
|
75
|
-
|
|
76
|
-
// Organized path: bmad/module/tasks/task-name.md
|
|
77
|
-
const targetPath = path.join(bmadWorkflowsDir, task.module, 'tasks', `${task.name}.md`);
|
|
78
|
-
await this.writeFile(targetPath, processedContent);
|
|
79
|
-
taskCount++;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Process tools as workflows with organized structure
|
|
83
|
-
let toolCount = 0;
|
|
84
|
-
for (const tool of tools) {
|
|
85
|
-
const content = await this.readFile(tool.path);
|
|
86
|
-
const processedContent = this.createToolWorkflowContent(tool, content);
|
|
87
|
-
|
|
88
|
-
// Organized path: bmad/module/tools/tool-name.md
|
|
89
|
-
const targetPath = path.join(bmadWorkflowsDir, tool.module, 'tools', `${tool.name}.md`);
|
|
90
|
-
await this.writeFile(targetPath, processedContent);
|
|
91
|
-
toolCount++;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Process workflows with organized structure
|
|
95
|
-
let workflowCount = 0;
|
|
96
|
-
for (const workflow of workflows) {
|
|
97
|
-
const content = await this.readFile(workflow.path);
|
|
98
|
-
const processedContent = this.createWorkflowWorkflowContent(workflow, content);
|
|
99
|
-
|
|
100
|
-
// Organized path: bmad/module/workflows/workflow-name.md
|
|
101
|
-
const targetPath = path.join(bmadWorkflowsDir, workflow.module, 'workflows', `${workflow.name}.md`);
|
|
102
|
-
await this.writeFile(targetPath, processedContent);
|
|
103
|
-
workflowCount++;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
console.log(chalk.green(`✓ ${this.name} configured:`));
|
|
107
|
-
console.log(chalk.dim(` - ${agentCount} agents installed`));
|
|
108
|
-
console.log(chalk.dim(` - ${taskCount} tasks installed`));
|
|
109
|
-
console.log(chalk.dim(` - ${toolCount} tools installed`));
|
|
110
|
-
console.log(chalk.dim(` - ${workflowCount} workflows installed`));
|
|
111
|
-
console.log(chalk.dim(` - Organized in modules: ${[...modules].join(', ')}`));
|
|
112
|
-
console.log(chalk.dim(` - Workflows directory: ${path.relative(projectDir, workflowsDir)}`));
|
|
113
|
-
|
|
114
|
-
// Provide additional configuration hints
|
|
115
|
-
if (options.showHints !== false) {
|
|
116
|
-
console.log(chalk.dim('\n Windsurf workflow settings:'));
|
|
117
|
-
console.log(chalk.dim(' - auto_execution_mode: 3 (recommended for agents)'));
|
|
118
|
-
console.log(chalk.dim(' - auto_execution_mode: 2 (recommended for tasks/tools)'));
|
|
119
|
-
console.log(chalk.dim(' - auto_execution_mode: 1 (recommended for workflows)'));
|
|
120
|
-
console.log(chalk.dim(' - Workflows can be triggered via the Windsurf menu'));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
success: true,
|
|
125
|
-
agents: agentCount,
|
|
126
|
-
tasks: taskCount,
|
|
127
|
-
tools: toolCount,
|
|
128
|
-
workflows: workflowCount,
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Create workflow content for an agent
|
|
134
|
-
*/
|
|
135
|
-
createWorkflowContent(agent, content) {
|
|
136
|
-
// Strip existing frontmatter from launcher
|
|
137
|
-
const frontmatterRegex = /^---\s*\n[\s\S]*?\n---\s*\n/;
|
|
138
|
-
const contentWithoutFrontmatter = content.replace(frontmatterRegex, '');
|
|
139
|
-
|
|
140
|
-
// Create simple Windsurf frontmatter matching original format
|
|
141
|
-
let workflowContent = `---
|
|
142
|
-
description: ${agent.name}
|
|
143
|
-
auto_execution_mode: 3
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
${contentWithoutFrontmatter}`;
|
|
147
|
-
|
|
148
|
-
return workflowContent;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Create workflow content for a task
|
|
153
|
-
*/
|
|
154
|
-
createTaskWorkflowContent(task, content) {
|
|
155
|
-
// Create simple Windsurf frontmatter matching original format
|
|
156
|
-
let workflowContent = `---
|
|
157
|
-
description: task-${task.name}
|
|
158
|
-
auto_execution_mode: 2
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
${content}`;
|
|
162
|
-
|
|
163
|
-
return workflowContent;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Create workflow content for a tool
|
|
168
|
-
*/
|
|
169
|
-
createToolWorkflowContent(tool, content) {
|
|
170
|
-
// Create simple Windsurf frontmatter matching original format
|
|
171
|
-
let workflowContent = `---
|
|
172
|
-
description: tool-${tool.name}
|
|
173
|
-
auto_execution_mode: 2
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
${content}`;
|
|
177
|
-
|
|
178
|
-
return workflowContent;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Create workflow content for a workflow
|
|
183
|
-
*/
|
|
184
|
-
createWorkflowWorkflowContent(workflow, content) {
|
|
185
|
-
// Create simple Windsurf frontmatter matching original format
|
|
186
|
-
let workflowContent = `---
|
|
187
|
-
description: ${workflow.name}
|
|
188
|
-
auto_execution_mode: 1
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
${content}`;
|
|
192
|
-
|
|
193
|
-
return workflowContent;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Cleanup Windsurf configuration - surgically remove only BMAD files
|
|
198
|
-
*/
|
|
199
|
-
async cleanup(projectDir) {
|
|
200
|
-
const fs = require('fs-extra');
|
|
201
|
-
const bmadPath = path.join(projectDir, this.configDir, this.workflowsDir, 'bmad');
|
|
202
|
-
|
|
203
|
-
if (await fs.pathExists(bmadPath)) {
|
|
204
|
-
// Remove the entire bmad folder - this is our territory
|
|
205
|
-
await fs.remove(bmadPath);
|
|
206
|
-
console.log(chalk.dim(` Cleaned up existing BMAD workflows`));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Install a custom agent launcher for Windsurf
|
|
212
|
-
* @param {string} projectDir - Project directory
|
|
213
|
-
* @param {string} agentName - Agent name (e.g., "fred-commit-poet")
|
|
214
|
-
* @param {string} agentPath - Path to compiled agent (relative to project root)
|
|
215
|
-
* @param {Object} metadata - Agent metadata
|
|
216
|
-
* @returns {Object|null} Info about created command
|
|
217
|
-
*/
|
|
218
|
-
async installCustomAgentLauncher(projectDir, agentName, agentPath, metadata) {
|
|
219
|
-
const fs = require('fs-extra');
|
|
220
|
-
const customAgentsDir = path.join(projectDir, this.configDir, this.workflowsDir, 'bmad', 'custom', 'agents');
|
|
221
|
-
|
|
222
|
-
if (!(await this.exists(path.join(projectDir, this.configDir)))) {
|
|
223
|
-
return null; // IDE not configured for this project
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
await this.ensureDir(customAgentsDir);
|
|
227
|
-
|
|
228
|
-
const launcherContent = `You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
|
|
229
|
-
|
|
230
|
-
<agent-activation CRITICAL="TRUE">
|
|
231
|
-
1. LOAD the FULL agent file from @${agentPath}
|
|
232
|
-
2. READ its entire contents - this contains the complete agent persona, menu, and instructions
|
|
233
|
-
3. FOLLOW every step in the <activation> section precisely
|
|
234
|
-
4. DISPLAY the welcome/greeting as instructed
|
|
235
|
-
5. PRESENT the numbered menu
|
|
236
|
-
6. WAIT for user input before proceeding
|
|
237
|
-
</agent-activation>
|
|
238
|
-
`;
|
|
239
|
-
|
|
240
|
-
// Windsurf uses workflow format with frontmatter
|
|
241
|
-
const workflowContent = `---
|
|
242
|
-
description: ${metadata.title || agentName}
|
|
243
|
-
auto_execution_mode: 3
|
|
244
|
-
---
|
|
245
|
-
|
|
246
|
-
${launcherContent}`;
|
|
247
|
-
|
|
248
|
-
const launcherPath = path.join(customAgentsDir, `${agentName}.md`);
|
|
249
|
-
await fs.writeFile(launcherPath, workflowContent);
|
|
250
|
-
|
|
251
|
-
return {
|
|
252
|
-
path: launcherPath,
|
|
253
|
-
command: `bmad/custom/agents/${agentName}`,
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
module.exports = { WindsurfSetup };
|