/polymath-architecture:service-decompositionfrom polymath-architecture
Map service boundaries in a monolith or split proposal — seam analysis by subdomain, a strangler-fig sequence, what stays, and a characterization-test plan.
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.
Most microservice pain is a boundary drawn for the org chart, not the domain. Decompose by subdomain and data ownership, extract one seam at a time, and keep what works.
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:service-decomposition.Not this when: you are defining the domain language/contexts from scratch — do bounded-context-map first; this skill turns contexts into a technical extraction plan. For the cutover/rollback mechanics of a live migration, that is the migrationPlaybook workflow (polymath-flows).
event-driven-design), or app-level dual-write only with a reconciliation job that detects divergence, because two writes to two stores without a transaction will drift — and define how cross-service queries that used to be JOINs now work (API composition or a read model).Decomposition plan: billing monolith
Recommendation: split 1 service now (Invoicing); keep the rest a modular monolith.
forcing function: invoicing runs a nightly batch that needs independent scaling; others have none.
Candidates (value ÷ risk)
1. Invoicing high value / low risk owns invoices + invoice_lines; no foreign JOINs
2. Tax medium / medium reads customers via JOIN → needs a customer read model first
3. Subscriptions low / high tangled with pricing core → stays
Strangler sequence
1. facade /invoices in the monolith → routes 5% to the new service behind a flag
2. 100% reads, then writes; monolith code deleted after 30 days clean
Data: outbox from the monolith → invoicing DB; reconciliation job daily until cut-over; JOINs → API composition
Characterization tests: 42 golden invoices captured from prod (anonymized) before extraction
New costs: network hop, tracing, one more on-call surface — accepted for invoicing only
Inline by default; when a workflow step or the user wants it kept, write it to docs/architecture/<slug>-decomposition.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
8 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
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-architecture