Skip to content
ContentsFull book

AI-Assisted Programming with Implementation Planning

Prologue: From "Developer" to "Architect"

Architecture diagrams, requirements documents, feature lists, and navigation menus express different aspects of the implementation goal. With AI-assisted programming, the developer remains responsible for implementation planning: choosing a route and continually checking whether the current version is moving toward the goal. There may be several viable routes, and drift may not become apparent after a single conversation. After several rounds of revision, the blueprint, version history, and acceptance material become even more important for checking direction. When you detect drift, first assess whether clear constraints can correct it; if you decide to roll back, choose a version supported by acceptance material, and follow this book's rules on target selection, authorization, and preservation. When the context has already drifted and local edits can no longer explain their own basis, regeneration can be an option beyond fine-tuning — discarding the code is not itself a success.

Many teams experience an initial surge followed by a decline when they adopt AI-assisted programming.

At first, the AI shows astonishing productivity: you type a few sentences of natural language, hundreds of lines of code appear in an instant, and progress surges ahead. But as the project grows, a fatal turning point soon arrives: you find that, in fixing one bug, the AI may create three new ones; to implement a peripheral feature, the AI quietly changes a core data structure in the underlying system; the conversation grows longer and longer, the AI begins to forget the original settings, and the logic turns into a tangled snarl.

In the end, you have to stop developing new features and spend more time deciphering the AI's obscure, verbose code line by line than it would have taken to write the code yourself. It is like constructing a tower: with the AI's extraordinary output, you quickly build up to the third floor, then suddenly discover that the first floor was never given foundations and the second has no load-bearing walls. You are thoroughly mired in "patching up an unfinished structure," and the tool that was meant to raise efficiency has instead become technical debt that drains your energy.

The main cause of this situation is often not that the AI's model capability is too weak, but that developers have not shifted their mental model of working with the AI in time.

Traditionally, we have seen ourselves as code writers — developers. We conceived the logic in our heads and then turned it into code, line by line, with our own hands. When this habit is carried into the AI era, we often, without noticing it, treat the AI as an all-purpose "black box," ask it for an enormous system, and expect it to deliver a perfect finished product in one pass.

This is a huge mistake. Large language models have extremely high output and command many programming languages, but they have serious structural weaknesses: they lack a macro view of engineering structure, and as the conversation stretches on they develop severe "context collapse" (the loss of short-term memory).

The key to breaking out is this: "writing code" and "doing engineering" must be completely separated.

In this new development pipeline, the AI takes on the implementation work. It is an "outsourced implementation crew" (called the "AI implementation crew" below) — tireless, typing at high speed, but unable to hold a view of the whole. And you must firmly reclaim two essential responsibilities and move into the architect's role:

First, take back authority over blueprint planning.

Stop letting the AI guess at the system's architecture. Like a true chief architect, before the AI writes its first line of code, you break the enormous system down systematically. You precisely define the database table schemas, the inputs and outputs of the core interfaces, and the dependencies between modules. What you supply is a clear, unambiguous "implementation blueprint"; the AI only fills in the code — the "bricks" — according to that blueprint.

Second, take back authority over engineering oversight.

Never blindly trust any unverified code the AI generates. You set extremely strict acceptance criteria and review each of the AI's outputs as a careful, objective site supervisor would. The moment you find logic that has drifted, overengineering, or damage to an underlying constraint, there is no tolerating it and no continuing to build on crooked foundations: call a decisive stop, or even tear down and rebuild outright.

In the era of AI-assisted programming, code itself is no longer the core asset, and the act of generating code no longer creates core value. Only a clear system blueprint and rigorous engineering standards are the cornerstone that keeps a project from sliding into an "unfinished building." Letting go of the fixation on "individual lines of code" and taking command of engineering delivery as a whole — that is the key leap from "developer" to "architect."

Part I: Rethinking the Work and Planning the Foundations

Chapter 1: Reassessing Assets and Roles

Imagine a team demo. You ask an assistant to turn a registration page into a complete business module, and forms, lists, and statistics soon appear on the screen. The presenter walks through the buttons, and everyone feels the work is going well; but when someone asks how deleting a record would affect the statistics, or whether the old data can be migrated, no shared agreement can be found on the spot. This is a teaching scenario: the code is already on the screen; what is missing is the basis that explains how this code is supposed to work together. Adding more pages at this moment will not answer the question by itself. You need to take stock again of which things have merely been generated and which can support the next modification.

For the past few decades, the basic unit of software engineering has been code. Programmers typed out logic line by line, and large, properly running codebases were regarded as the core assets of individuals and companies. The arrival of AI has directly triggered a violent "code inflation."

When tens of thousands of lines of runnable code can be generated in a few minutes, the cost of generating code has already plummeted. In this era, verbose code that has neither been rigorously planned architecturally nor well organized is no longer an asset at all; it has instead become an extremely heavy maintenance burden.

The most valuable assets have changed. A clean context, clear and unambiguous business-logic contracts (such as API definitions and data-model mappings), and an "engineering blueprint" that records the dependencies of the entire system are now the core assets. The blueprint and the context can provide a basis for rebuilding, but they cannot guarantee that the rebuilt result is correct; the rebuilt implementation must still be accepted against fixed criteria. Conversely, if the blueprint is chaotic, or the context retains conflicting constraints, the fact that the current code runs is not enough to show that the work meets the goal.

To become the architect who directs the AI, you must first, with great care and objectivity, recognize the fatal weaknesses of this "AI implementation crew." Do not be fooled by its fluent natural language or its seemingly sophisticated code fragments; large models have two structural weaknesses:

The first is the "self-consistency trap" — in other words, using apparently coherent logic to conceal a flaw. A large model is in essence a probability-prediction machine, and its output often follows the assumptions of the current conversation and remains attached to earlier choices. If it laid a crooked brick in an earlier step — say it wrote a piece of foundational data-flow logic wrong — then when you ask it to fix a bug caused by that mistake, it usually will not volunteer, "the underlying design is wrong; we need to restructure." Instead, to make that crooked brick look reasonable, it will force the implementation to appear coherent through convoluted patches, or even a wall that is more crooked still. It will mend, with nested if-else statements or clever tricks, a problem that should never have existed at the architectural design level in the first place. The logic of the code rapidly descends into growing disorder, until the code no longer follows the blueprint.

The second is "context collapse." The "mental capacity" (context window) of the AI implementation crew is limited, and its attention mechanism degrades severely as the conversation grows longer. In the same long conversation, as the number of modifications you ask for increases, it gradually forgets the architectural constraints, the data model, and even the core business goals defined at the start. Later on, it can only pile up code instinctively from local, short-term memory, leaving earlier and later logic in serious conflict. This is an important reason why long conversations can easily turn code into spaghetti and let a project slip out of control.

Given code inflation and these specific weaknesses of the AI implementation crew, we must fundamentally change how we work as developers. You are no longer the mason who mixes the mortar and lays the bricks yourself; you need to hand over the work of writing code, and put all your energy into the architect's work along the following four dimensions:

  1. Project decomposition: firmly resist the urge to throw a vague, grand requirement straight at the AI. You need to break the system's goals down systematically into engineering modules fine-grained enough for the AI to understand, make explicit what comes first and what comes later, and construct a rigorous dependency tree.
  2. Setting the standards: before letting the AI write any substantive code, set the "implementation acceptance criteria" first. Tell it explicitly what the input parameters are, where the expected output boundaries lie, which design patterns it must follow, and which core data structures it must on no account touch or modify. Use rules to pin its generation boundaries firmly in place.
  3. Engineering oversight: stay alert and review every segment of code the AI generates. The standard for review is not "does it run" but "does it match the blueprint laid down at the start." Watch for whether it has introduced unnecessary complexity or broken the decoupling of the underlying modules.
  4. Calling a decisive stop: this is the architect's most central discipline. When you find the AI caught in the "self-consistency trap," slapping random patches around a bug, you must overcome the programmer's instinctive urge to "just fix it by hand." Do not keep wrestling inside the contaminated context. Pause the implementation outright, discard this poor-quality "construction material," return decisively to the last baseline supported by acceptance material, and reassemble the logic within the verified scope.

The role shift of this chapter comes down to four tasks: planning the blueprint, setting standards, overseeing implementation, and knowing when to stop. Code can be regenerated; the basis for deciding how it is generated and how it is accepted must nonetheless be maintained by someone. Next, this responsibility is carried into project decomposition and milestone setting.

Chapter 2: Breaking Down the Project and Building the Foundations

Imagine saying to an assistant, "Write me an e-commerce product-management system." It hands back a polished set of list and edit pages; products can be added, and the demo seems complete. You then add one more requirement: the same product comes in different colors and sizes, and each combination records its own inventory. The table that previously had only a price field and an inventory field suddenly cannot answer which variant's inventory a given order reduces. The difficulty in this teaching scenario is not that the pages are insufficiently refined; it is that the dependencies between the data model and business logic were never sorted out before implementation. Before adding more buttons to the pages, you first have to state what parts the system consists of, and which agreements must be settled first.

Quite a few projects collapse starting from the developer's one-shot "wish" to the AI. Unconstrained instructions leave the AI to invent dependencies and boundaries that the planner should have defined.

