Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REPO_ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
DEST_HOME ?= $(HOME)
AGENTS_FILE ?= $(REPO_ROOT)/.agents/AGENTS.md
TOPIC_FILES := commits.md task-starting.md planning.md code-comments.md
TOPIC_FILES := models.md commits.md task-starting.md planning.md code-comments.md

.PHONY: apply test

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The repository keeps topics as separate files and the Makefile's ordered

```
<repository>/
├── models.md
├── commits.md
├── task-starting.md
├── planning.md
Expand Down
50 changes: 50 additions & 0 deletions models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Model delegation

**Claude Code only.** This topic applies to the Claude Code session model
(Fable), the Agent tool, and teammates. Codex has no equivalent mechanism and
can ignore it.

## Delegation policy (read first)

Fable is the orchestrator, not the worker. It is the most expensive tier —
spend its tokens only on decomposition, judgment calls, synthesis, and talking
to the user. Delegate everything else via the Agent tool, always picking the
cheapest model that does the job well.

- `model: "opus"` — default worker tier: implementation, debugging,
architecture-aware exploration, adversarial review. Prefer `claude-opus-4-8`
over `claude-opus-5-0` for this tier.
- `model: "sonnet"` — cheap tier: running tests and reporting output, simple
greps/lookups with a known target, rote refactors from an exact spec,
formatting, screenshot capture, admin chores. If getting it slightly wrong is
cheap to catch, use sonnet.

## Reasoning effort per tier

- **Fable** (orchestrator / session model) — medium.
- **opus** (`claude-opus-4-8`) worker — high.
- **sonnet** worker — high.

## Delegation by task

- **Exploration/research** — never read broadly yourself; spawn Explore agents
(opus) with tightly scoped questions and consume their synthesized reports.
Trivial "find the file that defines X" lookups can go to sonnet.
- **Implementation** — for any multi-file change, spawn general-purpose agents
(opus) with exact file paths, the relevant doctrine from this file, and a
definition of done (tests to run). Independent changes get parallel agents in
one message.
- **Verification/review** — adversarial review and blast-radius checks go to
opus agents; plain test runs and lint passes go to sonnet agents.
- **Fable edits directly** only when the change is small — one or two files, in
already-known locations.

## Token rules

- Don't echo file contents or long diffs back to the user; report conclusions.
- Give agents file paths and constraints up front so they don't rediscover this
file's contents; paste the relevant doctrine into the prompt.
- Batch independent agent launches in a single message so they run
concurrently.

Project-level `CLAUDE.md` may override this.
4 changes: 4 additions & 0 deletions tests/apply.bats
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ expected_claude() {
printf '%s\n\n' '<!-- managed-by: agent-dotfiles -->'
printf '%s\n\n' '# Global preferences'
printf '%s\n\n' 'Each topic is imported from the agent-dotfiles repository.'
printf '@%s/models.md\n' "$active_repo"
printf '@%s/commits.md\n' "$active_repo"
printf '@%s/task-starting.md\n' "$active_repo"
printf '@%s/planning.md\n' "$active_repo"
Expand All @@ -47,6 +48,8 @@ expected_claude() {
expected_agents() {
printf '%s\n' '<!-- managed-by: agent-dotfiles -->'
printf '%s\n\n' '<!-- Generated by make apply. Do not edit directly. -->'
cat "$active_repo/models.md"
printf '\n'
cat "$active_repo/commits.md"
printf '\n'
cat "$active_repo/task-starting.md"
Expand All @@ -62,6 +65,7 @@ make_fixture_repo() {
mkdir -p "$active_repo/scripts"
cp "$repo_root/Makefile" "$active_repo/Makefile"
cp "$repo_root/scripts/apply.sh" "$active_repo/scripts/apply.sh"
cp "$repo_root/models.md" "$active_repo/models.md"
cp "$repo_root/commits.md" "$active_repo/commits.md"
cp "$repo_root/task-starting.md" "$active_repo/task-starting.md"
cp "$repo_root/planning.md" "$active_repo/planning.md"
Expand Down