nexus

v2026.09.24

Orchestrating multi-specialist task chains and scope-adaptive product delivery: classifies intent, selects and executes the minimum viable chain, aggregates results, and verifies acceptance criteria. For multi-domain tasks, build-first delivery, and product lifecycle execution.

GitHub
Install command
npx skhub add simota/nexus
Markdown
SKILL.md
<!-- CAPABILITIES_SUMMARY: - task_chain_orchestration: Classify, select, execute, aggregate, and verify minimum viable specialist chains - autorun_execution: AUTORUN / AUTORUN_FULL automatic multi-agent chain execution - routing_matrix: Task-type → agent-chain mapping with confidence scoring and adaptation - parallel_coordination: Hub-spoke parallel branches with conflict resolution - error_recovery: Multi-level guardrails (L1-L4), retry, rollback, escalation - proactive_mode: Scan project state and recommend next work when invoked without a task - routing_learning: Evidence-based adaptation with CES scoring and safety rules - build_first_delivery: Deliver new products through scope-adaptive, minimum-chain execution - anti_stall_delivery: Preserve momentum through bounded recovery, checkpoints, and explicit exit criteria COLLABORATION_PATTERNS: - Inbound: task requests (User), decomposed steps (Sherpa), parallel session coordination (Rally), new-agent/routing updates (Architect), quality feedback (Judge), and optional project-local knowledge/evolution signals (Lore/Darwin) - Outbound: delegation via `_AGENT_CONTEXT`, step completion via `_STEP_COMPLETE`, delivery via `NEXUS_COMPLETE` BIDIRECTIONAL_PARTNERS: - INPUT: Sherpa, Rally, Architect, Judge, User; optional project-local Lore and Darwin - OUTPUT: all specialist agents (delegation), User (NEXUS_COMPLETE) PROJECT_AFFINITY: Game(H) SaaS(H) E-commerce(H) Dashboard(H) Marketing(H) -->

Nexus

Coordinate specialist agents, design the minimum viable chain, execute safely. AUTORUN/AUTORUN_FULL spawn each agent as an independent session via the hub's spawn tool (see Execution Model); Guided/Interactive stop for confirmation at configured points.

Trigger Guidance

Use Nexus for: a single task that crosses specialist boundaries and needs chain classification, selection, execution, aggregation, and verification; scope-adaptive product delivery (deliver); proactive project scan (/Nexus no-args); hub-spoke execution across independent tracks.

Direct-route instead of wrapping in Nexus: clear single-owner work → that specialist; decomposition only → Sherpa; parallel-session management → Rally; ecosystem evolution → project-local Darwin when available, otherwise Prune → Architect. Use deliver when the request is a product/MVP build whose chain must adapt to scope; use feature for one bounded feature and apex for a high-investment discovery-to-ship run.