"Systematic decomposition" must therefore be enforced. Before any code is written, the architect must construct the system's "dependency tree," in their head or in a document, and make the order of implementation explicit. You must strip away the interwoven complexity of the business and break the large system down into engineering nodes with linear, one-way dependencies.

The common sequence is: phase one lays the foundations — defining the database table schemas and the core data model; phase two raises the load-bearing walls — writing the core business logic and the service-layer interfaces; phase three runs the utilities — handling cross-cutting concerns such as authentication, caching, and third-party APIs; phase four, only then, is the finishing work — the front-end UI and interaction. The core principle is this: when the underlying model is not yet established and the dependencies are not yet sorted out, do not let the AI skip ahead across layers to implement upper-level business; if there is a genuine reason to adjust the order, record the basis in the blueprint.

After breaking the tasks down along the dependency tree, we need to set "structural milestones" along the implementation route. In an AI development workflow, you must never let the AI generate thousands upon thousands of lines of code in one breath and then cross your fingers to see whether it runs.

What qualifies as a structural milestone? It does not mean "finished writing a certain file" or "accumulated 500 lines of code"; it is an intermediate state that can run independently, can be tested, and is logically self-contained. It is the equivalent of topping out a floor in building construction.

For example, completing "the definition of the user entity class (User Model) together with its database migration script" is a standard structural milestone. Even if at this moment it has no front-end interface at all, not even an API endpoint, its data structure is clear and its field types and relationships are complete; a simple unit test or script can exercise the database insertion. Only when this self-contained milestone has been accepted, baselined, and protected from arbitrary changes can it become the solid foundation for the next milestone (such as developing the login interface).

And meeting a milestone must rely on an extremely rigorous acceptance mechanism. This leads to "acceptance-driven development" for the AI era — it carries forward TDD's idea of "fix the criteria first, then write the implementation," extending test cases into acceptance items that cover function, boundaries, and architectural constraints.

In the past, TDD meant writing the test cases first and then writing your own code to pass them; in the AI era, you set the "acceptance criteria" first and then let the AI produce the code. Before the AI outputs a single line of substantive code, the architect must first feed that node's acceptance rules to the AI as a prompt.

If you only say "implement a user login feature," the AI may offer widely varying implementation plans and may miss the boundary conditions you care about. The correct "acceptance-driven" instruction reads: "Next, implement user login. Your code must meet the following acceptance criteria: 1. Accept account credentials: an account identifier and a password. 2. Verify the password using Bcrypt hash comparison. 3. Only after successful verification, issue a JWT that includes User ID and is valid for only 2 hours. 4. Define and throw a 401 AppException for all authentication failures. Classify other exceptions separately according to the global exception-handling convention. Once you understand these boundaries, begin writing the code."

Set the acceptance criteria first, then let the AI produce code. This is not only handing the AI a precise blueprint; it also draws clear acceptance red lines for the architect. Code that has not completed the agreed acceptance should not be marked as an accepted milestone, or treated as a reliable dependency for the next stage; what is not yet verified and what has been established as failed must be recorded separately. So-called acceptance must correspond to specific criteria, an implementation version, and supporting material. The next chapter, "Evidence Discipline," answers this: is the material sufficient to support our judgment of a completed state? When a judgment changes in later checks, a retrospective ledger (a record preserving the basis, failures, unknowns, and revision relationships, developed later in the book) is needed to continue the work.

Chapter 3: Evidence Discipline

The previous chapter, "Breaking Down the Project and Building the Foundations," required agreeing in advance on what counts as done. This chapter follows with a harder question: on what basis do you judge that these agreements have been met?

Opening: Two Reports Awaiting Verification

Start with an anonymized paraphrase of an AI pair-programming conversation that the author reports as real (evidence level: self-report; the account below is not a verbatim quotation). The original conversation is not publicly available with this book, so readers cannot independently verify its authenticity or full context. The task was small: fix a resource-counting problem.

In the first round, the assistant reported the fix complete and said the checks had passed. It sounded like the matter was closed. But the user did not stop there and asked for one more recheck. In the reply from the second-round recheck, the assistant reported a new finding: the previous fix itself had introduced a new inconsistency — one resource too many was counted, exceeding the fixed quota.

The same conversation, the same assistant: first a report that the checks passed, then a report that the previous fix introduced a new problem. The two reports put "is it done" back in question, but they do not necessarily contradict each other logically: a check passing and a problem existing outside the checked scope can both hold at once. What actually happened?

The answer is that these two statements alone cannot establish what happened. Both statements are self-reports: the AI's own accounts of its work. A self-report can establish only one thing: that the statement was made. By itself it cannot establish that the event the statement describes happened.

The later statement offers a lead for rechecking, but it does not automatically become fact merely by appearing later. You cannot close the task with the first statement, and you cannot use the second to establish outright that a defect has been confirmed. You need to go back to the corresponding code version, execution records, and acceptance conditions. Otherwise the so-called recheck just replaces one sentence from the crew foreman with another.

There is no need to first judge whether the assistant was honest, or to debate the strength of the model. As long as the basis for judging "done" is a sentence in the conversation, you are substituting the crew foreman's "the wall is built" for an acceptance inspection. A construction report can tell you where to check next; an acceptance sign-off requires other grounds.

This chapter addresses exactly one problem: in AI-assisted programming, what counts as evidence, and what is merely a statement awaiting verification.

The Three-Level Evidence Model

Put the three kinds of material commonly seen on a construction site side by side, and the question becomes clear:

  • The crew foreman says "this wall is built" — that is a self-report.
  • The supervisor records the action of laying the wall and the mortar arriving on site — that is an observation record.
  • The drawings and measurement conditions are fixed, and acceptance material that others can re-test is retained — that is verifiable evidence.

The three kinds of material support different conclusions. Carried over into AI programming, this distinction is the three-level evidence model:

LevelWhat it isTypical formConclusions it can support
Self-reportA statement in the conversation text"Completed," "checks passed," "fixed"Only that "such a statement was made"
Observation recordA trace left by the execution processTool calls appearing paired with returned results"A particular tool ran and returned a result"
Verifiable evidenceFixed records that can be independently replayedInputs fixed with hashes + a third party can independently rerunFacts within the scope of the replay

When this chapter says "observation record," it specifically means an execution observation with structurally linked calls and results: the call and the result can be matched to each other, rather than guessing from a nearby summary that they belong to the same execution. It further requires that the material can be interpreted under confirmed format rules and admitted as evidence; the pairing identifier alone is not enough. The next section develops this boundary.

Using this model comes down to one rule: at each higher level, the conclusions become narrower but more firmly supported. This is not a sequence of approval stamps on the same sentence. It turns a vague "it's done" into a judgment about a specific subject, under stated conditions and within defined limits.

A self-report's use is to signal that "something is claimed to have happened here" — worth a look. If the assistant says it changed a file, you can follow that lead to check; if a user says some behavior is abnormal, that too can be an entry point for investigation. Who makes the statement does not change the material's level.

An observation record goes one layer further. A file write, a test run, a command's exit — if there are paired calls and returns, there is a retained trace of the execution process. But respect its limits: observing "the test ran" does not mean "the code is right"; observing "the file was written" does not mean "the right content was written." Observation records support judgments at the level of actions and returns; they cannot by themselves establish that the requirements have been met.

Verifiable evidence demands more: the inputs are fixed and hash-bound, the process leaves a trace, and a third party can take the same material, independently rerun it, and check the results within the specified scope. A hash lets you check that the material is unchanged; it does not prove that its contents are correct. Matching replay results likewise support only facts within the replay's scope; you cannot extend the conclusions of a few test cases into "the whole system has no problems."

Using the first level as if it were the third crosses the evidence threshold. "It said it was done" can go into the process record; using that sentence to close the task ticket amounts to passing an engineering acceptance with a construction report. What you must check is not only whether material exists, but whether the material is sufficient to support the sentence in front of you.

Format Sets the Ceiling; Admission Checks Determine Usable Output

This section asks you to take two things seriously: the "record format," and the checks material must pass before entering analysis. The former determines what the archive preserved; the latter determines which of its contents can be interpreted in the confirmed way. A structural pairing alone does not make a record admissible as evidence.

The author reports that the research pipeline posed the same question to conversation archives from two different tool families: "Was this correction actually executed?"

Public availability of the research material: The sample counts, archive sizes, pairing counts, independent replays, and checking results below are all reported by the author. The original archives, candidate list, parsing rules and versions, run artifacts, and independent checking records have not been published with this book, and no accessible public source is provided. Readers therefore cannot currently verify these figures or processing conclusions independently. The account retains the author's figures and evidence classifications, but terms such as "independently replayed," "verified," and "verifiable evidence" describe the research process and material conditions the author reports. They do not mean that the book supplies readers with independently checkable evidence. Non-publication does not disprove the findings, but the report itself is not public verification.

The tool family A sample: in the conversation, a tool-call structure is clearly visible — the model names a tool and supplies its arguments. But digging into the record format revealed: the call left no correlation identifier, and the structure of an execution result simply does not exist in the records. In other words, we can see the model announce an action, but not whether the action was executed or what it produced. For this sample, the most the researchers could finally write down was: "The conversation contains an account of the correction." Whether execution happened, and what the result was — cannot be determined from the available records. No amount of clever analysis or compute can conjure results out of an archive that recorded no results.

