Skip to content

ADR-0019: Compliance rules as a regulatory preview

  • Status: Accepted
  • Date: 2026-11-12

Ochema ships with regulatory content: which documents a driver of each type needs, how long each one is valid, how long records are kept, consent texts, the keywords and replies of SMS opt-out, the consent to sign electronically. A carrier relies on this content, yet the fact that a rule is implemented does not mean it was reviewed against the regulation by someone qualified.

How does the product present rules whose legal review is not complete?

  • The product must not claim compliance it cannot back.
  • A company must be able to tell reviewed rules from unreviewed ones on the screen.
  • A validation must be attributable: who, when, which rule.
  • A company cannot mark a platform rule as validated by itself.
  1. Every rule and legal text is born as a preview, with the citation of the regulation, and only the platform team changes it to validated.
  2. Rules shipped as authoritative. Obvious alternative, listed for comparison.
  3. No built-in rules: each company writes its own. Obvious alternative, listed for comparison.

Chosen option: 1.

Four global catalogs carry the column validation_status, with the values preview and validated: compliance_rules, consent_texts, system_message_texts and legal_texts. Every row starts as preview. Only a member of the platform team changes the status, through staff functions of the database (ADR-0023), and each change is recorded with its author in compliance_rule_validations and in the platform audit log. The body of a legal text is never updated: a new wording is a new version, added by a migration.

The screens show “Regulatory preview” or “Validated” next to each rule, retention term and text. A signature stores whether its consent text was validated at the moment of signing.

  • Good, because the status of every rule is visible where the rule is used.
  • Good, because validating is an audited act of the platform team, separate from releasing code.
  • Bad, because while a rule is “Regulatory preview” the company is responsible for checking it against the regulation. The product does not state that following the rule satisfies the law.
  • Bad, because validation is manual work per rule and per text.
  • Bad, because a change in the wording of a legal text needs a release.
  • packages/db/src/schema/compliance.ts: the four catalogs and compliance_rule_validations.
  • packages/db/src/staff.ts: the functions the platform panel calls.
  • apps/web/src/routes/compliance/driver-files/labels.tsx: the mark on the screen.
  • Concept page: Messaging, for the consent texts and the keyword replies.
  • Constraints lists the regulatory constraints. Quality requirements covers regulatory compliance.
  • User guide: Document types and rules.
  • Glossary.