Other

/agent-routing

Enforce Cursor=gather, Codex=implement, Claude=orchestrate. Triggers: delegate, worker assignment, routing.

$ golems-cli skills install agent-routing
21 evals

Updated 5 days ago

Auto-dispatch triggers (canonical in orc/SKILL.md C4): batch reads ≥3, transcription ≥2, web research ≥1, or any "in parallel" / "all of these" phrasing → fan out sub-agents in the SAME message before asking permission.

"I want Cursor for gathering information, Codex to change stuff, and Claude's for orchestrating stuff and interacting with you. Look back in your context. We spoke about all of this. It's not new." — User, stated 5+ times across April 4, 2026, session (lines 4519, 5838, 5870, 4514, 3957)

This skill encodes the routing matrix that determines which CLI agent handles which type of work. It was violated in every collab session (March 29, April 3, April 4) despite being stated explicitly. The violations were always the same: Claude agents ignore their Cursor/Codex workers and do everything themselves, burning context on mechanical work.


🔥 THE ONE TRUE FLAG IS -s (read before dispatching any worker)

-s is the ONLY flag you need to dispatch a YOLO worker. It maps via repoGolem launcher to the correct CLI-specific bypass:

CLI-s maps to
Claude--dangerously-skip-permissions
Codex--dangerously-bypass-approvals-and-sandbox
Cursor--yolo --approve-mcps
Gemini--yolo
Kiro--trust-all-tools

The one-liner to dispatch ANY worker:

brainlayerCursor -s "one-sentence task prompt here"     # gather / read-only
brainlayerCodex  -s "one-sentence task prompt here"     # implement

That is it. No cd, no MCP_CONNECTION_NONBLOCKING=1, no CLAUDE_CODE_NO_FLICKER=1, no source ~/.zshrc &&, no raw cursor/codex. The launcher already does cd + env-vars + iTerm profile + MCP wiring + 1Password secrets + tab title.

--fast is not a repoGolem routing flag. Do not use it. For visible cmux pane workers, use -s only. If an internal ephemeral subagent genuinely needs Spark, request the model explicitly with -m gpt-5.3-codex-spark or the equivalent model field.

Pre-dispatch checklist (run before spawning any worker):

  • Am I about to write cd ~/Gits/…? → STOP. Use {repo}{Tool} -s instead.
  • Am I about to write MCP_CONNECTION_NONBLOCKING=1 or CLAUDE_CODE_NO_FLICKER=1? → STOP. Launcher already exports both.
  • Am I about to call cursor agent or codex or claude directly? → STOP. Use the {repo}{Tool} launcher.
  • Am I about to use --fast? → STOP. Use -s (one-true-flag).

Verification tip (Codex lies about its own model). Codex's text responses always say "gpt-5.4" regardless of the actual model running. To confirm which model actually ran, check session metadata and read the "model" field directly:

# Source of truth: session metadata's model field
grep -h -E '"model":' ~/.codex/sessions/$(date +%Y/%m/%d)/*.jsonl | sort -u
 
# Per-session sanity check
for f in ~/.codex/sessions/$(date +%Y/%m/%d)/*.jsonl; do
  echo "=== $(basename "$f") ==="
  grep -o '"model":"[^"]*"' "$f" | head -1
done
  • "model":"gpt-5.3-codex-spark" → Spark dispatch succeeded ✅
  • "model":"gpt-5.5" (or "gpt-5.5-codex") → current main pool ✅
  • "model":"gpt-5.4" → previous main pool (pre-2026-04-23 sessions)
  • "model":"gpt-5.4-mini" / "gpt-5.5-mini" → fallback tier

THE ROUTING MATRIX (non-negotiable)

ToolRoleWhat It DoesWhat It NEVER Does
CursorData gatheringSQL queries, file scanning, codebase search, grep, read-only lookups, audit scansCode changes, implementations, PRs, decisions
CodexImplementationCode changes, bug fixes, refactoring, test writing, PRsResearch, data gathering, orchestration
Gemini (CLI)Visual heavy-liftFrame batches, OCR, image-heavy /qa-video work, screenshot review, visual UI critiqueCodebase changes, multi-file refactors, long human-fluid sessions
ClaudeOrchestrationCoordination, user interaction, decisions, synthesis, BrainLayer queries, monitoring, long human-fluid sessionsSQL queries, bulk file reads, code implementation, bulk image reads

The boundary is hard. A Claude agent that runs sqlite3 or writes implementation code is violating this matrix. A Cursor agent that makes code changes is violating it. The only exception is trivial (<5 line) edits where spawning a worker costs more context than the edit itself.

LEAD TOPOLOGY — delegate to Codex-xhigh + own your monitor loop (2026-06-05, gen-10 weave #26)

"that's exactly why we use Codex on xhigh" / "Leads should be looping and monitoring just like you." — operator, gen-10 window (paraphrased; red-team verified ✅RT)

Domain LEADs (brainlayerClaude, voicelayerClaude, phx-LEAD, skillCreatorClaude, …) are orchestrators one tier down from orc. The same routing matrix applies to them:

  1. LEADs delegate implementation to Codex on xhigh reasoning. A LEAD writing implementation code itself while its Codex worker idles is the same AP1/AP4 violation orc commits — one tier down.
  2. EVERY dispatching agent owns its OWN monitor loop. orc's fleet monitor does NOT absolve a LEAD. If you dispatched a worker, YOU run the /loop or cron watching it. Delegate ≠ fire-and-forget. Evidence: gen-9 Angle-A codex stalled silently for a full round because the LEAD assumed orc was watching (collab:347 standing correction, re-violated by gen-11 → this rule).
  3. Leads loop only on their workers — not on orc, not on the user, not on sibling leads. One loop per dispatched worker, deleted when the worker completes (orc REF9).
  4. Inter-agent comms go through metacommlayer collabs (dispatch_to_agent / inbox_check + collab files), not ad-hoc cmux text sends.
  5. A lead goal is an orchestration goal. It must say to spawn/delegate Cursor gatherers, Codex implementers, or cmux workers as needed; maintain health gates; synthesize; and verify. It must not turn the lead into the worker grinding the whole lane, except tiny glue or urgent unblockers.
  6. Lead topology is managed. A lead must be a managed agent_id with role:"orchestrator" and left-column placement. A worker/right-pane surface renamed to "LEAD", an orphan/raw surface, or a pane in a generic cwd is not a valid production lead.