cello

Editing cello files: the agent guide

How an AI agent reads, questions and changes a cello file safely, with the cello command and its MCP tools. Made from GUIDE.md in the cello repository.

A cello file (*.cello) is a spreadsheet stored as one HTML file. The data, formulas, and views are plain text blocks near the top; the browser runtime sits at the bottom. The file is read-only in the browser, so people and agents change it by editing that text and checking the result with the cello command-line tool.

The full format is in the spec. This page is the part you need to edit files safely.

Starting a file

cello guide                              # this page, from the CLI
cello new budget.cello --example budget  # a complete example to adapt (or --example invoice)
cello new blank.cello --title "Blank"    # one empty table
cello import data.csv -o data.cello      # from CSV, Excel (.xlsx), a Data Package, or a public Google Sheets link
cello google status                      # private Google Sheets and files in Drive need `cello google setup` and `login`
cello link report.cello ../hr/salaries.cello --value "SUM(staff.salary)" --as payroll   # see "Linking to another file"
cello edit budget.cello                  # a spreadsheet-style editor for people, in the browser

If you have the cello MCP tools (cello mcp), prefer cello_edit while a person has the file open: your changes show up in their editor at once, can be undone, and are recorded in the file's change log. The rules below still apply.

Reading a big file without reading all of it

Read from the top down and stop as soon as you have the answer. A large file's editable text can be tens of thousands of tokens; its outline is one or two thousand.

cello outline budget.cello              # views, tables (row counts, keys, column names), inputs and results with values
cello names budget.cello --match rent   # names with their values (all of them without --match), and the row holding each table-kept input
cello view budget.cello summary         # one view as text: figures and markdown tables, formatted as a person sees them
cello view budget.cello summary --section "By category"   # just the part under one heading
cello columns budget.cello expenses --match "amount|date"  # columns whose name, title or formula holds a word; all without it
cello rows budget.cello expenses --columns date,amount --where "amount > 500"   # just the rows and columns needed
cello eval budget.cello "SUM(expenses.amount)"   # any number; several formulas give one line each
cello explain budget.cello total_remaining       # why a number is what it is: its formula and values, down to the inputs
cello leverage budget.cello total_remaining      # which inputs move it most, each tried across its own range
cello eval budget.cello total_budget --set months=6   # a what-if, never saved; also price@high=25 or table.column[row]=value
  • Views are the file's own summaries. Answer from them before reading rows. A view as text gives a long chart as a sample of its rows and leaves out what is slow to work out (leverage) or meant for clicking (the inputs panel's rows), saying so in place; --full gives everything.
  • A file may keep its inputs in its inputs table, one row each (see "Inputs and cases"). The outline lists them by group, with the case in force; explain says which column a value came from.
  • Older files keep inputs in a hand-built table (levers, assumptions) and look them up by name. The outline lists those as "Inputs kept in tables" with the row to change, such as levers[employer_tax].value; change that row's stored cell, not the name. cello inputs adopt converts such a table (see below).
  • When you lead other agents, give each the outline plus the one view or table its task needs, not the whole file.
  • Answer "why is this number X?" with explain (a name, table.column, table.column --row 3, or any formula), not by reading formulas yourself.
  • Try scenarios with --set on eval, view, explain and outline: the answer is worked out as if the input (or cell, by row number or key) had that value, and the file is never written. Change the file only when asked to.
  • The same readings are the cello_outline, cello_view (with section, and max_tokens and from to read a long one in pieces), cello_columns (with match) and cello_explain MCP tools, and set on cello_eval, cello_view and cello_explain. Use cello_rows (with from and count) only for the rows a task needs. cello_guide gives a short core; ask it for a topic (inputs, views, helpers, …) when a task needs one. To change a view, read its source with cello_template and change one piece with cello_edit's set_template (or set_styles) given find and replace.

Pointing at a place

Any address of a sheet can end in #at=<place>, and it opens there: a group of the inputs panel unfolded, an input's row, a heading, a row or cell selected, a value in the Values panel, a comment. cello address gives the address, checking the place is there:

cello address budget.cello "group:Series A"            # also input:price, name:total, heading:pnl/By month,
cello address budget.cello "cell:expenses[rent].amount" # table:expenses, row:expenses[rent], column:expenses.amount, comment:c-8f2a
  • Rows are named by key, as in edits, so the address survives rows being added or sorted.
  • On a cello.sh sheet it's the sheet's own web address (never your agent link), so a person can open it. Give one when you tell a person where to look. With the MCP tools: cello_address.

Comments from people

A person can leave comments on cells and views in the editor. They are for you, kept beside the file (never in it), and cello outline starts by saying how many are open.