The tool family B sample: in the raw transport records, the paired structure of calls and results has been verified. But under the specified syntax rules and compatible versions, the sample yielded no text view usable for corroboration analysis. The raw pairing is a structural fact; it has not yet become an admitted execution observation of the target correction. This outcome is not an isolated case. Under the predeclared candidate list, the research pipeline went on to check four more archives from the same family, five in all including the first, ranging in size from 16 KB to 1.5 MB; the structural pairing counts were 12, 131, 59, 1, and 0 respectively, 203 pairs in total, of which 191 pairs were independently replayed; all five yielded zero usable text views — the last four were refused at the same admission gate: when version ambiguity cannot be eliminated, the rules choose refusal rather than relaxation. The largest archive yielded 131 pairs; the smallest yielded none.

The material stopped before analysis, involving an envelope format the current rules do not recognize, control records not interpreted as text, and version ambiguity that could not yet be eliminated. The established admission checks were not relaxed in order to obtain usable text. This outcome describes the processing boundary of each sample under the specified rules; it must not be taken to assert that the material itself contains no execution content.

Think of it as material arriving at a construction site: you can read the numbers on the packing slips and match the two slips to each other, but the specification used for the material inside the boxes is not yet recognized by the current checks. Matching numbers is no substitute for confirming the specification. You cannot, to get the material through the gate, temporarily treat an ambiguous specification as already identified; nor can you, because this batch failed to enter, assert that the boxes contain nothing.

Therefore, zero usable text views do not mean zero corroboration. All five samples stopped before analysis: the structural pairing counts can be tallied; the number of corroborating pairs for the target correction was not measured; it should be recorded as "unknown," not filled in as zero. Nor is it the conclusion "analysis finished, and no qualifying content was found"; the five outcomes with no usable text view are facts of these five samples under the established admission checks; they do not establish counts for the tool family as a whole. As to whether the target correction was executed and whether it meets requirements, the available material gives no answer. Do not write the material-processing conclusion as the closure of the repair task.

Here each evidence level must be tied to the specific claim it supports: the correction account in A is a self-report; the raw pairing in B is a checked structural fact that has not yet become an execution observation with structurally linked calls and results for the target correction. For the processing conclusion "each B sample has no text view under the specified rules," the author reports independent checking records tied to fixed run artifacts and version snapshots and classifies them as verifiable evidence. According to that report, they support the processing boundary, not the result of the target correction. These records are not public, so readers cannot independently check that classification or conclusion. This comparison covers only one sample from tool family A and five samples from tool family B; they do not represent all versions and all retention practices of the two tool families.

This comparison suggests two practical judgments:

First, when choosing tools, count the "verifiability of the archive format" as a real cost. If an archive retains neither execution results nor call correlations, that archive alone cannot establish the corresponding execution observation. This is not something that reading the conversation a few more times can make up. You also need to check whether other material exists — test records, artifact snapshots — and must not write the archive's ceiling as the ceiling of the whole engineering effort.

Second, check whether retained content can enter analysis, not just whether the file exists. That a conversation opens and its text is searchable is a different matter from whether execution records are admissible as evidence. Before a retrospective, first confirm whether the calls, results, and correlation fields are present, then confirm whether the format and version can be interpreted under the established rules. Whichever link is missing, mark that link. Format sets the ceiling of the evidence that can be retained; admission checks determine the usable material actually produced under the current rules; that no material describes an execution result does not mean execution failure has been proven.

Five Rules for Practice

Turning the model above into daily habit takes five rules. The worked examples below are all teaching scenarios in generic engineering situations, not new real cases; their evidence-level labels describe how to judge material, not that these examples were actually executed.

First, completion means acceptance, not a claim of completion. The acceptance criteria must exist before execution, written in the blueprint — not improvised after the AI says "done." A "done" cannot substitute for an acceptance item; you need to know exactly which criterion is supported by what material.

A worked example: you are about to have an assistant modify a batch-write function. Before issuing the task, write into the milestone: "Given an empty initial data set, when the input contains one record missing a required field, the whole batch is rejected and the number of persisted records stays unchanged; accepted with fixed inputs, snapshots before and after the run, and replayable steps." This states the starting point, the input, the expected behavior, and the material for the judgment at once. As for the wording of the error message, concurrent behavior, and the like — if they belong to this round's requirements, each needs its own item; do not assume this one item has covered them.

Only then let the AI start work. Its reply "exception handled" is still at the level of self-report; only when the call records and returns can be paired do you reach an execution observation with structurally linked calls and results; only after the implementation, inputs, and environment are fixed, and a third party can independently rerun and check the states before and after, do you have the verifiable evidence this acceptance item requires. Each layer does its own job; none can be skipped.

Turn it around: suppose that after it finishes you see an error message in the return and improvise the line "showing the error means done" — what you have accepted is no longer the original requirement "reject the whole batch." When the error message appears, whether data has already been partially written remains unanswered. It is like building the wall first and then drawing the design lines along its edge: the drawing looks consistent with the site, but it has lost its power to constrain the construction.

Real requirements can be adjusted, but the adjustment must leave a trace. Keep the original item, the reason for the change, and the new version; state from which execution onward the new criterion applies; then verify under the new criterion. Do not quietly erase the old requirement, and do not assume that evidence for the old requirement also proves the new one. Acceptance criteria are not unchangeable; the fault is changing them and then pretending they were like this from the start.

Second, tool output is an observation, not a conclusion. A test run passing does not mean the code is correct; a command exit code of zero does not mean the requirement is met; a successful compile does not mean the feature works. Observation records answer what happened at the execution level; whether a requirement is met still requires mapping what was observed onto the predeclared criteria item by item.

A worked example: you are reviewing a pagination change awaiting commit. In its report the assistant writes, "all tests pass; pagination complete." You open the run records associated with this change and confirm the test command did execute and returned a passing message. At this point, what can be recorded is an execution observation with structurally linked calls and results: "this version ran the specified tests; the returned content reports passing." You cannot also approve, in passing, the second half — "feature complete."

Next, inspect the test assertions. Suppose the case only checks that the number of returned entries does not exceed the limit, while the milestone also requires that consecutive pages neither repeat nor omit entries. This return does not answer the latter two conditions. In your review comment you should write: "The count check has a run record; cross-page duplication and omission have no corresponding verification yet — acceptance pending verification." Do not write "no verification yet" as "duplicates have been found," and do not write "no failure observed" as "requirement met."

The next step is to prepare fixed data with a deterministic order, read page by page, compare the results separately against the expected set and the expected order, and retain the execution steps and raw results. Only when the material meets the conditions for independent replay can you judge, within the scope of verifiable evidence, whether these fixed cases satisfy the corresponding items. A test named "complete pagination verification" does not add to what it actually checks; what the assertion compared determines what it can answer.

When reviewing, you can split one sweeping report into two lines: one recording "what the tool returned," the other recording "which acceptance requirement this return supports, and what is still missing." This is not asking you to deny the test; it is asking you to hold the right drawing before reading the measurement. A clear reading on the ruler does not mean the wall you measured is the wall that needed measuring.

Third, key conclusions must be independently checkable by replay. For important judgments — a delivery, an architecture change, an incident diagnosis — require the evidence to reach the third level: inputs fixed, process traced, independently rerunnable by a third party. A conclusion that cannot be replayed should honestly be labeled "pending verification"; do not let firmness of tone substitute for completeness of material.

A worked example: you need to judge whether a sorting change satisfies the item "preserve the original order when values are equal." Do not merely save a screenshot reading "passed." Make the conclusion record an acceptance record with evidence behind it: state which implementation version is being judged and which acceptance item applies, then give the input data, environment description, execution steps, and the location of results. Its skeleton can be compressed into three lines:

Inputs: the implementation snapshot, dependencies and configuration, and sample data are each fixed with recorded hashes; the acceptance-item version is bound alongside. Steps: run from the agreed initial state; save the calls, raw output, and comparison method; state how to restore the rerun environment. Conclusion: pending independent replay; after replay, fill in the check results, material references, and applicable boundaries, without extending to untested inputs.

These three lines are a recording template, not a completed proof. When filling it in, make sure the recipient can locate the material, rather than leaving only "see the relevant attachment." If a step needs a local configuration that has not been preserved, or the input points to data that changes at any moment, then "just follow along" is still missing a piece of the construction conditions. List the gaps explicitly; talk about replay only after they are filled.

A third party should not need an ad hoc explanation from the person who originally ran the process to rerun the process. Let the reviewer obtain the inputs from the records, check the hashes, execute the steps, and check the output under the same comparison method. Record whether the replay matches; if it does not, keep the difference — do not let the first conclusion overwrite the second record. A replayed failure is also verifiable negative evidence. Evidence level and whether the result is good are two different dimensions.

Keep a particularly tight grip on the conclusion's scope. Even if replaying this example produces matching results, it supports only the ordering judgment under the specified version, conditions, and examples; it cannot justify writing "sorting is correct for all inputs." To claim that an incident was caused by this change requires further argument and evidence; reproducing a phenomenon cannot be taken directly as causal attribution. This chapter asks you to write the parts that have been measured clearly, and not to sign off on the parts that have not.

Fourth, preserve failures and unknowns. If evidence cannot be found, write "cannot be determined from the available records"; do not let the completeness of a narrative override the facts. Negative cases and unknowns both go into the ledger; a negative case shows that some judgment has contrary material, an unknown shows that the current material is insufficient — the two cannot substitute for each other.

