modular-decomposition

Inventory, flatten, analyze coupling, and cluster components into domain-aligned contexts.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/rodrigotoledo/trading-exchange --skill modular-decomposition
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modular-decomposition
Source: https://github.com/rodrigotoledo/trading-exchange/tree/main/packages/skills-catalog/skills/%28architecture%29/modular-decomposition
Command: npx skills add https://github.com/rodrigotoledo/trading-exchange --skill modular-decomposition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Monoliths often become hard to evolve; this skill helps you identify architectural components, size them, and group them into domain-aligned units to guide refactoring.

Core Features & Use Cases

  • Inventory components and size by statements/files to reveal decomposition hotspots.
  • Analyze coupling and hierarchy to identify bounded contexts and viable extraction points.
  • Group components into domains and generate a domain map to guide refactoring and service extraction.

Quick Start

Run modular-decomposition on your repository to generate a domain map and a concrete flattening plan.

Frequently Asked Questions about modular-decomposition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompose a monolith into domain-aligned bounded contexts?

Monolith decomposition involves identifying and sizing components, flattening the architecture, and analyzing coupling to cluster them into domain-aligned contexts. This process generates a domain map and a concrete plan to guide structured refactoring.

What is the best way to identify bounded contexts for refactoring a monolith?

Identifying bounded contexts requires analyzing component coupling and hierarchy across the repository to find natural domain groupings. This reveals architectural boundaries aligned with business domains and highlights viable extraction points for refactoring.

How do I analyze coupling to find decomposition hotspots in a large repository?

You analyze coupling by inventorying components and sizing them by statements and files to reveal decomposition hotspots. This workflow flattens the architecture and exposes heavily coupled areas requiring targeted refactoring.

Can I use domain-driven design to guide monolith decomposition?

Yes, you can apply domain-driven design principles to guide monolith decomposition by grouping components into domain-aligned units. The workflow clusters architectural components into bounded contexts reflecting DDD patterns.

Does this monolith decomposition workflow require any specific dependencies?

No, the monolith decomposition workflow operates without external dependencies. It loads pattern guidance from reference files and uses optional resources to output a domain map and a decomposition plan.

When should I not use a structured monolith decomposition approach?

You should avoid structured monolith decomposition when your architecture lacks sufficient component coupling complexity to warrant domain grouping. If components are already loosely coupled, applying a multi-pattern decomposition workflow adds unnecessary overhead.