Skip to content

Vibe Coding is Fun Until It Breaks — How Specs Keep AI on Track

If you've used an AI coding agent for any length of time, you know the feeling. You describe what you want in plain English, hit enter, and watch code appear. It works. It's fast. It feels like magic.

This is vibe coding — and it genuinely is great, up to a point.

The problem is that "up to a point" is closer than most people think.


What is Vibe Coding?

Vibe coding is the practice of directing AI agents through natural language rather than precise specifications. You describe the vibe of what you want — the general shape, the behavior, the feel — and let the agent figure out the details.

At its best, it sounds like this:

"Add a search bar to the product list that filters by name and category in real time"

And the agent produces something that works on the first try.

The term has become popular because it captures something real: good AI agents are so capable now that you often don't need to be hyper-precise. You can describe outcomes instead of implementations and get excellent results.


Where Vibe Coding Works Great

Let's be honest about the cases where it genuinely shines:

Small, self-contained tasks. "Write a function that converts a hex color to RGB." No context needed, clear input and output, low blast radius if it's wrong.

One-shot scripts. You need to rename 500 files according to a pattern, parse a JSON log file, or generate a CSV from a database query. One conversation, done.

Exploratory prototyping. You're not sure what you want yet. You're using the AI to think out loud, trying different approaches to see what sticks.

Low-stakes UI tweaks. "Move the button to the right side and make it blue." The change is visible, reversible, and contained.

In these cases, vibe coding is not just acceptable — it's the right tool. Adding more structure would slow you down without improving outcomes.


Where It Falls Apart

Here's where things get uncomfortable.

When the codebase grows. An AI agent has a context window. Even with large context windows, agents can't hold your entire codebase in mind. They start making locally-reasonable decisions that contradict decisions made three sessions ago.

When sessions end. Every new conversation starts fresh. The agent that spent two hours helping you design your authentication system yesterday? It doesn't remember any of it today. When you describe the problem again, you describe it slightly differently, and the agent takes a slightly different approach.

When multiple agents work in parallel. You run Agent A on the frontend and Agent B on the backend. Neither knows what the other decided. Now you have incompatible interfaces, duplicated logic, and inconsistent naming conventions.

When scope expands. You started with "add a search bar." Now it needs to support filters, pagination, and saved searches, and it needs to work with the API you built last month. The agent doesn't know the shape of that API. It guesses, and it guesses wrong.

When requirements change. The product manager decides filters should work differently. You tell the agent. It changes the frontend. It doesn't know the backend logic also needs to change. You ship a broken feature.

These aren't edge cases. If you're building anything beyond simple prototypes, you will hit all of them.


The Missing Piece

What vibe coding lacks is a source of truth.

When a human developer joins a team, they don't start coding immediately. They read the architecture docs, review the API contracts, understand what's already been decided. They have a shared context with the rest of the team.

AI agents don't have that by default. Every session, they're starting from zero. They're making up architectural context on the fly, based on whatever's in the conversation and whatever code they can see.

Specs fill this gap. A spec is a persistent, structured description of what should be built — the acceptance criteria, the constraints, the decisions already made. When an agent reads a spec before starting work, it has context. When it finishes, you can check its output against the spec to see if it actually did what was asked.

This isn't about micromanaging AI agents. It's about giving them the same starting context a human developer would have.


How to Vibe Code Responsibly

The goal isn't to abandon vibe coding — it's to add just enough structure where structure matters.

Write specs for anything that spans multiple sessions. If a feature will take more than one conversation to build, write a brief spec first. It doesn't need to be a formal document — just acceptance criteria and key constraints. This becomes the context you share with the agent at the start of each session.

Use acceptance criteria, not implementation instructions. Instead of telling the agent exactly how to build something, describe what done looks like. "Users can filter by category and the URL updates to reflect the active filter" is better than a detailed implementation plan. Agents are good at implementation decisions; they need help with what correct behavior looks like.

Track what's been decided. Keep a lightweight record of architectural decisions — which design pattern you're using, what the data model looks like, how error handling works. When a new agent session starts, share the relevant decisions. This prevents the agent from reinventing wheels you've already built.

Check output against specs. After the agent delivers code, verify it against your acceptance criteria. Not with a code review — that's the agent's job — but a behavioral check. Does it actually do what you said it should do?

Using Planu for This

Planu is an MCP server that automates most of this. It stores specs in a structured format, shares them with your AI agent automatically, and runs drift detection to catch cases where the implementation diverged from the spec. You write acceptance criteria once; Planu makes sure every agent session has access to them.


The Balance

Vibe coding and specs are not opposites. They're complementary.

Use vibe coding for the fast, exploratory, low-stakes work. Use specs for features that matter, that span multiple sessions, or that multiple agents will work on simultaneously.

The sweet spot is knowing which situation you're in. Small script? Vibe it. New payment flow? Write a spec first.

The developers who get the most out of AI agents are not the ones who treat every interaction as a vibe — and not the ones who write formal requirements documents before touching the keyboard. They're the ones who have learned to recognize which mode a given task calls for.


Next Steps

Join the communityAsk questions, share feedback, and connect with other developers using Planu.
Join Discord