freshcrate
Skin:/

Orchestra — patterns for coordinating the agent ecosystem

Practical guidance for multi-agent systems across delegation, supervision, review gates, artifact spines, and human-in-the-loop control.

Patterns tracked
9
Principles
27
Anti-patterns named
27
ResetShowing 9 patterns
Freshcrate opinionated playbook
Add a real review gate before side effectsP0
  • Separate proposer and reviewer roles.
  • Require spec compliance plus code-quality review.
  • Block deploy/write actions until review passes.
Require tool-grounded reads before actionP0
  • Fetch current state before answering or mutating.
  • Prefer logs, DB rows, and file reads over prompt memory.
  • Save structured observations for downstream agents.
Introduce task contracts between agentsP0
  • Each delegated task includes objective, allowed tools, success criteria, and max budget.
  • Outputs are structured: result, evidence, unresolved risks.
  • No worker gets implicit permission to mutate unrelated surfaces.
Add adversarial verification for high-stakes outputP1
  • Spawn independent skeptics prompted to refute, not approve.
  • Use distinct lenses: correctness, security, reproducibility.
  • Accept only on majority agreement.
Codify human escalation boundariesP1
  • List destructive and regulated actions that require human approval.
  • Bundle evidence with each escalation.
  • Keep a visible queue of blocked tasks.
Best-practice patterns
Adversarial multi-judge verificationproductionFor high-stakes output, have several independent agents try to refute a result rather than one reviewer approve it; accept only on consensus.

Why it works: A single reviewer shares the proposer's blind spots; independent skeptics with distinct lenses catch plausible-but-wrong results that pass one-pass review.

verificationreviewsafety
Do this
  • Prompt verifiers to refute, not rubber-stamp, and default to reject-if-uncertain.
  • Give each verifier a distinct lens — correctness, security, does-it-reproduce.
  • Require majority agreement before a finding or change is trusted.
Avoid this
  • Treating one model's self-check as verification.
  • Running N identical reviewers instead of diverse lenses.
  • Confirmation-seeking prompts that nudge reviewers to agree.
Context compaction for long horizonsteamFor long-running agents, summarize and persist progress before the context window fills, so work survives compaction instead of degrading.

Why it works: Long tasks outlive any single context window; without deliberate compaction, agents silently drop early decisions and start repeating or contradicting themselves.

contextmemorygrounding
Do this
  • Checkpoint decisions and open threads to a durable artifact before compacting.
  • Summarize stale turns into structured state, not free prose.
  • Re-ground from the artifact after compaction instead of trusting recalled context.
Avoid this
  • Letting the window overflow and hoping the model still remembers.
  • Compacting history into vague prose that drops acceptance criteria.
  • Treating summarized memory as authoritative for current system facts.
Human escalation thresholdsproductionDefine exactly when the orchestra stops and asks a human: production writes, secrets, payments, legal, or ambiguous user intent.

Why it works: Strong orchestration is not full autonomy — it is clean escalation at the right boundary.

safetyopshuman-in-the-loop
Do this
  • Codify escalation triggers instead of relying on agent intuition.
  • Expose pending approvals in one queue.
  • Capture the full evidence bundle that caused escalation.
Avoid this
  • Human approval for every trivial step.
  • No human review for destructive actions.
  • Escalation with no context, logs, or diff attached.
Isolated workspaces for parallel writersproductionGive each concurrent agent its own sandbox or git worktree so parallel edits can't corrupt shared state, then merge through one gate.

Why it works: Parallelism only pays off when agents can't clobber each other — isolation turns collisions into explicit, reviewable diffs instead of silent corruption.

isolationdelegationcoordination
Do this
  • Run write-capable agents in per-task worktrees or sandboxes, not the live tree.
  • Reconcile branches through a single synthesis step that owns conflict resolution.
  • Discard an isolated workspace if its task is abandoned — never half-merge.
Avoid this
  • Multiple agents writing the same working directory at once.
  • Merging worker output with no conflict-resolution owner.
  • Sharing one set of credentials or mutable state across isolated lanes.
Review-gated execution laneproductionSeparate generation from approval: one agent proposes changes, another checks spec/security, then the executor applies.

Why it works: It catches shallow reasoning, over-broad edits, and unsafe side effects before they hit prod.

reviewsafetydeployment
Do this
  • Use at least one explicit review gate for schema changes, auth, billing, or deploys.
  • Review against both product spec and code quality — not just tests passing.
  • Keep reviewer prompts adversarial: ask what could break, leak, or drift.
Avoid this
  • Same agent writes and rubber-stamps its own work.
  • Review happening only after merge.
  • Treating green CI as the only approval signal.
Shared artifact spineteamCoordinate through explicit artifacts — plans, issue specs, receipts, test outputs, and decision logs.

Why it works: Artifacts survive context windows and prevent hidden assumptions between agents.

memoryhandoffcoordination
Do this
  • Use one canonical task doc per workstream.
  • Store acceptance criteria next to the artifact, not only in chat.
  • Log decisions and reversals so later agents know why a path changed.
Avoid this
  • Coordination purely through chat memory.
  • Multiple diverging TODO lists.
  • Undocumented manual fixes by human operators.
Small-batch delegationprototypeStart with 2–3 concurrent agents on independent slices, then scale only after measuring merge pain and review load.

Why it works: Parallelism helps only when synthesis cost stays lower than the work you save.

delegationthroughputcost
Do this
  • Split by file boundary or concern boundary, not by vague themes.
  • Cap parallelism until you can measure collision rate.
  • Always reserve one lane for validation and synthesis.
Avoid this
  • Spawning ten agents into the same surface area.
  • Parallel agents editing the same auth/config files.
  • Assuming more agents always means more speed.
Supervisor → worker graphproductionUse one planner/supervisor to break work into bounded sub-tasks and route them to narrow workers.

Why it works: You keep strategy centralized while shrinking the context and permissions each worker needs.

delegationsupervisionrouting
Do this
  • Make workers single-purpose: code, research, QA, or deployment — not everything at once.
  • Pass explicit task contracts with success criteria, budget, and allowed tools.
  • Require the supervisor to synthesize worker outputs before taking side-effecting actions.
Avoid this
  • Letting every agent talk to every other agent freely.
  • Giving all workers the full repo and full prompt history by default.
  • No review gate before write or deploy actions.
Tool-first groundingteamMake agents inspect live state before deciding: files, logs, DB rows, process state, metrics.

Why it works: Most orchestration failures come from agents acting on stale assumptions instead of current system state.

observabilitygroundingtooling
Do this
  • Require a live read before any irreversible action.
  • Prefer deterministic tools over memory for versions, counts, and current configs.
  • Persist structured outputs so downstream agents inherit facts instead of prose guesses.
Avoid this
  • Agents answering from memory for current facts.
  • Long prompt chains with no system-state refresh.
  • Passing screenshots or summaries when raw logs are available.