---
type: concept
title: "Validation"
description: "Building explicit checks into agentic workflows so the AI verifies its own output against real success criteria before moving on."
tags: [validation, quality, gates]
videos: [i-turned-claude-code-into-a-complete-video-generation-system-with-archon, the-best-ai-coding-setup-isnt-the-most-autonomous-one-heres-why, google-just-dropped-a-masterclass-on-agentic-engineering-its-so-good, googles-agents-cli-the-cli-skills-combination-to-ship-ai-agents-easily, claude-plans-gemini-designs-the-workflow-to-build-beautiful-frontends, full-guide-to-becoming-a-principled-agentic-engineer-build-anything-with-ai, i-built-self-evolving-claude-code-memory-w-karpathys-llm-knowledge-bases, coding-agent-reliability-explodes-when-they-argue-new-adversarial-dev-technique, stripes-coding-agents-ship-1300-prs-every-week-heres-how-they-do-it, is-software-engineering-finally-dead, build-beautiful-diagrams-with-claude-code-full-workflow, this-one-command-makes-coding-agents-find-all-their-mistakes-use-it-now, claude-codes-agent-teams-are-insane-multiple-ai-agents-coding-together-in-real-time, turn-claude-code-into-your-full-engineering-team-with-subagents, your-ai-coding-workflow-needs-this-new-agent-browser-cli, ralph-wiggum-is-the-final-evolution-of-vibe-coding-heres-what-comes-next, build-a-rag-ai-agent-with-real-time-source-validation-copilotkit-pydantic-ai, are-agent-harnesses-bringing-back-vibe-coding, i-forced-claude-to-code-for-24-hours-nonstop-heres-what-happened, ai-fixes-my-code-better-than-me-now-heres-how, github-is-the-future-of-ai-coding-heres-why, the-true-power-of-ai-coding-build-your-own-workflows-full-guide, i-built-my-claude-code-subagents-dream-team-to-create-any-ai-agent, archon-beta-launch-livestream-what-you-missed, a-complete-guide-to-claude-code-here-are-all-the-best-strategies, build-any-ai-agent-with-this-context-engineering-blueprint, context-engineering-101-the-simple-strategy-to-100x-ai-coding, context-engineering-is-the-new-vibe-coding-learn-this-now, ai-code-that-fixes-itself-an-mcp-you-can-try-now, ive-been-holding-back-on-youtube-but-not-anymore, code-100x-faster-with-ai-heres-how-no-hype-full-process, openais-brand-new-agents-sdk-crash-course, im-addicted-to-windsurf-send-help, i-found-the-limits-of-the-most-popular-llms, how-to-use-gpt4-to-grow-on-twitter-the-right-way]
created: 2026-07-21
updated: 2026-07-21
---

# Validation

Validation is building explicit checks into an agentic workflow so the AI verifies its own output against real success criteria before it moves on. It is the "V" in Cole's core build loop: "validation is also a very important part of what I like to call the PIV loop... validation is all about giving your coding assistant the ability to check its own work after it has finished an implementation" ([AI Fixes My Code Better than Me Now](../sources/ai-fixes-my-code-better-than-me-now-heres-how.md), 0:00:24). Without it, autonomy is just vibe coding: "AI generated code is still your responsibility. So you need to validate. I'm not going to be a proponent of Vibe coding" ([This One Command Makes Coding Agents Find All Their Mistakes](../sources/this-one-command-makes-coding-agents-find-all-their-mistakes-use-it-now.md), 0:01:02).

