1. Home
  2. Free course
  3. Module 1

Write the brief.
Define done first.

A run can be lost in its first message. This module teaches you to turn a wish into a goal, checks that prove it, and a scope the agent can't drift from, and to make the agent say it back before it writes a line.

Module 1 of 8about 45 minFoundation

What you will be able to do

  • Rewrite a vague request as one goal sentence, stated as the outcome a user would see.
  • Write "done means" checks that anyone can run or look at, and that fail when the work is wrong.
  • Set scope, non-goals and a "don't touch" list so the agent neither drifts nor quietly adds work.
  • Get the agent to restate the task and plan before it edits, and correct it in one message.
  • Brief a long run you won't watch, so it knows what to do when it gets stuck.

A harness will start working the moment you press Enter. That is its strength and the reason the brief matters: everything the agent does for the next hour is an interpretation of what you typed. A good brief costs you two minutes. A bad one costs you the run, the review, and the second run.

This module works the same in any harness. The examples use Claude Code and Codex because they are the most common, but the brief is plain text and every technique here transfers.

1.1 From wish to goal

People ask for work the way they think about it: as a wish. "Make the checkout faster." "Clean up the settings page." "Add dark mode." A wish names a direction. It doesn't name a destination, so the agent picks one for you, and it picks the one that is easiest to reach from the code it happens to read first.

A goal is the destination, written as the outcome a user would see. It has three parts: who notices, what they notice, and where.

Wish:  Make the checkout faster.
Goal:  A shopper on a mid-range phone sees the payment step
       within 2 seconds of pressing "Continue", on the live site.

The goal changes the work. "Faster" might have meant a smaller JavaScript bundle, a cached API call, or a database index. The goal says the payment step on a phone is what matters, so the agent measures that first and fixes whatever is actually slow there. It also tells the agent the job isn't done until it's true on the live site, which you'll come back to in module 4.

If you don't know the number, don't invent one. "Noticeably faster than today, with before and after timings in the reply" is an honest goal. A made-up threshold sends the agent optimising for a figure nobody chose.

Keep the user's words

When you brief on someone else's behalf (a client, a manager, a ticket), quote their words and then add your goal underneath. Agents, like people, have a habit of upgrading a request into what they think it should have been. "Images for the landing page" becomes "an animated hero video", and the video is lovely and useless, because the person needed images. The rule we use: deliver what was asked, in the form asked. Going further means doing that thing better, never swapping it for something else.

