matter
Reference
Complete reference for .matr language constructs, the Molebyte artifact format, compilation boundaries, and the execution handoff contract between Matter Studio and Material Cloud. This page is designed for authors and agents building production matter programs.
Language constructs
Every .matr file is composed of top-level blocks. The following is the complete set of constructs available in the language. Each block type has required and optional fields, and the compiler enforces structural validity at parse time.
material
Defines a physical or simulated substance with substrate binding, concentration or quantity, and optional characterization parameters. Multiple materials can be declared per file.
required
substrate, at least one quantity parameter
optional
metadata, tags, provenance, physical properties
protocol
Defines an ordered sequence of operations on materials. Steps execute sequentially. Each step references inputs from material blocks or from previous step outputs. Parallelism is achieved by composing protocols, not by branching.
required
at least one step with input and duration
optional
step conditions (temperature, pressure, pH, stir_rate), intermediate outputs, annotations
constraints
Declares success criteria evaluated at simulation and post-execution. Supports numeric comparisons (>=, <=, ==), range expressions (value ± tolerance), and statistical bounds. Constraint violations are surfaced as signals.
required
at least one constraint expression
optional
tolerance ranges, comparison operators, statistical bounds
governance
Required on every program. Declares consequence tier, approval chains, escalation behavior, and compliance labels. The compiler validates that governance is consistent with the program's constraint severity.
required
tier (T0-T4), consequence label
optional
approvals, escalation, compliance labels, audit tags
simulation
Configures Material Twin simulation parameters. Defines how many simulation runs to execute, what confidence level is required, which substrate model to use, and what baseline to compare against.
required
runs, confidence threshold
optional
substrate_model version, baseline reference, timeout, seed
import
Imports materials, protocols, or constraint sets from other .matr files or from the platform registry. Imports are resolved at compile time and versioned. Circular imports are a compile error.
required
source path or registry reference
optional
alias, version pin
output
Declares the expected outputs of the program. Outputs are named, typed, and optionally bounded. They become the signal schema that Material Cloud uses to structure execution results.
required
at least one named output
optional
format, units, expected range
Molebyte artifact format
A Molebyte is the compiled, versioned, immutable artifact produced by the Matter compiler. It is the unit of deployment, execution, audit, and provenance on the Matterforma platform. Molebytes are analogous to container images or compiled binaries, but designed for Material Computing.
structure
Artifact contents
- Protocol Execution Plan (compiled PEP)
- Material definitions and substrate bindings
- Constraint thresholds and tolerance ranges
- Governance annotations and approval requirements
- Simulation parameters and baseline references
- Output schema for signal structuring
- Source hash for provenance linking
properties
Artifact guarantees
- Immutable. Once compiled, a Molebyte cannot be modified. New versions require recompilation.
- Versioned. Every Molebyte has a semantic version and a content-addressable hash.
- Self-describing. All metadata needed for execution, simulation, and audit is embedded.
- Portable. Molebytes can be stored, transferred, and executed on any compatible Material Cloud facility.
schema
Molebyte envelope
{
"format": "molebyte/v1",
"version": "1.2.0",
"hash": "sha256:a3f8e2...",
"source_hash": "sha256:7b1c9d...",
"compiled_at": "2026-02-25T14:30:00Z",
"governance": {
"tier": "T2",
"consequence": "physical-reversible",
"approvals_required": ["domain-lead", "safety-review"]
},
"pep": { /* Protocol Execution Plan */ },
"materials": [ /* resolved material definitions */ ],
"constraints": [ /* constraint expressions */ ],
"simulation": { /* simulation configuration */ },
"outputs": [ /* expected output schema */ ]
}Compilation contract
The compiler makes the following guarantees. If compilation succeeds, all of these conditions hold. If any condition cannot be satisfied, compilation fails with a diagnostic.
syntactic validity
Source conforms to .matr grammar. All blocks are structurally valid and all required fields are present.
substrate resolution
All substrate references resolve to known substrates in the platform registry or simulation catalog.
constraint consistency
All constraints are expressible against the declared outputs and do not conflict with each other.
governance completeness
Governance tier is declared, consequence label is present, and approval chain matches organizational policy.
pep generation
A deterministic Protocol Execution Plan has been generated from the protocol steps and material bindings.
simulatability
The resulting Molebyte can be simulated in the Material Twin against the declared substrate model. Non-simulatable programs are rejected.
Execution handoff contract
When a Molebyte is submitted to Material Cloud, the following contract governs the boundary between the authoring plane (Matter Studio) and the execution plane (Material Cloud).
matter studio guarantees to material cloud
- The Molebyte is syntactically and structurally valid.
- All substrate bindings resolve to known targets.
- Governance annotations are present and complete.
- The PEP is deterministic and simulatable.
- Simulation has passed at the declared confidence level.
material cloud guarantees to matter studio
- Policy evaluation is performed before execution begins.
- Execution uses the profile and facility declared in submission.
- Signals are structured according to the output schema.
- Constraint violations trigger the declared escalation pathway.
- Full provenance is stored in Vault linked to the Molebyte hash.
Governance tier reference
T0
Simulation only
No physical execution. Used for testing, learning, and dry runs. No approvals required.
T1
Physical, negligible consequence
Reversible operations on non-critical substrates. Automated approval sufficient.
T2
Physical, reversible consequence
Operations with material cost or time investment. Requires domain lead approval.
T3
Physical, significant consequence
High-value substrates or irreversible intermediate steps. Requires safety review and domain approval.
T4
Physical, critical consequence
Irreversible operations on critical substrates. Requires full approval chain, enhanced simulation, and human-in-the-loop confirmation.