INTRODUCTION
The 4-part prompt
Tell the agent what you want, clearly.
press Enter ↵
Coding agent (pretend: scripted, not a real AI)

The agent waits for your prompt.

📁 Documents\my-site

No files yet.

Lesson 63: The 4-part prompt

Level 8, Meet Your AI Coding Agent. Where, goal, done and limits: order like a pizza. The new word: prompt. It follows lesson 62, Getting set up (with a grown-up). Next comes lesson 64, Vague or clear?.

What the lesson explains

The 4-part prompt. Tell the agent what you want, clearly.

Order like a pizza. Which shop, which pizza, when it is ready, what to leave off. Where which file; Goal what to do; Done how to check; Limits what not to do.

What you do first

Build a prompt. Build a clear prompt: make the footer bold. In the Prompt Builder, pick the clear part for each slot: Where: "In my-site, in index.html,"; Goal: "make the footer words bold."; Done when: "Done when the footer shows in bold."; Limits: "Change nothing else.". Then send it to the pretend agent.

The files on the practice computer

This lesson works in one folder. At the start, Documents\my-site holds images\, .gitignore, done.txt, footer.txt, ideas.txt, index.html, keys.env, secrets.txt, style.css, todo.txt.

Along the way you save index.html in Documents\my-site. Lesson 64 opens with the files just as you leave them.

What you practise

Try it, "Build a prompt": Build a clear prompt: make the footer bold. In the Prompt Builder, pick the clear part for each slot: Where: "In my-site, in index.html,"; Goal: "make the footer words bold."; Done when: "Done when the footer shows in bold."; Limits: "Change nothing else.". Then send it to the pretend agent.

Try it, "It did the job": The pretend agent says: "Here it is: the footer words in bold. May I change index.html?" It asks to change index.html. The right answer is Allow: it does what you asked, and nothing more.

Challenge, "Another order": Build a clear prompt: a light blue page background. In the Prompt Builder, pick the clear part for each slot: Where: "In my-site, in style.css,"; Goal: "give the body a light blue background."; Done when: "Done when the page shows light blue."; Limits: "Do not touch index.html.". Then send it to the pretend agent.

What PlayBuddy and PlayType say

PlayBuddy: "A prompt is your order, like ordering a pizza. Be clear!"

PlayType: "Where, goal, done, and limits. Four parts make it clear."

Help in every lesson

Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.

A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.

Stars

The lesson has 3 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.

About DayOneCode

DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.