cello comments budget.cello                          # each open comment: what it's on, what that showed, and the text
cello comments budget.cello --take all --as planner  # once you've taken them on; they leave the person's list
  • Answer the person where you're working with them, not in cello. Take a comment once you've acted on it or answered it.
  • A comment on expenses[rent].amount names the row by its key, as edits do; one on a view names the view, the heading above, and the box or setting it was on.
  • With the MCP tools: cello_comments, with take.

Changing a file in one go

Send changes as an edit script, one per line. They apply in order as one logged, undoable step, or not at all, and the reply says which values moved, so there's nothing to re-read afterwards.

cello do budget.cello --as planner <<'EOF'
# set stores a value; := works a formula out
set months = 6
set price@high = 25 was 20
set price@low := price@low * 0.9
set categories[rent].monthly = 2200 was 2100
add expenses date = 2026-10-01, category = rent, description = "October rent", amount = 2200
update expenses set status = paid where AND(status = "planned", date <= DATE(2026, 9, 30))
update categories set monthly := monthly * 1.05 where id <> "rent"
delete expenses where amount = 0
calc categories.share := spent / total_spent ; unit percent ; title "Share"
name monthly_burn := total_spent / months ; unit USD
rename expenses.description to note
view add pnl title "Profit and loss" at 1
case rename projected to base
EOF
  • Views: view add NAME [title "T"] [at PLACE], view delete NAME, view move NAME to PLACE, view rename NAME to NEW, view title NAME "T" (places count from 1). Fill a new view's template with cello_edit's set_template, or add_view with its template.
  • = stores the value written; := works out a formula. With set and update the answer is worked out once and stored (set price@low := price@low * 0.9); with calc and name the formula itself is kept. A value with a space or a comma is quoted: "October rent".
  • was on a set (a cell or an input) refuses the change if the value is no longer what you read.
  • Values are read as their column's type, so dates are plain there (2026-10-01). In a formula a date is DATE(2026, 10, 1): 2026-10-01 would be subtraction, and is refused.
  • --dry says what would change and which values would move, without saving. --lease <token> when your lead gave you one.
  • cello_do takes the same script; cello_edit takes the same changes as JSON (including update_rows and delete_rows with where), and both take dry.
  • set_template with find and replace changes the one place find matches, and is refused when it matches more than once: anchor it on a phrase that appears once (a heading's words), not on a tag that repeats (a c-link).
  • A yes/no input takes true or false, or 1 or 0, in edits and what-ifs alike: x@(seed2_on = FALSE).

Inputs and cases

A file can keep its inputs in one table whose descriptor says "cello": { "role": "inputs" }. Each row is an input, and its name column is how formulas refer to it: a row named price is read as price.

name,title,group,type,unit,value,low,base,high,override,pick,min,max,confidence
scenario,Scenario,Settings,case,,base,,,,,,,,
price,Price per seat,Revenue,number,USD,,15,20,25,,,0,,M
churn,Monthly churn,Revenue,number,percent,,0.04,0.025,0.015,,,0,1,L
  • An input's value is, in order: override, which holds in every case; the case in pick, which locks the row to one case; the column of the case in force; the table's formula for that case; then value. A row may also hold notes in any other column (confidence, source, why).
  • cases in the table's descriptor names the setting and its cases, and formulas for cases with no column of their own, which read only the row: "cases": { "by": "scenario", "cases": ["low", "skeptic", "base", "high"], "derive": { "skeptic": "(base + low) / 2" } }. The setting is a row of type case, or an ordinary input with those categories.
  • Dials: some rows can follow their own setting instead of the main one. The descriptor lists them, each with its own words for the cases: "dials": { "spending": { "ample": "conservative", "planned": "projected", "lean": "optimistic" } }, and each row's dial column names the one it follows. A dial set to one of its words picks that case; set to anything else ("from case") it follows the main setting. "words": { "custom": "projected" } gives the main setting extra words the same way. x@lean sets the spending dial; x@optimistic the main setting.
  • Yes/no and lists: a row of type boolean is a checkbox (in a number column it is held as 1 or 0, else true or false); a row with a choices column (lean|planned|ample) is a dropdown. cello inputs retype <file> series_a_on boolean turns a 1-or-0 input into a yes/no one, rewriting the formulas and views that read it (series_a_on >= 0.5 becomes series_a_on), and saves only if nothing else is proved to move.
  • Labels: a labels column gives an input themes (pricing|growth), any number each. cello leverage shows them, and the inputs panel can be grouped by them.
  • Off for now: inputs that only matter sometimes say when, as a yes/no formula: a when column on a row, or an entry naming a group or one input, set with an edit script line, when "Series A" := series_a_on (when "Series A" always clears it). An entry covers a linked model's rows too, by group or by name. While it's no, the panel folds them away at the end, leverage skips them, and the outline marks them [off: …]; their values stay. Leave inputs marked off alone unless asked.
  • min and max hold an input in range: a value outside them is refused by edits, what-ifs and view controls, and reported by check.
  • Percents: anything written as text (edit scripts, cello_edit, --set, formulas) uses the stored fraction, 0.025 for 2.5%. Only a person typing in the editor's sheet or a view control types what they see (2.5). Each row of the inputs table is shown in its own unit.
  • Change inputs with set price = 22 (the column of the case in force, or value) or set price@high = 25 (one case). When an override or a case formula decides the value, set price = … is refused and says which. The editor's header switches cases.
  • In formulas, x@high is x worked out in the case high, and x@(price = 25, people[eng1].pay = 150000) is x worked out with those inputs or stored cells changed; an input set this way holds in every case. The file isn't changed. end_arr@low, runway@(price = price * 1.1) - runway.
  • A what-if (--set price=22, a view control) changes an input the way saving would: only in the case in force, so x@low beside it still means the low case. --set price@high=25 changes one case's value. When a what-if switches the case as well as changing a value, the "was" it reports is the switched case alone, so the move shown is the change's own.
  • Renaming a case: case rename projected to base in an edit script (rename_case in cello_edit) renames it everywhere the file names it: each inputs table's cases, their columns and formulas, words and dials, rows picked to it, the setting's value and choices, x@projected and "projected" in formulas and views, and a linked model's copies. case drop custom removes a word (or, with as base, a case worked out by formula), moving what named it to the case it stood for. Both are kept only when every value is proved to come out the same in each case, else refused with what would move; words people wrote (notes, labels) are left as they are. A linked model's copies follow their source, so run the same lines on each sheet the models come from, then refresh.
  • INPUT(name) is an input's value by its name as text; in the inputs table, a calculated column = INPUT(name) shows each row's value in force.
  • cello inputs adopt <file> turns a hand-built table of inputs looked up by name into the inputs table. It saves only after proving that every name, calculated column and view comes out the same under every case and every choice of every dial. --dry first. When the cases are too tangled to read off the formulas (several dials), say how: --cases '{"by": "case", "cases": ["conservative", "projected", "optimistic"], "derive": {"projected": "(conservative + optimistic) / 2"}, "dials": {"spending": {"lean": "optimistic"}}}' --dial-column axis; the proof still decides.
  • These need runtime 0.8.0 or later; check warns when a file carries an older one, and cello upgrade replaces it.

Naming rows, and saves that keep the file working

  • Name a row by its key, never by guessing its position: rent (the primary key, or the first column when its values are unique), 2026-07-31, founder_pay (a key of several columns), or date=2026-07-31, category=founder_pay (any columns). #3 means the third row when position really is meant. The outline says each table's key, and whether it repeats.
  • A name matching several rows is refused with the rows it could mean. Pick one and name it more fully.
  • When setting a cell you read earlier, say what you expect to find ("was": "2100" on cello_edit's set); the edit is refused if someone changed it since.
  • A save that would add errors to the file (a word in a number column, a formula naming a column that's gone) or change nothing is refused. force saves anyway when you'll fix the errors next.
  • cello undo budget.cello takes back the last change; --by helper-1 takes back everything one agent did; --since <time> everything since then. The undo is itself a logged change. --dry lists what it would undo.

Splitting work among helper agents

A lead agent can hand each helper one or a few tables and take the work back table by table, so helpers working on different tables of one file never overwrite each other.

cello extract budget.cello --table expenses --to helper-1 > expenses.html   # that table only, leased to helper-1
cello extract budget.cello --table expenses --columns amount --where "amount > 500" --to helper-1   # part of it: those cells only
cello apply budget.cello expenses.html                         # swaps it back in, logged under helper-1; the lease ends
cello lease budget.cello --table expenses --to helper-1        # a lease without an extract: prints a token for cello_edit
cello changes budget.cello --since "#40"                      # what changed after the first 40 logged changes, and which values moved
  • Give a helper the outline, the views or explanations it needs, and its table extract. It edits the extract's data and settings and nothing else.
  • A wide table's extract carries every calculated column's formula. When a helper changes only some cells or formulas, hand it part of the table (--columns, --where): each row comes with its #, calculated columns only when named, and putting it back changes just those cells and formulas. Cheaper still for a few changes: a lease, and the helper's own edit script with its token.
  • Putting an extract back is refused if someone else changed that table after the extract was made; extract again and redo the change. Linked tables can't be handed out this way.
  • A lease holds a helper's tables: while it lasts, agent edits to them need its token, and edits made with the token are held to those tables and logged under the helper's name. The person working in the editor isn't bound by leases.
  • With the MCP tools: cello_extract (with to for a lease, columns and where for a part) and cello_apply, or cello_lease and then cello_do or cello_edit with that lease token.
  • changes (and cello_changes) ends with where to ask from next time (#n), so the lead catches up after helpers finish without rereading the file. Values that moved come from the log, so this works even when the file was also edited by hand.

Sheets on cello.sh

A person can hand you a sheet kept on cello.sh by giving you its address from "Give to an agent": https://cello.sh/@acme/plans/budget?agent=…#k=…. Pass that whole address, including the part after #, wherever a tool takes a file.

cello outline 'https://cello.sh/@acme/plans/budget?agent=…#k=…'     # quote it: the shell reads ? and # otherwise
echo 'set months = 6' | cello do 'https://cello.sh/@acme/plans/budget?agent=…#k=…'
cello close 'https://cello.sh/@acme/plans/budget?agent=…#k=…'       # ends the session
  • With the MCP tools, start with cello_open on the address: it says who shared the sheet and gives the outline. Then every tool works as on a file, and cello_close ends the session when you're done.
  • The part after # is the key. It stays on this computer: the sheet is unlocked here, and cello.sh only ever holds it locked.
  • Each change is saved to the sheet at once, the people who have it open see it, and it is logged as "'s agent". If someone saved first, the same change is made again on their version (up to three times) rather than overwriting theirs.
  • Every reading command works on an address (outline, names, view, template, columns, rows, explain, eval, leverage, check, changes, address), and so do do, undo, refresh, push, link, relink, unlink and close. Commands that rewrite a file on this computer whole (extract, apply, lease, fmt, rename, upgrade, inputs) are refused for a sheet on cello.sh; use the edit-script line instead (rename expenses.description to note). With the MCP tools, cello_extract, cello_apply and leases are refused the same way.
  • When cello_open opens an address that also opens the sheets this one links to, it lists each linked sheet's own address. A linked model's inputs (their titles, groups, values) change here like any input, but a linked sheet's own rows change only through its own address.
  • Links between sheets on cello.sh work like links between files: a link's path is read from the sheet's folder in its space. They follow their sources by themselves, in the browsers of people who can open both sheets: after a source is saved there, and when a sheet is opened. An address opens its own sheet only, unless the person ticked "Also let it open the sheets this one links to" when making it: then refresh and push (cello_refresh, cello_push) work on it, and opening it lists each linked sheet's own address, for changing that sheet. Otherwise they are refused, and a change you make to a source reaches the sheets that link to it when one of them is next opened.
  • A sheet renamed or moved on cello.sh is still found by its old name. Renaming or moving a sheet (or a folder above it) in the browser points the links in the sheets that read it at the new name, where that person can edit them; to do it from here, relink with the new path from the sheet's folder (relink code to code-proforma.cello), on an address that also opens that sheet, since the new source is checked. cello link works the same way: on an address that also opens the source.
  • An address stops working when its owner ends the session, when you close it, or after 12 hours unused. Ask the person for a new one.
  • When cello_open says cello.sh has a newer cello tool, or check says a file's runtime is newer than the tool knows, run cello update (for a downloaded copy, node ~/.cello.mjs update) and restart the cello MCP server. It fetches the tool cello.sh serves and checks its SHA-256 first.
  • An "anyone with the link" address (no agent=) can be read the same way, but not changed.

What you may edit

Block Looks like Edit?
Descriptor <script type="application/json" id="cello-package"> yes
Table data <script type="text/csv" data-cello-path="lines.csv"> yes
View template <script type="text/x-cello-template" data-cello-view="invoice"> yes
View styles <style data-cello-view="invoice"> yes
CSP <meta>, <noscript>, runtime <script data-cello-runtime> never

You can stop reading the file at <script data-cello-runtime: nothing after it is editable. cello extract <file> prints only the editable blocks, and cello apply <file> <extract> puts an edited extract back.

Rules

  1. Adding, removing, or renaming a column changes the CSV header and the schema fields together. To rename, use cello rename <file> <old> <new> [--table <t>]; it also rewrites every formula and template that uses the name.
  2. Derived numbers are formulas (computed columns or names), never values typed into CSV.
  3. Meaning goes in data (categories, tags, computed booleans), never only in a template or stylesheet.
  4. Keep CSV canonical (cello fmt does this) and keep row order unless asked to change it.
  5. Never write </script, <script, <!--, or </style anywhere in a block, in any letter case.
  6. After editing, run cello check <file>. Run cello eval <file> <formula> for any value you report, rather than computing it yourself.
  7. When editing someone else's file, run cello check <file> --against <original>. It fails if anything outside the editable blocks changed.
  8. Linked tables and values (they carry a link) are copies from another file: change them at their source and run cello refresh, never by editing the copy.

Checking your work

cello check invoice.cello                                  # every problem, with block and line
cello eval invoice.cello total                             # 2813.91
cello eval invoice.cello line_total --table lines --row 2  # rows are 1-based
cello eval invoice.cello -- -total                         # -- before a formula starting with -
cello fmt invoice.cello                                    # canonical CSV and descriptor layout
cello watch invoice.cello                                  # live preview that reloads on save
cello share invoice.cello                                  # read-only links for people on your Tailscale network

check exits 0 when clean and 1 on errors (--strict makes warnings exit 2). --json gives { level, code, block, line, column, message } records.

Formulas in one screen

  • Columns are referenced by name, never by cell address. Inside a table's computed column, a bare name is that row's value: qty * unit_price. table.column is the whole column as a list: SUM(lines.amount).
  • Names (cello.names) are single values: inputs have value, derived ones have formula.
  • Strings use double quotes; "" inside is a literal quote. Function names are case-insensitive; column and table names are lowercase.
  • No implicit conversion: "5" + 1 and 1 & "x" are #VALUE. Empty text is null. Arithmetic with null gives null; aggregates skip nulls.
  • There is no TODAY(), RAND(), or TEXT(). Use an input name such as as_of for "today", and let views format numbers.
  • Conditional formatting is a computed boolean plus CSS: { "name": "overdue", "type": "boolean", "formula": "AND(status <> \"paid\", due < as_of)" } becomes data-overdue="true" on the row.
  • Functions: SUM AVERAGE MIN MAX COUNT COUNTA ROUND ROUNDUP ROUNDDOWN ABS MOD IF AND OR NOT IFERROR ISERROR ISBLANK COALESCE LEN UPPER LOWER TRIM LEFT RIGHT MID CONCAT CONTAINS DATE YEAR MONTH DAY EDATE EOMONTH DAYS PERIODEND PERIODLABEL PRODUCT EXP LN FILTER TAKE INDEX UNIQUE XLOOKUP HAS ROWS ROWNUM INPUT.
  • x@case and x@(name = value, table[row].column = value) work x out as if those were so (see "Inputs and cases").
  • A column can read its own earlier rows with INDEX(table.column, ROWNUM() - 1) (any literal lag of 1 or more) or TAKE(table.column, ROWNUM() - 1), guarded with IF(ROWNUM() = 1, …). Columns of one table may loop this way; any other loop is #CYCLE.

Linking to another file

A file can use a value or a table worked out in another cello file. Only the result is stored, with a note of where it came from, so the file still opens anywhere on its own, and a salaries file's total can feed a budget without a single salary landing in it.

cello link report.cello ../hr/salaries.cello --value "SUM(staff.salary)" --as payroll      # one value
cello link report.cello ../hr/salaries.cello --table staff \
  --group dept=department --column total="SUM(salary)" --as by_dept                        # totals per group
cello link report.cello ../hr/salaries.cello --table staff \
  --where 'department = "Support"' --column who=person --as support                        # chosen rows and columns
cello link report.cello budget.cello --table categories                                     # a whole table
cello refresh report.cello                  # bring every link up to date; prints what changed
cello check report.cello --links            # also warns when a copy is behind its source
cello relink report.cello payroll ../hr/pay.cello   # the source was renamed or moved: read it from its new path
  • The source is a path relative to the file's folder, or a share link from cello share (http://machine.tailnet.ts.net:4747/budget.cello).
  • Formulas use linked tables and values like any others: SUM(by_dept.total), payroll * 12.
  • --group columns must be totals (SUM, COUNT, AVERAGE, MIN, MAX), never a group's list of values. A group of one still shows that one row, so group by something coarser when that matters.
  • Links are live by default: the editor updates them while the file is open. --pinned waits for cello refresh or the Update button.
  • --input name=value works the link out as if the source's input were set to that value, such as --input scenario=low, without changing the source. Link the same table several times with different inputs to compare cases side by side.
  • The source never learns who reads it, unless the link says --tell: then the source lists this file beside it and warns before a column it uses is deleted.
  • Renames in the source carry through on the next refresh.
  • When the source file itself is renamed or moved, point the link at its new path: relink payroll to ../hr/pay.cello in an edit script (or cello_edit's {"relink": {"name": "payroll", "source": "../hr/pay.cello"}}, or cello relink). A linked model goes by its prefix (relink rev to projection.cello). The new source is read first and must offer what the link needs, as making the link checks; was refuses it if the link no longer reads the path you expect. The link keeps its copy until the next refresh.
  • A linked copy can't be edited (rule 8), but you can add computed columns of your own to a linked table.
  • Nothing is read from a source until it is allowed for that file. Making the link allows it. For a file someone else made, check its links name files you expect, then run cello refresh --allow.

Sharing a model

A link brings results; a model link brings the math behind them, so a revenue figure here still responds when someone changes the price. Only what the source's owner shares can travel.

cello shared projection.cello --inputs scenario,price,churn --tables months,years   # in the source, once
cello shared projection.cello --preview arr_y5   # what linking arr_y5 would take: formulas, rows, fixed numbers
cello link proforma.cello projection.cello --model --as rev --results years.revenue,arr_y5
cello refresh proforma.cello                # brings the model up to date; inputs changed here keep their values
cello push proforma.cello rev               # sends input values changed here back to the source
cello unlink proforma.cello rev             # ends the link; what it brought stays as this file's own
  • Only what the owner shares leaves the file. Everything arrives prefixed (rev_price, rev_years): anything a shared input feeds as a formula, everything else as a named fixed number (rev_profit = rev_revenue - rev_payroll, with rev_payroll = 242,000 fixed).
  • A table the owner doesn't share leaves only as totals over two or more of its rows (SUM, AVERAGE, COUNT). A lookup, a single row, or a total of one row is refused, naming the table; the link also warns when a total equals one row.
  • Shared inputs arrive as rows of an inputs table (rev_levers), with their notes (why, confidence, source). Change them here like any input, and their title, group, section or labels too, to lay them out for this file; a refresh keeps what was changed here. Values changed here (a case's value, an override, a lock) go back to the source only when asked: cello push proforma.cello [rev] (or the editor's Send button) writes them there as one logged change, never over a value the source changed meanwhile, and leaves layout changes here. When the case setting is shared, every input the results read that changes with the case must be shared too, or the link is refused and lists them.
  • Cases: if this file (or a model already linked) has a setting with the model's cases, the model follows it, so one switch moves everything. Extra choices here are fine when they're words for its cases (custom standing for projected). Its dials follow ones here with the same name and choices. A model whose cases share some names with another setting here is refused, since x@high would be ambiguous.
  • Fixed numbers are listed apart in the outline and can't be set here; they follow the source on refresh.
  • A table's rows travel only if the source shares that table. A formula that needs a private table row by row is refused with the table and formula named; use a total there instead.
  • A model's other tables can't be edited here; change them at the source. A model of a file that itself holds a model works the same way. When that inner model is a file this one links too (Work links Code, and so does this file), Work's copy reads this file's code_… instead of bringing its own, so one change moves both; link first adds to this file's link anything Work reads from Code that it lacks.
  • cello apply of a whole file (a script that writes the file anew) keeps the model links it doesn't mention, with their tables and names. So link first, then apply formulas that read the model.

Views in one screen

A view is a query, a template, and a stylesheet. Templates are strict HTML: close every tag except br, hr, img, col.

<tr c-each="billable"><td>{{ item }}</td><td>{{ line_total }}</td></tr>
<tr c-empty><td colspan="2">No billable lines.</td></tr>
<p c-if="total > 1000">Large invoice</p><p c-else>Small invoice</p>
<p>Tax rate: <span c-input="tax_rate"></span></p>
<p>Due {{ due_date | date(long) }}</p>
  • A view named index is the file's front page: listed first, and opened by default unless cello.defaultView names another.
  • c-each repeats an element per row of a query (defined in the view's queries) or a table. No nesting.
  • Summaries: a query with "group": { "month": "EOMONTH(date, 0)" } gives one result per group. Inside its c-each, {{ month }} is the key and a column is the group's values as a list: {{ SUM(amount) }}, {{ COUNT(amount) }}. sort can use them: [["SUM(amount)", "desc"]].
  • c-input="name" on an empty element lets a person change an input name (or, inside c-each, a stored column of the row) from the view. Changes are what-ifs until saved from the editor's view window; give a string input categories to offer a list.
  • {{ formula }} is formatted from the column's unit (USD → $1,234.50, percent → 8.75%); add a filter to override: number(2), currency(EUR), percent(1), compact ($1.72M, for narrow table columns), date(short|medium|long|full), date(month) (Apr 2028), datetime(...), upper, lower, raw.
  • No scripts, event handlers, forms, iframes, or SVG. Links and images are literal: no {{ }} in href or src.

Charts, summary boxes, settings and the inputs panel

Ask for these by element and cello draws them, the same in the browser, in print, in cello render, and as text in cello view. Never fake a chart with styled boxes.

<c-settings names="case growth" switch="case" note="Case sets growth too."></c-settings>
<section class="c-stats">
  <c-stat label="Lowest cash" value="cash_low" note="{{ cash_low_month | date(medium) }}" spark="TAKE(months.close, 36)" tone='IF(cash_low < 0, "bad", "")'></c-stat>
</section>
<c-chart from="months" x="month">
  <c-bars value="revenue"></c-bars>
  <c-bars value="spending" label="Spending, all cash out"></c-bars>
  <c-line value="cash" scale="right"></c-line>
  <c-line value="cash@low" scale="right"></c-line>
</c-chart>
<c-inputs></c-inputs>
  • c-chart reads from (a query or table) and plots each c-bars and c-line value (a row formula) against x. Lines with scale="right" read against a second scale; both share zero. A line using @ (another case) is drawn dim and dotted, and left out when it is the case in force. Names and money formats come from the column; label overrides.
  • More charts: stack on c-chart stacks its bars (and c-area series), and stack="spend" on a c-bars gives it a stack of its own beside the others (revenue stacked by product, spending beside it); <c-pie from="categories" label="name" value="spent" donut></c-pie> draws a pie or doughnut; <c-hbars from="by_left" label="name" value="remaining"></c-hbars> draws bars across. Any of them can read a grouped query, one point or slice per group.
  • c-stat is a summary box: label, value (a formula), and optional note (text with {{ }}), spark (a list), meter (0 to 1), tone (good, warn or bad). Put several inside class="c-stats".
  • c-settings puts input names in one bar; switch names the ones drawn as buttons. A title like Growth: how the market responds gives the label and the hover help.
  • c-inputs draws the inputs table, and a linked model's inputs merged into the same groups, in folding groups with each row's value, its range across cases (the dot drags to set the override), an override field and a lock to one case. A Group by control above the groups regroups them by whatever splits them: group (the default, or the column group-by names), section, label, the setting each follows, how sure it is (confidence), or the file it comes from. The choice holds while the page is open and isn't saved. order="Growth | Funding | Team" puts those groups first, in that order. Inside it, <c-intro group="Costs">…</c-intro> puts any template content at the top of that group.
  • <c-leverage value="arr_y5" top="8"></c-leverage> shows what moves a result: its inputs, widest swing first, each moved across its own range. labels="pricing" keeps to inputs with that label. Since a big file can take minutes, a live page works it out only when a person clicks its button, and after an edit keeps the last answer marked out of date until asked again; an exported file's preview leaves it out.
  • <c-fold title="People" note="{{ ROWS(people) }} people">…</c-fold> folds any content away like a group of the panel.
  • <c-why of="arr_y5">Assumes <c-link at="input:churn">churn</c-link> holds.</c-why> puts a small (i) where it stands (after a number, in a heading). Hovering or clicking it opens a note: your words, which may link to places, then, with of (a name or formula), how that number is worked out, each name a link, and the inputs it rests on. Either part may be left out. cello view gives the note in place as (why: …). A c-why can't go inside a c-each row or inside another piece (a c-stat's label is an attribute): put it beside the piece instead, such as in the heading above a row of summary boxes.
  • A bar of links to the views, pinned to the top of every view: nav all in an edit script (or nav cover pnl cash for those, in that order; nav off removes it). It follows renamed and deleted views.
  • Settings on every view: settings scenario spending risk growth puts those inputs' controls (the case, dials, switches) in a row under the bar, on every view, a choice of five or fewer as buttons; case:row or growth:dropdown chooses for one; settings off removes it. The editor's header has no case switches of its own: a file shows the settings it chooses, here or in a view's c-settings.
  • By year, quarter or month: give the file an input with those choices (cello_edit set_name {"name":"period","entry":{"value":"quarter","categories":["year","quarter","month"]}}, or a row of the inputs table with choices), group the view's query by PERIODEND(month, period), name each group {{ PERIODLABEL(p, period) }}, and put <c-period input="period"></c-period> on the view. Its buttons redraw the view by each period for the person looking, never saved.
  • Links between pages: <c-link view="pnl">the P&amp;L</c-link> or <c-link table="people"></c-link> (empty, it shows the title) opens that view or table, in the editor, on cello.sh and in an exported file. <c-link at="group:Series A"> opens a place instead (see "Pointing at a place"). <c-pages></c-pages> draws a card for every other view, with its description (view describe NAME "…"); views="pnl cash" picks and orders them, tables="people" adds tables. For a cover page.
  • Putting a file's pages together: the view named index is the front page; nav all (or nav with the views in order) gives every view the bar of links; settings case … puts the shared switches under it; c-period gives a view Year, Quarter and Month buttons; <c-link at="…"> and c-why point at the inputs behind a number. Use these rather than building a header, switches or links by hand in each view.
  • Pieces take class, id, style, c-if and c-else, but can't go inside c-each. Colors follow the text; set --c-1… --c-6, --c-good, --c-bad, --c-warn and --c-bg (panel color) in the view's CSS to match a file's palette. Details are in the spec, "Built-in pieces".

Changes that move no numbers

Relabelling, regrouping, moving inputs between groups, merging views or renaming a case should leave every number as it was. Prove it rather than assume it:

cello eval plan.cello "cash_2029@conservative" "cash_2029@base" "cash_2029@ambitious" "arr_y5@conservative" "arr_y5@base" "arr_y5@ambitious" > before.txt
# … make the change …
cello eval plan.cello "cash_2029@conservative" "cash_2029@base" "cash_2029@ambitious" "arr_y5@conservative" "arr_y5@base" "arr_y5@ambitious" | diff before.txt -
  • Pick the headline names (cash at year ends, lowest cash, revenue by year) and read them in every case with x@case, before and after. case rename, case drop, inputs adopt and inputs retype prove this themselves.
  • Keep a yes/no name that reconciles the books, such as reconciles := ABS(operating_result + below_the_line + raised - cash_change) < 1, and check it is Yes in every case after each change.

Numbers people will rely on should say what they are:

  • Label revenue earned and cash collected differently, everywhere they appear; a column called Revenue that is really cash collected is the first thing an investor catches.
  • A ratio over a tiny base (retention with one customer, growth from almost nothing) shows n/a rather than a number that means nothing.
  • A milestone ("revenue covers spending") is the point after which it stays true, not the first month it happens once.
  • Read every page in every case: text that only makes sense in one case ("a shortfall of -$40K", a raise that's switched off) is easy to miss.

Building a proforma

For a financial plan, budget-to-forecast or investor proforma: a business simulation a person can tweak, not a page of typed numbers.

  • Inputs: one inputs table (see "Inputs and cases") with a column per case (conservative, base, ambitious) and notes on each row (why, source, confidence). Group inputs in the order a reader weighs them: growth, funding, team, running costs, each product's detail, then plain facts (current actuals, tax rates, contract terms). Inputs that only apply sometimes say when (when "Series A" := series_a_on).
  • Cases: cases differ only in outcomes. Accounting choices (how costs are split) are the same in every case, and money in the bank or committed isn't tied to a case. Optional dials (growth, spending, risk) follow the case unless set.
  • Products: each product as its own sheet, linked into the company sheet as a model (see "Sharing a model"), so each can be read and reviewed on its own.
  • The engine: a months table, one row per month to the horizon: demand, recurring revenue, revenue earned, billings and cash collected, hiring, spending by line, money raised, cash at the start and end of the month. A calendar-years table sums the flows and takes year-end balances.
  • People: one row each, with a start rule (a date, months after a raise, revenue reached) and a cash test (hire only while N months of runway remain). Cap headcount with explicit inputs; a revenue-per-person formula hides the plan.
  • Funding: dated rows marked received, committed or assumed; show what's in hand apart from what's assumed.
  • Profit and loss: by function (cost of revenue, including the share of support and engineering spent serving customers; research and development; sales and marketing; general and administrative), then below-the-line items, and the reconciling name from "Changes that move no numbers".
  • Results as names: cash at key dates, lowest cash and when, recurring revenue by year, milestone dates (first $100K and $1M, revenue covering spending for good, first profitable quarter), runway in months, and what-ifs written as x@(seed2_on = FALSE).

Pages, in this order, joined by nav with one settings row (the case, plus the switches for products and funding):

  1. The front page (index): revenue by product as bars with cash on the right scale and the other cases as dotted lines, headline summary boxes, a year-by-year table, and c-leverage on the two or three numbers that matter.
  2. Profit and loss, by year, quarter or month (c-period), negatives in parentheses.
  3. Key metrics: recurring revenue and growth, net new, customers, retention, cost to win a customer and payback, burn multiple, revenue per employee (on average headcount), gross margin.
  4. Runway and use of funds: runway at each year end, the line without the next raise, where the money goes by function, milestones.
  5. Assumptions: c-inputs, with the people plan and fundraising in c-folds and contract terms under a plain introduction.

Put a c-why beside every number an investor will question, saying why it is what it is and linking the inputs behind it.

Pitfalls seen in practice: a Revenue column that was really cash collected; a hiring rule that never fired, so a team stayed flat for three years; funding tied to a case, so the best case showed less cash; milestones set off by a one-month blip from yearly prepayments; cost splits that differed by case.

Developing a proforma with reviewers

  1. Gather. Read what exists (budgets, earlier models, the pitch, the conversation so far). Write down what's known, what's assumed and what's missing before building. Ask the person for actual figures and committed money rather than guessing.
  2. Build in layers. Product sheets first, then the company sheet that links them, then the pages. Have each layer reviewed before starting the next.
  3. Hand heavy work to helper agents, so the lead keeps its context. Each brief gives the address, whether the helper only reads or also edits (and which tables), what must not move, what to check afterwards (check clean, the headline names in every case before and after), and a word limit for its report. On cello.sh, give each helper the same address, and never two editors on one view at once.
  4. Review from several angles at once, each reviewer only reading: an investor reading it cold (what raises an eyebrow, what's missing); a diligence analyst (do pages agree, does the profit and loss reconcile to cash, do metrics follow their definitions, are there impossible values or cases that cross); a benchmarks skeptic (each outcome against typical ranges, and the input driving it). Sort what comes back into plain errors to fix now, judgment calls for the person, and missing content.
  5. Decide with the person. Fix plain errors without asking. Put each judgment call as a choice with options, what each costs, and a recommendation, and say in plain words why a reviewer flagged it: the person often knows something that changes the answer.
  6. Write rulings down where the next agent will look: the input's why note, the conversation, the agent's own notes.
  7. Check again after every round: check, the reconciling name in every case, then read each page in each case.
  8. When cello can't do something, write the exact request for cello's makers and apply it once it ships, rather than working around it with hand-built copies that drift.