0006. Country rules are data
- Status: Accepted
- Date: 2026-10-27
Context
Section titled “Context”Tax rates, rounding rules and receipt requirements differ by country and change over time. Hard-coding Malaysian rules would make every other country a fork.
Decision
Section titled “Decision”Country-specific rules (tax codes and rates, cash rounding, required receipt fields) live as data in a country pack, validated by a JSON schema. Malaysia (packages/country-my) is the first pack. packages/core implements the generic calculations and reads rates and codes from the pack.
Consequences
Section titled “Consequences”- No Malaysian rate or code is hard-coded outside
packages/country-my. - Each pack ships test vectors (
fixtures/vectors.json) that any implementation can check itself against. - Supporting another country is a contribution of a new pack, not a fork.
For AI tools: llms.txt ·llms-full.txtopenkedai.com