Skip to content

Cohesion (software / module-level)

Grade how tightly the responsibilities inside one code module turn around a single articulable purpose — from coincidental to functional — reading nameability, isolation-testability, and low-risk replaceability straight off the level.

Core Idea

In software engineering, cohesion is a graded measure of how closely the responsibilities inside one module belong together — how strongly its functions, data, and types turn around a single, well-defined purpose rather than accumulating unrelated concerns. High cohesion means the module is describable in one sentence; low cohesion means it merely holds things sharing a file boundary. Constantine and Yourdon rank it from coincidental up to functional, and it pairs with coupling as the two axes of modular structure.

Scope of Application

Software cohesion lives across the scales of modular structure within software engineering, wherever a bounded code unit's contents are judged for turning around one purpose.

  • Module, package, and class design — the first diagnostic a reviewer applies to a class.
  • Microservice boundaries — domain-driven bounded contexts, one business capability per service.
  • API design — operations all turning around the resource the API names.
  • Architecture metrics and tooling — LCOM and variants flagging low-cohesion classes automatically.
  • Codebase navigation and onboarding — cohesive structure letting a newcomer predict where a feature lives.

Clarity

Naming cohesion converts a fuzzy quality judgment into a checkable test: state the one purpose a module serves and reject contents that do not contribute. The operative probe is articulability — can the module be described in one sentence without reaching for "and"? A class named "Utils" indicts itself the moment someone writes its docstring. Cohesion also separates relatedness within a module from dependency between modules, exposing coupling and cohesion as two orthogonal dials.

Manages Complexity

A large codebase is otherwise intractable — hundreds of modules, an web of dependencies, no way to reason about a part without the whole. Cohesion compresses the structural-quality question to a single graded reading per module, and paired with coupling collapses "is this a good decomposition?" to two scalars per boundary. The Constantine-Yourdon seven-level scale sharpens each reading into a specific level that names the accidental grouping and points at the fix, letting the system be understood one purpose at a time.

Abstract Reasoning

Cohesion licenses a diagnostic move — running the one-sentence test and reading which kind of bad grouping the Constantine-Yourdon scale names, mechanised by LCOM. Boundary-drawing splits the cohesion and coupling axes so a complaint is attributed correctly. Interventionist reasoning re-decomposes toward the functional end and predicts nameability, isolation-testability, and replaceability rising together. Predictively, the cohesion level bounds change-impact and onboarding cost.

Knowledge Transfer

Within software engineering cohesion transfers intact as mechanism across every scale — module, microservice boundary, API, metrics, onboarding — carrying the articulability test, the seven-level scale, the coupling pairing, and the replaceability consequence. Beyond software it is the cleanest shared-abstract-mechanism case: software cohesion is one substrate of the catalog prime group_cohesion, an internal binding force governing resistance to fragmentation. That parent carries the cross-domain weight (paragraph, argument, team, droplet); the Constantine-Yourdon scale and LCOM stay home with code.

Relationships to Other Abstractions

Local relationship map for Cohesion (software / module-level)Parents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Cohesion (software/ module-level)DOMAINPrime abstraction: Group Cohesion — is a decomposition ofGroup CohesionPRIME

Current abstraction Cohesion (software / module-level) Domain-specific

Parents (1) — more general patterns this builds on

  • Cohesion (software / module-level) is a decomposition of Group Cohesion Prime

    Software cohesion applies internal binding to responsibilities collected inside a module, with shared purpose supplying the binding force.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Cohesion (software / module-level) sits in a moderately populated region (45th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Software Evolution & Systemic Laws (16 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-07-12