Fast code generation makes it easy to build the wrong thing quickly. Intention is the explicit definition of the problem, the constraints on a solution, and the criteria for success. “Implement user authentication” names a feature. “Users must prove identity before accessing protected resources; login returns a session token, and invalid credentials return 401” states what the work must achieve. It does not prescribe every implementation detail. section 3.2.1 section 4.0
Make intention visible at the points where decisions can otherwise drift:
- Before implementation, identify the problem and success criteria. Use a contract or specification to bound production-code prompts rather than asking an assistant to invent requirements. section 3.2.1 section 3.4.2
- During implementation, distinguish decisions from mechanical work. A developer can decide endpoint behavior while AI prepares a handler skeleton for an immediate test. section 3.2.1
- At review, record the problem, decisions made, and deliberate omissions. Reviewers can then ask whether code serves the intention, not just whether it looks complete and passes tests. section 3.4.2 section 3.6
An endpoint with a bounded first step
Suppose an API contract specifies that GET /orders/:id returns 200 when an order exists and 404 when it does not. Asking AI for a minimal skeleton, rather than a complete endpoint, leaves retrieval behavior to be implemented and tested against that contract. A 501 placeholder signals that the skeleton is not finished behavior. If the generated implementation also adds caching, an ID-format rule, or additional response codes, ask where each decision came from before approving it. section 3.2.1 section 3.3.2
Listing 3.1 Handler skeleton with no design decisions
export async function getOrder(req: Request, res: Response) {
// TODO: Implement order retrieval logic
// TODO: Handle 404 case when order not found
res.status(501).json({ error: "Not implemented" });
}
The handler listing shows a deliberately incomplete 501 response and TODOs: scaffolding that exposes unfinished decisions instead of concealing them in plausible code. section 3.2.1
Intention is a guide through a feedback loop, not a promise that the first solution will be right. Tests, production behavior, and user feedback can change the understanding of the problem. When a pull request stalls or an incident occurs, trace where unclear requirements, validation, or runtime feedback broke the connection between the desired outcome and the delivered behavior. The practical test is simple: can another developer tell which behavior was requested, which decisions were made, and what remains undecided? section 1.2 section 3.3.2








