Skip to Content
We are live but in Staging 🎉
DSL ReferenceExpressions

Expressions

Last validated: 2026-05-14

This page defines expression syntax used in field defaults and step inputs.

Literal Values

"hello" -- text 123 -- integer 3.14 -- float true -- boolean false -- boolean null -- null

Triple-quoted strings are supported:

""" Multi-line content with quotes "inside" """

References And Interpolation

Reference variables by name:

project report.text items[0]

Interpolate with {...} inside strings:

"Deploying {project} to {env_name}" "Author: {report.author}"

Current interpolation parsing is intentionally simple: use variable names and dotted field paths ({name}, {obj.field}) for predictable behavior. For more complex computation, use let first, then interpolate the bound variable.

Access Operators

Field Access

obj.field

Safe Access

obj?.field

Default Fallback

obj.field ?? "unknown" obj.field ?? (fallback_map[region] ?? "unknown")

Index Access

arr[0] map_like[key]

Function And Method Calls

count(items) starts_with(content_type, "image/") text.trim() report.text.contains("TODO")

Method syntax is transformed by compiler/runtime into method-call semantics.

Lambda Expressions

Single-parameter lambda:

item => item.score > 0.8

Multi-parameter lambda:

(a, b) => a.score > b.score

Typical use with collection helpers:

map(results, r => r.title) filter(results, r => r.score > 0.7)

Special env(...) Expression

Scriptum parser supports env lookup expression:

env(LLM_API_KEY) env("LLM_MODEL", "gpt-4o")

Object And Array Literals

Array literal:

["a", "b", "c"] [1, 2, 3]

Object literal (: and = forms are accepted):

{ provider: "public", tier: "gold" } { provider = "public", tier = "gold" }

Operators

Arithmetic

  • +
  • -
  • *
  • /
  • %

Comparison

  • ==
  • !=
  • >
  • <
  • >=
  • <=

Logical

  • and
  • or
  • not (also !)

Precedence (Low To High)

  1. or
  2. and
  3. comparisons (==, !=, >, <, >=, <=)
  4. additive (+, -)
  5. multiplicative (*, /, %)
  6. unary (not, !, unary -)
  7. postfix (., ?., ??, call (...), index [...])
  8. primary (literal/reference/grouped)

Practical Notes

  1. Parenthesize complex expressions for readability and stability.
  2. Avoid chaining multiple comparisons in one expression.
  3. ?? accepts a primary expression on the right side; use parentheses for complex fallback logic.
  4. Prefer explicit field names over deep chained access when nullability is uncertain.