Enum Evolution Contract Repair

    by Mariusz Wrzeszczynski

    1

    Repair enum and status evolution drift across schemas, generated clients, serializers, UI, analytics, tests, and mixed-version consumers.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    I have a TypeScript monorepo with a Node API, Prisma/PostgreSQL, generated OpenAPI clients, React, and background jobs. We added PARTIALLY_REFUNDED to the OrderStatus enum. Prisma and the API schema know about it, but one generated client is stale, two frontend switches throw on unknown values, analytics maps unknown statuses to FAILED, an old worker fixture still assumes four values, and the migration note says older app versions may remain during rollout. Repair the enum evolution contract across the repository. Add deterministic local tests for mixed versions and unknown values. Do not query production, change existing order rows, deploy, or decide what PARTIALLY_REFUNDED should mean to the business.

    Your agent does

    Enum evolution drift found. The repository has a stale generated client, two closed-world UI switches, unsafe analytics coercion, and incomplete mixed-version coverage. The repair regenerates the client, adds explicit unknown-value handling, preserves existing serialized values, updates fixtures, and adds compatibility tests. Business meaning and deployed compatibility remain human-owned and unverified.

    What you get

    Fix exhaustive switches that crash on new status values.Restore stable numeric assignments in Protobuf or Avro schemas.Regenerate out-of-sync API clients and DTOs safely.Prevent analytics data loss by mapping unknown values to explicit buckets.

    About this skill

    Enum changes are deceptively small: one new status can break generated clients, exhaustive UI switches, protobuf consumers, analytics mappings, fixtures, migrations, and old application versions.

    Enum Evolution Contract Repair gives an AI coding agent a disciplined repository workflow for finding every representation of an enum or discriminator, freezing stable wire identifiers, detecting unsafe unknown-value fallbacks, regenerating derived artifacts, and building mixed-version compatibility tests.

    It is especially useful for OpenAPI/GraphQL clients, protobuf or event schemas, ORM/database enums, frontend status renderers, mobile clients, analytics mappings, warehouse allowlists, mocks, golden files, and rollout documentation.

    The skill does not publish schemas, rewrite production data, deploy, or invent the business meaning of new statuses. It keeps those decisions with authorized owners while making the repository mechanically safer.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Frequently Asked Questions

    Popular in AI Agents & LLM Ops