Addy Osmani on AI Code Slop: The Verification-First Engineering Playbook

TL;DR
Addy Osmani's verification-first playbook to stop AI code slop: spec-first prompts, diff budgets, property tests, and owning the final merge verdict.
Last updated: December 2, 2026
TL;DR#
- The thesis: Across his 2025 and 2026 essays, Addy Osmani argues that AI-generated code slop is real, that code generation is no longer the bottleneck, and that verification is now the constraint that separates shipping teams from teams drowning in subtle regressions.
- The accountability rule: Even when coding agents write the implementation and run first-pass checks, the engineer remains the ultimate guarantor who owns three things at the boundary: Quality (the checks installed before an agent runs), Verdict (the decision to ship or block), and Answerability (being able to explain what changed and why it is safe).
- The practical workflow: Stop relying on heroic line-by-line diff reading as your only defense. Move quality upstream into a four-stage pipeline: spec-first prompts, scoped diff budgets, fast deterministic verification gates (types, linters, unit, property-based, differential, and end-to-end tests), and evidence-based PR review.
- Compounding taste: Every time an agent ships a bad pattern, encode the correction into a shared repo file, hook, or regression test so the same class of slop cannot pass twice.
Code slop is the engineering twin of AI design slop and unread AI text slop: plausible-looking output produced at machine speed without clear constraints or verification. Unlike a generic landing page or a wordy Slack message, however, code slop compounds inside production systems.
Over the past eighteen months, Addy Osmani - who spent over 14 years at Google leading Chrome and AI developer experience before joining Anthropic's Claude Code team - has written one of the most coherent public bodies of work on how to stop AI code slop without giving up the leverage of coding agents. Read together, his essays map a clear progression from individual prompting hygiene to full verification-first engineering systems.
Official Sources#
| Essay / Resource | Date | Core Focus |
|---|---|---|
| The AI-Native Software Engineer | July 1, 2025 | AI-generated slop, "trust, but verify," and why the engineer is the ultimate guarantor |
| My LLM coding workflow going into 2026 | December 18, 2025 | Spec-first planning, iterative task sizing, and keeping human intent ahead of generation |
| Own the Outer Loop | July 15, 2026 | AI Engineer World's Fair 2026 keynote: Quality, Verdict, Answerability, and owning the boundary |
| Software Factories, Light and Dark | July 20, 2026 | Light factories vs. dark factories and how autonomy is earned through checks |
| Agentic Code Quality | August 8, 2026 | Deterministic quality gates, mutation testing, complexity bounds, and harness constraints |
| Practical Loop Engineering | August 14, 2026 | Self-correcting agent loops, explicit stopping conditions, and greenfield vs. brownfield risk |
| The Code Nobody Reads | September 28, 2026 | Why line-by-line review of every diff breaks down and what risk-tiered oversight replaces it with |
| Agentic Verification | October 14, 2026 | Verification as the bottleneck, property-based and differential tests, E2E ground truth, and compounding taste |
Why AI Code Slop Happens: From "Ultimate Guarantor" to Verification Loops#
In The AI-Native Software Engineer (July 2025), Osmani stated the accountability baseline plainly:
"Let's be blunt: AI-generated slop is real and is not an excuse for low-quality work. A persistent risk in using these tools is a combination of rubber-stamped suggestions, subtle hallucinations, and simple laziness that falls far below professional engineering standards. This is why the 'verify' part of the mantra is non-negotiable. As the engineer, you are the ultimate guarantor. You remain fully and directly responsible for the quality, readability, security, and correctness of every line of code you commit."
That single principle still anchors his 2026 writing, but the mechanics of how an engineer enforces it changed as coding agents matured.
Two years ago, Osmani advised developers to read every single line of generated code. By The Code Nobody Reads (September 2026) and Agentic Verification (October 2026), he updated that advice for high-volume agent workflows: you do not need to read every line of code if deterministic checks and evidence carry the verification load, but every change still needs a human who owns the decision to ship it.
The shift happened because generation got cheap while human attention stayed fixed. Even turning up model reasoning effort does not guarantee cleaner code: in our analysis of the October 2026 SlopCodeBench results, running models at xhigh reasoning effort cost 2.11x to 4.22x more than medium without reliably passing more strict regression checkpoints. Osmani's takeaway in Agentic Verification aligns directly with that empirical reality: "I would always prefer a much better feedback loop to a slightly better model."
In Own the Outer Loop (July 2026), he frames the boundary between agent execution and human ownership around three terms:
- Quality: The checks, constraints, and tests you install before letting an agent run. Those checks produce objective evidence.
- Verdict: The production decision at the boundary - ship, block, redirect, narrow the scope, add a guardrail, or reject outright. As Osmani puts it, "The model may write the line, but the Verdict is mine."
- Answerability: The guarantee that if a teammate, customer, or incident responder asks why a change was safe to merge, you can explain it.
We saw the organizational version of this operating model in How Anthropic Merges 30,000 Code Changes a Day, where Osmani described how Anthropic moved from 2,500 to over 30,000 daily merged changes by pairing codified team standards with automated first-pass checks and evidence-based human review.
Figure: The verification-first engineering pipeline. Slop is rejected automatically inside the agent loop before a human ever spends review cycles on the pull request.
The Four Engineering Verification Gates That Stop Slop#
In Agentic Code Quality (August 2026), Osmani writes: "An agent can propose anything. Your constraints decide whether a proposal is safe enough, correct, scoped, and useful, for you and your team to ship."
Translating his essays into a concrete daily workflow means enforcing four gates in order, from prompt to merge.
Gate 1: Spec-First Prompting and Written Constraints#
Slop usually starts before the agent writes a single line of code, when a vague prompt forces the model to guess requirements, architecture, and edge cases. In My LLM coding workflow going into 2026 and Practical Loop Engineering, Osmani stresses defining the finish line and constraints before kicking off an autonomous loop.
Before starting an agent run, write a compact spec covering four fields:
- Goal and observable finish line: What concrete behavior or failing test must pass when the loop stops?
- Invariants (what must never break): State rules in plain English (for example, "cart total always equals the sum of line items" or "retries must be idempotent").
- Explicit non-goals and out-of-bounds files: Name the modules, schemas, or public APIs the agent must not touch.
- Verification commands: Tell the agent the exact local commands it must run to prove completion.
Just as important is compounding taste. In Agentic Verification, Osmani recommends that whenever an agent makes a mistake you never want to see again, you write the rule down in a durable artifact - a shared CLAUDE.md or AGENTS.md rule, a lint rule, a pre-commit hook, or a regression test. That way, judgment compounds across every future session instead of disappearing when a chat window closes.
Gate 2: Scoped Diff Budgets and Blast-Radius Control#
Large, unfocused diffs are the fastest way to sneak slop past both automated checks and human reviewers. When an agent touches 25 files across three subsystems to fix one bug, reviewers fatigue and rubber-stamp the PR.
Apply hard diff budgets to every agent task:
| Change Tier | Suggested Diff Budget | Permitted Scope | Required Human Oversight |
|---|---|---|---|
| Tier 1: Low-risk / bounded | <= 150 lines, <= 3 files | Isolated bug fix, test addition, copy or config update | Automated gates + evidence summary |
| Tier 2: Standard feature | <= 400 lines, <= 8 files | Single vertical slice behind clear interfaces | Evidence review + targeted diff inspection on core logic |
| Tier 3: High-risk / brownfield core | Split into stacked PRs (<= 300 lines each) | Auth, billing, migrations, concurrency, public API contracts | Full spec review + line-by-line audit of critical paths |
Enforce two structural rules alongside the line budget:
- Separate mechanical refactors from behavior changes. Never let an agent rename symbols, reformat untouched files, and alter business logic in the same pull request.
- Require an explicit diff audit before opening the PR. Have the agent (or a hook) run
git diff --statagainst the spec and revert any unrequested drive-by edits.
Gate 3: Fast, Deterministic Type, Lint, and Test Loops#
If an agent cannot independently verify its own output, it is guessing. In Agentic Verification, Osmani breaks down why the type and speed of tests matter as much as coverage itself.
First, the verification loop must be fast and deterministic. Osmani warns that when a test suite is slow or flaky, an agent learns to retry until a run happens to pass rather than fixing the underlying bug. Keep inner-loop checks (typecheck, lint, targeted unit tests) under a few seconds so the agent gets tight, trustworthy feedback on every edit.
Second, layer your deterministic checks so each catches a different class of slop:
- Static types and strict linters: Zero-cost deterministic gates for nullability, type drift, unused imports, complexity ceilings, and formatting. Never pay an LLM to catch what TypeScript, Ruff, or oxlint catches in milliseconds.
- Property-based tests: Example unit tests say what should happen on inputs the agent picked itself - which creates a blind spot when the agent writes tests tailored to its own assumptions. Property-based libraries (
fast-checkfor JavaScript/TypeScript,Hypothesisfor Python,proptestfor Rust) generate hundreds or thousands of adversarial inputs to test rules that must always hold, then shrink failures to a minimal counterexample. Osmani highlights four high-value property classes:- Round-trip encoding:
decode(encode(x)) === xfor parsers and serializers. - Invariants: Sorting preserves length and elements; account balances never go negative.
- Idempotency: Running a migration, normalization, or retry twice yields the same state as running it once.
- Equivalence: An optimized implementation returns the exact same output as a simple reference implementation.
- Round-trip encoding:
- Differential testing for rewrites: When replacing a legacy module, feed randomized or replayed inputs into both the old and new implementations and assert identical outputs.
- End-to-end (E2E) tests as ground truth: Simulate real user flows in a real browser or runtime so the agent cannot pass mocked unit tests while shipping a broken integration.
- Mutation testing and complexity metrics: Highlighted in Agentic Code Quality to verify that test suites actually catch injected bugs rather than merely executing lines.
# Example single-command verification gate for an agent inner loop
pnpm typecheck && pnpm lint && pnpm test:unit && pnpm test:properties
When a property test or E2E test discovers a failure, save the minimized counterexample as a permanent regression test. That single habit turns every caught slop bug into a permanent ratchet on codebase quality.
Gate 4: Evidence-Based PR Review Checklist#
Once the automated verification loop passes, the work crosses the boundary from the agent's inner loop to the human's outer loop. At this stage, Osmani's rule is simple: review evidence, not just raw diffs.
Use this PR review checklist before issuing a merge Verdict:
- Spec alignment: Does the PR solve the exact problem in the spec without unrequested scope creep?
- Diff hygiene: Is the diff within the task's file and line budget, with no dead code, commented-out fallbacks, or weakened assertions?
- Deterministic gate proof: Did typecheck, lint, unit, property, and E2E checks pass cleanly without skipped tests or relaxed compiler flags?
- Regression ratchet: If this fixed a bug or caught an agent failure mode, is there a new test, hook, or
AGENTS.mdrule preventing recurrence? - Visual or runtime evidence (for UI/API changes): Are screenshots, browser recordings, or real request/response traces attached showing the feature working end to end?
- Blast-radius and security check: Are permissions, auth boundaries, migrations, and error handling explicitly audited by a human when touching sensitive paths?
- Answerability check: Could you explain every behavioral change in this PR during an incident review tomorrow morning?
If the answer to the last question is no, block the merge - even if CI is green.
Light Factories, Dark Corners, and Where Human Judgment Relocates#
A common misreading of Osmani's 2026 work is that verification loops make human engineers obsolete. His actual argument in Software Factories, Light and Dark and Own the Outer Loop is the opposite: human judgment does not leave the software factory; it relocates.
In a light factory, humans stay inside the loop applying product taste and reviewing sensitive changes. In a dark factory, agents scope, build, verify, and ship low-risk work continuously while humans focus on intent, constraints, and exceptions. Most production teams in late 2026 operate light factories with carefully fenced dark corners (such as dependency updates, isolated test generation, or well-tested UI tweaks).
How far toward automation you can safely move is not a matter of prompt cleverness. It is strictly proportional to the strength of your verification harness. Without fast deterministic checks, property tests, and scoped diff budgets, running more parallel agents just manufactures slop faster. With them, every verification loop raises the floor of what your team can ship with confidence.
FAQ#
What does Addy Osmani mean by "you are the ultimate guarantor"?#
In his July 2025 essay The AI-Native Software Engineer, Osmani wrote that AI-generated slop is never an excuse for low-quality commits. Even when an AI coding agent drafts the code, the human engineer remains directly responsible for the quality, readability, security, and correctness of every line merged into production.
Why did Addy Osmani shift from "read every line" to "review evidence, not diffs"?#
As coding agents began generating far more code than any team can inspect line by line, human attention became the bottleneck. In The Code Nobody Reads (September 2026) and Agentic Verification (October 2026), Osmani argued that deterministic checks - type systems, linters, property-based tests, differential tests, and E2E runs - should carry the bulk of routine verification so humans can judge objective evidence and focus deep line-by-line review on high-risk changes.
What is the difference between example tests and property-based tests for AI agents?#
Example tests check specific inputs and outputs, which an AI agent can unintentionally game by writing test cases that mirror its own implementation assumptions. Property-based tests (using tools like fast-check, Hypothesis, or proptest) define invariants that must always hold and generate hundreds or thousands of inputs to try to break them, shrinking any failure to a minimal regression case.
How can a small team adopt verification-first engineering without boiling the ocean?#
Start with one pure, high-value module such as a parser, formatter, or pricing calculator. Write its invariants in plain English before prompting, add a single fast verification command (typecheck + lint + tests) that the agent runs on every edit, cap PR diff sizes, and save every caught failure as a permanent test or rule in AGENTS.md or CLAUDE.md.
Get the next deep dive like this in your inbox
One email a week on AI Coding and the rest of the AI dev stack. Free.
Read next on AI coding tools
How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
Addy Osmani of Anthropic and Manish Kapur of Sonar on going from 2,500 to 30,000 merged changes a day: light vs dark software factories, evidence-based review and earned autonomy.
7 min readAI Design Slop: 16 Patterns That Mark a Site as Vibe-Coded
AI design slop is the set of 16 landing page patterns that mark a site as vibe-coded. Adrian Krebs scored 1,590 Show HN pages: 22% heavy, 32% mild, 46% clean.
7 min readDon't Paste the AI vs Vomit vs NoBuzz: AI Slop Tools Compared
Don't Paste the AI, Vomit and NoBuzz compared: AI slop tools for a shared link, a local rewrite or a second-model Claude Code skill, and when to skip them.
8 min readNew here? Start with





