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.
Files changed (44) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/package.json +1 -1
  3. package/src/bmm/module-help.csv +31 -31
  4. package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +1 -1
  5. package/src/core/module-help.csv +8 -8
  6. package/tools/cli/installers/lib/core/installer.js +26 -40
  7. package/tools/cli/installers/lib/ide/_config-driven.js +423 -0
  8. package/tools/cli/installers/lib/ide/codex.js +40 -12
  9. package/tools/cli/installers/lib/ide/manager.js +65 -38
  10. package/tools/cli/installers/lib/ide/platform-codes.js +100 -0
  11. package/tools/cli/installers/lib/ide/platform-codes.yaml +241 -0
  12. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +19 -5
  13. package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +5 -0
  14. package/tools/cli/installers/lib/ide/shared/path-utils.js +166 -50
  15. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +7 -5
  16. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +21 -3
  17. package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +8 -0
  18. package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +15 -0
  19. package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +14 -0
  20. package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +6 -0
  21. package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +9 -0
  22. package/tools/cli/installers/lib/ide/templates/combined/trae.md +9 -0
  23. package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +10 -0
  24. package/tools/cli/installers/lib/ide/templates/split/gemini/body.md +10 -0
  25. package/tools/cli/installers/lib/ide/templates/split/gemini/header.toml +2 -0
  26. package/tools/cli/installers/lib/ide/templates/split/opencode/body.md +10 -0
  27. package/tools/cli/installers/lib/ide/templates/split/opencode/header.md +4 -0
  28. package/tools/cli/lib/ui.js +19 -75
  29. package/tools/cli/installers/lib/ide/STANDARDIZATION_PLAN.md +0 -208
  30. package/tools/cli/installers/lib/ide/antigravity.js +0 -474
  31. package/tools/cli/installers/lib/ide/auggie.js +0 -244
  32. package/tools/cli/installers/lib/ide/claude-code.js +0 -506
  33. package/tools/cli/installers/lib/ide/cline.js +0 -272
  34. package/tools/cli/installers/lib/ide/crush.js +0 -149
  35. package/tools/cli/installers/lib/ide/cursor.js +0 -160
  36. package/tools/cli/installers/lib/ide/gemini.js +0 -301
  37. package/tools/cli/installers/lib/ide/github-copilot.js +0 -383
  38. package/tools/cli/installers/lib/ide/iflow.js +0 -191
  39. package/tools/cli/installers/lib/ide/opencode.js +0 -257
  40. package/tools/cli/installers/lib/ide/qwen.js +0 -372
  41. package/tools/cli/installers/lib/ide/roo.js +0 -273
  42. package/tools/cli/installers/lib/ide/rovo-dev.js +0 -290
  43. package/tools/cli/installers/lib/ide/trae.js +0 -313
  44. package/tools/cli/installers/lib/ide/windsurf.js +0 -258
@@ -81,7 +81,7 @@ class UI {
81
81
  hasLegacyCfg = bmadResult.hasLegacyCfg;
82
82
  }
83
83
 
84
- // Handle legacy .bmad or _cfg folder - these are very old (more than 2 versions behind)
84
+ // Handle legacy .bmad or _cfg folder - these are very old (v4 or alpha)
85
85
  // Show version warning instead of offering conversion
86
86
  if (hasLegacyBmadFolder || hasLegacyCfg) {
87
87
  console.log('');
@@ -92,9 +92,8 @@ class UI {
92
92
  'Found a ".bmad"/"bmad" folder, or a legacy "_cfg" folder under the bmad folder - this is from a old BMAD version that is out of date for automatic upgrade, manual intervention required.',
93
93
  ),
94
94
  );
95
- console.log(chalk.yellow('This version is more than 2 alpha versions behind current.'));
95
+ console.log(chalk.yellow('You have a legacy version installed (v4 or alpha).'));
96
96
  console.log('');
97
- console.log(chalk.dim('For stability, we only support updates from the previous 2 alpha versions.'));
98
97
  console.log(chalk.dim('Legacy installations may have compatibility issues.'));
99
98
  console.log('');
