An agent role is a boundary, not a title
Useful roles separate discovery, implementation, testing, and review. The role name should tell a person what kind of result to expect and which decisions remain outside the agent.
A three-layer review model can keep the final decision visible: the agent checks a defined surface, the owner validates evidence, and the team decides whether to accept the change.
| Layer | Responsibility |
|---|---|
| Agent review | Find issues in the defined scope with evidence |
| Owner review | Confirm relevance, reproduce important findings, and resolve gaps |
| Team decision | Accept risk, request work, or hold merge/release |
Separate roles by outcome
- Discovery agent maps files and runtime flow.
- Implementation agent works only after the plan is accepted.
- Test agent adds or runs bounded checks.
- Review agent inspects the actual diff without editing.
- Handoff agent summarizes state, evidence, and the next action.
Review handoff
Scope checked: ...
Files read: ...
Checks run: ...
Findings:
- severity: ...
location: path/to/file.ts:42
evidence: ...
action: ...
Open questions: ...
Stop condition: ...Avoid role collisions
- Give each role one primary outcome.
- Do not grant implementation rights to a review-only role.
- Do not ask a discovery agent to silently fix findings.
- Pass evidence and limitations between roles.
- Keep the owner responsible for merge and release decisions.
Useful even when the answer is no
Canonical lesson source · JavaRush
Open JavaRush material