Pricing and Offers
Apply consistent pricing, discount and promotion rules across channels.
Infrastructure for executable business policies
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
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
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
RuleDSL fits policy domains where explicit inputs should produce a reviewable decision through approved rule logic.
Apply consistent pricing, discount and promotion rules across channels.
Express bonus, benefit and participation policies with explicit conditions in versioned artifacts.
Turn approval criteria and compliance gates into testable decision logic.
Evaluate transaction risk, operational limits and escalation conditions. Stateful enforcement remains the host application's responsibility.
Represent eligibility, underwriting and policy conditions as reviewable rules.
Let agents invoke approved decision logic without allowing them to rewrite it.
A policy in RuleDSL
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.
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; }
{
"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
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.
Re-run a decision with the exact rule artifact, canonical input and evaluation conditions.
Preserve rule-source, bytecode and decision hashes through documented workflows that support technical review and recomputation.
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
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 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.
# 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
Express a business policy in readable RuleDSL source.
Compile the policy into a versioned bytecode artifact.
Check integrity and engine compatibility before deployment.
Provide structured data and receive a deterministic decision.
Technical architecture
RuleDSL is integrated into a host application. The host owns deployment, input preparation, persistence, lifecycle and any stateful enforcement around the decision call.
Runs as a native library without a daemon, database, network service or policy sidecar.
Integrate through the C API or use the shipped Python and C# bindings, following the documented version pairings.
Load newly verified policies without recompiling the host application. Distribution, reload and transitions remain host responsibilities.
Verify bytecode integrity and engine compatibility before evaluation.
Branch on documented numeric error codes and use diagnostic details on supported detection paths.
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
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
Start with the binding that fits your host. Keep the engine library and SDK version pairing explicit during evaluation and deployment.
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)
Use the stable public C ABI, initialized structs and explicit ownership rules.
Open the minimal C example →Use the shipped .NET 6+ P/Invoke wrapper with the separate native engine library.
Read the C# binding guide →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
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
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.