Skip to the lesson
CivOps AI Academy · F20What It Costs and What It Replaces: the Cost Case in Your Plant's Numbers
0%

Chapter 1 · Session 22

What it costs, read from the bills

The cost page your plant manager will trust is built from the bills themselves, not from price lists. Claude Code lists every line that can cost money; you read each bill on the provider's own billing page; then the Claude usage and the people's time go in with their working shown.

40 min3 stepsBills, not price lists

By the end of this chapter you can

  • Have Claude Code list every service, seat and usage line the repository depends on, in docs/costs.md.
  • Read each monthly bill yourself on GitHub, Vercel, Supabase and Claude, and check the spending limits are still on.
  • Count the Claude usage and the people's time, each with where the number came from.

Why bills, not price lists

A price list says what a plan could cost. A bill says what your company paid, including the usage charges, the seat nobody removed and the tax. Finance checks a cost case against the card statement, so a case built from list prices fails the first question. The FinOps Foundation's framework for cloud costs starts from the same place: make the real spend visible to the people who decide, then optimise it, then review it on a schedule [6].

LineWhere the number comes fromGrows with
GitHub (code, reviews, checks)The organisation's billing page: plan, seats, Actions minutesPeople who build and review; Actions minutes
Vercel (runs the website)The team's billing page: plan, seats, usage this cycle, invoicesPeople who deploy; traffic and function time
Supabase (database, sign-in, backups)The organisation's billing, usage and invoices pagesDatabase size, compute, monthly active users
Claude (the coding agent)The plan's billing page, and the cost per run in docs/fleet-ledger.mdSeats, and how much the fleet runs
Domain, monitor, anything elseThe invoice or card statementUsually nothing
People's timeThe owner's calendar for four weeks, checked against GitHub's record of reviewsChanges, drills and questions from the floor
Per-seat cost against the platformA rising line for per-seat software at $25 a user a month and a flat line for the platform at about $504 a month including the owner's time; they meet at about 20 users. Monthly cost against users: per-seat software at $25 a user, against the platform$0$500$1,000$1,5000102030405060people using it (operators, supervisors, managers)per-seat softwareplatform: $174 tools + $330 of your timelevel at about 20 users
Per-seat software against the platform, illustrative numbers: per-seat software at $25 a user a month against a flat $504 a month for the platform including the owner's time. Your own line comes from your bills, in Step 3.
Step 1

Have Claude Code list every line that can cost money

10 minutes

Why

The line you forget is the one that makes the case wrong: a second Vercel seat, an Actions bill from a nightly job, a domain renewal. The repository already records every service the platform uses (the key register, the workflows, the runbook), so Claude Code can list the lines faster and more completely than memory. It writes no numbers, because it cannot see a bill: that keeps every amount traceable to a page you read.

Do this

Paste into Claude Code
Read docs/KEYS.md, docs/runbook.md, docs/fleet-ledger.md, docs/INTENT.md, docs/measures.md, every file in .github/workflows/ and package.json.

On a new branch costs/first, write docs/costs.md for the plant manager and finance, in plain English, with these sections:

1. "Running cost each month": one row per line that can cost money: every service and plan named in docs/KEYS.md (GitHub, Vercel, Supabase, Claude, the domain, any monitor), every scheduled workflow (with how often it runs, because Actions minutes can cost), and "People's time". Columns: line, plan, who holds a paid seat (by role, never by name), amount a month, source, date read. Put "Not read yet" in every amount. Do not write any price or estimate yourself: I will read every bill.
2. Next to each line, the exact billing page to open, using our names: https://github.com/organizations/acme-ops/settings/billing, https://vercel.com/teams/acme-ops/settings/billing, https://supabase.com/dashboard/org/_/billing, and the Claude plan's billing page.
3. "What it replaces" and "The case", as headings only, each with "Not measured yet".
4. A rule at the top: every number on this page has a source (a bill and its month, a query, a timing sheet, or finance and the date), and a number that was not measured says "Not measured", never 0 and never an estimate.

Do not open any billing page, .env file or key. Push, open a pull request titled "Cost page: the lines", wait for the checks to finish and tell me the result in plain words. If a check fails, fix it before reporting.

You will see recreated screen

claude — acme-platform
⏺ Read(docs/KEYS.md)
⎿ Read 44 lines
⏺ Search(pattern: "schedule:", path: ".github/workflows")
⎿ Found 3 files: backup.yml, freshness.yml, nightly.yml
1
⏺ Write(docs/costs.md)
+| Line | Plan | Paid seats | Amount a month | Source | Read on |
+| GitHub | Team | 2 (owners) | Not read yet | | |
+| Vercel | Pro | 2 (owners) | Not read yet | | |
+| Supabase | Pro | none | Not read yet | | |
+| GitHub Actions minutes | 3 scheduled workflows | | Not read yet | | |
+| People's time | owner's upkeep | | Not measured yet | | |
2
⏺ Bash(gh pr checks --watch)
⎿ ci pass 1m12s
⏺ Pull request #61 adds docs/costs.md with 7 lines and no amounts. I found one line that is not in docs/KEYS.md: the nightly backup workflow uses Actions minutes. I did not open any billing page.
Claude Code reads the key register and the workflows, then writes the lines with no amounts.
  1. It found the scheduled workflows. Each one runs on GitHub's machines, and minutes beyond the plan's allowance are billed.
  2. Every amount is blank on purpose: you fill them from the bills in Step 2.

