Skip to content

Core Concepts

Culsma represents a laboratory protocol as source text that can be checked and executed by a kernel pipeline.

Protocol

A protocol is the top-level executable unit.

text
protocol PublicMinimal {
    ...
}

Protocols contain declarations and statements. The CLI runs a protocol through parse, compile, validation, planning, runtime execution, and replay.

Content

Content describes the material identity being tracked, such as a buffer, reagent, biosample, or fraction.

text
buffer(code = "BUF01", type = "water")

Content identity is distinct from where the material is located.

Container

A container is a logical vessel identity that can hold content.

text
tube(label = "Target", capacity = 100uL)

Runtime material state tracks container contents, quantities, and metadata.

Operation

Operations are executable protocol actions. The minimal public operation is a transfer:

text
target << [source:5uL];

Operations lower into plan steps and then execute through the runtime.

Environment

An environment block applies execution conditions to enclosed steps.

text
with env(thermal = 37C, duration = 10min) {
    hold(sample = reactor);
}

Environment conditions are execution context, not biological-result prediction.

Readout

Readout operations consume container state and produce structured data references.

text
let obs = phy(sample = reactor, quantity = temperature);

Readout results are data artifacts, not material mutations.

Plan

After validation and type checking, Culsma lowers source into a plan. The plan contains executable steps, dependencies, gates, and operation arguments.

Trace and Replay

Runtime emits events while executing the plan. Replay reconstructs runtime state from those events, which supports audit and reproducibility.

Released under the Apache-2.0 license.