create-contract

Reconciles cross-deploy boundary operations into a single executable OpenAPI contract.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/lucolucus/mismagent --skill create-contract-lucolucus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-contract
Source: https://github.com/lucolucus/mismagent/tree/main/plugins/mismagent-cross-deploy/skills/create-contract
Command: npx skills add https://github.com/lucolucus/mismagent --skill create-contract-lucolucus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a feature spans multiple deployable sides, teams risk drifting API contracts, duplicated schemas, and diverging names between consumer and producer. This Skill reconciles the operations implied by a building-block manifest into one executable OpenAPI YAML per boundary, keeping names aligned with the project's ubiquitous language. ## Core Features & Use Cases - Contract reconciliation: Derives the operation skeleton from the manifest's cross-deploy boundaries (commands become writes, views become reads) and fills in request/response schemas. - Re-entrant extension: Scans existing *.openapi.yaml files and extends the boundary's existing contract additively instead of forking a second source of truth, classifying every change as additive or breaking. - Canonical naming and error contracts: Names components/schemas with the canonical domain vocabulary and always models the consumer-driven 422 ValidationError shape. - Use Case: After running the model movement on a feature whose backend and frontend deploy separately, invoke this Skill to produce or extend the boundary's OpenAPI file, emit ADRs for versioning decisions, and hand stable operationIds to both sides' contract tests. ## Quick Start Ask the agent to reconcile the cross-deploy OpenAPI contract for the current feature from building-blocks.yaml, extending any existing contract for that boundary.

Frequently Asked Questions about create-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an OpenAPI contract from a domain model?

Derive the operation skeleton from the manifest's boundaries: application-service commands become write endpoints and read-model views become reads. Fill schemas from the tactical model and name every component with the canonical domain vocabulary.

When should I use OpenAPI versus an event schema for a boundary?

Use OpenAPI for request/response cross-deploy projections between different deployable sides. Event-schema wires (replication or sync) are reconciled on their schema files such as proto or event catalogues, not through OpenAPI mechanics.

How do I handle breaking changes to an existing API contract?

Classify every change as additive or breaking first. Additive changes keep the operationId and allow parallel consumer development; breaking changes require a versioning protocol (new operationId, versioned path, or header) decided in an ADR before applying.

Should the consumer or producer define API schemas?

Reads are consumer-driven since the consumer knows the views it needs, while writes are producer-driven since the producer owns invariants and validation. The architect arbitrates feasibility conflicts and records them in ADRs.

Why must OpenAPI schemas use canonical domain names?

Canonical names let each side's contract-test mechanism generate types with the same name, so a consumer importing a diverging name fails to compile. This defends against name drift, not just shape drift, across deployable sides.