Course contents
Develop the prompt
Turn an idea into a prompt an agent can finish: a goal, context, constraints and a definition of done, delivered in small steps you check one by one.
You've seen that the agent fills gaps with guesses. Prompting well is mostly about leaving fewer gaps. That doesn't mean writing essays. A good build prompt has four parts, fits on one screen, and asks for one step at a time.
Four parts of a build prompt
| Part | Question it answers | Example: the specials board |
|---|---|---|
| Goal | What should exist when you're done? | A “This week's specials” section built from a data file |
| Context | What does the agent need to know? | Specials change every Monday, and the owner isn't technical |
| Constraints | What must it avoid? | Plain JavaScript, no new packages, don't touch other sections |
| Done means | How will you both check? | Edit the data file, reload, see the change; works at 375px wide |
Context is where beginners under-share. The agent can read your files, but it can't read your reasons. “Specials change every Monday and the owner isn't technical” tells it that updating must be easy, and that one sentence changes the whole design: a data file the owner can edit instead of HTML she'd have to touch.
Constraints and examples do the heavy lifting
For any request, an agent could build dozens of reasonable versions. Constraints rule out the ones you don't want before any code exists. The most useful ones for beginners are about scope and safety: “don't change other sections,” “no new packages,” “keep the current colors,” “keep the data file's format.” Each one prevents a whole category of surprise.
Examples beat adjectives. “Make the cards look nice” leaves the agent to guess. “Each card shows the name in bold, the price on the right, and small tags underneath, like this: Cardamom buns · $4.50 · vegetarian” doesn't. When you can't describe what you want, point at something that has it: a screenshot, a site you like (for inspiration, not copying), or another part of your own page.
Finally, use your project's own names. Say specials.json, “the hero section” or “the hours table”: the same words your files and the agent use. A vague reference such as “that thing at the top” costs a search and invites a wrong guess.
Complete the end of a prompt so the agent plans before it builds.
Let the agent interview you
For anything bigger than a small fix, flip the conversation. Describe the idea in two sentences and ask the agent to question you before it plans. It will raise things you hadn't considered: What should the page show in a week with no specials? Should sold-out items disappear or get a badge? Answer, then ask for the plan. Some tools build this in. Cursor's Plan Mode asks clarifying questions before it plans, and Kiro turns an idea into a spec (requirements, a design and a task list) before it writes code.
Small steps beat one giant prompt
Each action an agent takes usually goes right. But a whole feature can be dozens of actions, and small chances of a slip add up. Try the explorer: set how often each step succeeds and how many steps a task takes, and watch what happens to the whole run. Then switch on checking.
Each agent action is a step. Checking after each step catches most slips before the next step builds on them.
Move the controls and watch what changes.
With each step 95% reliable and no checking, about how often does a 20-step run finish without a single slip?
That's the argument for small, checked steps: build one section, check it; build the next part, check it. A step you check is a step whose slip you catch before anything else is built on top of it.
This prompt will cause trouble. Click the lines that need rewriting.
Build the prompt for the specials board. Switch on what helps; leave out what hurts.
Add a specials section to the site.
Plain-English definitions from the AI Coding Dictionary.