The Closed Loop

[ 1. DETECT ] > [ 2. PROPOSE ] > [ 3. PROVE ] > [ 4. GATE ] process mining AI on rails — HxReplay cohort HxBranch change PR: bottlenecks, a closed set of simulation must human review, SOD, conformance five reversible improve the goal approval = the drift, dominant config mutations, with NO guardrail existing audited variants each re-gated regression merge — never auto

Proposals that fail their gate or a guardrail are discarded before any human sees them — recorded for provenance, never surfaced. Nothing reaches a person unless it survived the validation gate and (for rule changes) a replay proof on real history.

What It May Propose (and nothing else)

MutationExampleEvidence
Adjust a rule threshold"Raise the auto-approve limit to $750"Replay-proven — cohort counterfactual with cycle-time, auto-ratio and cost deltas
Add an auto-approve rule"Auto-approve claims under $200 with passed KYC"Replay-proven
Adjust an SLA duration"Move the resolution goal from 4h to 8h"Descriptive — observed duration percentiles
Swap a routing strategy"Route approvals to the least-loaded agent"Descriptive — step wait statistics
Reorder / parallelize steps"Run document check and credit check in parallel"Descriptive — a labelled sum-vs-max estimate; the structural gate allows moving steps only, never adding, removing or editing them
Evidence honesty. Every insight is badged replay-proven (a real counterfactual on recorded history) or descriptive (mining statistics). The platform never presents an estimate as a proof — the same honesty rule HxReplay itself follows.

Guardrails Are Vetoes

The Only Way a Change Ships

Open change PR re-validates the proposal against the current config (a stale insight is refused), then stages it through HxBranch: a new rule is created disabled behind a branch whose merge enables it; every other change becomes a branch on the live artifact carrying the patched config. The replay evidence, the AI's rationale, and a policy alternative (the non-automation option) land in the PR description. A reviewer — never the proposer, never the platform — approves, and approval is the same audited merge every other config change uses. There is no auto-merge tier: it was deliberately struck from the design.

Using It in Studio

  1. Open Studio > Process Mining, pick a case type, and switch to the insights tab.

  2. Click Scan for optimizations. The loop runs: mining signals > gated proposals > replay/descriptive evidence. Only survivors appear as cards.

  3. Read a card: the mutation, the rationale, the evidence badge, and the signal that triggered it. Dismiss what you disagree with.

  4. Click Open change PR on an insight you like — review and approve it in HxBranch like any other change.

  5. (Optional) Configure per-case-type guardrails and enable the hourly scheduled scan via the config API — scheduled scans produce insights only; they can never stage or apply anything. Enabling it is the standing authorization for unattended scanning: only an admin can flip it, and the tenant cohort cap still applies.

API Reference

# Run the loop for one case type (admin; 429 inside the frequency window)
curl -s -X POST http://localhost:8200/api/v1/hxevolve/scan \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"case_type_id":"...","days":30}'

# List surfaced insights (add include_discarded=true for the provenance trail)
curl -s "http://localhost:8200/api/v1/hxevolve/insights?case_type_id=..." \
  -H "Authorization: Bearer $TOKEN"

# Open the human-approved change PR for an insight
curl -s -X POST http://localhost:8200/api/v1/hxevolve/insights/{id}/stage \
  -H "Authorization: Bearer $TOKEN"

# Per-case-type guardrails + scheduled scanning
curl -s -X PUT http://localhost:8200/api/v1/hxevolve/config/{case_type_id} \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"min_improvement":0.15,"max_auto_ratio_rise":0.1,"min_coverage":0.8,
       "min_determinate":100,"scan_frequency_hours":24,"scan_enabled":true}'
No autonomous write path — ever. HxEvolve writes only its own insights table. Production configuration changes exclusively through a human-approved HxBranch merge; the scheduled scan cannot stage or apply anything.