@@ -1587,7 +1587,7 @@ async function runTests() {
15871587 // ============================================================
15881588 // Suite 29: Unified Skill Scanner — collectSkills
15891589 // ============================================================
1590- console . log ( `${ colors . yellow } Test Suite 29 : Unified Skill Scanner${ colors . reset } \n` ) ;
1590+ console . log ( `${ colors . yellow } Test Suite 30 : Unified Skill Scanner${ colors . reset } \n` ) ;
15911591
15921592 let tempFixture29 ;
15931593 try {
@@ -1700,7 +1700,7 @@ async function runTests() {
17001700 // ============================================================
17011701 // Suite 30: parseSkillMd validation (negative cases)
17021702 // ============================================================
1703- console . log ( `${ colors . yellow } Test Suite 30 : parseSkillMd Validation${ colors . reset } \n` ) ;
1703+ console . log ( `${ colors . yellow } Test Suite 31 : parseSkillMd Validation${ colors . reset } \n` ) ;
17041704
17051705 let tempFixture30 ;
17061706 try {
@@ -1808,6 +1808,96 @@ async function runTests() {
18081808
18091809 console . log ( '' ) ;
18101810
1811+ // ============================================================
1812+ // Suite 31: Mistral Vibe CLI Native Skills
1813+ // ============================================================
1814+ console . log ( `${ colors . yellow } Test Suite 31: Mistral Vibe CLI Native Skills${ colors . reset } \n` ) ;
1815+
1816+ let tempProjectDir31 ;
1817+ let installedBmadDir31 ;
1818+ try {
1819+ clearCache ( ) ;
1820+ const platformCodes31 = await loadPlatformCodes ( ) ;
1821+ const mistralInstaller = platformCodes31 . platforms . mistral ?. installer ;
1822+
1823+ assert ( mistralInstaller ?. target_dir === '.vibe/skills' , 'Mistral Vibe target_dir uses native skills path' ) ;
1824+ assert ( mistralInstaller ?. skill_format === true , 'Mistral Vibe installer enables native skill output' ) ;
1825+ assert ( mistralInstaller ?. template_type === 'default' , 'Mistral Vibe installer uses default skill template' ) ;
1826+ assert ( mistralInstaller ?. legacy_targets === undefined , 'Mistral Vibe installer has no legacy_targets' ) ;
1827+
1828+ tempProjectDir31 = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'bmad-mistral-test-' ) ) ;
1829+ installedBmadDir31 = await createTestBmadFixture ( ) ;
1830+
1831+ const ideManager31 = new IdeManager ( ) ;
1832+ await ideManager31 . ensureInitialized ( ) ;
1833+
1834+ // Verify Mistral Vibe is selectable in an available IDEs list
1835+ const availableIdes31 = ideManager31 . getAvailableIdes ( ) ;
1836+ assert (
1837+ availableIdes31 . some ( ( ide ) => ide . value === 'mistral' ) ,
1838+ 'Mistral Vibe appears in available IDEs list' ,
1839+ ) ;
1840+
1841+ // Verify Mistral Vibe is NOT detected before install
1842+ const detectedBefore31 = await ideManager31 . detectInstalledIdes ( tempProjectDir31 ) ;
1843+ assert ( ! detectedBefore31 . includes ( 'mistral' ) , 'Mistral Vibe is not detected before install' ) ;
1844+
1845+ const result31 = await ideManager31 . setup ( 'mistral' , tempProjectDir31 , installedBmadDir31 , {
1846+ silent : true ,
1847+ selectedModules : [ 'bmm' ] ,
1848+ } ) ;
1849+
1850+ assert ( result31 . success === true , 'Mistral Vibe setup succeeds against temp project' ) ;
1851+
1852+ // Verify Mistral Vibe IS detected after install
1853+ const detectedAfter31 = await ideManager31 . detectInstalledIdes ( tempProjectDir31 ) ;
1854+ assert ( detectedAfter31 . includes ( 'mistral' ) , 'Mistral Vibe is detected after install' ) ;
1855+
1856+ const skillFile31 = path . join ( tempProjectDir31 , '.vibe' , 'skills' , 'bmad-master' , 'SKILL.md' ) ;
1857+ assert ( await fs . pathExists ( skillFile31 ) , 'Mistral Vibe install writes SKILL.md directory output' ) ;
1858+
1859+ // Parse YAML frontmatter between --- markers
1860+ const skillContent31 = await fs . readFile ( skillFile31 , 'utf8' ) ;
1861+ const fmMatch31 = skillContent31 . match ( / ^ - - - \n ( [ \s \S ] * ?) \n - - - \n ? ( [ \s \S ] * ) $ / ) ;
1862+ assert ( fmMatch31 , 'Mistral Vibe SKILL.md contains valid frontmatter delimiters' ) ;
1863+
1864+ const frontmatter31 = fmMatch31 [ 1 ] ;
1865+ const body31 = fmMatch31 [ 2 ] ;
1866+
1867+ // Verify the name in the frontmatter matches the directory name
1868+ const fmName31 = frontmatter31 . match ( / ^ n a m e : \s * ( .+ ) $ / m) ;
1869+ assert ( fmName31 && fmName31 [ 1 ] . trim ( ) === 'bmad-master' , 'Mistral Vibe skill name frontmatter matches directory name exactly' ) ;
1870+
1871+ // Verify description exists and is non-empty
1872+ const fmDesc31 = frontmatter31 . match ( / ^ d e s c r i p t i o n : \s * ( .+ ) $ / m) ;
1873+ assert ( fmDesc31 && fmDesc31 [ 1 ] . trim ( ) . length > 0 , 'Mistral Vibe skill description frontmatter is present and non-empty' ) ;
1874+
1875+ // Verify frontmatter contains only name and description keys
1876+ const fmKeys31 = [ ...frontmatter31 . matchAll ( / ^ ( [ a - z A - Z 0 - 9 _ - ] + ) : / gm) ] . map ( ( m ) => m [ 1 ] ) ;
1877+ assert (
1878+ fmKeys31 . length === 2 && fmKeys31 . includes ( 'name' ) && fmKeys31 . includes ( 'description' ) ,
1879+ 'Mistral Vibe skill frontmatter contains only name and description keys' ,
1880+ ) ;
1881+
1882+ // Verify body content is non-empty
1883+ assert ( body31 . trim ( ) . length > 0 , 'Mistral Vibe skill body content is non-empty' ) ;
1884+
1885+ // Reinstall/upgrade: run setup again over existing output
1886+ const result31b = await ideManager31 . setup ( 'mistral' , tempProjectDir31 , installedBmadDir31 , {
1887+ silent : true ,
1888+ selectedModules : [ 'bmm' ] ,
1889+ } ) ;
1890+ assert ( result31b . success === true , 'Mistral Vibe reinstall/upgrade succeeds over existing skills' ) ;
1891+ assert ( await fs . pathExists ( skillFile31 ) , 'Mistral Vibe reinstall preserves SKILL.md output' ) ;
1892+ } catch ( error ) {
1893+ assert ( false , 'Mistral Vibe native skills test succeeds' , error . message ) ;
1894+ } finally {
1895+ if ( tempProjectDir31 ) await fs . remove ( tempProjectDir31 ) . catch ( ( ) => { } ) ;
1896+ if ( installedBmadDir31 ) await fs . remove ( installedBmadDir31 ) . catch ( ( ) => { } ) ;
1897+ }
1898+
1899+ console . log ( '' ) ;
1900+
18111901 // ============================================================
18121902 // Summary
18131903 // ============================================================
0 commit comments