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:
parent
cbeb7e8556
commit
6cc343d61f
|
|
@ -955,6 +955,66 @@ async function runTests() {
|
||||||
|
|
||||||
console.log('');
|
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
|
// Summary
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,11 @@ platforms:
|
||||||
category: ide
|
category: ide
|
||||||
description: "Tencent Cloud Code Assistant - AI-powered coding companion"
|
description: "Tencent Cloud Code Assistant - AI-powered coding companion"
|
||||||
installer:
|
installer:
|
||||||
target_dir: .codebuddy/commands
|
legacy_targets:
|
||||||
|
- .codebuddy/commands
|
||||||
|
target_dir: .codebuddy/skills
|
||||||
template_type: default
|
template_type: default
|
||||||
|
skill_format: true
|
||||||
|
|
||||||
crush:
|
crush:
|
||||||
name: "Crush"
|
name: "Crush"
|
||||||
|
|
|
||||||
|
|
@ -104,18 +104,18 @@ Support assumption: full Agent Skills support. BMAD currently installs commands
|
||||||
|
|
||||||
## CodeBuddy
|
## 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`
|
**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
|
- [x] Confirm CodeBuddy native skills path is `.codebuddy/skills/{skill-name}/SKILL.md` with YAML frontmatter (name + description) — per docs, not IDE-verified
|
||||||
- [ ] Implement installer migration to native skills output
|
- [x] Implement installer migration to native skills output
|
||||||
- [ ] Add legacy cleanup for `.codebuddy/commands`
|
- [x] Add legacy cleanup for `.codebuddy/commands`
|
||||||
- [ ] Test fresh install
|
- [x] Test fresh install — 43 skills installed to `.codebuddy/skills/` (installer output only)
|
||||||
- [ ] Test reinstall/upgrade from legacy command output
|
- [x] Test reinstall/upgrade from legacy command output
|
||||||
- [ ] Confirm ancestor conflict protection where applicable
|
- [ ] **NEEDS MANUAL IDE VERIFICATION** — requires Tencent Cloud account; confirm skills appear in UI and test ancestor inheritance
|
||||||
- [ ] Implement/extend automated tests
|
- [x] Implement/extend automated tests — 9 assertions in test suite 19
|
||||||
- [ ] Commit
|
- [x] Commit
|
||||||
|
|
||||||
## Crush
|
## Crush
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue