Логотип System Decomposition

System Decomposition

Спільнота
sethdford
system-decomposition

Break complex systems into bounded contexts with DDD. Map business capabilities to service boundaries, define ubiquitous language, assess cohesion/coupling. Use when refactoring monoliths or designing new architectures.

Огляд

Видавецьsethdford
Репозиторійclaude-skills
Назва навичкиsystem-decomposition
Зірки
48
Форки
9
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем sethdford. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ System Decomposition у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/sethdford/claude-skills/tree/main/architect/system-design/skills/system-decomposition
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/architect/system-design/skills/system-decomposition .claude/skills/system-decomposition
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку System Decomposition в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку System Decomposition, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка System Decomposition не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

System Decomposition

Systematically decompose complex systems using Domain-Driven Design: identify business capabilities, define bounded contexts, evaluate cohesion/coupling, design integration patterns.

Context

You are decomposing a system into services or modules. Your role is to:

  • Map business capabilities (not technical layers)
  • Define bounded contexts with explicit boundaries
  • Establish ubiquitous language (shared vocabulary per context)
  • Assess cohesion (focus) and coupling (dependencies)
  • Design integration patterns (sync API vs async events)

Good decomposition follows business domains, not technology layers. Anti-pattern: UserService, OrderService, PaymentService (implementation detail names) instead of Auth Realm, Commerce Hub, Payment Platform (domain names).

Domain Context

Based on Eric Evans' Domain-Driven Design and Sam Newman's Building Microservices:

  • Bounded Context: Explicit boundary around business capability. Each context has its own domain model.
  • Ubiquitous Language: Shared vocabulary within context (Order, Customer, Invoice). Prevents translation errors.
  • Aggregate: Entity cluster within context. Single consistency boundary. Example: Order + OrderItems as one aggregate.
  • Integration: How contexts communicate (Sync via API, Async via events, Shared database)
  • Cohesion: Does everything in the context serve one purpose?
  • Coupling: How many other services must it call?

When to Use This Skill

  • Breaking monolith into services
  • Designing new system architecture
  • Refactoring tight coupling
  • Aligning engineering teams to services
  • Preparing for independent scaling/deployment

Prerequisites

  • Understand business domains and pain points
  • Know current system architecture (if refactoring)
  • Have stakeholders available to discuss domain
  • Can draw diagrams (whiteboard, miro, draw.io)

Instructions (Detailed)

1. Identify Business Capabilities

Ask: "What does the business do?"

Example (E-commerce):

  • Authentication (who are you?)
  • Commerce (what do you want?)
  • Payment (how much does it cost?)
  • Fulfillment (ship it)
  • Analytics (understand customers)
  • Support (help customers)

Each capability can become a bounded context.

2. Define Bounded Contexts

For each capability, establish boundary with explicit name and responsibilities.

Example:

Auth Realm (Authentication)
- User registration, login, session management
- Produces: authenticated identity tokens
- Language: User, Credential, Session, Auth Token

Commerce Hub (Order Processing)
- Order creation, cart management, inventory
- Consumes: Auth tokens
- Produces: Order events
- Language: Order, Customer, Product, Cart, OrderItem

Payment Platform (Payment Processing)
- Payment processing, refunds, accounting
- Consumes: Order events
- Produces: Payment status events
- Language: Payment, Invoice, Transaction, Settlement

3. Map Ubiquitous Language

Define key terms within each context:

Auth Realm:
- "User" = identity with credentials
- "Session" = authenticated connection

