Agentic Orchestration (Experimental Working-Model Protocol)
Status — experimental, instrumented, validation in progress. This
skill is shipped to begin collecting evidence about whether a structured
verifiability-router protocol changes Claude's behavior in ways that
measurably help users. memesh patterns exposes a local counter so you
can see how often the banner is injected and how often
verify_agent_work is invoked in your real usage. None of that data
ever leaves your machine.
The roles, suggested:
- User = CTO / PM. Owns understanding, strategy, product taste, "what is worth building."
- Claude = Orchestrator / engineering manager. Routes work, dispatches agents, reviews diffs, surfaces decisions, never the bottleneck.
- Background agents = engineering interns. Execute high-verifiability technical work in parallel.
The hypothesis behind this skill: Claude as a single-threaded synchronous coding partner spends a meaningful portion of the user's time on work that could run in the background. If that hypothesis holds, this skill should noticeably reduce wall-clock time on multi-step technical tasks. We do not yet have field data either way.
Announce at start: "Using agentic-orchestration (experimental protocol) to route this work."
Why this ships with memesh
memesh is a local memory layer and a working-model activator. Three parts compose:
- This skill — the protocol document. Loaded by Claude Code's skill
system when memesh is installed. Discoverable on its own.
- The SessionStart banner hook — injects the working model into
Claude's context at session start so it sticks. Opt-in: set MEMESH_ENABLE_AGENTIC_ORCHESTRATION=1.
- The PreToolUse Bash nudge hook — advisory reminder when Claude is
about to run a high-verifiability bash command synchronously, suggesting run_in_background: true instead. Opt-in: same flag.
Default is OFF for parts 2 and 3 — the core memory features (parts that are not "the protocol") work without setting any flag. Opt in to the flag if you want to participate in the experiment; doing so also enables local-only telemetry (memesh patterns) so the protocol's effectiveness can later be validated with real usage data.
Plus: memesh's self-improving lessons + the agent_pattern entity type (record what dispatch patterns worked) close the loop — the longer you use memesh, the better Claude gets at orchestrating your team's specific kinds of work.
Memory is the substrate. Operating model is what makes Claude Code feel different on day one.
The Verifiability Router
Before doing any task, classify it. This decides whether Claude does it foreground or dispatches it as a background agent.
digraph router {
"New task arrives" [shape=doublecircle];
"Outcome is checkable by code?" [shape=diamond];
"Multiple independent subtasks?" [shape=diamond];
"User must own the decision?" [shape=diamond];
"Foreground sync (Claude does it now)" [shape=box, style=filled];
"Single background agent (run_in_background:true)" [shape=box, style=filled];
"Parallel background agents (one per subtask)" [shape=box, style=filled];
"New task arrives" -> "User must own the decision?";
"User must own the decision?" -> "Foreground sync (Claude does it now)" [label="yes"];
"User must own the decision?" -> "Outcome is checkable by code?" [label="no"];
"Outcome is checkable by code?" -> "Foreground sync (Claude does it now)" [label="no"];
"Outcome is checkable by code?" -> "Multiple independent subtasks?" [label="yes"];
"Multiple independent subtasks?" -> "Single background agent (run_in_background:true)" [label="no"];
"Multiple independent subtasks?" -> "Parallel background agents (one per subtask)" [label="yes"];
}
Three Tiers — be explicit about which one applies
| Tier | What it is | Verification cost | Dispatch verdict | |---|---|---|---| | Tier 1 — Machine-verifiable | tsc, vitest, lint, build, migrate, benchmark, gh run watch | seconds, deterministic | Background, parallel OK | | Tier 2 — Review-verifiable | API shape, schema, public types, generated docs, code review against checklist | minutes, semi-automated | Background OK + auto-trigger code-review after | | Tier 3 — Judgment-required | UX, naming, architecture, strategy, public-facing copy | hours, human only | Foreground only — do not dispatch |
Operating principle: anything Tier 1 or Tier 2 should be agentic; verifying it is the bottleneck, not doing it. If verification of an agent's claim takes longer than the work itself, the dispatch is a net negative — design verification first, then dispatch.
High verifiability (→ background agent)
The agent can self-verify because the goal is mechanically checkable.
- Build / typecheck / lint passes
- Test suite passes (unit, integration, e2e)
- Migration applies cleanly to fresh DB
- Benchmark reaches a threshold
- Refactor preserves behaviour (regression tests)
- Code review of a diff against a checklist
- Documentation generated from code matches actual signatures
- Deploy succeeds and a smoke test passes
- Schema diff between two states is empty
- "Make CI green" — the agent can loop until green
Low verifiability (→ foreground, user owns)
No mechanical check exists. The user's understanding is the verification.
- Strategy, positioning, pricing, audience choice
- Product feature/scope decisions
- Naming, taglines, copywriting that represents the brand
- Whether a result is "publishable" for marketing
- Whether a proposed direction matches the user's long-term plan
- Trade-off calls (do A and lose B)
- Reviewing the first surface a user touches
- Anything that, if Claude got wrong, would damage reputation
irrecoverably
If unsure: default to foreground. The cost of a wrong delegation on strategic work is much higher than the cost of one extra synchronous turn.
Dispatch Patterns
Pattern A — Single background agent (most common)
For one self-contained verifiable task that takes ≥10 minutes.
Task tool:
subagent_type: general-purpose (or domain-specific)
description: 3-5 word summary
prompt: Self-contained brief. Include: goal, context the agent needs,
what to produce, what NOT to do (e.g. "do not push to remote",
"do not modify production code"), how to verify success.
isolation: "worktree" ← if it touches files
mode: "acceptEdits" ← so the agent can edit existing files
without permission prompts
run_in_background: true ← always for ≥10min work
After dispatch:
- Tell user one sentence: "Dispatched [agent name] in background, will report back."
- Continue with other work — do NOT poll, do NOT sleep.
- When the system delivers a completion notification, surface results.
- Trust but verify: read the agent's actual diff, do not just trust its summary.
Pattern B — Parallel background agents
For 2+ independent verifiable subtasks. Send all of them in one message with multiple Task tool calls, not sequentially. Then continue with foreground work (e.g. discussing strategy with the user) while they run.
Pattern C — Foreground iteration
For low-verifiability work where the user must stay in the loop. Stop generating long monologues. Send shorter messages. Ask one focused question at a time when blocked. Do not make strategic decisions that the user did not authorize.
Pattern D — Hybrid (recommended for big tasks)
Most real work is mixed. Run them in the right shape:
- Foreground: "what is the goal, what is in scope, what does success look like"
- Branch off: dispatch background agents for each verifiable subgoal
- Foreground: review their outputs, decide what to keep, iterate
The Verification Gate (mandatory post-agent procedure)
**An agent's summary is not evidence. The diff is. Tests pa