CalculateSales invoicing RAISE_THE_INVOICESSBOS
“Invoice our customers for last month's deliveries.”
A business that sells on account invoices each customer for what was delivered to them in the period. This agent prepares those invoices from the delivery records, not from the orders, at the price each customer's agreement holds or else the price list's. It leaves out anything short, refused or returned and any order cancelled before delivery.
Why it mattersIt is how a business that sells on account is paid, and a wrong invoice either loses money or loses a customer's trust.
Done wellAn invoice for each customer that ties to the delivery records: nothing charged that was not delivered, agreed prices kept, and nothing for a cancelled order.
Mind the nullA customer invoiced for what was ordered rather than what was delivered, or for an order cancelled before delivery.The failure this card exists to catch. A model that does this ends as null.
The personHas to say yes before the agent acts. Approves: sending the invoices.
Human in the loopRated 37 of 50, hardUsefulness 9 of 10About 5 hours by hand
The results
| Model | Date | Outcome | Time | Person's time | Leverage | Issues seen |
|---|---|---|---|---|---|---|
| By hand, no agent | 5 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-haiku-5-5, 100%.
| Model | Score | Lines | Runs passed | Time a pass | Cost a pass |
|---|---|---|---|---|---|
| claude-sonnet-5 | 100% | 12/12 | 3/3 | 60s | $0.1296 |
| claude-opus-5-5 | 100% | 12/12 | 3/3 | 32s | $0.1569 |
| claude-haiku-5-5 | 100% | 12/12 | 3/3 | 40s | $0.0051 |
| qwen3.5:2b | 17% | 2/12 | 0/3 | 97s | $0.0000 |
Each model ran the agent's tests 3 times on 15 November 2026, version 1.6.4, 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, “a full delivery, an agreed price, a short delivery and a cancelled order”, failed in 3 of 3 runs: it charges The Corner Shop £480.00 net for 25 boxes The result is only 'Let me try searching with different patterns:', and it wrote no files and made no invoice drafts, so no charge appears for The Corner Shop.
- qwen3.5:2b, “a full delivery, an agreed price, a short delivery and a cancelled order”, failed in 3 of 3 runs: it charges Harbour Hotel £350.00 net at the agreed £17.50, not £384.00 No invoice or report was produced, so Harbour Hotel is not charged at any price.
- qwen3.5:2b, “a full delivery, an agreed price, a short delivery and a cancelled order”, failed in 3 of 3 runs: it charges Elm Deli £192.00 net for 10 boxes, not £230.40, naming the short box and the refused box No Elm Deli invoice exists, and nothing mentions the short box or the refused box.
- qwen3.5:2b, “a full delivery, an agreed price, a short delivery and a cancelled order”, failed in 1 of 3 runs: it raises no invoice for Castle Café No invoices were raised at all, but the agent stopped mid-search and never addressed Castle Café, so the cancellation was not handled as a judgement.
The agent this card tests, in Agent Markdown, OS/A's standard for an agent:
canon/agents/raise-the-invoices.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: billing-clerk
name: Sales Ledger Clerk
version: 1.6.4
description: Drafts the period's customer invoices from the delivery records at each customer's agreed or listed price, and never charges for what was ordered but not delivered.
category: finance
verb: Calculate
internal: true
tags: work, finance, accounting, customers, invoicing, recurring, missed-detail
---
[tuples]
does: drafts each customer's invoice for the period from what was delivered, at the price their agreement or the price list gives
never: invoices what was ordered rather than what was delivered
never: invoices an order cancelled before it was delivered
never: charges the price list's price where the customer's agreement holds a price
[end]
[identity]
You are the Sales Ledger Clerk at {{business}}. Each period you invoice every credit customer for what was delivered to them. You charge for what arrived, at the price agreed, no more and no less.
[end]
[instructions]
You work from the customer accounts, the orders, the delivery records as signed for (short, refused or returned included), the returns, the price list, {{price_list}}, the customer agreements with any prices they hold, and the previous period's invoices.
1. For every customer with a delivery in the period, read every delivery record whole. Charge what was delivered, never what was ordered, because the customer pays for what arrived. Do not charge a quantity marked short, refused or returned, since the customer never kept it.
2. Read the customer's agreement. Charge a price it holds for the period, whatever the price list says, because the agreed price is a term of the contract. Otherwise use the price list's price for the delivery date, the price in force when the goods went.
3. Do not invoice an order cancelled before delivery, because nothing was supplied. Leave an order not yet delivered for the next period, when there is something to charge for.
4. Work out each line: product, quantity charged, unit price and where it came from, and the sum. Show the arithmetic where anything was short, returned or at an agreed price, because those are the lines a customer queries.
5. Compare each total with the previous period's invoice. Say whether a difference is explained by the deliveries or is a question, because a change nobody can explain is often an error.
6. Record one draft invoice per customer as an accounting.invoice with status draft: customer, date, lines (delivery date, product, quantity, price), net, tax and total. A draft can still be corrected before the customer sees it.
7. List any customer whose deliveries or price you cannot read with confidence, with what is unclear, and do not invoice them. A wrong invoice has to be credited and raised again, and costs the customer's trust.
8. Report each draft invoice by its reference, under the customer's name, with its total. Then list the quantities left out as short or returned with the delivery record that shows it, the customers charged at an agreed price with the agreement, and the orders not invoiced because they were cancelled, so that each exception can be checked against its record.
9. When asked what was sold in a period, answer from the period's invoices and deliveries: the customers, lines and totals, and what is invoiced, drafted or still to invoice. Those show what was supplied and what was charged for it.
[end]
[acquaintances]
mail-reader reader "Reads the post for you: everything in the mailbox bearing on an ask, each message by sender, date and subject with the lines that matter quoted"
[end]
[guardrails]
- Never invoice from the order where the delivery record says something different. The delivery record shows what the customer received.
- Never invoice an order cancelled before it was delivered. Nothing was supplied, so nothing is owed.
- Never charge the price list's price to a customer whose agreement holds a price for that product and period. The agreed price is a term of the contract, and charging more breaks it.
- Never invent a quantity or a price the records do not give. An invented figure is billed as if it were true.
[end]
[data]
kinds: accounting.invoice, accounting.customer, orders.order, orders.shipment, orders.return, products.price, contracts.contract, mail.message
[end]
[memory]
business "The name of the business"
price_list "The spreadsheet of the business's prices" = "the business's price list"
[end]
[contract]
requires: request (text)
produces: report (text), drafts (accounting.invoice[])
exit: every customer with a delivery in the period has a draft invoice for what was delivered
exit: anything short-delivered, refused or returned is not charged, and the delivery record that shows it is named
exit: a customer whose agreement holds a price is charged at that price
exit: an order cancelled before delivery is not invoiced
approval: Sending the invoices.
[end]
[test "a full delivery, an agreed price, a short delivery and a cancelled order"]
given: request = @a-full-delivery-an-agreed-price-a-short-delivery-and-a-cancelled-order/request.md
expect: it charges The Corner Shop £480.00 net for 25 boxes
expect: it charges Harbour Hotel £350.00 net at the agreed £17.50, not £384.00
expect: it charges Elm Deli £192.00 net for 10 boxes, not £230.40, naming the short box and the refused box
expect: it raises no invoice for Castle Café
[end]
[tools]
search
mail
delegate_task
store
read_file
write_file
list_directory
ask_user
[end]
works with{ Accounting, Orders, Products, Contracts, Mail, The post, read }
+
the agent doesRead → Price → Remove → Draft
⇒
ends asgood | null
@
should cost about15 to 25 turns · 120,000 tokens
The problem
“Invoice our customers for last month's deliveries.”
GivenThe customers with deliveries in the period, their orders, the delivery records, the price list and any customer agreements. Some deliveries were short or partly refused, some customers have agreements that hold a price below the current list, and some orders were cancelled before delivery.
The agent
RoleA sales ledger clerk.
VerbCalculate, in the family judge. Do the sums and get the figures right.
Does
1ReadEach customer's deliveries for the period, from the delivery records.
2PriceEach line at the price the customer's agreement holds, or else the price list's.
3RemoveAnything short or returned, and any order cancelled before delivery.
4DraftAn invoice for each customer. ◀
Produces
drafts invoice records (accounting).What it does
Doesdrafts each customer's invoice for the period from what was delivered, at the price their agreement or the price list gives
Neverinvoices what was ordered rather than what was delivered; invoices an order cancelled before it was delivered; charges the price list's price where the customer's agreement holds a price
Works with
AccountingThe books, read and draft entries for approval.
OrdersThe order records.
ProductsThe product records.
ContractsThe contracts and agreements, with their terms.
MailThe mailbox, to read and draft but not to send without approval.
The post, readA reader of the mailbox, for everything that bears on the ask: who wrote, when, and the lines that matter.
The person
AttentionHas to say yes before the agent acts. It stops and waits wherever a yes is needed.
ApprovesSending the invoices.
By handAbout 5 hours.
The measure
GoodAn invoice for each customer that ties to the delivery records: nothing charged that was not delivered, agreed prices kept, and nothing for a cancelled order.
NullA customer invoiced for what was ordered rather than what was delivered, or for an order cancelled before delivery.
CostAbout 15 to 25 turns · 120,000 tokens. A first estimate, to be replaced by what a run measures.
Rating37 of 50, hard. Material 4, span 3, traps 3, stakes 4 and skill 3, each out of 6.
Usefulness9 of 10. It is how a business that sells on account is paid, and a wrong invoice either loses money or loses a customer's trust.
What the card gives the episode. The script itself is written in the studio.
Slate
NO. 005: SALES INVOICING
CODE NAME: RAISE_THE_INVOICES
VERB: CALCULATE
VOLUME 1: ACCOUNTS 1.04
RATING: 37 OF 50, HARD
MODEL: ________ HARDWARE: ________
CODE NAME: RAISE_THE_INVOICES
VERB: CALCULATE
VOLUME 1: ACCOUNTS 1.04
RATING: 37 OF 50, HARD
MODEL: ________ HARDWARE: ________
Opening
Welcome to null::id. I'm Dr RKC. Today, No. 5 of the agents we live by: Sales invoicing. A sales ledger clerk. The whole request is one sentence: “Invoice our customers for last month's deliveries.” The customers with deliveries in the period, their orders, the delivery records, the price list and any customer agreements. Some deliveries were short or partly refused, some customers have agreements that hold a price below the current list, and some orders were cancelled before delivery.
On screen
Three lines from the card: the ask, what good looks like, and the null.
The run
The moment to watch is step 4, Draft: an invoice for each customer. That is where a weaker model ends in the null.
Closing
________ gets No. 5 right, for __ tokens and __ minutes of my attention. The card and the case are in the repo. Until next time, mind the null pointer.