Finance
One forecast, every scenario
Switch a Q4 forecast to the conservative case with a seven-operation patch instead of a second copy of the deck.
A finance review rarely ends with one forecast. Someone asks for the conservative case, and the usual answer is a second copy of the deck with a few numbers retyped. Then the two copies drift apart. Here's the same review kept as one OPF file, where the conservative case is a reviewable patch.
The example is a Q3 finance review from Larkspur Bicycle Works, a fictional bicycle maker. It's a fictional company, and every figure in it is example data. Each slide with numbers says so on the slide.
Start with one slide
These commands use the opf CLI from @openpresentation/cli 0.27.0, the version in the video. To run them without installing anything, put npx @openpresentation/cli@0.27.0 in place of opf:
opf create deck.opf.json --title "Larkspur Bicycle Works Q3 Finance Review"That writes a valid 228-byte deck: one title slide. A first patch names the deck and adds the subtitle, "Fictional company, example data". Each later slide is a small JSON Patch applied with opf edit -i, in this order: the headline, the P&L, revenue by channel, cash, the Q4 forecast and the asks.
opf edit deck.opf.json -i --patch patches/03-pnl.jsonThe headline is a metric, not a text box
Slide 2 carries the quarter in one number. OPF's metric keeps the value, its label and the change against plan as separate fields, so a renderer can lay them out and an agent can read them back:
{
"id": "headline",
"title": "Q3 revenue beat plan; gross margin 41% (example data).",
"tag": "Example data",
"metric": {
"value": "$4.8M",
"label": "Q3 revenue",
"delta": "+6.7% vs $4.5M plan",
"trend": "up",
"description": "Gross margin 41%. Example data, not a real company."
}
}Loading preview…
The tag puts a small "Example data" label above the title. Every slide with numbers has one.
The P&L is a table you can check
Slide 3 is the P&L summary as a table. Because the figures are data, a reviewer can check the arithmetic in the pull request: $4.8M less $2.83M is $1.97M of gross profit (41%), and $1.97M less $1.52M is $0.45M of operating income.
{
"id": "pnl-summary",
"title": "Q3 P&L summary (example data).",
"tag": "Example data",
"table": {
"columns": ["Line item", "Q3"],
"rows": [
["Revenue", "$4.8M"],
["Cost of goods sold", "$2.83M"],
["Gross profit", "$1.97M"],
["Operating expenses", "$1.52M"],
["Operating income", "$0.45M"]
],
"alt": "Example Q3 P&L: revenue $4.8M, cost of goods sold $2.83M, gross profit $1.97M, operating expenses $1.52M, operating income $0.45M."
}
}Revenue by channel is a chart built from rows
Slide 4 is a bar chart. Its rows are the numbers, in $M: direct online 2.1, dealers 1.9 and corporate fleet 0.8, which add up to the $4.8M on the P&L. The export draws a native chart from them, not a picture of one:
{
"id": "revenue-by-channel",
"title": "Q3 revenue by channel, $M (example data).",
"tag": "Example data",
"chart": {
"type": "bar",
"data": {
"columns": ["Channel", "Revenue ($M)"],
"rows": [
["Direct online", 2.1],
["Dealers", 1.9],
["Corporate fleet", 0.8]
]
},
"dataLabels": true,
"alt": "Example Q3 revenue by channel: direct online $2.1M, dealers $1.9M, corporate fleet $0.8M, for $4.8M in total."
},
"caption": "Illustrative figures, not a real company."
}Cash, the forecast and the asks
Slide 5 puts ending cash ($3.2M) and runway (14 months) in its title, with three short bullets on what moved cash. Slide 6 is the Q4 forecast, base case: a table of assumptions with revenue at $5.0M, a 40% gross margin, $2.00M of gross profit, $1.60M of operating expenses and $0.40M of operating income. Slide 7 lists the asks: approve the Q4 hiring plan, lock dealer pricing, and hold the board review in week 2 of Q4.
With all seven slides in, opf format -i writes the file in canonical form, and the validator checks it:
opf validate deck.opf.json --fail-on warning --format textdeck.opf.json: 0 findings (0 errors, 0 warnings, 0 info). Checked: syntax, schema, references, accessibility, content, layout (estimated).The conservative case is a seven-operation patch
The board asks for the conservative case: Q4 revenue at $4.6M instead of $5.0M. The margin and operating expenses stay as they are, so gross profit becomes $1.84M (40% of $4.6M) and operating income $0.24M. The patch first checks that the revenue row still reads $5.0M, and the edit fails if it doesn't. Then it changes the slide title, the column header, the three figures that depend on revenue, and the table's alt text:
[
{ "op": "test", "path": "/slides/5/table/rows/0", "value": ["Revenue", "$5.0M"] },
{ "op": "replace", "path": "/slides/5/title", "value": "Q4 forecast, conservative case: revenue $4.6M (example data)." },
{ "op": "replace", "path": "/slides/5/table/columns/1", "value": "Conservative case" },
{ "op": "replace", "path": "/slides/5/table/rows/0/1", "value": "$4.6M" },
{ "op": "replace", "path": "/slides/5/table/rows/2/1", "value": "$1.84M" },
{ "op": "replace", "path": "/slides/5/table/rows/4/1", "value": "$0.24M" },
{ "op": "replace", "path": "/slides/5/table/alt", "value": "Example Q4 conservative case: revenue $4.6M, gross margin 40%, gross profit $1.84M, operating expenses $1.60M, operating income $0.24M." }
]This snippet is a JSON Patch (RFC 6902): each operation names one place in the deck by its path, and opf edit applies them all or none; the JSON Patch guide walks through a smaller example step by step.
opf edit deck.opf.json deck-variant.opf.json --patch conservative.patch.json
opf diff deck.opf.json deck-variant.opf.json --format text6 changes (slides: 1 modified)
Slides
~ slide #6 "Q4 forecast, conservative case: revenue…" (id q4-forecast)
~ title "Q4 forecast, base case: revenue $5.0M (example data)." -> "Q4 forecast, conservative case: revenue $4.6M (example data…"
~ table.columns[1] "Base case" -> "Conservative case"
~ table.rows[0][1] "$5.0M" -> "$4.6M"
~ table.rows[2][1] "$2.00M" -> "$1.84M"
~ table.rows[4][1] "$0.40M" -> "$0.24M"
~ table.alt "Example Q4 base case: revenue $5.0M, gross margin 40%, gros…" -> "Example Q4 conservative case: revenue $4.6M, gross margin 4…"The test op is the one that doesn't show up: it changes nothing. The diff shows one slide modified and the Q3 actuals untouched, so the reviewer only has to check the forecast.
Check both, then hand off PowerPoint
opf validate deck.opf.json deck-variant.opf.json --fail-on warning --format textdeck.opf.json: 0 findings (0 errors, 0 warnings, 0 info). Checked: syntax, schema, references, accessibility, content, layout (estimated).
deck-variant.opf.json: 0 findings (0 errors, 0 warnings, 0 info). Checked: syntax, schema, references, accessibility, content, layout (estimated).opf convert deck-variant.opf.json deck-variant.pptxThe board gets an editable PowerPoint of the conservative case, and the source still holds both scenarios.
Why it matters: the review lives in one reviewed file, each scenario is a diff that anyone can check line by line, and a test op stops a patch from applying to a forecast that has already moved.
CLI reference · Move the budget, not the deck
Download the deck and the conservative-case patch. All names and figures in these examples are illustrative.