feat(installer): migrate kiro to native skills
This commit is contained in:
parent
f0b5d2ed95
commit
4f9c2a005a
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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-name>/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
|
||||
|
|
|
|||
Loading…
Reference in New Issue