Write the Project Brief

You finished the previous lesson with a list of decisions your agent made on its own, such as the language, the scale, and the formula. None of them was yours. The place to make them is a short document you write before any code, a brief.

In this lesson, you’ll start the real escape room project and write its brief. You’ll say who the tool is for, what it must do, what it must not do, and how you’ll know it’s done. Then you’ll let your agent interview you to find what you left open. Start with an empty folder and a first draft.

Draft the Brief From Your List

An agent fills every gap in a request with a plausible default, so the brief closes the gaps that matter before the agent starts.

Make the project’s folder and turn it into a Git repository from the start, so every step can get a checkpoint. If you use Claude Code on Windows, open your WSL2 terminal and run the Linux commands, as in the previous lesson, since Claude Code’s sandbox runs there:

Language: Windows PowerShell
PS> mkdir ~\code\escape-room-builder
PS> cd ~\code\escape-room-builder
PS> git init
PS> mkdir docs
Language: Shell
$ mkdir ~/code/escape-room-builder
$ cd ~/code/escape-room-builder
$ git init
$ mkdir docs

Then copy the rooms folder from the course’s sample code download into escape-room-builder. If you made the project folder in WSL2, File Explorer shows your Linux files under Linux. The rooms folder holds the Lighthouse Keeper’s Study and a second sample room that’s broken on purpose, so a team can’t finish it. The brief’s examples refer to both rooms.

A useful frame for a first draft is the intent of a piece of work, which has four parts: the problem, what should be true afterward, what must not change, and what’s out of scope. In a brief, the problem becomes the purpose and the users. What should be true becomes the must-haves and the done-when examples, and what must not change becomes constraints.

One word in the owner’s request, difficulty, needs a question of its own. It has two readings, and they lead to different code:

  1. A score the code works out from the room: The code needs a formula, with weights and caps that someone has to invent.
  2. The designer’s estimate for each puzzle: The code only reads the estimateMinutes values and adds them up along the room’s chains.

The owner chose the second reading, so the brief says so. Here’s one possible first draft, the one this lesson’s recorded session read. Its top half covers the problem and the must-haves:

Language: Markdown Text Filename: docs/brief.md
# Escape Room Builder: Brief

## Purpose

Designers check each new room by hand to see whether a team
can finish it. This tool reads a room file and runs that
check, so a broken room is caught before a play-test.

## Users

The business's room designers, on their own computers. They
know their rooms well, and they don't write code.

## Must-haves

- Read a room from a JSON file in the rooms/ folder.
- Say whether the room can be finished.
- If it can't, name each puzzle a team can never reach.

The purpose names a problem someone has today, and the users line says who reads the tool’s output. Each must-have is something you can watch the tool do. The bottom half settles difficulty and sets the boundaries:

Language: Markdown Text Filename: docs/brief.md
## Difficulty

Difficulty is the designer's estimate for each puzzle, the
estimateMinutes value in the room file. The code may add
estimates up, but it never calculates a difficulty score.

## Out of Scope

- A difficulty score, rating, or level of any kind.
- Bookings, payments, and customer accounts.
- A web page. The first version runs in a terminal.

## Constraints

- JavaScript on Node 26, with no framework and no paid services.
- Room files stay JSON, in the format they have now.
- The tool reads room files and never changes them.

The last two constraints are the “what must not change” part, since they keep the designers’ files as they are. A brief also ends with examples that someone could check, so the draft finishes with this section:

Language: Markdown Text Filename: docs/brief.md
## Done When

- For lighthouse-keepers-study.json, it says the room can be
  finished.
- For the broken sample room, it says the room can't be
  finished and names the puzzle whose need nothing unlocks.

The draft leaves out implementation filenames, functions, and the shape of the data. A brief says what and why, and the how comes with the plan.

Now write your own docs/brief.md in your editor, working from your list. Put requirements into the must-haves or constraints and out-of-scope items under the “Out of Scope” heading. Leave questions for the owner unanswered for now. Your wording will differ from the draft above.

Before an agent reads the draft, commit it with the sample rooms as the project’s first checkpoint. If a session later changes a file, Git shows you exactly what changed:

Language: Shell
$ git add docs/brief.md rooms
$ git commit -m "Add draft brief and sample rooms"

Let Your Agent Interview You

Your draft settles the decisions you noticed. To find the ones you didn’t, ask the agent to read the brief and question you about the gaps it would otherwise fill itself.

First, set the folder up as for any new project: choose the permissions before starting the agent, copied from your warm-up folder (the practice project with your agent settings) or created fresh, then launch it from the project’s root folder. The instruction file comes later in the course, once a plan gives it decisions to hold. Open the version for your agent, checked in December 2026 with Claude Code 2.1 and Codex CLI 0.172:

From inside escape-room-builder, copy the warm-up folder’s settings.json. On Windows, run this in the WSL2 terminal where you made the folder:

Language: Shell
$ mkdir .claude
$ cp ~/code/warm-up/.claude/settings.json .claude/

If you set up difficulty-test in the previous lesson, then copy ~/code/difficulty-test/.claude/settings.json instead, and leave settings.local.json behind. If you have neither folder, create .claude/settings.json with the settings from the previous lesson’s “Without a warm-up folder” step before you start claude.

Start claude in the folder with no flags, and trust the folder when the workspace trust dialog asks. Then check that /permissions lists your rules and /sandbox shows the sandbox is on.

During the interview, Claude Code may ask a question as a multiple-choice menu. Pick an option, or type your own answer in the Other row when none of them fits.

From inside escape-room-builder, copy the warm-up folder’s .codex folder:

Language: Windows PowerShell
PS> Copy-Item -Recurse ~\code\warm-up\.codex .
Language: Shell
$ cp -r ~/code/warm-up/.codex .

