Inappropriate intimacy
Also known as Inappropriate intimacy, Inappropriate intimacy in software engineering
Definition
A code smell in which two modules know too much about each other’s internal details.
What it means
Inappropriate intimacy describes excessive access to another module’s fields, private conventions, lifecycle, or persistence representation. It increases change coupling because one component cannot evolve without understanding the other’s internals. A stable interface or clearer ownership may reduce the exposure.
Example
A reporting module reads another service’s database tables and depends on internal status codes. Moving to a documented read model limits the dependency to an intentional contract.
Limitations
A close relationship can be appropriate for a cohesive aggregate or tightly integrated implementation. Introducing a remote API solely to hide a local collaboration may increase operational cost. Choose the boundary based on ownership and failure behavior.
How to use the signal
A direct relationship is acceptable when it expresses one cohesive aggregate, but private knowledge should not leak across unrelated ownership boundaries.
Map the hidden assumptions and persistence access before introducing a new boundary that may add operational cost.
Weave can help inspect whether intimate changes create cross-team reviews, blocked time, or production rework. Use architecture and data-access analysis to establish the coupling.
How this relates to Weave
Weave can help inspect whether intimate changes create cross-team reviews, blocked time, or production rework. Use architecture and data-access analysis to establish the coupling.
Explore Engineering intelligence