fix(commands): wire dispatch files to real sub-command names via Skill tool

All dispatch files referenced display names (e.g., `/doc audit`) that don't
correspond to real slash commands. Claude Code resolves commands by filename,
so `/doc audit` loads `doc.md` with $ARGUMENTS but never routes to `doc-audit.md`.

Changes:
- Updated 24 dispatch files with explicit Skill tool routing
- Added "Command to Invoke" column with plugin-prefixed names
- Added $ARGUMENTS matching for automatic routing
- RFC dispatch file uses inline handling (no separate command files)
- Updated COMMANDS-CHEATSHEET.md with invocation methods
- Updated MIGRATION-v9.md with command name mapping explanation

Affects: 25 dispatch files across 12 plugins (core, data, saas, ops, debug)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 21:04:24 -05:00
parent 93d93fcf09
commit 5bbcee06ac
27 changed files with 536 additions and 286 deletions

View File

@@ -7,20 +7,28 @@ description: Documentation management and drift detection — type /doc <action>
Documentation management, drift detection, and synchronization.
When invoked without a sub-command, display available actions and ask which to run.
When invoked without a sub-command or with `$ARGUMENTS`, handle as follows:
## Available Commands
| Command | Description |
|---------|-------------|
| `/doc audit` | Full documentation audit - scans for doc drift |
| `/doc sync` | Synchronize pending documentation updates |
| `/doc changelog-gen` | Generate changelog from conventional commits |
| `/doc coverage` | Documentation coverage metrics by function/class |
| `/doc stale-docs` | Flag documentation behind code changes |
| Action | Command to Invoke | Description |
|--------|-------------------|-------------|
| `audit` | `/doc-guardian:doc-audit` | Full documentation audit - scans for doc drift |
| `sync` | `/doc-guardian:doc-sync` | Synchronize pending documentation updates |
| `changelog-gen` | `/doc-guardian:doc-changelog-gen` | Generate changelog from conventional commits |
| `coverage` | `/doc-guardian:doc-coverage` | Documentation coverage metrics by function/class |
| `stale-docs` | `/doc-guardian:doc-stale-docs` | Flag documentation behind code changes |
## Workflow
## Routing
1. Display the table above
2. Ask: "Which command would you like to run?"
3. Route to the selected sub-command
If `$ARGUMENTS` is provided (e.g., user typed `/doc audit`):
1. Match the first word of `$ARGUMENTS` against the **Action** column above
2. **Invoke the corresponding command** from the "Command to Invoke" column using the Skill tool
3. Pass any remaining arguments to the invoked command
If no arguments provided:
1. Display the Available Commands table
2. Ask: "Which action would you like to run?"
3. When the user responds, invoke the matching command using the Skill tool
**Note:** Commands can also be invoked directly using their plugin-prefixed names (e.g., `/doc-guardian:doc-audit`)