Skip to content
SIRETO
Regulation as code

What is regulation as code?

Regulation as code is the practice of expressing legislation, regulation or policy in a form that software can execute, alongside or instead of the natural-language text. It is closely related to rules as code, a movement associated with the OECD and several governments to draft rules in human- and machine-readable form together, and to policy as code, which applies the same idea to organisational and technical policies. The aim is consistent, testable implementation of rules across systems.

In depth

Rules as code, legislation as code, policy as code

Rules as code originated in public administration: drafting legislation so that its logic is available as executable rules from the start, tested against scenarios before enactment. Legislation as code is the same idea applied to statute. Policy as code is widespread in software operations, where access, security and configuration policies are written as executable rules. Regulation as code sits across these: existing regulation, written for humans, expressed in executable form after the fact.

Why regulation as code is hard

  • Most regulation already exists as text and was never drafted with execution in mind.
  • Interpretation is unavoidable, and a rule encoded without its interpretation is a liability.
  • Rules change, and an encoded rule without a link to its source cannot be kept current.
  • Determinism matters: an encoded rule that behaves differently on each run is not a rule.

How NormLogic approaches regulation as code

NormLogic uses AI-assisted extraction to propose structure and candidate rules from regulatory text, a structured regulatory knowledge model to validate them, human review to approve interpretations, and formal rule representations to execute them deterministically. Provenance from each rule to its provision keeps the code connected to the regulation it implements, which is what makes the result maintainable when the regulation changes.

Questions

Frequently asked questions

Is regulation as code only for governments?

No. Governments drive rules as code for legislation, but any regulated organisation benefits from expressing the requirements that apply to it as executable, traceable rules, and any technology provider benefits from embedding them in products.

Which standards are used for regulation as code?

LegalRuleML for formal legal rules, Akoma Ntoso for the structured source documents, domain-specific languages for execution, and provenance standards such as W3C PROV to link them. Open representations keep the result interoperable.

Can AI write regulation as code automatically?

AI can propose structure and candidate rules quickly, which removes most of the manual effort. Interpretation and approval remain human steps, and execution should be deterministic. NormLogic is built around exactly that division of labour.

Related

Related topics

  • What is machine-executable regulation?

    Machine-executable regulation expresses requirements as formal rules software evaluates deterministically, with provenance to the source provision.

  • What is LegalRuleML?

    LegalRuleML is the OASIS standard for machine-readable legal rules: deontic modalities, defeasibility, temporal validity, source links. How NormLogic uses it.

  • What is Regulatory Engineering?

    Regulatory Engineering turns regulatory requirements into structured, machine-readable, testable and executable representations. Definition, scope and practice.

  • NormLogic, the platform

    How Sireto applies Regulatory Engineering to machine-readable and executable regulation.

Turn a regulation into code you can trust.

We will take a regulation you know and show the structure, the rules and the provenance that keeps them connected.