Agent Dispatch
The router behind /agent. Turns a subcommand into the right action and delegates. Contains no logic of its own — delegates to agent-architecture-audit, agent-config-audit, agent-folder-init, and setup-agent-routing.
Composition Boundary
Run only the selected mode. Pass the user's target, authorized actions, and
report-only restrictions to the engine. Existing explicit approval satisfies
that engine's gate for the same scope; obtain approval for missing or expanded
authority. Delegation never grants new host, provider, cost, publication, or
production permissions. An empty or advisory mode starts no mutating workflow.
Contract
Inputs:
- A single argument string (may be empty) parsed into a
mode.
Outputs:
- For
audit: a severity-ranked findings report diagnosing LLM wrapper and agent
failures, with a layer-by-layer fix plan.
- For
config: an audit report covering AGENTS.override.md, AGENTS.md,
configured fallbacks, CLAUDE.md, .cursorrules, hooks, and settings, with
proposed fixes.
- For
init: a scaffolded .agents/ folder structure plus root agent entry
files, with a summary of files created versus skipped.
- For
route: a drafted ## Agent skills routing block in CLAUDE.md/AGENTS.md
and seeded docs/agents/ reference files.
- For (empty): a one-line domain status summary and the Usage block.
Creates/Modifies:
- Nothing directly. The delegated skill performs any mutation behind its own
confirmation gate.
External Side Effects:
- None by default. The delegated skills may read git remotes,
gh APIs, or
workspace files when resolving routing state.
Confirmation Required:
- This skill is explicit-invoke only (
disable-model-invocation). Each delegated
skill owns its own confirmation gate before writing files or changing config.
This router does not relax them.
Delegates To:
agent-architecture-audit for audit (diagnose LLM and agent wrapper failures).
agent-config-audit for config (audit and sync agent config files).
agent-folder-init for init (scaffold or repair the .agents/ folder).
setup-agent-routing for route (write the dev-loop routing block).
Step 1 — Parse the Subcommand
Resolve the raw argument into a mode.
| Argument |
Mode |
Delegates to |
| (empty) |
status |
none — print a one-line domain summary + Usage block |
audit |
audit |
agent-architecture-audit |
config |
config |
agent-config-audit |
init |
init |
agent-folder-init |
route |
route |
setup-agent-routing |
If the argument matches none of these, report the unrecognized input and print
the Usage block — do not guess a mode.
Step 2 — Route
- status → print a one-line summary of the agent domain (no mutation), then
show the Usage block.
- audit → apply the
agent-architecture-audit skill.
- config → apply the
agent-config-audit skill.
- init → apply the
agent-folder-init skill.
- route → apply the
setup-agent-routing skill.
Usage
/agent # status: one-line domain summary + usage
/agent audit # diagnose LLM wrapper regressions, prompt/memory contamination, tool discipline failures
/agent config # audit and sync AGENTS.md, overrides, fallbacks, CLAUDE.md, hooks, and settings
/agent init # scaffold or repair the .agents/ folder and root agent entry files for a repo
/agent route # write the ## Agent skills routing block in CLAUDE.md/AGENTS.md + docs/agents/
Anti-Patterns
- Re-implementing logic here. All domain logic belongs in the routed skill.
- Guessing on an unknown argument. Print Usage instead — a wrong guess could overwrite config or scaffold into the wrong directory.
- Skipping the delegated skill's confirmation gate. Each routed skill controls its own writes.
- Auto-running a mutating sub-skill on an empty argument. The default mode prints status only; it never initiates a write.
1---
2name: agent-dispatch
3description: >-
4 Single front door for agent/subagent architecture, config, and setup. Parses a
5 subcommand — audit, config, init, or route — and routes to the right engine:
6 agent-architecture-audit (diagnose LLM wrapper and agent failures),
7 agent-config-audit (audit and sync AI agent config files across workspaces),
8 agent-folder-init (add or repair .agents/ project context for a repo), or
9 setup-agent-routing (write a machine-readable routing block in CLAUDE.md/AGENTS.md).
10 Backs the /agent command. Use when asked to audit an agent system, check config
11 drift, initialize agent docs, or wire up routing, and the action must be picked
12 from an argument like "audit", "config", "init", or "route".
13metadata:
14 version: "1.1.1"
15 tags: "agents, dispatcher, architecture, config, setup, routing, orchestration"
16 author: Ship Shit Dev
17when_to_use: "/agent, agent audit, config audit, init agent folder, setup agent routing, audit LLM wrappers, check agent config drift, add .agents/ folder, wire up dev-loop routing"
18disable-model-invocation: true
19---
20
21# Agent Dispatch
22
23The router behind `/agent`. Turns a subcommand into the right action and delegates. Contains no logic of its own — delegates to `agent-architecture-audit`, `agent-config-audit`, `agent-folder-init`, and `setup-agent-routing`.
24
25## Composition Boundary
26
27Run only the selected mode. Pass the user's target, authorized actions, and
28report-only restrictions to the engine. Existing explicit approval satisfies
29that engine's gate for the same scope; obtain approval for missing or expanded
30authority. Delegation never grants new host, provider, cost, publication, or
31production permissions. An empty or advisory mode starts no mutating workflow.
32
33## Contract
34
35Inputs:
36
37- A single argument string (may be empty) parsed into a `mode`.
38
39Outputs:
40
41- For `audit`: a severity-ranked findings report diagnosing LLM wrapper and agent
42 failures, with a layer-by-layer fix plan.
43- For `config`: an audit report covering AGENTS.override.md, AGENTS.md,
44 configured fallbacks, CLAUDE.md, .cursorrules, hooks, and settings, with
45 proposed fixes.
46- For `init`: a scaffolded `.agents/` folder structure plus root agent entry
47 files, with a summary of files created versus skipped.
48- For `route`: a drafted `## Agent skills` routing block in CLAUDE.md/AGENTS.md
49 and seeded `docs/agents/` reference files.
50- For _(empty)_: a one-line domain status summary and the Usage block.
51
52Creates/Modifies:
53
54- Nothing directly. The delegated skill performs any mutation behind its own
55 confirmation gate.
56
57External Side Effects:
58
59- None by default. The delegated skills may read git remotes, `gh` APIs, or
60 workspace files when resolving routing state.
61
62Confirmation Required:
63
64- This skill is explicit-invoke only (`disable-model-invocation`). Each delegated
65 skill owns its own confirmation gate before writing files or changing config.
66 This router does not relax them.
67
68Delegates To:
69
70- `agent-architecture-audit` for `audit` (diagnose LLM and agent wrapper failures).
71- `agent-config-audit` for `config` (audit and sync agent config files).
72- `agent-folder-init` for `init` (scaffold or repair the `.agents/` folder).
73- `setup-agent-routing` for `route` (write the dev-loop routing block).
74
75## Step 1 — Parse the Subcommand
76
77Resolve the raw argument into a `mode`.
78
79| Argument | Mode | Delegates to |
80|---|---|---|
81| _(empty)_ | `status` | none — print a one-line domain summary + Usage block |
82| `audit` | `audit` | `agent-architecture-audit` |
83| `config` | `config` | `agent-config-audit` |
84| `init` | `init` | `agent-folder-init` |
85| `route` | `route` | `setup-agent-routing` |
86
87If the argument matches none of these, report the unrecognized input and print
88the Usage block — do not guess a mode.
89
90## Step 2 — Route
91
92- **status →** print a one-line summary of the agent domain (no mutation), then
93 show the Usage block.
94- **audit →** apply the `agent-architecture-audit` skill.
95- **config →** apply the `agent-config-audit` skill.
96- **init →** apply the `agent-folder-init` skill.
97- **route →** apply the `setup-agent-routing` skill.
98
99## Usage
100
101```bash
102/agent # status: one-line domain summary + usage
103/agent audit # diagnose LLM wrapper regressions, prompt/memory contamination, tool discipline failures
104/agent config # audit and sync AGENTS.md, overrides, fallbacks, CLAUDE.md, hooks, and settings
105/agent init # scaffold or repair the .agents/ folder and root agent entry files for a repo
106/agent route # write the ## Agent skills routing block in CLAUDE.md/AGENTS.md + docs/agents/
107```
108
109## Anti-Patterns
110
111- **Re-implementing logic here.** All domain logic belongs in the routed skill.
112- **Guessing on an unknown argument.** Print Usage instead — a wrong guess could overwrite config or scaffold into the wrong directory.
113- **Skipping the delegated skill's confirmation gate.** Each routed skill controls its own writes.
114- **Auto-running a mutating sub-skill on an empty argument.** The default mode prints status only; it never initiates a write.