reviewer-output — Reviewer agent contract
The uniform output contract every reviewer agent dispatched by the
xema/review primitive must produce. The review workflow injects
this deliverableSpecRef into every agent invocation it dispatches
(mandatory or advisory), and the existing harvest path validates against
it. A schema violation surfaces as abstain to the gate — never as
silent acceptance.
When this spec applies
- Every recipient of kind
agentinside axema/reviewreviewer pool. The review workflow appendsdeliverableSpecRef: reviewer-outputto the agent invocation regardless of which agent slug is used. Any agent that can produce this shape can serve as a reviewer. - It does not apply to:
- Direct
xema/decision-gaterecipients (those usedecision-gate-replyreply schemas). - Workflow recipients (
kind: workflow— they map outputs throughverdictMapper, not through this spec). - Endpoint recipients (verdict mapping happens in
verdictMapper).
- Direct
- It does not gate human reviewers — humans submit verdicts through the Tasks UI and never write a deliverable.
Schema
schema.zod.ts (canonical):
1const ReviewerFindingSeveritySchema = z.enum([
2 'critical', 'major', 'minor', 'info',
3]);
4
5const ReviewerFindingSchema = z.object({
6 severity: ReviewerFindingSeveritySchema,
7 area: z.string().min(1),
8 message: z.string().min(1),
9});
10
11const ReviewerVerdictSchema = z.enum(['approve', 'reject', 'abstain']);
12
13const ReviewerAgentOutputSchema = z.object({
14 verdict: ReviewerVerdictSchema,
15 summary: z.string().min(1),
16 findings: z.array(ReviewerFindingSchema),
17 suggestedEdits: z.array(z.string().min(1)).optional(),
18});Field semantics
| Field | Required | Notes |
|---|---|---|
verdict | yes | Closed set: approve (vote yes), reject (vote no), abstain (no opinion). Subject to the recipient's mandatory bit on the gate. |
summary | yes | Single-paragraph rationale. Surfaces in the human reviewer's findings panel and in the per-iteration trail. |
findings | yes (may be empty) | Structured issues. area is open-ended (e.g. "security", "naming", "performance") — the contract does not impose a closed taxonomy. |
suggestedEdits | optional | Concrete change suggestions surfaced to the next-iteration drafter as priorReviewerFeedback / pastIterations[].reviewerVerdicts. |
Verdict semantics under xema/review
approveandrejectcount toward policy resolution iff the recipient ismandatory: true. Advisory recipients still emit them but don't gate.abstainis a non-vote. The review workflow records it but never short-circuits on it.- Repeated
rejectfrom an agent is what drives the loop'sagentMaxIterationsdemotion;abstaindoes not count toward that threshold.
Why this is a kernel-tier spec
xema/review is a first-party platform primitive — every install
that ever uses review needs this contract. It therefore ships in the
kernel runtime biome, alongside the other always-on baseline content.
Biomes are free to introduce richer review contracts for their own
actions, but those are biome concerns, not platform ones.
The kernel runtime biome
The runtime biome is the baseline every agent workspace extends from. It is mandatory: the biome host refuses to start unless it resolves, so it is present on every installation.
| Content | What ships |
|---|---|
| Deliverable spec | reviewer-output, described on this page. |
| Workspace manifests | Four base manifests that other manifests inherit from: primary-agent-base (coordinators and leads), agent-session-base (interactive chat sessions), subagent-base (sub-agents) and reviewer-base. Inputs and references mount read-only. Deliverables are read-write for the primary, session and sub-agent bases. For reviewers the whole workspace is read-only, so findings leave through dedicated review activities, never as workspace writes. Sub-agents see no end-user uploads. |
| Role capabilities | Nine roles: agent-session, generic-agent, coordinator, clarification-coordinator, unit-worker, scope-validator, auditor, document and gate-reviewer. A gate reviewer, for example, may write only its own pages and may never edit repositories or write to the knowledge base. |
| Skills | Thirteen baseline skills: building agents, compositions, skills and tools; deep-research and web-research; browser-navigate-scrape; document-pdf-to-markdown; media-transcribe-audio; chat-widgets; deliverable-contract (how an agent reads its contract); declare-output-surface; and scratch-workspace. |
| MCP catalog | Tool entries for the services the base ships: knowledge, artifact, project, rules, catalog, audit and the organization-database explorer. A product biome adds the entries for its own services. |
The roster of platform agents that use this baseline is on the Subagents page.