Transforms
A transform is a named operation applied to a task’s input or output — trimming text, extracting a field, encoding a value, joining a list. Transforms are reusable: the same one works wherever a value needs reshaping.
The expression form
Section titled “The expression form”A transform is written compactly:
type(argnum flags):optionstypenames the transform:trim,keypath,prefix, …argnumis how many arguments it consumes;*means all of them.flagsare optional letters, such asSto spread a list result into separate arguments.optionsis the transform’s own configuration.,,separates several options.
Some examples:
| Expression | What it does |
|---|---|
trim: |
Removes leading and trailing whitespace. |
prefix:/path/to/ |
Prepends a path. |
keypath:a.b |
Extracts the nested field a.b. |
Pipelines
Section titled “Pipelines”Several transforms chain into a pipeline by writing them as a list. Each one receives what the previous one produced, so a value can be extracted, cleaned and encoded in one step.
Finding the right transform
Section titled “Finding the right transform”Every transform is listed in the transform reference, with its arguments, flags and worked examples. The reference is generated from the same catalog the editor uses, so the examples there are the examples the editor applies.