A delegation policy for Claude Code's main conversation, plus three subagents it
can hand work to. The policy is not a pipeline: the main model works inline by
default, and most tasks need no agents. Nothing in it depends on which model
runs the main conversation, and it is not a bridge to another vendor's CLI.
flowchart LR
U([Request]) --> M{Main conversation}
M -->|"quick, conversational, or<br>slower to specify than to do"| I[Work inline]
M -->|"substantial work,<br>fully specified up front"| E["executor<br>opus · edits assigned files"]
M -->|"many files, logs<br>or web pages to read"| R["researcher<br>sonnet · read-only"]
M -->|"large, risky, or<br>untested finished work"| V["verifier<br>opus · read-only"]
G[["readonly_guard.py<br>denies git-state and dependency changes"]] -.-> R
G -.-> V
| Agent | Does | Model, effort | Tools |
|---|
executor | Implements one self-contained unit end to end inside assigned files | opus, high | Read, Grep, Glob, Bash, PowerShell, Edit, Write |
researcher | Answers one high-volume research question with evidence | sonnet, high | Everything except Edit, Write, NotebookEdit, Agent (MCP tools included) |
verifier | Independently checks completed work; returns a verdict | opus, high | Read, Grep, Glob, Bash, PowerShell |
The policy itself is one short file: rules/orchestration.md.
Install
Needs Claude Code v2.1.251 or later.
As a plugin (recommended). Agents are namespaced as delegate:executor and
so on, and the read-only guard comes with it:
/plugin marketplace add kurcontko/delegate
/plugin install delegate@delegate
As plain files. Copies the agents to ~/.claude/agents/ and the policy to
~/.claude/rules/, for every project, without touching any CLAUDE.md:
git clone https://github.com/kurcontko/delegate
./delegate/install.sh # re-run to update
./delegate/install.sh --uninstall
The installer tracks what it wrote in ~/.claude/.delegate-manifest. It refuses
to replace a file it did not write or one you edited since (--force
overrides), and --uninstall removes only files that still match. An install
made under the old name, fable-orchestrator, is picked up and moved over. This
route does not install the guard hook; see
the guard notes to add it yourself.
For one project only, copy agents/*.md to .claude/agents/ and
rules/orchestration.md to .claude/rules/ in that repo.
Check that it works
/context lists the three agents under Custom Agents.
- While a worker runs,
/tasks shows the model and effort it runs on.
The read-only guard
researcher and verifier have no edit tools but keep a shell, because a
verifier has to run tests and a researcher has to read git history. A
PreToolUse hook, scripts/readonly_guard.py, checks every shell command from
those two agents:
- Git is an allow list. Read-only subcommands (
status, log, diff,
show, blame, …) run; everything else, including fetch and anything the
guard has never heard of, is denied.
- Dependency changes are denied (
npm install, pip install,
cargo add, go get, …), also through uv run, npx and the like. Test
runners are left alone.
- It is not a sandbox. File writes such as
rm or a redirect, and network
calls, cannot be told apart from legitimate work by reading a command line, so
for those the rule remains an instruction.
- It fails open if
python3 is missing, and is best-effort on Windows.
The main conversation and the executor are never affected. Details, limits,
and the hook snippet for plain-file installs: docs/readonly-guard.md.
Tune it