Start typing to search this publication.
techcirkle
Open menu

Subscribe to techcirkle

Get new posts delivered straight to your inbox.

AI Changed the Archaeology, Not the Architecture

AI compressed the code-comprehension half of legacy modernization. The design decisions did not move. Here is how to restructure a programme around that.

techcirkle
5 min read
Cover image for AI Changed the Archaeology, Not the Architecture
Legacy computing systems represented with modern digital concepts
Legacy computing systems represented with modern digital concepts

There is a lot of noise about AI and legacy code, most of it either "models will rewrite your mainframe" or "models produce garbage on real codebases." Both are wrong in ways that obscure something genuinely useful.

Here is the precise version: the comprehension half of legacy modernization got dramatically cheaper, and the decision half did not move at all. Understanding that split is what lets you restructure a programme around it.

The cost breakdown nobody questions

Legacy modernization effort historically distributed roughly like this:

~40-60%   understanding the existing system
  ~20%    building replacements
  ~20%    data migration and verification
  ~10%    cutover, parallel running

The comprehension slice is the one people find surprising, and it is real. Reconstructing intent from implementation. Finding the seventeen places a business rule is enforced. Determining which of four near-identical functions production actually calls. Working out whether a conditional guards a real case or a case that stopped existing in 2019.

That work had three miserable properties: it did not parallelise, it required expensive senior people, and it produced nothing demonstrable while it was happening — which is why so many programmes get defunded during it.

What models are genuinely good at here

Not writing the replacement. Reading the original.

Explaining unfamiliar code. Give a model a module with no documentation and it will produce a coherent description of what the code does. Not always correct. But coherent, structured, and a far better starting point than a blank page.

Tracing call paths across a codebase too large to hold in your head. "Where does this value come from, and what happens to it downstream" is a question that used to take an afternoon of grep and guesswork.

Finding near-duplicates. Legacy systems accumulate three slightly different implementations of the same logic, and identifying which is authoritative is exactly the kind of pattern-matching that works well.

Drafting characterisation tests that assert current behaviour, including the parts that are technically bugs but that downstream systems depend on.

The critical property underneath all four: verifying a proposed explanation is far faster than deriving one. A domain expert reading a generated description and correcting it works several times faster than the same expert reading code and writing a description. And the corrections are where the genuinely non-obvious knowledge surfaces — which makes this an unusually good use of your scarcest people.

The workflow that actually works

Technology transformation and consulting work
Technology transformation and consulting work
for each module:
  1. generate behavioural description       (model)
  2. correct it                             (domain expert)   ← the value
  3. generate characterisation tests        (model)
  4. run tests against LEGACY system        (CI)
       fail → the test was wrong, fix it
       pass → behaviour confirmed
  5. flag surprising passes for review      (human)

Step 4 is non-negotiable and it is the step people skip. A generated test that has never run against the original system is an assumption with a test framework wrapped around it. Running it against production behaviour is what converts a hypothesis into evidence.

Step 5 is where the real discoveries are. When a generated test asserts something that looks wrong and it passes against the legacy system, you have found undocumented behaviour that something downstream probably depends on. Those cases deserve senior attention. The boring passes do not.

What did not change

Everything involving judgement.

Deciding what the system should do. A model can tell you what the code does. It cannot tell you whether that is what the business wants now, because that information lives in people's heads and in a strategy nobody wrote down.

Resolving contradictions between code and belief. The most common and most valuable finding in any discovery phase is that the system does something different from what the business thinks it does. Surfacing the contradiction is now cheap. Deciding which side is right is a conversation between people with authority.

Choosing what to leave alone. The judgement that a component is fine as it is, and should be retained deliberately rather than modernized, is one of the highest-value calls in a programme and entirely human.

Seam placement. Where to cut for incremental replacement depends on the domain and the organisation, not on the code structure — and code structure is the only thing a model can see.

How this changes programme shape

Three practical consequences.

Discovery phases compress from months to weeks. If you hold an estimate written before 2024, the comprehension line is probably wrong in your favour by a large margin. Re-run it before concluding a programme is unaffordable — we have seen this alone flip go/no-go decisions.

The bottleneck moves to decision-making. Once comprehension is fast, the constraint becomes how quickly people with domain authority can resolve the questions the comprehension surfaces. Staff for that. A programme with three engineers and no available domain expert will now stall waiting for answers rather than waiting for analysis.

Documentation becomes maintainable. Regenerating behavioural documentation after changes used to be prohibitively expensive, so it drifted. It is now cheap enough to do continuously, which means the artefact stays useful past the end of the programme — arguably the most durable benefit here.

Full framework — the seven modernization paths, strangler fig seams, data migration and sequencing: Legacy Application Modernization. We also scope modernization programmes for teams re-running numbers that predate this shift.

Frequently Asked Questions

Can AI rewrite a legacy system for me?

No, and framing it that way wastes the actual opportunity. What compressed is comprehension — reading unfamiliar code, tracing call paths, drafting behavioural documentation and characterisation tests. Design decisions, seam placement and resolving what the system should do remain human work.

How much of a modernization programme is comprehension?

Historically forty to sixty per cent. It did not parallelise, required senior people, and produced nothing demonstrable while underway, which is why programmes were often defunded during it. That is the slice AI tooling addresses.

Do I have to verify AI-generated documentation?

Always. Treat every generated explanation as a hypothesis. The workflow that works is generate, then have a domain expert correct — and the corrections are where the non-obvious knowledge surfaces, which makes this an efficient use of scarce experts rather than a shortcut around them.

Why must characterisation tests run against the legacy system first?

Because an unvalidated test is an assumption. Running it against the original converts belief into evidence. The most valuable outcome is a test that asserts something apparently wrong and passes — that is undocumented behaviour something downstream likely depends on.

Should I re-estimate an older modernization proposal?

Yes, if it predates 2024. The comprehension line is likely overstated significantly, and we have seen re-estimation alone change go/no-go decisions on programmes previously judged unaffordable.

What becomes the bottleneck afterwards?

Decision-making. Once comprehension is fast, progress is limited by how quickly people with domain authority resolve the contradictions and questions that comprehension surfaces. Staff the programme accordingly, or it stalls waiting for answers instead of analysis.

Subscribe to techcirkle