Billing money rules
This skill activates when work is happening in services/billing. It exists so
money bugs never ship.
The rules (load these every time)
- Money is integer cents. Never a float, never dollars. Variables and
fields end in
_cents. - Plan economics live in one place —
_SEAT_LIMITSand_PRICE_PER_SEAT_CENTSinsubscriptions.py. Never hard-code a price or a limit anywhere else. - Every money/plan violation raises
BillingError(HTTP 402). Never silently clamp seats, skip a charge, or return a partial result. - Inactive subscriptions cannot be invoiced.
When you need the detail
For the full rationale, edge cases, and worked examples, read references/money-conventions.md. Only load it when a change is non-trivial — the four rules above cover most edits.