| name | maintain-a-public-api |
| category | code |
| description | Evolve a public API with explicit contracts, compatibility classification, consumer evidence, tests, documentation, and operational safeguards. Use when changing behavior, schemas, versions, limits, errors, or lifecycle policy for external consumers. |
maintain-a-public-api
Treat consumer-observed behavior as the interface, including errors, timing, ordering, idempotency, and operational
limits. Make each change deliberate and testable.
Inputs
- Gather the current schema, documentation, SDKs, consumer inventory, telemetry, support policy, and version rules.
- Identify authentication, authorization, privacy, rate, availability, performance, and compliance constraints.
- Use representative consumer contract tests and historical incidents.
Procedure
- Inventory documented and de facto behavior consumers may rely on.
- Classify the proposed change as compatible, conditionally compatible, deprecating, or breaking with evidence.
- Review request, response, error, ordering, pagination, retry, idempotency, and timing effects.
- Design additive or versioned evolution before choosing a breaking path.
- Update the machine-readable schema, implementation, examples, SDKs, and human documentation together.
- Run provider and representative consumer contract tests across supported versions.
- Test authorization, limits, invalid input, timeouts, partial failure, and backward compatibility.
- Plan release, observability, support, deprecation, rollback, and consumer communication.
- Monitor version adoption, errors, latency, limit events, and unexpected consumer behavior.
- Record the decision and remove compatibility only through the approved lifecycle.