Budgets
A budget is a rule policy. Instead of a condition on one action (require), it carries a counter
over several actions: a sum or a count, per scope and per period. It is written in policies:
and cited like any policy: {policy: remboursements-du-jour}.
Writing a budget
policies:
remboursements-du-jour:
type: rule
budget: {sum: "$item.fields.amount", per: day, scope: identity, max: 500}
reason: "daily refund cap of €500 reached"
depense-du-jour:
type: rule
budget: {sum: "$selection.total", per: day, scope: identity, max: 60000}
Like any rule policy, a budget refuses by default; effect: needs-human sends the action beyond
the cap to a person.
Budget and consumption
The budget caps actions, in the tenant's money or in count. What the station costs the tenant — journeys, model calls, deliveries — is its consumption: it is read in the console and billed, it is never a policy.