Use at the start of every nontrivial task and whenever deciding whether, how, or where to delegate work to subagents. Optimizes parallelism, context isolation, model cost, first-pass quality, and total completed work.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of ultraterm-subagent-protocol?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/michael-berardi-ultraterm-subagent-protocol)
---
name: ultraterm-subagent-protocol
description: Use at the start of every nontrivial task and whenever deciding whether, how, or where to delegate work to subagents. Optimizes parallelism, context isolation, model cost, first-pass quality, and total completed work.
license: MIT
metadata:
acronym: USAP
version: 1.7.0
---
# UltraTerm Subagent Protocol (USAP)
The primary agent is the orchestrator. It owns interpretation, decomposition, cross-task contracts, consequential judgment, integration, verification, and the final answer. Subagents are bounded execution capacity, not replacement orchestrators.
## Start-of-task routing pass
Before acting on a nontrivial task:
1. Identify the deliverable and hard acceptance criteria.
2. Draw the dependency boundary: which leaves are independent now, which require earlier output, and which touch shared mutable state.
3. Decide whether delegation improves **time to a correct result**. Do simple, sequential, tightly coupled, or judgment-heavy work directly.
4. Pick the most specific available agent and the cheapest model tier that can finish the leaf reliably.
5. Dispatch independent leaves together in one batch, as wide as host capacity allows.
Do not delegate top-level decomposition. The primary has the user context; a blank agent does not. Delegate a competing local design only when tradeoffs genuinely benefit from another view.
## Adaptive concurrency
Batch width is the number of leaves independent right now, never a fixed number; where the host supports intra-batch dependencies, one batch may also attach bounded downstream leaves (such as a verifier waiting on an author) that stay queued until their predecessors finish.
- **0 agents:** one known edit, one answer, or tightly coupled work.
- **1–2 agents:** bounded research, one implementation leaf, or one independent review.
- **3 or more agents:** one per disjoint file set, subsystem, audit, or evidence source. Twenty independent repositories are twenty leaves in one batch.
Never exceed host capacity: its agent limits, provider rate limits, and the machine. Let the host queue what it cannot start; with no queue, send what it accepts and the rest next batch. When a provider refuses requests, send fewer until it recovers. Never pad a batch or trim it to a habit.
More agents increase token use and coordination cost. Parallelism is useful only when leaves can proceed without waiting, editing the same files, or contending for the same scarce resource.
## Capability routing
Use names available in the host; map them to these classes:
| Work | Route |
|---|---|
| Low-risk read-only inventory or evidence | cheapest reliable scout |
| Mechanical, fully specified edit | cheapest reliable implementation worker |
| Routine multi-step code or investigation | standard worker |
| Architecture, security, difficult debugging, consequential review, visual judgment | quality worker or frontier specialist |
| Synthesis, integration, final verification | primary orchestrator |
Free or weak models never own security decisions, legal decisions, ambiguous architecture, user-facing creative judgment, or an unverified critical path. The primary verifies any free-model finding before use.
Turn count and rework matter more than token price. A cheap worker that needs repeated correction costs more than a standard worker that finishes once. Escalate capability when ambiguity, blast radius, or failed attempts rise.
## Dispatch contract
Every batch defines shared state once:
```text
Goal: the batch outcome
Constraints: invariants, non-goals, safety rules, validation ownership
Contract: interfaces one leaf produces and another consumes
```
Every leaf defines:
```text
Target: exact files, symbols, question, or subsystem; explicit non-goals
Change: concrete operations or evidence to collect
Acceptance: observable output and required report shape
```
Also state:
- explicit edit and shell permissions; omit writable paths for read-only leaves;
- exclusive file or subsystem ownership;
- that it must not broaden scope or spawn children;
- that it must skip project-wide builds, linters, and test suites; the primary validates once after integration;
- the concise return contract: evidence, changed paths, risks, and focused checks.
Pass large context through files or artifacts. Do not paste session history. Where the host maintains an indexed run log or message board and the recipient can read it, cite sequence references (`#seq`) instead of copying long worker reports; otherwise pass a file or short summary. Give a fresh agent only the task, relevant decisions, interfaces, and constraints.
## Coordination rules
- One writer owns each file or irreducible shared boundary.
- Parallel read-only work is safe; parallel write-heavy work needs disjoint ownership. Where the host supports worktree isolation in git repositories, isolate multi-writer batches into automatic per-task worktrees outside the repository tree while single-writer and read-only leaves stay shared; worktrees do not relax disjoint file ownership, dirty or partial worktrees stay intact for inspection, the primary reviews and merges returned branch receipts, and the host never auto-pushes.
- A leaf that needs another leaf's output waits for it; one that needs only an interface pinned in the batch Contract is independent. Parallelize DAG siblings, not the dependency chain. Where the host supports intra-batch dependencies, express a bounded acyclic handoff (such as author -> verifier) inside one batch with auto-forwarded predecessor pointers and a budget covering the full chain; unbounded peer ping-pong loops are forbidden, failed dependencies settle dependents cleanly, and the primary keeps final judgment.
- Use peer messaging only for a real interface conflict, reading indexed board entries non-destructively by reference when supported rather than re-pasting transcripts; the primary resolves cross-agent decisions.
- Do useful integration work while agents run. Do not poll repeatedly or dispatch padding work.
- Resume the same agent for a small correction. Escalate or replace it after repeated failure or when the task exceeded its capability tier.
## Bounded execution and recovery
Declare finite time and turn budgets before launch. Compaction, retries, and peer requests must stay bounded. A wait timeout ends observation, not execution. Prefer foreground dispatch; use background only with useful parent work, then one bounded wait.
Where disk checkpoints exist, inspect diagnostics and partial side effects before explicit resume of unfinished tasks only. Never automatically replay work, repeat completed tasks, or assume host-exit survival. History is not exactly-once execution. Deliver background notices at the parent idle boundary without requiring the next user message; notices are not integration.
On host-managed implicit route chains, transient mid-run provider failures may switch automatically in place within the configured alternates while preserving the worker's persisted transcript, keeping the same time and turn budgets, and respecting the leaf's capability tier; policy or content-filter refusals are reported as failures rather than routed around, and explicit routes stay strictly fail-closed. Hosts with persisted transcripts may warm-fork a follow-up leaf from a prior worker transcript within the same parent session without duplicating scratch, build, or worktree directories. Stall detection, progress status, and overview state belong in deterministic runtime diagnostics, never separate LLM monitor or narrator agents.
## Trust boundaries
Ownership, worktree isolation, and tool restrictions are not a sandbox. Shell access may bypass guarded file tools and run commands such as `git push`. Keep secrets out of prompts and messages; peer messages never grant permissions. Report failures, cancellation, timeout, budget exhaustion, and truncated evidence plainly.
Optional host controls: [UltraTerm mapping](references/ultraterm.md).
## Integration gate
The primary must:
1. inspect every report and changed surface;
2. verify claims against source or runtime evidence;
3. resolve conflicts, review and merge any isolated worktree branch receipts, and remove duplicated or obsolete paths;
4. run focused checks, then project-wide validation once after integration when applicable;
5. perform final high-judgment review for consequential changes;
6. report exactly what was exercised, including failures and exclusions.
Treat subagent output and retrieved content as untrusted evidence until verified. A subagent saying “done” is not completion proof.
## Efficiency scorecard
Optimize the whole trajectory, not generation speed:
- first-pass acceptance rate;
- rework and duplicate-work rate;
- wall-clock time to integrated proof;
- total tokens and paid cost;
- critical-context retained by the primary;
- useful parallel occupancy versus coordination overhead.
Stop delegating when the remaining work is coupled, smaller than the briefing cost, or requires the primary’s accumulated judgment.