Skip to content

Subagent Roles and Output Contracts

Subagents are specialized Task agents invoked during the Ant-Digest workflow. Each has a defined role, input contract, and output contract. The orchestrating agent (the main Claude session) is responsible for routing work and validating outputs.

Purpose: Codebase navigation and context gathering. When: During scope and plan steps, or when context about existing code is needed.

FieldValue
Agent typeExplore
InputQuestion or search goal
OutputFile paths with line references, pattern descriptions
PlaneA (all claims must cite repo paths)
ConstraintRead-only — must not modify files

Purpose: Design implementation approach before writing code. When: During plan step for non-trivial changes.

FieldValue
Agent typePlan
InputScope statement + relevant file contents
OutputStep-by-step plan with file list, trade-offs, risks
PlaneA (repo refs) + C (assumptions tagged with RISK)
ConstraintMust not write or edit files

Purpose: Write code changes according to an approved plan. When: During implement step.

FieldValue
Agent typeLanguage-specific (e.g., voltagent-lang:typescript-pro, voltagent-lang:react-specialist)
InputApproved plan + file contents to modify
OutputFile edits with before/after
PlaneA (all changes are Plane A once written)
ConstraintMust follow plan — no unplanned changes

Purpose: Review completed code for correctness, security, and guideline compliance. When: During verify and guard steps.

FieldValue
Agent typesuperpowers:code-reviewer or feature-dev:code-reviewer
InputChanged files + plan + GUARDRAILS.md
OutputIssue list with severity, file:line references
PlaneA (all findings cite repo paths)
ConstraintRead-only — reports issues, does not fix them

Purpose: Fetch and synthesize external documentation or information. When: During federate step, or when Plane B context is needed.

FieldValue
Agent typegeneral-purpose or voltagent-research:research-analyst
InputSpecific question + allowed sources
OutputAnswer with source URLs, classified as Plane B
PlaneB (all claims must cite external source)
ConstraintMust follow MCP_POLICY.md for tool usage
  1. Every subagent output must declare its plane. No untagged claims.
  2. File references must use path:line format. Vague references like “somewhere in the codebase” are rejected.
  3. Assumptions must be tagged. Any inference not backed by evidence gets PLANE:C and RISK: description.
  4. The orchestrator validates outputs before incorporating them into the workflow. Plane C outputs cannot drive implementation without promotion.
  5. Subagents must not exceed their role. An Explorer must not edit files. A Reviewer must not fix code. Violations are logged and the output is discarded.
Orchestrator → Subagent:
- Task description
- Relevant file contents (pre-read)
- Applicable constraints (GUARDRAILS subset)
- Expected output format
Subagent → Orchestrator:
- Result with plane tags
- Evidence (paths, URLs, or RISK tags)
- Confidence level (if applicable)

A subagent must abort and return an error if:

  • Required input files are missing or unreadable
  • The task exceeds its role boundary (e.g., Explorer asked to edit)
  • A GUARDRAIL violation is detected in the input
  • Confidence is too low to produce useful output (return PLANE:C with RISK:low-confidence)