The Metabolic Ledger
Public receipt: 47.7K tokens consumed
Preamble
Every public node costs something to grow. The ledger names the cost, the attribution, and the places where the system still cannot prove what happened.
Mechanism
The ledger starts at the session. The intended pipeline writes the cost of work into constitution.db. Each row can carry a project_id and an allocated_pct, so a session can belong to one project or be split across several.
The rollup is deliberately plain:
SELECT project_id, SUM(token_actual)
FROM sessions
GROUP BY project_id;
That query is the spine of the public receipt. It turns a private coding session into a visible cost attached to a seed.
The query is plain. Attribution is the hard part.
Attribution Rule
If a task declares projects: [N], that project should get the session. If no task is loaded, the work becomes unattributed. If more than one project was fed by the same session, the allocation percentage should split the cost.
That rule is simple on paper and fragile in practice. A session can begin in one project, repair another, and still produce infrastructure that belongs to the garden shell. Without attribution, the receipt becomes decorative.
What It Prevents
The ledger prevents two opposite lies.
The first lie is that AI work is free because the subscription was already paid. The second is that every token has a clean owner.
The truth is messier. Some work has a clear project. Some work belongs to shared infrastructure. Some work is unattributed until the pipeline improves.
Public Meaning
If a visitor sees a receipt, it should be boring and checkable: a row, a count, a cost, and a confidence boundary.
The metabolic ledger makes consumption visible. It leaves virtue out of the receipt.