Software Development

Modernising Legacy Systems with AI Agents

Advanced3 days

Legacy systems contain more than old code. They contain business rules, operational workarounds, data assumptions and interface behaviours accumulated over years. Much of this knowledge is undocumented or distributed among people, tests and production processes. A rapid AI-generated rewrite can remove visible complexity while also removing behaviour the organisation still depends on.

This course uses agents as investigative and implementation tools within a controlled modernisation method. Participants will map a system, recover intent from evidence, create characterisation tests and move functionality behind stable boundaries in manageable stages. Every generated change must demonstrate behavioural equivalence or an explicitly approved difference.

The course supports modernisation rather than advocating one destination architecture. It helps teams reduce uncertainty before committing to migration at scale.

Learning Outcomes

Upon completion of this course, participants will be able to:

  • Assess where AI agents can assist a legacy modernisation programme
  • Map code, data, interfaces and operational dependencies
  • Recover business rules from multiple sources of evidence
  • Build characterisation tests around existing behaviour
  • Create bounded specifications for incremental migration
  • Use agents to refactor and translate code under deterministic controls
  • Validate data and interface compatibility during transition
  • Govern risk, knowledge transfer and rollback across a staged programme

Course Outline

Modernisation as Knowledge Recovery

  • Why legacy complexity often reflects real business history
  • Distinguishing accidental complexity from required behaviour
  • Risks of AI-generated rewrites and superficial code translation
  • Modernisation options: retain, remediate, re-platform, refactor and replace
  • Selecting bounded areas for agent assistance
  • Defining evidence and accountability before change begins

System Discovery with Agents

  • Repository, module and dependency mapping
  • Entry points, jobs, interfaces and data stores
  • Call graphs, runtime configuration and deployment topology
  • Identifying dead code without assuming it is unused
  • Combining static analysis with logs and operational evidence
  • Producing navigable maps with source references

Recovering Business Rules

  • Extracting rules from code, tests, documentation and production examples
  • Interviewing subject-matter experts with agent-assisted question generation
  • Distinguishing invariant behaviour from historical accident
  • Identifying calculations, thresholds and exception paths
  • Recording confidence, evidence and unresolved ambiguity
  • Creating a shared domain glossary and decision log

Characterisation and Golden-Master Testing

  • Capturing observable behaviour before refactoring
  • Golden-master, approval and differential testing
  • Selecting representative and risk-focused input data
  • Managing non-determinism, timestamps and external dependencies
  • Testing batch, event-driven and data-processing systems
  • Assessing whether captured behaviour should be preserved

Defining the Target and Migration Boundaries

  • Establishing goals, constraints and non-goals
  • Stable interfaces, seams and anti-corruption layers
  • Incremental replacement and strangler patterns
  • Data ownership and transaction boundaries
  • Operational resilience and coexistence requirements
  • Architecture decisions that agents may not change independently

Agent-Assisted Refactoring and Translation

  • Preparing bounded work packages with acceptance evidence
  • Refactoring to expose seams before changing technology
  • Translating code while retaining explicit semantics
  • Handling language, framework and dependency differences
  • Reviewing generated abstractions and error behaviour
  • Keeping transformations small enough for differential validation

Data and Interface Migration

  • Schema discovery, lineage and hidden data contracts
  • Compatibility across APIs, files, messages and databases
  • Dual reads, dual writes and reconciliation patterns
  • Historical data conversion and quality controls
  • Protecting sensitive data in agent workflows
  • Rollback and recovery when migration is partially complete

Verification and Operational Readiness

  • Differential execution between legacy and modern components
  • Performance, capacity and resilience comparison
  • Security analysis of newly introduced dependencies and interfaces
  • Observability needed during parallel operation
  • Controlled cutover, canary traffic and rollback
  • Proving behaviour with evidence rather than code similarity

Programme Governance and Knowledge Transfer

  • Prioritising modernisation by value, risk and learning
  • Human ownership of business-rule and architecture decisions
  • Tracking generated code, evidence and unresolved assumptions
  • Preventing agent speed from overwhelming review capacity
  • Transferring recovered knowledge to maintainers
  • Measuring risk reduction rather than lines converted

Practical Capstone

  • Map a representative legacy subsystem
  • Recover and document critical business behaviour
  • Build characterisation and differential tests
  • Design an incremental migration boundary
  • Complete one agent-assisted transformation
  • Present evidence, residual risks and a staged modernisation roadmap

Intended audience

This course is intended for senior developers, architects, modernisation leads, test engineers and platform teams responsible for mature or poorly documented systems. It is relevant to organisations working with established Java, C++, Python, mainframe, data-processing or integration estates where behavioural preservation and operational continuity are critical.

Prerequisites

Those attending this course should meet the following:

  • Strong professional software development experience
  • Understanding of software architecture, integration and data migration
  • Familiarity with automated testing and continuous integration
  • Basic experience supervising an AI coding agent