Axiom A5: Why Tools Must Never Depend on Each Other

Two tools, both well written, each doing one job. Then someone on the delivery team needs to know whether an order has been paid, spots a handy function in the payments tool, and adds an import. It takes four lines. It also quietly ends the independence of both tools.

One rule, one layer

Most LVD layers are allowed to depend on their own kind, as long as the result stays acyclic. The Tools layer is the exception. Axiom A5 forbids a tool from importing another tool, invoking it, or depending on it in any other way. Each tool is meant to stand alone as a unit of business logic, free to lean on the layers beneath it and on nothing beside it.

That sounds fussy until you look at what a sideways dependency does over a year of ordinary development.

What a sideways import costs

// L4: delivery reaches sideways into payments
import { chargeCard } from "../chargeCard/chargeCard.tool";

export async function scheduleDelivery(order: Order) {
  await chargeCard({ orderId: order.id });   // tool depends on tool
  return bookCourier(order);
}

Three problems arrive together:

  • Cycles become one change away. If the payments tool later needs a delivery estimate, the two tools now depend on each other, and the clean downward flow the whole model rests on has a loop in it.
  • Changes spread. Edit how the payments tool behaves and the delivery tool has to be revisited, even though nothing about delivery changed.
  • Tests get heavy. A unit test for scheduling a delivery must now stub the payment tool as well as the courier service.

None of these is dramatic on day one. All of them compound. A quick way to spot trouble early is to read the import lines at the top of a tool file. Anything that points at a sibling tool, instead of at Schema, Utils or Resources, is a candidate for one of the three moves below.

Three ways out

The book's answer is not "never share anything". It is "put the shared thing where sharing is legal". There are three moves, and which one applies depends on what the shared code actually does:

  1. It is pure logic. If the code that both tools want is a calculation with no side effects, extract it into Utils (L2). Both tools can then depend downward on the same function.
  2. It touches the outside world. If the shared piece reads a database or calls a service, it belongs in Resources (L3), behind a repository or client that both tools can use.
  3. It is genuinely a sequence of tools. If an operation really does need several tools to run one after another, the sequencing is orchestration, and orchestration lives in a more volatile layer above, such as the API layer (L5) or the MCP layer (L6).

The third option is worth noticing. It is the same place an AI agent operates. Deciding which tools to call, and in what order, is precisely the job of the layers above Tools, so the rule pushes workflow logic toward the code that is expected to change most.

In every case the code lands somewhere whose rate of change matches its own. Pure rules go where change is slow, outside access goes behind a boundary built for it, and workflows go where change is fast. That matching is the whole idea of the model applied to one small problem.

The takeaway

A5 looks like a style preference but works like a load-bearing wall. Because tools never reach sideways, each one can be understood, tested and replaced on its own, and the question "where does this shared code go?" always has a mechanical answer: down, or up, never across. You can enforce it with the same tooling that guards the rest of the layer rules; see lvd-lint and the wider picture in the nine layers explained.

What the book covers

  • The formal statement of Axiom A5 and where it sits among the other axioms
  • Three worked refactorings for removing cross-tool dependencies
  • How orchestration is placed in the API or MCP layer instead
  • How to test tools in isolation once the rule is in force