Skip to content
SA.Shantanu Acharya
MenuClose
Architecture

RuleWeaver — Rules Before Generated Code

A versioned rule registry, an ontology, and a deterministic evaluation path so extracted business rules cannot become ELT until they are simulated and approved.

Role
Enterprise & AI Architect
Domain
Healthcare payer claims
Published
Evaluation stages
7
Allow-listed operators
12
Lifecycle states
5

Context

Claims policy does not live in the warehouse as executable logic. It lives in documents, in column meaning, and in the people who review exceptions. Extraction can turn that material into candidate rules with evidence and a confidence score. The failure mode is treating the candidate as authority and inlining it into a dbt model or a PySpark job.

The operating requirement is the opposite. A rule is a versioned record. It moves through draft, review, approved, published, and deprecated. Only a published rule may auto-apply. Generated code references the rule. It does not absorb it.

The full brief, including the architecture figure and the trade-offs, is the RuleWeaver showcase. The sandbox below is the same evaluator.

Architectural Approach

The registry stores conditions and actions, not prose. Operators are a closed set: equality, ordering, membership, and a few string matches. An operator outside that set fails validation, and a draft that proposes a paid-amount write is blocked rather than simulated into an artifact.

Payload fields are aliases onto the healthcare ontology. Member status, network status, billed amount, and claim type resolve to Member, Provider, and Claim. The graph is where those concepts live. PostgreSQL is where the rule, its evidence, its tests, and its approvals live.

Simulation is the gate in front of generation. An allow makes an artifact eligible. An escalate opens a review and sets the approval so it cannot proceed. A deny, including a schema failure, withholds the write and still appends the ledger.

Governance & Guardrails

Low confidence does not get a direction. A matched rule under the floor escalates whether it would have approved or denied. Amounts between the auto-approve ceiling and the hard stop are a coverage gap on purpose: no published action, a human reviewer, no invented rule.

Unpublished rules can be shown in the trace. They cannot auto-approve. That split is the point of the lifecycle.

Try the registry

The pack is synthetic. Ceilings, excerpts, and rule ids on this page are a public model of the mechanics, not a production policy and not a client benchmark.

Simulation · claims-adjudication@1.4.2

Same inputs, same ledger. Narration reads each stage in the browser voice.

View mode
Scenario
$240
$500
0.80
Member status
Network

Block unpublished rules

Review and draft rules stay out of the match. Turning this off lets them appear in the trace. It does not let them auto-approve.

Hard deny ceiling $10,000 · claim type professional · not a slider

Idle

Choose a claim and run the registry. The decision is computed here, not requested.

  1. 01 — Context

    wait

  2. 02 — Align

    wait

  3. 03 — Match

    wait

  4. 04 — Validate

    wait

  5. 05 — Govern

    wait

  6. 06 — Simulate

    wait

  7. 07 — Ledger

    wait

Decision ledger

{
  "decision": null
}