Case Study
Legacy ERP Discovery & AI Reporting Agent
AI agents reverse-engineered a decades-old ERP system. Hundreds of source files, hundreds of database tables, zero documentation. Complete mapping delivered.
Key Result
127 deliverables produced
The Challenge
A decades-old ERP system with no documentation, no original developers, and high-risk calculations buried in source code
The Outcome
127 structured deliverables, 2 high-risk calculation defects found, complete modernization blueprint delivered
Decades of undocumented complexity
The client runs on an ERP system built decades ago. A legacy desktop application. Hundreds of database tables with zero foreign key constraints. Tens of thousands of products. Millions of rows of operational data.
It works. Most of the time. But nobody fully understands it anymore.
The original developers left years ago. Business rules exist only in source code and in the memories of a few long-tenured employees. Integrations were added over the years by different vendors with different priorities. The system evolved organically, and its current state existed nowhere in writing.
The business depends on this system for critical operational calculations. Getting those calculations wrong is not just a billing error. It creates real liability.
Modernization was stuck
Every conversation about upgrading hit the same wall: “What will break if we change this?”
Nobody knew. And the calculations buried in this system are not trivial. They carry operational and compliance risk. If those formulas produce the wrong number, the business faces liability exposure.
Manual documentation was impractical. The system was too complex, too intertwined. It would take months of expensive consulting hours, and the result would be outdated by the time it was finished.
Six independent AI analysts, one system
We took a different approach. Instead of sending a team of consultants to manually trace code paths, we deployed six independent AI analyst agents, each conducting its own review of the source code, database structure, and business logic.
Why six independent analysts instead of one? The same reason financial audits use independent reviewers. No single analyst gets anchored to an early assumption. Findings that appear in multiple independent reports have higher confidence. Contradictions between analysts surface blind spots.
After independent analysis, findings were reconciled into a unified assessment.
What we delivered
The discovery phase produced 127 structured documentation files:
- Complete data dictionary covering all tables with field-level documentation
- Entity relationship diagrams reconstructed from application logic (the database had no foreign keys)
- 29 distinct calculation formulas extracted and documented, including all high-risk operational calculations
- Integration contracts between the ERP and connected systems
- Workflow state machines showing how orders, quotes, and inventory actually flow through the system
What we found that humans missed
The multi-analyst approach surfaced 100 unique health findings from 178 raw findings across the six independent reviews.
Two findings were classified as high-risk:
- A critical calculation was off by 21%, producing results that overstated capacity, creating liability exposure
- A second calculation showed a 34% conflict between two data sources feeding the same formula
These defects existed in production. They passed every manual review. The AI agents caught them because they systematically compared every data point against every formula, something impractical for human reviewers at this scale.
Then we designed what comes next
With the complete system map in hand, we delivered a modernization blueprint, including a prototype design for an AI-powered reporting agent that would sit on top of the legacy data. The design specified 42 registered tools and 43 query functions against the live database.
The blueprint is a standalone deliverable. The client can execute on it with their own team, with us, or with any vendor of their choosing.
The outcome
Complete documentation package delivered. For the first time in decades, the client has their entire system documented. Every integration, every dependency, every formula. This package stands on its own regardless of what comes next.
High-risk defects found and reported. The two critical calculation errors were addressed immediately. No manual audit had caught them.
Clear modernization path. With 127 structured deliverables as a foundation, the client has everything needed to plan and execute modernization with confidence. They know exactly what depends on what.
14 prioritized patches delivered with runbooks ready to execute, addressing security vulnerabilities, data integrity issues, and performance bottlenecks.
Engagement model: discovery and intelligence. This was a fixed-scope engagement. We delivered the complete analysis package: documentation, findings, modernization blueprint, and patch runbooks. The client owns all deliverables and can execute the modernization roadmap with any team they choose.