Companies House uses GenAI to modernise a core legacy application
Achievements at a glance
Reduced maintenance costs for a core, public-facing application | A repeatable modernisation approach for legacy applications | Provided a playbook with effective ways to use GenAI to accelerate modernisation |
Companies House is an executive agency sponsored by the UK Department for Business and Trade. It incorporates and dissolves limited companies, registers company information and makes that information available to the public. The Companies House find and update company information service receives nearly one billion requests annually.
Challenges
Reduce costs of maintaining legacy systems
Companies House has public-facing digital services that are supported by legacy architecture using various technologies, languages and frameworks. They wanted to simplify and reduce costs associated with maintaining these applications.
They therefore began a project to modernise affected services to a consolidated architecture implemented in approved modern technologies – Node.js and Java – and to explore the potential of adopting GenAI to accelerate their approach.
Develop a repeatable modernisation approach
A prime candidate for modernisation was Monitor GUI, a core front-end Perl app that lets people follow a company and receive email updates when there are changes to that company’s information held within Companies House register.
They approached Kainos, an existing and long-standing digital partner, to lead on this initiative. The aim was to develop a repeatable application modernisation approach that could also be scaled to other services across organisation.
Explore the potential of using GenAI
Guided by Kainos, Companies House digital teams were keen to explore ways of integrating GenAI into their development and application modernisation processes while gaining experience and knowledge around:
- Quality: Assessing how effectively and consistently code generated through GenAI tools adheres to good software engineering practices, follows design best practices and enables easy maintenance.
- Delivery & Governance: understanding GenAI’s suitability to integrating modern, third-party authentication solutions versus building from scratch, focusing on development speed, process bottlenecks, and whether GenAI-generated code met product requirements
Modernisation of the legacy Monitor GUI application was identified as a good candidate to assess the potential for using GenAI tools in software development.
Approach
Accelerating legacy modernisation with GenAI
Traditionally, we approach application modernisation using a structured, four-stage process rooted in industry best practices:
- Understand system design: Mapping code, identifying key areas and dependencies, and breaking down the system into logical and discrete areas
- Document existing functionality: Reviewing documentation and speaking to relevant subject matter experts
- Plan: Determining the modernisation approach (incremental vs big bang)
- Transform into new technology: Rewriting functionality with the new tech stack (in this case, Node.js and Java)
We explored how GenAI could make the process faster and more effective. We weren’t looking to replace entire processes with single prompts. Instead, we integrated GenAI into the four stages, using it to streamline more time-consuming elements. To this end, we explored the following areas:
- Analysing legacy code: GenAI can help rapidly analyse and document codebases. We were keen to use these tools to help us understand the legacy Monitor GUI system
- Accelerating development: By automating the creation of routine or repetitive code, GenAI can accelerate parts of development. This allowed the team to focus more on complex, value-adding tasks
- Code clean-up: GenAI coding assistants helped identify redundant code, simplify logic and optimise for efficiency and performance
- Planning: In addition to core development tasks, GenAI has shown potential to help with planning out migration tasks. This helped us break development into discrete and more manageable iterations of work
How Kainos integrated GenAI into the legacy modernisation four-stage process |
Understand system design |
|
Document existing functionality |
|
Plan |
|
Transform into new technology |
|
Results
Monitor GUI is easier and less expensive to maintain
As part of the Monitor GUI modernisation, Kainos migrated this legacy Perl web service to use the more modern, industry-standard technology of Node.js. By aligning with the targeted technology stack for Companies House, this also enabled the reuse of in-house libraries for styling, internationalisation and session management - streamlining maintenance and improving consistency with other applications. Our approach ensured Companies House now has best-practice documentation and automated regression test suites that enable in-house teams to support the new solution efficiently and cost-effectively.
Playbook for using GenAI to accelerate modernisation
This project has provided Companies House with a repeatable modernisation process that can be used for other services in its roadmap.
Crucially, Kainos provided a playbook with practical and real-world understanding of GenAI’s role and potential in modernising legacy technology estates. Going beyond coding, we showed how GenAI can help shape the approach, providing a deeper understanding of legacy systems and helping deliver projects to production. Although there are significant efficiency gains from using GenAI, the project confirmed the importance of having humans make decisions and guide the tools instead of giving up full autonomy or development control to these tools.