> ## Documentation Index
> Fetch the complete documentation index at: https://docs.signalmd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build

> Draft a fix, test it against your calls, compare the results and publish it to Retell from one page, with a way back.

Build is where fixes to your agent live, under **Fix** in the sidebar. It lists your drafts with their test results, shows a draft's full diff, lets you edit the text by hand, runs tests, and publishes or rolls back a change. Your open issues sit beside the drafts with a **Draft a fix** button. The [copilot](/copilot/overview) panel and Build share the same drafts.

## The loop

<Steps>
  <Step title="Pick an issue">
    Under **Open issues**, choose the one you want to fix.
  </Step>

  <Step title="Draft a change">
    Click **Draft a fix** and the copilot reads the issue and its calls, then writes the change. Or write it yourself with **New draft**. A draft is text only, and nothing reaches Retell.
  </Step>

  <Step title="Test it against calls">
    Run a **Quick check** for a fast, approximate read, and **Run tests** for Retell's own simulation on a copy of your agent.
  </Step>

  <Step title="Compare">
    Read the diff, the test results and the conversations behind them. A failing result does not block publishing, so the decision is yours.
  </Step>

  <Step title="Publish">
    An admin reviews the diff in the publish dialog and confirms. SignalMD then records the new version and compares production calls before and after.
  </Step>
</Steps>

## What a draft is

A draft is a change to the text of your live agent's prompts or flow: the general prompt, the begin message, the global prompt, step and state instructions, transition conditions and variable descriptions. It cannot change tools, URLs, ids, voice, settings, knowledge bases or the steps themselves. A fix that needs one of those is made in Retell.

Each draft is based on one version of your agent, shown as **From version 7** under the title. Nothing exists in Retell until it is published. A draft carries one status tag:

| Tag | Meaning |
| - | - |
| **Draft** | Written, and no Retell tests are running on it |
| **Testing** | Retell tests are running on a copy of your agent. When the run ends the tag reads **Tested**, then returns to **Draft** with the result beside it |
| **Publishing** | A publish or rollback is under way. If SignalMD cannot read the outcome from Retell, it says to check the agent there |
| **Published v8** | Live. The number is the version Retell reported after publishing |
| **Discarded** | Set aside. It cannot be tested or published |
| **Stale** | Shown on an open draft when your live agent has changed since the draft was made |

## The Build page

The header has **Ask copilot** and **New draft**.

**Drafts** lists drafts for the selected agent, newest first, filtered by **Open**, **Published** and **Discarded**. Each row shows the title, the tag, the latest test result and the date. The result reads "Not tested", "Quick check 2 of 3 passed", "Retell 4 of 5 passed", "Tests running", "Tests waiting for approval" or "Tests did not run".

**Open issues** lists the eight issues SignalMD ranks highest, with a link to **All issues**. **Draft a fix** on a row asks the copilot for a fix. An issue whose cause is not established is listed last with **Investigate** instead: the copilot helps find the cause and proposes no change, and SignalMD refuses a draft written for it. Resolved issues, caller behaviour, count-only issues and issues that follow from another are left out.

## A draft's page

Click a row to open the draft. On an open draft the header has **Ask copilot**, **Quick check**, **Run tests**, **Publish** and a **Discard** icon. On a published draft it has **Roll back**.

* **Why.** The issue, the evidence and why the change should help.
* **Changes.** One block per changed text, with lines added and removed and words changed inside a line marked. **Edit** opens the editor.
* **Tests.** A row for **Retell simulation** (not run, a status, or "4 of 5 passed" with **View run**) and a row for **Quick check**, tagged **Approximate**.
* **Quick checks.** Every check on the draft, newest first. Open a conversation for each criterion's **Pass**, **Fail** or **Unclear** with a reason, what SignalMD's own checks **Found** with a quote and turn, and the **Transcript**.

When the live agent has changed, a notice says the draft cannot be published as it is, and **Redraft** asks the copilot to redo it against the live version.

## Test a draft

### Quick check

SignalMD plays both sides, a caller and your agent built from the draft's text, and scores each conversation against the test's criteria and SignalMD's own checks. It needs no Retell setup and takes minutes. A conversation passes only when every criterion is met, SignalMD's checks found nothing and it ran to its end.

Callers come from the tests made from the draft's issue. With none, SignalMD builds up to three from the issue's latest calls, using their real lines; a draft with no issue gets one typical caller from your brief. The newest five checks are kept. Each uses credits from your plan's balance, so a longer check, or one that does more lookups, uses more of them.

