VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

What Is Vocabulary | When Do Words Become Executable Rules and Government Decisions?

Some rules written in natural language can be represented as computer-executable logic, but converting a rule into code does not give software the authority to rewrite the law or decide every human case. A clear eligibility condition such as “the applicant must be at least 18 on the application date” can be modelled as a test. Yet apparently simple words such as “resident”, “dependent”, “reasonable”, “temporary” and “exceptional” may require definitions, evidence and lawful judgment. When software uses the wrong interpretation, it can reject thousands of eligible people consistently and quickly. The central question is not merely whether a machine can execute a sentence; it is whether the executed rule faithfully reflects a valid, current and reviewable authority.

To examine Rules as Code, start with a concrete text, its legal or organisational status, the conditions it imposes, any exceptions, effective dates, required evidence and the authority that may interpret or change it. Represent narrowly testable conditions in a transparent decision model, compare results with the authoritative source and retain human review where discretion or dispute matters. Then zoom out from a simple form to public benefits, tax calculations, permits, government digital services, AI agents and cross-border systems. This is an explanation of a developing practice, not a claim that every law is already machine-executable or that software output is a court judgment.

  • Word zoom: “Must”, “may”, “only if” and “unless” change obligations and permissions.
  • Decision zoom: A rule can classify cases when its terms and relevant facts are well-defined.
  • Software zoom: Machine-readable documents and machine-consumable decision logic are different.
  • Institutional zoom: Authority comes from law and valid processes, not from programming syntax.
  • Human zoom: Discretion, disputed facts, exceptions and appeal cannot simply be hidden.
  • Societal zoom: A shared rules implementation may improve consistency while magnifying errors if inadequately governed.
  • Practical test: Compare code, authoritative language, edge cases, version history and real outcomes.

What is Rules as Code?

Rules as Code, often abbreviated RaC, is an approach to expressing relevant government or organisational rules in forms that digital systems can understand and use, alongside the human-readable rules.

The OECD’s Cracking the Code report explores how official machine-consumable rules could improve consistency, reduce duplicated translation and make public services more transparent.

The OECD also emphasises that rulemaking involves law, policy, service design and technology—not merely converting paragraphs into if-statements. Benefits depend on governance and the type of rule.

Why would governments consider it?

Digital services already translate eligibility and reporting obligations into software. Different agencies and suppliers may repeatedly interpret the same legal text and implement different logic.

One system might treat the day someone turns 18 as eligible; another might use an incorrect strict-greater-than test. One might apply a transitional exception that another misses.

A shared, officially governed rule representation could reduce these inconsistencies. It would still need testing, version control and appropriate legal authority.

Machine-readable versus machine-consumable

A machine-readable document contains information in a form that software can process or extract. A machine-consumable rule can be applied as operational logic, such as calculating a threshold or determining whether specified conditions are met.

An ordinary PDF with selectable text is not automatically a complete executable rule. A structured dataset may still lack logic for exceptions, discretion and timing.

The OECD Rules as Code report makes this distinction central to the approach. It also explains why legal meaning can be lost between text and code.

Machine-executable is not legally authoritative by default

A program can evaluate conditions, but its output does not automatically become binding law. The system’s authority depends on what the legal framework permits.

The OECD’s July 2026 Law as Code consultation distinguishes authoritative legal text from encoded logic, emphasising that the text remains the binding source in the consultation’s proposed framework.

The consultation describes a potential public digital infrastructure approach; it should not be mistaken for a globally adopted legal standard or universal requirement.

Rules as Code versus Law as Code

Rules as Code can involve legislation, regulations, policies or other formal rules used in service delivery. Law as Code focuses more narrowly on law represented in executable form under public authority.

The distinction matters because an internal policy may be easier to revise than legislation, and its legal force is different. A company’s decision engine should not present its own categories as statutory law.

Always identify the precise source, issuing body and authorised scope before claiming software implements binding law.

What makes a rule suitable for automation?

Rules with clear inputs, explicit thresholds and predictable calculations are often easier to model. Examples might include simple age checks, fixed fees or deadlines under a defined calendar.

