---
title: "simulate"
description: "Run what-if scenarios"
canonical: "https://acs.synapti.ai/capabilities/simulate/"
last_updated: "2026-11-16T01:14:10Z"
---

# simulate

Run what-if scenarios

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/simulate/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/simulate/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [MODEL](https://acs.synapti.ai/layers/model/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | No |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

In a workflow, state, where the workflow has it, must come first (V102).

## Relationships

**Figure: Relationships of simulate: 2 relationships with 2 capabilities.** simulate has 2 relationships with 2 capabilities: 2 with edges into it.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`state`](https://acs.synapti.ai/capabilities/state/index.md) | Edges into simulate | `precedes` (into) |
| [`transition`](https://acs.synapti.ai/capabilities/transition/index.md) | Edges into simulate | `enables` (into) |

- `enables`: Unlocked by [`transition`](https://acs.synapti.ai/capabilities/transition/index.md)
- `precedes`: Comes after, when both are present [`state`](https://acs.synapti.ai/capabilities/state/index.md)

## Contract

**Figure: Contract of simulate: 3 inputs (1 required), 7 outputs.** simulate takes 3 inputs, 1 required (filled pin) and 2 optional (hollow pin), and returns 7 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scenario` | object | Yes | Scenario to simulate |
| `initial_state` | object | No | Starting state |
| `steps` | integer | No | Simulation steps |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `outcomes` | array | Yes | Simulation results |
| `trajectory` | array | No | State trajectory |
| `final_state` | object | No | End state |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | Yes | The producer's probability that the output's claim is correct, self-reported unless the host documents a calibration (Standard v1.2 §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 7 fields: 5 are in simulate's output contract (3 required) and 2 are the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `outcomes` | Yes, required |
| `trajectory` | Yes, optional |
| `final_state` | Yes, optional |
| `insights` | No, the skill's own |
| `simulation_meta` | No, the skill's own |
| `confidence` | Yes, required |
| `evidence_anchors` | Yes, required |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: simulate in workflows.** 2 workflows use simulate, in 2 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`world_model_build`](https://acs.synapti.ai/workflows/world-model-build/index.md): step 12
- [`anomaly_investigation`](https://acs.synapti.ai/workflows/anomaly-investigation/index.md): step 8

## Claude Code skill

**Figure: What the simulate skill's tools can do, against the ontology.** The skill may use 3 tools: 2 only read and 1 run commands; the ontology marks simulate as read-only, so Bash is more than the capability needs.

| What they can do | Tools |
| --- | --- |
| Only read | `Read`, `Grep` |
| Run commands, which can change state | `Bash` |
| Change files | none |

**Figure: The field names each step of the simulate procedure uses.** 5 of the procedure's 6 steps use the name of an input or output field of the simulate skill as a word; 6 output fields of 7 are used by no step (trajectory, final_state, insights, simulation_meta, confidence, evidence_anchors).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Set up scenario | `scenario` |  |
| 2. Initialize state | `initial_state` |  |
| 3. Execute simulation | `scenario` |  |
| 4. Explore branches |  | `outcomes` |
| 5. Evaluate outcomes |  | `outcomes` |
| 6. Document simulation |  |  |

Both examples of the skill write out every one of its 7 output fields.

**Figure: The neighbours the skill lists for simulate, checked against the ontology and the catalogs.** The skill lists 6 capabilities as common neighbours of simulate; 2 of them have an edge with it in the ontology, and 1 runs next to it, in that order, in a catalog workflow (plan most often, 1 time). Under each tile, an edge reads from its source to its target, with simulate's symbol in its place: "requires Sm" is a requires edge from the tile's capability to simulate, so the tile's capability must run before simulate; "Sm precedes" is a precedes edge from simulate to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`state`](https://acs.synapti.ai/capabilities/state/index.md) | `precedes` | never |
| commonly follows | [`transition`](https://acs.synapti.ai/capabilities/transition/index.md) | `enables` | never |
| commonly follows | [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | none | never |
| commonly precedes | [`compare`](https://acs.synapti.ai/capabilities/compare/index.md) | none | never |
| commonly precedes | [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | none | 1 times |
| commonly precedes | [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | none | never |

### Intent

Execute mental simulations of scenarios to explore outcomes without making real changes. This capability enables safe exploration of "what-if" questions and helps identify risks before action.

**Success criteria:**
- Scenario executed through logical steps
- Multiple outcomes considered
- Key decision points identified
- Assumptions made explicit

**Compatible schemas:**
- `schemas/output_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `scenario` | Yes | object | Scenario to simulate (intervention, change, event) |
| `initial_state` | No | object | Starting state for simulation |
| `steps` | No | integer | Number of simulation steps/iterations |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Set up scenario**: Define what is being simulated
   - Clarify the intervention or change being tested
   - Establish initial conditions
   - Define simulation boundaries

2) **Initialize state**: Establish starting point
   - Use provided initial_state or current system state
   - Validate state is consistent
   - Note any simplifications

3) **Execute simulation**: Step through scenario
   - Apply changes specified in scenario
   - Propagate effects through state
   - Track state at each step

4) **Explore branches**: Consider alternative paths
   - Identify decision points
   - Explore likely alternative outcomes
   - Note probability of each branch

5) **Evaluate outcomes**: Assess simulation results
   - Compare final states across branches
   - Identify risks and opportunities
   - Note unexpected behaviors