Check it worked

Pull request Cost page: the lines is green. docs/costs.md lists every service in docs/KEYS.md, every scheduled workflow and a line for people's time, and every amount says Not read yet.

Fastest path

Telling Claude Code to read docs/KEYS.md and the workflows, rather than listing the services yourself, finds the lines nobody remembers. Telling it not to write any price saves you removing guesses later.

If it goes wrong

Claude Code filled in list prices anyway

Say: Remove every amount you wrote. Amounts come only from the bills I read. Put Not read yet back. A list price in a cost case looks like evidence and is not.

A service is in use but not in docs/KEYS.md

The key register is out of date, which is a governance gap, not only a cost one. Say: Add the missing service to docs/KEYS.md by name, with the key names it uses and who holds them, never the values, in the same pull request.

Claude Code tries to open a billing page or asks for a login

Say: Do not sign in anywhere. I read the bills myself. Billing pages need an owner's sign-in, and that never goes into Claude Code.

Step 2

Read each bill yourself, and check the limits are still on

15 minutes

Why

The bill is the evidence. Reading it on the provider's own page, signed in as an owner, means the number is right and you can show where it came from. While you are there, check the spending limits from Session 1 are still on and remove any paid seat held by someone who no longer builds or deploys: the cheapest saving in the case is a seat nobody uses.

Do this

Open each page signed in as an owner. For each one write down, on paper or in a note: the plan, the total of the last full month (from the invoice, not the current cycle), any usage charge on it, the number of paid seats, and the invoice date.

Open

https://github.com/organizations/acme-ops/settings/billing

GitHub: plan, seats, and Actions minutes used this month against the allowance.

Open

https://vercel.com/teams/acme-ops/settings/billing

Vercel: plan, members, usage this cycle, and Invoices for last month. Check Spend Management is still on with an amount.

Open

https://supabase.com/dashboard/org/_/billing

Supabase: choose your organisation if asked. Plan, Cost Control (spend cap), and the upcoming invoice. Last month's invoice is under Invoices.

Open

https://claude.ai/settings/billing

Claude: the plan and seats. On a Team or Enterprise plan an owner sees billing in the organisation's admin settings. If the company also pays for the API, read that bill too.

Then look at who holds a paid seat on GitHub and Vercel. Anyone who no longer builds, reviews or deploys: remove them now, on the same page, and note the saving.

You will see recreated screen

vercel.com/teams/acme-ops/settings/billing
GeneralMembersBillingSecurity
Billing
PlanPro
Members with a seat21
Usage this cyclewithin included amounts
Spend Management on, monthly amount $2002
3
InvoiceDateAmount
Pro plan, 2 members2026-10-01$40.00
Pro plan, 2 members2026-09-01$40.00
Vercel's billing page. Read the last full month from the invoice, not the running total of this cycle.
  1. Seats are for people who deploy. An operator never needs one.
  2. Still on from Session 1. If it is off, turn it back on before anything else.
  3. Last full month: this is the number for docs/costs.md, with the invoice date.

You will see recreated screen

supabase.com/dashboard/org/_/billing
Billing
Subscription planPro
Spend cap enabled1
Upcoming invoice$25.00 (no usage charges)
Invoices
Supabase's organisation billing. The spend cap stops usage charges beyond what the plan includes.
  1. On, unless you have chosen otherwise and written down why. With it off, usage charges have no ceiling.

Check it worked

You have, for every line in docs/costs.md: the plan, last full month's amount, its usage charges and the invoice date. Spend Management is on in Vercel, the spend cap is on in Supabase, and no paid seat belongs to someone who no longer builds.

Fastest path

Open all four pages in tabs first, then read them one after another. Invoices are faster to read than usage graphs: the invoice already has the total.

If it goes wrong

The billing page says you do not have permission

Billing needs an owner. Ask owner two to read it, or ask them to make you an owner if you should be one. Never borrow their sign-in.

The Supabase link opens the wrong organisation, or a list

Choose the organisation that holds acme-platform-prod. The _ in the address means "pick one".

A bill has a usage charge you did not expect

Write it down as it is: it is real cost. Then find the cause: Supabase's usage page and Vercel's usage tab show which resource grew. Photos and file uploads grow storage fastest. Ask Claude Code to explain what in the repository uses that resource; do not change any plan until you know.

The bills go to someone's personal inbox, or a personal card pays