A rule about whether conduct was “reasonable in all the circumstances” can require evaluating context and interpreting standards. It may be inappropriate to reduce that judgment to a hidden fixed score.

The New Zealand Better Rules initiative emphasises concept models, decision models and rules statements built through multidisciplinary collaboration.

Start with a concept model

A concept model identifies entities and their relationships: applicant, application, date, eligibility criterion, reviewing body and decision.

Without these distinctions, a programmer might treat “eligible”, “submitted”, “approved” and “paid” as one status. That would turn separate legal stages into one misleading state.

A concept model does not decide which law applies. It helps people agree on what the applicable concepts mean before encoding the conditions.

Then build a decision model

A decision model describes what inputs are needed and how specified rules determine an output. For example, a simple fictional service might require residence in an area for a minimum duration and proof of a relevant status.

The model should show the inputs, branches and exceptions. It should make clear whether a “pass” means permitted to apply, eligible for further review or finally authorised.

The word “approved” should never be silently substituted for “potentially eligible” when other steps remain.

A hypothetical age threshold

Suppose a fictional rule says, “Applicants must be at least 18 on the application date.” A system might compare the relevant dates and return whether that age condition is satisfied.

It must use the appropriate calendar, date of birth evidence and definition of “application date”. The result is only about the age criterion, not necessarily all other eligibility requirements.

A test suite should include cases just before a person’s eighteenth birthday, on that birthday and afterward.

The difference between necessary and sufficient

A necessary condition must be met for a result under a rule. A sufficient condition, alone or with other stated conditions, establishes that result.

Proof of age may be necessary for a permit but not sufficient. Background checks, fees, other qualifications or authorised approval may still apply under a particular framework.

When a system labels someone “approved” after one necessary condition passes, the coding mistake is also a logical-language mistake.

“And” versus “or” can change thousands of decisions

A rule requiring both residence AND a qualifying income condition differs from one requiring either condition. A mistaken operator can move many records into or out of eligibility.

Ordinary prose may contain complicated nested alternatives that are easy to misread. A formal decision table can expose whether all, any or exactly one condition must be satisfied.

Real applications need boundary tests and review by the people responsible for the underlying rule.

What about “unless”?

“Unless” introduces a condition or exception, but its practical meaning can be context-sensitive. For example, “a document must be submitted unless an authorised waiver exists” requires a reliable representation of the waiver and who can issue it.

A system that ignores the exception may reject valid cases. A system that accepts any unverified waiver record may create another error.

The model should distinguish the substantive rule, its exceptions, the evidence of each and the responsible authority.

Discretion cannot be made invisible

Some legal decisions require a qualified person to assess facts, fairness or reasons specific to a case. A program may organise information or calculate relevant factors without legitimately replacing the decision-maker.

The OECD’s 2026 Law as Code consultation stresses that interpretive, discretionary and evaluative elements should remain visible rather than silently become deterministic code.

This is a crucial design principle: explicitly mark a human-decision node instead of pretending the difficult judgment has been solved.

An appeal is part of the service

A person can be rejected because of a data error, a misinterpreted rule or genuinely unmet criteria. These scenarios require different responses.

A digital service should provide appropriate information about the reason and how to correct or challenge the decision under applicable procedures. A technically consistent denial is not automatically a fair one.

The OECD’s Rules as Code principles include transparency, traceability, accountability and appealability, all relevant to public trust.

What does “binding” mean?

A legally binding provision has effects under an applicable legal framework. A company policy, recommendation, software test and statutory duty do not have identical authority.

A line of code may faithfully implement a contract term for one client but not be enforceable against everyone else. A public agency must act within its actual legal powers.

A useful technical specification should record which legal text or policy authorises the operation, rather than describe all computer outputs as binding decisions.

Effective dates change the result

A statute may be amended, come into force later or include transitional provisions for pending applications. A valid rule in one period may not govern another.

A decision engine must identify which version applied on the relevant event or application date. Running old cases under today’s rules without explanation can distort historical records.

Versioning is not administrative decoration. It determines which rules software is supposed to execute.