Cole organizes validation as a pyramid. The agent owns the cheap, deterministic base and humans own the layers that matter most: "I'll be covering what I call the AI validation pyramid. This is a framework that allows us to define the validation requirements before we even write a single line of code" ([Claude Code's Agent Teams Are Insane](../sources/claude-codes-agent-teams-are-insane-multiple-ai-agents-coding-together-in-real-time.md), 0:08:47). "we have our agent handle the foundation, all the easy things like the type checking and linting and our initial round of testing. And then we as the humans control the layers that matter most" (0:09:05). Defining those requirements up front, in the PRP, is essential: "You always want to describe to the AI coding assistant in the PRP. What do you need to do to actually validate that your code is good?" ([Build ANY AI Agent with this Context Engineering Blueprint](../sources/build-any-ai-agent-with-this-context-engineering-blueprint.md), 0:19:02).

Mechanically, validation runs as an iterate-until-green loop with a bounded retry budget before escalating to a human. Stripe's coding agents follow exactly this: "after the coding agent writes some set of code, we are going to run the linting and the type checking, the unit testing. If there are any failures, then we loop back to the agent and have it fix these things and retry" ([Stripe's Coding Agents](../sources/stripes-coding-agents-ship-1300-prs-every-week-heres-how-they-do-it.md), 0:03:00), capped so "we iterate here a maximum of two times before we escalate to a human because we don't want infinite loops with unit test errors" (0:12:18). A separate scoring agent can gate on a threshold: "it's going to give a score of 1 to 10 for each one of these criteria... as long as it meets the threshold or exceeds, then the implementator did a good job" ([Coding Agent Reliability Explodes When They Argue](../sources/coding-agent-reliability-explodes-when-they-argue-new-adversarial-dev-technique.md), 0:11:30). The goal is to shrink the human bottleneck: "by the time control passes back to us for our human validation, there's less that needs to be corrected... We want to reduce us being the bottleneck" ([Principled Agentic Engineer](../sources/full-guide-to-becoming-a-principled-agentic-engineer-build-anything-with-ai.md), 0:52:08).

Validation is not only about code. You validate the plan before executing it ("you want to validate the PRP before you execute it. Make sure that it's aligned with what you want to create and that it's not overengineering" - [Archon Beta Launch](../sources/archon-beta-launch-livestream-what-you-missed.md), 0:36:30), validate an idea before spending credits generating a video ("we want to sort of like validate the idea for the video before we generate the video" - [Video Generation System with Archon](../sources/i-turned-claude-code-into-a-complete-video-generation-system-with-archon.md), 0:06:12), and validate visual output by rendering and screenshotting it ("it renders the PNG, views the image, finds any imperfections, and then it'll just make direct edits to the JSON file" - [Build BEAUTIFUL Diagrams with Claude Code](../sources/build-beautiful-diagrams-with-claude-code-full-workflow.md), 0:07:45). It can even be fully deterministic: an MCP that checks a knowledge graph "doesn't use an LLM for analysis at all. It's all just deterministic code" ([AI Code That Fixes Itself](../sources/ai-code-that-fixes-itself-an-mcp-you-can-try-now.md), 0:04:10). Google's agentic-engineering framing captures the endgame: "if you really want the most reliable code possible that's where you want systematic verification at every stage" ([Google Masterclass on Agentic Engineering](../sources/google-just-dropped-a-masterclass-on-agentic-engineering-its-so-good.md), 0:06:23). And it isn't going anywhere: "you can review the AI generated code because validation is also not going away anytime soon" ([Is Software Engineering Finally Dead?](../sources/is-software-engineering-finally-dead.md), 0:15:52).

## Part of

- [The PIV Loop](./the-piv-loop.md) - validation is the "V" stage of Prompt-Implement-Validate.
- [AI Coding Harness](./ai-coding-harness.md) - validation gates and checkpoints are core harness components.
- [Phases of Work](./phases-of-work.md) - validation is the final phase before control returns to the human.

## Builds on

- [PRD-First Development](./prd-first-development.md) - success criteria are defined in the spec before any code.
- [Reduce Assumptions](./reduce-assumptions.md) - explicit checks replace blind trust in the model's claims.

## Contrasts with

- [Vibe Coding](./vibe-coding.md) - shipping unread, unverified AI output; validation is its deliberate opposite.

## Related

