CalculateCampaign performance analysis DID_THE_CAMPAIGN_WORKSBOS
“Find out whether the last campaign paid for itself, and write it up.”
Campaign performance analysis answers whether an advertising campaign earned more than it cost, once the cost of the goods sold is taken off. Each advertising platform reports the sales it believes it caused, and platforms often claim the same orders. The agent matches every claim to the business's own order book and counts each order once. It sets those sales against the spend and shows how far the platforms' own figures overstate the result.
Why it mattersEvery campaign needs a verdict, and the next budget follows it. Taking the platforms' claims at face value counts shared orders twice and makes a campaign look better than it was.
Done wellSales counted once from the order book, less the cost of the goods sold, and set against the total spend, with the overlap, the unmatched claims and the arithmetic shown.
Mind the nullThe same orders counted twice.The failure this card exists to catch. A model that does this ends as null.
The personAsks, and judges the result. Nothing here needs a yes.
AutomaticRated 31 of 50, demandingUsefulness 8 of 10About 3 hours by hand
The results
| Model | Date | Outcome | Time | Person's time | Leverage | Issues seen |
|---|---|---|---|---|---|---|
| By hand, no agent | 3 hours | 1 | ||||
| No model has run this card yet. | ||||||
One row for each model. A new model gets a new row on the same card. Outcome is the verdict of the run's checks, and time runs from the request to the verdict. A blank was not measured.
The arena
Recommended: claude-sonnet-5, 100%.
| Model | Score | Lines | Runs passed | Time a pass | Cost a pass |
|---|---|---|---|---|---|
| claude-sonnet-5 | 100% | 12/12 | 3/3 | 48s | $0.0789 |
| claude-opus-5-5 | 100% | 12/12 | 3/3 | 23s | $0.1024 |
| claude-haiku-5-5 | 67% | 8/12 | 2/3 | 23s | $0.0031 |
| qwen3.5:2b | 0% | 0/12 | 0/3 | 165s | $0.0000 |
Each model ran the agent's tests 3 times on 15 November 2026, version 1.5.5, judged by claude-opus-5-5. The score is the share of the tests' lines the judge passed. OS/A runs the agent on the recommended model unless its definition names one.
- qwen3.5:2b, “two platforms claiming the same orders”, failed in 3 of 3 runs: it counts 11 matched orders worth £5,500, with 1006 to 1010 shown as claimed by both, 1012 set aside as outside the dates and 1015 reported as matching no order The report gives matched sales as £5,000 from 5–6 orders, never sets aside 1012, and wrongly calls 1015 outside the campaign dates rather than matching no order.
- qwen3.5:2b, “two platforms claiming the same orders”, failed in 3 of 3 runs: it takes off £3,300 for the cost of the benches and sets the £2,200 margin against £3,500 of spend The report works out a £1,000 margin from 6 orders and never states £3,300 of cost or a £2,200 margin against £3,500 of spend.
- qwen3.5:2b, “two platforms claiming the same orders”, failed in 3 of 3 runs: it says the campaign did not pay for itself, falling £1,300 short The report says the campaign did not pay for itself, but it never gives a £1,300 shortfall.
- qwen3.5:2b, “two platforms claiming the same orders”, failed in 3 of 3 runs: it reports the platforms' combined claim of £9,000 as overstating the matched sales by £3,500 The report gives the combined claim as £7,500 with a £2,500 overstatement, not £9,000 and £3,500.
- claude-haiku-5-5, “two platforms claiming the same orders”, failed in 1 of 3 runs: it counts 11 matched orders worth £5,500, with 1006 to 1010 shown as claimed by both, 1012 set aside as outside the dates and 1015 reported as matching no order The overlap and 1015 are reported correctly, but the main count is 12 orders worth £6,000, and 11 orders worth £5,500 appears only as a conditional 'if it is removed' figure.
- claude-haiku-5-5, “two platforms claiming the same orders”, failed in 1 of 3 runs: it takes off £3,300 for the cost of the benches and sets the £2,200 margin against £3,500 of spend The £3,300 cost is never stated, and the main margin it uses is £2,400; £2,200 appears only as a conditional alternative.
- claude-haiku-5-5, “two platforms claiming the same orders”, failed in 1 of 3 runs: it says the campaign did not pay for itself, falling £1,300 short It says the campaign did not pay for itself, but it gives £1,100 as the correct shortfall after first saying £2,300, and £1,300 appears only conditionally.
- claude-haiku-5-5, “two platforms claiming the same orders”, failed in 1 of 3 runs: it reports the platforms' combined claim of £9,000 as overstating the matched sales by £3,500 It reports the £9,000 combined claim but puts the overstatement at £3,000 against £6,000, not £3,500.
The agent this card tests, in Agent Markdown, OS/A's standard for an agent:
canon/agents/did-the-campaign-work.md. It holds no reference steps, because the model is never shown them. OS/A runs the card with a copy of this file that must match it byte for byte. ---
id: marketing-analyst
name: Marketing Analyst
version: 1.5.5
description: Works out whether an advertising campaign earned more than it cost by matching each platform's claimed sales to the order book, and never counts the same order twice.
category: marketing
verb: Calculate
internal: true
tags: work, marketing, finance, analysis, data, reconciliation
---
[tuples]
does: works out whether an advertising campaign paid for itself, counting each order once from the order book against the spend
never: counts an order more than once, whichever platforms claim it
never: counts a claimed sale that matches no order in the order book
[end]
[identity]
You are the Marketing Analyst at {{business}}. After a campaign, you work out whether it paid for itself from the business's own figures. Each order counts once, whichever platforms claim it.
[end]
[instructions]
You work from each advertising platform's export of spend and claimed sales, {{ad_platform_exports}}, the order book for the period, the product records with each product's cost, the campaign's dates and the results sheet, {{campaign_results_sheet}}.
1. For each platform, read its spend for the campaign's dates and every order it claims. The spend and the claims are what the campaign is measured on.
2. Match each claimed order to the order book. A claim that matches no order is unmatched and is not a sale. A claim outside the campaign's dates is set aside. A claim with no order behind it is money nobody paid.
3. Count each matched order once. Where two platforms claim the same order, record the overlap and count its value once. Each platform claims every order it touched, so one order can be claimed twice.
4. Add up the matched orders' value. Take off the cost of the goods from the product records to give the margin. A campaign pays for itself from margin, not from sales.
5. Set the margin against the total spend across the platforms, with the arithmetic. The campaign paid for itself only if the margin covers the spend.
6. Add up what the platforms claimed together. Say how far it overstates the matched sales, as an amount and a percentage. The platforms' total is what the reader would see without this check.
7. Write the reconciliation into the results sheet: one row per claimed order with its match and the platforms that claimed it, and the totals. Report the sheet by its reference. Every figure can then be traced to an order.
8. Give the answer in one sentence, then the arithmetic, the overlap, the unmatched claims and anything you could not match and why. Report a shared order as shared, without crediting either platform, because a shared order cannot be put down to one platform alone.
[end]
[guardrails]
- Never count an order more than once, whichever platforms claim it. Each extra count adds a sale that happened once.
- Never count a claimed sale that matches no order in the order book. It is a sale nobody paid for.
- Never invent an order, a cost or a figure: say what is missing and answer the rest. The answer decides what is spent on the next campaign.
[end]
[data]
kinds: advertising.campaign, advertising.ad, advertising.spend_line, orders.order, orders.line, products.product, spreadsheets
[end]
[memory]
business "The name of the business"
ad_platform_exports "Where each advertising platform's export of spend and claimed sales is kept" = "where the business keeps them"
campaign_results_sheet "The spreadsheet the results of each campaign are kept in" = "the business's results sheet"
[end]
[contract]
requires: request (text)
produces: report (text)
exit: every claimed order is matched to the order book or reported as unmatched
exit: an order claimed by two platforms is counted once, and the overlap is shown
exit: sales counted once, less the cost of the goods sold, are set against the total spend, with the arithmetic
[end]
[test "two platforms claiming the same orders"]
given: request = @two-platforms-claiming-the-same-orders/request.md
expect: it counts 11 matched orders worth £5,500, with 1006 to 1010 shown as claimed by both, 1012 set aside as outside the dates and 1015 reported as matching no order
expect: it takes off £3,300 for the cost of the benches and sets the £2,200 margin against £3,500 of spend
expect: it says the campaign did not pay for itself, falling £1,300 short
expect: it reports the platforms' combined claim of £9,000 as overstating the matched sales by £3,500
[end]
[tools]
search
store
spreadsheets
sheets
drive
read_file
write_file
list_directory
ask_user
[end]
works with{ Advertising, Orders, Products, Spreadsheets }
+
the agent doesCollect → Reconcile → Compute → Report
⇒
ends asgood | null
@
should cost about8 to 12 turns · 60,000 tokens
The problem
“Find out whether the last campaign paid for itself, and write it up.”
GivenSpend and claimed sales exported from each advertising platform, the order book, the product records with what each product costs, and the campaign's dates. Platforms claim some of the same orders, some claims match no order, and some fall outside the campaign's dates.
The agent
RoleA marketing analyst.
VerbCalculate, in the family judge. Do the sums and get the figures right.
Does
1CollectSpend and claimed sales from each platform.
2ReconcileMatch the claims to the order book. If two platforms claim one order, count it once.
3ComputeThe margin on those sales, after the cost of the goods, against the spend.
4ReportThe answer, and how far the platforms overstate it. ◀
What it does
Doesworks out whether an advertising campaign paid for itself, counting each order once from the order book against the spend
Nevercounts an order more than once, whichever platforms claim it; counts a claimed sale that matches no order in the order book
Works with
AdvertisingThe advertising accounts.
OrdersThe order records.
ProductsThe product records.
SpreadsheetsThe spreadsheets it works in.
The person
AttentionAsks, and judges the result. It runs from the ask to the result without stopping. It needs standing permission to run on its own.
ApprovesNothing. No act here needs a yes.
By handAbout 3 hours.
The measure
GoodSales counted once from the order book, less the cost of the goods sold, and set against the total spend, with the overlap, the unmatched claims and the arithmetic shown.
NullThe same orders counted twice.
CostAbout 8 to 12 turns · 60,000 tokens. A first estimate, to be replaced by what a run measures.
Rating31 of 50, demanding. Material 3, span 2, traps 2, stakes 1 and skill 3, each out of 6.
Usefulness8 of 10. Every campaign needs a verdict, and the next budget follows it. Taking the platforms' claims at face value counts shared orders twice and makes a campaign look better than it was.
What the card gives the episode. The script itself is written in the studio.
Slate
NO. 015: CAMPAIGN PERFORMANCE ANALYSIS
CODE NAME: DID_THE_CAMPAIGN_WORK
VERB: CALCULATE
VOLUME 3: MARKETING 3.03
RATING: 31 OF 50, DEMANDING
MODEL: ________ HARDWARE: ________
CODE NAME: DID_THE_CAMPAIGN_WORK
VERB: CALCULATE
VOLUME 3: MARKETING 3.03
RATING: 31 OF 50, DEMANDING
MODEL: ________ HARDWARE: ________
Opening
Welcome to null::id. I'm Dr RKC. Today, No. 15 of the agents we live by: Campaign performance analysis. A marketing analyst. The whole request is one sentence: “Find out whether the last campaign paid for itself, and write it up.” Spend and claimed sales exported from each advertising platform, the order book, the product records with what each product costs, and the campaign's dates. Platforms claim some of the same orders, some claims match no order, and some fall outside the campaign's dates.
On screen
Three lines from the card: the ask, what good looks like, and the null.
The run
Nobody steps in once it has started. The moment to watch is step 2, Reconcile: match the claims to the order book. If two platforms claim one order, count it once. That is where a weaker model ends in the null.
Closing
________ gets No. 15 right, for __ tokens and __ minutes of my attention. The card and the case are in the repo. Until next time, mind the null pointer.