Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Prompting and Context  ›  Lesson

One Change per Prompt

Prompting Best Practices 12 minAsk for one change at a time, starting with a plan for larger work, so every change is small enough to review, blame and undo.

One Change per Prompt

You ask for three things at once: "add settle up, redesign the balances page, and rename the amount column". Twenty minutes later the app starts, but the balances are wrong. Was it the new feature, the redesign or the rename? You cannot tell, and neither can the assistant. Bundled requests make bundled bugs.

The rule

Ask for one change, review it, then ask for the next.

One change at a time gives you three things:

  • A readable review. A small change fits in your head. A giant one gets skimmed, and skimming is where bugs hide.
  • A clear cause. If something breaks, the last change broke it.
  • A clean undo. You can throw away one bad step without losing three good ones.

For anything bigger than a single file, add a step before the code: ask for a plan. "Before writing code, list the files you would change and why." A plan is short, cheap to read, and easy to correct. Fixing a bad plan costs one sentence; fixing bad code costs an evening.

When a step comes back wrong, give feedback the way a good bug report does: what you did, what you saw, what you expected. "It doesn't work" gives the assistant nothing to go on.

The shortcut

Follow the rhythm plan, one step, review, next. Treat each step as finished only when you have read the change, tried it, and saved the working version.

Adding settle-up without chaosStep 1 of 4
  1. Ask for a plan

    "List the files you would change to add settle-up, and why. Do not write any code yet."

The trap is the helpful extra. Assistants often tidy, rename or "improve" things near the code they are changing. Each extra is harmless on its own, but together they turn a small, readable change into a large one.

Drills

Answer fast — trust the rule.

quick drill

Why is "add settle-up, redesign the page and rename a column" risky as one prompt?

quick drill

What is a cheap way to catch a bad approach before any code is written?

quick drill

The assistant's plan includes a refactor you did not ask for. What do you do?

quick drill

Which feedback helps the assistant most?

Remember

  • Rule: ask for one change, review it, then ask for the next.
  • Shortcut: plan, one step, review, next. Plans are the cheapest place to fix mistakes.
  • Trap: helpful extras that quietly turn one change into several.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainSequence the prompts

You want Kitty to support uneven splits, for example one flatmate paying a bigger share of rent for a bigger room. Describe how you would sequence your prompts for this change, and explain why you would not ask for it all in one go.