- [End-to-End Validation](./end-to-end-validation.md) - the highest, most rigorous layer of the pyramid.
- [Visual Self-Validation Loop](./visual-self-validation.md) - Giving an agent the ability to render its own visual output to an image, look at the screenshot, spot imperfections, and edit the source in place over several iterations.
- [Code Review](./code-review.md) - reading the diff for bugs and quality as a validation gate.
- [Separate Reviewer](./separate-reviewer.md) - an unbiased grader that improves validation reliability.
- [Test-Driven Development](./test-driven-development.md) - tests written first give validation an objective target.
- [Human in the Loop](./human-in-the-loop.md) - the human owns the top layers of the validation pyramid.
- [Subagents Pattern](./subagents-pattern.md) - validation runs in its own sub-agent context.
- [MCP](./mcp.md) - MCP servers give agents tools to verify deployed apps and knowledge graphs.
- [RAG](./rag.md) - source validation lets a RAG agent verify its answers against approved chunks.

## Tools

- [Pydantic](../entities/tools/pydantic.md) - Python's de facto data-validation library (also the foundation of FastAPI), used as the validation layer by OpenAI, Anthropic, LangChain, and LlamaIndex, and the reason Pydantic AI puts validation at an agent framework's core.
- [Claude Code](../entities/tools/claude-code.md) - runs the type-check, lint, and test loop and iterates until green.
- [Vercel Agent Browser CLI](../entities/tools/agent-browser.md) - validates the running app through real user journeys.
- [Playwright](../entities/tools/playwright.md) - browser automation that pops up to verify code behind the scenes.
- [CodeRabbit](../entities/tools/code-rabbit.md) - a validation sub-agent that reviews the work.
- [Archon](../entities/tools/archon.md) - where you validate the brief and PRP before execution.
- [Zod](../entities/tools/zod.md) - A TypeScript schema/validation library used to type agent tool inputs so the arguments the model passes to a function are reliable.
- [Guardrails AI](../entities/tools/guardrails-ai.md) - Open-source Python framework Cole leans on for agent input/output guardrails, blocking things like PII entering a prompt or unsafe content leaving the LLM.

## Sources

