Contract Codegen Co-Ship
SkillDev toolsGuides your agent through updating and regenerating the public API contract files whenever request or response shapes change.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Contract Codegen Co-Ship skill
About this capability
Contract co-ship for Compozy wire changes. Use when editing public DTOs, OpenAPI, JSON-RPC extension shapes, generated clients, or handler request/response semantics. Do not use for internal Go refactors or test-only changes that leave the wire contract unchanged.
What this skill tells your AI
The instructions your AI receives, as published by compozy/compozy in .agents/skills/eng/eng-contract-codegen-coship/SKILL.md and read by ahel’s review.
Ship one atomic wire-contract bundle. This file owns the sequence;
references/coship-checklist.md owns the inventory.
Procedures
Step 1: Detect the Trigger
- Inspect the staged or about-to-be-edited files. Triggers (any one match):
internal/api/contract/**.gointernal/api/spec/**.goopenapi/compozy.jsonopenapi/compozy-daemon.jsonweb/src/generated/**- a public handler's request, response, status, authentication, or error shape changes even before a contract file is edited
- If no path or semantic trigger fires, this skill does not apply.
Done when: every changed wire shape and owning source is named, or the skill is explicitly ruled out with evidence.
Step 2: Plan the Co-Ship Bundle
- Read
.agents/skills/eng/eng-contract-codegen-coship/references/coship-checklist.mdin full. - Mark every applicable source, generated, backend, Web, site, CLI, UDS, native-tool, extension, config, QA, and official-skill item before editing.
- Record explicit no-impact evidence for checklist branches that do not apply.
Done when: every applicable checklist item has one owning file or verification command and no public surface is left implicit.
Step 3: Run Codegen Locally
- Execute
make codegenfrom the repo root. This regeneratesopenapi/compozy.jsonandweb/src/generated/compozy-openapi.d.ts. - If the contract is a JSON-RPC extension shape (not REST), the Go→TS generator also runs through
make codegen(seeinternal/codegen/openapits/generate.go). - Inspect the generated diff. Generated files MUST commit alongside source.
Done when: generated artifacts are deterministic, reviewed, and synchronized with their owning source.
Step 4: Update Web Consumers
- For each affected
web/src/systems/<system>/:- Open
types.ts. Remove DTOs that simply mirror the regenerated TypeScript types — import from@/generated/compozy-openapior the local re-export instead. - Open
adapters/. Update the typed wrappers if the request/response shape changed. - Open
query-keys.tsandquery-options.tsif response shape affects keys. - Open
hooks/. Update query/mutation hook return types and rollback logic. - Open
components/. Update presentational props if exposed shape changed.
- Open
- Update MSW fixtures and Storybook stories to match the new contract.
Done when: every affected consumer imports the canonical generated shape and its runtime/test fixtures agree.
Step 5: Update Site Documentation
- CLI verb changes: regenerate
make cli-docssopackages/site/content/runtime/cli/reflects the new flags / commands. - HTTP endpoint changes: update
packages/site/content/runtime/<area>/MDX files and any protocol documentation. - Configuration key changes: update
packages/site/content/runtime/configuration/MDX files. - Removed CLI verbs / endpoints / config keys: delete the doc pages in the same change (no "deprecated" markers).
Done when: public docs and agent-manageable surfaces describe only the shipped hard-cut contract.
Step 6: Verify the Bundle
- Run
make codegen-check. Output MUST be clean (no drift). - Run
make bun-lintfrom the repository root. - Run
bunx turbo run typecheck test build --filter=./webfrom the repository root when Web consumers are affected. - Run
bunx turbo run typecheck test build --filter=./packages/sitefrom the repository root when site content or generated inputs are affected. - Confirm every applicable co-ship checklist item passes.
- Run
make gateafter source freeze; exact-head PR CI owns full completion verification.
Done when: codegen has no drift, affected Turbo lanes and the local gate are green, the checklist is complete, and exact-head PR CI is scheduled or green for the enclosing workstream.
Error Handling
make codegenshows large diffs unrelated to your change: something else is out-of-date in the source tree. Investigate before committing — generated drift hides regressions.make codegen-checkfails aftermake codegen: there's a non-deterministic generator. Inspect the generator's output ordering, file formatting, JSON normalization. Use semantic JSON comparison and run formatter before write/check (lessondocs/_memory/analysis/analysis_local_runs.mdissue #6).- Web typecheck fails on imported generated type: the consumer is mirroring instead of importing. Move it to use the generated type and delete the duplicate.
packages/sitebuild breaks because a documented page references a removed verb: delete the page; don't add a "see new verb" stub.- CI passes locally but fails on a runner: Linux-race CI parity issue. Reproduce with
act workflow_dispatch -W .github/workflows/ci.yml -j verify --container-architecture linux/amd64.
Signals
- GitHub stars
- 3k
- Forks
- 177
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
eng-contract-codegen-coship- Source
- github.com/compozy/compozy