A quick check approximates Retell and never marks a draft verified. Text has no timing, shared components in a flow are not played, a tool with no recorded answer gets a neutral stand-in reply (marked in the transcript), and a long flow may be cut off before your change, which the result says.

### Run tests

**Run tests** plays your tests in Retell on a copy of the live agent with the draft applied. The copy appears in your Retell workspace with a name that starts with "\[Signal shadow]", and your live agent is not touched.

It needs testing turned on for the agent, with a **Retell write key** and a **Monthly test budget (USD)**: open **Runs**, then **Settings**, then the **Testing** panel. It runs the tests made from the draft's issue, or else your guard tests. With neither, it refuses and tells you to choose tests or run a quick check. A run can wait for approval. See [Test a fix](/guides/test-a-fix).

## Edit a draft by hand

**New draft** opens a blank editor, and **Edit** reopens a draft's changed texts. Give the draft a **Title** and a **Why**, then choose texts from **Pick a text to change**; **Revert** puts back the live text. **Create draft** or **Save** stays disabled until there is a title and a change.

Saving follows the same rules as the copilot, so a change to a tool, URL or id is refused. It also sets the draft back to **Draft** and drops its Retell result, because that run tested earlier text; a test counts toward publishing only when it ran on the exact text you publish. A published or discarded draft cannot be edited.

## Publish

Only an admin of your workspace can publish. Click **Publish** on the draft page or on the copilot's draft card. The dialog is titled "Publish to" with your agent's name, and shows the latest **Retell simulation** and **Quick check** results and the whole diff. Keyboard focus starts on **Cancel**. Confirming sends the diff you reviewed, and SignalMD refuses if the draft changed after the dialog showed it.

<Warning>
  Publishing changes your live agent for the next caller. Read the diff and any failed conversations first.
</Warning>

SignalMD reads the live agent, checks it still matches what the draft was based on, writes the draft's text to the agent's flow or prompt with the Retell write key, publishes the agent, and reads it back for its new version number.

**Publish** is grey, with the reason in a tooltip, when:

| Reason | What to do |
| - | - |
| Test this draft first | Run a quick check or **Run tests** on the current text. A failing result does not block |
| The Retell tests on this draft are still running | Wait for the run to finish, or run a quick check |
| The live agent changed since this draft was made | Choose **Redraft**. SignalMD compares content, so a version bump with no change does not count |
| Publishing writes with the agent's Retell test key | Turn on testing and store a write key under **Testing** |
| This draft changes nothing | Edit the draft, or discard it |
| Only an admin of this organization can change the live agent | Ask an admin to publish it |
| The demo agent is read-only | Connect your own agent |

An edit made in Retell after the draft is never overwritten. The **Stale** tag appears once SignalMD has read the new version, which can take up to 10 minutes, but publishing checks the live agent itself and refuses even before the tag shows.

<Accordion title="If Retell refuses to publish">
  SignalMD writes the text first and publishes second. If Retell refuses the publish, SignalMD writes the old text back, and the error says whether that worked. If it did not, your agent's flow or prompt in Retell holds the draft's text unpublished, and you check it in Retell.
</Accordion>

## Discard and roll back

* **Before publishing, discard.** The **Discard** icon opens "Discard this draft?" and moves the draft to **Discarded**. To undo only part of a draft, use **Revert** in the editor.
* **After publishing, roll back.** Only an admin can roll back. **Roll back** opens a dialog with your agent's name and **Changes to undo**, writes the earlier text back and publishes it, so Retell shows it as a new version. The draft returns to **Draft** and can be published again. A published draft cannot be discarded.

Rolling back is refused when the agent changed in Retell after the publish, because it would overwrite that change. In that case, go back through Retell's own version history.

## After you publish

SignalMD checks Retell for the new version at once, records what changed, and starts comparing production calls on it with the version before. Release tests, if set up, start when your budget covers them. Build does not show the comparison: open **Agent config** for the change and its effect, and the issue's **By version** for the problem you targeted. See [Compare versions](/guides/compare-versions).

## Next steps

<CardGroup cols={2}>
  <Card title="Compare versions" icon="code-compare" href="/guides/compare-versions">
    Check whether the published change helped.
  </Card>

  <Card title="Versions" icon="layers" href="/concepts/versions">
    What a version is and how to read a comparison.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.