Pattern guide

The cheapest moment to pre-fill a regulatory form is the second the resolution decision lands.

Most teams treat regulatory data entry as a back-office task: a clerk opens a ticket, opens the system of record, and re-types the resolved record into a CMS-1500, a FNOL update, a Reg E disposition, a SAR threshold check, or a HIPAA grievance response. The regulator does not care whether that step is fast, only whether it is correct and on time. Doing it during resolution, while the values are still live in the upstream record, costs less, fails less, and produces a cleaner audit trail than doing it three hours later from a ticket. This page is about the workflow shape that lets that happen, the primitive that does the typing, and what makes the pattern signable by a compliance officer.

M
Matthew Diakonov
10 min

Direct answer (verified 2026-05-08)

A resolution-time pre-fill workflow is a recorded sequence of accessibility-tree actions, kept in a TypeScript file under source control, that is triggered by a resolution event from the upstream adjudication system and writes the resolved values into the regulatory form in the system of record using Windows UI Automation. The primitive that types is type_into_element in apps/desktop/src-tauri/src/mcp_converter.rs. The locator resolves through a four-strategy cascade in apps/desktop/src-tauri/src/focus_state.rs. The executor crate at github.com/mediar-ai/terminator contains zero LLM call sites, which is the property that lets the workflow be auditable.

The two-step shape

A resolution-time pre-fill workflow has two parts and they want to stay separate. The first part is the trigger: the upstream adjudication system has decided a case and is emitting a structured record. The second part is the form-fill: a deterministic sequence of typed values into the regulated app. Most teams collapse those into one job, then debug for weeks why a single failure mode (a stale session token, a UIA event that did not fire, a validation pop-up that the model did not see) takes the whole pipeline down.

Keeping them separate means the workflow file declares the upstream payload it consumes (claim id, decision code, amount, dates, parties), receives that payload from a queue or webhook, and then runs the form-fill plan against the system of record. If the form-fill step fails, the upstream resolution stays resolved and the failed step ends up in a retry queue, not in a re-adjudication. If the upstream is itself a Win32 app, the same accessibility-tree primitives read the upstream record on the way in.

What the runtime actually does, step by step

1

Resolution decision lands

Adjudicator marks the claim closed, the dispute decided, or the grievance resolved. Upstream system emits the structured record (decision, amount, codes, dates).

2

Workflow file receives the payload

The TypeScript workflow file at the top declares which upstream fields it consumes. The executor binds those values into the named slots of the form-fill plan.

3

Executor opens the system of record

Rust runtime launches or focuses Epic, Guidewire, Fiserv, or whichever Win32 app holds the regulatory form. No browser, no pixel matching, no screen recording.

4

Each field resolved through the four-strategy cascade

automation id first, then window handle plus bounds, then visible text content, then parent window. Three of the four absorb routine UI drift between releases.

5

type_into_element writes the value

EditPattern.SetValue when the control supports it, Win32 keystroke fallback when it does not. Validation pop-ups are observed as UIA property-changed events.

6

Human reviewer sees a populated form

Workflow pauses at the recorded review point. The reviewer reads, signs, submits. The deterministic trace records both the pre-fill and the human action.

Why the “during” in the title carries the weight

Three regulatory regimes share a deadline shape: an event happens, a short clock starts, and a written form has to be inside the system of record before the clock runs out. Reg E gives a bank 10 business days to provide written notice on a debit-card dispute. A state insurance regulator can demand a FNOL inside 24 hours of notice and a closing report inside specific intervals after that. HIPAA grievances and appeals have a 30-day resolution clock with internal acknowledgment inside 10 days. In every case, the form is the artifact the regulator inspects, and the form lives in the system of record.

A workflow that pre-fills the form during resolution closes the gap between the decision and the artifact. The reviewer opens a screen that is already populated and signs off; the gap that used to absorb a re-keying clerk, a paper handoff, and a transcription error stops existing. The savings is rarely measured in head count alone (though one mid-market carrier we worked with cut claims intake from 30 minutes to 2 minutes per claim, a $750K annual line item). The bigger win is the missed-deadline rate, which on a regulator dashboard is a line item with teeth.

Resolution-time pre-fill vs. clerk-keyed forms

