Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M9899

Abstraction Consistency Principle

Abstraction Consistency Principle
SystemsmediumSystems Theory
Included
account_tree

Updated 2026-08-15

Loading revision record…

Summary

The design rule that components at the same level of abstraction should stay at that level, without mixing highly concrete details with high-level concepts.

Definition

The principle holds that each layer of a system should operate at a single, consistent level of abstraction, with its own vocabulary and contracts, and that mixing granularities within one layer creates confusion and coupling. It is a corollary of separation of concerns and single responsibility, and it explains why abstraction leaks are so costly: a leak forces a caller to know about a level it should not. The qualification is that consistency must serve comprehension rather than hierarchy for its own sake, since an intermediate layer with no distinct concept adds indirection without clarity.

How to use

- Fix the level: state the abstraction level of the unit you are writing before adding anything. - Expose contracts: have callers depend on the layer's own vocabulary rather than its internals. - Audit the leaks: search for cross-layer names, such as database columns surfacing in business logic.

Mechanism

A reader builds a mental model from consistent cues, so when every element in a layer operates at the same granularity, one model explains the whole layer. Mixing levels breaks that model, because the reader must switch between registers and cannot predict where the next detail will appear. Coupling follows: code that reaches across levels depends on internals it does not own, so any change below propagates upward. Keeping levels consistent confines change to one layer, which is why the discipline pays off as maintenance rather than as elegance.

Practice

In progress 0/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • An API that exposes business capabilities rather than table columns lets storage be refactored without breaking clients.
  • Separating a domain model from a persistence model prevents database concerns from shaping business rules.

Common pitfalls

  • Mixing strategic discussion and byte-level detail in the same document or function, which forces constant register switching.
  • Adding pass-through layers in the name of consistency, which increases indirection without adding clarity.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Abstraction_(computer_scienceZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS