## Definition
A **specialised agent** is an AI instance configured for one role with the smallest tool surface that lets it do its job, the right model for the task, and a prompt that constrains its output shape. In Claude Code, lives under `.claude/agents/<name>.md`.
## The Four Ingredients
1. **System prompt** — identity and operating principles.
2. **Model** — sized to the task ([[Model Selection Strategy]]).
3. **Tool surface** — the smallest set sufficient for the job.
4. **Invocation surface** — when and how it is summoned.
## Working Roster
| Agent | Model | Tools | Primary job |
| ----------------- | --------- | ---------------------------------- | ------------------------------------ |
| Architect | Opus | Read-only + Web | Plans, decisions, public-API design |
| Builder | Sonnet | Read, Write, Edit, Bash(test/build)| Implements an approved plan |
| Critic | Sonnet | Read, Bash(test:*) | Reviews diff against spec |
| Security Auditor | Opus | Read-only, semgrep, dependency CLIs| Reviews diffs for security regressions |
| Release Manager | Sonnet | Read, Edit, Bash(git, npm version) | Cuts releases deterministically |
## Constraints, Not Personality
Don't write *"You are a senior engineer with 20 years of experience…"*. Write *"You may use Read and Grep. You may not call Write or Bash. Your output must be a plan."* The **constraints do the work**.
## Deterministic vs Creative Tuning
| Property | Deterministic agent | Creative agent |
| ---------------- | ------------------------------- | --------------------------------- |
| Model | Sonnet or Haiku | Opus |
| Reasoning budget | None / `think` | `think harder` / `ultrathink` |
| Prompt style | Numbered, "if X then Y" | Open: "weigh the alternatives" |
| Output format | Strict template | Markdown with sections |
A `release-manager` should be deterministic; an `architect` should be creative.
## Isolation Property
Sub-agents in Claude Code run in their **own context window**. Verbose output stays isolated; only a summary returns to the main thread.
## Related
- [[Model Selection Strategy]]
- [[Reasoning Budget]]
- [[Builder-Critic Pattern]]
- [[Sequential Pipeline]]
- [[Claude Code Documentation]]