Session 1 put every account in the company's name. Change the billing email to a shared finance mailbox and the card to the company card now, on the same pages, and note it in docs/KEYS.md.

Step 3

Put in the bills, the Claude usage and the people's time

15 minutes

Why

Amounts only mean something with their source next to them. Giving Claude Code the numbers you read, in one message, lets it fill every row with its source and cross-check two lines you cannot read from a bill: the Claude usage against the cost per run in the fleet ledger, and your upkeep hours against GitHub's record of the reviews you actually did. Your time is usually the biggest line and the one most often left out.

Do this

Work out your upkeep hours for the last four weeks from your calendar: reviews, merges, drills, questions from the floor, reading bills. Ask finance for the loaded hourly rate (chapter 2 shows how it is worked out). Then paste, with your numbers:

Paste into Claude Code, after replacing the <...> parts
Fill in docs/costs.md on the branch costs/first with the bills I read today, <date>:
- GitHub: plan <plan>, <n> seats, last full month <amount> (invoice <date>), Actions usage <minutes and any charge>.
- Vercel: plan <plan>, <n> seats, last full month <amount> (invoice <date>), usage charges <amount or none>.
- Supabase: plan <plan>, last full month <amount> (invoice <date>), usage charges <amount or none>, spend cap <on/off>.
- Claude: plan <plan>, <n> seats, last full month <amount> (invoice <date>).
- Other: <domain, monitor, anything else, with amount and invoice date>.
- My upkeep: <hours> hours in the four weeks to <date>, from my calendar. Loaded rate <amount> an hour, from finance on <date>.

Then:
1. Put each amount in its row with its source and date. Add the monthly total, and show the sum.
2. Add the Claude line's cross-check: total the cost per run in docs/fleet-ledger.md for the same month and compare it with the bill. If they differ by more than 10%, say so and give the likely reason; do not change either number.
3. Add the upkeep cross-check: with gh, count the pull requests I reviewed or merged in those four weeks and the scheduled drills in docs/runbook.md's drill log. Write the counts next to my hours, so a reader can judge them. Do not change my hours.
4. Anything I did not give you stays "Not read yet".

Push to the same pull request, wait for the checks and tell me the monthly total, both cross-checks and anything still missing.

You will see recreated screen

claude — acme-platform
⏺ Write(docs/costs.md)
-| Vercel | Pro | 2 (owners) | Not read yet | | |
+| Vercel | Pro | 2 (owners) | $40.00 | invoice 2026-10-01 | 2026-10-20 |
+| People's time | owner's upkeep | | 6 h x $55 = $330.00 | calendar, 4 weeks to 2026-10-19; rate: finance 2026-10-18 | 2026-10-20 |
+| **Total a month** | | | **$504.00** = 8 + 40 + 25 + 100 + 1 + 330 | | |
1
⏺ Claude: the bill is $100.00 for September; docs/fleet-ledger.md records $87.40 of runs in September. That is 13% apart, more than 10%: the ledger has no entries for 2–4 September, when the overnight build was paused but two interactive sessions ran. I changed neither number.2
⏺ Upkeep: in the four weeks you reviewed or merged 23 pull requests and ran 1 drill. 6 hours is about 15 minutes a pull request, which is plausible. Pull request #61 is green. Still missing: none.
Each amount arrives with its source; the two lines no bill shows arrive with a cross-check, not a correction.
  1. The working is on the page: the total shows its sum, the time line shows hours times rate, and each line says where it came from.
  2. A cross-check that does not match is reported, not smoothed over. Write the reason into the page; the reader will ask.

Check it worked

Every row in Running cost each month has an amount, a source and a date, or says Not read yet. The total shows its sum. The Claude and upkeep lines each have a cross-check next to them.

Fastest path

One message with every bill in it, instead of a message per bill, saves five round trips. Asking for the cross-checks in the same message means you read them once, with the numbers they check.

If it goes wrong

Claude Code "corrected" your upkeep hours or the bill to make the cross-check match

Say: Put my number back. Report the difference and its likely reason next to it; never change a measured number to match an estimate. We built a platform whose screens showed savings it had generated itself, labelled as the ledger; a cost page that adjusts its own numbers is the same mistake.

The fleet ledger has gaps, so the Claude cross-check cannot be done

Write "Could not check: the ledger has no entries for <dates>" next to the line. The bill still stands. Then fix the habit: Session 16's rule is a ledger line for every run.

You do not know your loaded rate

Leave the money for people's time as "Not measured" and keep the hours. Chapter 2 shows the quick way to work it out; finance's own figure is better because it is the one they will check against.

Knowledge check

Why does docs/costs.md use last month's invoice, not the plan's list price?

Knowledge check

Forty more operators start using the platform. Which line on the bills should rise?

