stack-shift

Automated migration for legacy systems

New stack.Same behaviour.

stack-shift moves legacy software to a modern stack with AI agents, starting with RPG to Java. A unit is done only when the test setup shows that it behaves like the original.

Leitstand overview with sample data: 2 of 17 units accepted, 3 items waiting for a decision, token use against the series limit, units by level.

What makes a stack change hard.

Language models translate code well by now. The work lies in showing that the result does the same thing, and in keeping the way there predictable.

The rules live in the code

Extended over decades, without current documentation. The behaviour is the real specification.

ApproachRecording on the running system: inputs, outputs, files before and after.

Plausible is not equal

An agent writes code that looks right and passes its own tests.

ApproachPart of the recorded cases stays hidden. Only those cases decide acceptance.

Differences at byte level

EBCDIC, packed decimals, fixed record lengths, trailing blanks.

ApproachValues are recorded typed and as raw bytes. The runtime library reproduces the semantics of the original.

The cut-over date

A rewrite has to do on day one everything the old system learned over the years.

ApproachUnit by unit, from the bottom of the call tree upwards. Each one stands on units already checked.

Agents without guard rails

They write wherever they like and guess when something is unclear.

ApproachFixed write permissions per unit. When something is unclear, the agent asks a question with options.

Cost and progress

How far along is the migration, what will the rest cost, where is it stuck?

ApproachThe Leitstand shows progress, usage against fixed limits, a forecast and the bottleneck.

The process in five steps.

From the source tree to the signed receipt. Every step has a result you can check.

  1. 1

    Inventory

    The source tree is read: calls, files, copybooks, data areas, cycles.

    units.json · levels 0…n

  2. 2

    Recording

    On the running system, typed and as raw bytes. Part of the cases is held back.

    golden/ · visible + hidden

  3. 3

    Test setup

    Build and replay in a container without network, on a fresh copy of the code.

    run_checks → green | red

  4. 4

    Series

    Agents translate bottom-up. Questions go to people, the other units keep running.

    runs · questions · forecast

  5. 5

    Acceptance

    Merge request with a signed receipt. Only a person may merge.

    receipt.json · Ed25519

The Leitstand.

One control room for the whole project: where each unit stands, what is waiting for a decision and what the series has used so far.

Leitstand overview with key figures, units by level and the items waiting for a decision.

Overview: accepted units, hidden cases, token use against the limit, forecast and bottleneck.

From the prototype

  • 23 / 23programs accepted, all on the first attempt
  • 108 / 108hidden test cases green
  • 0questions needed
  • RPG IIIto free-form RPGLE, plus CL and embedded SQL

Test corpus: 23 programs with 3,931 lines in total, mostly synthetic, some third-party code under an open licence. “Equal” means equal on the recorded cases, not formally proven.

Why you can trust the result.

Checks without network

The test setup runs in a container without network, on a fresh copy of the code.

Fixed write permissions

Recordings, source and test setup are locked for agents. Every write is logged.

Questions go to people

Where the recording is not enough, a person decides. The answer flows back into the unit.

You choose where it runs

Orchestration and test setup run on your machine. You decide which language model the agents use and under which contract terms.

Status.

stack-shift is a prototype. What works, what comes next and what is still missing.

Works in the prototype

  • Recording on a real IBM i
  • RPG → Java language pack with runtime library
  • Test setup with hidden cases
  • Leitstand, questions, receipts

Not yet included

  • Screen programs
  • GitHub or GitLab integration
  • Further language packs

How a project starts.

A pilot on a defined slice shows how well the method fits your code base.

  1. 1

    Conversation and inventory

    You describe your code base and goal. The inventory shows size, levels and what cannot be resolved.

  2. 2

    Pilot on a slice

    A defined part of the code base is recorded and migrated, with the test setup on your system.

  3. 3

    Decision on the series

    After the pilot you have the result, the cost per unit and a forecast for the rest.

A legacy system that needs to move?

Tell us briefly which programs you have and what they do. We will get back to you and check together whether a pilot fits.

Email info@sebaro-ventures.de