- name
- do
- license
- MIT
- description
- Unified router that auto-routes user intent to the right direct action, skill, orchestrator, or explicit Operation Control plan. Classifies input by scope, complexity, persistence needs, and parallelism, then dispatches to the cheapest path that can handle it: direct command, skill, marshal, archon, or fleet. Single entry point for all work.
- user-invocable
- true
- auto-trigger
- false
- trigger_keywords
- ["route this","which tool","auto-route","unified router"]
- last-updated
- 2026-07-31T00:00:00.000Z
# /do — Unified Intent Router
## Orientation
Use `/do` when the user wants something done but doesn't know (or care) which tool handles it.
**Don't use when:** you know the destination — invoke /marshal, /archon, /fleet, or any skill directly.
## Commands
| Command | Behavior |
|---|---|
| `/do [anything]` | Classify intent, route to cheapest capable path |
| `/do status` | Show full harness dashboard (/dashboard) |
| `/do next` | Run the decision-first operator console for the next useful harness action |
| `/do operator` | Show the operator console without executing repairs |
| `/do preview <request>` | Show exact resolution or generated candidates and their boundary without executing |
| `/do --route /skill -- <request>` | Use an explicit validated route without bypassing activation or safety boundaries |
| `/do continue` | Resolve and run the deterministic continuation action |
| `/do --list` | Show all skills grouped by category with trigger keywords |
| `/do setup` | First-run experience — configure the harness for this project |
## Protocol
Classification runs top-to-bottom. Exact commands resolve first. Natural-language requests use keyword matches only as candidate evidence for semantic classification.
### Step 0: Skill Registry Check (Cost: ~0 on hit | ~50 tokens on miss)
Compare installed skill directories with `core/skills/routing-table.json`. If they
match, continue without reading skill bodies. For each unknown skill, read only
its frontmatter and use `name`, `description`, and `trigger_keywords` as session-local Tier 2 match targets, then report:
`"Discovered {N} new skill(s): {names}. Run /do setup to regenerate routing."`
Do not write registration fields into `harness.json`; schema-v2 config is exact and generated routing is a projection, not config authority.
### Tier 0: Exact Command Match (Cost: ~0 tokens | Latency: <1ms)
Normalize case, apostrophes, and whitespace, then compare the **entire input**.
Never match a Tier 0 command because its word appears inside a larger request.
<!-- BEGIN GENERATED: exact-command-table -->
| Exact normalized input | Action |
|---|---|
| "status", "dashboard", "what's happening", "what's going on", "show activity" | `node scripts/dashboard.js` |
| "next", "what should i do next", "fix harness state", "repair harness" | `node scripts/operator-console.js --run` |
| "operator", "operator console", "approval capsule", "what's up", "what should happen next" | `node scripts/operator-console.js` |
| "continue", "keep going" | `node scripts/continue-action.js --run` |
| "setup", "first run", "configure harness" | `/do setup` |
| "setup --express" | `/do setup --express` |
| "--list", "list", "list skills" | `/do --list` |
| "test", "tests", "run test", "run tests" | `npm run test` only when `package.json#scripts.test` exists; otherwise non-final |
| "build", "run build" | `npm run build` only when `package.json#scripts.build` exists; otherwise non-final |
| "typecheck", "type check", "run typecheck", "run type check" | `npm run typecheck` only when `package.json#scripts.typecheck` exists; otherwise non-final |
<!-- END GENERATED: exact-command-table -->
`/do preview <request>` strips the `preview` wrapper and reuses the shared exact command and built-in candidate preflight. It does **not** inspect Tier 1 active state,
discover project-local custom skills, or run the Tier 3 LLM classifier. Therefore every natural-language preview is non-final, has no command, and stops at
`semantic-classification-required`. `/do --route /skill -- <request>` passes the requested route through `scripts/route-preview.js --route`; an unknown route is rejected,
and a valid override still goes through activation, worktree, and approval boundaries.
If the whole input matches an exact command, execute it and stop. The `test`, `build`, and `typecheck` commands are final only when the target project's
`package.json` declares the corresponding non-empty script. Otherwise they remain non-executable. Do not execute a command merely because its word appears inside a larger request; continue to active-state and semantic routing.
### Tier 1: Active State Short-Circuit (Cost: ~0 tokens | Latency: <100ms)
Check for active campaigns or fleet sessions that match the input scope:
0. For input exactly equivalent to `continue`, first run:
```bash
node scripts/continue-action.js --run
```
- If it executes a local command such as `node scripts/package-delivery.js <slug>`, report the output and stop.
- If it returns `/archon continue`, invoke `/archon continue`.
- If it returns `/fleet continue`, invoke `/fleet continue`.
- If it returns no command, output "No active campaign or fleet session found. Nothing to continue."
1. Read `.planning/campaigns/` for files with `Status: active` or `status: active` in frontmatter
2. Read `.planning/fleet/` for session files with `status: active` or `needs-continue`
3. **Review-package campaigns:** if the campaign status is `needs-review-package`
or its `review-package` Exit Evidence row is pending while prior phases are
complete, route to `node scripts/package-delivery.js <slug>` before Archon.
4. **Improve campaigns (type: improve):** if the active campaign has `type: improve` in
frontmatter, route to `/improve {target} --continue` where `{target}` is the campaign's
`target` field. Do NOT route improve campaigns to archon -- improve is its own orchestrator.
5. If input scope matches a non-improve active campaign → `/archon continue`
6. If fleet session needs continuation → `/fleet continue`
7. If input mentions a campaign by name → resume it (check type field for routing)
8. **If input is "continue" but NO active campaign or fleet session found:**
- Output: "No active campaign or fleet session found. Nothing to continue."
- **If `.planning/daemon.json` exists with `status: "running"`:** the daemon spawned
this session but there's no work to do. Update daemon.json:
`status: "stopped"`, `stopReason: "no-active-work"`,
`stoppedAt: "{ISO timestamp}"`. Delete both triggers if IDs are present.
Output: "[daemon] Stopped -- no active campaign found. The work is done."
- Exit. Do NOT fall through to Tier 2 or 3.
If matched → resume the active work. Done.
### Tier 2: Skill Candidate Discovery (Cost: ~0 tokens | Latency: <10ms)
Match input against installed skill keywords from Citadel's built-in skills
and any project-level custom skills in `.claude/skills/`. These matches are
candidate evidence, never the final routing decision by themselves.
**Built-in skill triggers** (generated from each skill's `trigger_keywords` frontmatter; edit the frontmatter, then run `node scripts/generate-routing.js` to refresh this table):
<!-- BEGIN GENERATED: routing-table -->
| Input Contains | Route To | Product Bundle |
|---|---|---|
| "architect", "architecture", "design the system", "file structure", "plan the build" | `/architect` | `core` |
| "campaign", "multi-session", "phases" | `/archon` | `operations` |
| "ascii diagram", "ascii art", "box diagram", "architecture diagram", "flow diagram", "sequence diagram", "draw a diagram", "text diagram" | `/ascii-diagram` | `core` |
| "intake", "process pending", "pipeline" | `/autopilot` | `operations` |
| "cost", "costs", "cost breakdown", "campaign cost", "token usage", "burn rate", "model breakdown" | `/cost` | `persistence` |
| "create app", "build app", "build me", "make an app", "new app", "generate app", "add auth", "add payments", "integrate" | `/create-app` | `core` |
| "create skill", "new skill", "make a skill", "teach the harness", "custom skill", "my own skill", "skill for", "automate this pattern", "repeated pattern" | `/create-skill` | `core` |
| "daemon", "continuous", "run overnight", "keep running", "24/7", "unattended", "run autonomously", "daemon start", "daemon stop", "daemon status" | `/daemon` | `operations` |
| "dashboard", "what's happening", "what's going on", "show activity", "harness state", "show me status" | `/dashboard` | `persistence` |
| "decision map", "plan this out", "figure this out", "investigation plan", "planning map" | `/decision-map` | `persistence` |
| "deploy steward", "deploy queue", "merge steward", "mainline steward", "land prs", "land PRs", "deploy prs", "deploy PRs", "merge queue", "release train" | `/deploy-steward` | `delivery` |
| "design", "style guide", "design manifest", "visual consistency" | `/design` | `core` |
| "document", "docs", "docstring", "jsdoc", "readme", "api docs" | `/doc-gen` | `core` |
| "evolve", "sustained improve", "improvement director", "research-driven improve", "multi-cycle improve", "run until done", "improve until ceiling", "keep improving", "hypothesis", "belief model", "scout agents" | `/evolve` | `operations` |
| "experiment", "optimize", "try", "A/B", "measure" | `/experiment` | `operations` |
| "parallel", "simultaneous", "multiple agents", "at the same time" | `/fleet --quick` | `parallel` |
| "grill me", "grill", "stress-test the plan", "sharpen the plan", "pressure-test", "interview me" | `/grill` | `core` |
| "houseclean", "house clean", "disk space", "free space", "c drive full", "drive full", "running out of space", "clean up disk", "orphaned worktrees", "clean worktrees", "disk audit", "storage audit", "move to another drive", "free up space" | `/houseclean` | `core` |
| "improve", "improvement loop", "quality loop", "rubric", "score against", "run improvement", "improve citadel" | `/improve` | `operations` |
| "infra", "infrastructure", "what databases", "what systems", "docker-compose", "infra audit", "map infrastructure", "what does this connect to" | `/infra-audit` | `core` |
| "learn", "extract patterns", "learn from that", "save what worked", "patterns from campaign" | `/learn` | `persistence` |
| "preview", "screenshot", "visual check", "does it render" | `/live-preview` | `core` |
| "loop", "repeat until", "until tests pass", "until lint passes", "max attempts", "retry until" | `/loop` | `operations` |
| "map", "index codebase", "codebase map", "structural index", "scan codebase", "map stats", "map query" | `/map` | `core` |
| "orchestrate", "chain skills", "multi-step" | `/marshal` | `operations` |
| "merge review", "check merges", "any conflicts", "fleet conflicts", "pending branches", "safe to merge" | `/merge-review` | `parallel` |
| "organize", "directory structure", "folder structure", "project structure", "file organization", "organize directories", "organize files", "cleanup directories", "directory convention", "where should this go", "messy project" | `/organize` | `core` |
| "postmortem", "retro", "what broke", "what happened", "debrief" | `/postmortem` | `persistence` |
| "watch pr", "watch ci", "monitor pr", "fix ci", "ci failing", "pr failing", "auto-fix", "auto fix pr", "pr is red", "checks failing" | `/pr-watch` | `delivery` |
| "prd", "requirements", "spec", "plan an app", "design an app" | `/prd` | `core` |
| "qa", "test the app", "click through", "does it work", "browser test" | `/qa` | `core` |
| "refactor", "rename", "extract", "inline", "move file", "split file", "merge files" | `/refactor` | `core` |
| "research", "investigate", "look into", "find out", "research fleet", "parallel research", "multi-angle research", "compare options" | `/research` | `core` |
| "/review", "code review", "review this", "review PR", "review" | `/review` | `core` |
| "scaffold", "generate component", "generate module", "generate service", "new component", "new module", "new route", "new service", "create component", "stub out", "bootstrap" | `/scaffold` | `core` |
| "schedule", "recurring", "every N minutes", "cron", "set a reminder", "run periodically" | `/schedule` | `operations` |
| "handoff", "session summary" | `/session-handoff` | `persistence` |
View on GitHub