References

  1. GitHub pricing. https://github.com/pricing
  2. Vercel pricing. https://vercel.com/pricing
  3. Supabase pricing. https://supabase.com/pricing
  4. Claude pricing (plans). https://claude.com/pricing
  5. Supabase Docs: Cost control and the spend cap. https://supabase.com/docs/guides/platform/cost-control
  6. FinOps Foundation: FinOps Framework. https://www.finops.org/framework/
  7. Vercel Docs: Spend management. https://vercel.com/docs/spend-management

Chapter 2 · Session 22

What it replaces, measured

The value side has two parts. The first is the decision your intent was about: its measured baseline from Session 2 against today's number, counted from the tables by a query anyone can rerun. The second is what stops: a subscription cancelled, a sheet nobody re-keys, a report that builds itself, each with a bill or a stopwatch behind it.

35 min2 stepsBaseline against today

By the end of this chapter you can

  • Count today's number for the intent's measure from the live tables, with a query that is tested and that you run yourself.
  • Say "Not measured yet" when the floor has not used the platform long enough, instead of estimating.
  • List what the platform replaces with evidence: invoices for subscriptions, ten-sample timings for hours, and a loaded hourly rate.

The baseline is already written down

In Session 2 you timed the decision before anything was built and wrote it in docs/INTENT.md: for the stamping plant, "minutes from failed first piece to hold: today about 95, target 15". That number is the most honest part of the case, because it was measured before anyone had a reason to make it look good. Today's number must be counted the same way, from the records the platform now holds, by a query anyone can rerun. If Session 15 already put the measure on the dashboard, docs/measures.md has its definition and the query must give the same answer.

Step 4

Count today's number from the tables, the same way as the baseline

15 minutes

Why

A number on a cost page that nobody can recompute is an opinion. A query in the repository, tested on the made-up data with an answer worked out by hand, and run by you on the live database, gives a number anyone can check and rerun next month. If the floor has not used the platform for long enough, the honest answer is "Not measured yet", and the query is ready for the day it is.

Do this

Paste into Claude Code
Read docs/INTENT.md (the measure, its baseline and its target) and docs/measures.md.

On the branch costs/first:
1. Write supabase/queries/intent-measure.sql: one read-only select that counts the intent's measure from the live tables for the last 28 days, the same way the baseline was counted. If docs/measures.md already defines this measure, use that definition exactly and say so in a comment. Return: the median, the number of events it is based on, and the first and last event dates. If there are fewer than 20 events, return "Not measured yet" with the count, never a number.
2. Write a pgTAP test in supabase/tests/intent-measure.test.sql that loads a small set of made-up rows whose answer I can work out by hand (put the hand working in a comment), and checks the query returns it. Show me the test failing first (change the expected answer), then passing.
3. In docs/costs.md, under "What it replaces", add a table: measure, baseline (from docs/INTENT.md, with its date), target, today's number "Not measured yet", and the query's file name.

Do not connect to the live project: I will run the query myself. Push, wait for the checks and tell me the hand-worked answer and the result.

When the pull request is green, open the merged query on GitHub, copy it, and run it yourself on the live project:

Open

https://supabase.com/dashboard/project/abcdefghijklmnopqrst/sql/new

Paste the query from supabase/queries/intent-measure.sql and press Run. It only reads.

Write the result, the date and the number of events into docs/costs.md through Claude Code: Today's number from the live project on <date>: <median>, from <n> events between <first> and <last>. Put it in the table with the source.

You will see recreated screen

claude — acme-platform
⏺ Read(docs/measures.md)
⎿ Read 52 lines: "Minutes from failed first piece to hold" defined
1
⏺ Write(supabase/queries/intent-measure.sql)
+-- Same definition as docs/measures.md, measure 1.
+-- Minutes from a first-piece result outside its limits to the next hold on that lot.
+select percentile_cont(0.5) within group (order by minutes) as median_minutes,
+ count(*) as events, min(failed_at) as first_event, max(failed_at) as last_event
⏺ Bash(npx supabase test db)
⎿ intent-measure.test.sql .. not ok 1 (expected 17, got 12) <- shown red on purpose
2
⏺ Bash(gh pr checks --watch)
⎿ schema / test pass 1m48s
⏺ Three made-up failures took 9, 12 and 40 minutes to hold, so the median is 12, worked by hand in the test's comment. The test failed with the wrong answer and passes with the right one. Pull request #61 is green.
The query arrives with a test whose answer was worked out by hand, shown red first.
  1. It reuses the dashboard's definition, so the cost page and the dashboard cannot disagree.
  2. Shown failing first: a test that cannot fail proves nothing.

You will see recreated screen

supabase.com/dashboard/project/abcdefghijklmnopqrst/sql/new
Table EditorSQL EditorDatabaseAuthenticationLogs
select percentile_cont(0.5) within group (order by minutes) ...
Run
1
median_minuteseventsfirst_eventlast_event
14372026-09-22 06:122026-10-19 22:40
The query on the live project. Fewer than 20 events gives "Not measured yet", not a number.
  1. 37 events over four weeks from the line that already uses the first workflow. Baseline 95, target 15, today 14: write all three, with the dates.

