/polymath-streaming:event-schema-evolutionfrom polymath-streaming
Evolve event schemas safely — registry, Avro/Protobuf compatibility modes, upgrade order, breaking-change playbook, CI contract checks.
Ships in polymath-streaming. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A published event is a public API with an unknown set of consumers and a very long memory. Evolve it additively, enforce compatibility in CI, and when you must break it, version and migrate on purpose.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
Not this when: you're designing the business event catalog and sagas — polymath-architecture:event-driven-design; REST/HTTP API versioning — polymath-backend:api-versioning; topic partitioning and delivery — streaming-design.
event_id (unique, for idempotency), event_type, schema_version, occurred_at (event time), producer, correlation_id/trace context, and the subject/entity key. Keep the payload business-meaningful and past tense (polymath-architecture:event-driven-design). Avoid leaking internal table structure.reserved the removed ones. In Avro, removal is only safe for fields that had a default; renames need aliases.UNKNOWN symbol up front.orders.order-events.v2) with dual publishing for a defined window (via the outbox so both stay consistent); (b) migrate consumers one at a time, tracking who reads v1 (consumer-group lag/metrics, registry usage); (c) stop v1 only after the last consumer migrates and the deprecation date has passed (polymath-release:deprecation-plan); (d) archive or upcast old events for replay. Never "just deploy" a breaking schema to a shared topic.mergeSchema/Iceberg schema evolution) with a policy: additive columns auto-evolve; type changes and drops go through review (data-lake-layout).polymath-streaming:streaming-design).Schema evolution plan: orders.order-events (Avro, Confluent registry, 30-day retention, lake bronze replays full history)
Change requested: split `total` (decimal dollars) into `amount_minor` (int cents) + `currency`.
Assessment: BREAKING (type and unit change; consumers: fulfillment, billing, analytics-sink, fraud — 4 known [VERIFY: registry/consumer-group audit]).
Mode: BACKWARD_TRANSITIVE (history replayed) — current subject compatible; this change is not.
Plan (expand → migrate → contract)
1. Add optional `amount_minor` (default null) and `currency` (default null) to v3 — compatible; producer writes BOTH `total` and new fields (derived consistently in one place).
2. Consumers migrate to the new fields on their own schedule; contract tests assert `amount_minor == round(total*100)` during the window.
3. Window: 60 days; track readers of `total` via consumer metrics. Deprecation notice + dates sent to owners.
4. v4 removes `total` after the last consumer migrates; lake bronze keeps v1–v3 via mergeSchema; upcaster maps total → amount_minor for replay.
Envelope: event_id, event_type=OrderPlaced, schema_version, occurred_at, correlation_id, order_id (key) — unchanged.
CI: compatibility check on PR (BACKWARD_TRANSITIVE) + consumer contract tests; owner approval needed to change mode.
Rollback: stop writing new fields (they are optional) — consumers fall back to `total`.
Unknowns: [TBD: unregistered consumers reading raw topic], [VERIFY: rounding rule for fractional currencies].
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-streaming9 skills in this plugin
/azure-event-hubs-designDesign and size Azure Event Hubs — tier, throughput units, partitions, consumer groups, checkpointing, Capture, Kafka endpoint./data-lake-layoutDesign the physical data lake — zones, paths, Parquet and Delta/Iceberg, file sizing, partitioning, compaction, lifecycle tiers./data-modelingModel analytical data — dimensional (star/snowflake) vs normalized vs lakehouse medallion layers, grain, partitioning, slowly-changing dimensions, and schema evolution.Other plugins' skills for the same job