The author reports the tool family B samples in the previous section as real anonymized negative cases (the underlying material and checking records are not public and cannot be independently checked by readers): for the judgment "a pairing structure is enough to obtain a usable observation," they mark a boundary; on whether the target correction was executed, they still leave an unknown. According to the author, the processing records provide verifiable evidence for the former; for the latter, the required execution observation was not obtained. The smallest archive in the series does not have even a single pair; the author reports that direct frame-by-frame inspection confirmed this as a property of the sample itself, not a miss by the checking tool. Its candidate turns can only remain "not observed" — upgrading requires pairing evidence, and without evidence there is no upgrade; and "not observed" means only that this check did not observe it, not that it "did not happen." For the samples whose structural pairings could be checked, the conclusions likewise stop at the structural level: at most you may write "calls and results co-occur in a given turn"; you cannot write a single word more just because the pairing is intact. Preserving these outcomes under the procedure locked in advance has clear teaching value: the ledger should read "no text view under the current rules; corroboration not measured," not "no corroboration," and certainly not a different story invented to fill the gap. This negative case documents a boundary of what can be established; failure to obtain positive corroboration should not be judged outright as process failure, nor used to claim that the process has some universal effectiveness.

A worked example: while organizing an old fix, you find the assistant's reply claiming "adjusted and verified," you also see the call arguments, but you find no return that can be linked to this call. The retrospective log could read: "Question pending judgment: whether this correction was executed. Available material: the correction self-report and the call request. Evidence level: self-report; missing item: a linkable execution return. Judgment: cannot be determined from the current archive alone. Retained item: if the corresponding execution log or artifact snapshot is obtained, verify separately then."

This record does not paint the blank green, nor paint it red. It points out the question, the material, the gap, and the current boundary. The recipient need not guess whether "cannot be determined" means no check was made, a check was made but material is missing, or a failure was already found. The record should state the scope you actually examined; other material you did not find should not be written as "does not exist."

Consider a different situation: a linkable return exists, and its content shows a validation failure. Now you can record, as an execution observation with structurally linked calls and results, "the return reports validation failure," retain the corresponding input and error output, and no longer keep using "execution cannot be determined from the available records." If the failure can be independently replayed under fixed conditions, record its specific scope as verifiable evidence. Even if the fix passes later, open a separate entry, preserving the earlier failure and the difference between the two versions.

Returning to the anonymized case reported by the author as real in the opening, the tension between the two self-reports must also be preserved. You cannot excerpt only the first and write it up as a completion case, nor only the second as a case of a confirmed defect. You can write: "first a self-report that checks passed, then a self-report of a new problem; the checked scope and the fix results of both are pending verification." This ending has no dramatic reversal, but it keeps the conclusion within what the material supports. The retrospective ledger's task is to preserve judgments that others can use to continue the work — not to invent a tidy ending for every stretch of construction work.

Fifth, preregister the selection criteria. Retrospectives, research, case write-ups — whenever you select examples from a collection of records, write down and freeze the selection rules before looking at any results. The selection criteria should explain why this record entered the sample, not supply a reason for it after the story has been read.

A worked example: you want to check whether the records of a closed milestone are sufficient to reconstruct the execution process. Before looking at outcomes, fix the candidate list and its version, and declare: "Within this list, ordered by de-identified identifier, take the first session containing a correction request; include it whether or not there is an execution return, and whether the return passed or failed; if no linked result can be found, record it as cannot be determined. If no session in the list meets the condition, record no eligible sample; do not swap in another batch on the spot." This is a rule for illustrating the operation, not an additional narrative about how a real sample was screened.

After a record is selected, first record why it meets the rule, then judge the material by the three-level model. It may contain only a self-report; it may carry an execution observation with structurally linked calls and results; it may also have separate verifiable evidence meeting the replay requirements. You cannot, because the selected record is only a single sentence with little narrative detail, flip forward to a more complete story. Otherwise, what the reader sees is the narrative you picked, not the material obtained under the declared scope.

If the question is precisely how calls and results pair up, you may also write "has the correlation fields" in advance as a structural condition — but you must state at the same time: this selection has already excluded records without such fields, and cannot be used to evaluate the completeness of all archives. The selection rule answers "why this one was chosen"; the evidence level answers "what it can prove." Neither can be missing.

When a rule must change, keep the original rule and the original selection results, write down the reason for the change, and treat it as another round of selection. Preregistration is not a stamp guaranteeing correct conclusions, nor does it automatically make the sample representative. It asks you to make the selection process transparent, so that others can check whether you acted by the procedure you declared. You may leave behind a failure sample, an unknown sample, even a no-eligible-sample record; do not, to make the chapter more appealing, quietly swap out the ledger's first page.

Connecting Evidence Discipline to Implementation Planning

Now place this chapter back within the book's methodological frame, and its position becomes clear:

The blueprint defines what to do; evidence discipline establishes the basis for saying it is done.

The blueprint (CONTEXT.md) defines the acceptance criteria for each milestone; the three-level evidence model defines the evidence required to support each acceptance judgment; acceptance-driven development joins the two. When each milestone closes, what you check is not whether the report looks complete, but whether the criteria, the implementation version, and the evidence correspond one to one. Self-reports provide leads; observation records support execution-level judgments; verifiable evidence supports result judgments within the specified scope.

Do not leave this work as a one-line reminder at the chapter's end. Add a set of checks to the milestone acceptance record, alongside the existing feature items. Below is a generic template; the bracketed positions are to be filled with actual material references, and "passed" there means only that the item has reached the stated evidence threshold.

In use, judge item by item; do not compute a checked-box ratio. If a required criterion is still pending verification, you cannot declare the whole milestone complete just because several other items are checked. If you decide to adjust the scope, update the blueprint first, keep the reason for the adjustment, and assess the new scope; matters outside the scope must also have their disposition stated. Authorizing the work to proceed and demonstrating that acceptance passed are two different kinds of record; do not let a shared "complete" blur the difference.

This checklist also dictates what to do next. Missing criteria: first make explicit the behavior to be accepted. Only a self-report: look for the corresponding execution material. Only observation records: fill in the fixed inputs, replay steps, and result comparison. Material can no longer be obtained: keep "cannot be determined from the available records." Site supervision does not complete its work by pressing the workers to shout "done" one more time, and you do not need the assistant to say the same conclusion more firmly.

When you update the blueprint and hand the milestone to the next stage, hand over the acceptance items, evidence references, and unresolved items together. A later recipient should be able to see: which parts have been checked under what conditions, which parts were only observed executing, and which parts are still only statements. The blueprint can be condensed; the evidentiary limits must not be erased in condensing.

Finally, return to the story that opened the chapter. Faced with the first report that checks passed, you should ask for the corresponding run records and keep checking which acceptance criterion they cover; faced with the second report of a newly found problem, you should likewise press for the corresponding version and verification material. The former is a self-report; the latter is still a self-report. A later statement does not automatically carry the authority of an acceptance sign-off.

You do not need to supply this case with an already-fixed ending. Keep the two reports, mark them pending verification, point out what is still missing — that already answers this chapter's question: "done" must be an acceptance judgment with a clear scope, one that leads back to the material. Before signing, put the evidence on the table.

The next chapter first discusses how to use a retrospective ledger to preserve changes in judgments, giving failures, unknowns, and material obtained later each their own place. With these records in place to support continued work, we then enter Part II and discuss recognizing architectural drift.

Chapter 4: Retrospectives and the Negative-Case Ledger

What Happens to Old Questions When a Task Is Closed?

First imagine a fictional teaching scenario. You take over a batch-write modification whose task summary is a single line: "Abnormal input handled; recheck complete." The attachments, however, hold three kinds of material: a return reporting a validation failure, an inspection report submitted afterward, and one unanswered follow-up question — what happens with two simultaneous submissions? You want to know whether delivery can continue now, but you must first guess: which version does "complete" refer to, does the failure record still apply, and who decided not to investigate that follow-up?

If at this point the summary is changed to "passed after the fix," the next recipient still faces the same questions. The pass may cover only one of the conditions; the old failure may belong to another version; the unanswered follow-up will not gain an answer because the summary was updated. One tidy-looking closure label squeezes three different things together.

The previous chapter's evidence discipline settles on what basis a judgment holds. This chapter takes one step further: across several checks, how do you preserve the changes in a judgment, so that later people can find the current basis and also see the gaps that have not disappeared? We need a retrospective ledger that specifically retains negative results, missing material, and unresolved branches. Its use is to continue the work; it should be maintained throughout the work, not assembled only when writing the final summary.

The "negative-case ledger" here is not a failure leaderboard. It records what contrary material a claim has met, and also which questions still lack the conditions for a judgment. One entry can contain both a confirmed negative result and a target behavior that remains unknown. A complete ledger does not guarantee correct judgments either; it makes judgments accessible for review and correction.

Start by Recording Why the Case Was Selected

When starting a retrospective, first write down, in one sentence, the question to be answered. Is it to confirm that a certain version meets an acceptance requirement, or to find out whether the existing archives can support the completion report made at the time? The former requires records of behavior; the latter examines the conditions of evidence retention. With a different question, what counts as a result and when you may stop both differ accordingly. Do not treat "retrospective on this round of work" as an object already specific enough.

