meta block declares deployment configuration for a specific stack. It lives inside a stack {} body and is the highest-priority level in the four-level resolution chain.
Syntax
meta takes no label. Only one meta {} block is allowed per stack {}. A duplicate produces a hard parse error.
context field
Thecontext field opts the stack into a named context {} block declared in the same compilation unit:
.xcl files. An undeclared name is a hard compile error:
context can be combined with any other meta {} field. Fields declared in meta {} always override the context.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
context | string | "" | Name of a declared context {} to inherit from |
engine | string | "native" | Execution engine — highest-priority override |
runtime | string | "xcl" | Codegen runtime — highest-priority override |
backend {} | block | — | State backend override |
provider {} | block | — | Provider config override |
tags {} | block | — | Additional tags (merged additively) |
hooks {} | block | — | Hook scripts (concatenated at end) |
labels {} | block | — | Additional labels for workspace match {} evaluation |
ai {} | block | — | AI feature settings override |
scan {} | block | — | Security scan settings override |
telemetry {} | block | — | Telemetry settings override |
history {} | block | — | History settings override |
Defaults
When noworkspace {}, context {}, or meta {} declares a field, the compiled defaults are:
| Field | Default |
|---|---|
engine | "native" |
runtime | "xcl" |
backend | local file backend at <dir>/.ubx/state/ |
meta {} block and no workspace or context configuration ships with the native engine, xcl runtime, and a local file state backend — zero configuration required for new stacks.
Resolution chain
Configuration is resolved in four steps. Later steps override earlier ones:- Universal
workspace {}— nomatch {}— lowest priority - Label-matched
workspace {}— scoped workspace whosematch {}keys all appear in the stack’s effective labels context {}— the context named bymeta { context = "..." }(if any)meta {}— per-stack override — highest priority
Tags and hooks merge additively
Tags and hooks are exceptions to the “most specific wins” rule:- Tags: All
tags {}blocks from all four levels are merged. Keys from later levels win on conflict, but keys unique to earlier levels are preserved. A tag set at the workspace level is not removed by a more specific block. - Hooks: Hook lists from all four levels are concatenated in resolution order. Workspace hooks run first; meta hooks run last.
Example resolution
networking:
| Field | Source | Value |
|---|---|---|
engine | universal workspace | "native" |
backend | label-matched workspace | s3://prod-state/platform |
tags.project | universal workspace | "platform" |
tags.owner | universal workspace | "infra-team" |
tags.cost_center | label-matched workspace | "platform-prod" |
tags.environment | context | "production" |
tags.stack | meta | "networking" |
before_ship[0] | universal workspace | "./scripts/global-check.sh" |
before_ship[1] | context | "./scripts/prod-checks.sh" |
after_ship[0] | meta | "./scripts/update-dns.sh" |
hooks sub-block
meta {} are appended to any hooks from the workspace and context. The full execution order is: workspace hooks → context hooks → meta hooks.
labels sub-block
Labels declared inmeta {} extend the context’s labels for workspace match {} evaluation. This allows a stack to carry extra labels beyond what the context provides:
match { tier = "critical" } would now apply to this stack in addition to the regular prod_us labels.
Identifier naming
Context names and label keys must use underscores, not hyphens. XCL identifiers follow the pattern[a-zA-Z_][a-zA-Z0-9_]*.
Stack with no meta
A stack with nometa {} block inherits from the universal workspace only. Label-scoped workspaces and contexts do not apply.

