---
name: brief
description: Turns any task you hand to an AI agent, subagent or second session into a written brief with a goal, numbered done_when rows that each name their proof, constraints and the cases where the agent must stop and ask. Use it when the user says "write a brief", "delegate this", "give this to an agent", "start a task", "zadanie dla agenta", "napisz brief", or before any multi-step task starts.
---

# Brief: goal and "done when" before any work starts

An agent with no finish line stops when it runs out of ideas, not when the job is done. It says
"done" because it got tired, and you find the gap later. This skill makes every task start as a short
written brief: what the goal is, how anyone can tell it is finished, and what proof will show it.

Read `CONTEXT.md` next to this file before the first brief. It holds your project, where briefs are
saved, and your default constraints. If it is missing or a field you need is blank, ask the user for
that one field, say what it is for, and write the answer into `CONTEXT.md`.

## The three-line minimum

For a small task, three lines are enough. Never fewer.

```
Goal: <one sentence: what the person asking wants>
Done when: <something anyone can check, not "looks good">
Proof: <the file, command output or screenshot that will show it>
```

Bad: "Build me a store."
Good: "Goal: build the product page for <your product>. Done when: a test payment goes through on it.
Proof: a screenshot of the order confirmation page."

The bad version has no finish line, so the agent decides when it is finished. The good version
gives it one, and gives you a way to check it in ten seconds.

## The full brief

Use the full form (template: `BRIEF.template.md`) for anything with more than one step, anything
that touches live data or customers, and anything you hand to another agent.

1. **Goal.** One sentence, in the words of the person who asked. Copy their words; do not improve
   them. If you rephrase the goal, you can solve a different task without noticing.
2. **Context.** Only what the agent cannot find on its own: links to the files, decisions already
   made, the state things are in now.
3. **done_when.** Numbered rows. Each row is one fact that is either true or false when the work
   ends, and names the proof that shows it. Rules for rows are below.
4. **Constraints.** What the agent must not touch or do: files, accounts, live systems, spend,
   time. Add the defaults from `CONTEXT.md`.
5. **Out of scope.** Things that look related but are not part of this task. Naming them stops the
   agent from wandering into them.
6. **escalate_when.** The cases where the agent stops and asks instead of guessing.
7. **Report.** The agent ends with a report that answers every done_when row: done or not done,
   plus the proof. (The `raport` skill covers this.)

## Writing done_when rows

- **One fact per row.** "Form works and emails arrive" is two rows.
- **Binary.** At the end it is either true or false. "Page is faster" is not binary;
  "page loads in under 2 s on <your test command>" is.
- **Checkable by someone else.** A second person or a second model must be able to check it without
  asking the author anything.
- **Proof named up front.** Each row says what will prove it: a file path, a command and the output
  you expect, a URL and what should be on it, a screenshot of a named screen.
- **Written before work starts.** Rows added at the end tend to describe what was done, not what was
  needed. If a row must change mid-task, the agent says so and why.
- **No adjectives.** "Clean", "good", "nice", "robust" and "looks good" are never rows. Ask "how would
  I check that?" and write the answer instead.

| Weak row | Strong row |
|---|---|
| Tests pass | `<your test command>` exits 0; output pasted in the report |
| Copy is better | Every headline is under 60 characters and names the product; file path in the report |
| Bug fixed | The steps that broke it (listed in Context) now end on the right screen; screenshot path |
| Email set up | A test signup to `<test address>` receives the welcome email; screenshot of the inbox |

## escalate_when: stop and ask

The agent stops and asks the person instead of guessing when:

- a load-bearing fact is missing (a price, an account, which of two versions is right);
- the task only fits by solving an easier version of it ("I could not connect the payment, so I
  mocked it");
- a done_when row turns out to be impossible or wrong;
- the next step is hard to undo (deleting data, sending to customers, spending money);
- anything in the user's own escalate list in `CONTEXT.md`.

It asks one question at a time, says what it already checked, and offers options where it can.

## If the user gives a task without a brief

1. Write the three-line minimum yourself from what the user said.
2. Show it in one short message: "Here is how I will know I am done: ..." and ask only about the rows
   you had to guess.
3. If the user says "just do it", go ahead and put your guessed rows at the top of the report, so they
   can see what finish line you used.

## Save the brief as a file

Save each brief in the folder from `CONTEXT.md` as `brief-<yyyymmdd>-<short-name>.md`. The file is what
the critic grades against and what the report answers row by row. A brief that lives only in a chat
message gets lost, and then nobody can check the work against it.

## How the three skills fit together

- **brief** (this skill) sets the finish line before work starts.
- **krytyk** grades the finished work against the brief's done_when rows, in a separate model or
  session that does not trust the author.
- **raport** makes the agent end with proof for every row.

Each one works alone. Together they close the loop: what was asked, what was checked, what was proven.

## Done check for this skill

- Every task over one step has a saved brief file before work starts.
- Every done_when row is binary and names its proof.
- The final report answers every row by number.