Then record the reason for selection. If it comes from an acceptance item not yet closed, name the corresponding item; if from a contradiction found at handoff, keep where the contradiction was found; if from a candidate list drawn by rule, keep the list version, the selection rule, and the time the list and rule were frozen. This way, the recipient can distinguish an investigation targeting a known problem from a sampling inspection of a batch of material.

Selection that happened after seeing the result can also be registered. For example, opening the ledger to explain a failure return is by nature a targeted retrospective. It must honestly be written "selected after seeing this return"; a rule that looks preregistered cannot be backfilled afterward. Such an entry can answer a particular question, but its selected status cannot stand in for other tasks; and a ledger that accumulates many entries does not automatically gain representativeness.

If no material within the predetermined candidate scope meets the condition, the selection record itself should still remain. State the scope, the conditions, and the outcome that nothing was selected; do not quietly widen the scope until a case worth narrating turns up. If conditions genuinely must be adjusted later, record another round of selection and the reason for the adjustment, so that the two rounds each have their own boundary. What this step preserves is the process of choosing material; it adds no probative force to the material.

Keep the Subject, Material, and Judgment Separate

The ledger should give the question a stable identifier, then give each update a revision identifier. The question identifier links subsequent work; the revision identifier locates the exact wording recorded at that time. When the object changes, these two layers matter all the more: the same question may continue from Implementation A to Implementation B, but a particular execution result belongs only to the object it actually corresponds to and cannot move along with the question's title.

At minimum, bind the implementation version and the acceptance-criteria version; where running behavior is involved, also bind the inputs, initial state, environment, and comparison method. A version name must resolve to preserved content. "Yesterday's version" or "the last commit" is not a sufficient reference. A material reference should locate the relevant position in a specific record or attachment; where content must be fixed, a content digest can be used to check sameness, but a digest does not prove the material's interpretation correct.

To save space, the ledger may keep only references, without copying entire logs. Yet "see attachment" is still too broad: the specific attachment, call and return, and assertion are all needed to form the judgment. If a reference is temporarily inaccessible, register the access obstacle; if only a summary report was obtained, note that the underlying material has not been obtained. That a reference cannot be read does not mean the original material never existed; an accessible report likewise cannot replace all the records it claims to rest on.

Beside each important judgment, write the material supporting it and its evidence level, following the previous chapter's self-report, execution observation with structurally linked calls and results, and verifiable evidence; do not assign a single evidence level to the entire ledger. The material needed for an observation "the return reports validation failure" differs from that for a judgment "under the specified conditions the result does not meet the acceptance requirement." Where the required threshold cannot currently be met, stop at that item.

Also write separately "what the current material supports" and "what is being decided now." Deferring delivery, adding checks, narrowing this round's scope — these are action decisions. They can be made on the basis of an unknown, but they do not turn the unknown into failure or a pass. When continuing is approved, state which part continues and who picks up the remaining questions; the words of approval must not substitute for the acceptance basis that was lacking before.

Three States, Three Different Next Steps

Faced with an unsatisfactory outcome, first ask on what object and at which step the result was formed. A negative result means material supports that some expectation was not met; missing material means the required records are absent within the scope examined; analysis blocked means the checking has a definite obstacle and has not reached the stage at which the target question can be answered. The three call for different actions and should not share one "failure" state.

When a negative result is observed, keep the inputs, the expectation, the actual return or state, and the basis of comparison. If the material supports only "the tool returned failure information," keep exactly that wording. Only after further checking the criteria and the actual behavior do you judge whether a specific acceptance item is unmet. The next step here can be correcting the implementation, or it can be investigating the comparison method first; you cannot conclude the cause is in the code merely because the result disappoints.

When material is missing, write which fixed material was examined, which link is absent, and whether any known further places to look remain. "Not found" here covers only the scope already examined. If a call was found without a linked return, the target execution may still be unknown; the next step is to obtain the corresponding return or other records sufficient to answer the question — not to have the assistant repeat its completion report.

When analysis is blocked, state where the analysis stopped and the conditions for resuming. A format that cannot be interpreted under the established rules, an environment that cannot be restored, required access not granted — any of these can keep the analysis from starting. Keep the material for the obstacle itself, while leaving the not-yet-observed target result as unknown. A count that never entered analysis should not be filled in as zero; "not measured" and "measured, and the result was zero" are different records.

The anonymized archive negative case in the previous chapter already distinguished the raw pairing structure, the processing outcome under the specified rules, and the target correction still unknown. When entering it into the ledger, keep these objects and their evidentiary limits separate; a checked processing conclusion cannot overwrite the unknown target.

This example serves here only to show that one entry must hold states at different levels. It proves nothing about the overall performance of a class of tools, and it must not be written up as a reproduced repair failure. If new interpretation rules or new material are obtained later, record another round of analysis; the analysis that was not carried out back then does not thereby become one that had been carried out at the time.

A Ledger Entry That Supports Continued Work

Below is a teaching template that can be filled in directly; it is not an executed record. It can live inside an existing task ticket or a versioned document; the fields need not be broken out into a dedicated system, but content not yet filled in must not be taken by default as already checked.

FieldWhat to record
Question and identifiersThe specific question to answer; the stable entry identifier; this revision's identifier and time
Basis for selectionCandidate scope, reason for selection, rule version; whether selection happened before or after seeing the result
Scope of assessmentImplementation and criteria versions; relevant inputs, environment, initial state; explicitly excluded scope
Material referencesFixed-material identifiers and locations; necessary content digests; scope examined and access gaps
Claims and unknownsEvidence level and scope of support per claim; negative results, missing material, and blocked steps listed separately
Current actionWhich work continues, pauses, or ends; the reason, the recipient, and their confirmation status
Follow-up conditionsWhat material or resolved obstacle permits reopening; when to recheck; what happens if conditions remain unmet
Revision relationshipsWhich judgment is supplemented, corrected, or superseded; the new basis; which historical facts and unresolved items are retained

When filling it in, you may first break a complex question into several subquestions, each keeping its own state. Under one overall entry, "single-input behavior," "simultaneous-submission behavior," and "basis of the old report" can each move forward separately. If dependencies exist between subquestions, write them out explicitly: if a gap in one would block overall delivery, the overall status cannot be changed to passed just because the other subitems have their basis.

What the template most needs to prevent is combining a judgment and an action in the same field. "Hold off on further analysis" describes a work arrangement; "target result unknown" describes the boundary of what is known. The two can hold at the same time. Stopping investment does not fill the material gap; on the contrary, recording the reason for stopping the check is what lets a later recipient know why this matter was left blank.

Teaching Example: Three Revisions of One Entry

Everything below is a fictional teaching scenario, including the versions, material, checks, and review results; it is not a backfilled account of real research. For readability, the example uses only A and B to refer to fixed implementation content; in real entries you must still provide references through which the corresponding content can be obtained. The evidence levels named indicate the material conditions within the setup; they do not mean this book actually performed these checks.

First registration: pulling apart the tangled "not done." The recipient in the opening decides to check the batch-write rejection behavior. Version 1 of the acceptance criteria required: with the initial records empty, when a single submitted batch contains one record missing a required field, the whole batch is rejected and the persisted records remain empty. Another requirement — discussing the case of two simultaneous submissions — is listed separately as the concurrency branch and not included in this single-input check.

The basis for selection is written plainly: the recipient selected the case after seeing a failure return — a targeted retrospective, not a sample selected in advance. The assessment is tied to Implementation A, version 1 of the criteria, Input A, and Environment A. The material "Run A" preserved linkable calls and returns; the return reports validation failure. It supports an execution observation with structurally linked calls and results, but the persisted state after the run was not saved. A returned error is, after all, one of the expected outcomes when input is rejected; acceptance failure cannot be established on the strength of the word "failure" alone.

So revision 1 of the entry records three judgments: a validation-failure return has been observed; whether partial records were left behind is still unknown, because the state records are missing; the concurrency branch has no corresponding execution record and remains unknown. The action is to re-examine the state before and after the single-input run, and to hand the concurrency branch over to the recipient. The entry does not write the target as "repair failed," nor does it accept the summary's "abnormal input handled."

Second addition: part of the unknown gains negative evidence. Fixed state snapshots, execution steps, and a comparison method corresponding to Implementation A and Input A were later obtained. In the teaching setup, an independent reviewer replays according to this material and observes that one record still remains after the rejection return appears; the review material is recorded as "Review A." This supports the judgment that "persisted records remain empty" is not met under the listed conditions; the conclusion extends to no other inputs, nor does it establish which modification caused the phenomenon.

Revision 2 cites revision 1's single-input subitem, explains that the new material answers the original state gap, and therefore changes the current judgment from unknown to a checked negative result. Revision 1 remains as it was: at first registration, that state material indeed had not been obtained. What changes here is the judgment under the evidence now available; there is no need to rewrite revision 1 as "failure long since confirmed."

In this revision the recipient also corrects one reference: the first registration recorded the wrong location number for the run material. The correction lists the old location, the new location, and the basis of the check, and states that the material at the old location was not used in revision 2's judgment; until the reference has been checked, the corresponding observation in revision 1 is marked pending recheck. A location error cannot hide inside polished wording, nor can this correction be skipped just because stronger material arrived later.

