Layer 2: Agent Definitions
Roles, access boundaries, and retry policy for every agent in CAF.
Layer 2 defines who does what. Every role in the PIV cycle has its own definition
file in .claude/agents/ — generated by caf-initiator init, already informed by
context from Layer 1: Project Knowledge Base.
The four roles
| File | Role | Access |
|---|---|---|
planner.md | Drafts a work plan from the ticket | Read-only to code |
implementer.md | Writes code per the approved plan | Read-write |
verifier.md | Scanner — lint, tests, automated review | Read-only |
reviewer.md | Prepares a diff summary & checklist for human review | Read-only |
reviewer.md does not replace a human. Its instructions produce a summary that
makes it easier for a human to decide approve/reject — the final decision always
stays with a human, per the mandatory checkpoint at every phase.
What's inside a definition file
- Role scope — the boundaries of that role's responsibility, nothing more
- Access boundaries — which tools are allowed, especially the read-only vs. read-write status
- Retry policy — a maximum of 3 attempts before escalating to a human
- Output format — the artifact structure that must be produced at the end of the phase (see Layer 3: Artifact Handoff)
Customization
These files aren't locked-down configuration. You can edit them directly to fit your
team's workflow — for example, adding a rule to implementer.md like "always write a
test for every new function."
Relationship to other layers
Layer 2 consumes context from Layer 1 and determines the artifact format that gets written to Layer 3: Artifact Handoff at the end of every phase.