Chapter 6 — Cost and spending

Status: DRAFT 1 (2026-09-21), DESIGN v6 §4, §8. Merges v5's Chapter C (methods, worksheet) with the spend loop. Every number here is a credit count read from a ledger row; no money figure appears in this chapter (Appendix A).

6.0 Objective

Given a rate card and your shotlist, you can fill the job-type worksheet, set a stop threshold and a take budget per card, run one spend loop end to end (fence → price at the button → one job → verify it queued → ledger row), and read the result with valid evidence.

6.1 What you are deciding

Two things before the first credit of the film is spent:

  1. How much, in which job types, and where you stop. Not a total. A worksheet with one row per job type (video takes, stress videos, stills, voice lines, voice change, score, a rewrite reserve), each row count × billable quantity × today's rate on your tool. Usable runtime is not generated runtime: every video row carries handles and trim loss. Ours was 71 % measured over every generated second, rejected takes and tests included (Appendix A), so that one number already contains our retakes; do not add a retake share on top of it. If you budget attempts per card (ours: about 0.64 extra per card on average; 46 % of cards had at least one retake), apply a trim loss for kept takes only, which we did not measure. The sheet ends with a stop threshold: the credit count at which you stop generating and rewrite or cut instead.
  2. How a single spend happens, every time. The loop below. It is the same for a 0.15-credit voice line and a 54-credit video.

6.2 How we did it

The eight methods (LESSONS.md:10–36)

Our protocol was written after the first week of spending and applied to the rest. In its own words, headwords only:

  1. "Documentation before credits." A test is for what the documentation does not settle.
  2. "One variable per test." Same card text, same seed where the UI allows, one thing changed. Two arms, not four.
  3. "Shortest duration and lowest resolution that still shows the beat." On our tool at 720p: 6 s cost 27, 11 s cost 50 (LESSONS.md:18).
  4. "Free arms first." Test a hypothesis on the near-free tool before the 50-credit one.
  5. "Preflight the references before the spend." Fixing a reference cost 2; finding it after a take cost 50 (LESSONS.md:25).
  6. "Read every take five ways before the Director does": contact sheet, two-timestamp crops, 6 fps strip, 12 fps first-second track, transcript.
  7. "Defect → rule → source." Fix the source, sweep the cards, then generate.
  8. "Ledger every job" with settings, the price read from the button, the file id, and the read. Duplicate clicks and silent hangs are logged as such.

The spend loop

fence written  →  price read at the button (zoom, screenshot)  →  ONE click  →  a "Generating" tile or a new job id in the API  →  ledger row (queued, price)  →  result read five ways  →  ledger row (read, actual charge from the account)

Three ledger rows show why each step exists (production/phase3/ledger.csv):

The price is read at the button because the button is where the tool commits: ours showed a struck list price and a discounted one ("30 struck → 23"), and the account was charged a third number (22.5; row 589). The ledger carries the read price on the queued row and the account's charge on the read row.

Reading a result with valid evidence

A read is a measurement with a file, and a measurement can be invalid. Our own gate tool printed PASS on an empty measurement (LESSONS.md:128: "media.sh firstsec can print PASS when the colour mask is empty and drift is NaN … This is invalid measurement, never evidence of a passed gate"). The fix was not to the tool first; it was to the rule: a read that did not measure the thing claimed is unverified, and unverified blocks.

6.3 Case 6-A — the gate that passed on nothing

6.4 Do it with your tools

Method We used Any tool If yours lacks it
Price visible before the click the composer's GENERATE button, zoom-read any UI or API that quotes before commit compute from the rate card and ledger it as computed, not read
Proof a job exists a "Generating" tile, then the jobs API id any job list, email receipt, or account history wait for the account balance to change before any second click
Actual charge account API balance before and after any account page the read row says "charge not readable"; never copy the quoted price into it
Cheapest arm 2-credit image edits, 0.15-credit voice lines your tool's cheapest job type run the experiment as words on paper with the second reader first
Reading five ways ffmpeg strips and sheets, whisper same, free everywhere —

6.5 Your turn

Time cap: one evening for the sheet, one hour for the loop. Spend: the cheapest still on your tool, once (you priced it in Chapter 2).

  1. Fill the worksheet (Appendix C has the columns; DESIGN §8 the arithmetic). One row per job type. For video rows use your Chapter 5 shotlist: cards × (1 + assumed extra attempts per card) within the tier budget, running time + handles, × rate; then usable seconds = kept seconds × (1 − trim loss of kept takes). Use our numbers as a first guess, write "assumed from HALFWAY" beside each, and do not use both our 71 % and an attempts figure on the same row (DESIGN §8 says why). Check Σ usable ≥ your runtime floor + margin.
  2. Set the take budget per tier and write it on every planning card: turn shots 3, dialogue singles 2, inserts and plates 1. Set the stop threshold in credits and ledger it as a decision.
  3. Run the loop once on your film's first still (a location plate or a character sheet you will need anyway): fence, price read, one click, proof it queued, queued row, read five ways (for a still: media.sh img size, aspect, mean luma, palette; a crop of the face or the prop), read row with the actual charge.
  4. Break a gate on purpose. For each check the agent wrote in step 3, name the input that should make it fail (a zero-byte file for the probe; a frame with none of the colour it tracks for a mask check; a silent file for a transcript) and run it. A check that prints PASS on the input that should fail it is unverified until fixed. A check that legitimately passes (a black frame has a size and an aspect) is not the target. Ledger each check, its failing input, and what it printed.

6.6 Gate

Each line needs valid evidence per DESIGN §5; outcomes are pass / fail / unverified, and unverified blocks.

Pass example from HALFWAY: ledger row 571, the 5C retake: fence verified, "GENERATE zoom read 30 → 23. One Cmd+Return", job id, then row 572's read with the strip named. Fail example: row 225, the job submitted by a mis-aimed click at settings the fence did not say.