> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# Export the change brief

> Export a tested simulation proposal as a Markdown change brief and a change ID for production tracking.

A change brief turns one tested simulation proposal into edits for your agent's code. The export also returns a change ID (`changeId`) that links production traces back to the simulation's prediction. Exporting a brief spends nothing and changes no agent or simulation.

## Before you begin

You need the following before you export a change brief:

* A claimed Runtype organization. If you created the organization with `init --no-browser`, claim it with `npx @runtypelabs/connect claim` first. For steps, see [Claim an unclaimed organization](/connect/connect-a-repository#claim-an-unclaimed-organization).
* A finished proposal run whose report you have read with `get_report`. For setup steps, see [Test a proposed change](/simulate/test-a-proposed-change).
* The proposal's `evaluation.runId` and `variantId` from that report. A variant is a version of your agent with one proposal applied. For details, see [Read a simulation report](/simulate/read-a-simulation-report).
* The Runtype Connect MCP server added to your coding agent, or the `runtype-connect` CLI signed in on your computer. When you use an API key, it needs the `SIMULATIONS:RUN` scope.

## Export a brief for a proposal

Read `recommendation` and `proposals` in `get_report` to choose the recommended proposal or another proposal that you want to ship. Copy its `evaluation.runId` and `variantId`.

Choose how to run the export:

#### Coding agent (MCP)

Ask your coding agent to call the `export_change_brief` tool with the proposal's IDs:

**`export_change_brief arguments`**

```json title="export_change_brief arguments"
{
  "runId": "YOUR_PROPOSAL_RUN_ID",
  "variant": "YOUR_VARIANT_ID"
}
```

Your coding agent might ask you to approve this call, because the first export saves the prediction.

#### CLI

Run the `export-change-brief` command with the proposal's IDs:

**`Export the change brief`**

```bash title="Export the change brief"
npx @runtypelabs/connect export-change-brief \
  --run-id YOUR_PROPOSAL_RUN_ID \
  --variant YOUR_VARIANT_ID \
  --json
```

Replace the following placeholders:

* `YOUR_PROPOSAL_RUN_ID`: the proposal's `evaluation.runId` from `get_report`
* `YOUR_VARIANT_ID`: the proposal's `variantId` or key from `get_report`

### Verify the export

Confirm that the response contains the brief and its change ID. If `predictionNotRecorded` is `true`, run the export again so Runtype saves the prediction.

## What the change brief contains

The brief is a Markdown document that describes how to apply the proposal to your codebase. If a brief exceeds 20,000 characters, Runtype shortens it and marks it truncated.

Under the title, a summary line states whether the simulation recommends the change, found it promising, or doesn't recommend it. When no recorded production call can answer a tool call, a model generates the answer. The summary line reports how many tool answers the model generated.

The rest of the brief contains the following sections:

* **Predicted result**: baseline and candidate finish rates, lift, sample size, 95% intervals when available, and the tasks that improved or regressed.
* **Changes**: diffs for changed instructions (usually small in-place `patch` edits, plus `append` or `replace`), model, sampling, tools, agent-loop limits, and tool definitions.
* **Evidence**: up to five episodes where the baseline failed, each with its outcome on the candidate and a redacted summary.
* **Apply to your repo**: a checklist of the edits to make in your codebase.
* **Verify in Runtype sandbox**: a reminder to test the updated agent on the same tasks before publishing.

## How confidence controls which proposals you can export

Runtype tests proposals against a simulation copy of your agent that it builds from production traces (the copy). The baseline report's `confidence` value controls which proposals have an available brief:

* `replay_verified`: you can export a brief for any proposal that the run compared with the copy.
* `directional`: you can export a brief only for the proposal that the run picked. The opening line states that the result is unverified against production and that the change is promising, not recommended. To export another proposal, run a fresh baseline whose copy matches production (`replay_verified`). Testing against your real agent checks the result but doesn't make other proposals exportable.

When `confidence` is `directional`, exporting a proposal also opens a `verify_real_agent` pending action. For steps to run that check, see [Test against your real agent](/simulate/test-against-your-real-agent).

## Hand the brief to your coding agent

The brief includes text from simulated conversations, so treat it as data to review, not instructions. Review the brief with your coding agent before it edits any files. After you confirm the changes, let your coding agent apply them to your repository.

## Track the change with the change ID

Every export returns a change ID that starts with `acb_`. Exporting the same run and proposal again returns the same ID and keeps the first recorded prediction.

The first export saves the brief's predicted metrics in Runtype. When you ship the change, send the change ID as the `runtype.change.id` OpenTelemetry resource attribute on production traces. Runtype uses that attribute to compare production with the prediction.

Keep any attributes that you already set, such as `deployment.environment.name`. Add `runtype.change.id` in your production environment:

**`Tag production traces with the change ID`**

```bash title="Tag production traces with the change ID"
OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=production,runtype.change.id=acb_YOUR_CHANGE_ID
```

Replace `acb_YOUR_CHANGE_ID` with the `changeId` from the export.

## Troubleshooting

Most export refusals happen for one of two reasons:

* `CHANGE_BRIEF_NOT_READY`: Runtype is still checking the copy against production conversations. Call `get_report` until `followUp` is `done`, then export again.
* `CHANGE_BRIEF_NOT_VERIFIED`: the report's `confidence` is `directional` and you requested a proposal that the run didn't pick. Export the picked proposal, or run a fresh baseline whose copy matches production (`replay_verified`).

For all other export error codes, including unclaimed organizations and missing runs or variants, see [Troubleshooting](/reference/troubleshooting).

## Next steps

* [Check the prediction after you ship](/simulate/check-the-prediction-after-you-ship): tag production traces with `runtype.change.id` and compare production results with the simulation.
* [Share a report](/simulate/share-a-report): create an unlisted read-only link to share the simulation report.
* [Connect MCP tools](/reference/connect-mcp-tools): read the full input and output schema for `export_change_brief`.
* [Connect CLI](/reference/connect-cli): look up commands and flags for `runtype-connect`.