openclaw-skills/nexus/SKILL.md
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.
npx skillsauth add seaworld008/commonly-used-high-value-skills nexusInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"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.
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.
gpt-5.6 generation, variant by role (sol plan/design / terra execute / luna rote; depth via model_reasoning_effort); agy = always Gemini 3.5 Flash; Fable 5 hub → high effort. Full per-engine map → reference/hub-authoring.md § Model Selection, _common/CLI_COMPATIBILITY.md §4.NEXUS_COMPLETE when the workload justifies the managed platform; prefer Dynamic Workflows for large homogeneous parallel sweeps. Detail: reference/managed-agents-mapping.md §5.settings.json language, CLAUDE.md, AGENTS.md, GEMINI.md); identifiers and technical terms remain in English.Agent, Codex CLI spawn_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 per reference/execution-layers.md prereqs. Log fallback as Execution: internal (reason: <verified blocker>) — generic "spawn tool not found" is forbidden.AUTORUN or AUTORUN_FULL except where rules explicitly require it.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.5 Flash mandate).Agent boundaries → _common/BOUNDARIES.md
Agent disambiguation → reference/agent-disambiguation.md
NEXUS_HANDOFF format from _common/HANDOFF.md.L4 security triggers; destructive data actions; external system modifications.CES ≥ B).architect's gap-fill proposal, before it is registered) — see reference/routing-matrix.md § LADDER.agy -p ... --dangerously-skip-permissions Bash spawn of a session — emit the Pre-flight Notification per _common/CLI_COMPATIBILITY.md §9.1 (informational, does not block AUTORUN).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 4.8). Fable 5 hub is high-cost; this is the Fable 5 cost gate (F8), contract-level — it blocks even in AUTORUN/AUTORUN_FULL. See reference/hub-authoring.md § Claude Code hub — Fable 5.VERIFY when modifying routing matrix behavior.routing-matrix.md § LADDER; the fallback taken (compass-invoked | architect-invoked | neither) is a required field in NEXUS_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 does classify do?") — 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).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:
/Nexus with no arguments → proactive mode. Read reference/proactive-mode.md.## NEXUS_ROUTING → hub mode. Return via ## NEXUS_HANDOFF; no direct agent-to-agent calls.AUTORUN/AUTORUN_FULL, execute immediately unless a rule in Ask First or confidence-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 → DELIVERRecipes = task shape;
## Modes= execution control. Orthogonal. Full phase contracts live in each Recipe'sReadreference; complex Chain Templates (See reference/recipes-detail.md) live there; simple Recipes inline their chain.
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-interaction design of an existing surface (direction+rubric-driven). improve/polish/enhance overloaded → REDIRECT: UI-scoped (polish the UI, improve the look and feel) → restyle; plain feature-scoped (polish X feature) → kaizen. improve the design overloaded (code design → anneal; UI/look-and-feel → restyle) → REDIRECT |
| Loop (autonomous / iterative) | loop · goal · converge | dispatcher (runner is orbit) / /goal setup only / in-session rubric loop. Underspecified "make a loop" → loop; explicit shape → sibling direct |
| Build (new) | feature · apex · playable | single guided build / discovery→ship one-shot (8-25 agents) / game-specialized all-in-one (vertical-slice-first gate) |
| 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 → bird's-eye diagrams + design doc (how it works today); chronicle = commit history → era timeline + narrative storylines (feature/fix/improvement/decision) + decision log + per-lens deep-dive files (security/domain/architecture/perf/UX/issues) + inferred ethos/worldview (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). Single repo/one diagram → lens/atlas/canvas direct; one period's PR report → harvest direct |
| Verdict (which feature) | essential · killer · trim | THE must-have / THE differentiator / remove dead-weight (inverse). Shared gate: reference/verdict-gate.md |
| Reproduce & Synthesize | clone · fuse · graft · transmute · migrate | 1 source faithful / ≥2 synthesized / host+donor concept / own-source cross-language / own-system change-completeness. Shared: _common/DIFFERENTIAL_PARITY.md. differential parity alone → REDIRECT |
| Quality-Max (expensive, confirm) | acceptance · growth-acceptance · summit · podium · wish · runway · hallmark · rebrand · marquee | proof-carrying merge (G1-10) / post-launch lifecycle (G11-15) / pre-merge quality tournament / content-slide quality / once-in-a-lifetime one-shot ceiling — scarcity-gated, deliverable-agnostic, ACCEPT = all rubric dims = 3 / design-brand wing: flagship in-product UI design tournament (runway) / create the brand identity — proof-carrying Brand Book (hallmark) / propagate a settled brand, completeness-proven (rebrand) / wish-grade one-shot acquisition LP with machine oracles, no Scarcity Gate (marquee). runway vs marquee = in-product surface vs conversion LP; hallmark→rebrand = create→propagate pair |
| Document package | package (incl. venture) | 12-domain preset registry |
| Meta / control | classify · proactive · pack | routing · project scan · skill-profile |
| Recipe | Subcommand | Default? | When to Use | Chain Template | Read |
|--------|-----------|---------|-------------|----------------|------|
| Auto Classify | classify | ✓ | No Recipe specified — auto-classification. Redirects to a curated Recipe when the resolved intent matches one; ad-hoc chain only for no-Recipe task types. | RESOLVE → GATE → MULTI? → REDIRECT? → SELECT → LADDER? → CHAIN_SELECT | reference/routing-matrix.md (Classify Flow contract) |
| Bug Fix | bug | | Bug reports and fix requests | Scout[RCA] → Sherpa? → Radar[failing repro] → Builder[root-cause] → Radar[verify] → Guardian| reference/routing-matrix.md |
| Feature | feature | | New web/backend/generic feature. iOS/Android native → MOBILE_NATIVE (Native) instead. | Lens?[reuse] → Sherpa[spec+AC] → Forge? → Builder → Radar[+verify gate] → Guardian| reference/routing-matrix.md |
| Security | security | | Security response | Sentinel[triage] → Probe?[confirm-exploit] → Builder[root-cause] → Probe/Radar[verify-closed] → Vigil? → Guardian| reference/routing-matrix.md |
| Refactor | refactor | | Internal-only refactor, no external behavior change | Radar?[safety-net] → Zen → Radar[verify-equivalence] → Guardian| reference/routing-matrix.md |
| Optimize | optimize | | Performance-only improvement on correct code — measure-first, prove-with-a-number. Defect-caused slowdown → bug | Bolt/Tuner[measure→target→optimize] → Radar[verify-speedup] → Guardian| reference/routing-matrix.md |
| Kaizen | kaizen | | Existing-feature continuous improvement covering perf / UX / code-quality / feature-extension. | See reference/recipes-detail.md | reference/inline-recipes.md |
| Anneal | anneal | | Codebase design audit → prioritized behavior-preserving brush-up. | See reference/recipes-detail.md | reference/anneal-recipe.md |
| Restyle | restyle | | UI/visual design improvement of an existing surface — audit → direction → rubric-looped implementation → walkthrough+a11y+no-regression verify. | See reference/recipes-detail.md | reference/restyle-recipe.md |
| Converge | converge | | Quality-convergence loop — the invocable entry point for the Generator-Evaluator pattern (reference/evaluator-loop-protocol.md). | See reference/recipes-detail.md | reference/converge-recipe.md, reference/evaluator-loop-protocol.md |
| Loop | loop | | Loop-engineering dispatcher & discipline gate. | See reference/recipes-detail.md | reference/loop-recipe.md |
| Proactive | proactive | | /Nexus with no arguments — project state scan | Scan project → recommend | reference/proactive-mode.md |
| Apex | apex | | Full-cycle auto-implementation: discovery → spec → parallel design → risk gate → loop → ship. | See reference/recipes-detail.md | reference/apex-recipe.md, reference/apex-walkthrough.md |
| Playable | playable | | All-in-one game production. | See reference/recipes-detail.md | reference/playable-recipe.md |
| Charter | charter | | Repo-wide analysis → self-driving Charter, team design included — stops at the document. | See reference/recipes-detail.md | reference/charter-recipe.md |
| Enact | enact | | Execute a Charter end-to-end. | See reference/recipes-detail.md | reference/enact-recipe.md |
| Operating Layer | layer | | Design + stand up a repo's operating layer — Loom designs, Sigil authors, Nexus registers. | See reference/recipes-detail.md | reference/layer-recipe.md |
| Goal Setup | goal | | /goal autonomous long-running execution setup. Gates on a machine-checkable completion oracle + mandatory hard-stop bound (rejects unverifiable goals). 1-3 agents, no code execution | Hone → Latch → Scribe? → DELIVER | reference/goal-recipe.md |
| Gedanken | gedanken | | Structured thought-experiment reasoning. | → reference/recipes-detail.md §gedanken | reference/gedanken-recipe.md |
| Delve | delve | | Existing-feature deep-dive → evolution-direction dialogue; no code — stops at a named Evolution Map. | See reference/recipes-detail.md | reference/delve-recipe.md |
| Cartograph | cartograph | | Multi-repo reverse-engineering → bird's-eye architecture diagrams + design document; no code — stops at a named Cartography Map. | See reference/recipes-detail.md | reference/cartograph-recipe.md |
| Chronicle | chronicle | | Commit-history reverse-engineering → era timeline + narrative storylines (feature/fix/improvement/decision) + reconstructed decision log + per-lens deep-dive files (security/domain-design/architecture/performance/design-ux/issues, split per file) + inferred ethos/worldview + repository history document set; no code — stops at a named Chronicle. | See reference/recipes-detail.md | reference/chronicle-recipe.md |
| Spec | spec | | Interactive feature-proposal → locked specification through deep human-in-the-loop dialogue. | → reference/recipes-detail.md §spec | reference/spec-recipe.md |
| Essential | essential | | Must-have feature verdict + conditional implementation. | See reference/recipes-detail.md | reference/inline-recipes.md |
| Killer | killer | | Killer-feature verdict + conditional implementation with feature flag. | See reference/recipes-detail.md | reference/inline-recipes.md |
| Trim | trim | | Dead-weight feature removal verdict + conditional excision — the inverse of essential/killer. | See reference/recipes-detail.md | reference/inline-recipes.md |
| Acceptance | acceptance | | Proof-Carrying PR pipeline v2 — Two-Axis (Code + Design). | See reference/recipes-detail.md | _common/PROOF_CARRYING.md, reference/acceptance-recipe.md |
| Growth-Acceptance | growth-acceptance | | Layer C lifecycle gate (Market + Research + Brand axes) for Enterprise org-tier. | See reference/recipes-detail.md | _common/GROWTH_BRAND_PROOF.md, reference/growth-acceptance-recipe.md |
| Summit | summit | | Multi-engine five-team quality-maximization. | See reference/recipes-detail.md | reference/summit-recipe.md |
| Podium | podium | | Content-quality maximization. | See reference/recipes-detail.md | reference/podium-recipe.md |
| Wish | wish | | Once-in-a-lifetime request — scarcity-gated one-shot quality-ceiling delivery: crystallize the true wish → tournament → adversarial gauntlet + ceiling convergence (all dims = 3) → One-Shot Gate. Always confirm. | See reference/recipes-detail.md | reference/wish-recipe.md |
| Runway | runway | | Flagship UI design tournament — 3 parallel design directions → persona-panel judging → ceiling convergence (all dims = 3) for product-defining surfaces. Always confirm. | See reference/recipes-detail.md | reference/runway-recipe.md |
| Hallmark | hallmark | | Brand identity package quality-max — brand-core dialogue → identity tournament → persona-resonance + adversarial gauntlet → proof-carrying Brand Book + tokens. | See reference/recipes-detail.md | reference/hallmark-recipe.md |
| Rebrand | rebrand | | All-surface brand propagation with a proven-complete guarantee — RESIDUE-GATE × brand rubric; old-brand decommission gated on the completeness proof. | See reference/recipes-detail.md | reference/rebrand-recipe.md |
| Marquee | marquee | | Wish-grade one-shot LP production — crystallization → 3-direction tournament → gauntlet + ceiling convergence with machine oracles (Lighthouse/CWV/WCAG) → One-Shot Gate. Always confirm. | See reference/recipes-detail.md | reference/marquee-recipe.md |
| Migrate | migrate | | Change-completeness migration. | See reference/recipes-detail.md | reference/migrate-recipe.md |
| Transmute | transmute | | Cross-language rewrite preserving behavior (TS→Rust, Go→Rust, Python→Go, JS→TS, …). | See reference/recipes-detail.md | reference/transmute-recipe.md |
| Clone | clone | | Faithful product reproduction — reverse-engineer an existing product's observable surface, rebuild it, and verify the copy by differential parity against a stamped captured baseline. | See reference/recipes-detail.md | reference/clone-recipe.md, reference/research-grounding.md |
| Fuse | fuse | | Multi-source product synthesis. | See reference/recipes-detail.md | reference/fuse-recipe.md, reference/research-grounding.md |
| Graft | graft | | Concept transplant for innovation. | See reference/recipes-detail.md | reference/graft-recipe.md, reference/research-grounding.md |
| Package | package | | Generalized document-package generator. | See reference/recipes-detail.md | reference/package-recipe.md, reference/venture-recipe.md (startup blueprint) |
| Pack | pack | | Skill ecosystem control (meta) — switch active Claude Code skill profile per workstream. Forms: list / current / <name> / reset. Confirms diff before writing settings.json. | Inline edit (no spawn) | reference/pack-subcommand.md, _common/SKILL_PACKS.md |
For natural-language input without an explicit subcommand. Subcommand match always wins. Keywords are English canonical anchors, not a literal allowlist — Nexus translates input (any language/paraphrase) to English intent first, then matches semantically. Output language still follows config.
Full canonical table (Core / Specialist / Mobile / Package / Fallback) → reference/signal-keywords.md. Most-used Core anchors inlined below:
| Keywords | Recipe |
|----------|--------|
| bug, error, broken | bug |
| feature, implement, build | feature |
| security, vulnerability, CVE | security |
| refactor, clean up, code smell | refactor |
| optimize, slow, performance, speed up, latency, slow query, bottleneck | optimize (memory leak → bug; post-deploy slowdown, output still correct → optimize +Trail; full REDIRECT notes → reference/signal-keywords.md) |
| kaizen, improve, polish, enhance existing, refine | kaizen |
| anneal, design audit, brush up the codebase, harden the architecture, design weaknesses | anneal |
| restyle, redesign, UI refresh, visual polish, modernize the UI, improve the look and feel | restyle (UI/visual — code-design improvement → anneal) |
| loop, make a loop, run until done, autonomous loop, ralph loop | loop (dispatcher → gate + route to goal/converge/orbit/apex) |
| cartograph, reverse-engineer across repos, bird's-eye diagram, overview diagram, architecture map, design doc from code, understand the system across repos | cartograph |
| chronicle, repository history, commit history summary, how did we get here, evolution of the codebase, project timeline, git history narrative, history of the repo, feature/bug/decision history, decision log from history, design philosophy from history, project ethos/worldview | chronicle (era timeline + storylines: feature/fix/improvement/decision + decision log + per-lens deep-dive files: security/domain/architecture/perf/UX/issues + inferred ethos/worldview, from commit history) |
| wish, once-in-a-lifetime request, favor of a lifetime, your absolute best, spare nothing, no second chance, one shot to get this right | wish (scarcity-gated one-shot ceiling; strategic code quality-max → summit, standard bar iteration → converge) |
| runway, design tournament, flagship screen design, best possible design | runway (in-product flagship surface — single-direction improvement → restyle; acquisition LP → marquee) |
| hallmark, brand identity, brand book, brand voice, visual identity | hallmark (creates the brand — propagation → rebrand; personal branding → crest) |
| rebrand, brand refresh, apply new brand everywhere, brand migration | rebrand (completeness-proven propagation; no settled Brand Book → hallmark first) |
| marquee, best possible landing page, flagship LP, one-shot LP | marquee (wish-grade one-shot LP; routine LP → bazaar/funnel; bare landing page overloaded → REDIRECT) |
| /Nexus (no arguments) | proactive |
| unclear or multi-domain request | classify → reference/intent-clarification.md |
Specialist anchors (Chain / Cull-Triage-Crypt / Sonar / Clause-Scribe / Rank-Magi / Omen-Ripple / Matrix / Sketch), mobile/cross-platform anchors (MOBILE_NATIVE, IOS_UI_TEST, PORTING), and package/domain-preset anchors (research / ai-adoption / legal / saas / media / growth / career / learning / hiring / local-gov) — see reference/signal-keywords.md.
Parse the first token of user input:
Read reference for full phase contracts before executing./Nexus with no arguments → proactive Recipe (reference/proactive-mode.md).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.
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; Plan-and-Execute pattern (capable model plans, cheaper models execute — 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 |
Default: spawn. Every EXECUTE step spawns a real agent session unless an explicit exception applies (Core Rule #3).
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_48_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.5 Flash 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 with a concrete reason, never a generic "spawn tool not found"; 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 4.8 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 4.8 defaults — safe on both.
EXECUTE step begins
↓
Is spawn tool available? (Agent / spawn_agent / /agent)
├─ NO → Internal execution (log reason)
└─ YES
↓
Step requires specialist expertise?
├─ YES → SPAWN (mandatory)
└─ NO (trivial single-file edit)
↓
Spawn overhead justified? → SPAWN (recommended) | Internal (log reason)
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 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 file capture (NOT stdout) |
MANDATORY before spawning agy/codex as an agent — read _common/CLI_COMPATIBILITY.md §9.2 (agy real-pty + 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 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.
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(
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: optional — add for L/XL output
Tool-use directive: [tool_use_directive] # P3: optional — add when tool use matters
Thinking directive: [thinking_directive] # P5: optional — add for high-stakes steps
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]
)
Front-load acceptance criteria (P1) on every spawn. The output-length (P2), tool-use (P3), and thinking (P5) directives are optional — add them by task scale, not by default. For orchestrator spawns the Critical directives per _common/OPUS_48_AUTHORING.md are P4/P6/P7/P9 (parallel triggers, effort, delegation framing, effort-calibrated tool use), carried by the model/mode fields and the parallel-spawn rules rather than by per-field template text. 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). Engine variants, Opus 4.8 / Fable 5 notes, parallel-spawn rules → reference/hub-authoring.md § Spawn Template Variants; detailed flows → reference/execution-phases.md, reference/orchestration-patterns.md.
L1 monitor/log → L2 auto-verify/checkpoint → L3 pause + auto-recovery → L4 abort + rollback.L1 retry (max 3) → L2 auto-adjust or inject Builder → L3 rollback + recovery chain → L4 ask user (max 5) → L5 abort.reference/routing-learning.md); it never relaxes an Ask First gate.L4 security, destructive actions, external system modifications, and 10+ file edits.| 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.
Canonical matrix: reference/routing-matrix.md defines 98 task types (ground-truthed by row count, grep -c the Task Type table); the Recipes table exposes the most-used 20 as subcommands — the rest are reachable via the classify (default) flow. Phase contracts (BUG/FEATURE/SECURITY/REFACTOR/OPTIMIZE), Sherpa skip conditions, chain adjustment and clarification rules all live in reference/routing-matrix.md (merged from the retired routing-quick-start.md — see § Sherpa Skip & Chain Adjustment there).
Chain reference hierarchy (Source of Truth):
routing-matrix.md — owns task type → default chain (98 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".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 Recipe-level phase contracts (apex/summit/etc.). Primary SoT for "what phases a Recipe runs".Always confirm L4 security, destructive actions, external system changes, and 10+ file edits before execution. If context is unclear, inspect git state and .agents/PROJECT.md; if confidence remains low, ask one focused question.
Every deliverable must include:
## Nexus Execution Report headerUNVERIFIED (Q10)verified/partial/missed/dropped(DEC-n), none silent (Q15)DEC-n judgment calls made without the user, interpretation entries first; omit only when empty (Q4-Q6)## Prompt Tuning trace 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)Required contracts:
DELIVER returns NEXUS_COMPLETE semantics. Canonical formats: reference/output-formats.md.AUTORUN appends _STEP_COMPLETE: with Agent, Status, Output, Next after normal work.## NEXUS_ROUTING as input and returns ## NEXUS_HANDOFF (canonical schema: _common/HANDOFF.md).| 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).
Read only the files that match the current decision point.
| File | Read When |
|------|-----------|
| reference/routing-matrix.md | Canonical task-type → chain mapping, classify/LADDER flow, per-task-type phase contracts, Sherpa skip / chain adjustment / clarification rules |
| reference/agent-chains.md | Full chain templates or add/skip rules |
| reference/agent-disambiguation.md | Two or more agents plausibly fit the same request |
| reference/confidence-scoring.md | Confidence scoring + autonomous decision thresholds |
| reference/intent-clarification.md | Ambiguous request needs interpretation before routing; overloaded-anchor REDIRECT |
| reference/proactive-mode.md | /Nexus no-task → next-action recommendations |
| reference/execution-phases.md | Phase-by-phase AUTORUN flow |
| reference/guardrails.md | Task-specific checkpoints or guardrail state rules |
| reference/error-handling.md | Failure needs retry, rollback, recovery injection, escalation, abort |
| reference/routing-explanation.md | Explaining why a chain was chosen |
| reference/conflict-resolution.md | Parallel branches touch overlapping files |
| _common/PARALLEL.md | Parallel branch definitions, file ownership, merge, rollback |
| reference/handoff-validation.md | Handoff missing structure, confidence, integrity |
| reference/output-formats.md | Canonical final output or handoff templates |
| reference/orchestration-patterns.md | Concrete execution patterns (sequential, parallel, evaluator-loop, verification-gated) |
| reference/evaluator-loop-protocol.md | Generator-Evaluator separation — the spec converge executes |
| reference/loop-engineering-primitives.md | Map the loop-engineering pattern onto Claude Code / Codex primitives — when designing a goal/apex/summit loop |
| 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/routing-learning.md | Adapting routing from evidence; per-task-type Autonomy Ledger |
| reference/quality-iteration.md | Output needs post-delivery PDCA improvement |
| reference/{orchestration,task-routing,production-reliability,agent-communication}-anti-patterns.md | Anti-pattern catalogs (load when chain ≥ 4 agents) |
| 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-detail.md | Recipe Families full axis prose + extended Recipe descriptions + full chain templates |
| reference/{anneal,restyle,apex,playable,charter,enact,layer,gedanken,delve,cartograph,chronicle,spec,migrate,clone,fuse,graft,converge,loop,goal,acceptance,growth-acceptance,summit,transmute,venture,package,podium,wish,runway,hallmark,rebrand,marquee}-recipe.md, reference/apex-walkthrough.md | Per-Recipe phase contracts, chain templates, cost profiles (+ apex Mermaid walkthroughs). Indexed per subcommand in the Recipes table Read column; 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/autonomy-quality-protocol.md | Any AUTORUN/AUTORUN_FULL chain — intent contract (Q1-Q3), Decision Ledger (Q4-Q6), drift control (Q7-Q8), independent verification + evidence-bound claims (Q9-Q11), quality budget + Acceptance Provenance (Q12-Q15) |
| 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 — read when a recipe claims "verified by differential parity" |
| _common/ADVERSARIAL_REFUTATION.md | Shared skeptic-panel discipline for killer/trim/graft — read when a recipe gates a verdict on "refute ×2-3" |
| reference/research-grounding.md | Phase 0.5 web-research sweep shared by clone/fuse/graft (Evidence Ledger) |
| _common/PROOF_CARRYING.md | /nexus acceptance Tier policy + G1-G10. Mandatory before acceptance. |
| _common/GROWTH_BRAND_PROOF.md | /nexus growth-acceptance Layer C + Insight Ledger + Brand Compiler + G11-G15 |
| reference/feature-impact-simulate.md | Feature impact prediction (Persona+Journey+Product v4) |
| 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_48_AUTHORING.md | Claude Code hub — P4 / P6 / P7 spawn prompts, output envelopes, effort |
| reference/hub-authoring.md § Claude Code hub — Fable 5 | Hub runs on claude-fable-5 — F-principles (F1-F8): lighter spawn prompts, high default effort, async harness, no-reasoning-reproduction, cost gate |
| _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 |
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_48_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.
When _AGENT_CONTEXT is present in the input, parse the following fields to configure execution:
After completing the delegated work, emit the following completion block:
_STEP_COMPLETE:
Agent: Nexus
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output: |
[Execution report: chain selected, steps executed, verification results]
Next: [recommended next agent or DONE]
Reason: [why this status; if BLOCKED/FAILED, what is needed to unblock]
When input contains ## NEXUS_ROUTING, operate as the hub. Do not instruct direct agent-to-agent calls. Return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).
Nexus-specific findings to surface in handoff:
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._STEP_COMPLETE and NEXUS_HANDOFF minimum: Summary + Status + Next. Add the Recommended/Optional fields by task complexity per _common/HANDOFF.md (detail proportional to complexity)._NEXUS_STATE for complex or long (4+ step) chains — driven by task complexity, not model capability.development
Enumerating failure modes via pre-mortem analysis. Systematically identifies failure scenarios for plans, designs, and features, scoring them with RPN/AP. Does not write code.
development
Converting document formats (Markdown/Word/Excel/PDF/HTML). Converts specs from Scribe and reports from Harvest into distributable formats; generates reusable conversion scripts. Use when converting documents, building accessibility-compliant PDFs, or creating Pandoc/LibreOffice pipelines.
testing
Curating cross-agent knowledge and guarding institutional memory. Extracts patterns from agent journals into METAPATTERNS.md, detects knowledge decay, propagates best practices, prevents organizational forgetting. Use when consolidating cross-agent insights, curating memory, or auditing knowledge decay.
development
Comprehending and investigating codebases. Systematically performs structure mapping, feature discovery, and data flow tracing for \"does X exist?\", \"how does Y work?\", or \"what is this module's responsibility?\". Includes a conversational Q&A mode (\"ask\") for navigator-style, multi-turn questions about a project. Does not write code.