feat: add Mistral Vibe CLI platform support (#1)
* Initial plan * feat: add Mistral Vibe CLI platform support Co-authored-by: welcoMattic <773875+welcoMattic@users.noreply.github.com> * docs: add Mistral Vibe to installation documentation Co-authored-by: welcoMattic <773875+welcoMattic@users.noreply.github.com> * Fix directory name for Mistral Vibe skills in docs * Update Mistral Vibe target directory in tests * Change target directory for Mistral's CLI installer --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: welcoMattic <773875+welcoMattic@users.noreply.github.com> Co-authored-by: Mathieu Santostefano <msantostefano@proton.me> # Conflicts: # test/test-installation-components.js # tools/cli/installers/lib/ide/platform-codes.yaml
This commit is contained in:
parent
a1418dfd28
commit
2b6c79d731
|
|
@ -89,7 +89,10 @@ your-project/
|
||||||
│ ├── bmad-help/
|
│ ├── bmad-help/
|
||||||
│ ├── bmad-persona/
|
│ ├── bmad-persona/
|
||||||
│ └── ...
|
│ └── ...
|
||||||
└── .cursor/ # Cursor skills (if using Cursor)
|
├── .cursor/ # Cursor skills (if using Cursor)
|
||||||
|
│ └── skills/
|
||||||
|
│ └── ...
|
||||||
|
└── .vibe/ # Mistral Vibe skills (if using Mistral Vibe)
|
||||||
└── skills/
|
└── skills/
|
||||||
└── ...
|
└── ...
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,8 @@ Available tool IDs for the `--tools` flag:
|
||||||
|
|
||||||
**Preferred:** `claude-code`, `cursor`
|
**Preferred:** `claude-code`, `cursor`
|
||||||
|
|
||||||
|
**Other CLIs:** `mistral`, `gemini`, `codex`, `auggie`, `pi`
|
||||||
|
|
||||||
Run `npx bmad-method install` interactively once to see the full current list of supported tools, or check the [platform codes configuration](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml).
|
Run `npx bmad-method install` interactively once to see the full current list of supported tools, or check the [platform codes configuration](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/tools/cli/installers/lib/ide/platform-codes.yaml).
|
||||||
|
|
||||||
## Installation Modes
|
## Installation Modes
|
||||||
|
|
|
||||||
|
|
@ -1587,7 +1587,7 @@ async function runTests() {
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Suite 29: Unified Skill Scanner — collectSkills
|
// Suite 29: Unified Skill Scanner — collectSkills
|
||||||
// ============================================================
|
// ============================================================
|
||||||
console.log(`${colors.yellow}Test Suite 29: Unified Skill Scanner${colors.reset}\n`);
|
console.log(`${colors.yellow}Test Suite 30: Unified Skill Scanner${colors.reset}\n`);
|
||||||
|
|
||||||
let tempFixture29;
|
let tempFixture29;
|
||||||
try {
|
try {
|
||||||
|
|
@ -1700,7 +1700,7 @@ async function runTests() {
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Suite 30: parseSkillMd validation (negative cases)
|
// Suite 30: parseSkillMd validation (negative cases)
|
||||||
// ============================================================
|
// ============================================================
|
||||||
console.log(`${colors.yellow}Test Suite 30: parseSkillMd Validation${colors.reset}\n`);
|
console.log(`${colors.yellow}Test Suite 31: parseSkillMd Validation${colors.reset}\n`);
|
||||||
|
|
||||||
let tempFixture30;
|
let tempFixture30;
|
||||||
try {
|
try {
|
||||||
|
|
@ -1808,6 +1808,99 @@ async function runTests() {
|
||||||
|
|
||||||
console.log('');
|
console.log('');
|
||||||
|
|
||||||
|
// ============================================================
|
||||||
|
// Suite 31: Mistral Vibe CLI Native Skills
|
||||||
|
// ============================================================
|
||||||
|
console.log(`${colors.yellow}Test Suite 31: Mistral Vibe CLI Native Skills${colors.reset}\n`);
|
||||||
|
|
||||||
|
let tempProjectDirMistral;
|
||||||
|
let installedBmadDirMistral;
|
||||||
|
try {
|
||||||
|
clearCache();
|
||||||
|
const platformCodesMistral = await loadPlatformCodes();
|
||||||
|
const mistralInstaller = platformCodesMistral.platforms.mistral?.installer;
|
||||||
|
|
||||||
|
assert(mistralInstaller?.target_dir === '.vibe/skills', 'Mistral Vibe target_dir uses native skills path');
|
||||||
|
assert(mistralInstaller?.skill_format === true, 'Mistral Vibe installer enables native skill output');
|
||||||
|
assert(mistralInstaller?.template_type === 'default', 'Mistral Vibe installer uses default skill template');
|
||||||
|
assert(mistralInstaller?.legacy_targets === undefined, 'Mistral Vibe installer has no legacy_targets');
|
||||||
|
|
||||||
|
tempProjectDirMistral = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-mistral-test-'));
|
||||||
|
installedBmadDirMistral = await createTestBmadFixture();
|
||||||
|
|
||||||
|
const ideManagerMistral = new IdeManager();
|
||||||
|
await ideManagerMistral.ensureInitialized();
|
||||||
|
|
||||||
|
// Verify Mistral Vibe is selectable in an available IDEs list
|
||||||
|
const availableIdesMistral = ideManagerMistral.getAvailableIdes();
|
||||||
|
assert(
|
||||||
|
availableIdesMistral.some((ide) => ide.value === 'mistral'),
|
||||||
|
'Mistral Vibe appears in available IDEs list',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Verify Mistral Vibe is NOT detected before install
|
||||||
|
const detectedBeforeMistral = await ideManagerMistral.detectInstalledIdes(tempProjectDirMistral);
|
||||||
|
assert(!detectedBeforeMistral.includes('mistral'), 'Mistral Vibe is not detected before install');
|
||||||
|
|
||||||
|
const resultMistral = await ideManagerMistral.setup('mistral', tempProjectDirMistral, installedBmadDirMistral, {
|
||||||
|
silent: true,
|
||||||
|
selectedModules: ['bmm'],
|
||||||
|
});
|
||||||
|
|
||||||
|
assert(resultMistral.success === true, 'Mistral Vibe setup succeeds against temp project');
|
||||||
|
|
||||||
|
// Verify Mistral Vibe IS detected after install
|
||||||
|
const detectedAfterMistral = await ideManagerMistral.detectInstalledIdes(tempProjectDirMistral);
|
||||||
|
assert(detectedAfterMistral.includes('mistral'), 'Mistral Vibe is detected after install');
|
||||||
|
|
||||||
|
const skillFileMistral = path.join(tempProjectDirMistral, '.vibe', 'skills', 'bmad-master', 'SKILL.md');
|
||||||
|
assert(await fs.pathExists(skillFileMistral), 'Mistral Vibe install writes SKILL.md directory output');
|
||||||
|
|
||||||
|
// Parse YAML frontmatter between --- markers
|
||||||
|
const skillContentMistral = await fs.readFile(skillFileMistral, 'utf8');
|
||||||
|
const fmMatchMistral = skillContentMistral.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
|
||||||
|
assert(fmMatchMistral, 'Mistral Vibe SKILL.md contains valid frontmatter delimiters');
|
||||||
|
|
||||||
|
const frontmatterMistral = fmMatchMistral[1];
|
||||||
|
const bodyMistral = fmMatchMistral[2];
|
||||||
|
|
||||||
|
// Verify the name in the frontmatter matches the directory name
|
||||||
|
const fmNameMistral = frontmatterMistral.match(/^name:\s*(.+)$/m);
|
||||||
|
assert(
|
||||||
|
fmNameMistral && fmNameMistral[1].trim() === 'bmad-master',
|
||||||
|
'Mistral Vibe skill name frontmatter matches directory name exactly',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Verify description exists and is non-empty
|
||||||
|
const fmDescMistral = frontmatterMistral.match(/^description:\s*(.+)$/m);
|
||||||
|
assert(fmDescMistral && fmDescMistral[1].trim().length > 0, 'Mistral Vibe skill description frontmatter is present and non-empty');
|
||||||
|
|
||||||
|
// Verify frontmatter contains only name and description keys
|
||||||
|
const fmKeysMistral = [...frontmatterMistral.matchAll(/^([a-zA-Z0-9_-]+):/gm)].map((m) => m[1]);
|
||||||
|
assert(
|
||||||
|
fmKeysMistral.length === 2 && fmKeysMistral.includes('name') && fmKeysMistral.includes('description'),
|
||||||
|
'Mistral Vibe skill frontmatter contains only name and description keys',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Verify body content is non-empty
|
||||||
|
assert(bodyMistral.trim().length > 0, 'Mistral Vibe skill body content is non-empty');
|
||||||
|
|
||||||
|
// Reinstall/upgrade: run setup again over existing output
|
||||||
|
const resultMistralb = await ideManagerMistral.setup('mistral', tempProjectDirMistral, installedBmadDirMistral, {
|
||||||
|
silent: true,
|
||||||
|
selectedModules: ['bmm'],
|
||||||
|
});
|
||||||
|
assert(resultMistralb.success === true, 'Mistral Vibe reinstall/upgrade succeeds over existing skills');
|
||||||
|
assert(await fs.pathExists(skillFileMistral), 'Mistral Vibe reinstall preserves SKILL.md output');
|
||||||
|
} catch (error) {
|
||||||
|
assert(false, 'Mistral Vibe native skills test succeeds', error.message);
|
||||||
|
} finally {
|
||||||
|
if (tempProjectDirMistral) await fs.remove(tempProjectDirMistral).catch(() => {});
|
||||||
|
if (installedBmadDirMistral) await fs.remove(installedBmadDirMistral).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('');
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Suite 32: Ona Native Skills
|
// Suite 32: Ona Native Skills
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,16 @@ platforms:
|
||||||
template_type: kiro
|
template_type: kiro
|
||||||
skill_format: true
|
skill_format: true
|
||||||
|
|
||||||
|
mistral:
|
||||||
|
name: "Mistral Vibe"
|
||||||
|
preferred: false
|
||||||
|
category: cli
|
||||||
|
description: "Mistral's AI coding CLI"
|
||||||
|
installer:
|
||||||
|
target_dir: .vibe/skills
|
||||||
|
template_type: default
|
||||||
|
skill_format: true
|
||||||
|
|
||||||
ona:
|
ona:
|
||||||
name: "Ona"
|
name: "Ona"
|
||||||
preferred: false
|
preferred: false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue