LVD in Ten Minutes

Ten minutes is not much time to explain an architecture, but the core of Layered Volatility Decomposition fits inside it. Sort your code by how often it changes. Let the fast-moving parts lean on the slow-moving ones, and never the reverse. Nine layers, two axioms and a few command-line tools all grow out of that one habit.

Start with how code actually changes

Most architecture diagrams are drawn around function: here is the ordering module, there is the billing module. LVD starts from a different question, inherited from Juval Löwy's volatility-based decomposition. Instead of asking what a component does, ask how often it is likely to change, and what tends to change alongside it.

The book defines volatility as the expected frequency of change of a component. You can measure it looking backwards, by counting the commits that touched the component in a given period, or estimate it looking forwards, from what the business is likely to demand next.

Picture a ride-sharing app. The definition of a fare and the list of supported currencies hardly ever move. The wrapper around the maps vendor changes when the vendor does. Surge-pricing rules get adjusted every few weeks, and the driver screens are redesigned every sprint. A functional split files all four under "rides", so a copy tweak and a currency type share a module and a release schedule. A volatility split pulls them apart, and each one moves at its own speed.

The shift is subtle but it changes every later decision. Rather than asking which layers a system needs, you ask which levels of volatility exist in it and how they should relate to one another. Rather than asking how to organise the domain model, you ask which domain concepts are settled and which are still moving. The answers produce boundaries that follow the pace of change, so a fast-moving concern stays fenced in even when it is logically part of the same feature as a slow one.

The rule that does the work

Separating code by speed is only half the idea. The other half is how the pieces may relate. Suppose component A depends on component B. Whenever B changes, A might have to change too, so A can never be calmer than B. The book expresses this as an effective volatility: the larger of A's own rate and B's rate.

That is why direction matters so much. A calm component that imports a busy one quietly becomes busy itself, and the stability you designed in has gone. The remedy is the Volatility Ordering Principle: depend only on things at least as stable as you are. Fast code leans on slow code.

Against the ruleWith the ruleUI ν 1.0Schema ν 0.3depends onUI ν 1.0Schema ν 0.3depends onSchema now changes at 1.0Schema stays at 0.3
An arrow points from the dependent to what it depends on. A dependency pointing upward drags a stable layer up to the speed of the layer above it.

LVD turns the principle into a ladder. Components live in numbered layers, each with a coefficient ν for its expected volatility (formally, the average over the components inside it). A component may depend on its own layer or on layers beneath it, and between two different layers the arrow must point strictly down. Because no arrow ever climbs, you cannot walk a loop through the graph, so the architecture has no circular dependencies by construction.

Nine layers in one breath

Reading from the calmest rung to the busiest:

  • Schema (ν 0.3) and Utils (0.4) hold types, validation rules and constants, then pure functions with no side effects.
  • Resources (0.6) wraps everything outside your process: databases, vendor APIs, queues.
  • Tools (0.8) packages business operations as self-contained units.
  • API + Auth (0.85) adapts tools to REST, GraphQL or gRPC and guards them. MCP + Auth (0.9) does the same for AI models through the Model Context Protocol.
  • Skills (0.95) are documents that teach agents how to use tools. Agents (0.97) choose and sequence those tools.
  • UI (1.0) is the screen people touch, new in the second edition.

The book's argument is that three tiers leave awkward gaps, namely protocol adapters, AI agents and the guidance that teaches them, and that making each a first-class layer closes the gaps. What the rule needs from the coefficients is their order, so every layer can be asked the same question: does anything above me depend on me, and does anything I depend on sit above me?

If you want each layer unpacked, the nine-layer walkthrough does that. If you want the whole ladder on one page, there is a cheat sheet.

The ride-sharing app, placed on the ladder

Go back to the pieces from the start of the article and give each one an address.

  • The fare definition and the list of currencies belong in Schema, because everything above is written in their vocabulary.
  • Rounding a fare to the smallest currency unit is a pure calculation, so it sits in Utils.
  • The wrapper around the maps vendor is a Resources adapter, which keeps the vendor's churn inside one fence.
  • "Quote a ride" and the surge rules behind it are Tools, the place where the product team does most of its work.
  • The HTTP endpoint the mobile app calls lives in the API layer. If an AI assistant should be able to quote rides as well, an MCP server exposes the very same tool, with no second copy of the rules.
  • A skill document tells the assistant when quoting is appropriate, and the agent decides what to do with the answer.
  • The driver and rider screens are the UI.

Now watch how three changes travel. A redesigned booking screen touches only the top layer. A new maps vendor means rewriting one adapter and nothing else. A new currency changes a Schema definition, so the change fans upward through every layer that handles fares, and it deserves a careful review and a migration plan. The further down a change lands, the wider its reach, which is exactly why the lowest layers are meant to change least.

Two axioms that close the loopholes

The ladder alone leaves two spots where trouble can still slip in, and the book closes each with an axiom.

Axiom A5 concerns Tools. In most layers a component may use a sibling as long as no loop forms. In the Tools layer it may not: no tool depends on another tool. Business operations that import each other are a fast route to tangled, hard-to-test code, so a workflow spanning several tools is sequenced by a caller above them. A companion article makes the full case.

Axiom A6 is new in the second edition and governs the UI. A screen may import Schema and Utils, plus the published contracts of the API, MCP, Skills and Agents layers: a generated typed client, a tool descriptor, the type definitions of an agent's events. It may not import Resources or Tools, or anyone's implementation. A browser is a device you do not control, so database clients, secrets and business rules should never be shipped to it.

Both axioms only remove permitted dependencies; neither adds any. Taking edges out of a graph with no cycles cannot create a cycle, which is why the book's proof of acyclicity survives them, and survives the growth from the first edition's eight layers to nine.

What the model adds beyond a diagram

A layer diagram that nobody enforces rots quickly, and the book knows it. Its own summary of what LVD adds to volatility-based thinking has four items: nine layers for fine-grained stratification, dependency rules enforced by tooling, a way of organising domains inside each layer, and modern concerns such as AI agents and protocol adaptation promoted to first-class layers. The benefits it claims are lower change impact, better testability and a clearer architecture.

The book's tooling covers that side: lvd-lint for checking the layer rules, lvd-diagram for drawing the layers and lvd-metrics for measuring architectural quality. These are easiest to apply when each layer has a visible home in the source tree, which is the idea behind the folder-as-layer principle.

Try it on your own repository

You can feel the logic of the model before adopting any of its structure. Ask your version history which files change most:

git log --since="6 months ago" --name-only --pretty=format: \
  | grep -v '^$' | sort | uniq -c | sort -rn | head -20

That is the historical measure of volatility in its crudest form. For each file near the top of the list, check what imports it. A busy file with calm files depending on it is a place where the rule is already being broken, and it points to something that either moves up the ladder or needs decoupling from its stable callers.

Then look at the bottom of the list. Files that almost nothing touches, yet nearly everything imports, are your Schema and Utils in all but name. Giving them an explicit layer, and a rule that keeps them clean, is usually the cheapest first step.

Where the book goes from here

The book spreads twenty chapters across five parts: foundations, a per-layer methodology, comparative studies with two case studies, practical implementation (tooling, testing, migration, anti-patterns) and advanced topics such as microservices and domain-driven design. Practitioners are advised to skim the foundations, then spend their time on the layer chapters and the implementation part. This article is the fast route; the book supplies the definitions, the proofs and the worked systems behind each claim.

What the book covers

  • Formal definitions of layers, volatility functions and the allowed-dependency set
  • The proof that an LVD architecture can never contain a dependency cycle
  • Measuring volatility from commit history or predicting it from business drivers
  • A full chapter or more on each layer, from Schema up to the UI
  • Tooling (lvd-lint, lvd-diagram, lvd-metrics) that checks the rules automatically