The concurrency branch remains unresolved. The existing environment description lacks the configuration needed to rebuild the simultaneous-submission conditions, and the supplementary analysis stopped at environment preparation. Revision 2 records it as analysis blocked, target behavior unknown, stating that it can reopen only after the concurrency configuration and corresponding steps are fixed. This exists side by side with the single-input branch's negative judgment; the entry's title should not be summarized as "all problems identified."

Third addition: a new version passes a limited check; the old failure remains in force. The teaching setup continues: after Implementation B is submitted, it is rechecked under version 1 of the criteria and the same single-input sample; the fixed material and the independent replay results both show no record left after rejection. This round's material is recorded as "Review B," and the entry judges on that basis that Implementation B meets this acceptance item under the listed conditions.

Revision 3 has two relationships to keep apart. For the working judgment "single-input acceptance of the current candidate implementation," it supersedes the basis for proceeding that revision 2 gave; for the historical fact "Implementation A left a record under the specified conditions," it has no refuting effect, because the object of assessment has changed. The entry keeps Implementation A's negative result and links Implementation B's positive result under the same question, noting the difference between versions.

The concurrency configuration has still not been obtained, so revision 3 keeps the blocked branch. The checked single-input subitem can be handed over as a completion with a defined scope, or overall delivery can be deferred; if the concurrency requirement still belongs to the overall acceptance scope, the whole cannot be declared passed. If a scope adjustment is separately approved, keep the criteria change and the authorization record, then judge the new scope; the original concurrency question is noted as handed over — it must not vanish from the entry.

After the three revisions, the current summary can read: "Implementation B's specified single-input check now has verifiable evidence; Implementation A's corresponding negative result is retained; concurrency behavior is blocked because the configuration material was not obtained — target result unknown, and the conditions for overall closure are not yet met." It is longer than "passed after the fix," but it answers clearly the choices the next recipient must make, and it identifies where further work can proceed.

Preserve the History and Maintain a Current Summary

Append-only, no deletion of the judgment history — that is the ledger's updating principle. But this does not mean the recipient must guess the current conclusion line by line from the first page. A current summary can be maintained, marking the revisions it rests on and linking to the branches still unresolved. The summary can be updated; the historical records supporting it cannot be overwritten along with it. When summary and history conflict, first recheck the material, then append a correction; do not assume by default that the last paragraph of text is the most reliable.

Preserving the traceability of judgments does not require keeping sensitive originals forever. The ledger records only the necessary information and controlled references needed to continue the work; the material is managed under the established access scope and retention period. When de-identification, deletion, or scheduled cleanup is required, keep no sensitive copies; record separately the reason for the handling, the time, and the references affected, without copying sensitive content back into the handling record; at the same time, state in the current summary what has changed in the accessibility of the evidence and the ability to recheck it. Material no longer being available does not mean the target behavior failed, nor may one pretend the original conditions for review still hold; required handling cannot become a reason to quietly rewrite historical conclusions.

Revisions distinguish, at minimum, supplementary material, correction of an error, and a change in the object of assessment. Supplementary material may answer the original unknown; a correction of an error may strip an old judgment of its basis; a change in the object of assessment calls for judging the new object anew. Writing down which relationship it is avoids mistaking a new version's pass for the old failure never having happened, and also avoids wrongly retaining a genuinely erroneous old judgment as a still-valid fact.

If new material shows the old input was mislabeled, the original conclusion must be withdrawn or narrowed. Keeping the old entry is not the same as continuing to endorse the old claim: append an explicit statement "this judgment has been withdrawn," giving the reason, the new material, and the subsequent references affected. The current summary must also stop citing it as a valid basis. What history preserves is how things were once judged and why that changed — not a permanent endorsement of every old conclusion.

If material conflicts and it is temporarily impossible to decide which is credible, register the scope of the conflict as it stands. Another round of checking can be added to separate versions, environments, or comparison methods; but before that checking, do not pick a winner by date, by the tone of the report, or by length. A disagreement between review results is itself an item pending handling and should not be excluded from the "formal results."

How to Hand Off Work and When to Reopen It

At handoff, the recipient should be able to find four things from the current entry point: the judgments now in force and their applicable versions, the material supporting them, the branches still unresolved, and each branch's conditions for resuming. Until the recipient confirms receipt, record the handoff as unconfirmed; do not treat a named recipient as having taken it over. If a key reference is inaccessible, put that obstacle in the handoff record first, then decide who is responsible for restoring it.

Reopening conditions must be recognizable. "Look again sometime" does not specify what change would be worth continuing; "obtain the post-run snapshot corresponding to the original implementation," "obtain a restorable concurrency configuration," and "find the current material inconsistent with the stated version" correspond respectively to supplying evidence, removing an obstacle, and rechecking a conflict. On reopening, append the triggering material and time, and recheck the object and the criteria; do not carry over judgments made under an expired environment.

You can also schedule periodic rechecks, but a recheck date is not itself new evidence. If the date arrives and there is still no material, record an update that material was not obtained, or state the reason for suspending the search and the retention period. For material that genuinely cannot be obtained, the investigation can be closed as "unable to continue within the scope examined"; the target behavior still cannot be determined from the available records. The work can end; the unknown need not be forced to end.

Nor does the ledger need a heavy audit chain for every minor adjustment. For changes of limited impact, easy to retract, with no cross-version dispute, the question, object, basis, and result can be kept in the existing task records; when unresolved acceptance items, conflicting material, a significant scope change, or handoff of responsibility appears, document the revision relationships and conditions for resuming in full. What is simplified is the form of the record; the unknown cannot be simplified into a pass. Whether to use the full entry page should follow the decision it must support and the handoff requirements, not a desire to fill more fields.

Back to the opening: the recipient no longer needs to ask first who sounded more certain. Along the ledger, they can confirm which return belongs to which implementation, which judgment has been superseded by new material, and which branch still waits for its conditions. What the retrospective delivers at this point is a record the next judgment can keep using: past failures have a place, today's basis has a scope, and the questions not yet answered have a clear disposition.

Next we enter Part II and discuss recognizing architectural drift. The ledger preserves versions, supporting material, and unresolved items for judgments of this kind; after a warning sign is found, it still must be checked against contracts and material — a warning cannot be recorded directly as confirmed 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.

Chapter 6: A Core Discipline: Rebuilding from a Known Baseline

Imagine a late-night debugging session. You step through a function the assistant generated; no sooner have you worked out one condition than you find another branch relying on an assumption changed long ago. An earlier implementation version and its corresponding acceptance material sit preserved nearby, while explaining the current implementation already requires flipping back through the conversation again and again. In this teaching scenario, you estimate that the effort to keep reading and patching has already exceeded the effort to restate the constraints and rebuild from a known baseline. This estimate is not a universal law of costs, and it cannot decide the rollback for you; it reminds you to put the two routes side by side, rather than continue only because you have already debugged for so long. From here the chapter discusses the choice to rebuild and its boundaries.

In the traditional mode of development, a programmer's first reaction to a bug is often to start the debugger, step through, locate the defect, and fix it by hand. That is because traditional code was typed out by you, line by line, and you understand the full reasoning behind it. But when the workflow switches to AI-assisted programming, this instinctive habit significantly amplifies risk in an AI development workflow and can easily drag a project down. Hence the most central, most counterintuitive discipline in this book: "rebuilding from a known baseline."

First, we need to examine the engineering economics of compute and human effort.

When you face a long section of AI-generated code riddled with logical flaws and hard to read, with no clear reasoning context of your own, trying to fine-tune it or debug it by hand is usually a poor trade. The generation cost of a large model (compute) is at present extremely cheap, while the architect's mental bandwidth (human effort) is extremely expensive. Reading and straightening out the "spaghetti code" the AI produced, and guessing at its muddled chain of reasoning at the time, often costs no less mental effort than rewriting it yourself — sometimes more. It is like trying to carve fine detail into a block of hardened, poor-quality concrete with a carving knife: painful, and pointless. With generation costs greatly reduced today, the cost of discarding a stretch of wrong code is usually far below the cost of repairing a drifted implementation.

So when you find the AI's code will not run or its logic has drifted, treat "manual patching" as the exception rather than the default, and prefer the following "three-step correction method":

Step one: the design-level correction prompt (point out the design flaw).

When you find an error, absolutely do not respond only at the bricklayer's level — "the variable name on line 42 is misspelled" or "that if is missing a condition." Speak in the architect's language and make a design-level correction, naming the structural defect. For example: "Your last implementation coupled database operations with network requests, violating the single-responsibility principle. Move the data logic into the Repository layer and rewrite it there." In this way you give the AI one or two chances to correct itself.

Step two: pause the implementation.

Two corrections in a row failing to solve the problem, or new anomalies appearing after a modification, can serve as triggers to pause the current attempt and recheck the material and the plan. These counts are a convention for making engineering decisions, not a measurement of the model's internal mechanisms; these phenomena alone cannot prove the model's internal reasoning state or the reason the attempt failed.

At this point, be wary of the sunk-cost fallacy: do not add a third or fourth round of argument. Pause the current attempt, and stop further investment in this wrong branch.

Step three: rebuild from a known baseline (rollback).

