# Release

URL: /workflows/processes/release · Id: `process:release`

> Release takes each reviewed Change to all traffic in stages, with automatic revert.

Release takes each reviewed [Change](/business/nouns/change) to all traffic in stages, with automatic revert.

## Outcome
| Part | This Process |
| --- | --- |
| Outcome | Each Change that passes its verdict reaches every user in stages, and a guardrail breach reverts it automatically. |
| Reads | [Change](/business/nouns/change) |
| Leaves | [Version](/business/nouns/version) |
| Runs in | Each Startup |

## Accountable
[Engineering Lead](/agents/engineering/engineering-lead), [Engineering Team](/agents/engineering).

## Workflows
| Workflow | Runs | Team |
| --- | --- | --- |
| [Release a change](/workflows/processes/release/release-change) | on [`Change.reviewed`](/business/events/Change.reviewed) | [Engineering Team](/agents/engineering) |

## Who does each step

| Workflow | Step | Role | Calls | Approval |
| --- | --- | --- | --- | --- |
| [Release a change](/workflows/processes/release/release-change) | 1. Read the Change’s verdict. | [Engineering Lead](/agents/engineering/engineering-lead) |  |  |
| [Release a change](/workflows/processes/release/release-change) | 2. Merge the Change into a new Version. | [Engineering Lead](/agents/engineering/engineering-lead) | [Change.merge](/business/nouns/change/merge) | Within a Mandate |
| [Release a change](/workflows/processes/release/release-change) | 3. Deploy the Version to 1%, 10%, 50%, then all traffic. | [Engineering Lead](/agents/engineering/engineering-lead) | [Version.deploy](/business/nouns/version/deploy) | Asks first |
| [Release a change](/workflows/processes/release/release-change) | 4. Revert automatically when a guardrail Metric drops. | [Reliability Engineer](/agents/engineering/reliability-engineer) | [Change.revert](/business/nouns/change/revert) | None |
| [Release a change](/workflows/processes/release/release-change) | 5. Write the changelog entry from the Change’s description. | [Content Lead](/agents/marketing/content-lead) | [Content.create](/business/nouns/content/create) | Within a Mandate |

## Events
| Direction | When | What happens |
| --- | --- | --- |
| In | On [`Change.reviewed`](/business/events/Change.reviewed) | Starts [Release a change](/workflows/processes/release/release-change) |
| Out | [`Change.merged`](/business/events/Change.merged) | Raised by step 2 of [Release a change](/workflows/processes/release/release-change) |
| Out | [`Version.deployed`](/business/events/Version.deployed) | Raised by step 3 of [Release a change](/workflows/processes/release/release-change) |
| Out | [`Change.reverted`](/business/events/Change.reverted) | Raised by step 4 of [Release a change](/workflows/processes/release/release-change) |
| Out | `Content.created` | Raised by step 5 of [Release a change](/workflows/processes/release/release-change) |

## Plays
No Play names this Process.

## Controls
- [Vulnerability management](/systems/trust-and-governance/controls/vulnerability-management)
- [Deploy reconciliation](/systems/trust-and-governance/controls/deploy-reconciliation)
- [Change approval](/systems/trust-and-governance/controls/change-approval)
- [Environment separation](/systems/trust-and-governance/controls/environment-separation)

## Settings
| Setting | Type | Default | Say | Set with |
| --- | --- | --- | --- | --- |
| `release.stages` | `string` | `1,10,50,100` | Roll out each release to 1%, 10%, 50%, then everyone | [Setting.update](/business/nouns/setting/update) |

## Failure
A failed step retries; when retries run out, the Action goes to the [Engineering Lead](/agents/engineering/engineering-lead).

| Step | On failure |
| --- | --- |
| [Release a change](/workflows/processes/release/release-change) 1. Read the Change’s verdict. | `failed`: The verdict is fail, so the Change returns to its author and nothing merges. |

## Loop
No loop: the path is never randomized, because it serves [Revert by query](/systems/trust-and-governance/controls/revert-by-query).

## Code

**Ask**

```text
Turn on release
```

**API**

```bash
curl -X POST https://api.sb/leaseline.app/processes/process_1/enable \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

**SDK**

```ts
import { $ } from 'startup-builder'

await $.Process.enable({ process: 'process_1' })
```

**CLI**

```bash
npx startup-builder do Process.enable --json '{"process":"process_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Process.enable({ process: 'process_1' })"
  }
}
```

## Enable
On by default for every Product Template. [Process.pause](/business/nouns/process/pause) stops new Actions; Actions in progress finish.

**Ask**

```text
Roll out each release to 1%, 10%, 50%, then everyone
```

**API**

```bash
curl -X PATCH https://api.sb/leaseline.app/settings/setting_1 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"1,10,50,100","key":"release.stages"}'
```

**SDK**

```ts
import { $ } from 'startup-builder'

await $.Setting.update({ id: 'setting_1', value: '1,10,50,100', key: 'release.stages' })
```

**CLI**

```bash
npx startup-builder do Setting.update --json '{"id":"setting_1","value":"1,10,50,100","key":"release.stages"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Setting.update({ id: 'setting_1', value: '1,10,50,100', key: 'release.stages' })"
  }
}
```

## Example
A Change to a lesson-booking app passes its verdict and merges as [Version](/business/nouns/version) 12. It reaches 1% of traffic, then 10%. When the error rate rises at 10%, it reverts on its own and the [Engineering Lead](/agents/engineering/engineering-lead) gets an [Issue](/business/nouns/issue).