Skip to content
ContentsChapter 9: Preventing "Code Built Outside the Blueprint"

Part IV: Pitfalls and Conclusions

Chapter 9: Preventing "Code Built Outside the Blueprint"

Imagine a milestone approaching handoff. One person, seeing the main flow return normally, is ready to write "done" on the task sheet; another keeps pressing about edge-case errors; another suggests letting the assistant revise a few more times, until the report sounds certain enough. This teaching scenario contains no new technical problem, yet it lays several working habits on the same table: whether the goal has been decomposed, whether the correction addressed the right level of the problem, whether the debate produced any evidence, whether the boundaries have been verified. Even a team that already knows the standard workflow may still bypass it in actual operation. The four antipatterns below put these easily missed checks back into daily work.

With the standard implementation workflow established, we also need to stay constantly alert, in day-to-day development, to the "antipatterns" that easily lead us back into our old mistakes. These antipatterns often originate in habits accumulated in the era of hand-written code, but in AI-assisted programming they can quickly turn your project into a tottering structure of "code built outside the blueprint." The following are four fatal mistakes that must be resolutely avoided:

Pitfall 1: "Wishful" outsourcing

Symptom: You state only a goal such as "write me a complete user-permission management module," leaving the decomposition of the requirements and the underlying contracts to the generation process. Return to "Breaking Down the Project and Building the Foundations": clarify the dependencies and the milestones that can be accepted, then issue the task.

Pitfall 2: Line-by-line micromanagement

Symptom: You go around and around on "the variable name on line 42 is misspelled," "an equals sign is missing here," "add a null check," without checking whether the problem comes from the structural constraints. Return to the first step of "A Core Discipline: Rebuilding from a Known Baseline": first determine whether what should be raised is a local error or a design defect; only if it is truly the latter, use an instruction such as "Please refactor the validation logic according to the unified exception-interception strategy in the blueprint."

Pitfall 3: Falling into a pointless "debate" with the AI

This is a particularly insidious drain on development effort. When the AI falls into the "self-consistency trap" or into context confusion, it will output a stretch of utterly baffling code. If you accuse it — "What you wrote is completely wrong; why aren't you using the approach we agreed on earlier?" — the large model may give a response that goes along with the current conversation: "I'm very sorry. You are right; I misunderstood. I'll fix it right away." Immediately after, it will output another stretch of scrambled code — the same substance in new packaging, or even worse.

Because of the human instinct to communicate, you will not be able to help going on rebutting and pointing out its errors, and the conversation will grow longer and longer. Please see this clearly: you are talking with a machine that has no emotions and nothing but probability calculations. Arguing will not bring it to a sudden "epiphany"; it may simply let the current conversation window keep accumulating mutually conflicting content. As soon as you notice the AI starting to go in circles, pause first and check the problem; if you choose to roll back, follow the complete process in "A Core Discipline: Rebuilding from a Known Baseline." The warning itself is not a decision to roll back.

Pitfall 4: Continuing to build despite the cracks (neglecting edge-case errors)

When accepting AI code, many people, as soon as they see the "main flow" run through and the interface returning data normally, feel a false sense of accomplishment. "Evidence Discipline" has already distinguished a test return from the satisfaction of a requirement; a main-flow return cannot substitute for verification of the boundary items. Yet developers may still turn a blind eye to a missing error-retry mechanism in the code, an unhandled null-pointer exception, or questionable coupling between modules, thinking, "I'll patch up these small flaws by hand later."

This is the extremely dangerous practice of "continuing to build despite the cracks." In an AI development workflow, "patch it later" often means disaster, because in the steps that follow, the AI will keep building more complex logic upward on top of this cracked code. When a crack is finally triggered by some boundary condition and splits apart at the top level, you will not even know where to begin tracing the source of the error; all you can do is tear the whole building down. Therefore, "handling edge-case errors" and "architectural integrity" must serve as hard, non-negotiable acceptance criteria. A version that fails the agreed mandatory items cannot be marked as an accepted foundation; a commit that saves work in progress and an acceptance within its stated scope should be recorded separately, and any scope not yet verified must also be explicitly retained.

The four antipatterns remind us: knowing the workflow and judging by the workflow are two different things. When a tempting completion report arrives, return to the goal, the versions, and the acceptance basis. The final chapter draws these requirements together into disciplines a team can follow together.