Skip to content

fix: enable router invocation of workflow commands#145

Merged
sjnims merged 1 commit intomainfrom
fix/143-start-router-invocation
Dec 13, 2025
Merged

fix: enable router invocation of workflow commands#145
sjnims merged 1 commit intomainfrom
fix/143-start-router-invocation

Conversation

@sjnims
Copy link
Owner

@sjnims sjnims commented Dec 13, 2025

Summary

Enable the /plugin-dev:start router command to successfully invoke child workflows by removing disable-model-invocation: true from target commands.

Problem

Fixes #143

The /plugin-dev:start router uses SlashCommand tool to invoke child workflows (/plugin-dev:create-plugin or /plugin-dev:create-marketplace). However, both target commands had disable-model-invocation: true set, which per official documentation blocks programmatic invocation via the SlashCommand tool.

Solution

Apply the correct protection pattern:

  • Entry point (start.md) has disable-model-invocation: true
  • Child commands are invocable internally via SlashCommand tool

Removed disable-model-invocation: true from both child commands to allow the router pattern to work.

Alternatives Considered

  1. Remove router entirely: Would lose the user-friendly entry point that helps new users choose the right workflow
  2. Direct user to manually invoke commands: Poor UX - defeats the purpose of having a guided router
  3. Remove all disable-model-invocation flags: Would lose protection on the entry point

Changes

  • plugins/plugin-dev/commands/create-plugin.md: Remove disable-model-invocation: true
  • plugins/plugin-dev/commands/create-marketplace.md: Remove disable-model-invocation: true
  • plugins/plugin-dev/commands/start.md: Add new router command (was untracked)
  • CLAUDE.md: Document the new /plugin-dev:start command
  • README.md: Document the new entry point workflow

Testing

  • Markdownlint passes
  • Verified frontmatter structure is valid
  • Manual test: Load plugin and run /plugin-dev:start, select plugin → should invoke create-plugin
  • Manual test: Load plugin and run /plugin-dev:start, select marketplace → should invoke create-marketplace

🤖 Generated with Claude Code

The /plugin-dev:start router command uses SlashCommand tool to invoke
child workflows, but both target commands had disable-model-invocation: true
which blocked programmatic invocation.

- Remove disable-model-invocation from create-plugin.md
- Remove disable-model-invocation from create-marketplace.md
- Add start.md router command (new entry point)
- Document /plugin-dev:start in CLAUDE.md and README.md

The protection pattern: entry point (start.md) has disable-model-invocation,
child commands are invocable internally via SlashCommand tool.

Fixes #143

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link

claude bot commented Dec 13, 2025

Claude finished @sjnims's task in 1m 26s —— View job


PR Review: Fix Router Invocation of Workflow Commands

Summary

This PR looks good and is ready to merge.

The fix correctly addresses issue #143 by removing disable-model-invocation: true from child workflow commands while keeping it on the entry point router command. This enables the intended routing pattern while maintaining protection against unintended model invocations at the entry point.


What's Good

  1. Correct Fix Pattern: The solution properly implements the router pattern:

    • Entry point (start.md) has disable-model-invocation: true to prevent programmatic invocation ✅
    • Child commands (create-plugin.md, create-marketplace.md) are invocable via SlashCommand tool ✅
    • This aligns with the official documentation on disable-model-invocation
  2. Well-Structured Router Command: The new start.md command is excellent:

    • Clear, user-friendly welcome experience
    • Good use of AskUserQuestion tool for guided choice
    • Smart argument handling (analyzes intent, suggests path, confirms before routing)
    • Comprehensive examples covering different scenarios
    • Appropriate tool restrictions (AskUserQuestion, SlashCommand, TodoWrite only)
  3. Proper Documentation Updates: Both CLAUDE.md and README.md updated:

    • CLAUDE.md: Added workflow section documenting /plugin-dev:start in the right place
    • README.md: Restructured Quick Start to emphasize the new entry point
    • Clear guidance on when to use the router vs direct workflows
  4. Markdown Quality: All markdown files pass markdownlint with no errors ✅

  5. Frontmatter Structure: All command frontmatter is valid:

    • Required fields present (description)
    • Proper allowed-tools restrictions
    • Appropriate model selection (sonnet)
    • Correct use of disable-model-invocation flag

Minor Suggestions

  1. Testing Checklist in PR Body: The PR body shows manual tests as incomplete:

    • Manual test: Load plugin and run /plugin-dev:start, select plugin → should invoke create-plugin
    • Manual test: Load plugin and run /plugin-dev:start, select marketplace → should invoke create-marketplace

    These should be tested before merging to confirm the fix actually works as expected.

  2. Router Command File Location: Consider mentioning in the commit message or PR description that start.md was previously untracked (now added). This helps reviewers understand it's a new file, not just a modification.


Alternatives Analysis

The PR body does a good job evaluating alternatives. The chosen solution is the most appropriate:

  • ✅ Maintains user-friendly entry point
  • ✅ Enables programmatic routing
  • ✅ Preserves protection where needed
  • ❌ Removing router would hurt UX
  • ❌ Manual invocation defeats purpose
  • ❌ Removing all flags would lose protection

Checklist Verification

From CLAUDE.md plugin component criteria:

Commands (commands/*.md):

  • YAML frontmatter has required fields (description) ✅
  • allowed-tools specified appropriately ✅
  • Imperative voice in command body ✅
  • disable-model-invocation used correctly (only on entry point) ✅

Markdown Linting:

  • All files pass markdownlint ✅
  • ATX-style headers ✅
  • Dash-style lists ✅
  • Proper code blocks ✅

Documentation:

  • README.md updated for user-facing changes ✅
  • CLAUDE.md updated with workflow documentation ✅

Recommendation

Approve and merge after completing the manual testing checklist to verify the router actually invokes the child commands correctly.

The implementation is solid, documentation is thorough, and the fix addresses the root cause properly.


@sjnims sjnims self-assigned this Dec 13, 2025
@claude claude bot added bug Something isn't working component:command Commands layer component:docs Documentation files effort:small < 1 hour labels Dec 13, 2025
@sjnims sjnims merged commit bb3200f into main Dec 13, 2025
9 checks passed
@sjnims sjnims deleted the fix/143-start-router-invocation branch December 13, 2025 00:41
@sjnims sjnims mentioned this pull request Dec 13, 2025
4 tasks
sjnims added a commit that referenced this pull request Dec 13, 2025
## Summary

- Version bump to v0.2.0
- Update version in plugin.json, marketplace.json, and CLAUDE.md
- Add CHANGELOG entry for v0.2.0 release

## What's in v0.2.0

### Added
- **`/plugin-dev:start` command** - New primary entry point that guides
users to choose between creating a plugin or marketplace (#145)

### Fixed
- Enable router invocation of workflow commands (#145)
- Replace `!` with `[BANG]` placeholder in skill documentation (#142)

### Documentation
- Fix component counts and update documentation accuracy

## Checklist
- [x] Version updated in plugin.json, marketplace.json, CLAUDE.md
- [x] CHANGELOG.md updated with release notes
- [x] Markdownlint passes
- [x] Version consistency verified

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working component:command Commands layer component:docs Documentation files effort:small < 1 hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: /plugin-dev:start router cannot invoke target workflows due to disable-model-invocation

1 participant

Comments