How Comarch is rebuilding a 20-year-old, 10-million-line ERP system with Devin
About the company
Comarch is one of the most established technology companies in Central Europe, building enterprise software used across ERP, telecom, and other sectors by more than 100,000 customers throughout Europe and worldwide.
Three decades of enterprise software
Founded in Krakow in the 1990s, Comarch has spent three decades building systems European enterprises depend on. ERP is its largest sector; enterprise customers rely on it for accounting and core operations. A recent acquisition by private equity brought new investment and a new leadership team with a mandate to move fast: embed agentic AI in the products, shift to a subscription and SaaS model, and rewire how the engineering teams work.
A 20-year codebase meets a new generation of customers
Comarch's flagship challenge was ERP XL, built continuously over 20 years in Clarion, a legacy language few developers alive still know. The codebase had grown to roughly 10 million lines, in a two-tier architecture where business logic was mixed directly into the interface, and customers accessed the system over remote desktop. Much of it was undocumented. Enterprises with more than 500 employees run their accounting on ERP XL, and a new generation of customers expected a modern product they could open in a browser.
Tomasz Stachlewski, Comarch's CTO, who joined from AWS to lead the company's 700-person technology organization, describes the ERP XL transformation as the most important task he was hired for. The modernization covers the full stack: a new web interface, a rebuilt backend that is faster and more secure, and AI agents embedded in the product so work customers used to do manually is done autonomously.
The original plan put the transformation at about five years, and the first stage alone — understanding what the Clarion code actually does — would have required analysts reading legacy code line by line for years. Łukasz Maślaniec, Comarch's Chief Product Officer for ERP Products, said refactoring the system by hand would have felt "like the Egyptians building the pyramids." Customer expectations were rising exponentially, and a modernization delivered in five years would arrive too late to matter.
Evaluating the field
When agentic AI emerged, Comarch's leadership traveled to Silicon Valley and met a shortlist of companies, Cognition among them. They came back with a specific question — can this refactor ERP XL? — and designed a controlled proof of concept to answer it: a set of vendors, the same fixed scope of refactoring work on one of ERP XL's modules, the same team of their best developers, product managers, and UX designers, scored against the same weighted criteria of output quality, velocity, enablement, and total cost of ownership.
Devin scored best on quality, velocity, and enablement, and gave the team the most confidence they could finish the refactoring within 18 months. Two capabilities stood out: Devin could understand a huge codebase context, the deciding factor for a 10-million-line system, and it was usable by business analysts, who validate the extracted business logic.
The pilot went straight at the backend, with Cognition's team on site in Krakow: Devin read the Clarion codebase, extracted business logic into user stories for analysts to review, and translated the validated logic into C#. Tomasz Chuma, a backend .NET developer and team leader on ERP XL, was on the pilot from the start.
"From the first days, we were impressed. It really does the job — and even when something occurs along the way, we deal with it with Devin itself. It can help with almost every problem, even fixing its own work."
— Tomasz Chuma, Backend .NET Developer and Team Leader, ERP XL
The pilot proved that AI could understand an undocumented 20-year-old legacy language well enough to anchor an enterprise transformation.
From pilot to operating model
Comarch onboarded 100 people onto Devin in January and stood up a Center of Excellence in February to operationalize Devin across the whole development lifecycle. The team pulled Devin beyond the backend into frontend, QA, and UX work. When early frontend results were good but not perfect, they created a context file that gives Devin everything it needs to implement a frontend feature, from the business analysis to the Figma mockups. Results improved immediately. Playbooks, written knowledge, and Jira and GitHub integrations now let new teams join the transformation and work the same standardized way from day one.
The organizational change went deeper than training. Comarch restructured its delivery teams from classical scrum teams of seven or eight people into taxi teams: a full-stack developer, a fractional business analyst, and a fractional quality engineer, with Devin as the driver. Developers largely stopped writing lines of code; they manage prompts and playbooks, set the architecture, and review Devin's output.
"When I have a lot of meetings, I can tell Devin what to do between them. While I'm in the meeting, he's doing the work, and I check on him when I have time."
— Tomasz Chuma, Backend .NET Developer and Team Leader, ERP XL
Business analysts drive the front of the pipeline directly in Devin. Kamila Niedźwiedź-Blok, a business analyst on ERP XL, picks an epic from the modernization roadmap, has Devin investigate the legacy application, and asks it for an implementation plan that breaks the epic into user stories — created directly in Jira, reviewed by her, and passed to developers, with child sessions running several tasks in parallel.
"We treat Devin as an autonomous teammate who plans complex tasks for us. To be honest, I forgot how it was before."
— Kamila Niedźwiedź-Blok, Business Analyst, ERP XL
What the numbers show
The clearest result is the schedule itself: a five-year modernization compressed to 18 months, with modernized ERP XL functionality now reaching customers month by month. Business analysis for new functionality dropped from more than 15 man-days to 2–3 days, median epic cycle time fell 83%, from 80.5 days to 13.5, and monthly merged pull requests grew 2.8x year over year.
Quality moved in the same direction: automated test coverage on the transformed system rose from 60% to nearly 100%, with Devin generating and maintaining the tests. Jarosław Olsza, who has been at Comarch for 25 years and leads the transformation of the ERP XL business, put it in perspective.
"The shift we've done last year was the biggest I've ever experienced. During the last year, more things happened than in the last five or ten years. And during the last six months, more happened than during the last year."
— Jarosław Olsza, Comarch
What comes next
Within 18 months, ERP XL customers get a completely new cloud web interface with the existing functionality, new AI capabilities, and the backlog of modules the team never had capacity to build. Maślaniec frames the internal ambition as making Comarch as AI-native as a company with a 30-year legacy can be: every employee using AI in their daily work, and product functions that customers click through today running autonomously as agents. Stachlewski's measure of success is how quickly an idea becomes value in a customer's hands.
"In the past, it was months or years. Now the market expects that when you have an idea, it should be days, sometimes hours."
— Tomasz Stachlewski, CTO
His advice to other technology leaders is to start before every question is answered.
"Just jump on the train. You won't have all the answers at the beginning — don't try to have them. If you wait at the station for all the answers, the train will already be in a different city."
— Tomasz Stachlewski, CTO