FeatureClerk re-keys after the factResolution-time pre-fill workflow
When the form is filledHours or days later, by a clerk re-keying from a ticketThe instant the resolution decision lands in the upstream queue
Source of the values typedFree-text notes a human transcribes back into the regulator's required schemaStructured fields from the resolution record, mapped through a TypeScript workflow file
What the auditor reviewsA screenshot, a CSV export, and a clerk's recollection of what they typedThe TypeScript file with the 8-field semantic record per step, plus a deterministic trace
Behavior on a UI version bumpPixel macros and recorded selectors break, the form sits unfilled, the SLA clock keeps runningFour-strategy locator match in focus_state.rs absorbs label and layout drift
Integration with the resolution systemIntegration is a person reading one tab and typing into anotherTriggered by a webhook or queue message from the resolution app

The audit-friendly part

The bet that makes this pattern viable in regulated industries is that the runtime is deterministic. A compliance officer cannot sign off on a workflow whose action sequence is decided by a frontier model on each run, because two identical inputs can produce two different action sequences. The Mediar runtime executes a TypeScript file under source control. Every step has the eight-field semantic record (step_title, user_intent, what_was_clicked, what_was_typed, target_element, parent_window, screenshot_id, side_effect_observed). A reviewer can read the file, redline a specific step, run the runtime against a test environment, and capture a deterministic trace.

0

The production executor crate has zero references to gemini, claude, openai, or any inference library. The model runs once during recording. The runtime is deterministic Rust calling Windows accessibility APIs.

LLM call sites in crates/executor (verifiable via ripgrep on github.com/mediar-ai/terminator)

That zero is the property that lets a regulator-facing pattern exist. The model that authored the workflow is gone by the time the audit opens the artifact. What is left is a file that behaves like a SQL stored procedure: same input, same output, every run. Runs that deviate (because a UI moved past the four-strategy match, because a validation pop-up rejected a value) emit a failure record into the deterministic trace and stop. Nothing is silently retried with a different element.

Where humans stay in the loop

A common worry about pre-fill is that it will submit the wrong value faster than a human could catch it. The shape that addresses that is mandatory in regulated workflows and is captured directly in the recording: the natural review point in the form (the field that says “review and submit” or the modal that asks “confirm decision”) becomes an explicit human-in-the-loop pause. The runtime fills every field up to that point, opens the screen for the reviewer, and stops. The reviewer sees a populated form, validates it, and submits manually. The audit trace records the pause, the human action, and the time delta between them.

That pattern is what makes regulators comfortable with pre-fill specifically, because the human signature still happens at the moment the form leaves the building. The savings come from removing the typing, not from removing the reviewer.

We had a UiPath build that took five months for the patient registration flow in Epic. The recording approach captured the same flow in a day, and the difference at the field level is whether the runtime is reading an accessibility tree or matching pixels.
C
Chai Leong Choi
IT Manager (case study)

What this pattern is not

It is not a generative AI agent that decides what to write into the form. The decision was already made upstream, by an adjudicator, an underwriter, a claims rep, or an automated rules engine. The workflow takes a structured record of that decision and writes it into the regulator-required schema. If the decision was wrong, the form will be wrong; the workflow does not silently improve a bad decision, and it does not add information that was not in the upstream record.

It is also not a replacement for the questionnaire-AI category. A tool that drafts answers to a SIG, a CAIQ, or a vendor RFP from a security knowledge base solves a real problem and does it well. That tool lives in front of the resolution decision; this workflow lives behind it. The two are complementary.

See your regulator-required form pre-filled at resolution

Bring one resolution flow (Reg E dispute, FNOL update, HIPAA grievance, SAR threshold check, anything regulator-facing) and we will record it live, show the TypeScript file the AI emits, and run the deterministic replay against your test environment in the same call.

Frequently asked questions

What does 'pre-fill during resolution' actually mean here?

Resolution is the moment a case stops being open and the system of record needs the regulatory artifact written. In insurance, that is the moment a claim is adjudicated and a CMS-1500 or a FNOL update has to land in Guidewire or the carrier's policy admin system. In banking, it is the moment a Reg E or Reg Z dispute is decided and a provisional credit reversal plus the SAR/CTR thresholds have to be evaluated and filed in Jack Henry, Fiserv, or FIS. In healthcare, it is the moment a grievance or appeal is closed and the response form has to be entered in Epic or Cerner under the regulatory deadline. Pre-fill means the AI workflow is already populating the form when the human reviewer opens it, not afterwards.

Why does the timing matter? Can a clerk not just key it in later?

Two reasons. The first is the regulator's deadline: Reg E gives a bank 10 business days to decide a dispute and provide written notice, a HIPAA grievance has to be acknowledged within 10 days and resolved in 30, a state insurance regulator can require a FNOL inside 24 hours of notice. The second is data quality: a clerk re-keying from a ticket two days after resolution introduces transcription errors that a downstream audit will eventually surface. Pre-fill at resolution time captures the values from the same record the decision was made against, with no hand-off layer in between.

