> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frayme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Nodes: Assignment, Rule, Decision Table, Split, Scorecard, Script

> The logic nodes that compute, branch and score.

export const Shot = ({id, alt, caption}) => <Frame caption={caption}>
    <img className="block dark:hidden rounded-lg" src={`/images/guides/${id}.light.png`} alt={alt} loading="lazy" decoding="async" />
    <img className="hidden dark:block rounded-lg" src={`/images/guides/${id}.dark.png`} alt={alt} loading="lazy" decoding="async" />
  </Frame>;

## Assignment

Sets variables. Each row is `variable_name` = `expression`; the result is available as `vars.<name>`.

<Shot id="engineer/node-14-assignment" alt="Assignment node panel" caption="Normalise a 0–1 score to a percentage." />

## Rule

IF / ELSE logic. **Output Fields** names what the node writes. Each **Condition** has clauses (`variable`, operator, `value`) combined with **AND (all match)** or **OR (any match)**, and the output values to write when it matches; the first matching condition wins. **Else Values (default)** apply when none matches.

Operators: `>`, `<`, `>=`, `<=`, `==`, `!=`, `contains`, `not contains`, `in`, `not in`, `is empty`, `is none`, `is not none`, `matches regex`, `starts with`, `ends with`. Values are typed as you enter them: `70` is a number, `"70"` a string.

<Shot id="engineer/node-15-rule" alt="Rule node panel" caption="Two conditions and an else." />

## Decision Table

Rules as a table. **Hit Policy** is **first** (first matching row wins) or **all**. Add condition columns and output columns, then rows.

## Split / Branch

Routes to one of several branches by condition. Each branch has a label and a condition such as `vars.decision == "review"`; **Default Branch** catches everything else. Each branch is an outgoing handle.

<Shot id="engineer/node-17-split" alt="Split node panel" caption="Three branches on vars.decision." />

## Scorecard

Weighted scoring. **Scoring Mode** is **Weighted average** or **Grouped additive**. Each **Factor** has a field (`vars.kyc.score`), a code, a label, a weight and cases mapping values to points; grouped mode adds groups with caps. **Output Field** names the total.

## Script (Starlark)

Runs a Starlark script with the case context. Set `output` to a dict; it is stored under **Output variable**. **Timeout (s)** bounds the run. A raised error fails the run, which you can inspect in Execution history.

<Shot id="engineer/node-20-script" alt="Script node panel" caption="A Starlark step." />