- [AI Fixes My Code Better than Me Now?!](../sources/ai-fixes-my-code-better-than-me-now-heres-how.md) - "[0:00:24] validation is all about giving your coding assistant the ability to check its own work after it has finished an implementation"
- [This One Command Makes Coding Agents Find All Their Mistakes](../sources/this-one-command-makes-coding-agents-find-all-their-mistakes-use-it-now.md) - "[0:01:02] AI generated code is still your responsibility. So you need to validate. I'm not going to be a proponent of Vibe coding."
- [Claude Code's Agent Teams Are Insane](../sources/claude-codes-agent-teams-are-insane-multiple-ai-agents-coding-together-in-real-time.md) - "[0:09:05] we have our agent handle the foundation, all the easy things like the type checking and linting and our initial round of testing. And then we as the humans control the layers that matter most."
- [Stripe's Coding Agents Ship 1,300 PRs Every Week](../sources/stripes-coding-agents-ship-1300-prs-every-week-heres-how-they-do-it.md) - "[0:12:18] we iterate here a maximum of two times before we escalate to a human because we don't want infinite loops with unit test errors."
- [Coding Agent Reliability EXPLODES When They Argue](../sources/coding-agent-reliability-explodes-when-they-argue-new-adversarial-dev-technique.md) - "[0:11:30] it's going to give a score of 1 to 10 for each one of these criteria... as long as it meets the threshold or exceeds, then the implementator did a good job."
- [FULL Guide to Becoming a Principled Agentic Engineer](../sources/full-guide-to-becoming-a-principled-agentic-engineer-build-anything-with-ai.md) - "[0:52:08] by the time control passes back to us for our human validation, there's less that needs to be corrected... We want to reduce us being the bottleneck"
- [Build ANY AI Agent with this Context Engineering Blueprint](../sources/build-any-ai-agent-with-this-context-engineering-blueprint.md) - "[0:19:02] You always want to describe to the AI coding assistant in the PRP. What do you need to do to actually validate that your code is good?"
- [Google Just Dropped a Masterclass on Agentic Engineering](../sources/google-just-dropped-a-masterclass-on-agentic-engineering-its-so-good.md) - "[0:06:23] if you really want the most reliable code possible that's where you want systematic verification at every stage that comes with agentic engineering"
- [Archon Beta Launch Livestream](../sources/archon-beta-launch-livestream-what-you-missed.md) - "[0:36:30] just like with validating code that's outputed from your coding assistant, you want to validate the PRP before you execute it. Make sure that it's aligned with what you want to create and that it's not overengineering"
- [I Turned Claude Code Into a Complete Video Generation System](../sources/i-turned-claude-code-into-a-complete-video-generation-system-with-archon.md) - "[0:06:12] We want to sort of like validate the idea for the video before we generate the video because we don't want to spend the credits creating it until we are confident it's going to be a good product representation."
- [Build BEAUTIFUL Diagrams with Claude Code](../sources/build-beautiful-diagrams-with-claude-code-full-workflow.md) - "[0:02:40] not only does it create the Excal diagram, but it also validates it visually. So it will render the diagram, take a screenshot, look at the PNG, and then iterate on any of the imperfections."
- [AI Code That Fixes Itself (An MCP You Can Try Now)](../sources/ai-code-that-fixes-itself-an-mcp-you-can-try-now.md) - "[0:04:10] this doesn't use an LLM for analysis at all. It's all just deterministic code going out to the knowledge graph and checking all the ways that we use Pydantic AI here."
- [Is Software Engineering Finally Dead?](../sources/is-software-engineering-finally-dead.md) - "[0:15:52] you can review the AI generated code because validation is also not going away anytime soon"
- [The Best AI Coding Setup Isn't the Most Autonomous One](../sources/the-best-ai-coding-setup-isnt-the-most-autonomous-one-heres-why.md) - "[0:14:39] the system here for how the coding agent can run unit tests and even do full endto-end testing. And then human validation if you want to really make sure that your reliability is topnotch."
- [Google's Agents CLI](../sources/googles-agents-cli-the-cli-skills-combination-to-ship-ai-agents-easily.md) - "[0:12:02] if the evaluation shows the agent isn't working the best, use this as an opportunity to iterate on the system prompt, the tools that you have for the agent, get it to the point where it's ready for deployment."
- [Claude Plans, Gemini Designs](../sources/claude-plans-gemini-designs-the-workflow-to-build-beautiful-frontends.md) - "[0:16:58] We do the validation, so just having Sonnet go through our unit tests and linting and things like that. We fix any issues that come up with Opus"
- [I Built Self-Evolving Claude Code Memory](../sources/i-built-self-evolving-claude-code-memory-w-karpathys-llm-knowledge-bases.md) - "[0:05:00] we're even going so far in this system as to making sure that our data has integrity. That's pretty important. We want to have an accurate personal knowledge base"
- [Turn Claude Code into Your Full Engineering Team with Subagents](../sources/turn-claude-code-into-your-full-engineering-team-with-subagents.md) - "[0:12:07] It'll do regression testing. This is important for reliability of the harness because a lot of times one agent is going to break what a different agent worked on earlier."
- [Your AI Coding Workflow NEEDS This New Agent Browser CLI](../sources/your-ai-coding-workflow-needs-this-new-agent-browser-cli.md) - "[0:11:25] the agent can figure out all of the obvious issues, even some of the more subtle ones before control passes back to us."
- [Ralph Wiggum is the Final Evolution of Vibe Coding](../sources/ralph-wiggum-is-the-final-evolution-of-vibe-coding-heres-what-comes-next.md) - "[0:14:55] we still encounter that classic problem with the coding agent where sometimes it'll say it's done when there's still things that are missing what we asked it to do."
- [Build a RAG AI Agent with REAL-TIME Source Validation](../sources/build-a-rag-ai-agent-with-real-time-source-validation-copilotkit-pydantic-ai.md) - "[0:02:39] treating the chunks return as a recommendation that you then get to sift through yourself if you want to make sure that you get the most accurate responses possible."
- [Are Agent Harnesses Bringing Back Vibe Coding?](../sources/are-agent-harnesses-bringing-back-vibe-coding.md) - "[0:09:10] one of the most important parts of harnesses is guard rails. running these checks at the very beginning or the very end of each agent or some of the agents in a harness."
- [I Forced Claude to Code for 24 Hours Nonstop](../sources/i-forced-claude-to-code-for-24-hours-nonstop-heres-what-happened.md) - "[0:15:20] We have the Puppeteer MCP server attached to the coding assistant... So it can actually go and verify that things are working on the website."
- [GitHub is the Future of AI Coding](../sources/github-is-the-future-of-ai-coding-heres-why.md) - "[0:15:20] You always want to run code quality and security scans on your code, especially AI generated code."
- [The True Power of AI Coding - Build Your OWN Workflows](../sources/the-true-power-of-ai-coding-build-your-own-workflows-full-guide.md) - "[0:02:18] once we have the code outputed, it is time for validation. And we want to leverage AI coding assistants to validate their own work and then put ourselves in the process as well."
- [I Built My Claude Code Subagents DREAM TEAM](../sources/i-built-my-claude-code-subagents-dream-team-to-create-any-ai-agent.md) - "[0:03:37] You always want to allow cloud code in some way to validate its own work and iterate on the things that it creates like unit tests."
- [A Complete Guide to Claude Code](../sources/a-complete-guide-to-claude-code-here-are-all-the-best-strategies.md) - "[0:27:36] once we have executed the PRP and we have our code outputed we want our agent to operate autonomously writing tests iterating on those tests until it's confident that the code is working"
- [Context Engineering 101](../sources/context-engineering-101-the-simple-strategy-to-100x-ai-coding.md) - "[0:03:50] it's important to validate the PRP and be a part of this process. Don't trust the AI blindly."
- [Context Engineering is the New Vibe Coding](../sources/context-engineering-is-the-new-vibe-coding-learn-this-now.md) - "[0:20:22] I highly recommend not vibe coding actually validating the output but if you validate the output have your context engineering set up you are set."
- [Code 100x Faster with AI](../sources/code-100x-faster-with-ai-heres-how-no-hype-full-process.md) - "[0:03:41] it's very important to ask the AI to write tests for its code. Ideally, after every new feature that it implements and that's how you really get consistent output."
- [OpenAI's BRAND NEW Agents SDK (Crash Course)](../sources/openais-brand-new-agents-sdk-crash-course.md) - "[0:29:21] another thing that Pydantic AI focuses on a lot that they don't do here is testing having a mock llm or mock tools being able to really validate that your agents are working well without using a real llm"
- [I Found the Limits of the Most Popular LLMs](../sources/i-found-the-limits-of-the-most-popular-llms.md) - "[0:08:44] if the AI ever reads any content from a Google drive file it's because it first added it to the vector database the knowledge base ... we can validate it that way"
- [I've Been Holding Back on YouTube... But Not Anymore](../sources/ive-been-holding-back-on-youtube-but-not-anymore.md) - "[0:01:27] less content, but the videos that I do want to put out, I want them to be extremely high quality, like 10x the value of all the other videos"
- [I'm Addicted to Windsurf, Send Help](../sources/im-addicted-to-windsurf-send-help.md) - "[0:18:05] they're not always going to work right off the bat but they can help you set up a lot of that boilerplate especially when you're bringing in a bunch of libraries"
- [How to Use GPT4 To Grow on Twitter The Right Way](../sources/how-to-use-gpt4-to-grow-on-twitter-the-right-way.md) - "[0:00:28] the really important thing to know for AI is the quality of your output is determined by the quality of your input"
