Transform Node
The Transform node reshapes data between two contracts. It takes the input contract of its incoming edge, runs an LLM with those fields, and emits an object shaped by the output contract of its outgoing edge. HQ validates the LLM output against the output contract at runtime.
Transform is a surgical tool: use it to bridge two otherwise-compatible parts of the graph whose shapes don’t line up. It is not a substitute for a full Skill node with rich prompting.
When to use
Section titled “When to use”- Two graph sections were designed against different contracts and you need a thin adapter between them.
- Upstream output carries extra fields; you want to project/rename/convert them before passing downstream.
- You want the LLM to fill in a derivable field that the upstream step did not produce.
Avoid Transform when the “reshape” is really a full task (research, synthesis, code generation) — reach for a Skill node there, since it gives you full prompting control.
Configuration
Section titled “Configuration”| Field | Description |
|---|---|
assigned_role | "pm" or "engineer" — which role runs the transform. |
transform_instruction (optional) | Free-text hint appended to the LLM prompt. Leave blank when the contracts alone convey the intent; use it for unit conversions, filter criteria, naming conventions the schemas can’t express. |
The input contract and output contract are not fields on the node itself — they are read from the incoming and outgoing edges respectively. Attach contracts to those edges via the edge property panel.
Behavior
Section titled “Behavior”- When cascade reaches the Transform, it is inserted as
pendingand runs on the assigned minion. - The minion prompts the LLM with the input data (typed by the input contract) and the output contract as the target schema, plus the optional hint.
- HQ validates the LLM output against the output contract. A schema mismatch fails the node — it does not silently pass through.
Validation rules
Section titled “Validation rules”assigned_roleis required.- Exactly one incoming edge (excluding revision edges).
- Exactly one outgoing edge (excluding revision edges).
- The incoming edge must declare a contract.
- The outgoing edge must declare a contract.
Example
Section titled “Example”flowchart LR Fetch["Skill: fetch-user-report"] -- UserReport --> T["Transform"] T -- LeadSummary --> CRM["Skill: push-to-crm"]UserReport might carry { name, email, activity: […] }; LeadSummary might expect { contact, score }. Transform is told the target shape and generates the mapping, including the derived score.