/polymath-architecture:distributed-consistencyfrom polymath-architecture
Choose a consistency model for a cross-node operation — strong/eventual/causal, CAP/PACELC trade-off, idempotency + dedup, and when consensus (Raft/quorum) is warranted vs simpler.
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.
"Consistent" is not one thing. Name the model you need per operation — most need less than strong, a few need more than eventual — and pay only for that.
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:distributed-consistency.Not this when: the consistency boundary is inside one service's object model — that is aggregate-design. For the messaging mechanics that deliver updates, see event-driven-design.
R+W>N). It costs latency and operational complexity — if a single writer or a managed transactional store suffices, prefer that and say so.Consistency decision: refunds across eu + us regions
Operation Model Why weaker won't do
issue refund strong double refund = lost money; single-writer per payment (home region)
refund status read read-your-writes merchant must see the refund they just issued
merchant dashboard eventual (≤ 30 s staleness) aggregate totals; brief lag is fine
CAP/PACELC: partition → refunds for a payment are unavailable outside its home region (C over A);
normal operation → home-region writes pay ~80 ms cross-region latency (PACELC: C over L)
Idempotency: Idempotency-Key per refund request, dedup table keyed (merchant, key), 24 h retention
Conflicts: none for refunds (single writer); dashboard counters converge by recompute, not merge
Consensus: not needed — the managed DB's single-region primary is the serialization point
Client sees: partition → 503 + Retry-After for refund writes in the non-home region; reads stay up
Inline by default; when a workflow step or the user wants it kept, write it to docs/architecture/<slug>-consistency.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