5 rules for agentic coding prompts: don't ask for everything at once
Success in agentic coding depends on breaking prompts into small, verifiable steps. Andrej Karpathy said in 2026 that "asking for everything at once" fails, and that agents produce consistently correct code when asked in small increments. The core is five rules. ASAP organizes them into copy-paste patterns.
The five guardrails Karpathy points to
Prompting an agent well is the 5 rules Karpathy points to, applied in order to cut the failure rate.
- Break it small — one PR-sized task at a time; split big features into steps and ask in turn.
- Give the verification bar — state the done-condition, tests, and expected output in the prompt.
- Load context first — have it read the relevant files and rules before starting the work.
- One goal at a time — do not mix several intents into one prompt.
- Verify-and-feed-back loop — confirm the result with tests and feed failures into the next prompt.
These five are the guardrails against "asking for everything at once."
Why "small" is rule number one
The other four rules read, on closer look, as support scaffolding for the first. Giving a verification bar and loading context first only work when the task is small enough to grasp at a glance. When Karpathy said in 2026 that agents moved from "helpful but messy" to "consistently correct code," that shift, too, presumes small units. Ask for a big task at once and the agent runs far without verification; make one prompt too big and there is no point left to catch a drift mid-way. In other words, "small" is the stage on which the other rules can perform, not merely one item in a list of five.
Why verification is baked into the patterns
The rules are best applied as one-line prompt skeletons, the same approach Karpathy uses. The following patterns bake verification in.
| Situation | Prompt skeleton |
|---|---|
| New feature | "First read files X and Y. Then implement only A, and verify with test B." |
| Bug fix | "This test fails. Explain the cause first, then make a minimal fix and pass the test." |
| Refactor | "Don't change behavior, just clean up C. All existing tests must pass." |
What the three skeletons share is that they hand over not just an instruction but a place to stop and check. A human you delegate to will ask back when the done-condition is missing; an agent does not ask back and runs to the end in a plausible-looking direction. So a verification bar that lives outside the prompt is effectively no bar at all. Baking the tests and done-conditions into the skeleton is like handing the agent, in advance, the brake it can use to stop itself.
Porting this to a real dev team
There is one snag for teams trying to adopt these rules as-is. "Break it small" presumes small PRs and dense tests, and in a codebase with thin test coverage, rule two — the verification bar — collapses first, because there are no tests to verify against and half the skeleton is left blank. Put the other way, the effort to use agents well can act as pressure that pulls a team toward tests and smaller commits sooner. That said, these rules rest on Karpathy's observations as practice guidance, not on benchmark-verified numbers. Since codebase maturity differs from team to team, it is better to first find out which rule breaks first in your own setting than to take the five as doctrine.
Source: ASAP synthesis grounded in Andrej Karpathy, "From Vibe Coding to Agentic Engineering" (Sequoia AI Ascent 2026). Related: agentic coding expertise study (Anthropic, 2026).

AI & tech,
read in depth
Beyond the headlines — into the context and the structure
AGI Soon As Possible · asapai.co.kr