diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 2e91d6016..1efaacb04 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -228,9 +228,56 @@ async function runTests() { console.log(''); // ============================================================ - // Test 5: QA Agent Compilation + // Test 5: Kiro Native Skills Install // ============================================================ - console.log(`${colors.yellow}Test Suite 5: QA Agent Compilation${colors.reset}\n`); + console.log(`${colors.yellow}Test Suite 5: Kiro Native Skills${colors.reset}\n`); + + try { + clearCache(); + const platformCodes = await loadPlatformCodes(); + const kiroInstaller = platformCodes.platforms.kiro?.installer; + + assert(kiroInstaller?.target_dir === '.kiro/skills', 'Kiro target_dir uses native skills path'); + + assert(kiroInstaller?.skill_format === true, 'Kiro installer enables native skill output'); + + assert( + Array.isArray(kiroInstaller?.legacy_targets) && kiroInstaller.legacy_targets.includes('.kiro/steering'), + 'Kiro installer cleans legacy steering output', + ); + + const tempProjectDir = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-kiro-test-')); + const installedBmadDir = await findInstalledBmadDir(projectRoot); + const legacyDir = path.join(tempProjectDir, '.kiro', 'steering', 'bmad-legacy-dir'); + await fs.ensureDir(legacyDir); + await fs.writeFile(path.join(tempProjectDir, '.kiro', 'steering', '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('kiro', tempProjectDir, installedBmadDir, { + silent: true, + selectedModules: ['bmm'], + }); + + assert(result.success === true, 'Kiro setup succeeds against temp project'); + + const skillFile = path.join(tempProjectDir, '.kiro', 'skills', 'bmad-master', 'SKILL.md'); + assert(await fs.pathExists(skillFile), 'Kiro install writes SKILL.md directory output'); + + assert(!(await fs.pathExists(path.join(tempProjectDir, '.kiro', 'steering'))), 'Kiro setup removes legacy steering dir'); + + await fs.remove(tempProjectDir); + } catch (error) { + assert(false, 'Kiro native skills migration test succeeds', error.message); + } + + console.log(''); + + // ============================================================ + // Test 6: QA Agent Compilation + // ============================================================ + console.log(`${colors.yellow}Test Suite 6: 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 fbcd0c06f..ac4501f48 100644 --- a/tools/cli/installers/lib/ide/platform-codes.yaml +++ b/tools/cli/installers/lib/ide/platform-codes.yaml @@ -137,8 +137,11 @@ platforms: category: ide description: "Amazon's AI-powered IDE" installer: - target_dir: .kiro/steering + legacy_targets: + - .kiro/steering + target_dir: .kiro/skills template_type: kiro + skill_format: true opencode: name: "OpenCode" diff --git a/tools/docs/native-skills-migration-checklist.md b/tools/docs/native-skills-migration-checklist.md index f36bc7960..1e244c09e 100644 --- a/tools/docs/native-skills-migration-checklist.md +++ b/tools/docs/native-skills-migration-checklist.md @@ -128,15 +128,15 @@ Support assumption: full Agent Skills support. BMAD currently installs commands ## Kiro -Support assumption: full Agent Skills support. BMAD currently installs steering files to `.kiro/steering`; target should move to `.kiro/skills`. +Support assumption: full Agent Skills support. Kiro docs confirm project skills at `.kiro/skills//SKILL.md` and describe steering as a separate rules mechanism, not a required compatibility layer. BMAD has now migrated from `.kiro/steering` to `.kiro/skills`. -- [ ] Confirm Kiro skills path and verify BMAD should stop writing steering artifacts for this migration -- [ ] Implement installer migration to native skills output -- [ ] Add legacy cleanup for `.kiro/steering` -- [ ] Test fresh install -- [ ] Test reinstall/upgrade from legacy steering output -- [ ] Confirm ancestor conflict protection where applicable -- [ ] Implement/extend automated tests +- [x] Confirm Kiro skills path and verify BMAD should stop writing steering artifacts for this migration +- [x] Implement installer migration to native skills output +- [x] Add legacy cleanup for `.kiro/steering` +- [x] Test fresh install +- [x] Test reinstall/upgrade from legacy steering output +- [ ] Confirm ancestor conflict protection where applicable; docs only confirm workspace and global scopes, so parent-directory inheritance still needs manual app verification before enabling `ancestor_conflict_check` +- [x] Implement/extend automated tests - [ ] Commit ## OpenCode