Build in Small, Verifiable Slices
What it is
The core building rhythm of vibecoding: instead of asking the AI for the whole app or a whole feature at once, you build one small, self-contained slice, confirm it works, commit it, and only then move to the next. Each slice is small enough that you can actually review what the AI produced.
Why it works
Small slices keep the AI's output within a range you can verify by looking, so mistakes are caught the moment they appear rather than buried in a wall of code. Committing each working slice gives you a safe fallback, so a bad generation costs one step, not the project. And because each change is isolated, when something breaks you know exactly which slice did it. Big-bang generation produces an impressive pile you can't review, can't debug, and can't safely change.
When to use it
Throughout every build. This is the default loop from the first feature to the last, and it's what makes fast iteration safe rather than reckless.
When not to use it
Truly trivial, one-shot tasks (a single static page, a tiny script) don't need slicing. The technique earns its keep the moment the app has interacting parts.
Prompt
Let's build this feature as small slices, not all at once. Propose the slices, smallest first, each one independently checkable. Build only the first slice now; tell me how to verify it; and wait for my confirmation before the next. After each passes, commit it.Example
Building a checkout, you do it in slices: cart display (check), address form (check), order summary (check), then payment (review carefully). Each is verified and committed. When the payment slice misbehaves, you know the first three are solid and the problem is isolated to one small, reviewable step.
Advanced version
Pair slicing with a quick test per slice so each verified step stays verified as the app grows, and keep slices genuinely independent so you can reorder or drop one without unpicking the rest. For risky slices (anything touching auth, data, or payments), slow down and read every line even though the surrounding slices were quick.
Common mistakes
- Asking for a whole feature or app in one prompt, producing code too large to review or debug.
- Not committing between slices, so a later failure forces you to untangle several changes at once.
- Making slices that secretly depend on each other, which defeats the isolation that makes debugging easy.