Infrastructure for executable business policies

Turn business policies
into deterministic decisions.

RuleDSL makes business rules executable, versioned and replayable with documented evidence.

Define policies once. Compile them into verified decision logic. Replay the same decision whenever evidence is required.

Developer Quickstart →

The problem

Business policies rarely live in one place.

They begin in documents and spreadsheets. Then they are translated into application code, workflow settings and manual procedures.

As policies change, each implementation can drift. The result is difficult to test, difficult to replay and difficult to review.

The solution

One policy. Executable decision logic.

RuleDSL expresses business policies in a readable rule language and compiles them into versioned bytecode.

Applications and AI agents can invoke the same verified rules. The engine returns deterministic decisions; documented evidence workflows preserve the artifacts and inputs needed to reproduce them under the documented conditions.

Use cases

Where RuleDSL fits

RuleDSL fits policy domains where explicit inputs should produce a reviewable decision through approved rule logic.

Pricing and Offers

Apply consistent pricing, discount and promotion rules across channels.

Compensation and Eligibility

Express bonus, benefit and participation policies with explicit conditions in versioned artifacts.

Compliance and Approvals

Turn approval criteria and compliance gates into testable decision logic.

Risk and Limits

Evaluate transaction risk, operational limits and escalation conditions. Stateful enforcement remains the host application's responsibility.

Insurance Decisions

Represent eligibility, underwriting and policy conditions as reviewable rules.

AI Agent Guardrails

Let agents invoke approved decision logic without allowing them to rewrite it.

A policy in RuleDSL

Readable conditions. Explicit outcomes.

This compensation example uses the shipped v0.9 language surface: the first matching rule wins, assignments become output fields, and the action is one of the documented decision actions.

annual_bonus.rule
rule annual_bonus_eligibility {
  when employment_status == "active"
       and service_months >= 6
       and performance_rating >= 3;
  then reason = "policy_requirements_met",
       allow;
}

rule annual_bonus_ineligible {
  when true;
  then reason = "policy_requirements_not_met",
       decline;
}
Structured decision
{
  "matched": true,
  "action": "ALLOW",
  "rule_name":
    "annual_bonus_eligibility",
  "outputs": {
    "reason":
      "policy_requirements_met"
  }
}

One language, many policy domains. The same language can represent pricing, compliance, risk and approval policies.

Why deterministic

Correct once is not enough.

In regulated and high-trust systems, a decision may need to be explained months or years later. RuleDSL is designed so that the same engine and ABI pairing, verified rule artifact, canonical input and equivalent evaluation options can reproduce the same decision output on supported platforms.

Replayable

Re-run a decision with the exact rule artifact, canonical input and evaluation conditions.

Evidence-backed

Preserve rule-source, bytecode and decision hashes through documented workflows that support technical review and recomputation.

Versioned

Record the rule artifact and engine pairing that produced a decision.

Scope matters. Determinism depends on the documented engine/ABI, bytecode, canonical input, equivalent evaluation options and supported-platform conditions. Published evidence covers the committed DET corpus; it is not a formal proof over every possible rule and input. Inspect the determinism evidence.

Model Context Protocol

AI invokes. The engine decides.

RuleDSL exposes an MCP interface for AI assistants and agents. Clients can discover approved rules, provide structured case data and request an evaluation. They cannot rewrite production rules or replace deterministic execution with model judgment.

list_rules evaluate_case engine_info

Closed, manifest-backed surface

list_rules returns only manifest-approved rule identifiers and schemas. evaluate_case requires one of those identifiers, structured fields and an explicit now_utc_ms. The server exposes no write, compile, update, publish or arbitrary policy-selection tool.

Conceptual client flow
# 1. Discover approved identifiers and schemas
list_rules()

# 2. Invoke an identifier returned by list_rules
evaluate_case(
  rule_id="<approved_rule_id>",
  fields={"case_field": "explicit_value"},
  now_utc_ms=1700000000000
)

# 3. Inspect the decision record and any
#    rule-assigned output fields, such as reason

