amanah-currency-localization

Implement ISO country/currency data, multi-currency debts, locale-safe formatting, dates, precision, and timezones.

SKILL.md

GitHub

Purpose

Make Amanah correct across regions without corrupting monetary meaning.

Scope

ISO 3166 countries, ISO 4217 currencies, mappings, selectors, storage, decimals, dates, locales, and timezones.

Rules

Store amount plus currency code; use Intl.NumberFormat; preserve original currency; capture standardized country codes; store timestamps in UTC and render locally.

Required patterns

Searchable selectors show country/flag/code or currency/code/name/symbol. Default currency affects future entries only.

Forbidden patterns

Never combine different currencies without explicit conversion, manually concatenate symbols, silently convert history, or use floating point for persisted money.

Relevant modules

Onboarding, profile, debt amount entry, summaries, settings, admin regional configuration.

Testing

Test zero/three-decimal currencies, separators, negative values, multi-currency dashboards, locales, DST, and mapping changes.

Definition of done

Every amount retains currency identity and formatting is locale-safe throughout.