Skip to content
>devspeak
← glossary
level 7Architecture

Coupling

also: tightly coupled, loosely coupled, tight coupling, loose coupling, coupled

How much different parts of your code depend on each other. Tightly coupled parts can't change without breaking each other.

a bit more technical

The degree of interdependence between modules. Tight coupling means one module relies on another's internal details, so a change ripples across both. Loose coupling means they interact through a small, stable interface, so each can change more independently.

picture it

Old Christmas lights wired so one dead bulb darkens the whole string. Newer strings keep glowing when one bulb dies. Less coupling, fewer chain reactions.

why it matters

Coupling is why a "small change" by your agent can break three unrelated pages. When an agent says code is tightly coupled, it's warning you that changes there are riskier and need more testing.

what your agent might say
agent
The checkout page is tightly coupled to Stripe's response format. If we switch providers, we'd have to rewrite the page. I suggest a small payments module in between.
how you might use it
you → your agent
Keep the new referral feature loosely coupled: it should use the existing user functions, not read the users table directly.
common mistake

Thinking coupling can be removed entirely. Parts of an app must work together. The goal is loose coupling through clear connections, not zero coupling.

builds on