TutorialsPreview
Ship Production Software with AI

Ship Production Software with AILesson 5

Build with AIReferenceintermediate17 minShip Production Software with AI

Review what comes back like a senior

Lesson 4 of 5 — read generated code adversarially, where models actually fail.

You will learn

The failure classes models reliably produce, and how to review for intent and edges instead of style.

Prerequisites

Lesson 3 — you have tasks whose output you now need to judge.

Concept · ai/code-review
Catalog

Reviewing AI code

Reading generated code adversarially for the failures models reliably make — wrong assumptions, missing edges, plausible-but-wrong APIs.

Want the full picture? Open the reference →

The rubric — the classes models reliably miss

Run this on every diff

BeforeWhat the model wrote
JAVASCRIPT
const user = await db.users.find(id);
return user.profile.name; // TypeError when user or profile is null
AfterWhat review demands
JAVASCRIPT
const user = await db.users.find(id);
if (!user) return null; // the case it skipped
return user.profile?.name ?? 'Anonymous';
Plausible — and wrong

Quiz

A generated function is clean, well-named, and passes the test the model wrote. What is left to do?

Try it

Take a diff a model gave you recently and run all seven rubric items on it. Find at least one thing you would change.

Concepts covered · 1

More like this

O
Reference·advanced·18 min

Orchestrate agents without the codebase rotting

Putting it together: context, guardrails, and a verification loop that lets you run coding agents across a real codebase without it drifting into an incoherent pile. This is the senior loop at full speed.

S
Reference·beginner·12 min

Structure & style the app

Lay down the HTML skeleton and a calm dark style for a todo app. No JavaScript yet — just the shape, so the behaviour you add next has somewhere to live.

W
Reference·intermediate·16 min

Write the spec the model can hit

A prompt is a specification. The difference between a junior and a senior prompt is the constraints a senior names that a junior leaves to chance. This lesson turns your architecture sketch into a prompt that produces reviewable code.

Liked this one?

Pass it on

Discussion

Be the first to ask

Your questions stay private with the team. We can pin answers to share with everyone.

Sign in to ask a question privately on this tutorial.

Sign in

No pinned answers yet for this tutorial.