agent-contract

A set of rules that defines what an AI agent may and may not do when using swatplus-builder, a package for building and checking results. It separates the agent's decisions from the package's verification work.

In plain words
What is it for?
Use it to control agent access to building, testing, calibration, diagnostics, reruns, claim levels, and evidence-based summaries.
Why use it?
It prevents the agent from declaring its own results verified or hiding failed checks, making reports depend on recorded evidence.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ai-hydro/swatplus-builder/agent-contract
Clone the repo
git clone --depth 1 https://github.com/AI-Hydro/swatplus-builder
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 464 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00464
Opus 5 $0.00000 $0.00232
Sonnet 5 $0.00000 $0.00093
Haiku 4.5 $0.00000 $0.00046

Measured 2d ago against content hash 33a284c820c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs_site/agents/agent-contract.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The agent contract

When an AI agent operates swatplus-builder, it works under an explicit division of authority. This contract is what makes agent-operated runs trustworthy: the agent's capabilities are real, but bounded.

What the agent may do

The agent operates:

  • negotiate a contract (task, scope, requested claim tier);
  • call typed tools to build, run, calibrate, and verify;
  • read diagnostics and decide what to try next;
  • rerun and iterate;
  • summarize from the evidence bundle.

What the agent may not do

The package governs:

  • it builds, evaluates, and verifies;
  • it runs gates and records pass/fail with artifacts;
  • it decides the claim tier from evidence;
  • it blocks or downgrades a claim with a typed reason;
  • it writes the evidence bundle.

The agent cannot grant itself a tier, edit a gate result, or report a candidate metric as a verified one. Those are not exposed as actions.

The reporting rule

!!! quote "" Summaries must come from the evidence bundle, not from terminal text. Reporting a metric without disclosing a failed gate is overclaiming.

A correct agent summary reads evidence_summary.json, reports allowed_claims and blocked_claims, and cites verified metrics only. An agent that scrapes the highest NSE it saw scroll past in the logs is doing exactly what the governance layer exists to prevent.

Why a contract, not just a prompt

A prompt is advisory; a contract is checkable. The negotiated workflow_contract.json records the requested tier and the policy preconditions, validated before compute is spent. That gives both the agent and a human reviewer a machine-readable statement of what this run was supposed to establish — which the final evidence bundle can then be checked against.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 54 lines · 0 tokens per session scan A 33a284c820c2

Subscribe to this mod's changes

agent-contract is an agent published in the GitHub repository AI-Hydro/swatplus-builder (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 464 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.