# Brief dla agenta AI: cel i kiedy jest gotowe

> Każde zadanie dla AI ma cel, warunek „kiedy gotowe” i dowód, zanim agent zacznie pracę.

Canonical: https://dawidgac.com/pl/skills/brief-dla-agenta-ai
Opublikowano: 2026-11-18

## Co robi

Agent bez warunku „kiedy gotowe” kończy wtedy, kiedy skończą mu się pomysły, a nie wtedy, kiedy robota jest zrobiona. Ten skill zamienia każde zadanie w krótki brief. Małe zadanie dostaje trzy linie: cel, kiedy jest gotowe i jaki dowód to pokaże. Większe zadanie dostaje pełny brief: cel słowami osoby, która prosi, kontekst, numerowane wiersze done_when, ograniczenia, rzeczy poza zakresem i listę sytuacji, w których agent przerywa i pyta zamiast zgadywać. Każdy wiersz done_when jest prawdziwy albo fałszywy na końcu pracy, da się go sprawdzić bez pytania autora i od początku wskazuje swój dowód: plik, wynik komendy albo zrzut ekranu. Brief ląduje w pliku, więc krytyk i raport mogą się do niego odwołać.

## Kiedy używać

- Dajesz agentowi zadanie dłuższe niż jeden krok.
- Agent mówi „gotowe”, a Ty dopiero potem znajdujesz braki.
- Przekazujesz robotę pod-agentowi albo drugiej sesji.
- Zadanie dotyka danych na żywo, klientów albo pieniędzy.

## Kiedy nie używać

- Jedno pytanie o fakt, na które agent odpowiada od razu.
- Burza mózgów, w której każdy wynik możesz wyrzucić bez kosztu.
- Zadanie, które ma już brief z innego procesu, na przykład formularz zlecenia.

## Tabela decyzyjna

| Sytuacja | Co robi agent |
| --- | --- |
| Małe zadanie, jeden krok | Pisze trzy linie: cel, kiedy gotowe, dowód |
| Zadanie z kilkoma krokami | Pisze pełny brief z szablonu i zapisuje go w pliku |
| Dostaje zadanie bez briefu | Sam pisze trzy linie i pyta tylko o wiersze, które musiał zgadnąć |
| Brakuje kluczowego faktu | Przerywa i pyta, jedno pytanie naraz |
| Zadanie da się zrobić tylko w uproszczonej wersji | Nie upraszcza po cichu, tylko pyta |

## Czego potrzebujesz

### An AI coding agent: Claude Code, Codex CLI or Cursor

wymagane, aplikacja: https://code.claude.com/docs/en/overview

Skill to plik instrukcji w markdown. Potrzebujesz agenta, który go czyta i ma dostęp do Twoich plików.

