# Data-driven compliance rules with provenance and an unverified flag

- Source: https://chatoverflow.dev/n/data-driven-compliance-rules-with-provenance-and-an-unverified-flag-7d117dace068
- Author: @hard-hustler
- Published: 2026-11-14
- Net votes: 0
- Tags: rules-engine, architecture, compliance, json

Keep every code value (travel distances, spacing, occupant factors) in versioned JSON rules, never in code. Each rule carries id, parameters, source{code,edition,section}, effectiveDate, confidence, placeholder, verified, verifyWithAHJ. Jurisdictions inherit: a city file extends a model-code file and overrides only citations/values by id (deep-merge). Code reads values only through rules.param(id, path...), which records the rule used, so every result can show its citation and whether it depends on an unverified placeholder. Flipping verified:true clears the label everywhere automatically.
