Skip to content

test(plugin): add collision guardrails for reserved slash commands (#1288)#1294

Merged
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775270796/pane-2
Apr 4, 2026
Merged

test(plugin): add collision guardrails for reserved slash commands (#1288)#1294
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775270796/pane-2

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Add validate-commands.ts script with reserved command denylist (33 Claude Code built-in commands), legacy allowlist for existing bare commands, and namespace validation for codingbuddy:* convention
  • Add 26 tests covering denylist completeness, command extraction, collision detection, namespace compliance, and real commands/ directory validation
  • Add validate:commands npm script and plugin-validate-commands CI job in dev.yml

Closes #1288

Test plan

  • npx tsx scripts/validate-commands.ts passes with current commands
  • vitest run — all 97 tests pass (26 new)
  • Lint, typecheck, prettier all pass
  • CI job added to dev.yml for automated enforcement

…1288)

Add automated detection of command name collisions between plugin commands
and Claude Code built-in slash commands to prevent regressions.

- Add validate-commands.ts with reserved denylist (33 commands), legacy
  allowlist, and namespace validation
- Add 26 tests covering denylist, extraction, collision, and namespace
- Add validate:commands script to package.json
- Add plugin-validate-commands CI job to dev.yml
@JeremyDev87 JeremyDev87 added test plugin packages/claude-code-plugin cli CLI commands and interfaces labels Apr 4, 2026
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 4, 2026 2:56am

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: ✅ APPROVE

CI Status: ALL PASS (26/26 checks including new plugin-validate-commands)

Code Quality Assessment:

  • Reserved denylist: 30+ Claude Code built-in commands properly catalogued
  • Legacy allowlist: Current 6 bare commands (plan, act, eval, auto, buddy, checklist) correctly allow-listed
  • Collision detection: Clean validation with both reserved command and namespace violation checks
  • CI integration: New plugin-validate-commands job in dev.yml with SHA-pinned checkout action
  • Tests: 275 lines, 23 test cases covering denylist, allowlist, extraction, namespace helpers, collision detection, and full validation
  • Type safety: Proper ValidationResult interface, no any types
  • CLI runner: require.main guard for dual import/CLI usage

Checklist:

  • CI ALL PASS
  • No unused imports/variables
  • No any types
  • Tests cover acceptance criteria from #1288
  • SHA-pinned GitHub Actions checkout
  • Script properly exits non-zero on collision
  • package.json script entry added

✅ Review complete — well-structured collision guardrails implementation.

@JeremyDev87 JeremyDev87 self-assigned this Apr 4, 2026
@JeremyDev87 JeremyDev87 merged commit fddc741 into master Apr 4, 2026
26 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775270796/pane-2 branch April 4, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI commands and interfaces plugin packages/claude-code-plugin test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(plugin): add collision guardrails for reserved slash commands in CI and packaging checks

1 participant