Simcraft Docs

The reference implementation#

Simcraft is the reference implementation of OSDL: an engine, a visual editor, and client libraries built around the document format. This page describes its public surfaces.

The engine#

The engine executes OSDL documents with the standard des, abm, and sd libraries on one calendar. It implements the core execution semantics: escrowed entity transfer, pinned samplers, deterministic replay of a run tuple, structured run reports, and the typed event stream.

Conformance is checked against the Lean reference machine: engine traces are compared with machine traces for the same cases, and trace equality is the bar.

The engine runs in three places:

SurfaceWhat it is
BrowserThe engine compiled to WebAssembly. It powers the runnable examples on this site; models execute locally in the page, with no server involved.
Command lineA CLI that validates documents, runs experiments and parameter sweeps, and lists registered component libraries.
ServerAn execution service with an HTTP and WebSocket API for batch runs and live interactive sessions. Its HTTP contract is documented in the server API reference.

The editor#

The Simcraft IDE is a node-and-wire editor over OSDL documents. The diagram is the model: components are placed and connected on a canvas, parameters are edited in schema-generated forms, and the same document is available as code. Runs animate the diagram and stream results into charts, with timeline scrubbing, live sessions, and branching.

The editor produces and consumes ordinary OSDL documents. Nothing it writes is private to it.

Clients and machine authoring#

A TypeScript client runs documents through WebAssembly or against the server and exposes the typed event stream. A Python SDK builds OSDL documents programmatically. An MCP server exposes model authoring and validation to language-model agents.

All of them are producers and consumers in the specification's sense: views over the document, replaceable without loss.

Status#

Simcraft is version 0.1.0. Published interfaces can change before 1.0.0. The open specification, schemas, libraries, examples, and reference machine are public at github.com/simcrafthq/osdl.

To follow the work, subscribe on the home page.