API Contract Design
Create consistent, versioned API contracts from requirements.
Overview
Turn a concrete client workflow into a reviewable API contract. Describe success and failure states, validation boundaries, pagination, and backwards compatibility before implementing a server.
Referenced source
OpenAPI InitiativeOpenAPI specificationDraft. Independent runtime review pending.
Reference linked; draft instructions are original.
0.1.0, pinned in this draft.
Explicit permissions and limits below.
Claude Code, Codex, Cursor
Read requirements and draft contract files only when requested. No live API writes.
Capabilities
- Map user actions to stable resource contracts
- Define required and optional request fields
- Specify consistent validation and error responses
- Describe pagination and retry expectations
- Include realistic success and failure examples
- Review compatibility with existing clients
How it works
- Clarify consumers, use cases, and compatibility constraints.
- Draft the smallest request and response shapes that cover them.
- Walk through validation, failure, and retry scenarios.
- Validate the contract with the project tooling and record open decisions.
This is an original Reporadars draft, informed by the linked source. Compatibility has not been independently runtime-tested; inspect the instructions, permissions, and placement for your agent before use.
