diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 1642dfbee..182456fc5 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -1845,7 +1845,7 @@ async function runTests() { }); assert(result.success === true, 'Antigravity setup succeeds with overlapping skill names'); - assert(result.detail === '2 skills', 'Installer detail reports unique installed skill directories'); + assert(result.detail === '2 skills, 2 agents', 'Installer detail reports total skills and total agents'); assert(result.handlerResult.results.skillDirectories === 2, 'Result exposes unique skill directory count'); assert(result.handlerResult.results.agents === 2, 'Result retains generated agent write count'); assert(result.handlerResult.results.workflows === 1, 'Result retains generated workflow count'); @@ -1854,7 +1854,10 @@ async function runTests() { await fs.pathExists(path.join(collisionProjectDir, '.agent', 'skills', 'bmad-agent-bmad-master', 'SKILL.md')), 'Agent skill directory is created', ); - assert(await fs.pathExists(path.join(collisionProjectDir, '.agent', 'skills', 'bmad-help', 'SKILL.md')), 'Overlapping skill directory is created once'); + assert( + await fs.pathExists(path.join(collisionProjectDir, '.agent', 'skills', 'bmad-help', 'SKILL.md')), + 'Overlapping skill directory is created once', + ); } catch (error) { assert(false, 'Skill-format unique count test succeeds', error.message); } finally { diff --git a/tools/cli/installers/lib/ide/_config-driven.js b/tools/cli/installers/lib/ide/_config-driven.js index 2f816f9c9..0abddd0dc 100644 --- a/tools/cli/installers/lib/ide/_config-driven.js +++ b/tools/cli/installers/lib/ide/_config-driven.js @@ -712,15 +712,10 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}} async printSummary(results, targetDir, options = {}) { if (options.silent) return; const parts = []; - if (results.skillDirectories > 0) { - parts.push(`${results.skillDirectories} skills`); - } else { - if (results.agents > 0) parts.push(`${results.agents} agents`); - if (results.workflows > 0) parts.push(`${results.workflows} workflows`); - if (results.tasks > 0) parts.push(`${results.tasks} tasks`); - if (results.tools > 0) parts.push(`${results.tools} tools`); - if (results.skills > 0) parts.push(`${results.skills} skills`); - } + const totalSkills = + results.skillDirectories || (results.workflows || 0) + (results.tasks || 0) + (results.tools || 0) + (results.skills || 0); + if (totalSkills > 0) parts.push(`${totalSkills} skills`); + if (results.agents > 0) parts.push(`${results.agents} agents`); await prompts.log.success(`${this.name} configured: ${parts.join(', ')} → ${targetDir}`); } diff --git a/tools/cli/installers/lib/ide/manager.js b/tools/cli/installers/lib/ide/manager.js index 161198cbd..e5e13a202 100644 --- a/tools/cli/installers/lib/ide/manager.js +++ b/tools/cli/installers/lib/ide/manager.js @@ -162,15 +162,9 @@ class IdeManager { // Config-driven handlers return { success, results: { agents, workflows, tasks, tools } } const r = handlerResult.results; const parts = []; - if (r.skillDirectories > 0) { - parts.push(`${r.skillDirectories} skills`); - } else { - if (r.agents > 0) parts.push(`${r.agents} agents`); - if (r.workflows > 0) parts.push(`${r.workflows} workflows`); - if (r.tasks > 0) parts.push(`${r.tasks} tasks`); - if (r.tools > 0) parts.push(`${r.tools} tools`); - if (r.skills > 0) parts.push(`${r.skills} skills`); - } + const totalSkills = r.skillDirectories || (r.workflows || 0) + (r.tasks || 0) + (r.tools || 0) + (r.skills || 0); + if (totalSkills > 0) parts.push(`${totalSkills} skills`); + if (r.agents > 0) parts.push(`${r.agents} agents`); detail = parts.join(', '); } // Propagate handler's success status (default true for backward compat)