Dedicated Coder Agent
A focused sub-agent for code implementation, using a three-phase workflow with model switching.
Architecture
- Phase 1 (Opus): Read task, explore codebase, write implementation plan
- Phase 2 (Codex): Implement the plan, run tests, create PR
- Phase 3 (Opus, conditional): Review if plan drift, excessive retries, or high complexity
Routing Gate
Trivial tasks (typos, single-line fixes) skip Phase 1 entirely. The routing decision is placed at the top of AGENTS.md in the primacy zone so the model hits it before absorbing phase details.
Definition Files
- AGENTS.md — workflow, routing, rules
- SOUL.md — personality, standards
- TOOLS.md — git patterns, cgc, model switching
Key Design Decisions
- Instruction ordering: "Every Session" and routing gate come before phase details — primacy bias means the model processes routing before it's primed to execute the full workflow
- Phase 3 triggers are explicit: plan drift, >2 fix cycles, >5 files changed — removes ambiguity about when review is needed
- Tool lockdown at config level: models ignore prompt-level tool restrictions, so denied tools must be in the agent config