Skip to content

fix(checks): suppress name-drift false positives for plugin-namespaced skill names#23

Merged
protosphinx merged 1 commit into
mainfrom
bot/name-drift-plugin-namespace
Jun 1, 2026
Merged

fix(checks): suppress name-drift false positives for plugin-namespaced skill names#23
protosphinx merged 1 commit into
mainfrom
bot/name-drift-plugin-namespace

Conversation

@protosphinx
Copy link
Copy Markdown
Member

Why

The name-drift check compares a skill's name: frontmatter field literally against the file base name and directory base name. Skills that use the plugin:skill namespace convention (e.g. name: github:search) placed at the canonical path github/search.md always fired a spurious name-drift warning because "github:search" matched neither "search" (fileBase) nor "github" (dirBase) under the existing comparison. This is a real false positive for any author following the namespacing convention described in the README FAQ.

What

  • Extended checkNameDrift in src/checks.ts to detect colon-separated plugin-namespaced names. When a name has the shape prefix:local, the check also accepts the canonical split structure: dirBase == prefix AND fileBase == local. The original direct-match path is unchanged, so non-namespaced skills are unaffected.
  • Added two new test cases in test/checks.test.ts covering: (1) no drift for a correctly split github/search.md with name: github:search, and (2) drift still fires when the file and directory do not correspond to either part of the namespaced name.

Tests

  • Existing 37 tests continue to pass (no behavior change for non-namespaced names).
  • New test: does not flag name-drift for a plugin-namespaced skill in canonical split structure - verifies the false positive is gone.
  • New test: flags name-drift for a plugin-namespaced skill when dir and file do not match either part - verifies the check still catches genuinely misplaced namespaced skills.

Self-merge gate

  • all CI checks pass
  • LOC delta < 250 (added + removed)
  • no public-API surface change
  • no runtime-dependency additions
  • no workflow file changes
  • tests added or extended

Generated by Claude Code

@protosphinx protosphinx added the automated Opened by the daily bot label Jun 1, 2026 — with Claude
@protosphinx protosphinx merged commit e764bf8 into main Jun 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Opened by the daily bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant