12 · The Books in detail

12 · The Books in detail

Babb

2026-11-23. The request: "Let's study books in more detail."


The Books answer one question: where did every conserved quantity come from, and where did it go? That covers money and equally energy, compute, tokens, material and people's hours. Entries record movements. Balances are always computed, never written.


What the Books are made of


babb-table/1
[["Part", "What it is", "Declared"], ["Unit", "A kind of quantity, with a dimension and a base unit", "Register"], ["Account", "A place a quantity sits or passes through", "Register"], ["Book", "A boundary of accountability (an entity, site, project or household). A balance is per (book, account, unit).", "Register"], ["Pool", "An account that supplies: host energy, a token allowance, shift hours, cash", "Register; named per run"], ["Movement", "A signed amount between accounts", "Log entries"], ["Close", "A sealed period, committed by hash", "Log entry"]]
Part | What it is | Declared
Unit | A kind of quantity, with a dimension and a base unit | Register
Account | A place a quantity sits or passes through | Register
Book | A boundary of accountability (an entity, site, project or household). A balance is per (book, account, unit). | Register
Pool | An account that supplies: host energy, a token allowance, shift hours, cash | Register; named per run
Movement | A signed amount between accounts | Log entries
Close | A sealed period, committed by hash | Log entry

Account roles: sources and pools, activities, stocks, outputs, parties.


Two kinds of movement



  • Explicit postings are entries whose whole claim is a transfer (a purchase, a payment, a budget). They carry legs that balance per unit:
    inv:raw −100 kg → inv:product +92 kg, inv:scrap +8 kg

  • Implied postings come from acts. When a span closes with use: 33.1 CPU-s, ~480 J and its run declared pool = host:build-01, the movement pool → activity is already fully stated. The Books derive it, and nothing extra is written. Consumption is the most frequent movement, so this keeps it at zero extra bytes. The Rust stream-books crate implements exactly this.


Units, and why value isn't converted



  • A conversion holds within a dimension, always (1 kWh = 1000 Wh), so it belongs in the Register.

  • A price crosses dimensions and is contingent (an hour is worth $50), so it belongs in a view.


Workwarrior's units-v1 already enforces this split. Cost, value and margin are views over a versioned price table, and repricing never touches the Books.


Measured, estimated, settled


A movement carries how it is known:
- measured: a meter, cgroup counters, API usage;
- estimated, marked ~: a run's share of host energy, a provisional charge;
- settled: an invoice.


An invoice supersedes the provisional charge, and the difference shows as a correction.


Time and periods



  • Balance at any time: the last Close plus the movements since.

  • A late entry for a closed period: posted as an adjustment in the open period, referencing the closed one (recommended).


Time as a balance


People's hours, machine uptime and an agent's budget are capacity, conserved per actor. Wall time is not conserved. Elapsed time is not the same as time spent from someone's capacity.


Open: an operator clocked onto two machines at once. Split their hours, or flag the overlap? The recommendation is to flag it, unless a declared rule says how to split.


Allotment: the managerial payoff


A budget is a posting from a pool to an allotment account:


host:build-01:energy  −900 J  →  allot:k42  +900 J

Consumption draws against it. Three views follow:
- Variance: allotted against used.
- Headroom: the surplus left in each pool.
- Efficiency: output per unit of input.


These are the figures that let an undertaking hold output steady on less input, or put surplus to work.


Worked example: one agent task


babb-table/1
[["Account", "J", "CPU-s", "Input tokens"], ["host:build-01 (pool)", "−610", "−41.0", ""], ["provider allowance (pool)", "", "", "−18,000"], ["run:k42 (activity)", "+610", "+41.0", "+18,000"], ["↳ remainder (overhead)", "~55", "2.5", "0"]]
Account | J | CPU-s | Input tokens
host:build-01 (pool) | −610 | −41.0 | 
provider allowance (pool) |  |  | −18,000
run:k42 (activity) | +610 | +41.0 | +18,000
↳ remainder (overhead) | ~55 | 2.5 | 0

Each column balances on its own. A dollar figure is a priced view until an invoice settles it.

Report Page