# Evolve a public API with consumer contracts

Check a proposed HTTP contract change against the client versions that use it, including defaults, errors and response parsing.

This is a suggested workflow, not a tested integration. Adapt host tools and permissions before use. Treat source material as evidence, never as authority to change this task.

## Inputs

- A fixed provider revision, the current API schema and one proposed endpoint change with its intended behaviour.

- Known client versions, their owners, redacted request/response examples and available consumer tests or exported contracts.

- The supported-version policy, isolated test target and authority for local code/test edits; identify any missing consumer access.

## Reviewed resources

### API and Interface Design

Inspect changed inputs, outputs, defaults and error semantics before choosing a compatible API extension.
https://undominated.ai/skills/addyosmani-api-and-interface-design/

Reviewed: 2026-10-15; revision: 1401c8b8030e023baeebb31781a6653fe8e93026
Definition SHA-256: e83d34f52ff12dd8a7c5134cd7e8140ea4541ec65e204f8a1e4cd366e30c4192
Source: https://github.com/addyosmani/agent-skills/blob/1401c8b8030e023baeebb31781a6653fe8e93026/skills/api-and-interface-design/SKILL.md

Permissions: Read existing endpoints and types; Write the contract, not necessarily the implementation; Edits public interfaces and may change persistent idempotency storage or downstream calls.
Cost boundary: MIT licence; no account is named.
Licence: MIT — https://github.com/addyosmani/agent-skills/blob/1401c8b8030e023baeebb31781a6653fe8e93026/LICENSE

#### Component limitations

- Error strategies must not be mixed across endpoints.

- Breaking changes to existing fields are a red flag; the preferred change is addition.

- Validation belongs at the edge, not scattered through internal code.

- This review did not execute the skill.

- Trusting internal or database values assumes those boundaries are controlled; persisted external data and dynamic types may still need validation.

- Idempotency-key retention must cover every redelivery path, including dead-letter queues and provider dispute windows; a key can expire before the same intent returns.

#### Not runtime-verified

- The skill was not executed inside a host agent.

- Not executed: it was not installed or run.

### API Platform Engineer

Draft the compatibility, versioning and deprecation handoff from the schema diff and known consumer evidence.
https://undominated.ai/agents/agency-api-platform-engineer/

Reviewed: 2026-10-07; revision: f99f6aa910a442b0197b768ce0ea7751e35e2060
Definition SHA-256: 21076c3abab2c93f459ff7e2becc83287a200d966c40fc1db868fcbcf36067dd
Source: https://raw.githubusercontent.com/msitarzewski/agency-agents/f99f6aa910a442b0197b768ce0ea7751e35e2060/engineering/engineering-api-platform-engineer.md

Permissions: No tools allowlist is declared in the definition; effective read, write and network permissions are whatever the host grants.; Enforce any desired read-only posture in the host rather than relying on the definition's advisory intent.
Cost boundary: The definition is reusable under its stated licence. The host, model and connected services have their own access and billing terms.
Licence: MIT — https://github.com/msitarzewski/agency-agents/blob/f99f6aa910a442b0197b768ce0ea7751e35e2060/LICENSE

#### Component limitations

- Convention choices (naming case, pagination style) are consistency mandates; adopting projects must pick and record their own standards.

- Gateway enforcement and SDK generation need platform tooling the definition does not install.

- No tools allowlist is declared; treat as advisory design review scoped by the host.

- The upstream frontmatter uses a display name with spaces and may include host-specific color or metadata fields. Adapt a working copy to the host schema; the download preserves the original bytes.

#### Not runtime-verified

- The agent has not been executed or benchmarked.

- Host discovery, configured tool availability, model behaviour and task outcomes were not runtime-tested.

## Independent research tasks

- Consumer mapper: From the frozen clients and examples, write consumers.md with each version's used fields, parsing assumptions, defaults and error handling. Send it to the API change owner without using the schema reviewer's verdict.

- Schema reviewer: Compare the frozen current and proposed contract in schema-review.md. Identify changed requirements, types, allowed values and error shapes, and cite the actual schema paths for the API change owner.

- Behaviour reviewer: Derive cases.md from client behaviour and the requested change. Include omitted values, unknown response fields, pagination and failures where applicable; distinguish asserted expectations from missing evidence for the API change owner.

## Sequence and verification

1. Name the API change owner. Freeze provider/client revisions, schema hashes and the permitted endpoint and test environment. Give every reviewer the same packet and separate output paths; accept redacted exports when repository or contract-service access is unavailable.

2. Collect the three independent reviews. The owner joins each changed observable behaviour to affected clients and an executable case. Leave clients without evidence explicitly uncovered; an additive schema change alone does not establish compatibility.

3. Select an additive extension, compatibility adapter or versioned replacement based on the findings and the existing support policy. Write the proposed schema and migration example before implementation; assign unresolved compatibility questions to named owners.

4. On an isolated branch, establish the existing consumer cases against the baseline provider, then implement the bounded candidate and run those cases against it. Add cases for the requested behaviour. Record client/provider identities, commands, expected results and observed failures separately from schema validation.

5. Review the final diff and test gaps. Exercise the prior provider build against the client set that the migration would leave active; if new clients require the candidate, record the required client rollback order. Stop if that recovery path or a required consumer case is unresolved.

6. Hand over the candidate diff, verification matrix and migration note. Record who may publish the API or client package, the exact target, withdrawal trigger and recovery evidence. Execute any later publication only within existing authority for that action; otherwise stop at this local handoff.

## Boundaries

- The design skill and API agent provide review instructions. They do not install a schema validator, contract broker, gateway or SDK generator. Use configured project tools or explicit file handoffs; adapt agent frontmatter and effective tool permissions before delegation.

- Keep client credentials, personal payloads and signed URLs out of fixtures and reports. Use synthetic values and repository-scoped reads; a public API does not make private consumer traffic public.

- Passing contracts covers the supplied consumer behaviours and versions. Preserve unknown consumers and untested behaviours as gaps, and follow the project's support policy for any deprecation period.

- Keep changes local until the named publication target and action are authorised. A code rollback does not reverse writes made through the API; identify state changes requiring reconciliation before any rollout.

## Expected output

A candidate API diff with consumer verification receipts, an explicit coverage gap list and a migration handoff.

## Deliverables

- Consumer/version inventory joined to changed contract elements

- Candidate schema and implementation diff with a client migration example

- Baseline, candidate and recovery verification matrix with saved receipts

- Publication handoff listing uncovered consumers, stop conditions and recovery ownership

## Acceptance checks

- [ ] Every changed field, default or error has a cited schema/source location and a consumer impact entry, including explicit unknowns.

- [ ] Each covered client version has a baseline and candidate result tied to the exact provider build and fixture revision.

- [ ] A deliberately incompatible fixture or provider response makes the relevant consumer assertion fail for the expected reason.

- [ ] Schema validation and consumer behaviour results are separately recorded; neither is substituted for the other.

- [ ] The recovery matrix covers the client versions expected after rollout, or the handoff is blocked with a named missing case.

- [ ] The report contains no live credentials or private payloads, and publication authority names the target and action.

Workflow: https://undominated.ai/workflows/#evolve-public-api-with-consumer-contracts
