fix(validate-skills): skip tests/fixtures when discovering skills
The skill validator walks all of src/ recursively, so the bmad-module skill's reference and negative example modules under tests/fixtures/ (intentionally non-bmad-* names and deliberately-malformed fixtures) were validated as production skills and tripped HIGH SKILL-04 name-format findings, failing `validate:skills --strict`. Exclude a `fixtures/` directory whose parent is `tests/` from discovery so the validator judges only real skills. No production skill lives under tests/fixtures/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
546826b451
commit
8d628b5f1b
|
|
@ -195,6 +195,10 @@ function discoverSkillDirs(rootDirs) {
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
if (!entry.isDirectory()) continue;
|
if (!entry.isDirectory()) continue;
|
||||||
if (entry.name === 'node_modules' || entry.name === '.git') continue;
|
if (entry.name === 'node_modules' || entry.name === '.git') continue;
|
||||||
|
// Skip `tests/fixtures/` trees: these hold reference and deliberately-
|
||||||
|
// malformed example modules (e.g. third-party `acme-*` skills and negative
|
||||||
|
// fixtures) that intentionally don't follow the production SKILL rules.
|
||||||
|
if (entry.name === 'fixtures' && path.basename(dir) === 'tests') continue;
|
||||||
|
|
||||||
const fullPath = path.join(dir, entry.name);
|
const fullPath = path.join(dir, entry.name);
|
||||||
const skillMd = path.join(fullPath, 'SKILL.md');
|
const skillMd = path.join(fullPath, 'SKILL.md');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue