Rules as Code: synthetic procurement demonstration

Proof of concept for comparative legislation review. Not authoritative. Manual legal, language and accessibility review has been deferred and not performed; do not use this for compliance decisions.

Synthetic example. Not actual legislation.

A fictional decision table used to test the static rule-presentation renderer. It is not law in any jurisdiction.

This is a fictional procurement policy with fictional citations. It is not law in any jurisdiction, has not received legal review and is not a decision service.

Machine-readable sources

Short excerpts from the committed synthetic sources. No real legislation is encoded.

Axiom RuleSpec — machine-readable excerpt

Inputs and derived judgments are declared in structured YAML. The full source compiles to an Axiom artifact; this static page does not execute it.

- name: procurement_obligation
    kind: derived
    entity: Procurement
    dtype: Judgment
    sources:
      - citation: "Synthetic procurement policy s.1 (fictional)"
        url: https://example.org/synthetic-procurement-policy
    versions:
      - effective_from: '2026-01-01'
        formula: facts_complete and covered_body and contract_scope_met and not exception_applies
  - name: open_source_consideration_required
    kind: derived
    entity: Procurement

Axiom RuleSpec source

Legalese L4 — machine-readable excerpt

CONSIDER/WHEN steps, MAYBE values and a deontic MUST duty are expressed directly. The full synthetic page shows the readable ladder and dependency graph.

`procurement outcome` covered_body contract_scope_met exception_applies contract_value MEANS
    CONSIDER covered_body
    WHEN NOTHING THEN Indeterminate
    WHEN JUST FALSE THEN NotApplicable
    WHEN JUST TRUE THEN
        CONSIDER contract_scope_met
        WHEN NOTHING THEN Indeterminate
        WHEN JUST FALSE THEN OutsideScope
        WHEN JUST TRUE THEN
            CONSIDER exception_applies
            WHEN NOTHING THEN Indeterminate
            WHEN JUST TRUE THEN ExceptionApplies
            WHEN JUST FALSE THEN
                IF contract_value >= 100000
                THEN OpenSourceConsiderationRequired
                ELSE RequirementWithoutOpenSource

DECLARE Party IS ONE OF ContractingAuthority

Legalese L4 source

Selected rule details

Selected rule details — N9

Built from: N1 · N2 · N3 · N4 · N5 · N6 · N7 · N8

Used by
Nothing — a final result
Entity
Procurement
Value type
Text
Verification status
Synthetic fixture — not reviewed
Source
SP-3 — Synthetic procurement policy s.3 (fictional)
Effective period
2026-01-01 – —

Jump to smoke-test results

Recorded engine results

Seven synthetic cases are recorded. The table compares the pinned Axiom and Legalese outputs; missing facts are not treated as false.

Jump to smoke-test results

Legalese-style visualization

The ladder and graph below are rendered from a curated presentation model, not automatically generated from the L4 file. They show the same synthetic decision structure, not an execution of real law.

Synthetic demonstration only. No legal effect. The citations are fictional.

Dependency graph

The diagram is a visual summary. The list below gives every node, dependency and citation.

Synthetic procurement policy — Dependency graph The diagram is a visual summary. The list below gives every node, dependency and citation. N1Public body is coveredN2Contract is within scopeN3An exception appliesN4Contract value (USD)N5Required facts arecompleteN6Open-sourceconsideration thresholdN7Procurement requirementappliesN8Open-sourceconsideration requiredN9Determination status
The diagram is a visual summary. The list below gives every node, dependency and citation.

Nodes and dependencies

Evaluation order

  1. Are the required facts complete?

    If true
    Continue to coverage
    If false
    Indeterminate

    Citation: Synthetic procurement policy s.3 (fictional) SP-3. Missing facts are not treated as false.

  2. Is the public body covered?

    If true
    Continue to scope
    If false
    Not applicable

    Citation: Synthetic procurement policy s.1 (fictional) SP-1. Coverage is a condition, not a legal conclusion.

  3. Is the contract within scope?

    If true
    Continue to exceptions
    If false
    Outside scope

    Citation: Synthetic procurement policy s.1 (fictional) SP-1. Scope is checked before the exception.

  4. Does an exception apply?

    If true
    Exception applies
    If false
    Continue to the threshold

    Citation: Synthetic procurement policy s.1 (fictional) SP-1. An exception removes the requirement; it does not create a new one.

  5. Is the contract value at least USD 100,000?

    If true
    Open-source consideration required
    If false
    Requirement without open-source threshold

    Citation: Synthetic procurement policy s.2 (fictional) SP-2. The boundary value itself meets the threshold.

Accessible text equivalent

Linear explanation

  1. Start with facts_complete. If it is false, stop at Indeterminate (SP-3).
  2. If the facts are complete, check covered_body. If it is false, the outcome is Not applicable (SP-1).
  3. If the body is covered, check contract_scope_met. If it is false, the outcome is Outside scope (SP-1).
  4. If the contract is in scope, check exception_applies. If it is true, the outcome is Exception applies (SP-1).
  5. If no exception applies, compare contract_value with USD 100,000. At or above the threshold, open-source consideration is required (SP-2); below it, the procurement requirement applies without the open-source threshold (SP-2).

Unknown and missing facts

Missing required facts are not treated as false. This synthetic model reports Indeterminate; the renderer does not infer a legal outcome.

Synthetic fixture. The presentation is static and is not an execution engine; no real instrument or legal effect is represented.

Source references

Unsupported or out of scope

  • Deontic modality: Obligation, permission and prohibition are not first-class in RuleSpec. L4 can express them with PARTY, MUST, MAY and SHANT.
  • Amendment and version history: Effective dates can be encoded, but a reviewed instrument-version and amendment graph is external metadata; this prototype does not model it.
  • Translation provenance: Neither engine records official, reviewed or machine-assisted translation status. The interface translations here are provisional.
  • Real legal text and citation verification: All sources are fictional. No real instrument, provision, date or legal effect is encoded.
  • Contradiction detection: Both engines applied the ladder order to contradictory facts; neither reported a contradiction.

Provenance

Review status
Synthetic demonstration — not law
Effective period
2026-01-01
Engine
Axiom RuleSpec (research fixture; not executed at render time)
Version
0.2.2
Artifact digest
Not executed for this demonstration
Tests
research/rules-visualization/results/axiom-cases.json

Limits

Synthetic fixture. The presentation is static and is not an execution engine; no real instrument or legal effect is represented.

Sources and test evidence

Recorded engine results

Actual outputs from the pinned synthetic trials. The missing-fact case is an Axiom error and an L4 Indeterminate result; the models are not equivalent.

Synthetic smoke-test cases and recorded engine outputs
CaseAxiom RuleSpecLegalese L4
All conditions metdetermination = open_source_consideration_required; judgments = holdsOpenSourceConsiderationRequired
Scope condition not metdetermination = outside_scope; judgments = not_holdsOutsideScope
Exception appliesdetermination = exception_applies; judgments = not_holdsExceptionApplies
Missing required inputerror: missing input covered_bodyIndeterminate
Boundary USD 100,000determination = open_source_consideration_required; judgments = holdsOpenSourceConsiderationRequired
Facts incompletedetermination = indeterminate; judgments = not_holdsIndeterminate
Contradictory scope and exceptiondetermination = outside_scope; judgments = not_holdsOutsideScope

Known semantic differences

Axiom treats a missing required input as an execution error; the L4 version models missing facts as Indeterminate. Axiom RuleSpec has no deontic modality; its judgment outputs are not duties. The synthetic example does not claim equivalence beyond the tested cases.

Back to visualizations