---
title: "digital-twin-bootstrap"
description: "Initialize a digital twin from scratch, building a grounded world model with state, dynamics, uncertainty and provenance, then run a first sync loop."
canonical: "https://acs.synapti.ai/guides/skills/digital-twin-bootstrap/"
last_updated: "2026-11-16T01:14:10Z"
---

# digital-twin-bootstrap

Source: [skills/digital-twin-bootstrap/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/digital-twin-bootstrap/SKILL.md), commit 18c38b74ac21.

## Intent

Run the composed workflow **digital_twin_bootstrap** (`reference/workflow_catalog.yaml`) to initialize a digital twin from scratch and then run a first sync loop. When no world state is passed in, it invokes **world_model_build** to construct a grounded baseline and then **digital_twin_sync_loop** from that baseline; when a world state is passed in, it skips the build and syncs from it.

A world model captures:
- **State**: Current entity states and attributes
- **Dynamics**: How the system evolves over time
- **Uncertainty**: Confidence bounds and unknowns
- **Provenance**: Source and lineage of all facts

**Success criteria:**
- World model built (or the given world state used as the baseline)
- First sync completed
- Audit produced
- Every claim in the model is grounded with evidence anchors

**Compatible schemas:**
- `reference/world_state_schema.yaml`
- `reference/event_schema.yaml`
- `reference/workflow_catalog.yaml`

## Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `user_input` | No | object | `domain` (the system to model), passed to both invoked workflows; `world_model_build` binds it. `constraints` is accepted but no step binds it |
| `world_state_out` | No | object | An existing world state (`reference/world_state_schema.yaml#/world_state`). When given, the build is skipped and the first sync starts from it |

## Procedure

**Figure: Steps of digital_twin_bootstrap: 3 steps.** Read top to bottom: no step changes state; and the highest step risk is medium, at steps 1, 2 and 3.

| # | Capability | Layer | Role | Gates | On failure | Reads from | Risk |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | `invoke` | COORDINATE |  |  |  |  | medium |
| 2 | `invoke` | COORDINATE |  |  |  | 1 | medium |
| 3 | `invoke` | COORDINATE |  |  |  |  | medium |

Each step's card is on the [`digital_twin_bootstrap`](https://acs.synapti.ai/workflows/digital-twin-bootstrap/index.md) page.

0) **Take a checkpoint** if mutation might occur (the sync loop mutates the twin): invoke `/checkpoint` with the scope the later steps change; its state-saving command is what the safety layer counts (STANDARD 1.2.0 §5.18.6). Each gated call needs its own.

1) **Invoke `/invoke`** with workflow `world_model_build` and input `user_input`, if `world_state_out` is null, and store output as `world_model_out`
   - Build the initial world model baseline. The invoked workflow's stores land in `world_model_out.result`:
     `retrieve_out` → `observe_out` → `detect_out` (domain: entity) → `classify_out` → `integrate_out` → `state_out` → `transition_out` → `attribute_out` (domain: causation) → `measure_out` (domain: uncertainty) → `audit_out` → `ground_out` → `simulate_out` → `explain_out`

2) **Invoke `/invoke`** with workflow `digital_twin_sync_loop`, if `world_state_out` is null, and store output as `sync_out`
   - Input: `user_input`, and the baseline world state (`world_model_out.result.state_out.state`) as `previous_world_state`
   - Run the initial sync loop using the baseline just built