Check it worked

docs/costs.md shows the baseline from docs/INTENT.md with its date, the target, and today's number with its date, event count and the query's file name, or Not measured yet with the count.

Fastest path

If Session 15 already defined the measure, the prompt reuses it: one definition, one number, no argument later about which is right.

If it goes wrong

The query returns a number from three events

Too few to mean anything. The query should have said "Not measured yet": say Below 20 events the query must return Not measured yet with the count. Fix it and its test. The case then says so, and Session 23's first-week and day-30 reviews fill it in.

The query fails on the live project with "column does not exist"

The live database is behind main. Session 11's daily freshness check should have caught it: look at its last run. Run npx supabase migration list yourself; our own production fell nine migrations behind main once, the oldest seven weeks old.

The dashboard and the query give different numbers

Say: The dashboard shows <x> and intent-measure.sql gives <y> for the same 28 days. Explain the difference line by line; do not change either until I agree which definition is right. Then fix the wrong one with a test, so they cannot drift again.

Claude Code reports the test passed but never showed it failing

Say: Change the expected answer, run the test and show me it fails, then put it back. A test that cannot fail is the most dangerous kind: it looks like proof.

What can stop, and how to show it

KindStamping plant exampleEvidence
SubscriptionsA forms app charged per user; a small quality-records toolThe invoice, the renewal date, the notice period, and later the cancellation
Re-keyingFirst-piece sheets typed into a spreadsheet at the end of the shiftTen timings before, ten after
Reports built by handThe supervisor's shift report; the weekly hold summaryTen timings before, ten after
Errors avoidedMistyped values; lots shipped before a late holdOnly if counted before and after; otherwise named, not priced
Measuring hours savedFive steps: time the task before, time it after, take the difference, multiply by how often it happens, then by the loaded hourly rate. Beforetime the shift report10 times, on paper andspreadsheet32 min avgAftertime the same report onthe platform, 10 times2 min avgDifferenceper shift30 min× how often10 shifts a week, 43 amonth21.7 h a month× loaded rate$40 an hour (wage $28 ÷0.70)$867 a monthStopwatch, ten samples, same person, same task. Write the samples down; the average is your evidence.
Measuring hours saved for one task, the supervisor's shift report. Illustrative numbers: yours come from your stopwatch.

Time each task ten times, with the people who normally do it, on normal shifts, because single timings mislead [1]. Tell them you are timing the task, not the person. Time it before go-live, while the old way is still in use; the after-timings come in the pilot (Session 23). An hour costs the company more than the wage: in US private industry, wages are roughly 70% of total compensation and benefits the rest [2], so a quick loaded rate is:

