The files in your project are not islands. One file calls another, which calls a third, and the whole app runs on those connections. How tightly the files lean on each other decides everything about change: whether fixing one means touching five, or just one. This chapter shows you how the pieces connect, and why loose connections are what keep an app you can actually change.
4.5.1Files use each other through imports
A file uses another file's code by importing it, pulling in a function or value by name:
That one line creates a dependency: this file now needs email to work. Follow the imports across the project and you have mapped how the whole thing hangs together.
4.5.2Loose coupling keeps the app changeable
How tightly two files lean on each other is their coupling. Loosely coupled files know as little as possible about each other, so you can change one without the other noticing. Tightly coupled files reach deep into each other, so one change drags the rest along.
Loose is what you want, for one plain reason: at AI speed you change code constantly, and loose connections keep a change local instead of rippling across the app. The Architect part designs for this deliberately; here, the goal is just to see it when you read.
4.5.3This is why patterns exist
Keeping connections loose is a solved problem, and the solutions have names. A thin wrapper called an adapter, for instance, sits between your app and an outside service so you can swap that service without the rest of the app noticing. Those named shapes are the next chapter.
Do this now: paste the prompt over your project and have the agent map the dependencies and flag the tightest couplings, so you know which parts resist change before you try to change one.