> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automagik.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Dispatch

> Context-injecting dispatch commands — brainstorm, wish, work, review, done, reset, status.

# Dispatch Commands

Context-injecting spawn commands that bridge the wish state machine and [agent](/genie/concepts/agents) spawn. Each command extracts relevant context from wish artifacts and injects it into the spawned agent.

<Note>
  Dispatch commands are **thin wrappers** around [skills](/genie/concepts/skills) and [spawn](/genie/cli/spawn). `genie wish`, `genie work`, and `genie review` each resolve a skill (`/wish`, `/work`, `/review`), inject the relevant wish artifact as system-prompt context, and spawn the agent. If you need raw control, call `genie spawn` directly — dispatch exists so you don't have to reconstruct that context by hand every time.
</Note>

## `genie brainstorm`

Spawn an agent with brainstorm DRAFT.md content.

```bash theme={"dark"}
genie brainstorm <agent> <slug>
```

```bash Terminal theme={"dark"}
$ genie brainstorm engineer auth-flow
Spawning engineer with brainstorm context...
  Slug: auth-flow
  Draft: .genie/brainstorms/auth-flow/DRAFT.md
  Context injected via --append-system-prompt-file
```

## `genie wish`

Spawn an agent with DESIGN.md content.

```bash theme={"dark"}
genie wish <agent> <slug>
```

```bash Terminal theme={"dark"}
$ genie wish engineer add-oauth
Spawning engineer with design context...
  Slug: add-oauth
  Design: .genie/brainstorms/add-oauth/DESIGN.md
  Context injected via --append-system-prompt-file
```

## `genie work`

Check state, start execution group, spawn agent with wish context.

```bash theme={"dark"}
genie work <ref> [agent]
```

```bash Terminal theme={"dark"}
$ genie work add-oauth#1 engineer
Group 1 status: ready → in_progress
Spawning engineer with group context...
  Wish: .genie/wishes/add-oauth/WISH.md
  Group: 1 — "API endpoints"
  Context: wish summary + scope + group deliverables
```

## `genie review`

Spawn a reviewer with group context and git diff.

```bash theme={"dark"}
genie review <agent> <slug>#<group>
```

```bash Terminal theme={"dark"}
$ genie review reviewer add-oauth#1
Spawning reviewer with review context...
  Wish: .genie/wishes/add-oauth/WISH.md
  Group: 1 — "API endpoints"
  Git diff: 12 files changed
  Context: acceptance criteria + diff
```

## `genie done`

Mark an execution group as done, unblock dependents, push work, and notify the team lead on wave completion.

```bash theme={"dark"}
genie done <slug>#<group>
```

```bash Terminal theme={"dark"}
$ genie done add-oauth#1
✅ Group 1 marked done.
  Dependents unblocked: Group 3
  Wave 1: 2/2 complete
  Notified team-lead: "Wave 1 complete"
```

## Turn-closing commands

Called from inside an agent session to close the current turn with a non-success outcome. Both write the outcome (and optional reason) to the turn's event log so the team lead and downstream tooling can act on it.

### genie blocked

Close the current turn with `outcome=blocked` — use when the work cannot proceed because of an external dependency or missing information.

```bash theme={"dark"}
genie blocked [options]
```

| Option               | Description              |
| -------------------- | ------------------------ |
| `--reason <message>` | Why the turn is blocked  |
| `-h, --help`         | Display help for command |

```bash Terminal theme={"dark"}
$ genie blocked --reason "waiting on DB credentials from ops"
```

### genie failed

Close the current turn with `outcome=failed` — use when execution hit an error that cannot be recovered in this turn.

```bash theme={"dark"}
genie failed [options]
```

| Option               | Description              |
| -------------------- | ------------------------ |
| `--reason <message>` | Why the turn failed      |
| `-h, --help`         | Display help for command |

```bash Terminal theme={"dark"}
$ genie failed --reason "migration reverted — schema mismatch on dev"
```

## `genie status`

Pretty-print wish state overview.

```bash theme={"dark"}
genie status <slug>
```

```bash Terminal theme={"dark"}
$ genie status add-oauth
Wish: add-oauth
Status: IN_PROGRESS

Wave 1:
  ✅ Group 1: API endpoints              done     Mar 24, 14:30
  🔄 Group 2: Database migrations        in_progress

Wave 2:
  🔒 Group 3: Frontend integration       blocked  (depends: 1, 2)

Wave 3:
  🔒 Group 4: Tests                      blocked  (depends: 3)
  🟢 review: Final review                ready
```

## `genie reset`

Reset wish state. `<slug>#<group>` resets one in-progress group; bare `<slug>` wipes the wish and recreates from current `WISH.md`.

```bash theme={"dark"}
genie reset [options] <ref>
```

| Option      | Description                                                             |
| ----------- | ----------------------------------------------------------------------- |
| `-y, --yes` | Skip interactive confirmation prompt (required in non-interactive mode) |

```bash Terminal theme={"dark"}
$ genie reset add-oauth#2
🔄 Group 2 reset to "ready".

$ genie reset add-oauth --yes
🔄 Wish "add-oauth" wiped and recreated from WISH.md.
```

<Warning>
  Bare `genie reset <slug>` wipes all group state — completed work, in-flight groups, review history — and recreates the wish from the current `WISH.md`. Use `genie reset <slug>#<group>` when you only need to rerun a single group.
</Warning>

<Tip>
  `genie status <slug>` is the fastest pre-flight check before any dispatch command — it shows which groups are ready, in-progress, or blocked, so you don't spawn a duplicate agent on a group that's already running.
</Tip>

## Context Injection

All dispatch commands inject:

1. The file path to the full document (so the agent can read it)
2. The extracted section content (so the agent has immediate context)
3. Wish-level context when available (summary, scope, decisions)

Context is written to a temp file and passed via `--append-system-prompt-file`.

## See also

<CardGroup cols={2}>
  <Card title="Wish skill" icon="scroll" href="/genie/skills/wish">
    Shape a draft idea into a structured `WISH.md`.
  </Card>

  <Card title="Work skill" icon="arrows-spin" href="/genie/skills/work">
    Orchestrate the execution groups defined in a wish.
  </Card>

  <Card title="Review skill" icon="circle-check" href="/genie/skills/review">
    Validate completed work against the wish's acceptance criteria.
  </Card>

  <Card title="Spawn & Lifecycle" icon="rocket" href="/genie/cli/spawn">
    Spawn agents directly when you don't need wish context.
  </Card>
</CardGroup>
