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.

LayerResponsibility
Agent reviewFind issues in the defined scope with evidence
Owner reviewConfirm relevance, reproduce important findings, and resolve gaps
Team decisionAccept 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

Minimum structured result
Scope checked: ...
Files read: ...
Checks run: ...
Findings:
- severity: ...
  location: path/to/file.ts:42
  evidence: ...
  action: ...
Open questions: ...
Stop condition: ...

Avoid role collisions

  1. Give each role one primary outcome.
  2. Do not grant implementation rights to a review-only role.
  3. Do not ask a discovery agent to silently fix findings.
  4. Pass evidence and limitations between roles.
  5. Keep the owner responsible for merge and release decisions.

Useful even when the answer is no

Canonical lesson source · JavaRush

Open JavaRush material