Skip to the workspace
Pebellslearn by building
Prompting and Context  ›  Lesson

Describe Intent Clearly

Prompting Best Practices 12 minA clear prompt states the goal, the rules including what must not change, a concrete example and how the result will be checked.

vibe coding / Describe Intent Clearly

Explore each scene at your own pace.

01 · The rule

The rule

Describe Intent Clearly

You type "add settle up" and press enter. The assistant builds something: a button that wipes every balance to zero, stored as a new expense, on a page you never mentioned. It did exactly what three words allowed. A prompt is a description of intent, and the assistant cannot read the parts you left in your head.

The rule

Say the goal, the rules, an example, and how you'll check it.

A clear prompt for a feature has four parts:

  • Goal. What should exist afterwards, and why. Where it lives, if that matters.
  • Rules. Constraints and limits, including what must not change.
  • Example. One concrete case: this input, this result. Examples pin down meanings that words leave vague.
  • Check. How you will tell it worked, such as a test to add or a case to try.

Here is "add settle up" rewritten:

Goal: let a flatmate record that they paid someone back, from a
"Settle up" button on the balances page.
Rules: the amount must be positive and no more than what they owe.
Store it as a payment, not an expense. Keep money in whole paise.
Do not change the expense form.
Example: Ravi owes Asha ₹300. Ravi records ₹300 to Asha.
Both balances then show ₹0.
Check: add a test for this example, and one showing ₹301 is refused.

It is longer, but every line removes a guess. "Store it as a payment, not an expense" prevents the most likely wrong design. "Do not change the expense form" keeps the change contained.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.