From agent-capability-standard
Run the digital twin sync loop to synchronize real-world signals with a digital model. Use when updating digital twins, detecting drift, managing real-time state synchronization, or maintaining model-reality alignment.
npx claudepluginhub synaptiai/synapti-marketplace --plugin agent-capability-standardThis skill is limited to using the following tools:
Synchronize a **digital twin** with real-time signals and keep it **grounded, safe, and auditable**. This workflow maintains alignment between the real world and its digital representation.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Synchronize a digital twin with real-time signals and keep it grounded, safe, and auditable. This workflow maintains alignment between the real world and its digital representation.
This workflow is designed to model both real and digital systems using the canonical world-state schema:
reference/world_state_schema.yamlSuccess criteria:
Compatible schemas:
reference/world_state_schema.yamlreference/event_schema.yamlreference/workflow_catalog.yaml| Parameter | Required | Type | Description |
|---|---|---|---|
sources | Yes | array | Data sources to ingest (APIs, files, streams, sensors) |
world_id | Yes | string | Identifier for the digital twin being synchronized |
constraints | No | object | Policy limits, thresholds, timing constraints |
prior_snapshot | No | object | Previous twin state for delta computation |
sync_mode | No | enum | full | incremental | delta_only (default: incremental) |
/constrain)/checkpoint)send without approval)/world-model-workflowThen execute the sync loop:
Invoke /receive → store receive_out
Invoke /transform to normalize to canonical events → transform_out
Invoke /integrate to merge events with prior twin snapshot → integrate_out
Invoke /identity-resolution → identity_resolution_out
Invoke /world-state producing canonical snapshot → world_state_out
Invoke /state-transition apply rules → state_transition_out
Invoke /detect-anomaly drift detection → detect_anomaly_out
Invoke /estimate-risk risk estimate → estimate_risk_out
Invoke /forecast-risk risk forecast → forecast_risk_out
Invoke /plan remediation plan + verification criteria + rollback plan → plan_out
Invoke /constrain enforce policy constraints → constrain_out
Invoke /checkpoint create mutation gate marker → checkpoint_out
Invoke /act-plan execute if safe/approved → act_plan_out
Invoke /verify PASS/FAIL → verify_out
Invoke /audit provenance + tool log → audit_out
If FAIL or side effects → /rollback → rollback_out
Invoke /summarize decision-ready report → summarize_out
Return a structured object:
workflow_id: string # Unique sync execution ID
world_id: string # Digital twin identifier
sync_timestamp: string # ISO timestamp of sync
status: synced | drift_detected | action_taken | rolled_back | failed
twin_snapshot:
version: string
state: object # Canonical world state
hash: string # Integrity hash
evidence_anchors: array[string]
drift_report:
anomalies_detected: integer
severity: low | medium | high | critical
triggers: array[string]
evidence_anchors: array[string]
risk_assessment:
current_risk: number # 0.0-1.0
forecasted_risk: number # 0.0-1.0
risk_factors: array[string]
evidence_anchors: array[string]
actions:
executed: boolean
plan_summary: string
changes: array[string]
safety_gates_passed: boolean
evidence_anchors: array[string]
verification:
result: PASS | FAIL | SKIPPED
criteria_met: array[string]
evidence_anchors: array[string]
audit:
log_path: string
provenance_chain: array[string]
evidence_anchors: array[string]
rollback:
available: boolean
executed: boolean
restore_point: string | null
command: string | null
next_sync:
recommended_interval: string # e.g., "5m", "1h"
triggers: array[string] # Conditions for immediate resync
confidence: number # 0.0-1.0
evidence_anchors: array[string]
assumptions: array[string]
| Field | Type | Description |
|---|---|---|
workflow_id | string | Unique identifier for this sync execution |
world_id | string | Digital twin being synchronized |
twin_snapshot | object | Updated canonical world state with integrity hash |
drift_report | object | Detected anomalies and their severity |
risk_assessment | object | Current and forecasted risk levels |
actions | object | What remediation was taken (if any) |
verification | object | Whether actions achieved intended outcome |
audit | object | Complete provenance and audit trail |
rollback | object | Rollback availability and status |
next_sync | object | Recommended timing for next synchronization |
confidence | number | 0.0-1.0 based on evidence quality |
evidence_anchors | array | All evidence references collected |
assumptions | array | Explicit assumptions made during sync |
Input:
sources:
- type: mqtt
endpoint: "mqtt://sensors.example.com/floor-3"
- type: api
endpoint: "https://building.api/hvac/status"
world_id: "building-floor-3-twin"
constraints:
max_drift_threshold: 0.15
require_approval_above_risk: 0.7
sync_mode: incremental
Output:
workflow_id: "sync_20240115_160000_floor3"
world_id: "building-floor-3-twin"
sync_timestamp: "2024-01-15T16:00:00Z"
status: drift_detected
twin_snapshot:
version: "v47"
state:
entities:
- id: "hvac-unit-3a"
type: "hvac_controller"
temperature: 23.5
setpoint: 22.0
status: "cooling"
- id: "sensor-temp-301"
type: "temperature_sensor"
reading: 24.1
last_updated: "2024-01-15T15:59:45Z"
relationships:
- subject: "hvac-unit-3a"
predicate: "controls"
object: "zone-3a"
hash: "sha256:abc123def456..."
evidence_anchors:
- "tool:mqtt:sensors.example.com/floor-3"
- "tool:api:building.api/hvac/status"
drift_report:
anomalies_detected: 1
severity: medium
triggers:
- "Temperature 1.5°C above setpoint for >10 minutes"
evidence_anchors:
- "file:state/floor-3-twin-v46.yaml:temperature_history"
- "tool:detect-anomaly:threshold_breach"
risk_assessment:
current_risk: 0.35
forecasted_risk: 0.45
risk_factors:
- "HVAC may be undersized for current load"
- "Trending toward comfort threshold breach"
evidence_anchors:
- "tool:estimate-risk:hvac_capacity"
- "tool:forecast-risk:temperature_trend"
actions:
executed: false
plan_summary: "Monitor for 15 more minutes before intervention"
changes: []
safety_gates_passed: true
evidence_anchors:
- "tool:plan:remediation_decision"
verification:
result: SKIPPED
criteria_met: []
evidence_anchors: []
audit:
log_path: ".claude/audit/sync_20240115_160000_floor3.log"
provenance_chain:
- "mqtt://sensors.example.com → receive"
- "receive → transform"
- "transform → integrate"
- "integrate → world-state"
evidence_anchors:
- "file:.claude/audit/sync_20240115_160000_floor3.log"
rollback:
available: false
executed: false
restore_point: null
command: null
next_sync:
recommended_interval: "5m"
triggers:
- "Temperature exceeds 25°C"
- "HVAC status changes"
confidence: 0.88
evidence_anchors:
- "tool:mqtt:sensors.example.com/floor-3"
- "tool:api:building.api/hvac/status"
- "tool:detect-anomaly:threshold_breach"
- "file:.claude/audit/sync_20240115_160000_floor3.log"
assumptions:
- "Sensor readings are accurate within ±0.1°C"
- "MQTT connection is reliable"
- "Building API returns real-time status"
Evidence pattern: Multi-source signal ingestion, anomaly detection against historical baseline, risk forecasting with trend analysis.
Verification tools: Web (for API checks), Bash (for MQTT), Read (for state files)
mutation: truerequires_checkpoint: truerequires_approval: true (for actions above risk threshold)risk: highCapability-specific rules:
Commonly follows:
world-model-workflow - Initial twin creation before first syncreceive - When triggered by external eventCommonly precedes:
summarize - Create executive report after syncsend - Notify stakeholders of drift or actionsAnti-patterns:
Workflow references:
reference/workflow_catalog.yaml#digital-twin-sync-loop for step definitionsreference/world_state_schema.yaml for canonical state formatreference/composition_patterns.md#checkpoint-act-verify-rollback for CAVR pattern