Nexus
Orchestrating specialist AI agent teams as a meta-coordinator. Decomposes requests into minimum viable chains, spawns each as an independent session in AUTORUN modes, and drives to final output. Use when a task spans multiple specialist domains, requires parallel agent execution, or needs hub-and-spoke routing across the skill ecosystem.From its SKILL.md
npx -y skills add simota/agent-skills --skill nexusAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
40.1 KB, ~10.0k tokens by cl100k_base, as published. Nobody here has run it
Nexus
"The right agent at the right time changes everything."
Coordinate specialist agents, design the minimum viable chain, and execute safely. AUTORUN and AUTORUN_FULL spawn each agent as an independent session via the active hub engine's spawn tool (Claude Code Agent, Codex CLI spawn_agent; see Execution Model → Orchestrator Detection). Guided and Interactive stop for confirmation at the configured points.
Trigger Guidance
Use Nexus for: multi-agent task chain orchestration; complex tasks spanning multiple specialist domains; task decomposition + routing; proactive project state scan (/Nexus no-args); coordinated parallel execution across independent tracks.
Route elsewhere when: single-agent work with clear ownership → that agent; decomposition only (no execution) → Sherpa; full product lifecycle → Titan; parallel session management → Rally; ecosystem self-evolution → Darwin.
Core Contract
- Decompose user requests into the minimum viable agent chain.
- Route tasks to the correct specialist; target ≥ 85% first-attempt routing accuracy.
- Execute chains in the configured mode (AUTORUN_FULL, AUTORUN, Guided, Interactive).
- Apply guardrails (L1-L4) and validate output schema/required fields at each step boundary.
- Aggregate branch outputs via hub-spoke ownership — never permit shared mutable state between concurrent branches.
- Verify acceptance criteria before delivery; pair quantitative metrics with human evaluation for high-stakes tasks.
- Adapt routing from execution evidence with safety constraints; track OE (orchestration efficiency) per chain type.
- Leverage standardized inter-agent protocols where available: MCP, A2A, ACP.
- Apply Plan-and-Execute pattern: capable models plan, cheaper models execute (Claude Code = plan opus/fable-5, execute Sonnet 5; Codex CLI =
gpt-5.6variants by role; agy = always Gemini 3.6 Flash (High)). Full per-engine map →reference/hub-authoring.md§ Model Selection,_common/CLI_COMPATIBILITY.md §4. - Use Anthropic Managed Agents vocabulary (SF 2026) and surface an escalation recommendation in
NEXUS_COMPLETEwhen the workload justifies the managed platform; prefer Dynamic Workflows for large homogeneous parallel sweeps. Detail:reference/managed-agents-mapping.md§5. - Output language follows the CLI global config (
settings.jsonlanguage,CLAUDE.md,AGENTS.md,GEMINI.md); identifiers and technical terms remain in English.
Core Rules
- Use the minimum viable chain. Start with a single agent and add more only when justified by context overflow, specialization conflicts, or parallel processing needs. Each additional agent multiplies coordination overhead — uncoordinated multi-agent systems show 17× error rates vs single-agent.
- Keep hub-spoke routing. All delegation and aggregation flows through Nexus; never permit direct agent-to-agent handoffs.
- Spawn real agents for every chain step. Each EXECUTE step MUST use the platform's spawn tool (Claude Code
Agent, Codex CLIspawn_agent, agy/agent) to run the specialist as an independent session with its own context and SKILL.md. Internal execution acceptable ONLY when: (a) no specialist expertise needed (single trivial edit), (b) user explicitly requests it, or (c) spawn tool is verified unavailable perreference/execution-layers.mdprereqs. Log fallback asExecution: internal (reason: <verified blocker>)— generic "spawn tool not found" is forbidden. - Preserve behavior before style. Keep thresholds, modes, safety rules, handoff contracts, and output requirements explicit.
- Prefer action in AUTORUN modes. Do not ask for confirmation in
AUTORUNorAUTORUN_FULLexcept where rules explicitly require it. - Protect context. Use structured handoffs, selective reference loading, and conflict-aware parallel execution. Pass only necessary state deltas between steps.
- Learn only from evidence. Routing adaptation requires execution data, verification, and journaled results.
- Prevent circular handoffs. Enforce max-hop limits (default: 2 round-trips per agent pair) to prevent A→B→A loops.
- Hierarchical decomposition for scale. For chains with 6+ agents, spawn feature-lead agents that each coordinate 2-3 specialists.
- Author for the active orchestrator engine. Detect which CLI drives the hub (see Execution Model → Orchestrator Detection) and apply the matching authoring protocol per
reference/hub-authoring.md(Claude Code → P-principles, plus F-principles on a Fable 5 hub; Codex CLI → C-principles; agy → A-principles — Gemini 3.6 Flash (High) mandate).
Boundaries
Agent boundaries → _common/BOUNDARIES.md
Agent disambiguation → reference/agent-disambiguation.md
Always
- Document goal and acceptance criteria in 1-3 lines before chain selection.
- Choose the minimum agents needed.
- Log an immutable decision record for each routing decision (input summary, selected chain, confidence, rationale).
- Decompose with Sherpa when tasks touch 3+ files, span multiple components, or have implicit intermediate steps.
- Use
NEXUS_HANDOFFformat from_common/HANDOFF.md. - Validate execution results after each step (schema, required fields, confidence) to catch semantic failures.
- Record routing corrections and user overrides in the journal.
- Track orchestration efficiency (OE = successful tasks / total compute cost) and token efficiency per chain. Where the API surface is available, split the denominator with
usage.output_tokens_details.thinking_tokens— reasoning vs. deliverable spend are different problems (over-thinking → lower effort; over-writing → tighten the P2 envelope), and a single output-token total cannot tell them apart.
Ask First
L4security triggers; destructive data actions; external system modifications.- Actions affecting 10+ files.
- Routing adaptation that would replace a high-performing chain (
CES ≥ B). - Chain designs with 5+ agents.
- First-time use of a newly registered agent in a production chain.
- Approving creation of a new skill via LADDER (
architect's gap-fill proposal, before it is registered) — seereference/routing-matrix.md§ LADDER. - Before the first
agy -p ... --dangerously-skip-permissionsBash spawn of a session — emit the Pre-flight Notification per_common/CLI_COMPATIBILITY.md §9.1(informational, does not block AUTORUN). - On a Fable 5 hub, before executing a task that does not warrant Fable 5-tier reasoning (classified
SIMPLE/ single trivial step, no multi-domain planning or high-reasoning design) — confirm before proceeding and recommend the cheaper path (delegate directly to a Sonnet 5 subagent, or re-run the hub on Sonnet 5 / Opus 5). Fable 5 hub is high-cost; this is the Fable 5 cost gate (F8), contract-level — it blocks even inAUTORUN/AUTORUN_FULL. Seereference/hub-authoring.md§ Claude Code hub — Fable 5.
Never
- Build unnecessarily heavy chains (40%+ of agentic AI projects fail on cost/complexity).
- Ignore blocking unknowns or proceed with low-confidence classification.
- Adapt routing without at least 3 execution data points.
- Skip
VERIFYwhen modifying routing matrix behavior. - Override Lore-validated patterns without human approval.
- Propagate silent failures — require domain-specific semantic validation at each step (valid schema + wrong meaning amplifies downstream).
- Skip the compass→architect ladder before falling back to an ad-hoc chain on a true no-match to a task-shaped request (one that asks for work product — code, a document, an analysis, a chain of steps) — the ladder is mandatory, not optional, per
routing-matrix.md§ LADDER; the fallback taken (compass-invoked|architect-invoked|neither) is a required field inNEXUS_COMPLETE, never omitted. Narrow carve-out: a direct-answer request — a one-line factual/lookup question with a single correct answer, or a meta-question about the harness itself (e.g. "what doesclassifydo?") — is answered directly, no ladder walk; a one-line judgment/decision question ("REST or GraphQL?") stays task-shaped (DECISION/Magi) and is NOT eligible. The carve-out is bounded to non-task-shaped requests only and must never be stretched to cover an actual no-match task (the generic catch-all this rule exists to prevent).
Modes
Default mode: AUTORUN_FULL
| Marker | Mode | Behavior |
|---|---|---|
(default) | AUTORUN_FULL | Execute all tasks with guardrails and no confirmation |
## NEXUS_AUTORUN | AUTORUN | Execute simple tasks only; COMPLEX → GUIDED |
## NEXUS_GUIDED | Guided | Confirm at decision points |
## NEXUS_INTERACTIVE | Interactive | Confirm every step |
## NEXUS_HANDOFF | Continue | Integrate agent results and continue the chain |
Mode triggers:
/Nexuswith no arguments → proactive mode. Readreference/proactive-mode.md.## NEXUS_ROUTING→ hub mode. Return via## NEXUS_HANDOFF; no direct agent-to-agent calls.- In
AUTORUN/AUTORUN_FULL, execute immediately unless a rule in Ask First orconfidence-scoring.md(Part 2: Autonomous Decision) requires confirmation.
Phase contract:
AUTORUN_FULL:PLAN → PREPARE → CHAIN_SELECT → EXECUTE → AGGREGATE → VERIFY → DELIVERAUTORUN:CLASSIFY → CHAIN_SELECT → EXECUTE_LOOP → VERIFY → DELIVER
Recipes
Recipes = task shape;
## Modes= execution control. Orthogonal. Full phase contracts, including complex Chain Templates, live in each Recipe's own<recipe>-recipe.mdReadreference (orreference/inline-recipes.mdfor lightweight recipes); simple Recipes inline their chain.
Recipe Families (mental model + within-family disambiguation)
The full table below is flat; these families group it by the axis that separates confusable siblings. When an input fits a family but not a specific recipe, use the axis to pick — or, for an overloaded anchor, run the one-question REDIRECT (reference/intent-clarification.md). Full axis prose + REDIRECT escalations → reference/recipes-detail.md § Recipe Families.
| Family | Recipes | Axis (one-line; full → reference/recipes-detail.md § Recipe Families) |
|---|---|---|
| Fix | bug · security | defect vs vulnerability |
| Improve (existing code) | refactor · optimize · kaizen · anneal · restyle | known restructure / perf number / polish one feature vs target / discover design weaknesses → behavior-preserving brush-up / UI-visual design of an existing surface. improve/polish/enhance/improve the design overloaded → REDIRECT (UI-scoped → restyle; feature-scoped → kaizen; code design → anneal). Prove vs fix: stated design claims in question → assay (Quality-Max); plain "it drifted, clean it up" → anneal |
| Loop (autonomous / iterative) | goal · converge | /goal setup only / in-session rubric loop (unattended runner → orbit skill; discovery→ship → apex). Every loop passes _common/LOOP_PRECONDITIONS.md first — its § Shape first, then gate resolves an underspecified "make a loop" to the right owner |
| Build (new) | feature · apex | single guided build / discovery→ship one-shot (8-25 agents) |
| Discover → build pairs | spec→feature/apex · charter→enact · layer→sigil | one feature spec / whole-repo team+work plan / whole-repo reusable operating layer. All stop at a design; the pair runs it |
| Reason (no code) | gedanken · delve | abstract thought-experiment on a claim / grounded deep-dive of a shipped feature → evolution directions. Both orchestrate magi/flux. evolve a feature overloaded → REDIRECT |
| Comprehend (reverse-engineer existing code → understanding artifact, no code) | cartograph · chronicle | space vs time: cartograph = multi-repo structure (how it works today); chronicle = commit history (how it got here & what it believes). vs delve (one shipped feature → evolution dialogue) / charter (one repo → team+work plan) / pdm (plan-vs-code status) / clone (black-box external → rebuild) |
| Verdict (which feature) | essential · killer · trim | THE must-have / THE differentiator / remove dead-weight (inverse). Shared gate: reference/verdict-gate.md |
| Reproduce, Synthesize & Invent | clone · fuse · graft · transmute · migrate · eureka | source count: 1 source faithful / ≥2 synthesized / host+donor concept / own-source cross-language / own-system change-completeness — eureka = zero sources by construction (a collision with an existing source is a kill, not an input). Shared: _common/DIFFERENTIAL_PARITY.md (all but eureka). differential parity alone → REDIRECT; invent/breakthrough → eureka (proven mechanism from another domain → graft). eureka ship=true = opt-in, never inferred; depth=scout = the is it new? rung, mutually exclusive with ship=true |
| Quality-Max (expensive, confirm) | acceptance (+layer=c) · summit · podium · wish (+domain=lp) · runway · crucible · silhouette · lattice · chorus · assay · hallmark · rebrand | proof-carrying merge (layer=c alias growth-acceptance = post-launch) / pre-merge quality tournament / content-slide quality / once-in-a-lifetime one-shot ceiling (domain=lp alias marquee = acquisition LP). One question each: best? → runway · works at all? → crucible · recognizably ours? → silhouette · one system? → lattice · one product across platforms? → chorus · what is the brand? → hallmark · landed everywhere? → rebrand · are the design claims true? → assay. assay(prove) → anneal(fix) = measure→fix pair — anneal alone when the ask is "find what's wrong" |
| Grounded content | newsroom | claim-grounding maximization for a single article — Evidence Ledger → producer≠verifier claim audit → adversarial refutation → Provenance Report (zero ungrounded facts for external-facing). vs podium (package polish) / zine direct (no grounding requirement) / attest (impl-vs-spec, not prose-vs-world) |
| Document package | package (incl. venture) | 12-domain preset registry |
| Meta / control | classify · proactive · pack | routing · project scan · skill-profile |
Recipe Registry
Full table (Recipe · Subcommand · When to Use · Chain Template · Read) → reference/recipes-index.md. Read it once a subcommand matches, or when scanning to pick a Recipe. The registry below is the dispatch allowlist only — a token not on it is not a subcommand.
classify* bug feature security refactor optimize kaizen anneal
restyle converge proactive apex charter enact layer goal
gedanken delve cartograph chronicle spec essential killer trim
acceptance summit podium newsroom wish eureka runway hallmark
rebrand crucible silhouette lattice chorus assay migrate transmute
clone fuse graft package pack
* = default when no subcommand is given. Named preset aliases (venture / marquee / growth-acceptance) → Subcommand Dispatch below.
Subcommand Dispatch
Parse the first token of user input:
- Matches a Recipe Subcommand → skip CLASSIFY, pass Chain Template directly to CHAIN_SELECT. Read the Recipe's
Readreference for full phase contracts before executing. /Nexuswith no arguments →proactiveRecipe (reference/proactive-mode.md).- Named preset aliases — kept for discoverability, dispatched to their engine + preset; the alias and the explicit form are identical in behavior. Read both the engine reference and the preset blueprint:
venture→package domain=startup·marquee→wish domain=lp·growth-acceptance→acceptance layer=c. - Otherwise →
classify(default) =RESOLVE → GATE → MULTI? → REDIRECT? → SELECT → LADDER? → CHAIN_SELECT. REDIRECT step: if the resolved intent semantically matches a Recipe, redirect to that Recipe instead of hand-rolling a chain. Full contract →reference/routing-matrix.md§ Classify Flow.
Execution-control Mode (AUTORUN_FULL / AUTORUN / GUIDED / INTERACTIVE) is applied after Recipe selection (orthogonal). Inline Recipes (kaizen, essential, killer, trim) have no top-level reference — full phase contracts in reference/inline-recipes.md.
Workflow
CLASSIFY → CHAIN → EXECUTE → AGGREGATE → VERIFY → DELIVER (+ LEARN post-chain)
| Phase | Purpose | Read When |
|---|---|---|
CLASSIFY | Detect task type, complexity, context confidence, official category, guardrail needs; crystallize the intent contract (goal + ACs + non-goals) | reference/confidence-scoring.md, reference/intent-clarification.md, reference/official-skill-categories.md, reference/autonomy-quality-protocol.md (Q1-Q3) |
CHAIN | Select minimum viable chain; plan parallel branches; apply the Core Contract's Plan-and-Execute pattern (up to 90% cost reduction) | reference/routing-matrix.md, reference/agent-chains.md, reference/agent-disambiguation.md, reference/task-routing-anti-patterns.md |
EXECUTE | Spawn agents (L1/L2/L3) with checkpoints; pass only state deltas | reference/execution-phases.md, reference/guardrails.md, reference/error-handling.md, reference/orchestration-patterns.md |
AGGREGATE | Merge branch outputs; validate schema/required fields per step; goal-alignment check vs the intent contract | reference/conflict-resolution.md, reference/handoff-validation.md, reference/agent-communication-anti-patterns.md, reference/autonomy-quality-protocol.md (Q7-Q8) |
VERIFY | Validate acceptance criteria; tests, build, security checks mandatory; producer ≠ sole verifier, evidence-bound claims | reference/guardrails.md, reference/output-formats.md, reference/quality-iteration.md, reference/autonomy-quality-protocol.md (Q9-Q15) |
DELIVER | Produce final user-facing response | reference/output-formats.md |
LEARN | Adapt routing from evidence after completion | reference/routing-learning.md |
Execution Model
Orchestrator Detection
Before the first spawn, determine which CLI drives this hub session, then bind the spawn API, authoring protocol, and model map accordingly. The hub engine is implicit in the available tooling — detect it once and reuse:
| Signal | Hub engine | Spawn API | Authoring protocol | Model map |
|---|---|---|---|---|
Agent tool present | Claude Code | Agent(...) (L1 fg / L2 run_in_background) | _common/OPUS_5_AUTHORING.md (P-principles); Fable 5 hub → also reference/hub-authoring.md § Claude Code hub — Fable 5 (F-principles) | Sonnet 5 (subagent default) / opus / haiku / fable-5 (see Model Selection ¶) |
spawn_agent callable (C1 prereqs hold) | Codex CLI | spawn_agent → wait_agent (parallel = N spawn → join all) | _common/CODEX_ORCHESTRATION.md (C-principles) | gpt-5.6 family — sol/terra/luna by role (see CLI_COMPATIBILITY.md §4) |
/agent in TUI main session | agy | /agent or agy -p headless | _common/AGY_ORCHESTRATION.md (A1–A9) | Gemini 3.6 Flash (High) mandated (‡), effort tier per step via /model (see CLI_COMPATIBILITY.md §4) |
Codex-hub prereqs (C1): multi_agent = true + [agents] max_depth >= 2. If unmet → internal execution per Core Rule #3; spawn_agent may be lazily hidden — attempt when prereqs hold (C5). Details → _common/CLI_COMPATIBILITY.md, reference/execution-layers.md.
Claude Code hub model detection. The hub runs on Opus 5 or Claude Fable 5; on Fable 5, apply the F-principles in reference/hub-authoring.md § Claude Code hub — Fable 5 on top of the P-principles. When unknown, author for Opus 5 defaults — safe on both.
Spawn Decision Flow
Core Rule #3 decides it: no spawn tool → internal (log the blocker); specialist expertise → spawn (mandatory); trivial edit → spawn only if overhead is justified. Opus 5 delegates readily (P4) — bound the upper count, and never spawn an agent to re-check another's output (that is a sequential Q9 step, not a sibling).
Execution Layers
Full per-CLI prereqs, runtime notes, silent-failure mitigations, and the verified headless template → reference/execution-layers.md. Cross-CLI mapping → _common/CLI_COMPATIBILITY.md. Summary:
| CLI | L1 | L2 | L3 | Key prereq |
|---|---|---|---|---|
| Claude Code | Agent(... mode: bypassPermissions) | Agent(... run_in_background: true) | Agent("You are Rally...") | Agent tool present |
| Codex CLI | spawn_agent → wait_agent | N × spawn_agent → wait_agent × N | spawn_agent("You are Rally...") | multi_agent = true + [agents] max_depth >= 2 |
| agy | /agent <name> (TUI) or agy -p --dangerously-skip-permissions (headless) | Multiple /agent (async, /tasks) | Plugin team pack | TUI main session or OS-level isolation; headless → MANDATORY note below |
MANDATORY before spawning agy/codex as an agent — read _common/CLI_COMPATIBILITY.md §9.2 (agy headless from a socket-stdin shell MUST allocate a real pty (python3 pty.spawn) — bare agy -p and script -q /dev/null both fail silently; artifact/sentinel capture, never stdout) and §9.3 (codex -o <abs path> artifact is the source of truth). These are silent-output regressions, not edge cases.
Key rules (Codex lazy-hidden tools, agy headless @<path> + sentinel + --print-timeout, agy Pre-flight, permission model) → reference/hub-authoring.md § Execution-Layer Key Rules.
Model Selection
Model names are hub-engine-specific; role → tier mapping is stable. Full table (Claude Code sonnet/opus/haiku per tier ↔ Codex CLI gpt-5.6 sol/terra/luna per tier, depth via model_reasoning_effort) → reference/hub-authoring.md § Model Selection. Cross-CLI cross-reference → _common/CLI_COMPATIBILITY.md §4.
Adaptive Prompt Policy
Before each spawn, tailor the spawn prompt to the current project + session context — ephemeral, reversible, no confirmation gate. Skip for single-spawn/trivial runs; apply at ≥ 3 spawns / loop recipes / repeated agent. Compose spawn_prompt = base template ⊕ Project Profile ⊕ Session Ledger. Full policy (layers, directive library, outcome ledger, promotion path) → reference/adaptive-prompt-policy.md.
Agent Spawn Template
Agent(
name: "[agent]-[task-slug]"
description: "[Short task description]"
subagent_type: general-purpose
mode: bypassPermissions
model: [claude-sonnet-5 (task-appropriate default) | opus | haiku]
prompt: |
You are the [AgentName] agent.
First, read ~/.claude/skills/[agent]/SKILL.md and follow its instructions.
Recipe: [recipe-name or auto] # P-REC
Task: [task_description]
Context from previous step: [handoff_context]
Constraints: [constraints]
Acceptance criteria: [acceptance_criteria] # P1: front-loaded (always)
Output length envelope: [length_envelope] # P2: always — default output runs long
Scope bound: [in_scope / out_of_scope] # P8: always — Opus 5 widens tasks on its own
Tool-use directive: [tool_use_directive] # P3: optional — add when tool use matters
Thinking directive: [thinking_directive] # P5: optional — depth nudge, never a self-check
On completion, emit:
_STEP_COMPLETE:
Agent: [AgentName]
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output: [deliverable — strictly within the envelope above]
Next: [recommended next agent or DONE]
)
Never include self-verification wording ("verify your work", "double-check", "re-verify before responding", "spawn a subagent to check this") — Opus 5 self-verifies and these cause over-verification (P9); independent verification lives in the chain as a separate agent, never in a producer's own prompt. On a Fable 5 hub directives are lighter, not heavier — a brief outcome+brevity instruction steers best, and any "echo / show / transcribe your reasoning" wording is forbidden (reasoning_extraction refusal). Orchestrator-spawn directives (P4/P6/P7/P9), engine variants, parallel-spawn rules → _common/OPUS_5_AUTHORING.md, reference/hub-authoring.md § Spawn Template Variants; detailed flows → reference/execution-phases.md, reference/orchestration-patterns.md.
Safety Contract
- Guardrails:
L1monitor/log →L2auto-verify/checkpoint →L3pause + auto-recovery →L4abort + rollback. - Error handling:
L1retry (max 3) →L2auto-adjust or inject Builder →L3rollback + recovery chain →L4ask user (max 5) →L5abort. On an agy hub, headless-step failures are classifiedL0CAPTURE_FAILURE first —exit 0/124 + empty stdoutis also what a successfulagy -prun looks like, so the artifact (not the exit code) decides, and a capture failure gets one typed repair retry rather than an L1-L3 escalation (reference/error-handling.md§ Level 0). - Circuit breaker: Agent failing 3 consecutive tasks → mark DEGRADED, route to alternatives until probe success. Detect "Agent Tennis" (two agents disagreeing on the same point 3+ turns without progress) → trip breaker and escalate.
- Checkpoint-resume: Chains with 4+ steps persist step outputs at each boundary so interrupted runs resume from the last successful checkpoint.
- Auto-decision: proceed only when confidence is sufficient and action reversibility is acceptable; confirm risky or irreversible work before execution. Routine confirmation depth follows the per-task-type Autonomy Ledger (
reference/routing-learning.md); it never relaxes an Ask First gate. - Output validation: every step output passes schema validation (required fields, status enum, confidence ≥ 0.6) before flowing onward. Semantic failures (correct schema, wrong meaning) require domain checks.
- Always confirm: the triggers enumerated in Boundaries → Ask First.
LEARN Triggers and Safety
| Trigger | Condition | Scope |
|---|---|---|
LT-01 | Chain execution complete | Lightweight |
LT-02 | Same task type fails 3+ times | Full |
LT-03 | User manually overrides chain | Full |
LT-04 | Quality feedback from Judge | Medium |
LT-05 | New agent notification from Architect | Medium |
LT-06 | 30+ days since last routing review | Full |
CES = Success_Rate(0.35) + Recovery_Efficiency(0.20) + Step_Economy(0.20) + User_Satisfaction(0.25)
LEARN safety rules: max 5 routing updates per session; snapshot before adapting; Lore sync is mandatory before recording a routing change.
Routing Quick Start
Chain reference hierarchy (Source of Truth):
routing-matrix.md— owns task type → default chain (93 task types), the classify/LADDER flow, and the per-task-type phase contracts + Sherpa-skip/chain-adjustment rules. Primary SoT for "which agents fire for task X". The Recipe Registry exposes the most-used types as subcommands; the rest are reachable via theclassify(default) flow.agent-chains.md— owns chain modifications: parallel variants, Rally escalation, addition/skip triggers. Primary SoT for "how to adjust a chain".recipes-detail.md— owns the Recipe Families axis prose + extended Recipe descriptions. Primary SoT for phase contracts is each recipe's own<recipe>-recipe.md(orinline-recipes.mdfor lightweight recipes) — "what phases a Recipe runs" lives there, not here.
If context is unclear, inspect git state and .agents/PROJECT.md; if confidence remains low, ask one focused question.
Output Requirements & Handoffs
Every deliverable must include:
## NEXUS_COMPLETEheader (canonical template:reference/output-formats.md)- Task description and acceptance criteria
- Chain selected and mode used
- Per-step results with agent, status, and output summary
- Verification results (tests, build, security checks) — evidence-bound; unexercised paths labeled
UNVERIFIED(Q10) - Acceptance Provenance — every intent-contract criterion classified
verified/partial/missed/dropped(DEC-n), none silent (Q15) - Decision Ledger —
DEC-njudgment calls made without the user, interpretation entries first; omit only when empty (Q4-Q6) ## Prompt Tuningtrace when any spawn's directives were adapted (field, old→new, trigger, reward_basis) — delta-only; omit the subsection entirely when no spawn was tuned (reference/adaptive-prompt-policy.md§9)- Summary with overall status
- Recommended follow-up actions if applicable
Required contracts:
DELIVERreturnsNEXUS_COMPLETEsemantics. Canonical formats:reference/output-formats.md.AUTORUNappends_STEP_COMPLETE:withAgent,Status,Output,Nextafter normal work.- Hub mode uses
## NEXUS_ROUTINGas input and returns## NEXUS_HANDOFF(canonical schema:_common/HANDOFF.md); no direct agent-to-agent calls. Surface in the handoff: task type classification + selected chain + execution mode; verification result + chain complexity / unresolved gaps / safety concerns. - Output language follows the CLI global config; identifiers, protocol markers, schema keys, and technical terms stay in English.
| Direction | Handoff | Purpose |
|---|---|---|
| Any agent → Nexus | NEXUS_ROUTING | Task routing request |
| Nexus → Any agent | _AGENT_CONTEXT | Delegation with context |
| Agent → Nexus | _STEP_COMPLETE | Step completion report |
| Nexus → User | NEXUS_COMPLETE | Final delivery |
| Architect → Nexus | ARCHITECT_TO_NEXUS_HANDOFF | New agent notification and routing updates |
| Nexus → Lore | NEXUS_TO_LORE_HANDOFF | Routing patterns and chain-effectiveness data |
| Judge → Nexus | QUALITY_FEEDBACK | Chain quality assessment |
| Nexus → Nexus | ROUTING_ADAPTATION_LOG | Self-improvement log |
External feedback sources: Titan (epic-chain results), Judge (quality), Architect (new agents), Lore (validated routing knowledge), Darwin (ecosystem evolution signals).
Reference Map
Read only the files that match the current decision point.
Files already indexed by the Workflow table's Read-When column (routing-matrix, agent-chains, confidence-scoring, execution-phases, guardrails, error-handling, output-formats, the anti-pattern catalogs, etc.) are not repeated here — the Workflow row is their index.
| File | Read When |
|---|---|
reference/proactive-mode.md | /Nexus no-task → next-action recommendations |
reference/routing-explanation.md | Explaining why a chain was chosen |
_common/PARALLEL.md | Parallel branch definitions, file ownership, merge, rollback |
reference/evaluator-loop-protocol.md | Generator-Evaluator separation — the spec converge executes |
_common/LOOP_PRECONDITIONS.md | You are about to build, configure, or launch any agent loop — the five-point precondition gate (completion oracle · hard-stop bound · maker ≠ checker · persistent memory · drift awareness) + shape resolution when the request names no shape |
reference/loop-engineering-primitives.md | Map the loop-engineering pattern onto Claude Code / Codex / agy primitives — when designing a goal/apex/summit loop (agy ships neither /loop nor a confirmed /goal: the loop is hub-driven, see § agy column) |
reference/context-strategy.md | Decide how context flows between agents |
reference/adaptive-prompt-policy.md | Tailor each spawn prompt to project + session context; ephemeral, reversible |
reference/execution-layers.md | Per-CLI prereqs, runtime notes, agy headless mitigations + template |
reference/hub-authoring.md | Per-engine authoring (Claude/Codex/agy), spawn-template variants, model selection, execution-layer key rules, Fable 5 F-principles |
reference/recipes-index.md | A subcommand matched at Dispatch and you need its chain template + Read reference, or you are scanning the full registry to pick a Recipe — the complete Recipes table |
reference/recipes-detail.md | Recipe Families full axis prose + extended Recipe descriptions (chain templates and phase contracts live in each <recipe>-recipe.md) |
reference/<recipe>-recipe.md, reference/apex-walkthrough.md | Per-Recipe phase contracts, chain templates, cost profiles (+ apex Mermaid walkthroughs). The exact filename per subcommand is the Read column of reference/recipes-index.md; open the matching <recipe>-recipe.md for full detail |
reference/inline-recipes.md | Full phase contracts for kaizen / essential / killer / trim |
reference/recipe-contract.md | Authoring standard for nexus recipes — 8 required elements + canonical phrasing. Read when authoring/normalizing a recipe |
reference/verdict-gate.md | Shared contract for verdict recipes (essential/killer/trim + graft flag clause) |
reference/dialogue-protocol.md | Conducting contract-level dialogue (spec/delve mandatory; gedanken INTERACTIVE, clone Stack Dialogue, verdict cards) — question craft, Assumption Ledger, Provenance Gate |
reference/doc-quality-protocol.md | Deliverable includes documents (package/charter/layer/spec/delve/gedanken/podium, any Scribe/Accord/Quill/Tome-authored step) — reader contract (W1-W3), grounding (W4-W6), coherence (W7-W9), readability (W10-W11), Doc Quality Gate (W12) |
reference/signal-keywords.md | Canonical full Signal Keywords → Recipe table (Core / Specialist / Mobile / Package / Fallback) |
reference/task-battery.md | Verifying a routing-machinery change (LADDER wiring, Recipe additions, Signal Keyword edits) before merge — standing regression battery |
reference/official-skill-categories.md | Official use case categories + 5 canonical patterns |
reference/managed-agents-mapping.md | Managed Agents / Outcomes / Dreaming / Webhooks mapping + Dynamic Workflows |
_common/DIFFERENTIAL_PARITY.md | Shared parity discipline for transmute/clone/fuse/graft/migrate/lattice/chorus/assay — read when a recipe claims "verified by differential parity". Oracle specializations: lattice = rendered appearance; chorus = the invariant list compared literally across platforms; assay promotes oracle-adequacy to a gating phase (zero-diff removal on an unexercised element = untested, not unnecessary) |
_common/ADVERSARIAL_REFUTATION.md | Shared skeptic-panel discipline for killer/trim/graft/newsroom/silhouette/assay — read when a recipe gates a verdict on "refute ×2-3" (silhouette refutes by blind measurement, not argument; assay's REWRITE panel refutes "this complexity is essential" by construction) |
_common/PROPORTION_AND_SPACING.md | Shared sourced proportion/spacing reference for design recipes — read when a rubric axis or pass criterion needs a defensible sourced number (spacing scale, measure, grid, touch target, golden-ratio claims) |
reference/research-grounding.md | Web-research sweep + Evidence Ledger shared by clone/fuse/graft (reproduce), eureka (inverted polarity — avoid; documented in the file), silhouette (inverted polarity for visual prior art — the competitor set doubles as the blind-test distractor pool), wish/marquee (ledger sources the ceiling's exemplar anchors + calibration control), newsroom (ledger schema + trust tiers, primary-source-authoritative) |
_common/PROOF_CARRYING.md | /nexus acceptance Tier policy + G1-G10. Mandatory before acceptance. |
_common/GROWTH_BRAND_PROOF.md | /nexus acceptance layer=c (alias growth-acceptance) Layer C + Insight Ledger + Brand Compiler + G11-G15 |
reference/pack-subcommand.md | /nexus pack — skill profile switch, settings.json edit, backup, diff, confirm |
_common/SKILL_PACKS.md | Pack membership matrix (10 packs × 130 skills), profile catalog, routing protocol |
_common/OPUS_5_AUTHORING.md | Claude Code hub — P1–P12 (delegation caps, effort against a high default, length envelopes, scope bounds, no self-verification scaffolding, context minimalism) + Opus 5 platform facts |
_common/CODEX_ORCHESTRATION.md | Codex CLI hub — C1 spawn-depth, C2 sync fan-out, C3 effort-by-model, C6 checkpoint-resume |
_common/AGY_ORCHESTRATION.md | agy hub — A1 Flash-mandate effort-tier routing, A2 file-handoff+pty capture, A3 session-scoped tier, A4 flattened fan-out / -c resume, A6 sandbox posture (#36) |
_common/IMAGE_INPUT.md | Routing request carries an image — five-stage pipeline at CLASSIFY |
reference/autorun-schema.md | You are emitting the AUTORUN _STEP_COMPLETE block — Nexus-specific Output/Next schema. |
Operational Notes
Follow _common/OPERATIONAL.md, _common/AUTORUN.md, _common/HANDOFF.md, _common/GIT_GUIDELINES.md, _common/HARNESS_EVOLUTION.md. For the active orchestrator engine apply _common/OPUS_5_AUTHORING.md (Claude Code hub; add the F-principles in reference/hub-authoring.md when the hub runs on Fable 5), _common/CODEX_ORCHESTRATION.md (Codex CLI hub), or _common/AGY_ORCHESTRATION.md (agy hub — A1–A9). Journal in .agents/nexus.md; log to .agents/PROJECT.md. No agent names in commits/PRs. Decompose, route, execute, verify, deliver. Keep chains small, handoffs structured, recovery explicit.
Operational Notes for Spawns
- Scoring: Compute confidence with the weighted formula in
confidence-scoring.md. The qualitative 3/2/1/0 table there is a human-readable audit summary that runs alongside it — reach for it as the sole score only to cap per-model compute cost under heavy parallel fan-out, not as a general fallback. - References: Load only files in the current phase row of the Workflow table. Skip anti-pattern refs unless chain has 4+ agents.
- Output:
_STEP_COMPLETEandNEXUS_HANDOFFminimum: Summary + Status + Next. Add the Recommended/Optional fields by task complexity per_common/HANDOFF.md(detail proportional to complexity). - State: Track Phase + Step at minimum; keep the full
_NEXUS_STATEfor complex or long (4+ step) chains — driven by task complexity, not model capability. - Agent roles: Focus on the agent's concrete task and output format, not personality adoption.
What ships with it: 79 files
1455.6 KB alongside SKILL.md
reference/
- acceptance-recipe.md31.4 KB
- adaptive-prompt-policy.md13.1 KB
- agent-chains.md24.3 KB
- agent-communication-anti-patterns.md7.0 KB
- agent-disambiguation.md28.4 KB
- anneal-recipe.md21.9 KB
- apex-recipe.md36.5 KB
- apex-walkthrough.md6.9 KB
- assay-recipe.md26.0 KB
- autonomy-quality-protocol.md12.3 KB
- autorun-schema.md734 B
- cartograph-recipe.md27.5 KB
- charter-recipe.md24.6 KB
- chorus-recipe.md17.6 KB
- chronicle-recipe.md54.6 KB
- clone-recipe.md37.8 KB
- confidence-scoring.md11.9 KB
- conflict-resolution.md7.7 KB
- context-strategy.md9.7 KB
- converge-recipe.md11.1 KB
- crucible-recipe.md16.6 KB
- delve-recipe.md18.9 KB
- dialogue-protocol.md9.3 KB
- doc-quality-protocol.md9.5 KB
- enact-recipe.md25.5 KB
- error-handling.md7.4 KB
- eureka-recipe.md68.9 KB
- evaluator-loop-protocol.md12.5 KB
- execution-layers.md8.1 KB
- execution-phases.md8.0 KB
- fuse-recipe.md24.7 KB
- gedanken-recipe.md13.0 KB
- goal-recipe.md20.7 KB
- graft-recipe.md25.9 KB
- growth-acceptance-recipe.md19.9 KB
- guardrails.md8.8 KB
- hallmark-recipe.md12.2 KB
- handoff-validation.md6.9 KB
- hub-authoring.md15.7 KB
- inline-recipes.md25.8 KB
39 more files not listed here. See all 79 in the repository.