From baeb607430ed78049941d81f7b9935df87ddd0c8 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Fri, 6 Mar 2026 04:42:28 -0700 Subject: [PATCH] Migrate Antigravity installer to native skills --- test/test-installation-components.js | 51 ++++++++++++++++++- .../installers/lib/ide/platform-codes.yaml | 5 +- .../docs/native-skills-migration-checklist.md | 18 +++---- 3 files changed, 62 insertions(+), 12 deletions(-) diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 1efaacb04..c78959265 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -275,9 +275,56 @@ async function runTests() { console.log(''); // ============================================================ - // Test 6: QA Agent Compilation + // Test 6: Antigravity Native Skills Install // ============================================================ - console.log(`${colors.yellow}Test Suite 6: QA Agent Compilation${colors.reset}\n`); + console.log(`${colors.yellow}Test Suite 6: Antigravity Native Skills${colors.reset}\n`); + + try { + clearCache(); + const platformCodes = await loadPlatformCodes(); + const antigravityInstaller = platformCodes.platforms.antigravity?.installer; + + assert(antigravityInstaller?.target_dir === '.agent/skills', 'Antigravity target_dir uses native skills path'); + + assert(antigravityInstaller?.skill_format === true, 'Antigravity installer enables native skill output'); + + assert( + Array.isArray(antigravityInstaller?.legacy_targets) && antigravityInstaller.legacy_targets.includes('.agent/workflows'), + 'Antigravity installer cleans legacy workflow output', + ); + + const tempProjectDir = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-antigravity-test-')); + const installedBmadDir = await findInstalledBmadDir(projectRoot); + const legacyDir = path.join(tempProjectDir, '.agent', 'workflows', 'bmad-legacy-dir'); + await fs.ensureDir(legacyDir); + await fs.writeFile(path.join(tempProjectDir, '.agent', 'workflows', 'bmad-legacy.md'), 'legacy\n'); + await fs.writeFile(path.join(legacyDir, 'SKILL.md'), 'legacy\n'); + + const ideManager = new IdeManager(); + await ideManager.ensureInitialized(); + const result = await ideManager.setup('antigravity', tempProjectDir, installedBmadDir, { + silent: true, + selectedModules: ['bmm'], + }); + + assert(result.success === true, 'Antigravity setup succeeds against temp project'); + + const skillFile = path.join(tempProjectDir, '.agent', 'skills', 'bmad-master', 'SKILL.md'); + assert(await fs.pathExists(skillFile), 'Antigravity install writes SKILL.md directory output'); + + assert(!(await fs.pathExists(path.join(tempProjectDir, '.agent', 'workflows'))), 'Antigravity setup removes legacy workflows dir'); + + await fs.remove(tempProjectDir); + } catch (error) { + assert(false, 'Antigravity native skills migration test succeeds', error.message); + } + + console.log(''); + + // ============================================================ + // Test 7: QA Agent Compilation + // ============================================================ + console.log(`${colors.yellow}Test Suite 7: QA Agent Compilation${colors.reset}\n`); try { const builder = new YamlXmlBuilder(); diff --git a/tools/cli/installers/lib/ide/platform-codes.yaml b/tools/cli/installers/lib/ide/platform-codes.yaml index ac4501f48..e63f94f51 100644 --- a/tools/cli/installers/lib/ide/platform-codes.yaml +++ b/tools/cli/installers/lib/ide/platform-codes.yaml @@ -20,8 +20,11 @@ platforms: category: ide description: "Google's AI development environment" installer: - target_dir: .agent/workflows + legacy_targets: + - .agent/workflows + target_dir: .agent/skills template_type: antigravity + skill_format: true auggie: name: "Auggie" diff --git a/tools/docs/native-skills-migration-checklist.md b/tools/docs/native-skills-migration-checklist.md index 1a79ed00f..35f5404a7 100644 --- a/tools/docs/native-skills-migration-checklist.md +++ b/tools/docs/native-skills-migration-checklist.md @@ -46,7 +46,7 @@ Support assumption: full Agent Skills support. BMAD currently installs legacy co - [x] Test reinstall/upgrade from legacy command output - [x] Confirm no ancestor conflict protection is needed because a child workspace surfaced child `.cursor/skills` entries but not a parent-only skill during manual verification - [ ] Implement/extend automated tests -- [ ] Commit +- [x] Commit ## Windsurf @@ -76,15 +76,15 @@ Support assumption: full Agent Skills support. BMAD currently installs workflow ## Google Antigravity -Support assumption: full Agent Skills support. BMAD currently installs workflows to `.agent/workflows`; target should move to `.agent/skills`. +Support assumption: full Agent Skills support. Antigravity docs confirm workspace skills at `.agent/skills//` and global skills at `~/.gemini/antigravity/skills//`. BMAD has now migrated from `.agent/workflows` to `.agent/skills`. -- [ ] Confirm Antigravity native skills path and project/global precedence -- [ ] Implement installer migration to native skills output -- [ ] Add legacy cleanup for `.agent/workflows` -- [ ] Test fresh install -- [ ] Test reinstall/upgrade from legacy workflow output -- [ ] Confirm ancestor conflict protection where applicable -- [ ] Implement/extend automated tests +- [x] Confirm Antigravity native skills path and project/global precedence +- [x] Implement installer migration to native skills output +- [x] Add legacy cleanup for `.agent/workflows` +- [x] Test fresh install +- [x] Test reinstall/upgrade from legacy workflow output +- [ ] Confirm ancestor conflict protection where applicable because Antigravity docs do not state whether parent-directory `.agent/skills` are inherited; `/tmp/antigravity-ancestor-repro` should be used for manual app verification instead of guessing +- [x] Implement/extend automated tests - [ ] Commit ## Auggie