Skip to content

Accidental Architecture

Every system has a structure. In an accidental architecture, nobody chose that structure on purpose. It is only implied by the code that happens to exist. Richards calls a close relative the Architecture by Implication antipattern. An antipattern is a common practice that looks reasonable but tends to cause harm. He notes that an implied architecture usually ends in catastrophic failure.

Where it leads

An accidental architecture tends toward a Big Ball of Mud. This is a casually, even haphazardly, structured system. The article Big Ball of Mud covers it in detail.

Two forces drive the slide:

  • Quick fixes. Big Ball of Mud systems show unregulated growth and repeated, expedient repairs. No designed structure guides these changes.
  • Piecemeal growth. This means building a system in small, unplanned additions. Its biggest risk is that it gradually erodes the overall structure of the system.

Why a missing choice makes things worse

Even systems with well-defined architectures can erode structurally. A system with no chosen structure has nothing to defend. It is therefore even more exposed. Architecture Decay describes this erosion over time.

What follows for practice

The facts here support one main conclusion. Structure should be a deliberate choice, not a leftover. Teams can record such choices in an Architectural Decision Record, and a document that records them shows the architecture was not just implied.

A small team builds an internal booking tool. They start coding right away. Nobody discusses how the parts should fit together. Each new feature goes wherever it is quickest to add. Each bug gets a fast patch. After a year, nobody can describe the structure of the tool. Nobody decided on it, so it is implied by the code alone. The team now finds that each patch makes the next change harder.

How an unchosen architecture tends to drift toward a Big Ball of Mud.

Diagram source
flowchart LR
A[No chosen architecture] --> B[Quick fixes and piecemeal growth]
B --> C[Structure erodes]
C --> D[Big Ball of Mud]
  • The document names the chosen architecture explicitly and does not leave it implied by the code.
  • The team has recorded architectural decisions, so the structure traces back to deliberate choices.
  • The document describes how the structure is protected against erosion from quick fixes and piecemeal growth.