Skip to content
Agentic Code

Automigration

Suite in developmentIn development

Automigration moves large legacy systems to a modern language with several AI agents, starting with RPG to Java. Unit by unit, until the test setup proves that the new code behaves like the old.

The problem

Code that grew. Core systems in RPG or COBOL often carry the business. Extended over decades, their rules live in the code rather than in documents.

Knowledge in few heads. Often only a few people know the programs well, and new people rarely learn the old languages.

Rewriting in one go. A rewrite has to do everything on day one that the old system learned over the years. If a rule is missing, it often shows only in production.

The method

AI agents can translate code. The hard part is proving that the result behaves exactly like the original. The suite is built around that.

  1. Record the behaviour. Before anything is translated, the suite records on the running legacy system what each program does: inputs, outputs, files before and after. That is the golden master.
  2. The test setup decides. A unit is done when the project's test setup is green, not when a model thinks it is done.
  3. Bottom-up. Programs are migrated as units, from the lowest building blocks of the call tree upward. Each one stands on units that are already checked.
  4. Clarification, not abort. When an agent gets stuck, it asks a question with options and a recommendation. That unit waits while the others keep running.
  5. Signed receipt. Every unit ends with a merge request and a signed receipt. Only a human may merge.

The principles

  • Hidden test cases. Part of the recorded cases never reaches the agents. These cases decide acceptance, not the tests an agent writes itself.
  • Exact to the byte. Values are recorded typed and as raw bytes, so differences in character set, packed numbers and spaces show up.
  • Fixed write rights. An agent writes only to the code of its unit. Recordings, source and test setup are locked for it, and every write is logged.
  • Checks without network. The test setup runs in a container without network access, on a fresh copy of the code.
  • Questions go to people. Where the recording is not enough, a person decides. A clarification names options and a recommendation, and the answer flows back into the unit.
  • Verifiable receipt. The receipt binds test setup, recording, source and result together with checksums and is signed with Ed25519.

Status

Automigration is a prototype, not yet a product. We are looking for companies with an RPG code base who want to go this way with us in a pilot project.

In the prototype

  • Recording on a real IBM i system
  • Language pack RPG → Java with a runtime library for packed numbers, EBCDIC and record-level file access
  • Test setup in a container with hidden cases
  • Agents translate bottom-up; a first test code base went all the way through, hidden cases included
  • Signed receipts, control centre and clarification inbox

Next

  • Larger code bases from real companies
  • Pilot projects with partners

Not yet included

  • Screen programs
  • Connection to GitHub or GitLab
  • Further language packs after RPG → Java

Contact

You have a legacy system that needs to move and want to know more? Write to [email protected]