modular-decomposition

Analyzes monolith codebases to size components, detect duplication, measure coupling, and group modules into domains.

3|1|Updated Mar 17, 2022
One-click install
npx skills add https://github.com/paulpessoa/menvo --skill modular-decomposition-paulpessoa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modular-decomposition
Source: https://github.com/paulpessoa/menvo/tree/main/.agent/skills/modular-decomposition
Command: npx skills add https://github.com/paulpessoa/menvo --skill modular-decomposition-paulpessoa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Splitting a monolith without structural analysis leads to poorly bounded services, hidden coupling, and duplicated domain logic. This Skill runs a sequenced five-pattern analysis pipeline that inventories and sizes components, finds duplicated domain functionality, fixes hierarchy problems, measures coupling, and groups components into candidate domain-aligned units before any extraction begins. ## Core Features & Use Cases - Component Inventory and Sizing: Identifies leaf-node components, counts statements, and flags oversized or undersized components using percentage thresholds and standard deviation analysis. - Duplication and Coupling Analysis: Detects common domain functionality across components, assesses consolidation feasibility with afferent coupling metrics, and maps dependencies between modules. - Domain Grouping with DDD: Groups components into candidate domains and optionally applies strategic Domain-Driven Design analysis to validate bounded contexts and ubiquitous language. - Use Case: A team planning to break a large Node.js monolith into services runs the full Patterns 1-5 pipeline to get an evidence-based component inventory, coupling report, and domain grouping before writing any extraction roadmap. ## Quick Start Ask the agent to run modular decomposition Patterns 1 through 5 on your repository to inventory components, analyze coupling, and group modules into domains.

Frequently Asked Questions about modular-decomposition

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

FAQPage Schema
How do I analyze a monolith before splitting it into services?

Run the five-pattern pipeline in order: identify and size components, detect common domain duplication, flatten hierarchy issues, analyze coupling, then group components into domains. Each step loads a dedicated reference file and reuses outputs from earlier steps.

How do I find oversized components in a codebase?

Pattern 1 counts executable statements per leaf-node component and flags outliers exceeding size thresholds or more than two standard deviations from the mean. Thresholds vary by application size, from 30 percent for small apps to 10 percent for large ones.

Can I run only coupling analysis without the full pipeline?

Yes, you can request a subset such as Pattern 4 coupling analysis, but later patterns depend on earlier results. If no component inventory exists, the agent derives one first and states any assumptions and skipped steps.

When should I use domain-driven design analysis with decomposition?

Use the embedded domain-analysis references before or alongside Pattern 5 when business vocabulary, subdomains, or bounded contexts are uncertain. It validates structural groupings against linguistic boundaries rather than folder structure alone.

What are the limitations of this decomposition analysis?

It does not produce extraction roadmaps, phased migration plans, or prioritization. For extraction ordering use a planning-roadmap skill afterward, and for full legacy migration strategy use a dedicated migration planner.