Early access. MCP support is currently experimental early access and is not yet part of the frozen compatibility contract. The AI client remains responsible for rule selection and field extraction; mistakes there are outside the engine's determinism guarantee. Read the MCP quickstart and MCP design contract.

Workflow

Write → Compile → Verify → Evaluate

01

Write

Express a business policy in readable RuleDSL source.

02

Compile

Compile the policy into a versioned bytecode artifact.

03

Verify

Check integrity and engine compatibility before deployment.

04

Evaluate

Provide structured data and receive a deterministic decision.

Technical architecture

Built for embedded decision systems

RuleDSL is integrated into a host application. The host owns deployment, input preparation, persistence, lifecycle and any stateful enforcement around the decision call.

In-process engine

Runs as a native library without a daemon, database, network service or policy sidecar.

Stable public C ABI

Integrate through the C API or use the shipped Python and C# bindings, following the documented version pairings.

Versioned bytecode

Load newly verified policies without recompiling the host application. Distribution, reload and transitions remain host responsibilities.

Integrity verification

Verify bytecode integrity and engine compatibility before evaluation.

Structured diagnostics

Branch on documented numeric error codes and use diagnostic details on supported detection paths.

Cross-platform evidence

Inspect and recompute published Windows x86_64 and Linux x86_64 determinism evidence for the committed corpus.

Current documented pairing: engine/binary bundle v1.0.2; language implementation v0.9 with v1.0 as the target specification; Python package 1.2.0; MCP surface 0.2.0 experimental. The raw C API requires one compiler per thread or external synchronization, separate decision buffers and documented lifetime ordering. The Python and C# wrappers serialize calls per instance. Malformed bytecode passed directly to evaluation and invalid pointer, ownership or lifetime use can be undefined behavior; follow the verification and undefined-behavior contract.

Evidence

Claims backed by inspectable artifacts

RuleDSL publishes determinism reports, raw outputs, hashes, compatibility information and conformance documentation.

The goal is not to ask users to trust a performance claim. The goal is to make the published result independently inspectable and recomputable.

Published evidence is recomputable for the committed scenarios and artifacts. It is evidence of observed results, not a formal proof over all possible inputs and rules. Broader multi-host and independent third-party reproduction remain open.

Developers

Get started with RuleDSL

Start with the binding that fits your host. Keep the engine library and SDK version pairing explicit during evaluation and deployment.

1. Python

Install the pure-Python binding and Workbench, then point the binding at the native engine from a RuleDSL release bundle.

from ruledsl import RuleDSL

with RuleDSL("path/to/ruledsl_capi.dll") as engine:
    artifact = engine.compile("""
        rule bonus_policy {
          when service_months >= 6;
          then reason = "minimum_service_met", allow;
        }
    """)
    compatibility = engine.check_compatibility(artifact)
    decision = engine.evaluate(artifact, {"service_months": 12})
    if compatibility["compatible"] and decision.matched:
        print(decision.action, decision.outputs)
Releases Python binding Workbench instructions

4. MCP

Use the experimental Python 3.10+ MCP extra with an explicit engine path and manifest-backed rule library.

Read the MCP quickstart →

Separate delivery model. The Python package provides the binding and Workbench. The native engine library is delivered separately in the RuleDSL release bundle.

System boundaries

Clear system boundaries

RuleDSL is

  • An embedded deterministic rule engine
  • A compiler and verified bytecode workflow
  • A C SDK with Python and C# bindings
  • An optional MCP decision interface

RuleDSL is not

  • A SaaS platform
  • A database or workflow management system
  • An autonomous policy-writing agent
  • A managed 24/7 decision service
  • An open-source engine

This public repository contains the SDK integration surface, bindings, examples, documentation and evidence. The native engine is separately delivered as a licensed binary under the applicable evaluation or commercial terms.

Evaluate RuleDSL

Make policy decisions reproducible.

Explore the demos, review the evidence or evaluate RuleDSL in your own environment.

Have a policy domain that may fit RuleDSL? Start a technical or domain conversation.