Task (client's words): "We need three product images for the
landing page, the same style as the existing ones."
Goal: three new images in assets/landing/, matching the size and
style of hero-1.webp, shown on the landing page.
Form: images. Not video, not illustration, not a carousel.

The common mistake

Describing the implementation instead of the outcome. "Add a Redis cache to the product API" is a solution you have already chosen. If the slow part turns out to be image loading, the agent will still add Redis, because that's what you asked for, and the page will be no faster. Name the outcome and let the agent find the cause, unless you have a real reason to fix the method. If you do, say why, so the agent can tell you when the reason doesn't apply.

Turn three wishes into goals

Take three requests from your own backlog or inbox. For each, write one sentence that names who notices, what they notice, and where. If you can't fill in "where", you've found a question to ask before any agent starts.

1.2 Done means: checks that prove it

The most useful part of a brief is the list of checks that say the work is finished. Without it, the agent stops when the work looks done to the agent. With it, the agent can run the checks itself, see what fails, and keep going. Anthropic's own guidance for Claude Code makes the same point: give the agent something it can run that comes back pass or fail, and it can close the loop on its own (Claude Code best practices).

A check is good when three things are true:

  1. Anyone can run it or see it. A command, a URL, a test name, a screenshot of a named screen. Not "works well", not "looks clean".
  2. It fails when the work is wrong. "The page loads" passes on a broken form. "Submitting the form with an empty email shows the error under the field" doesn't.
  3. It is checked where the user meets the result. At least one check runs on the real thing: the deployed page, the built app, the actual email in an inbox.

Compare two versions of the same brief:

## Done means          (weak)
- Newsletter signup works
- Tests pass
- Looks good on mobile

## Done means          (strong)
- [ ] `npm test` passes, including a new test for an invalid email
- [ ] On http://localhost:3000/, submitting "a@b" shows
      "Enter a full email address" under the field, and nothing is sent
- [ ] A valid address appears in the subscribers table:
      `sqlite3 dev.db "select email from subscribers order by id desc limit 1"`
- [ ] At 375 px wide the form fits without horizontal scroll (screenshot)

The strong version is longer, but every line is something the agent can do and report. When the reply comes back you don't have to take "it works" on trust: you read four results.

Tests are a check, not the check

"Tests pass" is the weakest strong check. It proves the tests the agent ran still pass. It doesn't prove the agent ran the right ones, that the new behaviour has a test, or that the test exercises the real path instead of a mock. Pair it with at least one check that looks at the result directly. Module 4 goes deep on the blind spots of tests.

The common mistake

Writing the checks after the work. Once you've seen the result, your checks drift towards what was built instead of what was needed. Write them first, while you still remember what you wanted. If the agent later argues that a check is wrong, that's a useful conversation, and it happens out loud instead of silently.

Make one check fail on purpose

For a task you're about to give an agent, write three "done means" checks. For each one, describe a broken version of the work that would still pass it. If you can, the check is too weak: tighten it until the broken version fails.

1.3 Scope, non-goals and don't touch

An agent with a clear goal and good checks can still do damage on the way there. It reformats files it opened, "fixes" a neighbouring bug, upgrades a dependency, or edits a generated file that gets overwritten on the next build. Three short lists stop that.

ListWhat it saysExample
In scopeThe pieces this task covers.The signup form component, its API route, one new test.
Out of scopeWork that will not be done, so it isn't added silently or expected silently.Double opt-in emails. Restyling the footer.
Don't touchFiles, data and environments that must stay as they are.src/gen/, the production database, .env, other people's branches.

"Out of scope" is the one people skip, and it does two jobs. It stops the agent adding work you didn't ask for, and it records what you decided not to do, so nobody reviewing the result thinks it was forgotten.

Constraints

Constraints are the rules of the road: what the work must respect even though it's not the point of the task. Write the ones the agent can't discover by reading the code.

## Constraints
- No new dependencies. The project is deliberately dependency-free.
- Must run on Node 22 as well as 24: CI uses 22.
- Keep the public API of src/lib/mailer.ts unchanged; two other
  services import it.
- Polish copy stays Polish; don't translate existing strings.

Each line carries a reason. A reason lets the agent apply the rule sensibly at the edge ("the dependency is only for tests, is that allowed?") instead of either breaking it or freezing.

When a list should be a guard

A line in a brief is a request. The model usually follows it, but it decides. When an edit to a path must never happen, the harness can enforce it. In Claude Code, a PreToolUse hook that exits with code 2 blocks the tool call before it runs (enforce steps with hooks). Our free brief guard does this for you: it reads the brief's "Don't touch" list and refuses edits to any path written there in backticks. Module 6 covers guards properly; for now, know that the brief and the guard can be the same list.

The common mistake

A scope so wide it gives no protection ("the frontend") or a "don't touch" list in prose the agent can't match ("anything important"). Name paths, globs, services and environments. If you can't name it, the agent can't avoid it.

Write the three lists

Open a repository you know. Pick one small feature. Write in scope, out of scope and don't touch, each with real paths. Then list two constraints the code alone wouldn't tell a newcomer, each with its reason.

1.4 Make the agent restate it before it builds

The cheapest moment to find a misunderstanding is before the first edit. After that, every correction has to undo work. So the last step of any brief is to ask the agent to say the task back, with its plan, and to wait for your go.

Most harnesses have a mode for this. In Claude Code, plan mode lets the agent read files and propose a plan but makes no edits until you approve; you start it with claude --permission-mode plan or press Shift+Tab mid-session until the status bar shows plan mode (plan before editing). Codex lists a /plan command among its slash commands (Codex commands). Without a mode, a plain sentence works in any harness:

Before you change anything: read what you need, then write back
(1) the goal in one sentence, (2) the "done means" checks you will
run, (3) the files you expect to change, (4) anything you assumed.
Then stop and wait for my "go".

Read the reply for three things:

  • Drift in the goal. Did "three images" become "a gallery component"? Correct it now.
  • Files you didn't expect. A plan that touches the payment module for a newsletter form is telling you something.
  • Assumptions. These are choices made without asking. Each one is yours to veto.

When you don't know what you want yet

Sometimes the honest brief is "I haven't thought this through". Then don't fake one. Ask the agent to interview you. Anthropic suggests exactly this pattern: tell Claude to ask you questions until it could write the spec, then write it to a file (brainstorm with Claude first).

I want rate limiting on the public API but haven't decided the
details. Interview me, one question at a time, until you could
write the brief. Then write it to BRIEF.md and stop.

Using /brief

Our free /brief command for Claude Code does this step for you. It reads just enough of the code to name real files and commands, then writes back a short brief with your task quoted, your focus, a goal, checkable "done means" items, in scope, out of scope, don't touch, assumptions and open questions, and asks "Go?". Nothing is built until you answer. A focus such as /brief UI matters most changes priority, not scope.

> /brief the signup form rejects valid plus-addresses; UI copy matters

# Brief — shop — 2026-11-28 10:14
## Task
"the signup form rejects valid plus-addresses"
## Focus
"UI copy matters". The error message gets checked hardest.
## Goal
A visitor can subscribe with an address like anna+news@example.com.
## Done means
- [ ] `npm test -- signup` passes, with a new case for a plus-address
- [ ] On /newsletter, anna+news@example.com shows the success message
- [ ] An invalid address still shows "Enter a full email address"
## Out of scope
Double opt-in. Any change to the subscribers table.
## Don't touch
`src/gen/`  `migrations/`
## Assumptions
The validation lives in src/lib/email.ts (only regex found).
## Open questions
None.
Go?

The common mistake

Answering "go" without reading. The restatement is only worth something if you check it. If the plan is long, read the goal, the files and the assumptions; those three catch most misreadings.

Restate, then correct

Give your harness a real small task with the restate-and-wait instruction above, or in plan mode. Find at least one thing in its restatement to correct or confirm explicitly. Note how long the correction took compared with undoing the same mistake after an edit.

1.5 Briefs for runs you won't watch

A brief for a ten-minute task you're watching can be short, because you're there to answer questions. A brief for a two-hour run, a night run or a background agent has to answer the questions in advance, because nobody will. Claude Code's docs note the same for scheduled tasks: the task runs on its own and can't ask clarifying questions, so say what success looks like and what to do with the results (run Claude on a schedule).

Add four sections to an unattended brief:

  1. Decision rules. What to do at the forks you can predict. "If a test was already failing before your change, note it and move on; don't fix it."
  2. When to stop. The conditions under which the agent stops and reports instead of pressing on: anything destructive, anything outside the listed paths, the same failure three times.
  3. Where to report. A file, a pull request description, a checkpoint. Name it, and name the shape: done, in progress, not started, evidence for each.
  4. What not to wait for. The opposite of a stop rule. "Once I've approved the rename, apply it everywhere it fits. Don't ask me again mid-way." An unattended run that stops to ask for permission it already has is a wasted night.
## If you get stuck
- Same test fails 3 times after different fixes: stop, write what
  you tried to NOTES.md, and leave the branch as is.
- Anything would delete data or touch production: stop and report.
- A file outside "In scope" needs a change: make no edit, list it
  under "Needs approval" in the report.

## Report
Open a draft PR. Description: Done / In progress / Not started,
each item with the command you ran and its output.

The common mistake

Giving an unattended run the same brief you'd give a watched one, then coming back to find it either stopped at the first question or, worse, improvised an answer to a question you would have answered differently. If you'd be annoyed by either outcome, write the rule.

Write the stuck rules

Take the brief from 1.3. Imagine you're leaving for three hours. Add "If you get stuck" and "Report" sections. Then reread the brief as if you were the agent and list every point where you'd have to guess. Each guess is a missing rule.

Practice task

Run one complete, briefed task on your own harness. Pick something real and small: a bug in a project you work on, a form validation, a missing test, a copy change across a few pages. It should take an agent between ten and forty minutes.

  1. Write the brief in a file before you open the harness: task (quoted), goal, done means, in scope, out of scope, don't touch, constraints, assumptions.
  2. Start the harness in plan mode, or with the restate-and-wait instruction. Paste or reference the brief.
  3. Compare its restatement with your brief. Correct at least one point, or confirm explicitly why none needed correcting.
  4. Let it work. Don't add new requirements mid-run; if you think of one, write it down for the next task.
  5. When it says it's done, check each "done means" item yourself, from the evidence in its reply or by running it.

Success criteria. You pass when all of these are true:

  • The brief existed in writing before the first edit, and every "done means" item is a command, URL, test name or screenshot.
  • At least one check would have failed on a plausible wrong version of the work.
  • No file outside "in scope" was changed, or each one that was is explained and approved.
  • Every "done means" item has evidence: the output, the screenshot, the URL you opened.
  • You can name one thing the brief prevented, and one thing you would add to the next brief.

Check yourself

What is the difference between a wish and a goal?

A wish names a direction ("make it faster"). A goal names the destination as an outcome a user would see: who notices, what they notice, and where. The goal tells the agent what to measure and when to stop.

Why is "tests pass" a weak "done means" check on its own?

It only proves that the tests the agent ran still pass. It doesn't show the right tests ran, that the new behaviour is tested, or that the test touches the real path. Pair it with a check that looks at the result directly, ideally where the user meets it.

What job does "out of scope" do that "in scope" doesn't?

It records what will not be done, so the agent doesn't add it silently and reviewers don't assume it was forgotten. It turns a silent expectation into an explicit decision.

When should a "don't touch" line become a guard?

When an edit to that path must never happen, with no exceptions. A brief line is a request the model usually follows; a hook such as a PreToolUse hook that exits with code 2 is enforced by the harness every time.

What four things does an unattended brief need that a watched one can do without?

Decision rules for predictable forks, conditions for stopping, where and how to report, and what not to wait for (permissions already given). Nobody is there to answer questions, so the brief must answer them in advance.

Key takeaways

  • The goal is the outcome a user sees, with a "where". Keep the requester's words and deliver in the form asked.
  • "Done means" checks are runnable, fail on wrong work, and include one check where the user meets the result.
  • Scope, out of scope and don't touch stop drift. Name paths, not categories.
  • Constraints carry their reason so the agent can apply them at the edges.
  • Have the agent restate goal, checks, files and assumptions before it edits. Read the reply.
  • Unattended runs need stop rules, decision rules and a report format written in advance.

Go further

  • Module 2: Context covers what the agent knows before it reads your brief, and how to keep that from contradicting it.
  • Module 4: Verification turns your "done means" list into evidence you can trust.
  • Free skills: /brief, the brief guard and the evidence gate for Claude Code.
  • Guided training: the same module with an instructor reviewing your briefs and transcripts.
  • Certification: every exam starts with a brief you write and a run you prove.