diff --git a/.augment/code_review_guidelines.yaml b/.augment/code_review_guidelines.yaml index 0a8d76dc3..48feb4264 100644 --- a/.augment/code_review_guidelines.yaml +++ b/.augment/code_review_guidelines.yaml @@ -39,6 +39,7 @@ file_paths_to_ignore: - ".agent/**" - ".agentvibes/**" - ".kiro/**" + - ".junie/**" - ".roo/**" - ".github/chatmodes/**" # --- Shared baseline: build temp --- diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index c22ff4c5c..d3e46cb90 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -12,6 +12,7 @@ ignores: - .roo/** - .codex/** - .kiro/** + - .junie/** - sample-project/** - test-project-install/** - z*/** diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 8b6f505de..bd028ec45 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -2028,6 +2028,67 @@ async function runTests() { console.log(''); + // ============================================================ + // Test Suite 34: Junie Native Skills Install + // ============================================================ + console.log(`${colors.yellow}Test Suite 34: Junie Native Skills${colors.reset}\n`); + + let tempProjectDir34; + let installedBmadDir34; + + try { + clearCache(); + const platformCodes34 = await loadPlatformCodes(); + const junieInstaller = platformCodes34.platforms.junie?.installer; + + assert(junieInstaller?.target_dir === '.junie/skills', 'Junie target_dir uses native skills path'); + assert(junieInstaller?.skill_format === true, 'Junie installer enables native skill output'); + assert( + Array.isArray(junieInstaller?.legacy_targets) && junieInstaller.legacy_targets.includes('.junie/commands'), + 'Junie installer cleans legacy command output', + ); + + tempProjectDir34 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-junie-test-')); + installedBmadDir34 = await createTestBmadFixture(); + const legacyDir34 = path.join(tempProjectDir34, '.junie', 'commands', 'bmad-legacy-dir'); + await fs.ensureDir(legacyDir34); + await fs.writeFile(path.join(tempProjectDir34, '.junie', 'commands', 'bmad-legacy.md'), 'legacy\n'); + await fs.writeFile(path.join(legacyDir34, 'SKILL.md'), 'legacy\n'); + + const ideManager34 = new IdeManager(); + await ideManager34.ensureInitialized(); + const result34 = await ideManager34.setup('junie', tempProjectDir34, installedBmadDir34, { + silent: true, + selectedModules: ['bmm'], + }); + + assert(result34.success === true, 'Junie setup succeeds against temp project'); + + const skillFile34 = path.join(tempProjectDir34, '.junie', 'skills', 'bmad-master', 'SKILL.md'); + assert(await fs.pathExists(skillFile34), 'Junie install writes SKILL.md directory output'); + + const skillContent34 = await fs.readFile(skillFile34, 'utf8'); + const nameMatch34 = skillContent34.match(/^name:\s*(.+)$/m); + assert(nameMatch34 && nameMatch34[1].trim() === 'bmad-master', 'Junie skill name frontmatter matches directory name exactly'); + + assert(!(await fs.pathExists(path.join(tempProjectDir34, '.junie', 'commands'))), 'Junie setup removes legacy commands dir'); + + const result34b = await ideManager34.setup('junie', tempProjectDir34, installedBmadDir34, { + silent: true, + selectedModules: ['bmm'], + }); + + assert(result34b.success === true, 'Junie reinstall/upgrade succeeds over existing skills'); + assert(await fs.pathExists(skillFile34), 'Junie reinstall preserves SKILL.md output'); + } catch (error) { + assert(false, 'Junie native skills test succeeds', error.message); + } finally { + if (tempProjectDir34) await fs.remove(tempProjectDir34).catch(() => {}); + if (installedBmadDir34) await fs.remove(path.dirname(installedBmadDir34)).catch(() => {}); + } + + console.log(''); + // ============================================================ // Summary // ============================================================ diff --git a/tools/cli/installers/lib/ide/platform-codes.yaml b/tools/cli/installers/lib/ide/platform-codes.yaml index 2c4d2e920..b18e7624b 100644 --- a/tools/cli/installers/lib/ide/platform-codes.yaml +++ b/tools/cli/installers/lib/ide/platform-codes.yaml @@ -151,6 +151,18 @@ platforms: template_type: default skill_format: true + junie: + name: "Junie" + preferred: false + category: cli + description: "AI coding agent by JetBrains" + installer: + legacy_targets: + - .junie/commands + target_dir: .junie/skills + template_type: default + skill_format: true + kilo: name: "KiloCoder" preferred: false diff --git a/tools/platform-codes.yaml b/tools/platform-codes.yaml index f643d7aa6..8fa92ac91 100644 --- a/tools/platform-codes.yaml +++ b/tools/platform-codes.yaml @@ -18,6 +18,12 @@ platforms: category: cli description: "Anthropic's official CLI for Claude" + junie: + name: "Junie" + preferred: false + category: cli + description: "AI coding agent by JetBrains" + cursor: name: "Cursor" preferred: true