6) **Document simulation**: Record process and results
   - List assumptions made
   - Note limitations of simulation
   - Provide evidence for conclusions

### Output Contract

Return a structured object:

```yaml
outcomes:
  - branch_id: string  # Unique branch identifier
    probability: number  # Estimated likelihood
    final_state: object  # State after simulation
    key_events: array[string]  # Notable events during simulation
    risks: array[string]  # Identified risks
trajectory:
  - step: number
    state: object  # State at this step
    changes: array[string]  # What changed
final_state: object  # Most likely final state
insights:
  - type: string  # risk, opportunity, surprise
    description: string
    severity: string  # low, medium, high
simulation_meta:
  steps_executed: number
  branches_explored: number
  assumptions: array[string]
confidence: number  # probability that the simulated outcome is what would happen (§4.1.1)
evidence_anchors: [{ref: "model:component", kind: record}, {ref: "assumption:id", kind: record}]
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `outcomes` | array | Possible outcomes with probabilities |
| `trajectory` | array | State changes over simulation |
| `final_state` | object | Most likely end state |
| `insights` | array | Risks, opportunities, and surprises found |
| `simulation_meta` | object | Simulation parameters and assumptions |
| `confidence` | number | Probability, 0.0-1.0, that the simulated outcome is what would happen (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | References to the model components and assumptions used |

### Examples

#### Example 1: Simulate Dependency Upgrade

**Input:**
```yaml
scenario:
  type: "dependency_upgrade"
  change: "Upgrade Rails from 6.1 to 7.0"
initial_state:
  rails_version: "6.1.7"
  ruby_version: "3.1.0"
  gems_count: 85
steps: 5
```

**Output:**
```yaml
outcomes:
  - branch_id: "success_path"
    probability: 0.60
    final_state:
      rails_version: "7.0.8"
      breaking_changes_resolved: true
      tests_passing: true
    key_events:
      - "ActiveStorage API changes detected"
      - "Zeitwerk autoloading adjustments needed"
      - "Deprecation warnings resolved"
    risks:
      - "Minor performance regression in asset pipeline"
  - branch_id: "partial_failure"
    probability: 0.30
    final_state:
      rails_version: "7.0.8"
      breaking_changes_resolved: true
      tests_passing: false
    key_events:
      - "ActiveRecord callback order changed"
      - "3 test failures in UserService"
    risks:
      - "Subtle behavior changes in model callbacks"
      - "Extended debugging time required"
  - branch_id: "blocked"
    probability: 0.10
    final_state:
      rails_version: "6.1.7"
      upgrade_blocked: true
    key_events:
      - "Incompatible gem: devise_token_auth requires Rails < 7"
    risks:
      - "Upgrade blocked until gem updated"
trajectory:
  - step: 1
    state: { phase: "analysis" }
    changes: ["Identified 12 deprecation warnings", "Found 3 incompatible gems"]
  - step: 2
    state: { phase: "gem_updates" }
    changes: ["Updated 8 gems", "1 gem requires replacement"]
  - step: 3
    state: { phase: "code_changes" }
    changes: ["Modified 15 files for API changes"]
  - step: 4
    state: { phase: "testing" }
    changes: ["Tests executed", "85% passing initially"]
  - step: 5
    state: { phase: "resolution" }
    changes: ["Fixed remaining issues"]