100
99
  console.log(chalk.dim('For the best experience, we strongly recommend:'));
@@ -188,8 +187,8 @@ class UI {
188
187
  const currentVersion = require(packageJsonPath).version;
189
188
  const installedVersion = existingInstall.version || 'unknown';
190
189
 
191
- // Check if version is too old and warn user
192
- const shouldProceed = await this.showOldAlphaVersionWarning(installedVersion, currentVersion, path.basename(bmadDir));
190
+ // Check if version is pre beta
191
+ const shouldProceed = await this.showLegacyVersionWarning(installedVersion, currentVersion, path.basename(bmadDir));
193
192
 
194
193
  // If user chose to cancel, exit the installer
195
194
  if (!shouldProceed) {
@@ -362,6 +361,7 @@ class UI {
362
361
  // Get IDE manager to fetch available IDEs dynamically
363
362
  const { IdeManager } = require('../installers/lib/ide/manager');
364
363
  const ideManager = new IdeManager();
364
+ await ideManager.ensureInitialized(); // IMPORTANT: Must initialize before getting IDEs
365
365
 
366
366
  const preferredIdes = ideManager.getPreferredIdes();
367
367
  const otherIdes = ideManager.getOtherIdes();
@@ -1456,96 +1456,40 @@ class UI {
1456
1456
  }
1457
1457
 
1458
1458
  /**
1459
- * Parse alpha version string (e.g., "6.0.0-Alpha.20")
1460
- * @param {string} version - Version string
1461
- * @returns {Object|null} Object with alphaNumber and fullVersion, or null if invalid
1462
- */
1463
- parseAlphaVersion(version) {
1464
- if (!version || version === 'unknown') {
1465
- return null;
1466
- }
1467
-
1468
- // Remove 'v' prefix if present
1469
- const cleanVersion = version.toString().replace(/^v/i, '');
1470
-
1471
- // Match alpha version pattern: X.Y.Z-Alpha.N (case-insensitive)
1472
- const match = cleanVersion.match(/[\d.]+-Alpha\.(\d+)/i);
1473
-
1474
- if (!match) {
1475
- return null;
1476
- }
1477
-
1478
- return {
1479
- alphaNumber: parseInt(match[1], 10),
1480
- fullVersion: cleanVersion,
1481
- };
1482
- }
1483
-
1484
- /**
1485
- * Check if installed version is more than 2 alpha versions behind current
1459
+ * Check if installed version is a legacy version that needs fresh install
1486
1460
  * @param {string} installedVersion - The installed version
1487
- * @param {string} currentVersion - The current version
1488
- * @returns {Object} Object with { isOldVersion, versionDiff, shouldWarn, installed, current }
1461
+ * @returns {boolean} True if legacy (v4 or any alpha)
1489
1462
  */
1490
- checkAlphaVersionAge(installedVersion, currentVersion) {
1491
- const installed = this.parseAlphaVersion(installedVersion);
1492
- const current = this.parseAlphaVersion(currentVersion);
1493
-
1494
- // If we can't parse either version, don't warn
1495
- if (!installed || !current) {
1496
- return { isOldVersion: false, versionDiff: 0, shouldWarn: false };
1463
+ isLegacyVersion(installedVersion) {
1464
+ if (!installedVersion || installedVersion === 'unknown') {
1465
+ return true; // Treat unknown as legacy for safety
1497
1466
  }
1498
-
1499
- // Calculate alpha version difference
1500
- const versionDiff = current.alphaNumber - installed.alphaNumber;
1501
-
1502
- // Consider it old if more than 2 versions behind
1503
- const isOldVersion = versionDiff > 2;
1504
-
1505
- return {
1506
- isOldVersion,
1507
- versionDiff,
1508
- shouldWarn: isOldVersion,
1509
- installed: installed.fullVersion,
1510
- current: current.fullVersion,
1511
- installedAlpha: installed.alphaNumber,
1512
- currentAlpha: current.alphaNumber,
1513
- };
1467
+ // Check if version string contains -alpha or -Alpha (any v6 alpha)
1468
+ return /-alpha\./i.test(installedVersion);
1514
1469
  }
1515
1470
 
1516
1471
  /**
1517
- * Show warning for old alpha version and ask if user wants to proceed
1472
+ * Show warning for legacy version (v4 or alpha) and ask if user wants to proceed
1518
1473
  * @param {string} installedVersion - The installed version
1519
1474
  * @param {string} currentVersion - The current version
1520
1475
  * @param {string} bmadFolderName - Name of the BMAD folder
1521
1476
  * @returns {Promise<boolean>} True if user wants to proceed, false if they cancel
1522
1477
  */
1523
- async showOldAlphaVersionWarning(installedVersion, currentVersion, bmadFolderName) {
1524
- const versionInfo = this.checkAlphaVersionAge(installedVersion, currentVersion);
1525
-
1526
- // Also warn if version is unknown or can't be parsed (legacy/unsupported)
1527
- const isUnknownVersion = installedVersion === 'unknown' || !versionInfo.installed;
1528
-
1529
- if (!versionInfo.shouldWarn && !isUnknownVersion) {
1530
- return true; // Not old, proceed
1478
+ async showLegacyVersionWarning(installedVersion, currentVersion, bmadFolderName) {
1479
+ if (!this.isLegacyVersion(installedVersion)) {
1480
+ return true; // Not legacy, proceed
1531
1481
  }
1532
1482
 
1533
1483
  console.log('');
1534
1484
  console.log(chalk.yellow.bold('⚠️ VERSION WARNING'));
1535
1485
  console.log(chalk.yellow('─'.repeat(80)));
1536
1486
 
1537
- if (isUnknownVersion) {
1487
+ if (installedVersion === 'unknown') {
1538
1488
  console.log(chalk.yellow('Unable to detect your installed BMAD version.'));
1539
1489
  console.log(chalk.yellow('This appears to be a legacy or unsupported installation.'));
1540
- console.log('');
1541
- console.log(chalk.dim('For stability, we only support updates from the previous 2 alpha versions.'));
1542
- console.log(chalk.dim('Legacy installations may have compatibility issues.'));
1543
1490
  } else {
1544
- console.log(chalk.yellow(`You are updating from ${versionInfo.installed} to ${versionInfo.current}.`));
1545
- console.log(chalk.yellow(`This is ${versionInfo.versionDiff} alpha versions behind.`));
1546
- console.log('');
1547
- console.log(chalk.dim(`For stability, we only support updates from the previous 2 alpha versions`));
1548
- console.log(chalk.dim(`(Alpha.${versionInfo.currentAlpha - 2} through Alpha.${versionInfo.currentAlpha - 1}).`));
1491
+ console.log(chalk.yellow(`You are updating from ${installedVersion} to ${currentVersion}.`));
1492
+ console.log(chalk.yellow('You have a legacy version installed (v4 or alpha).'));
1549
1493
  }
1550
1494
 
1551
1495
  console.log('');
@@ -1,208 +0,0 @@
1
- # IDE Installer Standardization Plan
2
-
3
- ## Overview
4
-
5
- Standardize IDE installers to use **flat file naming** with **underscores** (Windows-compatible) and centralize duplicated code in shared utilities.
6
-
7
- **Key Rule: All IDEs use underscore format for Windows compatibility (colons don't work on Windows).**
8
-
9
- ## Current State Analysis
10
-
11
- ### File Structure Patterns
12
-
13
- | IDE | Current Pattern | Path Format |
14
- |-----|-----------------|-------------|
15
- | **claude-code** | Hierarchical | `.claude/commands/bmad/{module}/agents/{name}.md` |
16
- | **cursor** | Hierarchical | `.cursor/commands/bmad/{module}/agents/{name}.md` |
17
- | **crush** | Hierarchical | `.crush/commands/bmad/{module}/agents/{name}.md` |
18
- | **antigravity** | Flattened (underscores) | `.agent/workflows/bmad_module_agents_name.md` |
19
- | **codex** | Flattened (underscores) | `~/.codex/prompts/bmad_module_agents_name.md` |
20
- | **cline** | Flattened (underscores) | `.clinerules/workflows/bmad_module_type_name.md` |
21
- | **roo** | Flattened (underscores) | `.roo/commands/bmad_module_agent_name.md` |
22
- | **auggie** | Hybrid | `.augment/commands/bmad/agents/{module}-{name}.md` |
23
- | **iflow** | Hybrid | `.iflow/commands/bmad/agents/{module}-{name}.md` |
24
- | **trae** | Different (rules) | `.trae/rules/bmad-agent-{module}-{name}.md` |
25
- | **github-copilot** | Different (agents) | `.github/agents/bmd-custom-{module}-{name}.agent.md` |
26
-
27
- ### Shared Generators (in `/shared`)
28
-
29
- 1. `agent-command-generator.js` - generates agent launchers
30
- 2. `task-tool-command-generator.js` - generates task/tool commands
31
- 3. `workflow-command-generator.js` - generates workflow commands
32
-
33
- All currently create artifacts with **nested relative paths** like `{module}/agents/{name}.md`
34
-
35
- ### Code Duplication Issues
36
-
37
- 1. **Flattening logic** duplicated in multiple IDEs
38
- 2. **Agent launcher content creation** duplicated
39
- 3. **Path transformation** duplicated
40
-
41
- ## Target Standardization
42
-
43
- ### For All IDEs (underscore format - Windows-compatible)
44
-
45
- **IDEs affected:** claude-code, cursor, crush, antigravity, codex, cline, roo
46
-
47
- ```
48
- Format: bmad_{module}_{type}_{name}.md
49
-
50
- Examples:
51
- - Agent: bmad_bmm_agents_pm.md
52
- - Agent: bmad_core_agents_dev.md
53
- - Workflow: bmad_bmm_workflows_correct-course.md
54
- - Task: bmad_bmm_tasks_bmad-help.md
55
- - Tool: bmad_core_tools_code-review.md
56
- - Custom: bmad_custom_agents_fred-commit-poet.md
57
- ```
58
-
59
- **Note:** Type segments (agents, workflows, tasks, tools) are filtered out from names:
60
- - `bmm/agents/pm.md` → `bmad_bmm_pm.md` (not `bmad_bmm_agents_pm.md`)
61
-
62
- ### For Hybrid IDEs (keep as-is)
63
-
64
- **IDEs affected:** auggie, iflow
65
-
66
- These use `{module}-{name}.md` format within subdirectories - keep as-is.
67
-
68
- ### Skip (drastically different)
69
-
70
- **IDEs affected:** trae, github-copilot
71
-
72
- ## Implementation Plan
73
-
74
- ### Phase 1: Create Shared Utility
75
-
76
- **File:** `shared/path-utils.js`
77
-
78
- ```javascript
79
- /**
80
- * Convert hierarchical path to flat underscore-separated name (Windows-compatible)
81
- * @param {string} module - Module name (e.g., 'bmm', 'core')
82
- * @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools') - filtered out
83
- * @param {string} name - Artifact name (e.g., 'pm', 'correct-course')
84
- * @returns {string} Flat filename like 'bmad_bmm_pm.md'
85
- */
86
- function toUnderscoreName(module, type, name) {
87
- return `bmad_${module}_${name}.md`;
88
- }
89
-
90
- /**
91
- * Convert relative path to flat underscore-separated name (Windows-compatible)
92
- * @param {string} relativePath - Path like 'bmm/agents/pm.md'
93
- * @returns {string} Flat filename like 'bmad_bmm_pm.md'
94
- */
95
- function toUnderscorePath(relativePath) {
96
- const withoutExt = relativePath.replace('.md', '');
97
- const parts = withoutExt.split(/[\/\\]/);
98
- // Filter out type segments (agents, workflows, tasks, tools)
99
- const filtered = parts.filter((p) => !TYPE_SEGMENTS.includes(p));
100
- return `bmad_${filtered.join('_')}.md`;
101
- }
102
-
103
- /**
104
- * Create custom agent underscore name
105
- * @param {string} agentName - Custom agent name
106
- * @returns {string} Flat filename like 'bmad_custom_fred-commit-poet.md'
107
- */
108
- function customAgentUnderscoreName(agentName) {
109
- return `bmad_custom_${agentName}.md`;
110
- }
111
-
112
- // Backward compatibility aliases
113
- const toColonName = toUnderscoreName;
114
- const toColonPath = toUnderscorePath;
115
- const toDashPath = toUnderscorePath;
116
- const customAgentColonName = customAgentUnderscoreName;
117
- const customAgentDashName = customAgentUnderscoreName;
118
-
119
- module.exports = {
120
- toUnderscoreName,
121
- toUnderscorePath,
122
- customAgentUnderscoreName,
123
- // Backward compatibility
124
- toColonName,
125
- toColonPath,
126
- toDashPath,
127
- customAgentColonName,
128
- customAgentDashName,
129
- };
130
- ```
131
-
132
- ### Phase 2: Update Shared Generators
133
-
134
- **Files to modify:**
135
- - `shared/agent-command-generator.js`
136
- - `shared/task-tool-command-generator.js`
137
- - `shared/workflow-command-generator.js`
138
-
139
- **Changes:**
140
- 1. Import path utilities
141
- 2. Change `relativePath` to use flat format
142
- 3. Add method `writeColonArtifacts()` for folder-based IDEs (uses underscore)
143
- 4. Add method `writeDashArtifacts()` for flat IDEs (uses underscore)
144
-
145
- ### Phase 3: Update All IDEs
146
-
147
- **Files to modify:**
148
- - `claude-code.js`
149
- - `cursor.js`
150
- - `crush.js`
151
- - `antigravity.js`
152
- - `codex.js`
153
- - `cline.js`
154
- - `roo.js`
155
-
156
- **Changes:**
157
- 1. Import utilities from path-utils
158
- 2. Change from hierarchical to flat underscore naming
159
- 3. Update cleanup to handle flat structure (`startsWith('bmad')`)
160
-
161
- ### Phase 4: Update Base Class
162
-
163
- **File:** `_base-ide.js`
164
-
165
- **Changes:**
166
- 1. Mark `flattenFilename()` as `@deprecated`
167
- 2. Add comment pointing to new path-utils
168
-
169
- ## Migration Checklist
170
-
171
- ### New Files
172
- - [x] Create `shared/path-utils.js`
173
-
174
- ### All IDEs (convert to underscore format)
175
- - [x] Update `shared/agent-command-generator.js` - update for underscore
176
- - [x] Update `shared/task-tool-command-generator.js` - update for underscore
177
- - [x] Update `shared/workflow-command-generator.js` - update for underscore
178
- - [x] Update `claude-code.js` - convert to underscore format
179
- - [x] Update `cursor.js` - convert to underscore format
180
- - [x] Update `crush.js` - convert to underscore format
181
- - [ ] Update `antigravity.js` - use underscore format
182
- - [ ] Update `codex.js` - use underscore format
183
- - [ ] Update `cline.js` - use underscore format
184
- - [ ] Update `roo.js` - use underscore format
185
-
186
- ### CSV Command Files
187
- - [x] Update `src/core/module-help.csv` - change colons to underscores
188
- - [x] Update `src/bmm/module-help.csv` - change colons to underscores
189
-
190
- ### Base Class
191
- - [ ] Update `_base-ide.js` - add deprecation notice
192
-
193
- ### Testing
194
- - [ ] Test claude-code installation
195
- - [ ] Test cursor installation
196
- - [ ] Test crush installation
197
- - [ ] Test antigravity installation
198
- - [ ] Test codex installation
199
- - [ ] Test cline installation
200
- - [ ] Test roo installation
201
-
202
- ## Notes
203
-
204
- 1. **Filter type segments**: agents, workflows, tasks, tools are filtered out from flat names
205
- 2. **Underscore format**: Universal underscore format for Windows compatibility
206
- 3. **Custom agents**: Follow the same pattern as regular agents
207
- 4. **Backward compatibility**: Old function names kept as aliases
208
- 5. **Cleanup**: Will remove old `bmad:` format files on next install