WeXL Forge · Discover · Blueprint

Forge Lens

Maps a legacy codebase into a dependency graph and business rules

Takes
Legacy source repository (VB6, ASP, COM, older Java or .NET)Database schema and stored procedures as SQLExisting documentation as text, if any
Gives
Dependency graph of modules, data and external callsBusiness rules catalogue with file and line referencesDead-code candidates and open questionsMarkdown, JSON and Mermaid diagrams
Updated
Draft

The problem

Legacy modernisation fails most often before any code is written. The system that has run the business for twenty years is a VB6 front end, a layer of ASP pages, some COM components and a database full of stored procedures. The people who wrote it have moved on. The documentation, if it exists, describes the system as it was planned, not as it runs today. Nobody can say with confidence what would break if one module were moved.

So the first weeks of every modernisation go on reading code. Senior engineers trace calls by hand, draw boxes on a whiteboard, and try to write down the rules: how a fee is calculated, when an account is flagged, which customers are exempt. It is slow, it depends on a few people, and rules get missed. A missed rule is the expensive kind of bug: the new system passes its tests and still behaves differently from the old one in production.

Good looks like this: a map of the codebase you can navigate, showing which modules depend on which, what data each one touches and what it calls outside the system; a catalogue of business rules in plain English, each one pointing at the exact lines that implement it; and a list of what could not be resolved, so the experts know where to look.

How it works

Forge Lens is a Blueprint. We build it on demand in your engagement, usually at the start of a legacy assessment. This section describes the approach we would take.

It parses first. The dependency graph comes from static analysis, not from a language model: parsers walk the source, the project files and the SQL, and record every call, include, component reference and table access they can resolve. A graph built this way is repeatable, and it is the same on every run.

It reads second. With the graph in hand, Lens works through the codebase module by module, giving the model one module at a time with its neighbours in the graph for context. For each module it writes a short description of what the module does and lists the business rules it implements, in plain English. Each rule cites the file and line range it came from.

It is steered by your glossary and any documentation you have, so rules use the names your business uses, and by instructions to separate what the code does from what it appears to be for.

Then it is checked. A rule with no file and line reference is rejected. References are checked against the source, so a citation that points at the wrong lines fails. Calls the parser could not resolve, such as components created from a string at runtime, are listed as open questions rather than guessed.

People confirm. Your subject-matter experts and our engineers review the rules catalogue, mark each rule as confirmed, wrong or unknown, and the graph and catalogue become the input to choosing seams and porting code.

Where it gets it wrong

  • Late binding hides dependencies. VB6 and COM code often creates objects from names held in strings or configuration. Static analysis cannot always follow these, so the graph has gaps. Lens lists every unresolved call so the gap is visible, and runtime traces from a test environment can fill it in.
  • The rule is not always in the code. Some rules live in stored procedures, in configuration tables, in a scheduled job, or in what the operations team does by hand. Lens reads SQL and configuration if you give them to it, and flags modules that read rule-like data, but it cannot see a manual step.
  • Implementation is not intent. Lens describes what the code does, including bugs that the business has come to rely on. It cannot tell you whether a strange branch is a rule or a mistake. That is a question for your experts, and Lens raises it rather than deciding.
  • Large modules get summarised too briefly. A single routine of a few thousand lines can hide several rules. Lens splits large modules before reading them, and the review step is where a missed rule is caught.

We would rather Lens leave a dependency marked unresolved than draw a confident line that is not there.

Why not just prompt a chatbot

You can paste a module into a chatbot and get a plausible summary. You cannot paste a whole estate, and you cannot trust a dependency graph that a model drew from memory. What makes Lens useful is the deterministic graph from real parsers, the rule that every business rule cites its lines, the check that those lines exist, and the explicit list of what could not be resolved. That is the part we build, and the part you keep for every seam that follows.

What you get

  • In your engagement: built on demand in your engagement, and run in the first weeks of a legacy assessment so your experts review a map instead of drawing one.
  • Under your brand: services firms can run it inside their own modernisation offer, with their own report format.
  • Built to own: we tune it to your languages, glossary and documentation standards, and hand over the source.

See three ways to use an agent.

Run it on your input.

Send us a real legacy code sample. We run Forge Lens on it and send the output back within one working day, with a note on what we would change for your setup.

Start here

See Forge on your own codebase.

Start a conversationWe'll show the Live agents on a real workflow of yours.