How does Mediar receive the resolution event?

Through whatever interface the resolution app already exposes. If the upstream system is a modern SaaS app, that is usually a webhook or a queue. If the upstream is itself a Win32 app (a green-screen claims adjudication system, a mainframe terminal, a custom tool the carrier built in 1998), the same accessibility-tree primitives that fill the regulatory form on the way out can read the resolved record on the way in. The workflow file declares both: the upstream read step and the downstream form-fill steps, and the executor runs them in order.

What is the actual primitive that types the value into the form?

It is a single MCP tool called type_into_element, defined in apps/desktop/src-tauri/src/mcp_converter.rs at lines 2298 and 2460. The tool takes a structured locator and a string, walks the live Windows UI Automation tree to find the matching node, and either invokes EditPattern.SetValue or falls back to a Win32 keystroke simulation. There are no pixel coordinates and no image matching anywhere in the production executor. The same primitive types into Epic, Cerner, Guidewire, Fiserv DNA, Jack Henry SilverLake, FIS Profile, SAP GUI, and any AS/400 emulator that exposes a Windows accessibility tree.

What stops the workflow from breaking when the system of record gets a quarterly UI update?

The locator resolver in apps/desktop/src-tauri/src/focus_state.rs walks four strategies before giving up: the recorded automation id, the window handle plus bounds, the visible text content, and finally the parent window as a last fallback. Three of those four strategies do not depend on absolute position, so a routine UI tweak (a panel reorders, a button shifts down a row, the form gets a new tab) usually resolves through strategies one, two, or three. Only when all four miss does the step fail, at which point the runtime queues that one step for re-recording and emits a failure record into the deterministic trace. None of this involves a model call at runtime.

Is there an LLM picking the next field at resolution time?

No. The production executor crate at crates/executor in github.com/mediar-ai/terminator has zero references to gemini, claude, openai, or any inference library. A reviewer can verify that with a single ripgrep. The model only runs once, during the offline recording-processing pass, where it reads the captured event stream and writes a TypeScript file. After that file is checked in, the runtime is deterministic. That is what lets a compliance team sign off on the workflow itself, the same way they would sign off on a SQL stored procedure.

How is the resolution record mapped to the regulatory form's fields?

Through the TypeScript workflow file. Each step has the eight-field semantic record (step_title, user_intent, what_was_clicked, what_was_typed, target_element, parent_window, screenshot_id, side_effect_observed). The what_was_typed field accepts a string literal or a reference to a value pulled from the upstream payload. A workflow that pre-fills a regulatory form receives the resolution record at the top of the file, names each value (claim_id, decision, provisional_credit_amount, etc.), and references those names in subsequent type_into_element steps. A reviewer can read the file and see exactly which upstream field landed in which downstream control.

Can the workflow stop and ask a human to confirm before submitting?

Yes, and most regulated form workflows want that. The recording captures the natural review point in the form (the field that says 'review and submit' or the modal that asks 'confirm decision'). The workflow file leaves that step as an explicit human-in-the-loop pause: the runtime fills every field up to that point, opens the screen for the reviewer, and stops. The reviewer sees a populated form, validates it, and submits manually. The audit trace records the pause and the human action. That pattern is what makes regulators comfortable with pre-fill specifically, because the human signature still happens at the moment the form leaves the building.

What happens if a value from the resolution record fails the form's validation rule?

The runtime captures the validation event from the application (UIA emits a property-changed event on most validation pop-ups), writes it to the deterministic trace, and stops the workflow at the failing step. The form is left in the state where the human reviewer can read the validation message, correct the upstream record or the form value, and either resume or restart the step. The trace shows exactly which value the runtime tried to write and which control rejected it. A naive form-fill that ignores validation pop-ups corrupts data in a way the audit team will eventually find; the deterministic-pause approach surfaces the problem at the moment it happens.

Is the form-fill runtime open source so we can audit it?

The execution layer is. The Terminator SDK that performs the UIA calls and the four-strategy element resolution is published as terminator-rs on crates.io and lives at github.com/mediar-ai/terminator under MIT. The MCP tools (type_into_element, click_element, set_value, etc.) are documented there. The orchestration layer, the cloud workflow runner, the recording pipeline, and the no-code builder are commercial. A team that wants to wire resolution-time form-fill primitives into their own queue can build directly on Terminator without paying for the cloud product, and an auditor can read the Rust source that does the typing.