Formula
The Fontana Formula Language
How a workflow step is a short file of statements, how every statement reads as an English sentence, and how editing the sentence changes what runs.
Technical whitepaper
Oleg Skrinda · November 2026
Executive summary
Formula is the language in which every step of a Fontana workflow is written. A step is a short file of statements that runs from top to bottom: load a file, tidy the columns, check each row, calculate, total, save. Formula also has a second form. Every statement has an equivalent English sentence, which Fontana derives from the statement itself. The sentence and the statement are two notations for one instruction.
The translation works in both directions. A whole step can be read in English, and an edited sentence becomes the formula that runs. This applies to a one-line rename, and equally to a rule that combines a list test, a calculated key, a message built from the data, a severity, and a follow-up action in a single sentence. The owner of a process and the engineer who reviews it therefore read and change the same definition, which is the one that executes.
A step is one file
Load, map, check, transform, filter, aggregate, and export are statements in order. The file is the complete definition of the step.
Sentences are derived from statements
Fontana derives the English from the formula, so the two always agree. A sentence in that wording converts back to the formula by fixed rules, with no AI model involved.
Free wording is supported
A sentence in the author's own wording goes to Fluid, Fontana's model for this language. Its proposal is checked against the table's columns, presented in Fontana's wording, and saved only when it is accepted.
Execution is exact and traceable
Numbers are exact decimals. Every cell records what it was calculated from. Each statement is checked against the columns that reach it before the step runs. No model takes part in a run.
This paper presents one step in both forms and then examines in detail the round trip between them.
Docs:Formula overview
Introduction
The owner of an operational process can usually state it in a few sentences: keep the buys, put the identifier in capitals, hold a row back when its identifier is not valid, total the consideration by desk. What executes is rarely those sentences. It is typically a script, a spreadsheet macro, or a configuration screen that only its author changes with confidence.
This separation has a cost. The owner cannot verify that the code does what was asked, and the engineer cannot be certain what was intended. A description kept beside the code diverges from it as soon as either one changes. Generating the code from a description with an AI model leaves the same problem in place, because someone must still read the code to know what will run.
Formula addresses this from both directions. What runs is a small text file that an engineer can review, compare between versions, and test. What a colleague reads and edits is the English sentence for each line, and that sentence is derived mechanically from the line every time it is displayed. Where a model assists, it does so before anything is saved, its output is checked, and the result is approved as a readable sentence.
Where Formula sits
Fontana is an AI platform with three parts. The Knowledge Graph holds what an organisation knows. The Agent Harness is the runtime in which AI agents work. Workspaces is where a team builds workflows, which are data processes that run again on new data. Formula is the language of those workflows. The Workflow Engine whitepaper describes how a workflow runs. The Fluid whitepaper describes the model that is used when a sentence is in the author's own wording. This paper can be read independently of the others.
Who this paper is for
This paper is written for the people who read and change a workflow, and for the engineers and reviewers who need to know what the language guarantees. It assumes no prior knowledge of Fontana and no programming experience.
How this paper is organised
The paper begins with one step as a file and then shows the same step as sentences. The next three sections form its core: the round trip between the two forms, the complexity a single sentence can express, and the conversion and review of an edited sentence. The remaining sections cover the language itself, the check applied before a step runs, the guarantees the engine provides, the lineage and the styling a statement carries, and the limits.
Key terms
These terms recur throughout the paper.
| Term | Meaning |
|---|---|
| Workflow | A data process defined as a graph of steps: load the data, check it, change it, write it out. A workflow runs again whenever its data changes. |
| Step | One unit of a workflow, also called a node. Each step has a file of Formula statements that defines what it does. |
| Formula | Fontana's language for a workflow step. A file of statements runs top to bottom and passes its rows on. |
| Statement | One line that changes the rows: it sets a column, drops a row, groups, checks, or writes a file. |
| Expression | A calculation inside a statement, such as a quantity times a price. |
| Column | A named field of a row. In a sentence, a column name sits between backticks. |
| Sentence | The English form of one statement. Fontana derives it from the statement, and it can be edited. |
| Process | The editor action that converts edited sentences back into statements, checks them, and presents each change for review. |
| Fluid | Fontana's language model for Formula. It is called only when a sentence is not in Fontana's own wording. The Fluid whitepaper describes the model. |
| Exception | A ticket raised on a row that failed a check, with a message and a severity, for a person or an agent to resolve. |
| Lineage | The record of which cells a value was calculated from, kept with the output so that the value can be traced to its sources. |
| Workspace | An organisation's Fontana environment: its people, agents, files, workflows, and secrets. |
The structure of a step
A formula is an ordered list of statements. Each statement receives the current rows and returns the next rows. The first statement reads what arrived, and the rows the last statement returns are the step's output. The step below loads a file of trades, tidies the columns, raises an exception on an invalid ISIN (the standard identifier of a security), calculates a consideration, and saves a total for each desk.
# Load
fromFile("../trades.csv")
# Map and type the columns
setProp("ISIN", trim(prop("isin")).upper())
setProp("Quantity", prop("qty"))
setType("Quantity", "number")
setProp("Price", prop("px"))
setType("Price", "number")
keepProps("ISIN", "Quantity", "Price", "desk")
# Validate
if(
not(isValidIsin(prop("ISIN"))),
raiseException("ISIN", prop("ISIN"))
.setProp("message", "Not a valid ISIN")
.setProp("severityLevel", 4)
)
# Transform
setProp("Consideration", round(prop("Quantity") * prop("Price"), 2))
# Filter, aggregate, export
filter(prop("Quantity") > 0)
groupBy(prop("desk"))
setProp("desk", prop("desk").first())
setProp("Consideration", prop("Consideration").sum())
keepProps("desk", "Consideration")
toFile("../out/consideration-by-desk.xlsx")
A line that starts with # is a comment. A statement ends at a line break where the brackets are balanced, and a line that starts with a dot continues the statement above it, which is how the exception carries its message and its severity.
This is the complete step. Most steps follow the same sequence of stages, and each stage has its own statements.
| Stage | Statements |
|---|---|
| Load | fromFile, fromApi, fromGraphql, fromWeb, fromEmail, and fromRequest bring rows in. |
| Map | setProp, setType, keepProps, and unsetProp name and type the columns the rest of the step will see. |
| Validate | if with raiseException files a ticket on a bad row, with a message and a severity. |
| Transform | Text, number, date, logic, and list functions calculate a new column from existing ones. |
| Generate | insertRow and splitRows make rows. fromAi, fromTemplate, fromQuery, and fromScript make values. |
| Filter and sort | filter, dropRow, and sortBy decide which rows continue, and in what order. |
| Aggregate | groupBy collapses rows, and a reducer such as sum or first calculates the group. |
| Combine | inputs, find, findAll, and appendRows read a second table and join or stack it. |
| Export | toFile, toEmail, toApi, and toGraphql write the rows out. |
| Style | setStyle and setRowStyle mark a cell or a row, and the mark follows the data. |
The same step in English
Flow, the Fontana web application, presents a step as one card for each statement, and each card shows its statement as a sentence. The table below lists the sentences Fontana derives for the statements of the step above.
| The statement that runs | The sentence on the card |
|---|---|
setProp("ISIN", trim(prop("isin")).upper()) | Set `ISIN` to `isin` trimmed in uppercase. |
setProp("Quantity", prop("qty")) | Set `Quantity` to `qty`. |
setType("Quantity", "number") | `Quantity` is a number. |
keepProps("ISIN", "Quantity", "Price", "desk") | Keep only `ISIN`, `Quantity`, `Price` and `desk`. |
if(not(isValidIsin(prop("ISIN"))), raiseException("ISIN", prop("ISIN")).setProp("message", "Not a valid ISIN").setProp("severityLevel", 4)) | If not (`ISIN` is a valid ISIN), then raise an exception on `ISIN` keyed by `ISIN` with message 'Not a valid ISIN' and severity 4. |
setProp("Consideration", round(prop("Quantity") * prop("Price"), 2)) | Set `Consideration` to (`Quantity` × `Price`) rounded to 2 decimals. |
filter(prop("Quantity") > 0) | Keep only the rows where `Quantity` > 0. |
groupBy(prop("desk")) | Group the rows by `desk`. |
setProp("desk", prop("desk").first()) | Set `desk` to the first item of `desk`. |
setProp("Consideration", prop("Consideration").sum()) | Set `Consideration` to the sum of `Consideration`. |
The load and save statements appear as cards with their own fields, such as the file path, because a path is more easily selected than phrased. Every statement between them is a sentence. The editor can also display the step as its Formula file, and both displays show the same step.
Sentence conventions
The wording is regular, and that regularity makes it reversible. A small set of conventions covers almost every sentence.
| In a sentence | How it is written |
|---|---|
| Columns | A column name sits between backticks, spelled exactly as it is in the data. |
| Values | Text values sit between single quotes. Numbers show with thousands separators: 130,000,000 in the sentence, 130_000_000 in the statement. |
| Arithmetic | × and ÷ for multiply and divide, with brackets wherever the order of calculation needs them. |
| Comparisons | =, ≠, >, ≥, <, ≤. A test against a list reads as a choice: is 'A', 'B' or 'C'. |
| Patterns | A pattern that anchors at the start or the end reads as starts with or ends with. Any other pattern is shown as written. |
| Order | Then joins actions that happen in sequence. Otherwise introduces what happens when the condition is false. |
| Several conditions | A choice between more than two outcomes reads as one line per outcome: If, Otherwise if, Otherwise. |
The round trip
The sentence on a card is editable. A sentence can be changed, added, deleted, or moved, and the Process action converts those edits into statements. When the card is next displayed, its sentence is derived again from the statement that was saved.
Three properties follow from this loop. Together they distinguish it from a description generated alongside code.
- The sentence is always current. It is never stored as the source of truth. It is produced from the statement each time it is displayed, so no second copy exists that could fall out of date.
- Fontana's own wording requires no model. A sentence in the form Fontana generates converts back by fixed rules. The conversion is immediate, gives the same result every time, and involves no AI call. Changing 2 decimals to 4, or 'BUY' to 'SELL', is an edit of this kind.
- Both directions are tested for the whole language. Every function in Formula has an English phrase, and every sentence Fontana can generate converts back to its statement. Both properties are enforced by tests.
Two routes back to a statement
The direct route is strict by design. It accepts a sentence only when the statement it produces reads back as that same sentence. A sentence that is close but not exact, such as one with a missing full stop, or a loosely worded instruction such as "Calculate the tax", is not interpreted by the direct route. It passes to the second route, in which a model proposes a statement and the author decides.
Complex statements
The translation covers the whole language, including its most complex statements. The sentences below are the ones Fontana derives for the statements beside them, and each converts back to its statement directly.
| The sentence | The statement |
|---|---|
| If `side` is not 'BUY' or 'SELL', then raise an exception on `side` keyed by `order_id` + ':side' with message 'Side must be BUY or SELL, got ' + `side` and severity 5, then drop the row. | if(not(["BUY", "SELL"].includes(prop("side"))), do(raiseException("side", prop("order_id") + ":side").setProp("message", "Side must be BUY or SELL, got " + prop("side")).setProp("severityLevel", 5), dropRow())) |
| If `notional` > 10,000,000, then set `band` to 'large'. Otherwise, if `notional` > 1,000,000, then set `band` to 'medium'. Otherwise, set `band` to 'small'. | setProp("band", ifs(prop("notional") > 10_000_000, "large", prop("notional") > 1_000_000, "medium", "small")) |
| If the days from `trade_date` to `settle_date` > 2, then raise an exception on `settle_date` keyed by `trade_id` with message 'Settles later than T+2' and severity 3. | if(dateBetween(prop("settle_date"), prop("trade_date"), "days") > 2, raiseException("settle_date", prop("trade_id")).setProp("message", "Settles later than T+2").setProp("severityLevel", 3)) |
| If `qty` × `price` > 1,000,000 and not `approved`, then raise an exception on `approved` keyed by `trade_id` with message 'Large trade without approval' and severity 4. | if(prop("qty") * prop("price") > 1_000_000 and not(prop("approved")), raiseException("approved", prop("trade_id")).setProp("message", "Large trade without approval").setProp("severityLevel", 4)) |
| Set `net` to (`gross` - `fee`) × (1 - `tax_rate` ÷ 100). | setProp("net", (prop("gross") - prop("fee")) * (1 - prop("tax_rate") / 100)) |
| Keep only the rows where `status` is not empty and `Quantity` > 0 and `status` ≠ 'CANCELLED'. | filter(not(prop("status").empty()) and prop("Quantity") > 0 and prop("status") != "CANCELLED") |
| Set `issuer` to `name` of the first item of the issuers table where (`lei` of the item = `lei`). | setProp("issuer", inputs().prop("issuers").find(current.prop("lei") == prop("lei")).prop("name")) |
| Set `total_notional` to the sum of (`notional` of the item for each item of `legs`). | setProp("total_notional", prop("legs").map(current.prop("notional")).sum()) |
| Make one row per item of `tags` split at ',', with the item in `tag`. | splitRows(prop("tags").split(","), "tag") |
| If `isin` starts with 'GB', then make `asset` uppercase. | if(prop("isin").test("^GB"), setProp("asset", prop("asset").upper())) |
| If `valuation` > 130,000,000, then colour the text of `Account ID` 'red'. | if(prop("valuation") > 130_000_000, setStyle("Account ID", "text_color", "red")) |
The first row shows how much one sentence can express. It tests a value against a list, raises an exception on a named column, builds the exception's key from another column, builds its message from the offending value, sets a severity, and then drops the row. The statement beside it is correct, and most readers would find it difficult to follow. The sentence expresses the same instruction, and a reader with no knowledge of Formula can confirm whether it is the intended rule.
- Lookups. A value fetched from a second table reads as a description of the lookup: the name of the first item of the issuers table where the identifiers match.
- Lists. A calculation over the items inside one cell, such as the legs of a trade, reads as a sum of a field for each item.
- Dates. A difference between two dates reads as the days from one to the other.
- Nested logic. A choice between several outcomes becomes one line per outcome. A condition with several actions under it becomes an indented list.
- Styles. Colouring a cell or a row when a condition holds is also a sentence, and the colour is part of the formula.
Where a statement has no natural phrasing, Fontana shows that part as code inside the sentence. It does not invent a phrase that would not convert back.
Conversion and review
Process is the single action through which an edit reaches the file. It treats each sentence separately, applies only the conversion that sentence requires, and presents every change for review before anything is saved.
| The sentence | Conversion | Model called |
|---|---|---|
| Unchanged | No conversion. The sentence keeps its statement, including when it is moved up or down. | No |
| Deleted | Its statement is removed. There is nothing to review. | No |
| Written in Fontana's wording | It converts directly, shown at 100%. The conversion is accepted only if the statement it produces reads back as the sentence that was written. | No |
| Written in the author's own wording | Fluid proposes a statement, with a confidence. The proposal is checked against the columns that reach that statement. | Yes |
| A comment, starting with # | It stays as written, is shown in grey, and is never converted. | No |
Free wording
Fontana's wording is not required. A sentence can be written informally, for example: "Make Account ID red if Company valuation is above 130 million." Process sends that sentence to Fluid together with the columns that reach it. Fluid proposes a statement, the proposal is checked, and the result is presented as Fontana's own sentence: If `Company valuation` > 130,000,000, then colour the text of `Account ID` 'red'. The author approves that sentence and does not need to read the code behind it.
- A column named loosely, such as Fund for a column called Fund Name, is resolved to the one column that name fits.
- Sentences sent to Fluid are processed concurrently, so ten new sentences do not take ten times as long as one.
- If Fluid cannot produce a statement that passes the check, its last proposal is shown with the errors beside it, so that it can be corrected and accepted.
- The first conversion after a long pause can take about two minutes while the model loads, and the editor reports progress during that time.
The review
Each changed sentence is presented in a review panel. The panel is designed so that the decision can be made by a person who reads only English.
| Element | Content |
|---|---|
| Statement | The sentence as the author wrote it. |
| Resolved to | The sentence Fontana derives from the resulting statement. If this sentence expresses the intended rule, the statement implements it. |
| Confidence | 100% for a direct conversion. For a proposal from Fluid, the model's own probability for the statement it returned. |
| Change | The statement before and after, side by side. |
| Decision | Edit, reject, or accept, for each change or for all of them at once. Nothing is saved until a change is accepted. |
After acceptance, the workflow runs the statement. Fluid is not called on that run or on any later run. The Fluid whitepaper describes the model, how a proposal is checked, how the model is trained, and where it may run.
The language
Formula has two constructs. A statement changes the rows. An expression calculates a value inside a statement. Expressions follow Notion Formula 2.0, the formula syntax of the Notion workspace product, so prop("Name").upper() has the meaning it has there. Fontana adds the statements that act on rows and the verbs that move data into and out of a step.
# Statement form: the condition chooses which statement runs
if(prop("side") == "buy", setProp("sign", 1), setProp("sign", -1))
# Value form: one statement, and the condition chooses the value
setProp("sign", if(prop("side") == "buy", 1, -1))
prop("Exact column name")reads a column by its exact name.- Every function can be called two ways.
upper(prop("lei"))andprop("lei").upper()are the same call. - Statements run top to bottom, and each one runs over every row before the next one starts.
- let binds a name to a value for one expression.
context()holds values across rows, for a running total or a maximum.
Types
| Type | Holds | Written as |
|---|---|---|
text | A string. | "EUR" |
number | An exact decimal. 0.1 + 0.2 is 0.3. | 42, 0.125, 130_000_000 |
boolean | True or false. | true, false |
date | A date and time in UTC. Every row of one run sees the same now. | parseDate("2026-09-30"), today() |
list | A list of values of one type. | [1, 2, 3] |
object | Structured data inside one cell, read field by field. | prop("leg").prop("issuer") |
empty | An absent value. A blank number is not zero. | an empty cell |
A column has one type at any point in the file, and the type follows the statements. A price is a number before a groupBy, a list of numbers after it, and a number again once a statement sums it.
Function families
| Family | Functions |
|---|---|
| Logic | if, ifs, empty, equal, unequal, and, or, not, let, lets |
| Text | length, substring, contains, test, match, replace, replaceAll, lower, upper, repeat, trim, format, padStart, padEnd, isValidIsin |
| Numbers | add, subtract, multiply, divide, mod, pow, min, max, sum, median, mean, abs, round, ceil, floor, sqrt, cbrt, exp, ln, log10, log2, sign, pi, e, toNumber, formatNumber |
| Dates | now, today, minute, hour, day, date, week, month, year, dateAdd, dateSubtract, dateBetween, dateRange, dateStart, dateEnd, timestamp, fromTimestamp, parseDate, formatDate |
| Lists | at, first, last, slice, concat, sort, reverse, join, split, unique, includes, find, findIndex, filter, some, every, map, flat, count, splice |
| Statements | setProp, unsetProp, keepProps, insertRow, splitRows, appendRows, each, dropRow, filter, sortBy, desc, groupBy, do, if |
| Context and tables | context, inputs, input, rowIndex, prop, getProp, find, findAll, rows, exceptions |
| Exceptions | raiseException, with its message, severity, and other fields set by a chained setProp |
| Styles | setStyle, setRowStyle, clearStyle, clearRowStyle, me, optionColor |
The grammar in the documentation is generated from the parser, and the complete language is published as one document that AI agents read when they write formulas. The worked examples in the documentation are tests: each one runs as shown.
Static checking
Every statement is checked against the columns that reach it, during editing and again at conversion. The check tracks the columns that arrive at the step and every column an earlier statement set, so an error is reported in the editor before the step runs.
| The check reports | Meaning |
|---|---|
| Cannot find property "Name" | No column of that exact name reaches the statement. A column removed earlier in the file is not available to the statements after it. |
| Cannot find function len() | The function is not part of the language. |
| Calling name() with argument that may not be type text | A value has the wrong type for the function it is passed to. |
| Cannot find input "x" | No wire into the step has that name. |
| A setProp that changes a column's type | A column has one type at any point in the file. A deliberate change of type is a statement of its own, setType. |
| A bare expression on its own line | A calculation that writes nothing. Values are written with setProp. |
| groupBy or sortBy inside an if | A statement that acts on all the rows cannot sit inside a per-row condition. |
- The same check gates a proposal from Fluid. A statement that names a column the table does not have is not presented as valid.
- A check error differs from a run failure. A run failure arises from a value the check could not foresee, such as a division by zero. It fails the step, and the step writes no rows.
- An exception is a third case. Raising an exception never stops a step: the step keeps its rows and finishes, and the ticket goes to the people or agents who resolve it.
Execution guarantees
Because a step is expressed in Formula, the workflow engine provides the same guarantees for every statement it executes.
- Lineage for every cell. Each cell a statement writes records the cells it was calculated from, so an output value can be traced back through every step to its sources.
- Exact numbers. Every number is an exact decimal while a formula calculates. 0.1 + 0.2 is 0.3, and 5 / 10 is 0.5.
- The same result every run. A formula works on its rows and its named tables only. It cannot run arbitrary code or reach the network, except through a named verb such as fromApi. Dates read one clock for the whole run.
- Styles that follow the data. A mark set on a source column follows every value calculated from it, into later steps, so a cell shows where it came from.
- No model in the run. A model may have assisted in writing a sentence. What executes is the statement that was accepted.
Data lineage
A formula records the origin of every value automatically. Lineage requires no separate statement and no manual mapping of columns into a catalogue. The statement that writes a cell is itself the record of how that cell was calculated.
The record is a pointer. A cell points at the cells it was calculated from, and those cells point at theirs, back to the file or the API through which the value entered. No data is copied, so lineage does not require a second copy of the table. Each link states why that source contributed: it was loaded, transformed, looked up, merged, passed through, computed, aggregated, generated, or used only to filter.
- The Overview panel in Flow displays the chain behind a selected cell as a tree, a list of sources, or a graph that shows the value changing along the way.
- A cell read only to decide something, such as a filter or a sort, is recorded as filtered. The record shows which branch a row took as well as what it was calculated from.
- A group keeps a pointer to every member row, so a total traces back to the rows it summed.
- A script is traced to the whole input row. A query keeps no per-cell lineage. Formula statements are the steps that keep a pointer for each cell.
OpenLineage
OpenLineage is an open standard for describing runs, jobs, and datasets. Fontana builds OpenLineage events automatically from the lineage the statements recorded. When a run finishes, the engine sends a start event, followed by a complete or fail event, to the OpenLineage endpoint an administrator configures for the workspace. The events carry column-level lineage, so a data catalogue shows the same chain that is visible on the cell, alongside the organisation's other pipelines. Export is off while no endpoint is configured, and the record on the cell is kept in either case.
Docs:Data lineage
Styling
A formula validates rows, transforms them, and records the audit and the data lineage of every value it writes. It also sets styles, and a style set on the data cascades through the rest of the workflow. This makes lineage visible on the table itself: when a source is coloured where its data enters, a column enriched from that source keeps the colour, which shows where each enriched value came from. A style set only on a view stays on that view.