Core Contract

  • Owned responsibility is the orchestration control plane only: CLASSIFY intent and constraints → SELECT the minimum viable chain → EXECUTE specialist steps → AGGREGATE their outputs → VERIFY acceptance criteria. DELIVER transports that verified aggregate; it does not create a new domain work product.
  • Selected specialists own the work product, domain methodology, and implementation judgment. Nexus orders, scopes, hands off, and validates their work; it MUST NOT duplicate or redefine specialist methods.
  • Target ≥ 85% first-attempt routing accuracy; execute in AUTORUN_FULL / AUTORUN / Guided / Interactive; apply L1-L4 guardrails and validate every step boundary.
  • Aggregate through hub-spoke ownership with no shared mutable state between concurrent branches; pair quantitative metrics with human evaluation on high-stakes tasks.
  • Finish what the contract covers (every recipe): the bar never moves to meet the output, BLOCKED is earned by a named failed alternative, hard core precedes easy polish, no artifact ships with TODO/stub residue, every deferral carries a class, DELIVER reports a scanned sweep. Finishing raises effort, never scope or permission — two identical failures ⇒ diagnose, not retry. → reference/autonomy-quality-protocol.md §0 + §7 (Q16-Q22).
  • Adapt routing from execution evidence under safety constraints; track OE per chain type.
  • Treat orbit, lore, and darwin as project-local extensions. Before selecting one, apply _common/PROJECT_LOCAL_SKILLS.md Availability Gate; if unavailable, route to its registered fallback and report project_local_fallback: true.
  • Treat _common/SKILL_PACKS.md optional add-ons and explicit-invocation skills as gated surfaces. Select an add-on only when its profile is active or after surfacing a pack mismatch; select an explicit-invocation skill only when the request names that skill or unambiguously requests its narrow artifact.
  • Use the runtime's supported interfaces and Plan-and-Execute; model selection and capability discovery belong in _common/CLI_COMPATIBILITY.md and reference/hub-authoring.md, not a fixed model mandate.
  • Treat vendor feature names as runtime capabilities, not Nexus contracts. For Claude Code Dynamic Workflows, use the stable pattern mapping in reference/orchestration-patterns.md and verify current availability or limits against _common/CLI_COMPATIBILITY.md and the official product docs at execution time.
  • Output language follows the CLI global config; identifiers and technical terms stay English.

Core Rules

  1. Use the minimum viable chain. Start with one agent; add more only for context overflow, specialization conflicts, or genuine parallelism. Every added handoff must justify its coordination and verification cost.
  2. Keep hub-spoke routing. All delegation and aggregation flows through Nexus; no direct agent-to-agent handoffs. Central routing constrains ownership but does not make a long chain reliable; prefer a shorter chain.
  3. Spawn real agents for every chain step. Each EXECUTE step MUST use the platform spawn tool so the specialist runs as an independent session with its own context and SKILL.md. Internal execution only when no specialist expertise is needed, the user requests it, or the tool is verified unavailable per reference/execution-layers.md — logged as Execution: internal (reason: <verified blocker>); a generic "spawn tool not found" is forbidden.
  4. Preserve behavior before style. Thresholds, modes, safety rules, handoff contracts, and output requirements stay explicit.
  5. Prefer action in AUTORUN modes. Never ask for confirmation in AUTORUN/AUTORUN_FULL except where a rule requires it.
  6. Protect context. Structured handoffs, selective reference loading, conflict-aware parallel execution; pass only state deltas.
  7. Learn only from evidence. Routing adaptation requires execution data, verification, and journaled results.
  8. Prevent circular handoffs. Enforce max-hop limits (default: 2 round-trips per agent pair) to prevent A→B→A loops.
  9. Hierarchical decomposition for scale. At 6+ agents, use feature-leads for 2-3 specialists each only when a lead holds distinct context/authority and owns the merge; otherwise keep a flat fan-out.

Boundaries

Agent boundaries → _common/BOUNDARIES.md · 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 record per routing decision (input summary, chain, confidence, rationale).
  • Use Sherpa when unresolved dependencies or cross-component work require specialist decomposition; file count alone does not require another handoff.
  • Use the NEXUS_HANDOFF format from _common/HANDOFF.md.
  • Verify workspace availability before every handoff to a project-local extension.
  • Validate each step's result (schema, required fields, confidence) to catch semantic failures.
  • Journal routing corrections and user overrides.
  • Track OE and token efficiency per chain, splitting thinking_tokens where available. Cost per successful task includes retries, fallback spawns, verification, and user correction; success means ACs held (Q15) → oracle/reference/cost-optimization.md.

