Agent Orchestration Patterns
Agent orchestration patterns I’ve actually used. Every entry has a date and context.
Entries from multi-agent workflows, background task delegation, and worktree isolation patterns. See Claude Code Patterns for specific tool usage.
2026-03: Agent Model Selection — haiku for Read-Only, sonnet for Write
Problem: Running all agents on sonnet is expensive and slow. Some agents only need to read and report.
Context: Designing 10 agents across global and project-scoped configs.
The Pattern:
-
doc-auditor— haiku (reads files, reports issues, no writes) -
adoc-linter— haiku (10-point lint check, report only) -
carryover-updater— haiku (narrow scope: increment counters in 4 files) -
build-fixer— sonnet (reads errors, writes fixes, needs judgment) -
project-modularizer— sonnet (splits monolithic files, creates new structure) -
workflow-documenter— sonnet (composes narrative documentation)
Rule: haiku for read-only/narrow-scope agents. sonnet for agents that write or need architectural judgment. Model choice is a cost/capability trade-off, not a default.
2026-03: Agent Scope — Global vs Project
Problem: Some agents apply to all repos (doc-auditor, adoc-linter). Others are repo-specific (worklog-creator, carryover-updater).
Context: Managing agents across 15+ domus-* repos.
The Pattern:
~/.claude/agents/ # Global — applies everywhere
├── doc-auditor.md # Universal documentation audit
├── adoc-linter.md # Universal AsciiDoc linting
├── build-fixer.md # Universal build repair
└── project-modularizer.md # Universal partial extraction
project/.claude/agents/ # Project-scoped — overrides or adds
├── worklog-creator.md # domus-captures only
├── carryover-updater.md # domus-captures only
├── build-fixer.md # Override with project paths
└── workflow-documenter.md # domus-captures only
Rule: Global agents handle universal concerns (linting, auditing). Project agents handle repo-specific workflows. Project files with the same name override global. Scope matches responsibility.
2026-04-03: Parallel Agent Orchestration for Bulk Rename
Problem: 57 occurrences of "t16g" needed renaming to "p16g" across 10 files.
Context: P16g deployment, hostname corrected mid-project.
The Fix: Launched explore agent (audit) to identify all occurrences, then two parallel background agents to execute renames and fix related bugs. Total: 57 changes + 4 bug fixes in ~50 seconds.
Rule: For bulk operations: (1) audit agent produces manifest, (2) execution agents apply changes in parallel. Never edit manually what can be automated.
Worklog: WRKLOG-2026-04-03
2026-03: Daily Workflow — Hooks > Skills > Agents > Deploy
Problem: Daily documentation work involves many steps that could be forgotten or done inconsistently.
Context: Daily operations workflow, formalized in wf-daily-operations.adoc.
The Pattern:
1. SessionStart hook → "Professional Environment Active" banner
2. /worklog skill → Create today's worklog
3. carryover-updater agent → Increment day counters in trackers
4. [Documentation work with auto-backup + validation hooks running silently]
5. /deploy skill → Push spoke repo + trigger Cloudflare rebuild
6. build-fixer agent → Fix any build warnings (if needed)
Rule: Layered automation: hooks fire automatically, skills invoked explicitly, agents handle judgment-requiring tasks, rules enforce standards silently. Each layer has a different trigger model.