Skip to content
GitHub

Contracts

Your agent can write the API or event contract first, checked against a house standard, so code and clients follow it.

You need agentbundle first. Install it once for your user account:

agentbundle install --pack contracts

In Claude Code you can install it as a plugin instead:

claude plugin install contracts@agent-ready-repo
  • Write an OpenAPI 3.1 contract from requirements, user stories, or a domain model.
  • Write an AsyncAPI contract for an event stream you own, with a standard message envelope.
  • Apply a house standard as hard rules. Zalando is the default, and you can swap it.
  • Check the contract from the consumer’s side: security, error shapes, and missing cases.
  • Review or extend a contract you already have.
  • api-contract — Writes or reviews an OpenAPI 3.1 contract, validated and ready for code generation, tests, mocks, and SDKs.
  • event-contract — Writes or reviews an AsyncAPI event contract. Use it when your feature produces or owns the event, not when it only consumes it.

Works with Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and Kiro IDE. Architect reads an existing contract as a boundary before it proposes a backend. Core grounds code against a contract through contract-acquisition when the build loop does not hold it. See Design an API contract, which also covers event contracts.

Does it write the implementation? No. It writes the contract. Code, tests, mocks, and SDKs follow from it.

Can I use my own standard? Yes. The API standard and the event envelope are both swappable. The defaults are Zalando and CloudEvents.

Will it write a contract for an event I only consume? No. Author an event contract only when your feature produces or owns the event.

Do I have to start from scratch? No. Give it the path to an existing spec and it reviews or extends it.

Scope: user (default), repo · Version: 0.3.8 · Source: packs/contracts