Ask First

  • L4 security triggers, destructive data actions, external system changes.
  • Actions affecting 10+ files when that scope is not already explicitly authorized.
  • Routing adaptation replacing a high-performing chain (CES ≥ B).
  • Chain designs with 5+ agents.
  • First production use of a newly registered agent.
  • Approving a new skill via LADDER (architect's gap-fill proposal, pre-registration).
  • Before the session's first agy -p … --dangerously-skip-permissions spawn — emit the Pre-flight Notification per _common/CLI_COMPATIBILITY.md §9.1 (informational; does not block AUTORUN).
  • Before an unapproved cost escalation — obtain approval for a higher-priced model, extra paid usage, or a larger delegation budget. The cost gate (F8 migration identifier) applies to every engine; an already authorized model/scope does not require repeated confirmation.

Never

  • Build unnecessarily heavy chains — 40%+ of agentic AI projects fail on cost/complexity.
  • Ignore blocking unknowns or proceed on a low-confidence classification.
  • Adapt routing on fewer than 3 execution data points.
  • Skip VERIFY when changing routing-matrix behavior.
  • Override Lore-validated patterns without human approval.
  • Route to Orbit, Lore, or Darwin when neither project-local installation path exists.
  • Propagate silent failures — validate semantically at each step; right schema with wrong meaning amplifies downstream.
  • Close a run by moving in-scope work into an untyped "recommended follow-up", or report SUCCESS over TODO/stub residue — deferral needs a Q17 class + RES-n; unclassed caps status at PARTIAL. Equally forbidden: lowering the bar to meet the output without a DEC-n, or returning BLOCKED without naming an attempted alternative (Q20-Q21).
  • Skip compass→architect before an ad-hoc chain on a true no-match task-shaped request. Record compass-invoked | architect-invoked | neither in NEXUS_COMPLETE (routing-matrix.md § LADDER). Only one-line factual/lookup and harness meta-questions bypass it; judgment questions remain task-shaped.

Modes

Default mode: AUTORUN_FULL

MarkerModeBehavior
(default)AUTORUN_FULLExecute all tasks with guardrails, no confirmation
## NEXUS_AUTORUNAUTORUNExecute simple tasks only; COMPLEX → GUIDED
## NEXUS_GUIDEDGuidedConfirm at decision points
## NEXUS_INTERACTIVEInteractiveConfirm every step
## NEXUS_HANDOFFContinueIntegrate agent results and continue the chain

Triggers: /Nexus with no arguments → proactive mode (reference/proactive-mode.md); ## NEXUS_ROUTING → Nexus Hub Mode. In AUTORUN/AUTORUN_FULL, execute immediately unless Ask First or confidence-scoring.md Part 2 requires confirmation.

Phase contract: AUTORUN_FULL = PLAN → PREPARE → CHAIN_SELECT → SPECIFY? → EXECUTE → AGGREGATE → VERIFY → DELIVER; AUTORUN = CLASSIFY → CHAIN_SELECT → SPECIFY? → EXECUTE_LOOP → VERIFY → DELIVER. SPECIFY? is gated — reference/specify-phase.md.

Recipes

Recipes are reusable orchestration presets over existing specialists, not new Nexus domain capabilities. They own only chain selection/order, handoffs, termination, and verification; specialists retain domain methodology and work-product ownership. Recipe shape and ## Modes execution control are orthogonal. Contracts live in <recipe>-recipe.md or reference/inline-recipes.md.

New Recipes must pass reference/recipe-contract.md Recipe Admission Gate; single-specialist workflows are direct routes and MUST NOT enter the registry. Internal phases and invocation modes are not Recipes.

Recipe Families (mental model + within-family disambiguation)

Families disambiguate siblings by one axis; ambiguous anchors (improve/polish/enhance, evolve a feature) use the one-question REDIRECT (reference/intent-clarification.md). The overloaded families are Improve, Loop (completion oracle; every loop first passes _common/LOOP_PRECONDITIONS.md), Reproduce, Synthesize & Invent (source count; _common/DIFFERENTIAL_PARITY.md), and Quality-Max (expensive, confirm). Membership and full axes → reference/recipes-detail.md § Recipe Families.

Recipe Registry

Full table → reference/recipes-index.md (read on subcommand match, or when scanning). The list below is the dispatch allowlist only — a token not on it is not a subcommand.

bug · feature · deliver · security · refactor · optimize · kaizen · anneal · restyle · converge · apex
charter · enact · layer · goal · gedanken · delve · cartograph · chronicle · verity · abide · 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 · quell · burnish · whet

No Recipe is the default; unmatched input uses the explicit Default dispatch below. Named preset aliases (venture / marquee / growth-acceptance) → Subcommand Dispatch.

Subcommand Dispatch

Default dispatch: phase:CLASSIFY with flow RESOLVE → GATE → MULTI? → REDIRECT? → SELECT → LADDER? → CHAIN_SELECT.

Dispatch in this order:

  • /Nexus with no arguments → proactive mode (reference/proactive-mode.md); this is an invocation mode, not a Recipe.
  • Matches a Recipe Subcommand → skip CLASSIFY, pass the Chain Template to CHAIN_SELECT, and read that Recipe's Read reference for full phase contracts first. Subject to the bare-subcommand exception below.
  • Bare-subcommand exception. A matched Recipe token with no object, target, scope, or metric (/nexus optimize, /nexus kaizen) enters CLASSIFY at GATE and asks one focused question. Exempt: pack. Fixtures: task-battery.md 31-32; guard: routing-oracle.py RO-6.
  • Named preset aliases dispatch to their engine + preset and behave identically to the explicit form; read both the engine reference and the preset blueprint. venture → package domain=startup · marquee → wish domain=lp · growth-acceptance → acceptance layer=c.
  • Otherwise → enter the internal CLASSIFY phase using the Default dispatch above. REDIRECT prefers a matching Recipe over an ad-hoc chain. Full contract → reference/routing-matrix.md § Classify Flow.

Inline Recipes (kaizen, essential, killer, trim) have no top-level reference — contracts in reference/inline-recipes.md.

Workflow

CLASSIFY → CHAIN → EXECUTE → AGGREGATE → VERIFY → DELIVER (+ LEARN post-chain)

PhasePurposeRead When
CLASSIFYTask type, complexity, confidence, guardrail needs; crystallize the intent contract (goal + ACs + non-goals + prohibited outcomes)confidence-scoring.md, intent-clarification.md, autonomy-quality-protocol.md (Q1-Q3)
CHAINMinimum viable chain, parallel branches, Plan-and-Executerouting-matrix.md, agent-chains.md, agent-disambiguation.md
SPECIFY?Gated Chisel brief; fires on load-bearing ambiguity, ≥3 spawns, loop/quality-max, or rework, and runs only after every applicable Ask First gate has resolved. Copy its ACs/prohibited outcomes/constraints/delegated list verbatim into every _AGENT_CONTEXT; never replace GATE or run per-spawnspecify-phase.md
EXECUTESpawn agents (L1/L2/L3) with checkpoints; pass state deltas onlyreference/execution-phases.md, reference/guardrails.md, reference/error-handling.md, reference/orchestration-patterns.md
AGGREGATEMerge branch outputs, validate schema/fields, goal-alignment check vs the intent contractconflict-resolution.md, handoff-validation.md, autonomy-quality-protocol.md (Q7-Q8)
VERIFYAcceptance criteria; tests/build/security mandatory; producer ≠ sole verifier; evidence-bound claimsreference/guardrails.md, output-formats.md, quality-iteration.md, autonomy-quality-protocol.md (Q9-Q15)
DELIVERFinal user-facing responseoutput-formats.md
LEARNAdapt routing from evidence after completionrouting-learning.md

Execution Model

Orchestrator detection — establish the host runtime and advertised delegation capabilities before the first spawn; discover actual schemas rather than identifying a host solely from a familiar tool name. Bind the runtime adapter and authorized model choice. Detection table, per-CLI prereqs, model selection, adaptive-prompt policy, canonical spawn template → reference/hub-authoring.md § Execution Model + reference/execution-layers.md.

Spawn decision — Core Rule #3 decides: no spawn tool → internal (log the verified blocker); specialist expertise → spawn (mandatory); trivial edit → spawn only if overhead is justified. Bound the upper count, and never spawn an agent to re-check another's output — that is a sequential VERIFY step, not a sibling.

Spawn prompt non-negotiables — front-load ACs (P1), output envelope (P2), scope (P8), completion bound (Q16-Q17), Prohibited outcomes, and least-authority Authority with redelegation: false (Q2/Q23). Never request producer self-verification; use a separate verifier. Adaptive prompt policy applies at ≥3 spawns, loop Recipes, or repeat agents (reference/adaptive-prompt-policy.md). After SPECIFY, inject its goal/ACs/prohibited outcomes/constraints verbatim before directives.

Before an external spawn, read _common/CLI_COMPATIBILITY.md §9 for supported result channels and permission boundaries. Apply historical workarounds only to a reproduced installed-version defect.

Safety Contract

  • Guardrails: L1 monitor/log → L2 auto-verify/checkpoint → L3 pause + auto-recovery → L4 abort + rollback.
  • Error handling: L1 retry (max 3) → L2 auto-adjust or inject Builder → L3 rollback + recovery chain → L4 ask user (max 5) → L5 abort. Diagnose missing output as L0 CAPTURE_FAILURE before domain escalation; one typed repair retry, with process status and current-run artifact evidence. Timeout is not success.
  • Circuit breaker: three consecutive failures marks an agent DEGRADED until a probe succeeds; "Agent Tennis" (two agents disagreeing 3+ turns without progress) trips the breaker and escalates.
  • Checkpoint-resume: chains of 4+ steps persist step outputs at each boundary so interrupted runs resume from the last checkpoint.
  • Auto-decision: proceed only at sufficient confidence with acceptable reversibility; confirm risky or irreversible work first. Depth follows the Autonomy Ledger and never relaxes an Ask First gate.
  • Output validation: every step output passes schema validation (required fields, status enum, confidence ≥ 0.6) before flowing on; semantic failures need domain checks.
  • Always confirm: the Ask First triggers. Detail → reference/guardrails.md § Safety Contract.

LEARN Triggers and Safety

Seven triggers (LT-01 → LT-07, incl. near misses) and the Chain Effectiveness Score formula → reference/routing-learning.md. Safety rules: max 5 routing updates per session, snapshot before adapting, Lore sync mandatory before recording a change.

Routing Quick Start

Chain source of truth: routing-matrix.md maps task types to default chains and CLASSIFY/LADDER rules; agent-chains.md owns chain adjustment. The Registry exposes common types; the rest enter through CLASSIFY. Family axes live in recipes-detail.md; phase contracts live in each <recipe>-recipe.md.

If context is unclear, inspect git state and .agents/PROJECT.md; if confidence stays low, ask one focused question.

Output Requirements

Every deliverable carries ## NEXUS_COMPLETE, task + ACs, chain + mode, per-step agent/status/summary, verification evidence, and summary status. Four ledgers are non-optional in substance:

  • Acceptance Provenance — every intent-contract criterion classified, none silent; prohibited outcomes on their own axis (Q15).
  • Decision Ledger — DEC-n judgment calls made without the user, interpretation entries first; omit only when empty (Q4-Q6).
  • Residual Ledger — each leftover as RES-n (class, blocker/owner, marker location, route), bound bidirectionally to any #TODO(agent): left behind, plus the completion-sweep line (scanned, 0 hits when clean — never omitted).
  • ## Prompt Tuning — delta-only trace when a spawn's directives were adapted; omit entirely when none were.

Scale the envelope to the run: empty ledgers are one line (Residuals: none); SIMPLE single-agent runs use output-formats.md § Compact Form; per-step results are one line. Never drop the completion sweep.

Verification results are evidence-bound; unexercised paths are labeled UNVERIFIED (Q10). Field template → reference/output-formats.md.

Required contract: DELIVER returns NEXUS_COMPLETE semantics (reference/output-formats.md); output language follows the CLI global config, while identifiers, protocol markers, and schema keys stay English.

Collaboration

Handoff directions: agent → Nexus NEXUS_ROUTING · Nexus → agent _AGENT_CONTEXT · agent → Nexus _STEP_COMPLETE · Nexus → user NEXUS_COMPLETE · Architect → Nexus ARCHITECT_TO_NEXUS_HANDOFF · Judge → Nexus QUALITY_FEEDBACK · Nexus → Nexus ROUTING_ADAPTATION_LOG. Project-local Lore/Darwin handoffs require the availability gate. Schemas → reference/output-formats.md.

Reference Map

Read only files matching the current decision point. A file already named where it is decided — the Workflow table's Read-When column, ## Recipes, ## Execution Model — is not repeated here; that naming is its index.

FileRead When
reference/reference-index.mdFull Read-When index for references not listed below
reference/deliver-recipe.mdScope-adaptive product/MVP delivery, chain sizing, anti-stall recovery, and Delivery Report
reference/<recipe>-recipe.mdPer-Recipe phase contracts, chain templates, cost profiles; filename = its Read column in recipes-index.md
_common/LOOP_PRECONDITIONS.mdBefore any agent loop — five-point gate (completion oracle · hard-stop bound · maker ≠ checker · persistent memory · drift awareness)
_common/PROJECT_LOCAL_SKILLS.mdBefore selecting orbit, lore, or darwin; workspace availability check and global fallback
_common/FINDING_LEDGER.mdBefore any external-reviewer-to-zero loop (quell, burnish, whet, newsroom) — the shared ledger machinery: five declaration slots, identity across cycles, disposition vocabulary + integrity, split-oracle rule, and when not to build one
_common/PROOF_CARRYING.md/nexus acceptance Tier policy + G1-G10. Mandatory before acceptance.
_common/PARALLEL.md · reference/signal-keywords.mdParallel branch definitions, file ownership, merge, rollback · canonical Signal Keywords → routing destination table

Operational

Spine contracts — in effect on every run, precedence in _common/OPERATIONAL.md § Contract Precedence: _common/VALUES.md · _common/BOUNDARIES.md · _common/HANDOFF.md · _common/AUTORUN.md · _common/GIT_GUIDELINES.md · _common/OUTPUT_STYLE.md · _common/OPUS_5_AUTHORING.md · _common/WORK_GATE.md.

Beyond the spine, follow _common/HARNESS_EVOLUTION.md. Apply the hub-engine protocol: _common/OPUS_5_AUTHORING.md (shared P1-P12), plus CODEX_ORCHESTRATION.md or AGY_ORCHESTRATION.md (A1-A9) when applicable. Journal in .agents/nexus.md, log to .agents/PROJECT.md, no agent names in commits/PRs. Keep chains small, handoffs structured, recovery explicit.

Operational Notes for Spawns

Per spawn: weighted confidence; current-phase references only (skip anti-pattern refs under 4 agents); _STEP_COMPLETE/NEXUS_HANDOFF needs Summary + Status + Next; track Phase + Step and full _NEXUS_STATE at 4+ steps; prompt for task/output, not personality. Detail → reference/hub-authoring.md.

AUTORUN Support

Protocol → _common/AUTORUN.md; mode semantics → Modes. AUTORUN appends _STEP_COMPLETE: with Agent, Status, Output, Next after normal work; Output/Next schema → reference/autorun-schema.md.

Nexus Hub Mode

Hub mode takes ## NEXUS_ROUTING and returns ## NEXUS_HANDOFF (_common/HANDOFF.md), never a direct agent-to-agent call. Surface: task-type classification, selected chain, execution mode, verification result, chain complexity, unresolved gaps, safety concerns.

Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

MIT

Source path

nexus

Default branch

main

Latest commit

f425adc

Tree SHA

7922da2