The source hierarchy problem

A policy manual may describe a statute, while a regulation or judicial interpretation provides further relevant conditions. The software cannot safely assume that the first retrieved webpage is the highest authority.

The intended framework should identify authoritative sources and applicable relationships among laws, regulations, guidance and contracts.

Where the legal hierarchy or interpretation is contested, a professional review may be required. A code repository cannot resolve legal authority merely through alphabetical order.

A common definition does not mean a common law

Different countries may use the same word “resident” while applying different tax, immigration or public-service criteria.

A shared international vocabulary can help exchange information, but it must preserve distinct jurisdictions and rules. One globally standard label should not erase lawful differences.

The system should separate concept identity from the conditions controlling particular legal decisions.

Why New Zealand’s Better Rules approach matters

The New Zealand Better Rules programme describes bringing policy analysts, lawyers, legislative drafters, designers and software engineers together to create models and rules statements.

This matters because software built only after a law is finished may uncover ambiguity too late. Collaborative drafting can expose gaps while decisions are being made.

It is a methodology for improving translation of rules, not proof that no human interpretation will ever be necessary.

What is isomorphism in this context?

Rules-as-code discussions sometimes use isomorphism to describe close alignment between the human-readable and machine-consumable representations.

The aim is to avoid a hidden code rule that diverges from the authorised text. But full one-to-one equivalence can be difficult or impossible for discretionary legal concepts.

A robust project should specify which parts are mechanically equivalent, which parts need interpretation and how discrepancies are resolved.

Why formal tests matter

A rules engine can be tested against examples where the outcome is known or authoritatively determined. Tests should include ordinary and difficult cases, not only a few successful paths.

For a minimum age, include the boundary date. For a residence condition, examine temporary absences. For an exception, test both valid and invalid authorisation.

A system that passes a happy-path example may still systematically misapply the rule to a vulnerable group.

What does an audit trail preserve?

An audit trail can record the rule version, inputs, evidence sources, decision path, date, software version and responsible review.

This can make errors easier to investigate and decisions more explainable. But an audit trail must also protect personal information and comply with relevant legal restrictions.

A detailed log of a wrongful decision does not make it right. It makes correction and accountability more feasible.

Machine-readable doesn’t mean understandable

A document can be in XML or JSON yet remain incomprehensible to people without an adequate schema, definitions and documentation.

A code-like representation can also be opaque if it embeds complex logic, undocumented dependencies or proprietary functions.

The goal is not merely for a machine to process the text. The relevant people need to understand the rule, its scope and any decision based on it.

Why human-readable explanations remain essential

Someone affected by a decision needs to know what criterion was applied and what they can do if the record is wrong.

A response such as “Rule 408 failed” is inadequate without an explanation of the actual condition and appropriate review process. The explanation should preserve important qualifications rather than oversimplify.

A shared rule model should support both precise execution and clear public communication.

Could AI generate executable rules?

AI systems can assist by proposing decision trees, identifying conditions or translating a textual rule into candidate logic.

They can also invent omitted conditions, misread negation or confuse permission with obligation. That makes independent validation particularly important.

A generated rule should be treated as a draft unless it has been checked and authorised by the competent people and procedures.

Why a model should not declare itself the law

A language model may confidently state “all residents qualify”, while the actual statute contains additional limits and exceptions.

The authoritative source controls the legal question; the model’s phrasing is not a substitute. If the model has tools to process applications, its permissions must match the real institutional process.

A successful execution of software does not mean the rule was legitimate or the input was accurate.

Risks of centralising coded rules

A shared official implementation could improve consistency and reduce repeated translation errors. It could also amplify an incorrect classification across many services if governance and testing fail.

Centralisation introduces questions about access, security, version control, public oversight and the ability to correct harmful errors quickly.

The right approach is to design for both reuse and accountability rather than assume a single codebase is automatically safer.

Open standards and interoperability

Common data formats, APIs and controlled vocabularies can make rules easier to exchange across systems. But interoperability needs more than identical field names.

Two organisations can share a field called “eligible” while applying different definitions. A valid integration must preserve the domain, governing rule and outcome type.

