मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग7.1k · #13502

coupling-analysis

यह क्या करती है

यह स्किल AI से आँकवाती है कि मॉड्यूल एक-दूसरे से कितनी मज़बूती से जुड़े हैं, वे कितनी दूर हैं, और कितनी बार बदलते हैं। यह आर्किटेक्ट और डेवलपर्स के लिए है जो जानना चाहते हैं कि उनका सिस्टम बदलना मुश्किल है या नहीं।

कब इस्तेमाल करें

  • ✓जब आप पूछते हैं कि क्या दो मॉड्यूल बहुत कसकर जुड़े हैं।
  • ✓जब ऐप के एक हिस्से में बदलाव से दूसरा हिस्सा बार-बार टूटता है।
  • ✓जब आप रिपोर्ट चाहते हैं कि कौन से जोड़ पहले ढीले करने चाहिए।

Skill का लिंक

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/coupling-analysis/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/coupling-analysis/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या billing और orders मॉड्यूल बहुत कसकर जुड़े हैं, और मुझे पहले किसको अलग करना चाहिए?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI संदर्भ इकट्ठा करता है, फिर हर जोड़ को इस आधार पर आँकता है कि हिस्से कितना साझा करते हैं, कितने दूर हैं और कितनी बार बदलते हैं, और बदलाव सुझाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Coupling Analysis Skill

You are an expert software architect specializing in coupling analysis. You analyze codebases following the three-dimensional model from Balancing Coupling in Software Design (Vlad Khononov):

  1. Integration Strength — what is shared between components
  2. Distance — where the coupling physically lives
  3. Volatility — how often components change

The guiding balance formula:

BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITY

A design is balanced when:

  • Tightly coupled components are close together (high strength + low distance = cohesion)
  • Distant components are loosely coupled (low strength + high distance = loose coupling)
  • Stable components (low volatility) can tolerate stronger coupling

When to Use

Apply this skill when the user:

  • Asks to "analyze coupling", "evaluate architecture", or "check dependencies"
  • Wants to understand integration strength between modules or services
  • Needs to identify problematic coupling or architectural smell
  • Wants to know if a module should be extracted or merged
  • References concepts like connascence, cohesion, or coupling from Khononov's book
  • Asks why changes in one module cascade to others unexpectedly

Process

PHASE 1 — Context Gathering

Before analyzing code, collect:

1.1 Scope

  • Full codebase or a specific area?
  • Primary level of abstraction: methods, classes, modules/packages, services?
  • Is git history available? (useful to estimate volatility)

1.2 Business context — ask the user or infer from code:

  • Which parts are the business "core" (competitive differentiator)?
  • Which are infrastructure/generic support (auth, billing, logging)?
  • What changes most frequently according to the team?

This allows classifying subdomains (critical for volatility):

Type Volatility Indicators
Core subdomain High Proprietary logic, competitive advantage, area the business most wants to evolve
Supporting subdomain Low Simple CRUD, core support, no algorithmic complexity
Generic subdomain Minimal Auth, billing, email, logging, storage

PHASE 2 — Structural Mapping

2.1 Module inventory

For each module, record:

  • Name and location (namespace/package/path)
  • Primary responsibility
  • Declared dependencies (imports, DI, HTTP calls)

2.2 Dependency graph

Build a directed graph where:

  • Nodes = modules
  • Edges = dependencies (A → B means "A depends on B")
  • Note: the flow of knowledge is OPPOSITE to the dependency arrow
    • If A → B, then B is upstream and exposes knowledge to A (downstream)

2.3 Distance calculation

Use the encapsulation hierarchy to measure distance. The nearest common ancestor determines distance:

Common ancestor level Distance Example
Same method/function Minimal Two lines in same method
Same object/class Very low Methods on same object
Same namespace/package Low Classes in same package
Same library/module Medium Libs in same project
Different services High Distinct microservices
Different systems/orgs Maximum External APIs, different teams

Social factor: If modules are maintained by different teams, increase the estimated distance by one level (Conway's Law).


PHASE 3 — Integration Strength Analysis

For each dependency in the graph, classify the Integration Strength level (strongest to weakest):

INTRUSIVE COUPLING (Strongest — Avoid)

Downstream accesses implementation details of upstream that were not designed for integration.

Code signals:

  • Reflection to access private members
  • Service directly reading another service's database
  • Dependency on internal file/config structure of another module
  • Monkey-patching of internals (Python/Ruby)
  • Direct access to internal fields without getter

Effect: Any internal change to upstream (even without changing public interface) breaks downstream. Upstream doesn't know it's being observed.


FUNCTIONAL COUPLING (Second strongest)

Modules implement interrelated functionalities — shared business logic, interdependent rules, or coupled workflows.

Three degrees (weakest to strongest):

a) Sequential (Temporal) — modules must execute in specific order

co
अक्सर पूछे जाने वाले सवाल

क्या इसे पूरा कोडबेस पढ़ना होगा?

आप जो माँगें उसके अनुसार यह पूरा कोडबेस या एक खास हिस्सा देख सकता है।

क्या यह domain analysis जैसा ही है?

नहीं। domain boundary analysis एक अलग स्किल है।

यह कौन सा मॉडल इस्तेमाल करता है?

यह किताब Balancing Coupling in Software Design के ताकत, दूरी और अस्थिरता वाले तीन-भाग मॉडल का पालन करता है।

जानकारी

लेखक का मूल विवरण

Analyzes coupling between modules using the three-dimensional model (strength, distance, volatility) from "Balancing Coupling in Software Design". Use when asking "are these modules too coupled?", "show me dependencies", "analyze integration quality", "which modules should I decouple?", "coupling report", or evaluating architectural health. Do NOT use for domain boundary analysis (use domain-analysis) or component sizing (use component-identification-sizing).

repo: tech-leads-club/agent-skills

लोकप्रियता

GitHub स्टार
7.1k
रैंकिंग में स्थान
#13502
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

component-common-domain-detection

7.1k

यह आपके एजेंट को कोडबेस के कई हिस्सों में दोहराए गए बिज़नेस लॉजिक को ढूँढने और उन्हें मिलाने का तरीका सुझाने में मदद करती है।

कोडिंगसामान्य कोडिंग

component-flattening-analysis

7.1k

यह आपके एजेंट को गलत जगह रखा गया कोड ढूँढने और उलझे हुए कंपोनेंट फ़ोल्डर ढाँचे को सीधा करने में मदद करती है, ताकि हर चीज़ अपनी सही जगह रहे।

कोडिंगसामान्य कोडिंग

component-identification-sizing

7.1k

यह आपके एजेंट को कोडबेस के हिस्सों का नक्शा बनाने और उनका आकार मापने में मदद करती है, ताकि पता चले कि पहले किस मॉड्यूल को तोड़ना है।

कोडिंगसामान्य कोडिंग

decomposition-planning-roadmap

7.1k

यह आपके एजेंट को बड़े ऐप को अलग सर्विसेज़ में तोड़ने के चरण-दर-चरण क्रम की योजना बनाने में मदद करती है, प्राथमिकताओं और चरणों के साथ।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills