How Small Should Each AI Build Step Be?
Small enough to describe in one sentence and test in about a minute. A good slice has one result you can see, such as "a saved note survives a refresh". If your prompt contains "and" more than once, or you can't say how you'd test it, split it into smaller steps.
Here's the feature I want next: [describe it]. Don't build it yet. Split it into the smallest slices where each one: - leaves the app working - has one result I can see and test in about a minute - can be saved as its own commit or checkpoint List them in order, with the test for each. Put any database change in its own slice. Then build slice 1 only. When it's done: 1. Tell me which files changed. 2. Give me the test to run. 3. Stop and wait. Don't start slice 2 until I confirm it works.
- 1Screenssample data, no login
- 2Real datasaves and survives a refresh
- 3Accountstest with two accounts
Try it now
- 1Pick the next feature on your list and paste the prompt above.
- 2Run the test for slice 1 yourself. In Replit, check the cost on the checkpoint by hovering over its usage icon in the Agent tab. In Lovable, open More options below the reply and check Credits used.
- 3Commit, or confirm a checkpoint exists, then send "Next slice". You'll know the size is right if you can almost always tell which change caused a problem.
Use it when
For every change to an app you plan to keep. It matters most in the second half of a project, when more of what you've built can break.
Skip it when
The first version of a throwaway prototype can be one big prompt, since you're seeing whether the idea holds. A change that has to happen everywhere at once, such as renaming a database field, can't be cut much. Plan it, then make it in one step.
Why it works
Replit's docs describe a loop of one outcome, a test in Preview, and one focused improvement. v0's docs say building incrementally reduces errors and makes debugging easier, and suggest starting with one piece, such as a product catalog page. Lovable's quick start says to ask for one change at a time.
Small slices shrink how much you have to search when something breaks. If a slice fails, the bug is almost certainly in the last change. They also cost less: Replit bundles work into one checkpoint per request, so a bigger request may cost more, and each checkpoint shows what the work cost. You always have a working version too, which gives you a clean place to go back to when a slice goes wrong.
Example
Suppose you want comments on blog posts. As one prompt, that means a table, a form, a list, sign-in rules, moderation and notifications. As slices:
- A hardcoded comment list appears under a post.
- A
commentstable exists, its access rules are on, and the list reads from it. - A signed-in user can add a comment, and it survives a refresh.
- A second account can't delete the first account's comment.
- An admin can hide a comment.
Each one can be tested in about a minute. If slice 4 fails, you know to look at the access rule, rather than searching the whole feature.
Going further
Use slices to stop the AI wandering. Replit suggests starting a prompt with the word "Only", as in "Only add a delete button to the user card". In Claude Code, Esc stops it mid-action and keeps what's been done, and /rewind rolls the code, conversation or both back to an earlier prompt.
Commit before risky slices as well as after working ones. Anthropic notes that its checkpoints only cover files changed by Claude's file tools, not those changed by shell commands. Lovable's revert restores code but not data. Only a commit you made, plus a database backup when data is at stake, gets you back everywhere.
Common mistakes
- Asking for the next slice before testing the last one, so that two untested changes pile up.
- Slicing by technical layer, such as "do all the database work first". You end up with nothing you can test. Slice by what a user can see.
- Putting a database change in with a screen change. Keep them apart, because undoing them works differently.
- Accepting extra features because they look useful. Each unrequested change is one more thing you haven't checked.
Sources
- Build your first app, Replit docs
- Text prompting, v0 docs
- Quick start, Lovable docs
- Credits and usage, Lovable docs
- AI billing, Replit docs
- Agent and AI help, Replit docs
- Best practices, Claude Code docs
- Project history, Lovable docs
Checked 6 November 2026. Products change often, so confirm details with the vendor.