A versioned ontology or data dictionary can help prevent silent mismatches, while legal review ensures the formal definitions reflect the intended authority.

Can a rule be fully future-proofed?

No rule engine can guarantee that laws, social conditions and technologies will never change. Future-proofing means making change manageable rather than impossible.

Preserve old versions, test migrations, identify effective dates and provide a process for amending both human and machine-readable forms.

The most dangerous “immutable” rule may be one that cannot be corrected after its assumptions become obsolete.

A fictional benefits programme

Imagine a programme available to residents aged 18 or older who meet a household-income threshold. An application can also receive an exception review under a specified procedure.

A good model distinguishes eligibility to apply, required documents, preliminary automated checks, final approval and payment. The system should not present preliminary eligibility as a guaranteed award.

It should record why a case was referred for human judgment and which rule version applied.

A fictional permit renewal

A permit may be renewable if an application is submitted before expiry, required fees are paid and any safety inspection is complete.

A software implementation that checks only payment would incorrectly treat a necessary condition as sufficient. Another that rejects submissions made exactly at the deadline may mishandle a boundary.

Test cases should mirror the exact legal wording and relevant time conventions.

How to begin a pilot safely

Choose a narrowly defined, low-risk process where authoritative experts can supply clear examples and review outcomes.

Build the concept model, decision table, source mapping and change log before writing production code. Test difficult boundary cases and provide human fallback.

Measure disagreements between the coded model and competent human interpretation. Report those discrepancies honestly rather than hide them behind a high average accuracy score.

Seven questions for executable rules

  • Authority: Which legal or policy text controls the decision?
  • Scope: Which people, places and situations are covered?
  • Logic: What conditions, thresholds and exceptions apply?
  • Evidence: Which input facts are reliable and how are they verified?
  • Discretion: What must remain with an authorised human decision-maker?
  • Version: Which law and software release apply at the relevant date?
  • Appeal: How can someone understand, correct or challenge the result?

A seven-day Rules as Code exercise

  • Day 1: Select a fictional rule with one threshold and one exception.
  • Day 2: Write definitions of all consequential terms.
  • Day 3: Draw a decision table or simple flowchart.
  • Day 4: Test boundary cases and missing data.
  • Day 5: Add a human-review branch for a discretionary question.
  • Day 6: Record authoritative source, version and effective date.
  • Day 7: Explain a fictional rejection in clear language with a correction route.

Common questions

Can a law be converted into software?

Some rules can be represented as machine-executable logic. Not all legal judgments or interpretive issues can be safely reduced to deterministic tests.

Is machine-readable the same as machine-executable?

No. Structured text may be processable without containing executable conditions or calculations.

Does code become legally binding because a government publishes it?

Not automatically. Legal status depends on the governing framework. The OECD’s 2026 consultation expressly preserves authoritative legal text in its proposed approach.

Can AI decide which legal interpretation is correct?

AI may assist, but valid legal authority and professional review remain necessary where interpretation or discretion matters.

Can a correctly programmed system still make an unlawful decision?

Yes. It may faithfully execute an incorrect interpretation, use erroneous inputs or operate beyond its authorised scope.

What makes a Rules as Code project trustworthy?

Transparent source mapping, tested logic, version control, appropriate security, human oversight and meaningful correction or appeal processes.

Conclusion: executable vocabulary must remain answerable to law and people

At one form’s scale, code can apply a clearly defined condition. At government scale, shared logic can reduce duplicated work. At international scale, standard formats may help systems cooperate. But moving words into software is not merely a technical translation: it changes how quickly and consistently decisions affect people.

A responsible Rules as Code architecture keeps the binding source, encoded interpretation, evidence, discretion, effective date and appeal route visible. The goal is not software ruling over society. It is technology that implements legitimate rules more transparently while remaining subject to human accountability.

Continue the Vocabulary at Every Zoom Level

Explore the companion vocabulary guides to see how precise meanings, institutional rules, evidence, safety, measurement and semantic engineering influence choices at every scale.

Sources and further reading