Rootform language is a closed, statically validated language for two jobs:
Dialects interpret managed and data resource instances from plan JSON or state JSON.
Policy Packs evaluate the resulting architecture without reading raw infrastructure values.
HCL supplies lexical syntax for .rf.hcl and .rf.json. Rootform defines the
accepted blocks, attributes, expressions, references, types, defaults, and
runtime meaning. General HCL or Terraform expressions are not implicitly part
of RF.
This reference documents Rootform language version 0.1.0 and is normative.
For motivation and worked examples, start with the learning path.
String, Boolean, non-negative number literal with exact signed 64-bit integer value
Unary operators
!
Binary operators
&&, ||, ==, !=, <, <=, >, >=
Traversal roots
source, provider, target, member.<name>, each restricted by position
Policy wrappers
exists(query), length(query)
Policy queries
contexts(...), relations(...), contributions(...)
where and assert do not accept collections, object values, null,
floating-point values, arithmetic, conditionals, comprehensions, splats,
dynamic indexes, or arbitrary function calls. Static string fields use
result-based constant HCL evaluation, and dedicated Policy target fields accept
closed list syntax.
Reference conventions
Parameter tables use these meanings:
Term
Meaning
Required
Author must provide value or block.
Optional
Author may omit value or block.
Default
Value compiler uses when optional attribute is absent.
Static
Value must evaluate in empty HCL context; variables and runtime data are unavailable.
Unknown attributes, blocks, functions, and expression shapes fail closed with
a diagnostic. They are never preserved for later evaluation.