Commerce Hub:
- "Order" = customer purchase request
- "Customer" = entity that places orders (different from Auth's User)

Payment Platform:
- "Invoice" = billable entity (different from Order)
- "Settlement" = final accounting status

Contexts use same words differently. Clear boundaries prevent confusion.

4. Assess Cohesion & Coupling

Cohesion (within context):

  • Do all functions serve one purpose? (high = good)
  • Would we change them for the same business reason? (yes = high cohesion)

Coupling (between contexts):

  • How many services must this call to complete a request?
  • Sync vs Async: Sync = tight coupling, Async = loose coupling
  • Target: Cohesion >80%, Coupling <3 sync calls/request

5. Design Integration Patterns

Synchronous (API call):

  • Used for immediate results
  • Tightly coupled
  • Simple debugging
  • Example: User creates order → Commerce Hub calls Payment Platform → charge card immediately

Asynchronous (event):

  • Fire-and-forget
  • Loosely coupled
  • Difficult debugging
  • Example: Order created → event published → Payment Platform subscribes and processes later

6. Create Context Diagram

Boxes = Contexts, Arrows = Synchronous calls, Events = Asynchronous communication.

┌──────────────┐        ┌──────────────┐        ┌──────────────┐
│  Auth Realm  │        │Commerce Hub  │        │   Payment    │
│              │        │              │        │  Platform    │
│ - Register   │──API───│ - Order      │───API──│ - Process    │
│ - Login      │        │   creation   │        │   payment    │
│ - Session    │        │ - Inventory  │        │ - Refund     │
└──────────────┘        │              │        └──────────────┘
                        │ Order Created│
                        │ Event ────────────────┐
                        └──────────────┘        │
                                        Event Handler
                                        (async payment)

7. Verify Against Anti-Patterns

  • Distributed monolith: Services so tightly coupled they act as one → redraw boundaries
  • Service per table: Data-driven decomposition (wrong) instead of domain-driven (right)
  • Chatty services: Need >10 calls to complete request → larger bounded contexts
  • God context: One service does everything → split into multiple contexts

Output Format

When decomposing, deliver:

  1. Business Capabilities: What the system does
  2. Bounded Contexts: Explicit boundaries with names
  3. Context Diagram: Visual showing contexts and integration
  4. Ubiquitous Language: Key terms per context
  5. Integration Patterns: Sync/Async by integration point
  6. Cohesion/Coupling Assessment: Scores for each context
  7. Deployment Plan: How to implement decomposition

Worked Example

Monolith: Single "UserService" handling everything (100K lines)

Issues:

  • Changes to UI tier require payment code changes
  • Teams can't deploy independently
  • Database contention

Decomposition:

Bounded Contexts:
1. Auth Realm: Registration, login, profiles
2. Commerce Hub: Orders, cart, inventory
3. Payment Platform: Payments, invoicing, settlements
4. Analytics: User behavior, metrics

Cohesion Scores:

  • Auth Realm: 95% (all about identity)
  • Commerce Hub: 85% (order-related, but inventory is borderline)
  • Payment Platform: 90% (all about money)

Coupling Analysis:

  • Commerce → Payment (sync): Payment::charge(amount)
  • Order Created → Analytics (async): Event subscriber

Integration:

Commerce Hub: POST /payment/charge with Order details
Response: Payment ID + status
On failure: Rollback order

Analytics: Subscribes to "OrderCreated" event
No coupling: Order doesn't wait for analytics

Decision Framework

  • One large context or many small?: Start coarse; split when pain emerges
  • Sync or Async?: Sync if needs immediate response (payment); Async if fire-and-forget (notifications)
  • Shared data or separate databases?: Separate per context (independence); shared only for atomic transactions
  • Communication overhead?: If sync calls >3 per request, reconsider boundaries

Anti-Patterns

  • Premature Microservices: Break before understanding domains
  • Technology-Driven: "Python team" vs "Python-for-ML domain"
  • Ignoring Coupling: Services talk to every other service
  • No Ubiquitous Language: Same word means different things

Quality Checklist

  • Each context has single business responsibility
  • Contexts named after domain (not tech: "Auth Realm" not "UserService")
  • Ubiquitous language documented per context
  • Cohesion >80% for each context
  • Coupling <3 sync calls per request
  • Integration patterns clear (sync/async)
  • Deployment independence verified
  • Teams can own individual contexts

Further Reading

  • Eric Evans, Domain-Driven Design (2003) — Foundational
  • Sam Newman, Building Microservices (2nd ed., 2021) — Practical decomposition
  • Dora et al., Accelerate — Impact of decomposition on deployment frequency

Поширені запитання

Що робить навичка ШІ System Decomposition?

Break complex systems into bounded contexts with DDD. Map business capabilities to service boundaries, define ubiquitous language, assess cohesion/coupling. Use when refactoring monoliths or designing new architectures.

Навіщо використовувати System Decomposition у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. System Decomposition — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити System Decomposition у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/sethdford/claude-skills/tree/main/architect/system-design/skills/system-decomposition. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати System Decomposition?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати System Decomposition?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею System Decomposition — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ System Decomposition?

Так. Навичку опубліковано на GitHub: sethdford, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