Migrate legacy systems

A legacy system holds years of business logic: the checks your data has to pass, how incoming files map to your own columns, and the reference data behind them. Rebuilding that by hand is what makes moving costly. An AI agent such as Claude Code can rebuild it as a Quantemplate pipeline instead, and test every rule as it goes.

In the video, Claude builds and tests a complete Lloyd’s v5.2 claims validation pipeline from a short prompt, in about 20 minutes.

How to migrate

  1. List what your legacy system does. Write down the checks it makes on each file, in plain words or as formulas. Collect a few sample files, and any reference data the checks use, such as a list of binders or policy numbers.
  2. Start from a template if one fits. Look through the industry templates. If one covers your data, such as Lloyd’s bordereaux or TPT fund files, download it: its rules and test data are already written and checked. Otherwise, the agent builds a new pipeline from your list.
  3. Set up the agent. You need Claude Code, Claude in Chrome and a Quantemplate login that can create pipelines. Install the Quantemplate skills, which teach Claude how Quantemplate works. AI agent support has the details.
  4. Ask Claude to build it. Tell it where your files are, what to call the pipeline, and which template or pipeline to start from. Ask it to test each rule. For example:
    I’ve built the Lloyd’s v5.2 premium pipeline in my Quantemplate workspace. Using the claims template and my validation list in this folder, build a Lloyd’s v5.2 claims pipeline called ‘Lloyd’s v5.2 Claims Validation’, reusing the premium pipeline’s reference data. Then test it with data built so that each rule fails once, and with clean data that passes every rule.
  5. Review what it built. Claude creates the datasets, stages and rules, runs the test data and reports each rule’s result. Open the pipeline and its validation report to check the rules match what your legacy system did.

Onboarding a new client

In this example, a new client’s property statements of values (SOVs) arrive in their own layout and feed three systems: a general ledger, a pricing model and Moody’s RMS. The new setup replaces a legacy system, so it’s proved against that system’s outputs before the legacy system is switched off.

An agent such as Claude Code can carry out each step: profiling files, building pipelines, writing test data, running comparisons and writing the documentation. A person reviews the work at four checkpoints. Select a step in the chart to see what it involves.

Prepare

Checkpoint 1: mapping

Build

Checkpoint 2: builds

Prove

Every difference explained?

No:

Yes
Checkpoint 3: backtest
Clean for the agreed cycles?

No:

Yes

Go live

Checkpoint 4: switch-over

Each change is tested and backtested before it goes live

Map the SOV to a master schema

Profile sample files to see what each column holds. Start the master schema from the Moody’s RMS template’s SOV schema, so the template fits it, and add the fields the ledger and pricing model need. If the ledger needs premium or allocation fields the SOV doesn’t carry, add them as a second input. Map each file layout with Map Column Headers, and validate the incoming data: required fields, types and code lists.

Moody’s RMS, from the template

Replace the template’s example reference data, such as its occupancy and construction code mappings, currency rates and postal zones, with the client’s. Run the template’s test data, then the past SOVs, and compare the results with the legacy system’s import files.

General ledger

Hold the account mapping in a reference dataset. Validate that debits equal credits and that totals tie back to the SOV. Test each rule with data that fails it once, and with clean data that passes every rule.

Pricing model

Build it the same way, and validate exposure totals by rating factor against the SOV. The three builds can run at the same time.

Put the three together

Map, clean and validate the SOV once, and feed all three outputs from the result. Auto Export is blocked when any rule fails, so in a single pipeline, a failure that only affects pricing also holds back the ledger and Moody’s RMS outputs. Either set rules that affect one target as warnings, or have a front-end pipeline write a clean SOV dataset that three target pipelines read, each with its own validation and Auto Run. The second keeps the targets independent.

Backtest on past data

Run the past SOVs through the new setup, with the reference data and currency rates the legacy system used at the time. Compare each output with the legacy system’s in a reconciliation pipeline: row counts, control totals and every field. Keys, codes and counts must match exactly, and calculated amounts to an agreed rounding.

Fix it, add a test, backtest again

Classify each difference. A defect in the new setup is fixed. A defect in the legacy system is recorded in a log of accepted differences. An input difference, such as a rate date, is aligned. Add a test for each fix so it can’t recur, and rerun all the past data, not just the file that failed.

Run alongside the legacy system

Run both on live data for at least one full cycle of each target, such as a month-end close for the ledger. Compare every run in the reconciliation pipeline, and send any difference back through the fix step.

Document it, and capture it in skills

Document the master schema, the mappings, every rule, the accepted differences, and a runbook for failed runs and new layouts. Add general lessons about building in Quantemplate to the Quantemplate skills. Keep client-specific settings, such as naming, thresholds and reference data sources, in a separate skill for that client.

Switch over

Point each target at the new outputs with Auto Export or feeds, and stop the legacy system’s runs. Keep its outputs readable, for audit and fallback.

Run and maintain

Each run’s validation report shows its results. Operators can change anything in the Quantemplate app, and so can an agent. Make each change, such as a new SOV layout, a new ledger account or a Moody’s RMS update, in a copy of the pipeline, run the tests and a backtest, then make it live. Pipeline history keeps each version.

The agent works in your workspace with the access you give it. The backtest and the run alongside the legacy system use past and live data. To keep that data from the agent, your team can run those steps from the runbook, and the agent can work from test data and the comparison results.

Checkpoints

The agent prepares the evidence for each checkpoint. A person reviews it before the next stage starts.

Checkpoint
Passes when
1 Mapping
Every source column is mapped or deliberately left out. A sample of mapped rows matches the source files. Every code field, such as occupancy, construction, country and currency, maps to a valid code.
2 Builds
Each target’s test data fails each rule once, and its clean data passes. A sample of Moody’s RMS occupancy and construction codes is correct. Ledger debits equal credits and its totals tie to the SOV. Pricing exposure totals by rating factor tie to the SOV.
3 Backtest
Every row count, control total and field matches the legacy output, or is in the log of accepted differences with its cause.
4 Switch-over
Every run alongside the legacy system was clean for the agreed number of cycles. The runbook has been followed for a run by someone who didn’t build the pipelines. Auto Export, feeds and Auto Run are set up and tested.

Once it’s built

Once the pipeline is built, the agent needn’t stay involved, and it has only the access you give it.

Your data stays in your own secure Quantemplate environment throughout.