3) **Invoke `/invoke`** with workflow `digital_twin_sync_loop`, if `world_state_out` is not null, and store output as `sync_existing_out`
   - Input: `user_input`, and `world_state_out` as `previous_world_state`: a world state, the same shape step 2 passes (the `state` step's output wraps the world state in its `state` field)
   - Run the initial sync loop from the world state passed in

Every step has `skip_if_false: true`, so exactly one branch runs: steps 1-2, or step 3.

## Output Contract

**Figure: Which step reads which stored output.** 1 step reads the output of earlier steps, 1 read in all; step 2 (invoke) reads the most, from 1 step.

- Step 2 reads from step 1.

Return a structured object:

```yaml
workflow_id: string  # Unique bootstrap execution ID
user_input: object  # The input as given
status: completed | partial | failed | rolled_back
steps:
  world_model_out:  # null when world_state_out was given and the step was skipped
    result:  # world_model_build's stores, keyed by store_as
      state_out:
        state: object  # The baseline world state
        entities: array[object]
        relationships: array[object]
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      transition_out:
        rules: array[object]
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      attribute_out:
        causes: array[object]
        strengths: object  # Causal strength per cause
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      measure_out:
        value: number
        uncertainty: object  # lower, upper
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      ground_out:
        grounded: boolean
        gaps: array[string]
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      simulate_out:
        outcomes: array[object]
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      explain_out:
        explanation: string
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
    steps_executed: array[string]  # store_as names of the steps that ran, in step order
    evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
  sync_out:  # null when world_state_out was given and the step was skipped
    result:  # digital_twin_sync_loop's stores, keyed by store_as
      state_out:
        state: object  # The synced twin snapshot
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      verify_out:
        passed: boolean
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      audit_out:
        audit_id: string
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
      explain_out:
        explanation: string
        evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
    steps_executed: array[string]  # store_as names of the steps that ran, in step order
    evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
  sync_existing_out:  # null when the baseline was built (steps 1-2 ran)
    result: object  # digital_twin_sync_loop's stores, as in sync_out
    steps_executed: array[string]  # store_as names of the steps that ran, in step order
    evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
confidence: number  # 0.0-1.0
evidence_anchors: array[EvidenceAnchor]  # each {ref, kind, digest?} (STANDARD v1.2 §6.5)
assumptions: array[string]
```

### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `workflow_id` | string | Unique identifier for this bootstrap |
| `status` | enum | Final workflow status |
| `steps` | object | Each step's output, keyed by its `store_as`; a skipped step is null |
| `steps.*.result` | object | The invoked workflow's stores, keyed by their `store_as` |
| `confidence` | number | 0.0-1.0 based on evidence completeness |
| `evidence_anchors` | array of evidence anchors (§6.5) | All evidence references collected |
| `assumptions` | array | Explicit assumptions made during modeling |

## Examples

### Example 1: Bootstrap a Supply Chain Twin

**Input:**
```yaml
user_input:
  domain: "electronics supply chain, Asia-Pacific"
world_state_out: null
```

**Output:**
```yaml
workflow_id: "bootstrap_20240115_100000_supplychain"
user_input:
  domain: "electronics supply chain, Asia-Pacific"
status: completed
steps:
  world_model_out:
    result:
      state_out:
        state:
          timestamp: "2024-01-15T10:00:00Z"
          entities: "[1247 entities - see state/supply_chain_world.yaml]"
        entities:
          - id: "supplier-taiwan-001"
            type: "supplier"
            location: "Hsinchu, Taiwan"
            lead_time_days: 45
          - id: "mfg-shenzhen-005"
            type: "manufacturer"
            location: "Shenzhen, China"
        relationships:
          - subject: "supplier-taiwan-001"
            predicate: "supplies_to"
            object: "mfg-shenzhen-005"
        evidence_anchors:
          - {ref: "tool:database:supply-chain-db/entities", kind: tool}
          - {ref: "tool:api:logistics.api/shipments", kind: tool}
      transition_out:
        rules:
          - trigger: "supplier shutdown"
            effect: "downstream inventory drawdown"
        evidence_anchors:
          - {ref: "tool:database:supply-chain-db/orders", kind: tool}
      attribute_out:
        causes:
          - id: single_source_taiwan
            cause: "Single-source dependency on Taiwan for 45% of semiconductor supply"
        strengths:
          single_source_taiwan: 0.8
        evidence_anchors:
          - {ref: "tool:database:supply-chain-db/suppliers", kind: tool}
      measure_out:
        value: 0.82  # overall confidence in the model
        uncertainty: {lower: 0.75, upper: 0.88}
        evidence_anchors:
          - {ref: "tool:api:logistics.api/shipments", kind: tool}
      ground_out:
        grounded: true
        gaps:
          - "Supplier capacity utilization (estimated from public data)"
          - "Shipping delays (historical average, not real-time)"
          - "Competitor orders affecting supplier allocation"
        evidence_anchors:
          - {ref: "file:state/supply_chain_world.yaml", kind: file}
      simulate_out:
        outcomes:
          - scenario: "Taiwan supplier shutdown"
            outcome: "67% production halt within 2 weeks"
          - scenario: "Shipping route disruption"
            outcome: "12-day average delay added"
        evidence_anchors:
          - {ref: "file:state/supply_chain_world.yaml", kind: file}
      explain_out:
        explanation: "Baseline covers 156 suppliers and 23 manufacturers; the largest risk is semiconductor source concentration"
        evidence_anchors:
          - {ref: "file:state/supply_chain_world.yaml", kind: file}
    steps_executed: [retrieve_out, observe_out, detect_out, classify_out, integrate_out, state_out, transition_out, attribute_out, measure_out, audit_out, ground_out, simulate_out, explain_out]
    evidence_anchors:
      - {ref: "file:state/supply_chain_world.yaml", kind: file}
  sync_out:
    result:
      state_out:
        state:
          timestamp: "2024-01-15T10:20:00Z"
          entities: "[1251 entities - 4 new shipments]"
        evidence_anchors:
          - {ref: "tool:api:logistics.api/shipments", kind: tool}
      verify_out:
        passed: true
        evidence_anchors:
          - {ref: "tool:bash:run_verification_suite", kind: tool}
      audit_out:
        audit_id: "audit_20240115_102000"
        evidence_anchors:
          - {ref: "file:.claude/audit/records.jsonl", kind: file}
      explain_out:
        explanation: "First sync ingested 4 shipments; lead-time drift on supplier-taiwan-001 was planned for, passed the policy check and was applied after a checkpoint; verification passed, so rollback was skipped"
        evidence_anchors:
          - {ref: "file:.claude/audit/records.jsonl", kind: file}
    steps_executed: [receive_out, search_out, transform_out, integrate_out, detect_entity_out, classify_out, state_out, compare_state_out, transition_out, detect_anomaly_out, measure_risk_out, predict_out, plan_out, constrain_out, checkpoint_out, mutate_out, execute_out, verify_out, audit_out, explain_out]  # rollback_out absent: skipped because verify_out.passed was true
    evidence_anchors:
      - {ref: "file:.claude/audit/records.jsonl", kind: file}
  sync_existing_out: null  # skipped: no world state was passed in
confidence: 0.82
evidence_anchors:
  - {ref: "tool:database:supply-chain-db", kind: tool}
  - {ref: "tool:api:logistics.api", kind: tool}
  - {ref: "file:state/supply_chain_world.yaml", kind: file}
  - {ref: "file:.claude/audit/records.jsonl", kind: file}
assumptions:
  - "Database reflects current operational state"
  - "API provides accurate shipment tracking"
  - "Public capacity data is within 20% of actual"
```

**Evidence pattern:** Multi-source data integration, entity resolution across databases, causal analysis from transaction patterns, uncertainty from data freshness and coverage, then a first verified and audited sync.

## Verification

- [ ] **One Branch Ran**: Either `world_model_out` and `sync_out` are set, or `sync_existing_out` is
- [ ] **Entity Coverage**: All entities in scope identified (`detect_out` → `classify_out` → `integrate_out`)
- [ ] **State Validity**: The baseline world state (`state_out.state`) conforms to the world state schema
- [ ] **Dynamics Defined**: `transition_out.rules` and `attribute_out.causes` documented
- [ ] **Uncertainty Quantified**: `measure_out.uncertainty` present
- [ ] **Grounded**: `ground_out.grounded` is true, gaps listed
- [ ] **Simulation Run**: `simulate_out.outcomes` has at least one scenario
- [ ] **First Sync Verified**: The sync's `verify_out.passed` is true, or its rollback ran
- [ ] **Audit Trail**: The sync's `audit_out` was recorded

**Verification tools:** Read (for state files), Bash (for simulation), Web (for API validation)

## Safety Constraints

**Figure: Risk of digital_twin_bootstrap: declared high; highest step risk medium, at step 1 (invoke).** The catalog declares high; the highest step risk is medium.

- Step 1 (`invoke`): medium
- Step 2 (`invoke`): medium
- Step 3 (`invoke`): medium

- `mutation`: true (the first sync may mutate the twin)
- `requires_checkpoint`: true
- `requires_approval`: true (for mutations in the sync loop)
- `risk`: high

**Capability-specific rules:**
- Do not modify source data during modeling
- Flag entities with confidence < threshold
- Document all assumptions explicitly
- Preserve raw data alongside derived state
- Validate schema conformance before the first sync
- Rate-limit API calls to respect source limits

## Composition Patterns

**Commonly follows:**
- `retrieve` - After gathering raw data
- `receive` - After ingesting real-time signals
- `observe` - After initial data quality assessment

**Commonly precedes:**
- `digital-twin-sync-loop` - Later sync iterations start from the bootstrapped twin
- `simulate` - To run what-if scenarios
- `predict` (domain: risk) - To predict future states
- `explain` - To generate executive reports

**Anti-patterns:**
- Never skip identity resolution (`detect` → `classify` → `integrate`) before state construction
- Never omit uncertainty modeling for production use
- Never finalize without grounding and audit
- Never run the first sync from an empty baseline

**Workflow references:**
- See `reference/workflow_catalog.yaml#digital_twin_bootstrap` for step definitions
- See `reference/workflow_catalog.yaml#world_model_build` for the baseline build
- See `reference/world_state_schema.yaml` for canonical state format