final_state:
  rails_version: "7.0.8"
  breaking_changes_resolved: true
  tests_passing: true
  effort_estimate: "2-3 days"
insights:
  - type: "risk"
    description: "devise_token_auth compatibility is the main blocker"
    severity: "high"
  - type: "opportunity"
    description: "Rails 7 Hotwire enables simpler frontend code"
    severity: "medium"
  - type: "surprise"
    description: "More callback order dependencies than expected"
    severity: "medium"
simulation_meta:
  steps_executed: 5
  branches_explored: 3
  assumptions:
    - "Test suite provides good coverage"
    - "No undocumented monkey patches"
    - "CI environment matches production"
confidence: 0.75
evidence_anchors:
  - {ref: "file:Gemfile:dependencies", kind: file}
  - {ref: "rails upgrade guide:7.0", kind: x-doc}
  - {ref: "gem:devise_token_auth:compatibility", kind: x-doc}
```

#### Example 2: Simulate Failure Scenario

**Input:**
```yaml
scenario:
  type: "failure_injection"
  change: "Database becomes unavailable for 5 minutes"
initial_state:
  database: "available"
  cache: "warm"
  queue_depth: 0
steps: 10
```

**Output:**
```yaml
outcomes:
  - branch_id: "graceful_degradation"
    probability: 0.40
    final_state:
      service_status: "degraded"
      data_loss: false
      user_impact: "read_only_mode"
    key_events:
      - "Circuit breaker activates at t+30s"
      - "Cache serves stale reads"
      - "Writes queued for retry"
    risks:
      - "Cache expires during outage"
  - branch_id: "cascade_failure"
    probability: 0.35
    final_state:
      service_status: "down"
      data_loss: false
      user_impact: "complete_outage"
    key_events:
      - "Connection pool exhausted at t+60s"
      - "Health checks fail"
      - "Load balancer removes all instances"
    risks:
      - "Recovery requires manual intervention"
  - branch_id: "data_inconsistency"
    probability: 0.25
    final_state:
      service_status: "recovered"
      data_loss: "possible"
      user_impact: "partial_data_loss"
    key_events:
      - "In-flight transactions lost"
      - "Retry logic creates duplicates"
    risks:
      - "Data reconciliation needed"
trajectory:
  - step: 1
    state: { db: "available", errors: 0 }
    changes: []
  - step: 2
    state: { db: "unavailable", errors: "increasing" }
    changes: ["First connection timeout"]
  - step: 3
    state: { db: "unavailable", circuit: "open" }
    changes: ["Circuit breaker triggered"]
final_state:
  database: "available"
  service_status: "recovering"
  queue_depth: 1250
insights:
  - type: "risk"
    description: "No circuit breaker on write path"
    severity: "high"
  - type: "risk"
    description: "Connection pool timeout too long (30s)"
    severity: "medium"
  - type: "opportunity"
    description: "Add read replica failover"
    severity: "medium"
simulation_meta:
  steps_executed: 10
  branches_explored: 3
  assumptions:
    - "Database failure is total, not partial"
    - "No manual intervention during outage"
    - "Cache TTL is 5 minutes"
confidence: 0.65
evidence_anchors:
  - {ref: "file:config/database.yml:pool_settings", kind: file}
  - {ref: "file:app/services/circuit_breaker.rb", kind: file}
  - {ref: "architecture:failure_modes", kind: x-doc}
```

### Verification

- [ ] Scenario clearly defined
- [ ] At least one outcome path explored
- [ ] Probabilities assigned to outcomes
- [ ] Key assumptions documented
- [ ] Insights identify actionable findings

**Verification tools:** Read (to verify model components)

### Safety Constraints

- `mutation`: false
- `requires_checkpoint`: false
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- Simulation does not modify real state
- Note when model may be incomplete
- Flag high-uncertainty outcomes
- Do not present simulation as prediction

### Composition Patterns

**Commonly follows:**
- `state` - State model provides simulation basis
- `transition` - Transition rules drive simulation
- `plan` - Simulate plan outcomes before execution

**Commonly precedes:**
- `compare` - Compare simulation outcomes
- `plan` - Inform planning with simulation insights
- `critique` - Critique designs based on simulation

**Anti-patterns:**
- Never treat simulation as certainty (use `verify` for real testing)
- Avoid simulating without state/transition models

**Workflow references:**
- See `reference/workflow_catalog.yaml#world_model_build` for simulation in modeling
