Every operations leader asks the same question before changing a policy: "if I change this, what happens?" HxReplay answers it from data: take a real historical case — or thousands of them — fork it at the point a candidate rule change would bite, and replay the recorded history forward to show what would have happened. Cycle-time delta, auto-vs-manual ratio, manual work removed, and a cost figure — each with an explainable per-case trace.
The baseline is recorded reality — it is never simulated. Only the candidate configuration's changed rules are re-evaluated, and only from the first point they alter behaviour. Everything upstream is copied verbatim from the record.
You cannot re-run a human. HxReplay classifies every node instead of pretending:
| Node class | Treatment |
|---|---|
| Deterministic | WHEN / routing rules, threshold auto-approvals. Recomputed under the candidate config with the production rules engine, from reconstructed decision-time inputs. |
| Exogenous | Human approvals, manual edits, external responses. Held fixed from the record. Timestamps are never shifted — a skipped stage shows as elided wall-clock time, not a fabricated shorter timeline. |
| Elided | Work the change removes, e.g. a review a new auto-approve skips. Struck from the counterfactual trace; the removed manual time is reported. |
| Indeterminate | A path that never happened becomes reachable; an input that cannot be proven. Excluded from hard metrics, with the reason. Nothing is ever silently guessed. |
A replay is only as good as its inputs. HxReplay rebuilds each variable's value at the instant of each decision by replaying the data-lineage record, and reports a per-field coverage status with every result:
| Coverage | Meaning |
|---|---|
lineage | Reconstructed from the write history — the value the decision actually saw (a mid-case edit is honoured node by node). |
constant_redacted | pii/secret field. Production rules read these as *** through the redacting façade, so replay feeds the same constant — identical behaviour, and no PII ever enters the engine. |
absent | The field verifiably did not exist yet at that instant (deterministic). |
unknown | History cannot be proven (pre-capture edits, no lineage) — the case is excluded, never guessed. |
When a change makes a never-recorded path reachable, there is no human outcome to borrow. With Estimate excluded cases enabled, HxReplay walks a substitution ladder — and labels everything it produces:
Recorded policy alternative — every AI decision already records what policy would have done; if one matches the node, it is substituted.
Authored stage default — an explicit default_outcome on the stage in the case-type definition (authored, never inferred).
Monte-Carlo — sampled from the historical remaining-cycle and outcome distribution of other same-type cases through that stage (tenant-scoped, seeded per case so runs are reproducible).
Still nothing → the case stays excluded.
Configure a tenant rate card (default hourly rate for manual work) and every replay result gains a cost block: baseline cost, counterfactual cost, and the headline — "this policy would have saved $X." The basis is stated on the result: manual recorded activity time × rate; automated work costs 0; determinate cases only. A per-case automatic time rollup (total / manual / auto, per stage and activity) comes free from already-recorded event durations — zero new capture.
Wall-clock durations measure elapsed time; billable effort is captured explicitly. A worker starts and stops a timer on the case they're handling (one running timer per person per case), or logs a timesheet entry after the fact — with an optional role so the right rate applies, and a billable flag for non-chargeable work.
Open Studio > HxReplay. On Single Case, paste a case id, edit the candidate rule JSON (or reference an HxBranch rule branch), and click Replay. Review the determinacy pill, the side-by-side metrics, the trace, and the input-coverage panel.
On Cohort, pick the case-type, a date window and a case cap, then Run cohort replay. Refresh to see coverage, divergence rate, cycle-time stats, elided manual work — and the cost card if a rate card is configured.
Reviewing a rule change in HxBranch? Click Simulate on history on the branch review screen — the branch arrives prefilled on the Cohort tab, so the merge decision ships with replay evidence attached.
Set the rate card on the Runs tab (admin) to unlock cost deltas.
# Single-case replay (inline; returns the side-by-side result + trace) curl -s -X POST http://localhost:8200/api/v1/hxreplay/runs \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"kind":"single","case_id":"...","estimate":false, "candidate":{"rules":[{"id":"auto-approve","rule_type":"when", "definition_json":{"conditions":[{"field_path":"claim.amount","operator":"lt","value":500}], "actions":[{"action_type":"auto_approve"}]}}]}}' # Cohort replay (background; admin capability replay.run) curl -s -X POST http://localhost:8200/api/v1/hxreplay/runs \ -H "Authorization: Bearer $TOKEN" \ -d '{"kind":"cohort","branch_id":"...","estimate":true, "cohort_filter":{"case_type_id":"...","from":"2026-04-01","max_cases":500}}' # Poll a run / fetch per-case results curl -s http://localhost:8200/api/v1/hxreplay/runs/{run_id} -H "Authorization: Bearer $TOKEN" curl -s http://localhost:8200/api/v1/hxreplay/runs/{run_id}/results/{case_id} \ -H "Authorization: Bearer $TOKEN" # Rate card (admin; powers the cost delta) + per-case time rollup curl -s -X PUT http://localhost:8200/api/v1/costing/rate-card \ -H "Authorization: Bearer $TOKEN" -d '{"hourly_rate":85,"currency":"USD"}' curl -s http://localhost:8200/api/v1/costing/cases/{case_id}/time \ -H "Authorization: Bearer $TOKEN"
replay.cohorts.run; rate cards behind costing.rates.access.