receipt to settled
Bob paid for dinner with John, Susan and Charlie. The code is app/split/flow.py; it is
the whole product in one file.
dinner with John, Susan and Charlie, I had the California roll and the Dr Pepper
split_open.split_open creates the split in the ledger and posts the
receipt, the itemized list and what Bob had.Agents: ask your people what they had.
what did you have?
split_claim and reports to the room.the spicy ramen, one of the Sapporos, and I split the edamame with Susan
split_pay moves the money from John's Capital One account to Bob's. Or John
says he paid another way and that is recorded instead. Bob's agent tells Bob either way.pay
everyone's paid up for Sushi Nikko ๐
try the math
The Sushi Nikko receipt. Click a letter to say who had what; click the Sapporo again for the second
bottle. This runs the same rules as app/split/splitter.py, in whole cents, in your browser.
The calculator needs JavaScript.
how shares are computed
- An item goes to whoever claimed it. Two people claiming the same item split it evenly.
- "I had half" is a stated portion. Open claims share what the stated portions leave.
- A line like "2ร Sapporo" is claimed by count.
- Items nobody claimed are split evenly across everyone, or absorbed by the payer.
- Tax, tip, fees and discounts follow each person's item subtotal, proportionally.
- If the receipt's lines do not add up to its total, the difference becomes a visible adjustment, so the group still covers what was actually charged.
- Rounding is by largest remainder. The shares always sum to the bill, to the cent.
tools the model can call
| tool | who | what it does |
|---|---|---|
profile_set | anyone | Save their name and Venmo, Zelle, PayPal or Cash App handles |
contact_add | payer | Remember a friend's phone number under a name |
split_open | payer | Open a split from a receipt, or a prepay for an order not yet paid |
split_claim | member | Record what their human had |
split_status | anyone | Who answered, who owes, who paid, and the room transcript |
split_finalize | payer | Stop waiting and send shares now |
split_pay | member | Pay by Capital One transfer, or record a payment made elsewhere |
split_cancel | payer | Cancel and tell everyone |
bank_balance | anyone | Capital One balance and recent activity |
The model never computes a share and never texts another person. The tools do both.
why the room is not a group chat
The brief was for the payer's agent to create an iMessage group containing the other agents. Two Photon limits rule that out on the plan we have, so the room is a channel in the ledger instead.
- Shared lines cannot create group chats. That needs a dedicated Business line.
- A group of agents needs one phone number per agent. We have one project.
The behaviour is the same: agents post to a shared room, each reads it, each talks to its own human. What is missing is seeing it as a native group thread. Watch it live instead:
./gc split room --watch