It happened to me a quite a few years ago when I resurrected some of my C code from the 90’s and brought it up to date and if you’re a Business Analyst or Developer, you’ve been there as well: trying to decipher a legacy system with outdated documentation and only a handful of power users to guide you. Traditionally, we’ve relied on user interviews and painstaking manual testing to map out functionality. Using LLM’s, combined with the more traditional methods can give us extra insight.
What is it?
Reverse engineering software functionality is a complex puzzle. While user interviews and hands-on testing are essential for understanding the user experience, they have limitations. Then we have documentation (or maybe we don’t), what is there can be missing or obsolete, and users may not remember or even be aware of every edge case.
This is where using an LLM to analyse the source code can help. Use GenAI to read code and translate it into plain English, providing a detailed, unbiased view of what the system actually does.
Sticking with my example C code from the 90’s (it’s in a public GitHub repo – https://github.com/steveh250/Unix-Menu-Program) I fed an LLM a prompt to analyse this pretty simple C program:
“Analyse the code in the following file
https://github.com/steveh250/Unix-Menu-Program/blob/master/menu.c, determine the functionality from a user and technical perspective and document it using a structured use case requirements format.”
Here’s a snapshot of some of the structured output it could generate for requirements:

This AI-generated analysis provided a set of functional specifications from the simple prompt (which could definitely be improved to generate requirements in a more formal way) that would have taken a lot more time to create manually. It captures not just the happy path but the error handling, too – details users might easily forget to mention.
What does it mean from a business perspective?
Incorporating LLM’s into your analysis process isn’t just a technical novelty; it has direct business benefits.
- Reduced Discovery Time: Significantly cut down the hours and costs associated with manual analysis, interviews, and workshops. This frees up your BA’s and developers to focus on higher-value activities like designing future-state solutions.
- Increased Accuracy & Reduced Risk: Base your modernisation or migration projects on requirements derived directly from the source code, not on incomplete documentation or fading memories. This minimises the risk of scope creep and unexpected rework caused by undiscovered functionality.
- Improved Knowledge Transfer and Retention: Quickly onboard new team members by providing them with clear, AI-generated documentation. This preserves critical business logic that might otherwise be lost when key personnel leave.
- Unlocking Hidden Value: Discover orphaned features that are still available but have been forgotten by users. These could be critical to operations or represent opportunities for optimisation.
- Empowers Business Analysts: BA’s don;t need deep technical skills to extract requirements – they just need a good prompt (and access to a copy of the source code).
What do I do with it?
Ready to give it a try? You don’t need a massive budget or a dedicated data science team to get started.
- Start Small: Pick a non-critical piece of legacy code or a small utility within your organisation. Use a readily available LLM to analyse it.
- Involve Your Business Analysts: This isn’t your only tool but it adds significantly to the knowledge base when reviewing legacy systems. Involve your BA’s, working with Dev’s, in developing prompts that shortcut the process of capturing requirements from source code into a format they can use or import into their requirements management system. (Also, capture and share those prompts.)
- Validate, Don’t Just Trust: Use the AI’s output as a high-quality first draft. Have a Developer and a Business Analyst review the output together to validate its accuracy and add business context. The goal is augmentation, not blind automation.
- Integrate into Your Workflow: Formalise this process. Make “LLM Code Review” a standard first step in any project involving legacy systems. This ensures consistency and maximises efficiency across teams.
By leveraging LLMs to analyse source code, Business Analysts and Developers can bridge the gap between technical implementation and business understanding faster and more accurately. This approach complements traditional methods, reduces risk, and accelerates the entire software (re-)development lifecycle.
Further Reading
Modernizing Legacy Apps with Large Language Models by Sarvex Jatasra
