---
title: "Running plays"
description: "Take a raw ask from a client call through Clarify, Gate A, Build, Verify, Audit and Gate B to a published workflow, and what to do when a play stops."
sidebar:
  icon: play
---

A play is one idea on its way to a live Clay workflow. You start it, answer what only you can answer, approve twice, and step in only when it stops for you. Every command takes the play as `<client>/<play>`.

## Start a play

After a call, paste the ask the way the client said it:

```bash
gw idea acme "lookalikes off last 45 days of closed-won, routed to AEs" --id lookalikes-01
```

```txt
Created acme/lookalikes-01
acme/lookalikes-01  Clarify · waiting_human · 2 questions waiting for you
next: Answer: gw questions acme/lookalikes-01  →  gw answer acme/lookalikes-01 Q1 "..."  (or --defaults)
```

- `--id <play-id>` names the play (otherwise one is made from the idea).
- `--no-run` creates it without starting it. `gw run` starts every ready play later, or `gw run <client>/<play>` one.
- Under Herdr, the play opens in its own tab instead of running in your terminal. See [Herdr](/guides/herdr).

Decompose breaks the idea into a job, a trigger and destinations and matches it to a blueprint. Clarify then answers what it can from the client's context, standards, decisions and functions, and asks you only what blocks the plan.

## Answer the questions

```bash
gw questions acme/lookalikes-01
```

```txt
How the agent read your idea:
  does:     Weekly net-new lookalike accounts from recent closed-won, approved by AEs before outreach
  starts:   Weekly schedule over the closed-won-last-45-days segment
  results:  Audiences: pending_ae_review; Rep task to seed AE
  wrong? gw answer acme/lookalikes-01 reading "what it should be"

Q1 [P0, open] Which hard ICP filters must every lookalike pass (geography, headcount band)?
    default: US + Canada, 50-1000 employees, B2B software
Q2 [P1, open] Should the workflow also add the seed account's direct competitors as candidates?
    default: No (similar companies only)
Q3 [P0, answered by agent] What marks an opportunity as closed-won?
    default: Opportunity stage = Closed Won
    answer:  Opportunity stage = Closed Won (client CLAUDE.md, Systems)
```

Answer one at a time, take a default, or take them all:

```bash
gw answer acme/lookalikes-01 Q1 "US only, 100-2000 employees"
gw answer acme/lookalikes-01 Q2 -                  # "-" takes the default
gw answer acme/lookalikes-01 --defaults            # every open question takes its default
```

If the agent misread the idea, correct the reading while Clarify waits on you:

```bash
gw answer acme/lookalikes-01 reading "Daily, not weekly; results go to a Salesforce task, not an audience"
```

When the last question is answered the play runs on: Research → Spec + Contract → Plan, and stops at Gate A. Add `--no-run` to record answers without running.

## Gate A

Gate A is where you approve the plan before anything is built:

```txt
acme/lookalikes-01  Gate A · gate · Gate A: review spec, contract and plan, then approve or reject · requirements: 2 verified · 1 inferred · 1 guesses · 0 blocked
next: Review plays/acme/lookalikes-01/plan.md, then: gw approve acme/lookalikes-01 --gate A
```

Read `spec.md`, `contract.json`, `plan.md` (the graph, its credit cost and the function reuse table), `workflow.mmd` and `prereqs.json`. `gw show acme/lookalikes-01` lists what's there and what's next. Then:

```bash
gw approve acme/lookalikes-01 --gate A
```

On approval the engine creates the fields and audiences in `prereqs.json` (never an agent) and records their ids in `setup.json`. Then Build → Verify → Audit run, and the play stops at Gate B.

### When the planner needs a ruling

If the planner wrote `needs-ruling.md` or a requirement is blocked, `gw show` lists them, and approving needs your rulings as a comment. The rulings go to Build:

```bash
gw approve acme/lookalikes-01 --gate A --comment "1-4 as recommended; use the AE owner field, not territory"
```

### Rejecting

Reject with what to change and the play goes back to Plan:

```bash
gw reject acme/lookalikes-01 --gate A --comment "Cap at 25 lookalikes per seed; drop the competitor branch"
```

Add `--approve` when your comment is the whole ruling: the replan is approved on your behalf, unless the planner raises something new (it writes `needs-ruling.md` again and the play waits for you).

```bash
gw reject acme/lookalikes-01 --gate A --comment "Cap at 25 per seed" --approve
```

## Build, Verify, Audit

- **Build** edits a draft workflow through `gw clay` with build permissions only. After Build, the engine validates the graph, enforces read-back after every node edit, and records the exact snapshot under review (`snapshot.json`).
- **Verify** is an independent agent. It never sees the builder's reasoning; it reads the spec, the built graph and real run outputs, runs tests within the play's credit budget, and scores holdouts only it can read. Each contract assertion gets a verdict: passed, failed or unverified.
- **Audit** reviews credits, simplicity, prompts, style and safety.

