Skip to content

Add MOD-US-0002, the United States country layer - #29

Draft
RobGrafrath wants to merge 3 commits into
pack-construct-linesfrom
us-country-layer
Draft

RobGrafrath wants to merge 3 commits into
pack-construct-linesfrom
us-country-layer

Conversation

@RobGrafrath

Copy link
Copy Markdown
Contributor

What this changes and why

MOD-US-0002 is the second decision of the United States layer. It specifies the one country layer that carries the country's structure, formats, and translations and no compliance content: the US Locale Module, the Region Pack region.us, and the US Language Packs. Every state uses this one layer, because states differ in law and procedure and not in structure. What a state requires goes to its Compliance Pack or to a module's Boilerplate Pack for that state, and a Louisiana parish is stored in the county field. Rob Grafrath asked for this decision after #28 drew the lines between the constructs.

Most of the US structure was already assigned to the US Locale Module across several decisions. HIVE-0001 named its name and identity tables, HIVE-0002 had it declare the matching fields, HIVE-0003 gave the address fields and the completeness rules, and WAX-0008 sketched the module. This decision gathers those in one place and adds what was missing.

  • The US Locale Module owns the us_locale tables. Names are given, middle, family, and suffix, and display_name is built in that order. Identity numbers are the Social Security number, the employer identification number, and, as proposed here, the individual taxpayer identification number. Addresses take the USPS state codes, including the District of Columbia, the territories, and the armed forces post offices, a ZIP or ZIP+4 code, and a county field that also holds a parish or a borough.
  • The module validates and formats US phone numbers, stored in E.164 form in the core phone history, and declares the matching fields that HIVE-0002 asks of each Locale Module.
  • The module resolves a party's time zones from an address, by state and by ZIP Code where needed, or from a phone's area code. WAX-0012 already says that the debtor's zone governs permitted contact times, and this is how a rule finds it. Which zone a rule honors when the address and the phone disagree is compliance and is left to compliance.us.
  • The Region Pack region.us supplies the dollar with half away from zero as its rounding convention, the US display formats, the US time zones, and a federal holiday calendar in the shape WAX-0012 defines, for rules that count business days. A court's own holidays belong to the legal module's Boilerplate Pack for that state.
  • The Language Packs are US English to start and US Spanish next, as WAX-0011 plans.

Interacting decisions

  • WAX-0008: this decision is the United States instance of the Locale Module, Region Pack, and Language Pack constructs, and it follows the tests that Draw clean lines between modules, locale packs, compliance packs, and boilerplate packs #28 adds.
  • WAX-0004: its example row for the us_locale schema now lists us_name_components beside us_identity and us_address, because HIVE-0001 already names that table.
  • WAX-0012: the module supplies the debtor's zone that contact rules evaluate, and region.us supplies the national calendar that business-day counts name.
  • WAX-0014: the Social Security number and the individual taxpayer identification number are designated for column-level encryption.
  • WAX-0034 and HIVE-0007: region.us supplies the dollar's minor-unit scale and the rounding convention that HIVE-0007's pro-rata shares use.
  • WAX-0011: US English, then US Spanish.
  • HIVE-0001, HIVE-0002, and HIVE-0003: the name, identity, matching, address, and phone structures are the ones these decisions already describe, gathered here without change.

If this touches decisions/wax/

One Wax decision changes, and only in an example. WAX-0004's table of example schemas lists us_name_components for the us_locale schema. Hash chain integrity, event immutability, and module boundaries are untouched. Schema ownership is unchanged: the us_locale schema stays with the US Locale Module, and the table it lists is one HIVE-0001 already assigns to it.

Version bumps

MOD-US-0002 is new, Proposed, at 0.1. WAX-0004 takes no bump for an example that names an existing table.

Choices this draft makes

  1. The individual taxpayer identification number is recorded beside the Social Security number, for a person who has one in place of it, with its own format check and encryption.
  2. The dollar's rounding convention is half away from zero, with half to even available to a rule that names it. This is a practice question and needs confirmation by practitioners.
  3. A phone number's area code resolves to its zones, and an area code that covers more than one zone returns each of them. The choice between candidate zones is left to compliance.us.
  4. The federal holiday calendar belongs to region.us as national calendar data, and a court's holidays belong to the legal module's Boilerplate Pack for each state.
  5. display_name is built as given, middle, family, and suffix.
  6. Phasing puts the tables, validation, phone handling, matching fields, zone resolution, region.us, and US English in v1, and CASS standardization and US Spanish in v2.

Stacked on #28

This pull request is based on #28, which is based on #27, because it uses the construct names and tests that #28 adds and the MOD-US family that #27 adds. Its base is the pack-construct-lines branch, and when #28 merges, its base moves on.

Checklist

  • I read the decisions neighboring this change, not just the file I edited.
  • New or retitled decisions have a matching line in INDEX.md, and front matter follows CONTRIBUTING.md.
  • python3 scripts/validate.py --base main passes locally, or I am relying on CI to tell me.
  • No pricing, rates, market or customer allocation, consumer data, or client-confidential information.
  • Claims about law or regulation are flagged for verification, not asserted.
  • Commits are signed off (DCO). If I forgot, I will post the retroactive sign-off comment per CONTRIBUTING.md.
  • I license this contribution under CC BY 4.0 (prose) and Apache 2.0 (embedded code samples).

🤖 Generated with Claude Code

Add the second decision of the United States layer: one country layer
that carries the country's structure, formats, and translations and no
compliance content. Every state uses it, because states differ in law
and procedure and not in structure. Rob Grafrath asked for it.

The US Locale Module owns the us_locale tables for names (given,
middle, family, and suffix), identity numbers (the Social Security
number, the employer identification number, and, as proposed, the
individual taxpayer identification number), and addresses (USPS state
codes including DC, the territories, and the armed forces post offices,
ZIP or ZIP+4, and a county field that also holds a parish or a
borough). It validates and formats US phone numbers, declares the
matching fields that HIVE-0002 asks for, and resolves a party's time
zones from an address or an area code, which is how a rule finds the
debtor's zone that WAX-0012 says governs contact times. Which zone a
rule honors when the two disagree is left to compliance.us.

The Region Pack region.us supplies the dollar with half away from zero
as its rounding convention, the US display formats, the US time zones,
and the federal holiday calendar that business-day counts name. The
Language Packs are US English, then US Spanish.

The decision gathers what HIVE-0001, HIVE-0002, HIVE-0003, WAX-0004,
and WAX-0008 already assign to the US Locale Module. WAX-0004's example
row now lists us_name_components, which HIVE-0001 already names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Rob Grafrath <[email protected]>
Rob Grafrath and others added 2 commits October 11, 2026 11:11
…PR 26

PR 26 merged into main, and the branch below this one now carries it,
with the conflicts resolved and the rename applied to what PR 26
added. This merge brings that into the stack above it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Rob Grafrath <[email protected]>
Brings in the WAX-0008 default test for cautious defaults and Boilerplate
starting values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Rob Grafrath <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant