# Plays

URL: /code/file-conventions/plays · Id: `page:code/file-conventions/plays`

> A file in plays/ is one Play, a named strategy with the Process that runs it, the Metric it moves and its budget.

A file in `plays/` is one [Play](/business/nouns/play): a named, repeatable strategy with the [Process](/business/nouns/process) that runs it, the [Metric](/business/nouns/metric) it moves and its budget.

```text
plays/
└── manager-referrals.mdx
```

## Reference
MDX, frontmatter only.

| Key | Type | Holds |
| --- | --- | --- |
| `family` | string | The kind of Play, such as `demand` |
| `process` | Process id | The Process in `workflows/` that runs it |
| `metric` | Metric id | What it moves |
| `budget` | `{ amount, currency, per }` | What it may spend |
| `cohort` | string | Who it targets |

## Examples
### Minimal
```mdx title="plays/manager-referrals.mdx"
---
family: demand
process: referrals
---
```

### Leaseline
```mdx title="plays/manager-referrals.mdx"
---
family: demand
process: referrals
metric: customers.new
budget: { amount: 500, currency: USD, per: month }
cohort: managers with 20 to 200 units
---
```

## What it builds
The [SalesBuilder](/code/builders/sales) compiles a demand Play; the [StartupBuilder](/code/builders/startup) compiles the rest. `Play.apply` starts it.

- a `Play` and an [Experiment](/business/nouns/experiment) per rollout
- every write tagged with the Play id, so a rollback reverts them together
- the [Event](/business/nouns/event) `Play.applied`

## Good to know
- A Play that loses its Experiment goes dormant with its writes reverted.