/polymath-architecture:event-driven-designfrom polymath-architecture
Design an event-driven flow — event catalog, choreography vs orchestration, saga + compensation, the outbox pattern for dual-writes, idempotent consumers, and CQRS read models.
Ships in polymath-architecture. 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.
Read when SKILL.md points to them.
Events decouple services in space and time — and move every hard problem to delivery semantics. Design the failure paths first; the happy path is the easy 10%.
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.
polymath-architecture:event-driven-design.Not this when: the integration is two services and request/response is fine — that is integration-design. For the broker's partitioning/throughput tuning, that is polymath-streaming:streaming-design.
For event schema compatibility and versioning, polymath-streaming:event-schema-evolution; for worker/queue sizing, retries, and DLQs, polymath-scalability:async-workload-design.
OrderPlaced, PaymentCaptured), not CRUD (OrderRowUpdated). Each has an owner, a schema, and a versioning rule.Event-driven design: order fulfillment
Events (past tense · owner · schema · version rule)
OrderPlaced Ordering orders.v3 additive-only; breaking → OrderPlaced.v4 dual-published 90 d
PaymentCaptured Payments payments.v2 additive-only
ShipmentCreated Fulfillment fulfil.v1 additive-only
Coordination: orchestration — a fulfillment saga (needs status + multi-step compensation)
Saga
step compensation
reserve stock release stock
capture payment refund payment
create shipment cancel shipment (cannot fail after carrier pickup → manual review queue)
Dual-write: transactional outbox in each service DB; Debezium relay → Kafka
Idempotency: consumers dedupe on event_id (processed_events table, 7 d)
Ordering: partition key = order_id (one order's events in order; no global order assumed)
Correlation: correlation_id on every event, propagated to traces
Inline by default; when a workflow step or the user wants it kept, write it to docs/architecture/<slug>-events.md (slug from the system or context name, lowercased, non-a-z0-9 runs → -).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-architecture8 skills in this plugin
/aggregate-designDesign DDD tactical aggregates for a bounded context — aggregate roots, entities vs value objects, invariants, transaction/consistency boundaries, reference-by-id./bounded-context-mapMap a domain into DDD bounded contexts + a context map (customer-supplier, conformist, anti-corruption layer, shared kernel) with per-context ubiquitous language./design-patterns-applyReview a design sketch against SOLID, GoF, and architectural patterns; flag anti-patterns at design time; not line-level code review (code-review).Other plugins' skills for the same job