Governed rules, before any generated code.
RuleWeaver extracts business rules from metadata and documents, keeps them in a versioned registry, and only then generates dbt or PySpark. This page runs the evaluation half of that system on a synthetic claims pack. No API, no model call, no member identifier.
- Domain
- Healthcare payer claims
- Policy
- claims-adjudication@1.4.2
- Runtime
- Browser, deterministic
01 — Problem & Constraints
A candidate rule is not an adjudication.
Payer rules live in policy documents and in the shape of the warehouse: member, claim, provider, network, billed amount. A model can pull a candidate out of that material, attach an evidence excerpt, and score its confidence. That candidate is still a draft. It does not get to move a claim, and it does not get to be pasted into a transformation.
The constraint is the registry. A rule has a lifecycle — draft, review, approved, published, deprecated — a closed set of operators, and a version. Simulation runs before publication. Governance can hold a graph patch or an approval without a redeploy. Generated ELT references the rule id. The threshold stays in the registry, where it can change without a hunt through SQL.
Lifecycle
Auto-apply requires published. Review and draft can be matched for inspection. They cannot approve a claim.
Operators
Twelve operators are valid. eq, lte, in, and the rest of the allow-list. Anything else fails validation.
Writes
Escalate returns an approval with can_proceed: false. Deny and schema failure withhold the artifact. The ledger still records the row.
02 — System Architecture
Seven stages, three outcomes.
Upstream, document intelligence and the ontology graph propose structure: concepts, aliases, evidence, a confidence. The path below is what happens once a rule is in the registry and a claim arrives. Context loads the policy. Alignment binds fields onto the healthcare ontology. Match and validate are deterministic. Govern and simulate decide whether an artifact is even eligible. The ledger is written for every outcome.
03 — Interactive Sandbox
Run the registry.
Four claims, the same policy pack. Move the billed amount, the auto-approve ceiling, or the confidence floor and run again. Executive view states the outcome and who is accountable. Architect view shows the predicate trace, the latency of each stage, and the full ledger. Narration reads that same run aloud, using the browser voice.
04 — Architectural Trade-Offs & Metrics
What the split costs, and what it buys.
Rules stay out of the model
A mapping records which rules applied. The dbt model names them. It does not inline the ceiling. Changing policy is a new version and a new simulation. The cost is a registry join at generation time, and a refusal to hot-edit generated SQL.
The hot path is not a model call
Extraction can use a model. Evaluation of a published rule does not. Operators compare field and value, which is why this page can promise the same checksum for the same input. Milliseconds here. The model stays upstream, where being slow does not adjudicate a claim.
The gap is a decision
Amounts between the auto-approve ceiling and the hard stop match nothing on purpose. Validation records the gap. Governance opens a review and sets can_proceed to false. Filling that band inside a prompt would turn an exception into a payment.
Low confidence has no direction
A matched rule under the floor escalates whether its action would have approved or denied. Weak extractions do not get to move money either way. The floor is a control on this page so that behavior is visible.
- Operators
- 12
- Lifecycle states
- 5
- Evaluation stages
- 7
- Network calls
- 0
Figures describe the public model on this page: a synthetic policy pack and a claims payload with no member, provider, or host identity. They are not a production benchmark. PostgreSQL holds the registry, evidence, approvals, and audit log. The graph holds concepts and relationships. Both sit behind the same gate.