agh-contract-codegen-coship

Enforce same-PR regeneration and consumer updates for backend API contract changes.

182|8|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/compozy/agh --skill agh-contract-codegen-coship
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agh-contract-codegen-coship
Source: https://github.com/compozy/agh/tree/main/.agents/skills/agh/agh-contract-codegen-coship
Command: npx skills add https://github.com/compozy/agh --skill agh-contract-codegen-coship

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents breaking integration between backend wire contracts and the generated frontend types by ensuring contract changes ship together with the required OpenAPI and TypeScript regeneration outputs.

Core Features & Use Cases

  • Contract co-ship enforcement: Detects edits to backend contract and spec artifacts and requires the same-PR regeneration bundle.
  • Deterministic regeneration workflow: Regenerates openapi/agh.json and web/src/generated artifacts and then updates affected web consumers to use generated types instead of mirrored duplicates.
  • Verification gate: Runs codegen checks plus web and site typecheck/test/build steps and validates against the coship checklist before committing.

Quick Start

Run this skill when you change contract DTOs, OpenAPI specs, or JSON-RPC extension shapes to generate, update, and verify all required downstream artifacts in a single PR.

Frequently Asked Questions about agh-contract-codegen-coship

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

FAQPage Schema
How do I keep OpenAPI generated types in sync when backend contract DTOs change?

Contract co-ship enforcement detects backend OpenAPI spec edits and requires same-PR regeneration of web/src/generated TypeScript artifacts. It updates affected web consumers to use generated types instead of mirrored duplicates.

How do I update frontend TypeScript types after modifying a JSON-RPC extension shape?

Run the deterministic regeneration workflow to update frontend TypeScript types after modifying JSON-RPC shapes. This regenerates openapi/agh.json and web/src/generated artifacts, then updates affected web consumers.

What is contract co-ship enforcement for API spec evolution?

Contract co-ship enforcement prevents breaking integration between backend wire contracts and generated frontend types by ensuring API spec changes ship together with required OpenAPI and TypeScript regeneration outputs in the same PR.

How do I run codegen checks and web typecheck tests to verify API contract changes?

Run the verification gate to verify API contract changes by executing make codegen, make codegen-check, make web-typecheck, and make web-test. It validates against the coship checklist and ensures make verify passes before committing.

Does this contract codegen workflow support both REST and JSON-RPC spec evolution?

Yes, the contract codegen workflow supports both REST and JSON-RPC spec evolution. It enforces same-PR regeneration and consumer updates when backend API contract files or OpenAPI generated schemas change.

What documentation needs updating when changing internal API contract artifacts?

Documentation under packages/site/content requires updates when changing internal API contract artifacts. The verification gate validates these doc updates alongside running codegen checks and web typecheck/test/build steps.