Free public course · 9/40
Chapter 9: Inspection-Driven Development: Define Standards Before Letting AI Write Code
Lesson objectives
Required artifact: acceptance branch-decision table
O1 · Can define the condition for moving from acceptance criteria into observed evidence (artifact: acceptance branch-decision table)
Evidence: The acceptance branch-decision table states the entry condition from acceptance criteria to observed evidence
O2 · Can construct a acceptance branch-decision table with branches, vetoes and accountable owners (artifact: acceptance branch-decision table)
Evidence: The acceptance branch-decision table contains at least one proceed branch, one stop branch and their owners
O3 · Can choose pass, repair or rebuild from observed evidence (artifact: acceptance branch-decision table)
Evidence: The artifact records criteria, observations, branch choice and unsupported inferences for one case
Before this lesson: Chapter 8: The Three Disciplines and One Supplementary Principle
Novice path
Chapter transfer task: Can choose pass, repair or rebuild from observed evidence. Use the diagram's decision relationship to complete the first evidence item in the acceptance branch-decision table, then check each owner and decision rule.
Experienced path
Apply this task to a current project before reading the explanation: Can choose pass, repair or rebuild from observed evidence. Submit the acceptance branch-decision table, then check the relationship type, missing evidence and authority boundary.
Diagram text description
The diagram starts with acceptance criteria, branches through the conditions in observed evidence, and reaches a gate controlled by PASS / fix / rebuild. Every case must end at stop or proceed; missing evidence and red-line failures cannot be offset by other strengths.
Relationship semantics: Inputs follow conditional branches into an explicit gate; stop and proceed are exclusive, and red-line failures cannot be offset by other scores.
Adapted public course. Concepts, procedures and examples are adapted from the internal textbook. Case sizes, timings, improvement figures and target thresholds are illustrative, not site delivery results or universal standards. Verify tools, platforms and skills in your environment. Prompts do not grant permissions and retry counts do not authorize recovery. Preserve work and verify targets, sharing and external-state effects first.
Lesson explanation
9.1 Why Acceptance Standards Are a “Hard Constraint”
In traditional development, TDD (test-driven development) writes test cases first, then you write code to pass the tests. In the AI era, this logic has been pushed to its ultimate evolution: define the “acceptance standards” first, then let AI write the code.
If you only say, “implement a user login feature,” AI will produce countless wildly different implementations, and there is a very high chance it misses the edge cases you care about. The correct “acceptance-driven” instruction should look like this:
“Next, we will implement user login. Your code must satisfy the following acceptance standards:
- Accept the account and password;
- The password must be verified against a Bcrypt hash;
- On successful verification, issue a JWT containing the User ID, with an expiration of only 2 hours;
- Any failure must uniformly throw a 401 AppError. If the boundaries above are clear, start writing the code.”
Why does the order matter so much? Because acceptance standards are a “constraint” for AI. When AI knows “my code is not done until it passes these 5 tests,” its generation strategy changes from “write code that looks correct” to “write code that can pass these 5 tests.” The latter is far more reliable than the former.
Let us look at a comparison:
- Vague instruction: “Implement the user login endpoint.” AI may ignore password encryption, token expiration, and error handling — it writes a login endpoint that “works,” but you cannot be sure whether it is “secure to use.”
- Instruction with acceptance standards: “Implement the user login endpoint. Acceptance standards: 1. Passwords must be compared using a bcrypt hash; 2. On success, return a JWT containing user_id, valid for 2 hours; 3. On failure, return a uniform 401 AppError; 4. After 5 consecutive failures, lock the account for 30 minutes.” The code AI generates will precisely cover these 4 standards, because acceptance standards are a “hard constraint” — AI knows these items will be checked one by one.
Acceptance-driven development has a hidden benefit as well: it forces you to think through “what counts as done” before coding. In many cases, while writing acceptance standards you discover the ambiguities in the requirements — what status code should a wrong password return? How does an account get unlocked after being locked? The answers to these questions must be decided before coding — if you are not sure, AI will decide for you, and its choice may not be what you want.
There is also an iron rule that must be followed: code that has not fully passed acceptance is poor-quality material that can shatter at any moment — no matter how perfect it looks, it must never be merged into the project, and it must never become the contextual dependency for the implementation of the next phase.
Sources and boundaries
Registered sources support only the external claims used here. The acceptance branch-decision table, example numbers and exercise scenario are internal instructional design and require project-specific validation.
- GitHub Actions documentation
GitHub · 2026-09-17 · Repository workflows can automate build, test and continuous-integration tasks.
Record lesson practice
When you are signed in, your ticks are saved to your account. When you are not, they last only while this page is open. A self-check is not a review or certification, so keep your own evidence and note any gaps.
Save my practice
You can read the exercises without signing in. With an account, your practice text, plain-text attachments and the self-assessment for each submission can be saved to it. Unsaved input is lost when you leave the page or switch accounts.