Skip to content

fix(plugin): strip specorator/ prefix from commands during plugin build#420

Merged
Luis85 merged 1 commit into
developfrom
worktree-fix+plugin-double-namespace-417
May 9, 2026
Merged

fix(plugin): strip specorator/ prefix from commands during plugin build#420
Luis85 merged 1 commit into
developfrom
worktree-fix+plugin-double-namespace-417

Conversation

@Luis85
Copy link
Copy Markdown
Owner

@Luis85 Luis85 commented May 9, 2026

Summary

  • build-claude-plugin.ts was copying .claude/commands/specorator/ as-is, so the plugin's namespace prefix turned specorator/init.md into /specorator:specorator:init
  • Added commandsRemapRel function that strips the leading specorator/ path segment at build time only (in-repo layout unchanged)
  • Applied the same remapping in mapSourceTargetToPlugin to keep markdown link rewriting consistent
  • All other command namespaces (spec/, discovery/, adr/, etc.) unaffected

Closes #417

Test plan

  • npm run build:claude-plugin succeeds
  • claude-plugin/specorator/commands/specorator/ folder absent after build
  • claude-plugin/specorator/commands/init.md exists (remapped from specorator/init.md)
  • claude-plugin/specorator/commands/spec/ and all other namespaces intact
  • npm run check:claude-plugin passes

🤖 Generated with Claude Code

commands/specorator/init.md was copied as-is into the plugin, so Claude
Code's namespace prefix produced /specorator:specorator:init instead of
/specorator:init. Add commandsRemapRel to strip the leading specorator/
path segment at build time only; in-repo commands are unchanged. Apply
the same remapping in mapSourceTargetToPlugin so markdown link rewriting
stays consistent. check:claude-plugin passes. Closes #417.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Luis85 Luis85 force-pushed the worktree-fix+plugin-double-namespace-417 branch from 3343370 to fb976bf Compare May 9, 2026 17:23
@Luis85 Luis85 merged commit f77f6a1 into develop May 9, 2026
6 checks passed
@Luis85 Luis85 deleted the worktree-fix+plugin-double-namespace-417 branch May 9, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: plugin install produces double-namespaced commands (/specorator:specorator:init instead of /specorator:init)

2 participants