Regulatory & Ruleset Diff Engine
Compares versioned Single-Source-of-Truth (SSOT) rulesets across temporal transition windows to generate auditable diffs.
Supported Domains & Ruleset Transition History
umkm: CompareUMKM-2022(PP 55/2022) ➔UMKM-2026(PP 20/2026, effective 2026-04-22).bpjs: CompareBPJS-2025➔BPJS-2026(effective 2026-03-01 wage cap changes).pph21: ComparePPH21-2024TER tables & Article 17 brackets.marketplace: Compare platform fee policy versions (MKPL-FEE-2024).
Hybrid Execution Model
Pass parameters to engines/regulatory-diff.js:
compareRulesets(domain, oldRulesetId, newRulesetId)- Returns structured diff including:
effectiveTransitionDate: Date the amendment or new regulation took force.removedEntities/addedEntities: Eligibility changes (e.g. PT/CV removal under PP 20/2026).totalChanges: Number of modified statutory parameters.lifecycle_status: Status transitions (ARCHIVED➔RELEASED/SUPERSEDED).
Trust Envelope & Provenance
- Outputs link directly to official gazette sources cited in
PROVENANCE.md. - Verified against cryptographic ruleset hashes in
engines/rules/integrity.js.