Rules
Rules constrain or drive configuration on a node. They live on the Design Model node page, below Attributes, Scopes, and Compatibility Matrices. You author them in a bottom-sheet rule builder, not on a separate route.


Where to open the builder
Section titled “Where to open the builder”- Open a model → Model → select a node in the tree.
- Scroll to the Rules section.
- Start a rule in any of these ways:
- Create rule
- Click or drag a rule-eligible attribute from Attributes or Scopes into the builder
- Edit (pencil) on an existing rule row


If you dismiss the sheet while creating, a Resume rule peek can reopen the local draft for that model.


Rule types
Section titled “Rule types”| UI label | What it does |
|---|---|
| Require | Optional WHEN + THEN comparison. If the comparison fails at runtime, the configuration is rejected and the failure message is shown. |
| Set | Optional WHEN + THEN assignment. Writes a target attribute from an expression. Runs before variant selection. |
On create you can switch Require ↔ Set. On edit, the type is locked.
Anatomy
Section titled “Anatomy”WHEN (optional)
Section titled “WHEN (optional)”Predicates gate whether the THEN runs.
- Mode: matches or doesn’t match
- Each row: optional NOT, attribute, comparator, value
- Joins between rows: AND, OR, XOR (XOR means exactly one row is true in preview language)
Comparators: =, ≠. Numeric attributes also allow >, ≥, <, ≤. Enumeration and boolean sides use equality only. Values come from the attribute’s domain (pickers) or numeric text.


Three drop zones: Left, comparator, Right. Click a zone (or drag into it) to focus it — the header shows Adding here.


Require
- Compare Left vs Right with
=,≠,≥,>,<,≤(equality only when a side is enum/boolean) - Arithmetic on numeric sides:
+ − × ÷ ( )and helpers such asround( - Optional Failure message (a default is stored if you leave it blank)
- Role hint: Filters variants when a category attribute appears on either side; otherwise Config check


Set
- Target attribute on the Left; Solve for when more than one left attribute is present (labels look like
attr on {node}) - Right side: expression or a domain value for enum/boolean
- Building a simple enum
=literal assignment on create can auto-switch from Require to Set


A Preview bar restates the rule in natural language while you edit.
What you can drag
Section titled “What you can drag”| Source | Usable in rules? |
|---|---|
| Node attributes (and inherited category attributes) | Yes, except free-text string domains |
| Scope attributes on the node | Yes (shown as attribute on {nodeName} when cross-node) |
| Free-text string attributes | No — not draggable; drop shows a toast |
Numeric and enum/boolean sides cannot be mixed freely; invalid drops and incomplete WHEN/THEN block save with section errors or toasts.
Rules table
Section titled “Rules table”The node’s Rules table lists rules that apply to that node (they reference attributes that apply there). Typical columns: name, type (Require / Set), condition summary, related Nodes, edit and delete.


Delete asks for confirmation. There is no per-rule enable switch and no manual rule order in the UI.
Collaboration
Section titled “Collaboration”Rule edits write the open branch draft and follow the same edit lease as the rest of Design. While someone else holds the draft, the builder does not accept writes.
Related
Section titled “Related”- Model structure — tree, attributes, and where Rules sit on the page
- Compatibility matrices — allowed combinations evaluated with the Launcher
- Domains — value types behind attributes
- Scopes — scope attributes you can use in WHEN/THEN
- Launcher — where Require failures and Set results show up at runtime