The loaded rate, worked
loaded hourly rate ≈ hourly wage ÷ 0.70   (use finance's own burden rate if they have one: it is the figure they will check)
example: $28.00 wage  →  28 ÷ 0.70 = $40 an hour
example: $77,000 salary  →  77,000 ÷ 2,080 h = $37.02  →  37.02 ÷ 0.70 = $52.89, about $53 an hour
Step 5

List what it replaces, each line with its evidence

20 minutes, plus the timings on the floor

Why

Value that cannot be shown is value finance will strike out, and they will be right to. A subscription with its invoice and notice period, and a task with ten timings before and ten after, are things a sceptic can check. Writing them into the page in one go, with the rule that unmeasured hours stay unmeasured, stops the case drifting into estimates as the deadline nears.

Do this

Ask finance for every software subscription the departments using the platform pay for: price, users, renewal date, notice period. Choose the three tasks with the most time in them, agree a start and end point for each, and time each ten times. Then paste:

Paste into Claude Code, after replacing the <...> parts
Under "What it replaces" in docs/costs.md, on the branch costs/first, add:

Subscriptions (from finance, <date>):
- <name>: <amount> a month, <n> users, renews <date>, notice <period>. Status: <replaced now / to be retired after a month on the floor / not replaced>.

Tasks timed before go-live (ten samples each, in minutes):
- <task, start and end point>: <s1, s2, ... s10>; happens <n> times a month; done by <role>; that role's loaded rate <amount> (<source>).

Then:
1. For each task, show the working: the average of the ten samples, times how often it happens, in hours a month, times the loaded rate. Put "after: Not measured yet (pilot, Session 23)" where the after-timing will go.
2. Count a subscription as money saved only if its status is "replaced now" and it has been cancelled; otherwise list it as "to be retired on <date>" with no money against it.
3. Save the samples as docs/timings/<task>.csv (date, who timed, minutes), so the averages can be rechecked. No names of the people timed, only their role.

Push, wait for the checks and tell me what is counted and what is still "Not measured yet".

You will see recreated screen

claude — acme-platform
⏺ Write(docs/costs.md)
+| Shift report (supervisor) | before: 32.1 min average of 10 (docs/timings/shift-report.csv) | x 43 a month = 23.0 h | x $40 = $920 | after: Not measured yet (pilot) |
+| Forms app | $500 a month, renews 2027-01-31, 30 days notice | to be retired on 2027-01-31 | not counted yet |
1
⏺ Three tasks added with their samples and working. One subscription is listed as to be retired; I have not counted it as saved, because it has not been cancelled. Hours saved stay Not measured yet until the pilot's after-timings. Pull request #61 is green.2
Every line shows its working; nothing not yet measured is given a value.
  1. The working on one line: samples, average, how often, hours, rate. Anyone can redo it with a calculator.
  2. Honest gaps. They become numbers in Session 23, from the floor, not from hope.

Check it worked

Each subscription has its invoice amount, renewal date, notice period and status. Each task has ten samples saved in docs/timings/, its average, its frequency and its rate, with the after-timing marked Not measured yet.

Fastest path

Agree the start and end point of each task with the person who does it before the first timing. Re-timing because the boundaries moved is the commonest waste in a time study.

If it goes wrong

Claude Code filled in the after-timings with an estimate ("about 2 minutes on the platform")

Say: Remove every after-timing and every saving worked from it. They are Not measured yet until the pilot. Only measured numbers go in.

Someone wants the module courses' or a sales page's yearly figures in the case

No. A figure on a sales page, including the Academy's own course page, is a claim, not evidence: the Academy's own records list those figures as needing working shown before they can be published. Your case uses your invoices and your stopwatch.

The people being timed are uneasy

Say what you are timing and why, show them the sheet, and time the task, not the person: the role goes on the sheet, not the name. The point is to show what the platform saves them.

Knowledge check

The floor has used the platform for a week and the query finds 6 events. What goes in docs/costs.md as today's number?

Knowledge check

A $28 hourly wage gives a loaded rate of about:

References

  1. Lean Enterprise Institute: Standardized work (lexicon). https://www.lean.org/lexicon-terms/standardized-work/
  2. US Bureau of Labor Statistics: Employer Costs for Employee Compensation (news release). https://www.bls.gov/news.release/ecec.nr0.htm
  3. PostgreSQL Documentation: Aggregate functions (percentile_cont). https://www.postgresql.org/docs/current/functions-aggregate.html
  4. Supabase Docs: Testing your database (pgTAP). https://supabase.com/docs/guides/database/testing

Chapter 3 · Session 22

The case, with the working shown

Three numbers answer the plant manager: what it cost to build, how many months until that is paid back, and what it is worth over three years. A script in the repository works them out from a file of numbers, each with its source, so the page cannot drift from its working; then every claim is checked before finance sees it.

25 min2 stepsEnds with a gate

By the end of this chapter you can

  • Have Claude Code compute payback, three-year value and sensitivity from docs/costs.csv, with a test worked by hand.
  • Audit every number and claim on the page for its source before it goes to finance.
  • Take the case to the plant manager and finance, merge it, and put a monthly bill review in the runbook.

The three numbers

The working, as it will appear on the page
net value a month   = subscriptions retired + hours freed × loaded rate × share counted − tools − upkeep hours × owner's rate
payback (months)    = build cost ÷ net value a month
three-year value    = 36 × net value a month − build cost
Illustrative (the stamping plant, not a real one): build 80 h × $55 = $4,400; net $1,122 a month
payback = 4,400 ÷ 1,122 = 3.9 months; three-year value = 36 × 1,122 − 4,400 = $35,992

Freed time is money only if it goes somewhere useful: overtime not worked, a supervisor on the floor instead of at a desk. Some of it disappears into the day. So the case states openly what share of freed hours it counts (the illustrative example counts half) and shows what happens if the share, or any other assumption, is wrong. The US Government Accountability Office's cost estimating guide asks for exactly that: state every assumption and test how much each one moves the result [1].

What it replaces, as a waterfallBars drawn to scale: subscriptions retired and three sources of hours saved, counted at half, add up; tools and the owner's upkeep subtract; the net value is about $1,122 a month. Monthly value, illustrative example+$500Subscriptionsretired+$520Clerk re-keying(half counted)+$433Shift reports(half counted)+$173Weekly report(half counted)−$174Tools−$330Your upkeep, 6 h$1,122Net valuea month
Monthly value, as a waterfall, illustrative numbers: a subscription retired and half the freed hours, less the tools and the owner's upkeep.
PaybackA line starting at minus $4,400 and rising $1,122 a month, crossing zero at about 3.9 months and reaching about $36,000 after three years. Cumulative value, illustrative: $4,400 to build, $1,122 a month after−$5,000$0$10,000$20,000$30,000061218243036months after go-livepays back in 3.9 months$35,992 after 3 years
Payback, illustrative: the line starts below zero by the build cost and rises by the net value each month.
Step 6

One prompt: the numbers, their working and the test

15 minutes

Why

A spreadsheet's formulas are hidden and drift as people edit cells. A small script in the repository that reads one file of numbers, each with its source, and writes the working into docs/costs.md, can be checked by CI on every change: the page and its numbers can never disagree. A test with the illustrative example, worked by hand, proves the arithmetic before your own numbers go in.

Do this

Paste into Claude Code
On the branch costs/first:

1. Write docs/costs.csv with one row per number in docs/costs.md: item, amount, unit, source. Allowed sources: "bill <service> <month>", "query <file> <date>", "timing <file>", "finance <date>", "assumption: <why>". A number that was not measured has an empty amount and the source "Not measured".
2. Write scripts/cost-case.mjs that reads docs/costs.csv and writes the section "The case" in docs/costs.md: build cost, net value a month, payback in months and three-year value, each with its formula and the numbers put into it; then a sensitivity table that changes each assumption to half and one and a half times its value, one at a time, and shows the three-year value each time. It must refuse a row with no source, and if any input is "Not measured" it must write "Cannot be worked out yet: <item> not measured" instead of a result. Never 0 for unknown.
3. Add npm run cost-case, and a CI step that runs it with --check and fails if docs/costs.md does not match docs/costs.csv.
4. Write a Vitest test using the illustrative example: build 80 hours at $55, tools $174, upkeep 6 hours at $55, subscription retired $500, 56.3 hours freed at $40 with half counted. Hand working: net $1,122 a month, payback 3.9 months, three-year value $35,992. Show it failing first with a wrong expected value, then passing. Add tests that a row without a source is refused and a Not measured input gives "Cannot be worked out yet".
5. Run it on our own numbers.

Push, wait for the checks and tell me our three numbers and which assumption moves the three-year value most, or what is not yet measured.

You will see recreated screen

claude — acme-platform
⏺ Bash(npm test -- cost-case)
⎿ x net value: expected 1100, got 1122 <- shown red on purpose ✓ worked example: net 1122, payback 3.9, three-year 35992 ✓ a row with no source is refused ✓ Not measured gives Cannot be worked out yet
1
⏺ Write(docs/costs.md)
+Net value a month: Cannot be worked out yet: hours_freed_after not measured (pilot, Session 23).
+Running cost a month: $504.00 = tools $174.00 (4 bills, September) + upkeep 6 h x $55.00
2
⏺ Bash(gh pr checks --watch)
⎿ ci pass 1m31s cost-case --check pass 9s
⏺ The script and its 4 tests pass. Our running cost is $504.00 a month, all from bills and your calendar. Payback and the three-year value cannot be worked out yet, because the after-timings come from the pilot. When you add them, run npm run cost-case and the page updates; CI fails if anyone edits the numbers by hand.
The arithmetic is proved on the illustrative example first; then your numbers go through the same script.
  1. Red first, then green: the test can fail, so its pass means something.
  2. This is the honest result for most plants at Session 22. It becomes a number at the day-30 review in Session 23.

Check it worked

CI shows cost-case --check green. docs/costs.md's The case section shows each formula with its numbers, a sensitivity table, or "Cannot be worked out yet" naming what is missing. The test with the illustrative example passes and was shown failing first.

Fastest path

Asking for the CI check in the same prompt means nobody can later edit a number on the page without changing its source in the CSV. It saves the argument at the three-month review about where a figure came from.

If it goes wrong

The script shows a payback even though the after-timings are Not measured

It has treated unknown as 0 or guessed. Say: Any Not measured input must give Cannot be worked out yet. Add a test for it and show it red first. A savings figure the system made up and labelled as real is a mistake we made on our own platform; this test stops it here.

Claude Code says the tests pass, but the check on GitHub is red

Say: The check on the pull request is red. Run gh pr checks, read the failed log, fix the cause and wait for green before you report. A summary is a claim; the check on GitHub is the evidence.

One assumption moves the result far more than the others

That is what the sensitivity table is for. Spend your measuring effort there: more samples, or one more task timed. Write one sentence on it on the page.

SensitivityFour bars drawn to scale around a three-year value of about $36,000. Hours saved moves it most, by about $20,000 either way; subscriptions, upkeep hours and tool prices move it less. Three-year value if one assumption is half or one and a half times its value (illustrative)Hours saved ±50%$15,724$56,260Subscriptions retired ±50%$26,992$44,992Your upkeep hours ±50%$30,052$41,932Tool prices ±50%$32,860$39,124centre line: $35,992, the estimate
Sensitivity, illustrative: hours saved moves the three-year value most. If one of your bars crosses zero, the page must say so and say what would have to be true for the case to hold.
Step 7

Check every claim, then take it to finance and merge

10 minutes, plus the meeting

Why

One unsupported number spoils the whole page: a reader who finds it stops trusting the rest. An audit that lists every number and claim with its source, before the meeting, finds it first. Then the people who decide read it, owner two approves it, and a monthly bill review in the runbook keeps it true after this session.

Do this

Paste into Claude Code
Audit docs/costs.md on the branch costs/first, without changing it yet. List every number and every claim in it (including words like "saves", "faster", "replaces", "pays back"). For each give: the line, its source as written, and one of: BACKED (a bill, query, timing file or finance with a date), ASSUMPTION (stated as one, with why), or UNBACKED. Also list anything that looks copied from a vendor's or a course's marketing, and any benefit that is described but not measured.

Then propose the changes: UNBACKED numbers are removed or turned into "Not measured"; unmeasured benefits (errors avoided, faster holds, fewer suspect parts shipped) go into a "Named, not priced" list. Wait for my yes before changing anything.

After I say yes: add to docs/runbook.md a monthly task "Bill review: read the four bills, update docs/costs.csv, run npm run cost-case, one sentence on anything that moved", push, wait for the checks and tell me the result.

Book 20 minutes with the plant manager and someone from finance. Show them the page on GitHub, not a copy: every source is one click away. Record what they asked and changed, have Claude Code add a line at the top of the page (Read with <roles> on <date>), and then owner two approves and merges.

You will see recreated screen

claude — acme-platform
⏺ BACKED 14: four bills (September invoices), the query result of 2026-10-20, three timing files, finance's rate of 2026-10-18, finance's subscription list. ASSUMPTION 1: half of freed hours counted (stated, with why). UNBACKED 1: line 9, "the platform will save around $40K a year": no source; it matches a sales page's range, not our numbers.1
⏺ Named, not priced: fewer suspect parts shipped; faster holds on suspect lots. Proposed: remove line 9; move the two benefits to Named, not priced. Waiting for your yes.2
The audit: every number and claim, sorted by what backs it.
  1. One unsupported sentence found before finance found it. It goes.
  2. Benefits you have not measured are listed by name. That keeps the priced numbers trustworthy.

You will see recreated screen

github.com/acme-ops/acme-platform/blob/main/docs/costs.md
docs/costs.md
Read with the plant manager and finance on 2026-10-231
LineA monthSource
Tools (4 bills)$174.00invoices, September
Upkeep 6 h × $55$330.00calendar; finance rate
Hours freedNot measured yetpilot, Session 23
Minutes from failed first piece to holdbaseline 95 (INTENT, 2026-09-08) · target 15 · today 14 (37 events, query of 2026-10-20)2
The merged page on GitHub, as finance reads it. Every number links to where it came from.
  1. The sign-off line: who read it, and when.
  2. The decision the platform was built for, measured before and after, with the dates. This is the line that matters most to the plant manager.

Check it worked

docs/costs.md is merged on main with no UNBACKED number, a Named, not priced list, the readers' sign-off line, and the monthly bill review is in docs/runbook.md.

Fastest path

Asking for the audit before the meeting, and waiting for your yes, turns the meeting into a decision instead of a hunt for the weak number.

If it goes wrong

The plant manager asks for a figure you have not measured

Say what it would take to measure it and when (most often: the pilot's after-timings, in Session 23), and add it to the page as "Not measured yet, first reading <date>". Do not estimate it in the meeting: an estimate said aloud becomes the number.

Finance uses a different loaded rate

Use theirs. Change the row in docs/costs.csv with the source "finance ", run npm run cost-case, and the page updates with the working.

The case comes out negative

Say so on the page, plainly, with the reason: a small plant, a subscription that cannot yet be cancelled, few hours saved. Then say what would have to be true for it to hold. A case that is honest when it is weak is believed when it is strong.

Before you go on · Session 22 is done whenTick each one

Knowledge check

Build cost $6,000; net value $1,500 a month. What is the payback?

Knowledge check

The audit finds "saves around $40K a year" with no source. What do you do?

References

  1. US GAO: Cost Estimating and Assessment Guide (GAO-20-195G). https://www.gao.gov/products/gao-20-195g
  2. FinOps Foundation: FinOps Framework. https://www.finops.org/framework/
  3. Vitest: Getting started. https://vitest.dev/guide/

Chapter 4 · 12 questions · 80% passes

Final assessment

Twelve questions across the element. Score 80% (10 of 12) to pass. Your LMS records your score and each answer; you can review the chapters and try again.

15 min12 questions≈ 15 minutesRetake allowed

Choose one answer for each question, then submit. You will see the right answer and why for every question.

1. Where does each running cost in docs/costs.md come from?
2. Why does Claude Code write "Not read yet" instead of amounts in the first draft?
3. Who reads the billing pages?
4. The Claude bill and the fleet ledger differ by 13%. What does the page show?
5. Where does the baseline for the intent's measure come from?
6. Today's query finds 6 events in four weeks. What is today's number on the page?
7. Why is the query tested on made-up rows with a hand-worked answer, and shown failing first?
8. A $35 hourly wage gives a loaded rate of about:
9. When may a subscription count as money saved?
10. The after-timings are not measured yet. What does the cost-case script write for payback?
11. Someone wants a sales page's yearly savings figure in the case. What do you do?
12. Errors avoided were not measured. In the case they are: