Skip to main content
ClaudeWave
Skill606 estrellas del repoactualizado today

do

The `/do` command is a unified intent router that classifies user requests and automatically directs them to the appropriate tool within the Citadel harness, optimizing for cost and capability. Use `/do` when a user wants something accomplished but hasn't specified which tool handles it; avoid it when the destination tool is already known. It supports variants like `/do preview` to show routing without execution, `/do setup` for initial configuration, and `/do --list` to display available skills by category.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/SethGammon/Citadel /tmp/do && cp -r /tmp/do/skills/do ~/.claude/skills/do
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# /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 route, alternatives, boundary, and verification without executing |
| `/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. First match wins. Each tier is cheaper than the next.

### Step 0: Skill Registry Check (Cost: ~0 on hit | ~50 tokens on miss)

Before routing, check if new skills have been added since last registration.

1. Count installed Citadel skills (built-in from plugin + custom in project's `.claude/skills/`)
2. Read `registeredSkillCount` from `.claude/harness.json`
3. **If counts match**: continue to Tier 0. Zero cost.
4. **If counts differ** (or harness.json doesn't exist yet):
   a. Read the `registeredSkills` array from harness.json (default: `[]`)
   b. Diff skill names against the registered list
   c. For each unknown skill: read ONLY lines 1-10 of its `SKILL.md` (frontmatter)
   d. Extract `name` and `description` from frontmatter
   e. Add the skill to the Tier 2 keyword table for this session using its
      `name` and `description` words as match targets
   f. Log to the user: `"Discovered {N} new skill(s): {names}. Run /do setup to rebuild the registry and regenerate the routing table from skill frontmatter."`
   g. Update `registeredSkillCount` and `registeredSkills` array in harness.json

**This means:**
- 99% of invocations: one number comparison, zero file reads
- New skill dropped in: reads only the new frontmatter, routes immediately
- `/do setup` rebuilds the registry and runs `node scripts/generate-routing.js`, which regenerates the Tier 2 table below from each skill's `trigger_keywords` frontmatter

### Tier 0: Pattern Match (Cost: ~0 tokens | Latency: <1ms)

Regex/keyword on raw input. Catches trivial commands:

| Pattern | Action |
|---|---|
| "typecheck" or "type check" | Run the project's typecheck command |
| "build" | Run the project's build command |
| "test" or "tests" | Run the project's test command |
| "loop", "repeat until", "retry until", "until tests pass", "max attempts" | Run `/loop` for bounded foreground repetition |
| "status", "dashboard", "what's happening", "what's going on", "show activity" | Show full harness dashboard (/dashboard) |
| "next", "what should I do next", "fix harness state", "repair harness" | Run `node scripts/operator-console.js --run`; if it stops on a skill route or human-review action, report the boundary, risk, next command, and verification profile |
| "operator", "operator console", "what's up", "what should happen next", "approval capsule" | Run `node scripts/operator-console.js`; report the decision, boundary, artifact freshness, and verification profile |
| "preview route", "route preview", "dry run route", "what would /do do" | Run `node scripts/route-preview.js -- "<request>"`; report selected route, alternatives, boundary, and verification profile |
| "continue" or "keep going" | Run `node scripts/continue-action.js --run`; invoke the returned skill route if it prints `/archon continue` or `/fleet continue` |
| "setup" | Run `/do setup` first-run experience |
| "deliver <intake-file>" | Run `node scripts/deliver.js --intake <file>` to create an evidence-backed delivery campaign |
| "deliver intake" or "deliver next intake" | Run `node scripts/deliver.js --next` to create an evidence-backed delivery campaign from the highest-priority pending intake item |
| "package delivery" or "review package" | Run `node scripts/package-delivery.js <campaign-slug>` to create a local review handoff and update campaign evidence |
| "pr ready" or "ready for review" | Run `node scripts/pr-ready.js --pr <pull-request-url> --run-verification` to produce an approval-readiness handoff |
| "--list" or "list" | Show all available skills |
| "fix typo in X" or "rename X to Y" | Direct edit (no orchestrator needed) |
| "commit" | Stage and commit changes |
| "rollback", "undo phase", "restore checkpoint" | Find active campaign, read latest checkpoint ref, run git stash pop |

If matched → execute directly. Done.

### 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 t