LibraryLearning
Back to course

Foundations • Lesson 1

What Vibe Coding Actually Is

20 minute lesson

Learning objectives

  • Understand what vibe coding is and is not
  • Recognize where it works well
  • Recognize where it breaks

What Is It?

Vibe coding is the practice of building software by steering AI systems in natural language, then iterating on the code they produce. The key idea is not that code stops mattering. It is that the bottleneck shifts from typing syntax to specifying intent, supplying context, and judging whether the output actually solves the problem.

In the best version, you become more like a product-minded technical operator. You decide what should exist, what constraints matter, what tradeoffs are acceptable, and what “done” means. The AI handles a lot of the translation from English into code, tests, configs, and refactors.

How It Actually Works

Under the hood, vibe coding works because large language models are very good at predicting plausible next tokens in codebases they can partially see. If you give them enough local context, such as existing files, framework conventions, error messages, and a concrete task, they can infer the patterns your app is already using and continue them.

That means the AI is not reasoning from first principles every time. It is pattern-matching across the code in front of it, the framework knowledge in its training data, and the instructions you provide. If your request is underspecified, it fills gaps with defaults. Sometimes those defaults are useful. Sometimes they are completely wrong for your stack.

The real workflow is a loop. First, you define the feature or bug in operational terms. Second, you give the model enough context to act safely. Third, it generates a draft. Fourth, you run the app, inspect the diff, and compare the result to your actual intent. Fifth, you tighten the spec, correct bad assumptions, and iterate.

The reason this feels so fast is that generation is cheap compared with human typing. The reason it can go badly is that generation is also cheap compared with understanding. So the failure mode is not “the AI cannot write code.” The failure mode is “the AI writes a lot of believable code before anyone checks whether it fits the system.”

The Jargon Decoded

  • Context window — The amount of text, code, and instructions the model can consider in one pass.
  • Agent — An AI workflow that can inspect files, plan steps, run tools, and modify code, not just chat.
  • Diff — The exact code changes between the old version and the new one.
  • Scaffold — Boilerplate code that sets up a feature quickly.
  • Ground truth — The actual app behavior, logs, tests, and files, as opposed to the model's guess.

Why This Matters When You're Building

If you understand vibe coding properly, you stop treating AI as an oracle and start using it as a high-speed junior engineer with broad framework memory and uneven judgment. That makes you faster without making you reckless.

It also changes what skill matters. The scarce skill is increasingly not syntax recall. It is being able to define the problem clearly, notice when output is wrong, and preserve architectural coherence across many rapid edits.

What To Tell The AI

  • “Treat this as a production feature, not a demo. Before changing code, summarize the current architecture, the files likely involved, and the safest implementation plan.”
  • “Do not invent new patterns. Reuse existing project conventions for routing, state, styling, validation, and error handling.”
  • “Make the smallest working change first, then propose optional improvements separately.”
  • “After writing code, explain what assumptions you made and what I should manually verify.”

Common Misconceptions

“Vibe coding means you do not need to understand software.” You can get farther with less syntax knowledge, but you still need system judgment. Otherwise you just generate bugs faster.

“The AI knows my app.” It only knows what you showed it, what it inferred, and what it hallucinated. Those are not the same thing.

“If it compiles, it is good.” A compiling app can still be insecure, incoherent, slow, or impossible to maintain.

Sources

  • Andrej Karpathy on “vibe coding”
  • OpenAI, SWE-bench Verified evaluations
  • Anthropic, Building effective agents
  • GitHub, Research: quantifying GitHub Copilot’s impact

Checkpoint questions

  • What problem is vibe coding actually solving?
  • What tasks still need stronger human judgment?

Exercise

Take a real feature you want to build and write the exact spec you would give an AI coding agent.

Memory recall

Quick quiz

Use retrieval, not rereading. Answer from memory, then check the feedback.

1. What is vibe coding actually good at?

2. Where does vibe coding usually break down?

3. What should the human still own in a strong vibe coding workflow?

Progress

Mark this lesson complete when done

Next lesson