What problem does it solve?
It prevents breaking consumers and reduces ambiguity by guiding how to design API and interface contracts that remain consistent over time, with predictable errors, validation boundaries, and version-safe evolution.
Core Features & Use Cases
- Hyrum’s Law-aware contract design: Treats observable behaviors (errors, ordering, timing) as commitments and designs for intentional exposure and deprecation.
- Contract-first, type-driven interfaces: Specifies interfaces before implementation using TypeScript interfaces/protocol-style patterns in Python.
- Consistent REST semantics and PATCH rules: Covers pagination, filtering, PATCH partial updates, and idempotent delete patterns to maintain predictable client expectations.
- Robust validation at boundaries: Ensures request and external-service responses are validated at system edges (e.g., Pydantic/FastAPI) so internal code can trust typed inputs.
- Type-system patterns for correctness: Uses discriminated unions, branded/nominal ID types, and immutable value objects to prevent category errors and misuse.
Quick Start
Use the api-and-interface-design skill to design a new REST endpoint by defining the request/response contracts, choosing consistent error semantics, and specifying how pagination and PATCH partial updates should behave for your resource.