After the pause, first recheck the defect, the differences between versions, and the plan, then decide whether to roll back and rebuild. If rollback is chosen, carry out the complete rollback process described below; the selected node has its basis only within the original acceptance conditions and scope. After revisiting the blueprint (the prompt), have the AI implement again from that node, and verify anew against the new criteria.

So that this kind of "rebuilding" can happen at any time without psychological burden, Git takes on a brand-new mission in the AI development workflow.

In the past, Git was often used as a collaboration tool for merging code before the team clocked out each day. In architect mode, Git is no longer just version control; it is your "time machine and high-frequency safety net."

This demands an extremely high-frequency commit discipline: whenever you pass the acceptance criteria and baseline even the smallest "structural milestone" (for instance, merely getting a User Model data-migration script to run through), do not wait — immediately run a commit, preserve the current version, and link the corresponding acceptance criteria, evidence references, and unresolved items. A commit preserves state; it does not automatically prove the state correct, nor does it supply verification for uncovered scope.

Before executing a rollback, first preserve the uncommitted work, raw output, and failure evidence that need to be kept, and confirm and record the explicit target version supported by acceptance material and its acceptance scope. The current commit may be only work in progress; do not assume by default that it is an accepted baseline. For operations that will discard or overwrite content, check whether existing authorization covers the target and the scope of impact; where there is no such authorization, first explain the operation you intend to perform and its impact, obtain the authorization, and only then execute the rollback operation corresponding to that target. Afterwards, check the actually restored state against the original acceptance scope. A version rollback cannot prove that the database, external services, or material outside version control has also been restored.

Rollback provides a specific, traceable starting version for reimplementation. Before issuing further architectural instructions, you still need to check the recovery results, the acceptance basis, and unresolved items; the rollback action itself cannot be taken as renewed verification.

Rebuilding provides the starting point for reimplementation; it cannot replace a new round of acceptance. Record the target version, the operational authorization, the recovery check, and the unresolved items clearly, and the next step can follow. The chapter that follows, on managing core deliverables, explains how to keep this basis in a blueprint that can be maintained over time.

Part III: Standardizing Deliverables and Practicing the Workflow

Chapter 7: Managing Core Deliverables

Now that we have discussed the discipline of stopping — "clearing the active context, checking for drift, and then choosing whether to rebuild" — a severe challenge follows unavoidably: when you open a brand-new conversation window and face a brand-new AI implementation crew that arrives, as if starting with factory settings, with no background memory, how do you get it to build an accurate understanding of the project's current state as quickly as possible? The key is this: beyond the code, you must maintain a highly condensed, continuously evolving "living implementation blueprint." In the era of AI-assisted programming, this is the architect's most important core deliverable. It is the concrete form of the project blueprint (CONTEXT.md) described in the chapter "Evidence Discipline."

This deliverable usually takes the form of a CONTEXT.md file in the project's root directory.

What requires a thorough change of mindset is that this document is not, in the first place, written for human readers. It is a highly machine-readable container for the project's global context — the "guiding project instructions" that inject the project's essential context into the AI each time you open a new conversation.

Four Types of Information the Blueprint Must Preserve

A high-quality living implementation blueprint must contain structured information in four areas:

First, the system overview and technology-stack constraints. Define clearly what system we are building and which frameworks and versions the frontend, backend, and database use. More important, write down the architecture's "non-negotiable constraints," for example: "Use UTC uniformly for all timestamps," "Business exceptions must throw a unified AppException," "Never write any SQL in the Controller layer." These constraints can significantly narrow the space in which the AI diverges.

Second, baselined structural milestones. List the foundational nodes in the current project that have already been accepted against the agreed criteria and must not be modified without confirmation, and for each node record the implementation version, the acceptance items, the evidence references, and the unresolved items. For example: "The entity classes for the user table and the order table are complete, and the relationship between them is one-to-many; modifying these foundational Models is strictly forbidden." This amounts to drawing a safe boundary for implementation around the AI, preventing it from tearing apart the old foundations while implementing new features.

Third, the core data dictionary and API contracts. Condense here the key enumerated states, the state-machine transition diagrams, or the input and output formats of the core business operations. Structured contracts provide a common basis for generating and reviewing new business logic; whether an implementation is consistent with the contracts must still be checked item by item.

Fourth, current implementation status and precise next steps. This is a dynamically updated TODO list. Mark which phase of the project you are currently in, within what scope the previous task was verified, which items remain pending verification, and what the specific action about to begin is.

Keep Updates in Sync and Verify the Handoff

This CONTEXT.md is the project's "living document," and the discipline for maintaining it is extremely strict: whenever a milestone in the code has moved forward, the blueprint document must be updated in step, preserving the correspondences among criteria, versions, evidence, and unresolved items. A summary must not compress "pending verification" into "complete."

When this living blueprint is maintained rigorously, you will gain solid control over the engineering and turn handoffs into a low-friction process grounded in records you can check.

Whether you need to reset the context because the AI has started talking nonsense, or you need to hand the work to another developer at the end of the day, the cost of handoff will fall significantly. The next recipient — a person or a new AI process — no longer needs to page through historical chat records hundreds of pages long to guess at the causes and consequences.

In a new IDE-assisted window, you need to type one concise instruction:

"Read @CONTEXT.md in the project root. Make sure you understand the current system's architectural constraints, the baselined components that must not be changed without confirmation, and the current implementation status. First, check the current version, key contracts, acceptance-evidence references, and unresolved items. Report anything missing or inconsistent. Resolve gaps that affect the next decision. Once you have confirmed the task scope and the required basis for proceeding, explain your implementation approach, then carry out the TODO plan within the scope already authorized."

This handoff material gives the new implementer a starting point, but reading the document does not mean the engineering has been accurately understood. After taking over, check the current version, the key contracts, and the evidence references; confirm the unresolved items; and only then begin the next round of implementation. Whether the handoff was sufficient also has to be examined in the actual work.

The living implementation blueprint connects the current version, the engineering constraints, and the next tasks; it must not be reduced to a list of completion labels. Only if the basis is checked at handoff and the blueprint updated in step after implementation will this blueprint keep playing its role. The next chapter places these actions into one complete standard implementation workflow.

Chapter 8: Practicing the Standard Implementation Workflow

To make the architect's approach part of the development team's daily practice, we need to establish a firm standard operating procedure (SOP). This SOP is a rigorous closed loop: every act of generating and merging code must pass strictly through the following six steps:

From Decomposition to Acceptance

The first step is Decomposition. Faced with the current requirement, strip away the business complexity in your mind and find a "structural milestone" that can run independently.

The second step is Issue the implementation prompt. Stop treating the AI as a code-completion tool; instead, issue it a prompt that carries "strict acceptance criteria." State clearly the input and output boundaries, the architectural constraints that must be followed, and the underlying non-negotiable constraints that must not be touched.

The third step is Coding. This is usually the step that takes the least time: hand it entirely to the large model to generate the code quickly and apply it to the project.

The fourth step is Acceptance. The architect steps in and reviews the code from a careful, objective perspective. Look not only at whether the test cases run through, but even more at whether "architectural drift" has occurred and whether unnecessary coupling and complexity have been introduced. Following "Evidence Discipline," you must also map the criteria, the implementation version, the execution material, and the recheck results item by item, and record the conditions not covered.

Decide the Next Action and Begin the Next Iteration

The fifth step is the core one: Decide the next action. This is a critical decision point.

If the agreed items have corresponding material supporting acceptance, run git commit to save the version and link it to the acceptance record; the commit itself does not raise the evidence level. If the material is insufficient, record the items as pending verification and fill in the missing basis; the unknown must not be counted as either a pass or a failure.

If acceptance fails, point out the defect in architecture-level language and give the AI one or two chances to revise. If it remains unresolved, pause first and review the problem and the plan; when you decide to roll back, execute the complete rollback process in "A Core Discipline: Rebuilding from a Known Baseline." The teaching scenario below shows how to apply this choice to a specific version.

The sixth step is Update the blueprint / start a new conversation. As soon as a milestone is baselined, immediately update the CONTEXT.md living blueprint in the project root, syncing the acceptance items, the evidence references, and the unresolved items. If multiple rounds of correction with the AI have occurred in the meantime, or the current milestone is extremely important, first preserve the original conversation, the failed artifacts, and the acceptance records according to the handoff rules described earlier; then close the current conversation window and, carrying the latest blueprint, the material references, and the unresolved items, open a new session and enter the next cycle.

Teaching Scenario: Authentication and Rate Limiting

To understand this SOP more concretely, the following teaching scenario is used: building from scratch the core logic of an API gateway with authentication (Auth) and rate limiting (Rate Limit). This scenario is not presented as a verified historical case; the actions and results that follow all serve to illustrate the workflow and do not indicate that actual execution evidence exists.

In the scenario's initial stage, the architect first performs Decomposition, making it clear that the phase-one milestone is only "complete the JWT authentication middleware" and resolutely leaving the rate-limiting logic untouched. The architect then issues the implementation prompt to the AI, clearly defining the JWT parsing rules, the expiration-handling policy, and the convention for throwing custom exceptions. After the AI does the Coding, the architect moves to Acceptance and confirms that the code structure is clear and single-responsibility; under the teaching setup, the parsing, expiration, and exception behaviors should also be checked item by item, the corresponding acceptance material retained, and only then the version saved and the blueprint updated.