Marks that follow the data
In a step, a style marks the data itself. When a source column is set to pink where it enters, a cell calculated from it three steps later is still pink. A lookup brings the mark of the cell it read. A group keeps the marks of its member rows. A value written from a constant drops the marks it had. A cell read only to make a decision, in a condition, a filter, or a sort, passes no mark on.
setStyle("Daily Price", "background", "rose")
setProp("Consideration", prop("Daily Price") * prop("Quantity"))
Consideration takes the background of Daily Price, because it was calculated from that cell.
| Key | What it sets |
|---|---|
background, text_color | A colour on the cell, or on its text. A stronger background is background_strong. |
border_top, border_right, border_bottom, border_left | A colour on one edge of the cell. |
dot, icon | A colour dot before the value, or an icon beside it. |
bold, italic, underline, strikethrough | True or false. |
size | large or small. |
A colour is a name from the colour chooser, such as lime, indigo, rose, sky, or gray. A name that is not one of those is a check error that lists the valid ones. An unusable colour or icon on a run skips that one mark and reports it. The rows are still written.
Marks that belong to one view
A view formula is the conditional formatting of a table, board, list, calendar, timeline, or details view. It runs on each row the view shows, and it never changes the stored value. Sorting, filtering, and export keep the value the step wrote. The formula can colour the row of the signed-in viewer, and it can take the colour of an option the row holds.
- The row's mark paints the whole row, the card, the list item, the calendar chip, or the timeline label. A cell's background sits on top of the row's.
- Where a data style and a view formula set the same key, the data style is applied first and the view formula replaces only the keys it sets.
- A view formula that fails on one row leaves that row unmarked. The other rows still paint.
Where formulas are used
The same language, the same check, and the same sentences appear in four places.
| Place | What the formula does there |
|---|---|
| A step's file | The whole step: load, shape, check, and save, in one .ffl file beside the workflow. |
| A Formula operation | Statements over the rows that one operation receives, inside a step's list of operations. Its badge shows the same sentences. |
| A view's formatting | Evaluated one row at a time, a formula determines how a table, board, list, calendar, timeline, or details view displays that row. Sentences and conversion apply here as well. |
| A trigger condition | One true-or-false expression that decides whether a step runs, such as holding an export back while a check upstream has failed. |
- A step's file sits beside the workflow, in a folder named after it. It is a plain text file in the workspace, with a history of every change.
- One file can hold several named formulas, and a step can point at one of them by name, so a rule written once can be shared between steps.
- A step's result is tied to the text of its formula. Editing a shared formula re-runs the operation that uses it and the ones after it, and leaves the rest of the step alone.
- A trigger condition has a sentence of its own:
input().rows().count() > 0reads as Run when the number of rows in the incoming table > 0.
Bounds
A formula is bounded so that one statement cannot exhaust a run. Passing a limit is a run failure: the step stops and writes no rows.
| Limit | Value |
|---|---|
| Calculation steps for one expression on one row | 2,000,000 |
| List length | 100,000 items |
| Text produced by one joining or replacing function | 1,000,000 characters |
| Text a pattern is applied to | 100,000 characters |
| Pattern length | 512 characters |
| Nesting of brackets and expressions | 100 levels |
| Exception severity | 1 to 5. Levels 1 and 2 are info, 3 is a warning, 4 and 5 are errors. |
Docs:Errors and limits
Conclusion
Formula is a small language with a strict round trip. The file that runs is the file a reviewer reads. The sentence on each card is derived from that file, and an edited sentence is written back to it: directly when the wording is Fontana's, and through Fluid, a check, and the author's approval when the wording is the author's own.
This applies to complex rules as well as simple ones. A check with a list, a calculated key, a message, a severity, and a follow-up action is one sentence, and the owner of the rule can read it and change it.
Once a statement is saved, the workflow engine runs it as data logic: exact decimals, lineage on every cell, and a check before the run. The Fluid whitepaper describes the model itself, and the documentation below covers every statement and function.
Further reading
Docs
- FormulaThe language, stage by stage
- Write formulas in FlowCards, Formula text, and plain English
- Language basicsStatements, expressions, types, and the grammar
- Function referenceEvery function, by family
- Worked examplesFormulas with their input and output rows
- Errors and limitsWhat the check reports, and the size limits
- Data lineageTracing a cell, and the OpenLineage export
- Styles and view formulasMarks that follow the data, and formatting for one view
Whitepapers
- The Fontana Knowledge GraphHow documents become a graph an agent can search and cite.
- The Fontana Agent HarnessHow an agent keeps working on a task, across turns, tools, and models.
- The Fontana Workflow EngineHow a workflow runs, and what a run leaves behind.
- The Fontana Formula LanguageHow a step is a file of statements you can read as English.
- Fluid, Fontana's workflow language modelHow plain English becomes checked Formula.