Skip to content

Commit 9debc16

Browse files
jheyworthclaude
andauthored
fix(installer): remove bmad-help from Copilot Custom Agents picker (#2359)
* fix(installer): remove bmad-help from Copilot Custom Agents picker Per @bmadcode's feedback after #2324 merged: every persona agent's activation message already advertises bmad-help, so its picker entry is redundant AND confusing (looks like a peer agent when it's actually the meta-help). Removes the ALWAYS_AGENT_IDS allowlist exception that put it there. The toml-driven filter (the mechanism BMadCode endorsed in his PR review) remains the sole signal: a skill is a persona iff its source customize.toml has an [agent] section. bmad-help has no customize.toml, so under the cleaned-up filter it's correctly excluded. Tests: replaces the inclusion assertion in Suite 17 with an exclusion assertion. Suite still covers persona / non-conventional persona / workflow / meta-skill-with-`-agent-`-in-name cases. Refs #2324 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test: clarify Suite 17 fixture comment per PR review The fixture creates no customize.toml at all for bmad-help, so the exclusion path being exercised is the missing-file branch — not the file-without-[agent]-section branch. Reword the comment accordingly. Per @augmentcode review on #2359. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 65b810a commit 9debc16

2 files changed

Lines changed: 10 additions & 21 deletions

File tree

test/test-installation-components.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ async function runTests() {
585585
// persona — has customize.toml with [workflow] → EXCLUDED
586586
// (mirrors `bmad-agent-builder` in the real manifest)
587587
// 4. Workflow skill — no customize.toml at all → EXCLUDED
588-
// 5. `bmad-help` — structural exception via ALWAYS_AGENT_IDS;
589-
// has no customize.toml of its own but surfaces in the
590-
// agents picker because it's the meta-help skill → INCLUDED
588+
// 5. `bmad-help` — meta-help skill with no customize.toml;
589+
// every persona agent's activation already advertises it,
590+
// so it's correctly excluded from the picker as redundant → EXCLUDED
591591
const fixtureCsvPath17 = path.join(installedBmadDir17, '_config', 'skill-manifest.csv');
592592
await fs.writeFile(
593593
fixtureCsvPath17,
@@ -597,7 +597,7 @@ async function runTests() {
597597
'"bmad-agent-fixture","bmad-agent-fixture","Persona agent — customize.toml has [agent], SHOULD appear","core","_bmad/core/bmad-agent-fixture/SKILL.md"',
598598
'"bmad-tea","bmad-tea","Non-conventional id but [agent] in customize.toml — SHOULD appear","core","_bmad/core/bmad-tea/SKILL.md"',
599599
'"bmad-agent-builder","bmad-agent-builder","Skill-builder workflow — id contains -agent- but customize.toml has [workflow] — should NOT appear","core","_bmad/core/bmad-agent-builder/SKILL.md"',
600-
'"bmad-help","bmad-help","Meta-help skill — no customize.toml but ALWAYS_AGENT_IDS exception; SHOULD appear in agents picker","core","_bmad/core/bmad-help/SKILL.md"',
600+
'"bmad-help","bmad-help","Meta-help skill — no customize.toml; SHOULD NOT appear in agents picker (toml-driven filter)","core","_bmad/core/bmad-help/SKILL.md"',
601601
'',
602602
].join('\n'),
603603
);
@@ -615,9 +615,9 @@ async function runTests() {
615615
['---', `name: ${id}`, `description: fixture for ${id}`, '---', '', `Body of ${id}.`].join('\n'),
616616
);
617617
}
618-
// Note: bmad-help intentionally has NO customize.toml — it's the
619-
// structural exception for which the ALWAYS_AGENT_IDS allowlist
620-
// exists.
618+
// Note: bmad-help intentionally has NO customize.toml — it exercises
619+
// the toml-driven filter's exclusion path (a skill with no
620+
// customize.toml is correctly kept out of the Copilot agents picker).
621621
// [agent] customize.toml for the two persona fixtures.
622622
await fs.writeFile(
623623
path.join(installedBmadDir17, 'core', 'bmad-agent-fixture', 'customize.toml'),
@@ -688,8 +688,8 @@ async function runTests() {
688688
assert(await fs.pathExists(agentFileForTea17), 'Non-conventional id with [agent] in customize.toml is included (no allowlist needed)');
689689
assert(!(await fs.pathExists(agentFileForWorkflow17)), 'Workflow skill (no customize.toml) is FILTERED OUT of .github/agents/');
690690
assert(
691-
await fs.pathExists(agentFileForBmadHelp17),
692-
'bmad-help is INCLUDED in agents picker via ALWAYS_AGENT_IDS exception (structural meta-skill, no customize.toml)',
691+
!(await fs.pathExists(agentFileForBmadHelp17)),
692+
'bmad-help is excluded from Copilot agents picker (no customize.toml; allowlist removed per maintainer feedback)',
693693
);
694694
assert(
695695
!(await fs.pathExists(agentFileForMetaSkill17)),

tools/installer/ide/_config-driven.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ function isSafeCanonicalId(value) {
5757
// OpenCode's native `@skills/<id>` skill-reference syntax.
5858
const DEFAULT_COMMANDS_BODY_TEMPLATE = '@skills/{canonicalId}';
5959

60-
// `bmad-help` is the structural meta-skill across BMAD: the orientation
61-
// helper that points users at every other skill. It is invoked
62-
// persona-style ("ask the helper") even though it has no [agent]
63-
// customize.toml of its own (it isn't a configurable persona). Surfacing
64-
// it in agents-picker contexts mirrors how users actually reach for it,
65-
// and the inclusion is unique and stable — there is no second meta-help
66-
// skill to encourage growth of this exception.
67-
const ALWAYS_AGENT_IDS = new Set(['bmad-help']);
68-
6960
// Is this skill a persona agent (vs. a workflow/tool/standalone skill)?
7061
// Used by platforms that surface only persona agents (e.g. Copilot's Custom
7162
// Agents picker). Signal: the skill's source `customize.toml` has an
@@ -77,15 +68,13 @@ const ALWAYS_AGENT_IDS = new Set(['bmad-help']);
7768
// GDS, WDS, TEA, and correctly excludes meta-skills like
7869
// `bmad-agent-builder` (a skill-builder workflow whose canonical id
7970
// contains `-agent-` but which has no [agent] section because it isn't a
80-
// persona itself). Plus the explicit `ALWAYS_AGENT_IDS` set for the one
81-
// structural exception (`bmad-help`).
71+
// persona itself).
8272
//
8373
// Reading the source toml — at install time the source skill directory
8474
// (resolved from manifest record.path) still exists; cleanup runs later
8575
// in the install flow.
8676
async function isAgentSkill(record, bmadDir) {
8777
if (!record?.path || !bmadDir) return false;
88-
if (record.canonicalId && ALWAYS_AGENT_IDS.has(record.canonicalId)) return true;
8978
const bmadFolderName = path.basename(bmadDir);
9079
const bmadPrefix = bmadFolderName + '/';
9180
const relativePath = record.path.startsWith(bmadPrefix) ? record.path.slice(bmadPrefix.length) : record.path;

0 commit comments

Comments
 (0)