value-objects-money-and-unitslisted
Install: claude install-skill zakariaf/CatchLaw
# Value objects: money & units
Store every quantity **once, in one canonical form, and convert only when shown or
exported**. Money is integer minor units plus a currency; physical quantities are
whole SI base units; time is UTC. This is what lets a user flip any display
preference (currency symbol, unit system, locale) without corrupting one stored
row, and lets "sum of parts == whole" be structural, not hoped-for.
This core is **pure Dart** — no `flutter/*`, no `intl`, no `dart:io`, no plugins.
Formatting and digit normalization happen upstream/downstream, not here. These
value objects live in `lib/core/`, the sanctioned pure-foundation layer (see
`project-structure-and-packages`) — never a `utils/`/`common/`/`shared/` grab-bag.
Read the reference for the task at hand:
- `references/allocate-and-splitting.md` — the largest-remainder `allocate()`
primitive, its invariants, the two-rounding-sites trap, edge policies, verified
test vectors, and the subtotal→tax→tip split pipeline.
- `references/canonical-storage.md` — the ISO-4217 exponent rule, the SI unit
tables, `decimal`-based parsing, the cents-accumulator for keypad input,
rounding discipline, and the Clock-injected dated-rate / staleness engine.
- `references/domain-model.md` — value-type modelling: relationships as id links,
derive-don't-store, one currency per aggregate, immutable state with value
equality.
Run `scripts/check-money-violations.sh` and `scripts/verify-core.sh` before a PR.
## Non-negoti