Skip to content
ContentsChapter 5: Preventing and Addressing Architectural Drift

Part II: Engineering Oversight and the Discipline of Stopping

Chapter 5: Preventing and Addressing Architectural Drift

Imagine you are reviewing a change to a query feature for acceptance. The pages display normally, and the returned records match the demo's expectations; but when you check the differences between versions against the already-baselined contracts, you find that a core table is missing a column, and several call sites have switched to a different way of making the decision. The assistant's summary says only "simplified the logic," with no explanation of why the contract changed. This teaching scenario is not yet enough to prove the system has gone wrong, but it is enough to pause the acceptance: was this change approved, do the modules that depend on it have corresponding verification, and to which parts does the original acceptance material still apply? How to recognize and handle signals of this kind is the subject of this chapter.

"Evidence discipline" asks that judgments be confined to what the available material can support. Recognizing architectural drift is the same: a warning sign is only an entry point for investigation; whether drift has occurred must still be checked against the agreed contracts, the implementation version, and observation records.

In engineering oversight, what is most frightening is often not the syntax errors (SyntaxError) that crash the program outright, because such errors are easily caught by the compiler or testing tools. What is truly fatal is the "architectural drift" quietly under way beneath the appearance of code that just barely runs.

Most major bugs do not appear suddenly. They grow out of gradual architectural decay until the accumulated problems become unmanageable. As a competent engineering supervisor, you must build a keen "warning radar" in your mind and stay alert at all times to three warning signs that the AI implementation crew may be violating agreed constraints:

Signal one: tampering with foundations. While developing upper-level business logic, the AI — to save trouble or to get around some difficulty — quietly and without cause modifies an underlying data model or core interface protocol that was previously accepted and baselined. This "taking from one wall to patch another" behavior significantly raises the risk that other modules depending on that underlying model will later go wrong.

Signal two: overengineering and inappropriate additions. To handle a very unlikely edge case, or to fix a small bug, the AI suddenly introduces a highly complex third-party library, or forces in heavyweight design patterns such as an event bus or reflection where they do not match the scale of the current problem. Digging a huge pit to fill a small hole greatly raises the complexity and maintenance cost of the whole system.

Signal three: uncontrolled code growth. You find that a class or file that was once clearly structured with a single responsibility has illogically ballooned in code size over a few conversations. Heavily nested if-else blocks begin to appear, and logic that should have been abstracted for reuse is mechanically copied and pasted. These changes are a prompt to check the division of responsibilities, duplicated logic, and whether contracts have been broken; code size alone cannot establish that architectural drift has occurred.

The moment the warning radar goes off — or even when work has simply proceeded normally to a planned structural milestone — the architect must strictly practice a counterintuitive discipline: "prepare a clean working context," that is, avoid extremely long conversations in a single window.

Many developers are used to chatting in one IDE chat window or web dialog from the day the project is created until the day it ships, expecting the AI to remember every cause and effect along the way. This is an extremely disastrous practice.

Outdated implementations and mutually conflicting constraints can interfere with the current working context, but failure records, raw output, and differences between versions still have value for rechecking. When organizing the next round of input, distinguish the implementation basis currently in force from the historical material that needs to be archived; content that has left the active context must not be dismissed wholesale as worthless.

You must therefore master the core "handoff technique": resetting the context frequently and decisively.

When you find the AI going in circles or talking nonsense, or after you have successfully verified and baselined a key milestone, you can organize the material and open a new conversation window. A reset only adjusts the next round of input; do not arbitrarily delete original conversations, failure artifacts, or acceptance records because of the reset. Preserve fixed copies of the material within the retention boundaries described below, then hand off its location, evidence level, and unresolved items. Closing the window is not destroying the records.

Preservation of material in this chapter and the rest of the book follows the access, retention, and required-handling rules of "Retrospectives and the Negative-Case Ledger"; a reset does not require keeping additional sensitive copies, and a summary or hash must not impersonate source material that can no longer be obtained. Before closing the window, preserve a fixed version of the material within these boundaries and register its location, evidence level, and unresolved items; when the accessibility of material or the ability to recheck it changes, update the basis for the affected judgments accordingly.

To reduce information loss when resetting the context, extract from the current project the core interface definitions and database structure contracts of the checked versions, together with the target TODO list of what is about to be done next, and hand over the references to acceptance material, the verified scope, and unresolved items. Package these clean, currently valid assets as a brand-new "implementation blueprint," and feed them to the AI in a completely empty new conversation window.

This practice keeps the next round of implementation from treating outdated logic as the current basis. It is like swapping the drawings in use on site: the old drawings, change records, and failed inspection sheets remain on file; the new implementers work from the current drawings and can still trace earlier judgments and their basis through the references.

This is one of the core means of keeping a project healthy over the long run and of preventing architectural drift.

Recognizing drift means separating the observable change from the cause, which still awaits verification. A pause can come before closure; a rollback, however, requires a separate judgment about the plan. The next chapter discusses how to choose rebuilding — and respect its boundaries — when local patching can no longer keep a clear basis.