coupling-analysis

Analyzes module coupling using strength, distance, and volatility dimensions from software architecture theory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It helps architects and developers determine whether modules in a codebase are too tightly coupled, why changes cascade unexpectedly across modules, and which integrations should be refactored to reduce maintenance cost. ## Core Features & Use Cases - Three-Dimensional Coupling Model: Classifies each dependency by integration strength (intrusive, functional, model, contract), physical distance, and volatility based on Vlad Khononov's framework. - Dependency Graph Mapping: Builds a directed module dependency graph and computes distance via the encapsulation hierarchy, including Conway's Law adjustments for cross-team ownership. - Prioritized Health Report: Produces an executive summary, annotated dependency map, severity-ranked issues with code evidence, and actionable refactoring recommendations. - Use Case: Ask why changing a pricing rule requires deploying three services at once; the analysis identifies symmetric functional coupling across services and recommends extracting shared logic into a dedicated module. ## Quick Start Analyze the coupling between the modules in this repository and produce a coupling report with prioritized recommendations.

Frequently Asked Questions about coupling-analysis

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

FAQPage Schema
How do I analyze coupling between modules in my codebase?

Map the module dependency graph, then classify each dependency by integration strength (intrusive, functional, model, or contract), measure distance via the encapsulation hierarchy, and estimate volatility from subdomain type or git history. Combine the three dimensions into a balance score per coupled pair.

What is the difference between model coupling and contract coupling?

Model coupling occurs when a module exposes its internal domain model directly, so consumers depend on internal fields and types. Contract coupling uses dedicated integration DTOs or versioned interfaces that expose only what consumers need, making it the weakest and preferred form.

How do I detect functional coupling in code?

Look for duplicated business logic across modules, mandatory execution ordering, distributed transactions, and comments warning to update one module when another changes. Symmetric functional coupling exists even when modules never reference each other directly.

Can coupling analysis work without git history?

Yes, but volatility estimates are less precise. Without git data, infer volatility from subdomain type, TODO density, API versioning, and fragile tests. Git co-change analysis provides the strongest evidence of temporal coupling.

When should I not use coupling analysis?

Do not use it for domain boundary identification or component sizing decisions, which require dedicated domain analysis. It also cannot detect dynamic connascence such as timing or identity dependencies without runtime observation.