Rules as Code

What is Rules as Code?

Rules as Code is a interdisciplinary approach to the drafting, testing, and automation of legislation, regulation, policy, and other written legal rules. In the Rules as Code approach, rules are written both in natural languages like English and French, and also in computer languages. This improves legal quality assurance in automated systems, reducing risk, and also increases the quality of the written rules themselves.

How does Rules as Code improve legal drafting?

Rule drafting involves making sure that the rules are as clear as possible, and making sure that their clear meaning produces the desired effect. Rules as Code enhances both clarity and efficacy. Rules as Code enhances clarity because it is more difficult to be accidentally vague in a computer language than in a human language. Rules as Code enhances efficacy of the drafted rules because it becomes possible to automatically test your draft rules for their behaviour in a much wider range of possible fact scenarios than a human drafter is capable of imagining.

How does Rules as Code improve service automation?

The encodings of the rules created in the Rules as Code process can be used as the source code for applications that implement those rules. The encodings can also be used as a system against which other software can be tested for compliance with the rules, including after the rules change. The benefits to the improved drafting also carry forward to the automation stage, as better-drafted rules are easier to automate.

Who needs Rules as Code?

Rules as Code is potentially useful to anyone responsible for writing or following complex and changing sets of rules. Governments and regulators that want to reduce the cost of automating services and minimize the costs of compliance, institutions that want to minimize compliance risk in their in-house software development, and legal service providers that want to automate the parts of legal services that are based on following statutory instruments, and more.

It is also useful to legal drafting professionals as a tool for improving the quality of legislative and contract drafting.

How is Lexpedite's approach to Rules as Code different?

The Rules as Code world is young, and evolving. Everyone has their own approach. Lexpedite's guiding principal is that Rules as Code technology should be, and can be, easy to learn, and easy to use. We advocate for the adoption of the logic-based programming languages, which make it easier to write and maintain encodings of rules, and we advocate for turning the power of these languages into user-friendly applications like Blawx.