From kernel
Manages multi-agent orchestration using contracts, AgentDB briefing, 4 fault tolerance layers (retry, fallback, classification, checkpointing), and context transfer protocols. Use for coordinating parallel agents or spawning sub-agents.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kernel:orchestrationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<skill id="orchestration">
<core_principles>
<fault_tolerance> 4 required layers:
<worktree_isolation> Use git worktree isolation for tier 2+ when multiple surgeons run in parallel.
isolation: "worktree" on Agent tool call<worktree_safety> Constraint enforcement for parallel agents. Prevents scope creep and file conflicts.
Contract constraints (mandatory for tier 2+):
constraints.files: exhaustive list of files agent may touch.{"goal":"X","files":["a.sh"],"constraints":{"files":["a.sh","b.md"]},"tier":2}constraints.files.Pre-spawn validation:
git status --porcelain must be clean or stashed before spawning.Post-agent validation:
git diff --name-only {base}..{surgeon_branch}.constraints.files.Merge protocol:
<context_transfer> Every agent boundary is lossy compression.
<knowledge_injection> Before spawning any agent, inject relevant context:
orchestrator_protocol:
1. Build context slice: agentdb inject-context <agent_type>
2. Include slice in agent prompt (not as a separate tool call)
3. Agent receives pre-loaded context — doesn't need to search
agent_slicing: surgeon: gotchas + patterns + active contract adversary: past failures + gotchas + recent errors reviewer: same as adversary (test for known failure modes) researcher: all learnings by domain + recent verdicts triage: complexity signals + recent contracts understudier: same as triage
rule: inject BEFORE spawn. Never let agents discover context at runtime. rule: orchestrator owns injection. Agents don't call inject-context themselves. </knowledge_injection>
<progressive_autonomy> Confidence-based human escalation:
levels: supervised: confidence < 0.6 — human confirms every decision semi_autonomous: 0.6 <= confidence < 0.8 — human confirms tier 2+ only autonomous: confidence >= 0.8 — human reviews results, not decisions
escalation_triggers: - confidence below threshold for current level - unfamiliar tech or pattern (no matching learnings) - scope exceeds contract by >20% - security-sensitive change detected - breaking change to public API
rule: start supervised. Earn autonomy through consistent quality. rule: any security concern instantly drops to supervised level. </progressive_autonomy>
<budget_awareness> Agents see their remaining budget. Self-regulate complexity.
allocation: tier_1: low cost (direct execution) tier_2: medium cost (orchestrator + surgeon) tier_3: high cost (full council)
alerts: 50%: normal — continue 80%: warn — simplify approach 95%: critical — wrap up, checkpoint, stop spawning
preflight (orchestrator enforces before any autonomous loop):
1. Confirm max_budget_usd is set on contract.
2. If unset: AskUserQuestion — set ceiling or proceed unbounded.
3. Track cumulative cost via agentdb emit. Hard stop at 100%.
rule: never exceed budget silently. Alert at 80%, hard stop at 95%. rule: budget is per-contract, not per-session. </budget_awareness>
<checkpoint_recovery> Resume from last good state, not restart from scratch. Saves 40-60% on failures.
protocol: 1. on_spawn: check agentdb for existing checkpoint with same contract_id 2. if_found: resume from step + 1, skip completed work 3. if_not_found: start fresh 4. on_each_step: write checkpoint via agentdb write-end 5. on_failure: checkpoint preserved — next spawn resumes
version_safety: - on resume: verify files haven't changed since checkpoint - if changed externally: invalidate checkpoint, start fresh
rule: always checkpoint before risky operations. rule: checkpoint is cheap. Not checkpointing is expensive. </checkpoint_recovery>
<entropy_adaptive> Dynamic orchestration based on task entropy.
entropy_measurement: low: familiar pattern, existing tests, clear scope medium: some unknowns, partial coverage high: unfamiliar tech, no tests, cross-cutting
adaptation: low_entropy: skip researcher+scout; surgeon directly medium_entropy: researcher → surgeon → validator; skip adversary high_entropy: full council + coroner on failure
override: - security-sensitive changes always get full pipeline regardless of entropy - human can force entropy level via AskUserQuestion - first session in new project always starts at high entropy
rule: entropy decreases as learnings accumulate. rule: never skip security checks regardless of entropy level. </entropy_adaptive>
<anti_patterns>
npx claudepluginhub ariaxhan/kernel-claude --plugin kernelOrchestrates multi-agent workflows with parallel pipelines, sync barriers, state tracking, checkpointing, and progress metrics. Use for coordinating 3+ agents across sessions.
Patterns for multi-agent coordination, task decomposition, agent handoffs, and orchestration topology selection. Use when splitting large tasks across sub-agents or debugging agent systems.
Guides proactive use of /orchestrate for complex multi-agent workflows with sequential/parallel execution, conditionals, retries, visualization, checkpoints, and automation.