mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
feat: Add Google Antigravity IDE installer (#938)
Implements installer for Google Antigravity IDE with flattened slash command naming to match Antigravity's namespace requirements. Key features: - Flattened file naming (bmad-module-agents-name.md) for proper slash commands - Subagent installation support (project-level or user-level) - Module-specific injection configuration - Agent, workflow, task, and tool command generation Implementation: - Added AntigravitySetup class extending BaseIdeSetup - Extracted flattenFilename() to BaseIdeSetup for reuse across IDE handlers - Uses .agent/workflows directory structure - Supports both interactive and non-interactive configuration Fixes: - Proper namespace isolation: /bmad-module-agents-dev instead of /dev - Prevents conflicts between modules with same agent names Note: This installer shares 95% of its code with claude-code.js. Future refactoring could extract common patterns to IdeWithSlashCommandsSetup base class (see design documents for details).
This commit is contained in:
@@ -601,6 +601,18 @@ class BaseIdeSetup {
|
||||
.join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten a relative path to a single filename for flat slash command naming
|
||||
* Example: 'module/agents/name.md' -> 'bmad-module-agents-name.md'
|
||||
* Used by IDEs that ignore directory structure for slash commands (e.g., Antigravity, Codex)
|
||||
* @param {string} relativePath - Relative path to flatten
|
||||
* @returns {string} Flattened filename with 'bmad-' prefix
|
||||
*/
|
||||
flattenFilename(relativePath) {
|
||||
const sanitized = relativePath.replaceAll(/[/\\]/g, '-');
|
||||
return `bmad-${sanitized}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create agent configuration file
|
||||
* @param {string} bmadDir - BMAD installation directory
|
||||
|
||||
Reference in New Issue
Block a user