vibeexchange.ai Community Apps Treasury

Docs / The .treasury ledger

stable updated 2026-06-06

The .treasury/ ledger

.treasury/ is the money of a listing — an append-only ledger inside its repo. It answers who paid, how much is left, and who therefore gets a vote.

Layout

.treasury/
  treasury.toml      # currency, platform_fee, derived snapshot (cache)
  ledger.jsonl       # append-only entries (the source of truth)
  cap-table.toml     # derived snapshot of shares per sponsor (cache)
  runs/<run-id>.toml # token-only spend reports from the orchestrator (input to pricing)

ledger.jsonl — the source of truth

One JSON object per line, append-only. Balances and shares are derived from it; nothing is edited in place.

{"id":"le_001","at":"2026-05-01T10:00:00Z","kind":"pledge-released","amountUsd":300,"ref":"pl_1001","note":"creator match"}
{"id":"le_002","at":"2026-05-03T14:20:00Z","kind":"pledge-released","amountUsd":440,"ref":"pl_1002"}
{"id":"le_003","at":"2026-05-09T09:05:00Z","kind":"agent-spend","amountUsd":-120,"ref":"run_77","note":"m1 core tracking"}

Entry kinds: pledge-released, pledge-refunded, agent-spend, fee, adjustment.

treasury.toml — cached snapshot

[treasury]
currency = "USD"
platform_fee_pct = 5
total_released_usd = 740
total_spent_usd = 120
balance_usd = 620          # released - spent

cap-table.toml — derived shares

[[row]]
sponsor = "mira"
released_usd = 300
shares = 300
share_pct = 40.5
lead = true

[[row]]
sponsor = "devon"
released_usd = 440
shares = 440
share_pct = 59.5

runs/ — the orchestrator reports tokens, we price them

The orchestrator (agentFleet) is USD-agnostic. When a build run finishes it writes a token-only spend report to .treasury/runs/<run-id>.toml — never a dollar figure:

version = 1
run_id = "run-offline-sync-20260606"
listing_slug = "carecircle"
milestone_id = "m2"
runner = "codex-run"
model = "claude-opus-4-8"
status = "succeeded"
prs = ["PR#42"]
[tokens]
input = 7200000
output = 2300000
total = 9500000

Our treasury service reads each report, prices the tokens to USD with its own pricing, and appends the matching agent-spend entry to ledger.jsonl. The orchestrator never writes the ledger — that keeps a single, auditable money authority and lets the build engine stay provider-portable. See build requests.

Why append-only

An immutable ledger makes the money auditable: every dollar in and every token out is traceable, and the cap table (your voting power) can always be recomputed from first principles. The companion to .treasury/ is .roadmap/, which holds scope and rules.