Vibe coding is the practice of prompting an AI coding agent to build software while reviewing the outputs rather than the implementation. The term comes from Andrej Karpathy, who described it in early 2025 as "fully giving in to the vibes" — describing what you want, accepting changes, running the code, describing the next thing. You stop reading every diff and start treating the agent as the implementer. The phrase caught on because it named something engineers were already doing, often without admitting it. In 2026 it is a real workflow with a real shape, real upside, and real failure modes.
What is at stake is your sense of where the practice belongs. Used in the right place — throwaway scripts, prototypes, exploration, learning — vibe coding is the fastest way to ship working software a single person has ever had. Used in the wrong place — production systems, code touching auth or money, code others will maintain — it generates technical debt at a rate previous tools could not match. The boundary is not subtle. The rest of this guide is about drawing it precisely and giving you the prompt patterns that keep vibe coding on the right side of it.
Tip
Vibe coding works when the cost of a wrong answer is low and the feedback loop is fast — and breaks the moment either of those flips.
Key takeaways:
- Vibe coding means prompting an AI agent to build software while reviewing outputs, not implementation. It is one mode of AI-assisted coding, not a synonym for it.
- It works for throwaway scripts, prototypes, weekend projects, exploring unfamiliar APIs, single-user internal tools, and learning-to-code on a problem you already understand.
- It breaks on production systems, anything touching money or PII or auth, code maintained by others, problems where you can't recognize a wrong answer, and edits too large to spot-check.
- The prompt patterns that keep it useful are: name the success criterion, set the autonomy ceiling, ask for a plan before code, demand the minimum diff, and request a rollback path.
- Even when "vibing," keep a tight feedback loop — tests after every change, diff scan before accepting, named invariants the agent must preserve.
- Vibe coding and spec-driven development are not enemies; they are different points on the same spectrum. Switch modes as stakes rise.
- The most common failure modes — confidently breaking unrelated code, inventing APIs, dropping error handling, rewriting instead of editing — all have prompt-side fixes that cost a sentence each.
What "vibe coding" actually means in 2026
Karpathy's framing in early 2025 was vivid and slightly tongue-in-cheek: he described leaning back, accepting whatever the agent produced, copying error messages back without reading them, and watching software emerge. The framing landed because it described how a lot of people were already using the tools — and how very few were willing to admit it. A year later the meme has settled into something more precise.
In 2026, vibe coding has three observable properties:
- The unit of work is a behavior, not a function. You ask for "a script that downloads my Stripe events for the last 30 days and writes them to a Parquet file," not "write me a function that takes a date range and returns a list of events." The agent decides the function shape.
- Acceptance is by execution, not by review. You run the result. If it does the thing, you accept it. If it doesn't, you describe what went wrong and let the agent retry. You may glance at the diff; you do not read it line by line.
- The state of the world is the canonical source of truth. What's in the file is what's in the file. There is no design doc upstream of the code. The artifact is the spec.
These three properties together distinguish vibe coding from the broader category of agentic coding and from AI-assisted coding generally. A senior engineer running tab-complete in their editor is using a coding agent but is still reviewing every line. A team using an AI IDE to draft PRs that go through human review is doing AI-assisted coding, not vibe coding. Vibe coding specifically means stepping out of the implementation loop.
The practice is most natural in tools designed for it. Cursor and Windsurf give you an editor with an agent that can edit multiple files and run commands. Claude Code and Cline run in the terminal and can drive a full repo. All four support the vibe loop — describe, accept, run, describe — and any of them works. The differences matter less than how you use them.
When vibe coding works
Vibe coding shines in a specific cluster of tasks. The common thread: you can tell within seconds or minutes whether the result is right, the cost of a wrong result is bounded, and nobody else's mental model is at stake.
Throwaway scripts. Pull data from an API into a spreadsheet, rename a thousand files, dedupe a CSV, generate a one-off report. The script lives for an afternoon. If it produces wrong output, you see it immediately. If it produces right output, you never look at the code again. The implementation does not need to be good; the output needs to be right.
Prototypes. A demo to show your team what a feature could look like. A landing page to test a positioning hypothesis. A small interactive sketch to explore an interaction design. The prototype is meant to be thrown away or rewritten if the idea works. Spending an hour reading the agent's diffs to make the prototype "clean" is wasted effort — you're optimizing for a future the prototype will not have.
Exploring an unfamiliar API or library. You have a goal and a vague sense that some library probably does the thing. You don't want to read the docs first; you want a working example you can modify. Vibe coding gives you that: describe what you want to do, get something that runs, then read just enough to understand the parts that matter.
Weekend projects and personal tools. A bookmark organizer just for you. A custom keyboard shortcut launcher. A small game. The user is you, the maintenance burden is yours alone, and the worst case is you delete the directory in a month.
Internal tools with a single user. A dashboard one teammate uses every Friday morning. A migration script that runs three times. A script that renames files in a way only marketing cares about. The user knows what right looks like, the surface is small, and the failure mode is "the user pings you to fix it."
Learning to code on a problem you already understand. This one is underrated. If you know the domain — the math, the protocol, the data shape — vibe coding is a fast way to translate that understanding into working code in a language you don't yet know well. You spot bugs by domain knowledge, not by language fluency. The reverse — vibing on a problem in a domain you don't understand, in a language you don't know — is one of the fastest ways to ship code that looks right, runs, and is silently wrong. Domain knowledge is the eval. Without it, you have no eval.
The pattern across all six: short feedback loops, low blast radius, owner-as-user. When all three hold, vibe coding is hard to beat. When even one is missing, the savings start to invert — fast to write, slow to debug, slow to maintain, slow to recover from.
When vibe coding breaks
The same pattern in reverse predicts where it breaks.
Production systems with concurrent users. The cost of a wrong answer scales with the number of people who hit it before you notice. Vibing on a service that ten thousand users hit means a wrong answer is a paged incident, not a re-run.
Anything that touches money, PII, or auth. A wrong answer here is a regulatory event, a refund, a security disclosure. The diff you skipped reading might have changed the comparison from == to < in a balance check, or moved a permission check inside a conditional. These bugs do not surface in the happy path; they surface when an attacker or an unlucky user finds them.
Code that will be maintained by someone else. If a teammate inherits this code in three months, they will read it. They will form mental models from it. They will extend it. Vibe-coded code reflects the agent's defaults — which may be fine, but they are not your team's conventions, your project's idioms, or your past selves' patterns. The cost of inconsistency compounds across the codebase.
Problems where you can't recognize a wrong answer. Numerical algorithms with subtle precision bugs. Concurrency code with race conditions that only manifest under load. Crypto routines. Anything where the test runs green and the code is still wrong. Vibe coding requires that you can tell good from bad by looking. When you can't, the agent's confidence and your trust in it both work against you.
Edit surfaces too large to spot-check. When the agent proposes a 700-line diff across nine files, you can't meaningfully judge it without reading. Either you read it (and you're not vibing) or you don't (and you're shipping unreviewed code into a codebase that probably can't absorb it).
The honest summary: vibe coding is a mode, not a methodology. Used in the right mode it is excellent. Used as a methodology — applied to everything regardless of stakes — it produces a particular kind of mess that takes longer to clean up than the original work would have taken to do carefully.
The vibe coding prompt patterns that actually work
Even within vibe coding, prompt structure matters. The patterns below cost almost nothing to apply and dramatically improve hit rate. They draw on the same shape as RCAF but compressed for the looser, faster vibe-coding loop.
Set the autonomy ceiling
Tell the agent how far it is allowed to go without asking. The default in most tools is "do everything you think is needed." That default is wrong for anything past the smallest task.
You can edit files in src/scripts/ freely.
Do not touch anything outside that directory.
Do not install new dependencies without asking.
Do not run any command that touches the database.
Four sentences. Saves an hour of unwinding the time the agent decided to refactor your auth module on the way to fixing a typo.
Name the success criterion
The agent does not know when it is done unless you tell it. "Make this work" is not a success criterion. "When I run python report.py --month=2026-04, it should print a CSV with three columns — date, customer, amount — and exit zero" is.
Success looks like: `bun test` passes, the new endpoint returns
HTTP 200 on a happy path, and the curl example in the README works.
Failure looks like: any test red, any uncaught exception, any
new TODO in the code.
A named criterion is also what the agent self-checks against before declaring victory. Without one, "done" means "the agent stopped editing."
Ask for a plan before code
Cheap insurance against the agent going in a wrong direction. Even in a vibe loop, a thirty-second plan check before three minutes of editing pays off.
Before writing any code, list the files you plan to touch
and the changes you plan to make to each. Wait for me to confirm.
This pattern is most valuable when the agent has the autonomy to range widely. For a single-file change you can skip it. For anything that might touch three or more files, it is the difference between a clean change and a tangle.
Demand the minimum diff
The agent's default bias is toward "improving" code it is editing — renaming variables, restructuring functions, adding type hints, removing what it considers dead code. Sometimes useful. Often it inflates the diff and breaks adjacent assumptions.
Make the smallest possible change that satisfies the requirement.
Do not refactor surrounding code. Do not rename existing identifiers.
Do not change behavior of code outside the immediate task.
This pattern alone cuts review time in half on tasks where you do still want to glance at the diff.
Request a rollback path
If something goes wrong, what's the undo? In a chat-based tool, this is "what should I revert?" In a Git-aware agent, this is "what commits should I drop?"
Make the change as a single commit on a new branch.
If anything goes wrong, the rollback is `git checkout main`.
Rollback paths are not just for production. They're for the moment, twenty minutes from now, when you realize the direction was wrong and want to start over. Cheap to set up; expensive to recreate after the fact.
The eval discipline that keeps vibe coding from rotting
Even when "vibing," a tight feedback loop is what keeps the practice useful instead of corrosive. The loop has four parts.
Run tests after every accepted change. Not at the end. After every change. A test suite that runs in under a minute is a vibe coder's most important asset; if yours doesn't, fix that first. The test suite turns silent regressions into loud ones, which is exactly what vibe coding needs to keep working.
Scan the diff before accepting, even if you don't read every line. Look at the file count, the line count, the file paths. If the agent touched files outside the task, reject. If the diff is 10x the size you expected, reject. You're not reading for correctness; you're reading for surface area. This takes ten seconds and prevents most disasters.
Name the invariants the agent must preserve. Before starting a task, write down what must not change. The public API of this module. The schema of this table. The behavior of this endpoint when called with the existing parameters. Then put those in the prompt. Invariants are the thing you wish the agent had asked about before changing.
Refuse too-large edits. When the agent proposes a sweeping change, push back. "Make a smaller version of this change that I can review in a minute, then we'll iterate." The agent is unbothered; you preserve your ability to spot bugs.
For a deeper treatment of the eval side, see the evaluating coding agents tutorial — the same instincts that benchmark agents formally are the instincts that keep your loop honest informally. The SurePrompts Quality Rubric gives you the same idea applied to prompts: a checklist for grading the prompt itself before you blame the output.
Vibe coding vs spec-driven development
These are not opposites. They are points on a spectrum, and the right point depends on stakes.
Pure vibing. No tests, no spec, no review. Describe, run, accept, repeat. Right for one-off scripts and prototypes you'll throw away.
Vibing with tests. A test suite exists and runs after every change. The diff still goes unread. The tests catch the obvious regressions. Right for personal tools and small internal projects.
Spec-then-vibing. You write a short spec — user story, acceptance criteria, constraints — then let the agent execute it. You accept on output, not implementation, but the spec gives you something to grade the output against. Right for features in early-stage products, internal tools with multiple users, anything where "is it done?" needs an answer.
Full spec-driven AI coding. A reviewable spec, named acceptance criteria, explicit out-of-scope, constraints, and code review of the resulting diff. Right for production code, anything customer-facing, anything the team will own long-term.
The mistake is treating these as a hierarchy where the higher mode is always better. It isn't. Pure vibing on a one-off script is the right answer; full spec-driven on the same script is bureaucratic theater. The skill is matching the mode to the task — and switching modes mid-project when the stakes change. A prototype graduating into a real product is exactly the moment to stop vibing and start writing specs.
For the framework that ties these modes together, see the pillar guide and the Agentic Prompt Stack, which describes how to compose role, context, constraints, and acceptance into a reusable shape regardless of which mode you're in.
Common failure modes and how to spot them
Five failure modes show up repeatedly. Each has a recognizable symptom and a one-sentence prompt-side fix.
Agent confidently breaks unrelated code. Symptom: the diff touches files the task should not have touched, often with confident-sounding commit messages. Fix: in the prompt, name the directory or file scope explicitly — "only edit files matching src/api/**" — and reject any diff that exits that scope.
Agent invents APIs that don't exist. Symptom: the code calls methods, options, or parameters that look right but aren't in the actual library. Often produces clean-looking code that fails at runtime. Fix: ask the agent to read the relevant source or docs first — "before writing the code, open the file node_modules/foo/index.d.ts and confirm the method signatures you plan to use."
Agent silently drops error handling. Symptom: the new code works on the happy path but fails ungracefully on edge cases that the original code handled. Often the agent considers the error path "redundant" and removes it. Fix: in the prompt, name the invariant — "preserve all existing error handling; if you remove a try/except, justify why."
Agent rewrites instead of edits. Symptom: a small change becomes a full file rewrite. The behavior is similar but the structure is different, breaking diff review and any unrelated history-aware tooling. Fix: demand the minimum diff explicitly — "make the smallest possible change; do not restructure existing code."
Agent over-abstracts. Symptom: a concrete one-line change becomes a new abstraction layer with three new files and a configuration object. Fix: tell the agent to stay concrete — "do not introduce new abstractions, factories, or configuration; make the change in place."
The pattern across all five: the failure mode comes from an agent default that's reasonable for some tasks and wrong for yours, and the fix is one or two sentences in the prompt explicitly turning that default off. This is also where tool use defaults matter — agents that default to running commands and editing files broadly need tighter scoping than agents that default to proposing diffs for human approval.
What to read next
If you want the full framework that situates vibe coding in the broader prompt-engineering landscape, the pillar guide is the starting point — it covers prompting agents across modes, tools, and stakes. If you've decided this task warrants more structure than vibing allows, the test-driven development with AI coding agents tutorial shows the next step up: write the test, let the agent make it green, accept on tests rather than vibes. And if you want to formalize the way you judge agent output — turning the informal "does this look right?" into a real eval — the evaluating coding agents tutorial walks through SWE-bench, Aider Polyglot, and Terminal-Bench and how the same instincts apply to your own codebase.
Vibe coding is not going away, and it shouldn't. For a real and growing class of work, it is the fastest, most enjoyable way to build software ever invented. The discipline is knowing which class of work, holding the line on prompt patterns that keep the loop honest, and switching to a spec the moment the stakes earn one.