AT-301b · Module 1

Role Contracts

4 min read

A role contract is a formal specification that defines inputs, outputs, quality thresholds, and failure modes for every agent. It is the difference between "QUILL writes blog posts" and "QUILL accepts a topic brief (JSON), produces a 1200-1800 word post in markdown, maintains a Flesch-Kincaid score above 55, and returns a structured metadata block with title, excerpt, tags, and estimated read time."

Every contract has four sections. Input spec: what the agent receives, in what format, with what validation rules. Output spec: what the agent produces, with explicit quality thresholds. SLA: response time expectations — PATCH resolves tickets in under 4 hours; BLITZ delivers campaign briefs in under 2. Failure protocol: what happens when the agent cannot meet the contract — retry, escalate, or degrade gracefully.

  1. Define Input Specifications Document the exact format, required fields, and validation rules for every input the agent accepts. Ambiguous inputs produce ambiguous outputs. CIPHER's contract specifies JSON with required keys: dataset_url, metric_type, time_range, comparison_mode. Missing keys trigger a clarification request, not a guess.
  2. Define Output Specifications Specify the deliverable format, quality thresholds, and metadata requirements. RENDER's contract: output must be pixel-perfect at 1920x1080, include alt text, score above 8/10 on the four-dimension critique, and include the design rationale as a separate JSON block.
  3. Set SLA and Failure Protocols Every contract needs a time expectation and a failure path. If HUNTER cannot qualify a lead within the SLA window, the contract specifies: log the failure reason, tag the lead as "needs-manual-review," and notify CLAWMANDER for reallocation. No silent failures.