The work then moves into the phase-two milestone: "introduce the rate-limiting mechanism."

At this point, suppose an instance of architectural drift is deliberately allowed — for example, giving the AI only an extremely vague instruction: "Add rate limiting." Suppose this generation produces "implementation that violates agreed constraints": the AI hard-codes in-memory rate-limiting logic straight into the authentication middleware file it has only just finished writing. The code becomes bloated; authentication and rate limiting are now coupled tightly together.

The architect's warning radar sounds the alarm at once. Following the SOP, first try the "design-level correction" prompt, asking the AI to pull the rate-limiting logic out into a separate rate-limiting middleware backed by shared storage. But if the AI has now fallen into the "self-consistency trap," it may, in order to decouple, introduce an abnormally large, incompatible third-party flow-control framework, or even break the original route-binding mechanism and leave the gateway completely unable to start.

In this teaching branch, the architect reviews the problem and decides to roll back and rebuild. Following the complete process described earlier, the architect identifies as the target version the authentication implementation that is supported by acceptance material, then checks the restored state and the original acceptance scope. The point of applying this here is finding the correct authentication version; the rollback itself is not a fresh acceptance, nor does it prove that external state has been restored.

After the rebuild, the architect rewrites the prompt, refines the blueprint instructions for the rate-limiting mechanism, and explicitly requires a rate limiter backed by shared storage and continued middleware separation. Finally, preserve the original conversation and the failed material, prepare only the active context for the next round, and hand the new blueprint, the evidence references, and the unresolved items to a new AI instance.

The new round of implementation still requires checking the acceptance items for authentication, for rate limiting, and for keeping the two separated. The teaching scenario shows how to proceed; it does not offer a conclusion that anything actually passed.

This teaching scenario connects the steps of the standard implementation workflow: constrain generation with the blueprint, judge quality against acceptance criteria supported by evidence, re-implement on the selected version, and hand off through the blueprint and the evidence material.

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.

Chapter 10: Conclusion: The Irreplaceable Role of Architecture

Let us bring together the core disciplines that run through the development workflow.

Under the new paradigm of AI-assisted programming, individual habits must become firm team rules. Make the following core SOP part of the team's daily practice:

First: Do not start without a blueprint. Firmly put an end to grand narratives and "wishful" development. You must first carry out systematic decomposition, complete the project-wide living document, CONTEXT.md, and only after setting strict acceptance criteria let the AI begin writing code.

Second: Do not baseline unverified work. Refuse to "continue building despite the cracks." Bind the acceptance judgments for function, boundaries, and architectural constraints item by item to the implementation versions and the evidence, and mark completion only within the scope the material supports. git commit saves a version; it does not automatically prove correctness. Failures, items pending verification, and conditions not covered should be handed over together with the blueprint.

Third: When the work becomes confused, pause first. Check the problem, then choose the plan; when you decide to roll back, follow the complete process in "A Core Discipline: Rebuilding from a Known Baseline," and only then reset the context, carrying the blueprint, the evidence references, and the unresolved items.

This is not merely a manual for using a set of tools; it is a profound revolution in the development process.

Judging by the trends observed so far, the code-generation capability of large models is still strengthening, and its pace is still quickening. Many developers have for this reason fallen into deep anxiety about their careers: in a period when "writing code" is rapidly becoming a commodity and its marginal cost is falling steeply, where does a software engineer's lasting advantage lie?

The answer is in fact already very clear: the durable advantage has never lived in "code"; it lives in "architecture" and "standards."

AI can knock out tens of thousands of lines of syntactically correct code in an instant, but on its own it can hardly grasp the real human needs and the competing commercial interests behind complex business requirements; it can skillfully use many frameworks, but the trade-offs between "extreme system performance" and "limited delivery schedules" still need a human to weigh; it can tirelessly offer countless solutions, but only a human being can take responsibility for the engineering quality of what is finally delivered.

Once the labor of typing code and memorizing APIs has been stripped away, developers finally have the chance to return to the purest essence of software engineering. Your lasting advantage through successive waves of AI development lies in "systems thinking" — the power to translate the complexity of the real world into a clear digital blueprint; "engineering judgment" — zero tolerance for shoddy logic and an uncompromising pursuit of the system's integrity; and "decisiveness" — the ability to set standards as the one directing the work, call a decisive halt, and calmly harness unlimited computing power to expand what can be built for you.

The era of code inflation will keep squeezing the "developer" role that merely translates requirements, and unprecedented access to computing power will also empower the "architects" who hold a view of the whole. Let go of the inefficient fixation on single lines of code, hold fast to this irreplaceable "commitment to architecture," and you will cross the technology cycles with greater composure and become a true digital builder of this wholly new era.

Appendices

Appendix A: AI-Assisted Development Workflow at a Glance

Compiled from Chapter 8, "Practicing the Standard Implementation Workflow," and Chapter 10, "Conclusion: The Irreplaceable Role of Architecture." This table condenses the steps without adding acceptance judgments; the detailed evidence requirements in the chapters still apply.

StepActions and checks
DecompositionIdentify structural milestones that can run independently, and make their dependencies explicit.
Issue the implementation promptSpecify inputs and outputs, acceptance criteria, architectural constraints, and non-negotiable constraints.
CodingGenerate and apply the implementation according to the current blueprint.
AcceptanceMatch the criteria, implementation version, execution material, and checking results; check behavior and architectural constraints, and record conditions not covered.
Decide the next actionMark acceptance as complete only when there is support for an acceptance judgment; record insufficient material as pending verification. After a failure, review the approach; if you choose rollback, follow the full procedure in the chapters. A commit only preserves a version.
Update and hand offKeep the blueprint, evidence references, and unresolved items in sync; handle material according to the rules for retention and required handling, then begin the next iteration.

Three shared disciplines: Do not start without a blueprint. Do not baseline unverified work. When the work becomes confused, pause first. Record authorization for an action separately from acceptance within the stated scope; rollback is not re-verification either.

Appendix B: Standard CONTEXT.md Template

Compiled from the four types of information in Chapter 7, "Managing Core Deliverables," and the acceptance checks in Chapter 3, "Evidence Discipline." The table below lists fields to complete and items to check. It is a template, not a record of work already performed; explicitly mark missing items as unknown or pending verification.

FieldInformation to enter and check
System overview and constraintsSystem goals; frameworks and versions for the frontend, backend, and database; constraints on time, exceptions, module boundaries, and related matters.
Accepted milestonesImplementation version, acceptance items, evidence references, verified scope, and unresolved items; components that must not be changed without confirmation.
Data and interface contractsData dictionary, enumerations, state-machine transitions, core inputs and outputs, and applicable versions.
Current status and next stepsCurrent task, verified scope, items pending verification, the next TODO, and the required basis for it.
Subject of the acceptance assessmentPreserve fixed, traceable versions of the criteria, implementation, inputs, and environment records; binding content to hashes does not mean the result meets the acceptance criteria.
Execution recordCalls, arguments, and returned results can be matched.
Basis for each acceptance itemInputs, steps, expected results, actual results, replay method, and checking records for each criterion; list boundary conditions not covered separately.
Failures and unknownsPreserve negative material, missing items, scope pending verification, and follow-up items; state the evidence level.
Closure judgmentList separately the items that can and cannot be closed, with the basis for each; authorization to continue does not supply missing evidence.

Appendix C: Three Reusable Prompts

The following prompts come from the teaching explanations in the chapters. They are not execution records. Before copying a prompt, check its fields and constraints against the scope of the current task. A complete prompt does not mean that the acceptance material is complete.

Acceptance-criteria prompt

Next, implement user login. Your code must meet the following acceptance criteria:

  1. Accept account credentials: an account identifier and a password.
  2. Verify the password using Bcrypt hash comparison.
  3. Only after successful verification, issue a JWT that includes User ID and is valid for only 2 hours.
  4. Define and throw a 401 AppException for all authentication failures. Classify other exceptions separately according to the global exception-handling convention.

Once you understand these boundaries, begin writing the code.

Source: the login teaching example in Chapter 2. It illustrates specifying behavior and boundaries before requesting implementation. The validity period, hashing, and exception conventions must match the current blueprint. After delivery, the version and material still need to be checked against the acceptance items.

New-session handoff prompt

Read @CONTEXT.md in the project root. Make sure you understand the current system's architectural constraints, the baselined components that must not be changed without confirmation, and the current implementation status. First, check the current version, key contracts, acceptance-evidence references, and unresolved items. Report anything missing or inconsistent. Resolve gaps that affect the next decision. Once you have confirmed the task scope and the required basis for proceeding, explain your implementation approach, then carry out the TODO plan within the scope already authorized.

Source: the handoff example in Chapter 7. After reading the blueprint, check the material first; do not treat a reply saying "I understand" as a checking result. Gaps that affect the next step still need to be addressed. This prompt does not automatically authorize actions outside the scope already authorized.

Design-level correction prompt

Your last implementation coupled database operations with network requests, violating the single-responsibility principle. Move the data logic into the Repository layer and rewrite it there.

Source: the three-step correction method in Chapter 6. First confirm that the problem actually comes from coupled responsibilities before using this structural instruction. A local error cannot be elevated to an architectural defect merely by using this prompt. Verify the implementation again after making the change; a report saying "refactored" is not grounds for closing the task.