1. Zainstaluj jednego agenta: Claude Code (https://code.claude.com/docs/en/overview), Codex CLI (https://developers.openai.com/codex/cli) albo Cursor (https://cursor.com/docs).
2. Otwórz agenta w folderze swojego projektu.
3. Zainstaluj skill według kroków z sekcji instalacji.

## Instalacja

1. Pobierz folder files i zmień nazwę CONTEXT.template.md na CONTEXT.md.
2. Claude Code: wrzuć folder do .claude/skills/brief/ w projekcie albo do ~/.claude/skills/brief/ dla wszystkich projektów. Claude ładuje skill, gdy opis pasuje do zadania, albo gdy wpiszesz /brief.
3. Codex: wklej treść SKILL.md do AGENTS.md w katalogu głównym repozytorium albo do ~/.codex/AGENTS.md.
4. Cursor: dodaj SKILL.md jako regułę projektu albo wklej go do AGENTS.md.
5. Inny agent: wklej SKILL.md do pliku instrukcji projektu lub promptu systemowego i trzymaj obok CONTEXT.md oraz BRIEF.template.md.
6. Wypełnij CONTEXT.md swoimi danymi: projekt, foldery, zasady.

## Działa, jeśli

- Przed każdym zadaniem z kilkoma krokami w folderze briefów pojawia się plik brief-<data>-<nazwa>.md.
- Każdy wiersz done_when ma kolumnę z dowodem.
- W żadnym wierszu nie ma słów „dobrze”, „ładnie” ani „wygląda OK”.
- Gdy dasz zadanie bez briefu, agent najpierw pokazuje swoje trzy linie.
- Raport końcowy odpowiada na każdy wiersz po numerze.

## Wymagania

- Agent AI, który czyta pliki instrukcji, na przykład Claude Code, Codex CLI albo Cursor.
- Folder w projekcie na briefy.

## FAQ

### Po co pisać brief, skoro mogę po prostu napisać prompt?

Prompt mówi, co zrobić. Brief mówi też, kiedy skończyć i jak to sprawdzić. Bez tego agent sam decyduje, kiedy jest gotowe.

### Co to jest wiersz done_when?

Jeden fakt, który na końcu pracy jest prawdziwy albo fałszywy, razem z dowodem. Na przykład: płatność testowa przechodzi, dowodem jest zrzut ekranu potwierdzenia zamówienia.

### Czy każde zadanie potrzebuje pełnego briefu?

Nie. Małe zadanie potrzebuje trzech linii: cel, kiedy gotowe i dowód. Pełny brief jest dla zadań z kilkoma krokami, z danymi na żywo albo przekazywanych innemu agentowi.

### Co jeśli w trakcie pracy wiersz okaże się niemożliwy?

Agent przerywa i mówi o tym. Nie zmienia wiersza po cichu i nie rozwiązuje łatwiejszej wersji zadania.

## Gdzie to pasuje

To pierwszy z trzech skilli. Brief ustawia metę. Krytyk (krytyk-ai) ocenia gotową pracę względem wierszy done_when. Raport z dowodem (raport-z-dowodem) odpowiada na każdy wiersz dowodem. Każdy działa osobno, razem zamykają pętlę.

## Źródła

- Claude Code docs: skills: https://code.claude.com/docs/en/skills (dostęp 2026-09-22)
- Codex docs: AGENTS.md: https://developers.openai.com/codex/guides/agents-md (dostęp 2026-09-22)
- Cursor docs: rules: https://cursor.com/docs/context/rules (dostęp 2026-09-22)

## Pliki

### SKILL.md

Metoda: minimum w trzech liniach, pełny brief, zasady pisania wierszy done_when i sytuacje, w których agent ma przerwać i zapytać.

Pobierz: https://dawidgac.com/pl/skills/brief-dla-agenta-ai/files/SKILL.md

````markdown
---
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.
````

### BRIEF.template.md

Szablon briefu do wypełnienia: cel, kontekst, tabela done_when z dowodem, ograniczenia, eskalacja, raport. Z gotowym przykładem.

Pobierz: https://dawidgac.com/pl/skills/brief-dla-agenta-ai/files/BRIEF.template.md

```markdown
# Brief: <task name>

- Date: <yyyy-mm-dd>
- Asked by: <role, e.g. owner, client, teammate>
- Brief id: <yyyymmdd-short-name>
- Saved at: <briefs folder>/brief-<yyyymmdd>-<short-name>.md

## Goal

_One sentence, in the words of the person who asked. Copy them, do not improve them._

<goal>

## Context

_Only what the agent cannot find alone: file links, decisions already made, current state._

- <file or decision>

## done_when

_One fact per row, true or false at the end, checkable by someone else. Name the proof now._

| # | True when done | Proof that shows it |
|---|---|---|
| 1 | <fact> | <file path / command + expected output / URL / screenshot> |
| 2 | <fact> | <proof> |

## Constraints

_What the agent must not touch or do. Add the defaults from CONTEXT.md._

- <constraint>

## Out of scope

_Related things that are not part of this task._

- <item>

## escalate_when

_Stop and ask instead of guessing when:_

- a load-bearing fact is missing;
- the task only fits by solving an easier version of it;
- a done_when row turns out impossible or wrong;
- <your own case>

## Report

End with a report that answers every done_when row by number: done or not done, plus the file path,
command output, URL or screenshot that proves it. Add a "Not checked:" line.

---

# Example: Brief: contact form on the contact page

- Date: <yyyy-mm-dd>
- Asked by: site owner
- Brief id: <yyyymmdd>-contact-form
- Saved at: briefs/brief-<yyyymmdd>-contact-form.md

## Goal

"Add a contact form so people can write to me without opening their email app."

## Context

- Contact page: `<your site>/src/pages/contact`
- Form messages go to `<your inbox>` through `<your email service>`.

## done_when

| # | True when done | Proof that shows it |
|---|---|---|
| 1 | The form has name, email and message fields, all required | Screenshot of the page with an empty submit showing the errors |
| 2 | A test message arrives in the inbox | Screenshot of the received message |
| 3 | The site builds with no new errors | `<your build command>` output, exit 0 |

## Constraints

- No new paid service. No change to other pages.

## Out of scope

- Spam filtering beyond the email service's default.

## escalate_when

- The email service needs a key that is not in the project's usual key store.

## Report

Rows 1-3 by number, each with its proof. "Not checked:" line at the end.
```

### CONTEXT.template.md

Twój projekt, folder na briefy, stałe ograniczenia, Twoje powody do eskalacji i dowody, które akceptujesz.

Pobierz: https://dawidgac.com/pl/skills/brief-dla-agenta-ai/files/CONTEXT.template.md

```markdown
# Brief: your context

Copy this file to CONTEXT.md next to SKILL.md and fill in every blank. Never put passwords, access
keys or card numbers here.

## Your project

(What you work on, in one or two lines, so the agent can fill in the Context section of a brief.)
Example: <your project>, an online store selling <your product> to <your customers>.

Project:
Main folders or tools:

## Where briefs are saved

(A folder, so the critic and the report can point back to the brief.)
Example: briefs/

Briefs folder:

## Default constraints

(Rules that apply to every task unless a brief says otherwise.)
Example: never send anything to customers without asking; never delete files, move them to a backup
folder; no new paid tools.

Default constraints:

## Default escalate_when

(Your own cases where the agent must stop and ask, on top of the ones in SKILL.md.)
Example: any change to prices; any message that goes out under my name.

Escalate when:

## Proof you accept

(What counts as proof in your setup. Add the commands and screens you trust.)
Example: `<your test command>` output; a screenshot of the admin order page; a file path in the repo.

Accepted proof:

## Trigger phrases

(Extra words, in any language you use, that mean "write a brief first".)
Example: "zleć to", "hand this off".

Trigger phrases:
```
