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

# Shape your simulation

> Change what is mocked, the mock environment, scenarios, evals, the run or the fix plan by saying so in chat.

You change anything in the simulation by saying what you want in chat. The plugin works out which stage your change belongs to, makes it, and redoes what the change affects, then updates the same report. You don't need to know which command to run.

## Say it in chat

At any point during `/simulate`, mid-run or after it finishes, describe the change:

| You want to change | For example | What redoes |
| - | - | - |
| The mocking map: what is mocked or live | "Run `lookup_invoice` for real." | The scan, then everything after it. |
| How the mocked world behaves | "`get_order` should return a `shipped_at` date." | The mock environment is edited in place; stale results are redone. |
| Scenarios or personas | "Add impatient users who switch topics mid-conversation." | The suite, then everything after it. |
| One eval | "The tone eval is too strict about apologies." | The eval is edited; the last run is re-scored. |
| A scenario's ground truth | "Scenario 3's expected refund amount should be \$40." | The ground truth is corrected; the last run is re-scored. |
| The run | "Run it again." | The run, then the fix plan. |
| The fix plan | "Redo the fix plan for the timeout failures only." | The fix plan. |

Edits to the mock environment, an eval or a scenario's ground truth redo only what the change made stale. Often that means re-scoring the existing run rather than running it again.

Anything else, such as "looks good" or a side question, is answered and the run carries on. Press Esc to pause; your next message stops the run, resumes it, or is taken as a change. To skip production traces for this run, say "skip the traces".

When `/simulate` finishes, it lists each decision it made for you, with how to reverse it, for example: "No fix was applied to your agent; say which fixes from the plan to apply."

Outside `/simulate`, the same requests work in chat, and these commands are available directly.

## Improve the suite's quality

```bash theme={null}
/analyze-simulation
```

`/simulation-generate-suite` already runs this quality check. Run it yourself after a run when you want the suite checked again. A fresh, independent reviewer examines the scenarios, the harness, the logical coherence of the setup and the evals (plus the knowledge corpus and memory checks when your agent has them), and reports the main root causes. The plugin fixes the suite-side causes and runs a new reviewer each pass until one comes back clean.

It may edit your input files (`simulation_prd.md`, `scenario_variables.yaml`, `eval_intent.yaml`) to say what you mean more clearly, and it tells you what changed and why. Like the suite build, it asks before it changes your harness files.

The report lists what it needs from you, the agent bugs the suite caught (fix those with `/simulation-fixes`), and what still limits the result, then a suite status: **validated**, **qualified** or **not yet qualified**.

## Steer which scenarios get generated

```bash theme={null}
/refine-scenarios
```

Describe the scenario mix you want, for example: "a balanced mix of clean valid invoices AND defective ones routed to review; add multi-currency invoices". The plugin shows what changed in the scenario plan: reweighted flows, new flows (marked ★) and labels it didn't recognize. Refine with "also…", "less of…" or "drop…"; it keeps the context between turns. "Drop" lowers a flow's weight rather than removing it.

When you approve, it asks how many scenarios to generate and generates them. The new set replaces the old one, which moves to `artifacts/history/`, and runs of the old set are marked stale.

> [!NOTE]
>
> The generated scenarios can differ slightly from the preview you approved.

## Edit the mock environment

```bash theme={null}
/edit-env
```

Use this to change a mocked tool's return shape, the seeded world state, or a status code. It also fixes a wrong or stale fact in a [knowledge corpus](https://docs.plurai.ai/guides/knowledge-base.md). The plugin opens an editing session: describe the change, and after each turn it shows what was patched and a check line such as "checked: 2 already failing before this edit, 0 regressed". Keep going until you're satisfied.

When you finish, the mock environment is checked and redeployed at the same URL (a corpus edit needs no redeploy). The summary says what each tool now does and names any scenarios that need regenerating. It requires a mock environment; build one with `/simulation-generate-suite`.

## Edit an eval

Say it in chat, for example "make the escalation eval also require a ticket number". The plugin edits the eval on the Plurai backend, refreshes your local `policies_config.yaml` and re-scores the last run without running it again.

Don't edit `policies_config.yaml` by hand: it is a read-only copy, and the run scores the backend's eval set. The plugin won't loosen an eval just so a scenario passes; it fixes the scenario's grounding instead.

## Correct a scenario's ground truth

Say it in chat, and cite where the right answer comes from, such as a document or a record. "The agent answered differently in the run" is not a source. The plugin corrects one field at a time (the expected answer, its evidence, the scenario's target, or a deterministic check) in the same scenario set, and re-scores in minutes.

You can't change a scenario's persona, opening line or seeded world this way. Regenerate the suite or use `/refine-scenarios`. Changes to deterministic checks take effect on the next run.

## Next steps

> [card] [Save and switch environments](https://docs.plurai.ai/guides/environments.md)
>
> Save the result as a named environment.

> [card] [Build the suite](https://docs.plurai.ai/guides/build-the-suite.md)
>
> Rebuild the suite from scratch.

> [card] [Fix and keep regressions](https://docs.plurai.ai/guides/fix-and-keep-regressions.md)
>
> Fix your agent, not the suite.

> [card] [Commands](https://docs.plurai.ai/reference/commands.md)
>
> Every command and its arguments.


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