DRE · REFERENCE ARCHITECTURE

Deterministic Billing Compliance Engine

TypeScript rule engine for automated billing validation, adjustment and governed AI escalation.

Illustrative system view · deterministic findings remain reviewableScroll down to explore all six engine stages in order.
1

Raw billing payload

Structured entry plus original narrative enters unchanged.

matter: TX-77321
role: senior_associate
rate: 650
hours: 4.5
Narrative
Research and printing for client strategy.
INPUT PRESERVED
2

Compliance engine

Pure, versioned rules evaluate identical inputs identically.

Normalizecanonical schema + units
Evaluateclient and matter policies
Explainrule IDs + evidence
engine: dre-rules@1.0
mode: deterministic
3

Forbidden keyword scan

Administrative overhead signals are mapped to explicit policy.

Match: “printing”OCG-04 · non-billable task
Actionisolate or remove prohibited component
VIOLATION FOUND
Machine-readable finding includes location, rule and proposed remediation.
4

Vague language detection

Narrative quality rules check whether work is specific enough to review.

Match: “research”OCG-11 · insufficient context
Requiredtopic, purpose and work product
CLARIFICATION NEEDED
Original wording is retained beside any proposed rewrite.
5

Financial recalculation

Arithmetic is separate, explicit and reproducible.

Original4.5 × $650
Original amount$2,925
Proposed time4.0 h
Proposed amount$2,600
Identified delta$325
6

Processed output

A review-ready package preserves facts, findings and provenance.

Normalized entry
4.0 hours at $650/hr
Disposition
Awaiting authorized approval
Audit evidence
input hash, rule version, findings, proposed changes
REVIEW READY
AI consensus required?
→
No · approve / proceed
Yes · multi-agent review

Rule summary

  • Versioned policies
  • Explainable matches

Action types

  • Pass or flag
  • Split or clarify

Key calculation

  • $2,925 original
  • $325 identified

Output benefits

  • Review-ready
  • Machine-readable

Audit trail

  • Input + output hash
  • Rules + evidence