feat(skills): migrate CodeBuddy to config-driven native skills

Move CodeBuddy installer from .codebuddy/commands to .codebuddy/skills
with SKILL.md directory output. Add legacy cleanup and 9 test assertions.
This commit is contained in:
Alex Verkhovsky 2026-03-06 23:58:46 -07:00
parent cbeb7e8556
commit 6cc343d61f
3 changed files with 73 additions and 10 deletions

View File

@ -955,6 +955,66 @@ async function runTests() {
console.log('');
// ============================================================
// Test 19: CodeBuddy Native Skills Install
// ============================================================
console.log(`${colors.yellow}Test Suite 19: CodeBuddy Native Skills${colors.reset}\n`);
try {
clearCache();
const platformCodes19 = await loadPlatformCodes();
const codebuddyInstaller = platformCodes19.platforms.codebuddy?.installer;
assert(codebuddyInstaller?.target_dir === '.codebuddy/skills', 'CodeBuddy target_dir uses native skills path');
assert(codebuddyInstaller?.skill_format === true, 'CodeBuddy installer enables native skill output');
assert(
Array.isArray(codebuddyInstaller?.legacy_targets) && codebuddyInstaller.legacy_targets.includes('.codebuddy/commands'),
'CodeBuddy installer cleans legacy command output',
);
const tempProjectDir19 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-codebuddy-test-'));
const installedBmadDir19 = await createTestBmadFixture();
const legacyDir19 = path.join(tempProjectDir19, '.codebuddy', 'commands', 'bmad-legacy-dir');
await fs.ensureDir(legacyDir19);
await fs.writeFile(path.join(tempProjectDir19, '.codebuddy', 'commands', 'bmad-legacy.md'), 'legacy\n');
await fs.writeFile(path.join(legacyDir19, 'SKILL.md'), 'legacy\n');
const ideManager19 = new IdeManager();
await ideManager19.ensureInitialized();
const result19 = await ideManager19.setup('codebuddy', tempProjectDir19, installedBmadDir19, {
silent: true,
selectedModules: ['bmm'],
});
assert(result19.success === true, 'CodeBuddy setup succeeds against temp project');
const skillFile19 = path.join(tempProjectDir19, '.codebuddy', 'skills', 'bmad-master', 'SKILL.md');
assert(await fs.pathExists(skillFile19), 'CodeBuddy install writes SKILL.md directory output');
const skillContent19 = await fs.readFile(skillFile19, 'utf8');
const nameMatch19 = skillContent19.match(/^name:\s*(.+)$/m);
assert(nameMatch19 && nameMatch19[1].trim() === 'bmad-master', 'CodeBuddy skill name frontmatter matches directory name exactly');
assert(!(await fs.pathExists(path.join(tempProjectDir19, '.codebuddy', 'commands'))), 'CodeBuddy setup removes legacy commands dir');
const result19b = await ideManager19.setup('codebuddy', tempProjectDir19, installedBmadDir19, {
silent: true,
selectedModules: ['bmm'],
});
assert(result19b.success === true, 'CodeBuddy reinstall/upgrade succeeds over existing skills');
assert(await fs.pathExists(skillFile19), 'CodeBuddy reinstall preserves SKILL.md output');
await fs.remove(tempProjectDir19);
await fs.remove(installedBmadDir19);
} catch (error) {
assert(false, 'CodeBuddy native skills migration test succeeds', error.message);
}
console.log('');
// ============================================================
// Summary
// ============================================================

View File

@ -84,8 +84,11 @@ platforms:
category: ide
description: "Tencent Cloud Code Assistant - AI-powered coding companion"
installer:
target_dir: .codebuddy/commands
legacy_targets:
- .codebuddy/commands
target_dir: .codebuddy/skills
template_type: default
skill_format: true
crush:
name: "Crush"

View File

@ -104,18 +104,18 @@ Support assumption: full Agent Skills support. BMAD currently installs commands
## CodeBuddy
Support assumption: full Agent Skills support. BMAD currently installs commands to `.codebuddy/commands`; target should move to `.codebuddy/skills`.
Support assumption: full Agent Skills support. CodeBuddy docs confirm workspace skills at `.codebuddy/skills/<skill-name>/SKILL.md` and global skills at `~/.codebuddy/commands/`. BMAD has now migrated from `.codebuddy/commands` to `.codebuddy/skills`.
**Install:** Download [Tencent CodeBuddy IDE](https://codebuddyide.net/) or install as VS Code extension `CodebuddyAI.codebuddy-ai`
- [ ] Confirm CodeBuddy native skills path and any naming/frontmatter requirements
- [ ] Implement installer migration to native skills output
- [ ] Add legacy cleanup for `.codebuddy/commands`
- [ ] Test fresh install
- [ ] Test reinstall/upgrade from legacy command output
- [ ] Confirm ancestor conflict protection where applicable
- [ ] Implement/extend automated tests
- [ ] Commit
- [x] Confirm CodeBuddy native skills path is `.codebuddy/skills/{skill-name}/SKILL.md` with YAML frontmatter (name + description) — per docs, not IDE-verified
- [x] Implement installer migration to native skills output
- [x] Add legacy cleanup for `.codebuddy/commands`
- [x] Test fresh install — 43 skills installed to `.codebuddy/skills/` (installer output only)
- [x] Test reinstall/upgrade from legacy command output
- [ ] **NEEDS MANUAL IDE VERIFICATION** — requires Tencent Cloud account; confirm skills appear in UI and test ancestor inheritance
- [x] Implement/extend automated tests — 9 assertions in test suite 19
- [x] Commit
## Crush