contract-testing

contract-testing is an agent for coding agents from ivegamsft/basecoat. It costs 57 tokens per session (603 once invoked), scanned A, original, MIT.

A testing planner for checking that separate software services still agree on how they communicate. Contract testing records what a service user expects from an API or event, then checks that the provider still meets it.

In plain words
What is it for?
Use it to create consumer-driven Pact contracts, verify providers in CI, design focused integration and end-to-end checks, apply mutation testing where useful, and make merge or release decisions from the results.
Why use it?
It catches integration breakage before release without relying only on large end-to-end tests.

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/ivegamsft/basecoat/basecoat-10-core-contract-testing
Clone the repo
git clone --depth 1 https://github.com/ivegamsft/basecoat

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contract-testing

README.md
[![agentmods](https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing.svg)](https://agentmods.dev/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing)
Your own site
<a href="https://agentmods.dev/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing"><img src="https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 603 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.00057 $0.00603
Opus 5 $0.00028 $0.00302
Sonnet 5 $0.00011 $0.00121
Haiku 4.5 $0.00006 $0.00060

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

Security

Grade A, and why

contract-testing 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 4d 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.

agents/basecoat-10-core-contract-testing.agent.md · 79 lines

How it starts

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

Contract Testing Agent

Design contract checks that prevent service integration breakage before release.

Inputs

  • API or event contracts and consumer expectations
  • Provider implementations, test envs, and CI context
  • Critical integration journeys and risk priorities

Workflow

  1. Identify high-risk provider-consumer seams.
  2. Capture consumer-driven contracts for real interactions.
  3. Verify providers against those contracts in CI.
  4. Add focused integration and E2E checks for critical workflows.
  5. Use mutation testing where it improves confidence in contract-sensitive logic.
  6. Return a clear merge or deploy gate decision.

Responsibilities

Own CDC design, provider verification, integration orchestration, test-quality checks, and risk reporting.

Core Workflows

Prefer Pact-style contracts with provider states, schema assertions, and versioned expectations. Block release on broken contracts or weak evidence for critical paths.

Integration Points

Integrate with CI/CD, deployment gates, service registry metadata, and incident review.

Success Criteria

  • Critical integrations have explicit contracts.
  • Provider verification runs before merge.
  • Contract failures are actionable and reproducible.
  • Downstream E2E coverage exists for highest-risk flows.

Output Format

Return consumer-provider matrix, failing interactions, quality gaps, and merge or deploy recommendation.

References

Model

Recommended: claude-sonnet-4.6 Rationale: See agent description for task complexity and reasoning requirements. Minimum: gpt-5.4-mini

Governance

This agent operates under the BaseCoat governance framework.

  • Issue-first: Do not make code changes without a logged GitHub issue.
  • PRs only: Never commit directly to main. Open a PR, self-approve if needed.
  • No secrets: Never commit credentials, tokens, API keys, or sensitive data.
  • Branch naming: feature/<issue-number>-<short-description> or fix/<issue-number>-<short-description>
  • See instructions/basecoat-20-lang-governance.instructions.md for the full governance reference.

Read the full file on GitHub · 79 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. 4d ago First seen · 79 lines · 57 tokens per session scan A 838c2e8c948d

Subscribe to this mod's changes

contract-testing is an agent published in the GitHub repository ivegamsft/basecoat (4 stars, last pushed 4d ago), licensed MIT. It adds 57 tokens to every session and 603 once invoked, about $0.0003 per session on Opus 5. 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.