fix(installer): separate skill and agent counts in summary (#1932)

Subtract agents from total skill directories so the summary shows
non-agent skills and agents as distinct counts (e.g. 34 skills, 10
agents) instead of double-counting agents in the skill total.
This commit is contained in:
Alex Verkhovsky 2026-03-12 09:13:14 -06:00 committed by GitHub
parent c57506464f
commit 7b4875be79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -1846,7 +1846,7 @@ async function runTests() {
}); });
assert(result.success === true, 'Antigravity setup succeeds with overlapping skill names'); assert(result.success === true, 'Antigravity setup succeeds with overlapping skill names');
assert(result.detail === '2 skills, 2 agents', 'Installer detail reports total skills and total agents'); assert(result.detail === '2 agents', 'Installer detail reports agents separately from skills');
assert(result.handlerResult.results.skillDirectories === 2, 'Result exposes unique skill directory count'); 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.agents === 2, 'Result retains generated agent write count');
assert(result.handlerResult.results.workflows === 1, 'Result retains generated workflow count'); assert(result.handlerResult.results.workflows === 1, 'Result retains generated workflow count');

View File

@ -712,9 +712,10 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
async printSummary(results, targetDir, options = {}) { async printSummary(results, targetDir, options = {}) {
if (options.silent) return; if (options.silent) return;
const parts = []; const parts = [];
const totalSkills = const totalDirs =
results.skillDirectories || (results.workflows || 0) + (results.tasks || 0) + (results.tools || 0) + (results.skills || 0); results.skillDirectories || (results.workflows || 0) + (results.tasks || 0) + (results.tools || 0) + (results.skills || 0);
if (totalSkills > 0) parts.push(`${totalSkills} skills`); const skillCount = totalDirs - (results.agents || 0);
if (skillCount > 0) parts.push(`${skillCount} skills`);
if (results.agents > 0) parts.push(`${results.agents} agents`); if (results.agents > 0) parts.push(`${results.agents} agents`);
await prompts.log.success(`${this.name} configured: ${parts.join(', ')}${targetDir}`); await prompts.log.success(`${this.name} configured: ${parts.join(', ')}${targetDir}`);
} }

View File

@ -162,8 +162,9 @@ class IdeManager {
// Config-driven handlers return { success, results: { agents, workflows, tasks, tools } } // Config-driven handlers return { success, results: { agents, workflows, tasks, tools } }
const r = handlerResult.results; const r = handlerResult.results;
const parts = []; const parts = [];
const totalSkills = r.skillDirectories || (r.workflows || 0) + (r.tasks || 0) + (r.tools || 0) + (r.skills || 0); const totalDirs = r.skillDirectories || (r.workflows || 0) + (r.tasks || 0) + (r.tools || 0) + (r.skills || 0);
if (totalSkills > 0) parts.push(`${totalSkills} skills`); const skillCount = totalDirs - (r.agents || 0);
if (skillCount > 0) parts.push(`${skillCount} skills`);
if (r.agents > 0) parts.push(`${r.agents} agents`); if (r.agents > 0) parts.push(`${r.agents} agents`);
detail = parts.join(', '); detail = parts.join(', ');
} }