
A custom AI agent that reads, understands, and answers questions about large legacy codebases — and generates clean specifications to guide a modern replacement.
Demonstrated safely at the Symposium
Run against nvisia's own codebase
Mark Panthofer
Reads and understands large legacy codebases, answers natural language questions with precision, and generates structured OpenSpec specifications to guide a modern replacement — all with humans firmly in control.
Every organization with a large, aging codebase faces the same problem: the system has been running for 20+ years, thousands of lines of code, and the people who built it are gone. Even the best analysts only know their corner of it.
Before you can modernize, you have to understand. And understanding a system of that complexity — deeply enough to rebuild it cleanly — is one of the hardest and most expensive parts of any modernization effort.
"You're in the unenviable position of having to replace an old WebSphere portal app with React and modern Java. To do that, you have to really understand those requirements."
— Mark Panthofer
Typical age of legacy systems facing modernization
Undocumented, untested, and deeply intertwined
The people who built it are long gone
The Smart Agent combines the precision of deterministic code analysis with the flexibility of natural language AI — delivering accurate, targeted answers without hallucination.
A containerized Docker scanner crawls the codebase using TreeSitter and CodeQL — two tools that parse not just what the code does, but what it means and how components relate to each other.
The result is a structured database of semantic expressions, relationships, and metadata — all linked back to actual source files.
A custom GitHub Copilot agent, equipped with specific "skills" for querying that database, is layered on top. Business analysts ask natural language questions. The agent narrows in on precisely the right subset of code.
No context stuffing. No hallucination-prone broad dumps. Just targeted, accurate answers.
"It understands that code base inside and out. I can ask it any question and it's going to dial in on the correct bit of code quickly."
Once the analysis is complete, the agent generates OpenSpec-formatted specifications — structured, versioned, human-reviewable documents that define what the new system needs to do.
Docker scanner with TreeSitter and CodeQL builds a semantic database of the entire legacy system.
Business analysts query the Smart Agent in plain English. The agent targets the right code precisely.
Structured, versioned specifications are generated and reviewed by analysts before any architecture decisions are made.
The new system is designed independently — free of technical debt — with features added and validated one by one.
After running the Smart Agent against a real codebase with analysts who had worked the system for two decades, several things stood out.
During a live session with analysts who had worked the system for 20 years, the agent surfaced features and behaviors even they weren't fully aware of.
By pre-digesting the codebase deterministically and only querying what's needed, the system stays well within practical token limits even on large models.
The tooling, approach, and agent skills developed here go into nvisia's analysis harness. Future client engagements can use what Mark built.
Specs are reviewed, approved, and refined by business analysts before any code is generated. This is a tool for accelerating understanding, not replacing judgment.
Every component was chosen for precision, scalability, and practical deployment in real client engagements.
TreeSitter + CodeQL — semantic parsing that understands meaning and relationships, not just syntax.
Docker — the scanner runs in a fully containerized environment for portability and repeatability.
GitHub Copilot — custom agent with purpose-built skills for querying the semantic database.
Claude Opus via Copilot — high-capability reasoning model powering the natural language interface.
OpenSpec — structured, versioned, human-reviewable specifications ready for architectural planning.
nvisia ETF System — nvisia-owned codebase used for all demonstrations. No client data involved.
Visit the Legacy Modernization booth to experience the Smart Agent in action against a real codebase.
Ask the Smart Agent questions against a real codebase and watch it dial in on the right code instantly.
See how the agent narrows to exactly the right code without stuffing the context window.
Review real specification documents generated directly from legacy code analysis.
From codebase scan to specification to new architecture planning — the complete end-to-end story.
Mark Panthofer will be on-site to walk through the approach and answer questions.
Whether you're curious about this prototype or exploring how AI can accelerate your next modernization effort, the nvisia AI Lab team wants to hear from you.