A failed check sends the play back to Build with a fix list, up to `maxBuildLoops` (3) times. After Audit passes, Build applies the plan's `golive.md` edits, Verify reads them back, and the play goes to Gate B.

## Gate B

```txt
acme/lookalikes-01  Gate B · gate · Gate B: approve publishing wf_twin1 at snapshot snap_twin17 · 1 assertion unverified
next: Review plays/acme/lookalikes-01/verification.md, then: gw approve acme/lookalikes-01 --gate B
```

Read `verification.md` (every assertion's verdict and evidence, and anything that couldn't be verified) and `audit.md`. Then approve publishing that exact snapshot:

```bash
gw approve acme/lookalikes-01 --gate B
```

Publish is an engine step, not an agent: it publishes the approved snapshot with `--no-launch-sequences`, and only if the snapshot still matches. Document then writes the client deliverables in `deliverables/`. Rejecting at Gate B sends the play back to Build with your comment; there is no `--approve` at Gate B, it always needs your explicit approval.

## When a play stops for you

| You see | Do |
| --- | --- |
| `waiting_human` at Clarify | `gw questions`, then `gw answer` |
| `waiting_human` at Plan: "needs 1 suppression list" | Save the list with `gw client suppression`; the play moves on by itself. See [Workspaces without Audiences](/guides/no-audiences) |
| `gate` | Review, then `gw approve` or `gw reject` |
| `manual` at Verify or Audit (a finding only a person can rule on) | `gw accept` with your ruling, or `gw reopen` to replan |
| `manual` or `blocked` elsewhere | `gw logs`, fix the cause, then `gw retry` |

### Accept what Verify or Audit stopped on

When Verify or Audit stops on something only a person can resolve (an access problem, a budget, a decision), record your ruling and continue:

```bash
gw accept acme/lookalikes-01 --comment "A10: the test-credit overrun is fine for this run"
```

The ruling is recorded in your name and shown at Gate B. Accepting never waves defects through: failures the builder can fix still go back to Build, with your ruling beside them. With nothing fixable left, the play moves on.

### Reopen a passed gate

When a later stage shows the approved plan or contract was wrong, reopen the gate from a `blocked` or `manual` play. The approval is voided and the play goes back to Plan (Gate A) or Build (Gate B) with your rulings:

```bash
gw reopen acme/lookalikes-01 --gate A --comment "Holdout must be closed_won_12m, not 45 days" --approve
```

`--approve` (Gate A only) lets your ruling approve the replan, unless the planner raises something new.

### Retry

```bash
gw retry acme/lookalikes-01                 # re-run a blocked or manual play with fresh budgets
gw retry acme/lookalikes-01 --from build    # restart from an earlier agent stage (after Gate A: build)
```

`--from` must be the current stage or an earlier agent stage, and can't undo an approved gate (reject at the gate instead). A stopped play resumes exactly where it was.

### Stop

```bash
gw stop acme/lookalikes-01 --comment "Client paused the project"
```

Takes the play off the active board. A running stage has to finish first. `gw retry` resumes it.

## Watch progress

```bash
gw status              # the board, every play × stage
gw status acme         # one client
gw status --json       # machine-readable
gw show acme/lookalikes-01
gw logs acme/lookalikes-01 -n 40
gw board               # full-screen board
```

`gw logs` prints the last events from `events.jsonl`:

```txt
22:22:08 publish   note            {"published":true,"version":1}
22:22:08 document  stage.started   {"attempt":1,"runner":"scripted"}
22:22:08 document  agent.tool      {"name":"Write","input":{"file_path":"deliverables"}}
22:22:08 document  stage.ended     {"outcome":"success","errors":[]}
22:22:08 document  status.changed  {"from":"running","to":"done"}
```

### The board

`gw board` opens a full-screen terminal board (`--plain` prints it once):

- **1 Plays:** a matrix of plays × stages, with wait times.
- **2 Inbox:** answer questions inline (`enter`); `d` accepts the default.
- **3 Gates:** `a` approves, `x` rejects with a comment.
- **Detail tabs** for the selected play (`h`/`l` or `tab`): Spec, Plan, **Graph** (the workflow drawn in box characters), **Contract** (each assertion with its verdict), Log and Cost.
- **Other keys:** `j`/`k` move, `r` retries a blocked or manual play, `n` drops in a new idea, `q` quits.

`gw watch <client>/<play>` renders one play live; `--drive` also runs its engine. That's what the Herdr viewer pane runs.

## Export results

Plays that end in a `[GREENWARE] result` node (every play on a workspace without Audiences) export their results to CSV:

```bash
gw export acme/lookalikes-csv                       # → deliverables/results.csv
gw export acme/lookalikes-csv --status completed    # only completed runs
```

A play that writes its results elsewhere (an audience, a CRM) says so and points at `deliverables/README.md`.
