[sign-convention] money sign-convention validators + Adjustment model

Featurekamo-shared-library
Shipped
July 4, 2026 at 2:09 PM UTC
Author
Kamo
Commit
30a69a4

Per the owner's canonical rules. Core domain money never encodes meaning in a sign: - **************** / requirePositive — assets, receivables, liabilities, payables, fees, costs, credits are POSITIVE magnitudes in their own fields (rules 1-3); a negative value fails fast. - AdjustmentDirection {INCREASE, DECREASE, CREDIT, DEBIT, PREMIUM, DISCOUNT} — rate/ price adjustments (LLPAs, SRPs, pricing adjustments, concessions, rebates) expose an explicit direction, never a signed number (rule 5). - **************** + the self-validating Adjustment record — reject a magnitude whose sign conflicts with the declared direction (rule 6); a signed Adjustment cannot be constructed. Rules 4 (accounting +/- lives only in the GL layer) and 7 (signing only in the adapter layer) are architectural boundaries the guard enforces by living in the CORE and rejecting signed encoding — the sign-bearing conversion for investor/warehouse/ accounting/MISMO feeds stays out of the domain by construction. 4 tests green.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing