# Workflow document

URL: /code/project-structure/workflow-document · Id: `convention:workflow-document`

> A Workflow document holds Workflows as prose with runnable TypeScript, each a Trigger and the durable body of the Action it starts.

A [Workflow](/business/nouns/workflow) document holds Workflows as prose with runnable TypeScript, each a [Trigger](/business/nouns/trigger) and the durable body of the [Action](/business/nouns/action) it starts.

| Property | Value |
| --- | --- |
| Path | `workflows/[process]/[workflow].mdx` |
| Holds | [Workflow](/business/nouns/workflow) |
| Kind | file |
| Leaders | db-first, git-first |
| Team | [Operations Team](/agents/operations) |
| Written by | None. |
| Compiled by | [StartupBuilder](/code/builders/startup) |

### Example
`workflows/close/open-on-activation.mdx` in a Startup repository. Closewise, a sample business, declares a `Close` Noun.

````mdx title="workflows/close/open-on-activation.mdx"
---
stakes: low
---
# Open the month when a client activates

A client who activates gets this month's Close.

```ts
on.Customer.activated(async (customer, $) => $.Close.create({ client: customer.$id, period: new Date().toISOString().slice(0, 7) }))
```
````

### Props
The frontmatter keys the file takes. The body is its prose.

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `stakes` | `string` | No | How much an Action can cost if it goes wrong: `low`, `medium` or `high`. |
| `metric` | [Metric](/business/nouns/metric) | No | The Metric it moves. |
| `settings` | `json` | No | The Settings it reads. |

### Generates
[StartupBuilder](/code/builders/startup) compiles it into these records, Verbs and routes.

| Kind | What |
| --- | --- |
| Records | [Workflow](/business/nouns/workflow), [Trigger](/business/nouns/trigger), [Action](/business/nouns/action) |
| Verbs | None. |
| Routes | None. |