# Loose Coupling The degree to which components depend on each other. Loosely coupled components can be changed, replaced, or tested independently. Tightly coupled components break together. ## What coupling looks like - **Tight**: component A calls component B's internal methods, knows B's data structures, breaks when B changes - **Loose**: component A communicates with B through a defined interface; neither knows the other's internals ## How to reduce coupling - Depend on abstractions, not implementations (Dependency Inversion in [[SOLID Principles]]) - Communicate through explicit interfaces ([[Design by Contract]]) - Declare dependencies; never assume they exist - Minimize shared mutable state ## In AI skills Tight coupling: a skill that calls `mcp__qmd__vsearch` by name and assumes specific return formats. Loose coupling: a skill that says "search the vault semantically" and lets the harness resolve the tool. 50+ skills in a large skill library can hardcode tool names and vault paths. When any of those change, every skill that hardcodes them breaks silently. Loosely coupled skills describe intent; tightly coupled skills prescribe implementation. Pairs with [[High Cohesion]]: related logic stays together inside one skill (cohesion), while different skills remain independent of each other (coupling). ## References - ## Related - [[High Cohesion]] - [[SOLID Principles]] - [[Design by Contract]] - [[Separation of Concerns]] - [[AI Skill Resilience]] - [[Software Design Patterns for AI Skills and Agents]]