If you set up difficulty-test in the previous lesson, then copy its .codex folder instead. If you have neither folder, create .codex/config.toml and the rules file from the previous lesson’s “Without a warm-up folder” step before you start codex.

Start codex in the folder with no flags, and trust the folder when Codex asks, since Codex loads .codex only for a trusted folder. Then type /status and check for workspace-write and on-request.

During the interview, Codex asks each question as a plain message, and you answer by typing your reply.

With the agent running, send it a request along these lines, in your own words:

Language: Text
Read docs/brief.md and both room files in rooms/. Ask me one
question at a time about anything the brief leaves open
that would change what you build. Don't write code or edit
any files yet.

Asking one question at a time lets each answer shape the next. “Would change what you build” steers the agent away from questions about wording. “Don’t write code” keeps it a conversation. Agents usually follow that last line, but nothing enforces it, and git status after the interview shows whether yours did.

Answer as the owner would. When you don’t know, say so. A “not decided yet” in the brief is better than a default the agent picks later. When the questions turn to details you don’t care about, tell the agent you’re done. Here’s what one recorded interview asked about the draft above:

No Claude Code session was recorded for this lesson. If you use Claude Code, expect questions of the same kind, though not the same ones.

Codex CLI 0.167 read the draft brief and the room file for the Lighthouse Keeper’s Study in December 2026. It asked four questions, one at a time, and wrote no files. Its first question was this:

What should count as finishing a room: being able to solve every puzzle, or reaching a particular final puzzle even if some others remain unreachable?

The answer was “every puzzle.” Codex then asked whether a puzzle with several needs requires all of them, and the answer was “all of them.” Its last two questions were these:

Once a team obtains something from a puzzle’s unlocks, does it stay available for every later puzzle that needs it, or can using it consume it?

Does the team start with nothing unlocked, so only puzzles with empty needs can be solved at the start?

Each question found a real gap. The draft said “can be finished” without defining it, and each answer affected how the code would check a room.

Your agent’s questions will differ. Write each answer into the brief yourself. For this project, the owner has settled the recorded session’s questions, so the draft gains this section:

Language: Markdown Text Filename: docs/brief.md
## What "Finished" Means

- A room is finished when a team can solve every puzzle.
- A team needs all of a puzzle's needs to solve it.
- Items and codes stay once found. Nothing gets used up.
- A team starts with nothing, so a room's first puzzles
  need nothing.

Now the meaning of “can be finished” is written down in one place, so you, the agent, and any later test can use the same definition. Questions you couldn’t answer go into an “Open Questions” section, so a session sees them as open instead of filling them in.

If you’re unsure about a question or your answer, paste the exchange and ask:

Weigh each point the mentor raises. Write the decisions you can settle into the brief, and add the rest to “Open Questions.”

Commit the Brief Where Every Session Finds It

Keep your answers in a file. Your agent can resume a saved conversation, but a new session starts with a fresh context and doesn’t contain the earlier chat. A file on disk is there for every session and for you.

The brief isn’t loaded by itself, though. When you start a new session, ask the agent to read docs/brief.md first. Later in the course, the project’s instruction file will point every session to it.

Check your brief against the frame once more. Does it name the problem and the users? Can you watch each must-have happen and check each done-when example by running the tool? Does it say what the code must not do about difficulty?

Then run git status. It should list docs/brief.md as modified, with your answers in it, and your agent’s settings folder. Anything else is a file the agent changed or added, and git diff shows changes to tracked files. Commit the answers as the second checkpoint:

Language: Shell
$ git add docs/brief.md
$ git commit -m "Add interview answers to brief"

The settings folder is yours to commit or leave out.

The brief will change as you learn more about the project, and each change gets its own commit. For more on stating intent, see Intent and Acceptance: Knowing What “Correct” Means.

You can ask the mentor where an agent would still have to guess:

If the review finds a gap, settle it in the brief or add it to “Open Questions,” then commit that change before you move on.

Check Your Understanding

Answer these before you open the answers:

  1. The owner adds a must-have: “Show how hard the room is.” Rewrite it as one must-have and one out-of-scope line that keep the project’s decision about difficulty.
  2. Which part of a stated intent does “The tool reads room files and never changes them” address, and why does it belong in the brief?
  3. A done-when line says “The checker works well.” Rewrite it as an example someone could check.
  4. Yesterday you pasted your brief into a session’s chat. Today you start a new session. What does the agent know about the brief, and what fixes that?
  1. A must-have could read “Add up the designer’s estimates along the room’s longest chain of puzzles.” The out-of-scope line could read “A difficulty score, rating, or level that the code works out.” The code combines the designer’s estimates, and people judge difficulty. Adding up estimates is a later request, though. The decision allows it, but your brief’s must-haves stay with loading a room and saying whether it can be finished.
  2. What must not change. Without it, an agent could decide to fix or reformat the file it reads.
  3. Name an input and what the tool should say about it. For example: “For the broken sample room, it says the room can’t be finished and names the puzzle whose need nothing unlocks.”
  4. Nothing from yesterday’s chat, unless you resume that conversation, because a new session starts with a fresh context. Save the brief as a file in the repository, such as docs/brief.md, commit it, and ask the new session to read it.

Your escape room project now has a committed brief with its first design decision written in. The code checks the room’s structure, and people judge difficulty. Before you ask an agent for a plan based on the brief, practice spotting what a brief leaves open. In the next exercise, Find the Gaps in a Brief, you’ll compare a short brief for another small project with what an agent built from it.

It’s the course’s first coding exercise, and it needs no agent. You work in your browser. You record your answers in the editor, click Run Tests, and automated tests tell you which ones hold up. The exercise’s Contents tab, below the editor, explains how coding exercises work.

Become a Member to join the conversation.