One of Nubank’s most critical, company-wide projects for 2023-2024 was a migration of their core ETL — an 8 year old, multi-million lines of code monolith — to sub-modules. To handle such a large refactor, their only option was a multi-year effort that distributed repetitive refactoring work across over one thousand of their engineers. With Devin, however, this changed: engineers were able to delegate Devin to handle their migrations and achieve a 12x efficiency improvement in terms of engineering hours saved, and over 20x cost savings. Among others, Data, Collections, and Risk business units verified and completed their migrations in weeks instead of months or years.
Nubank was born into the tradition of centralized ETL FinServ architectures. To date, the monolith architecture had worked well for Nubank — it enabled the developer autonomy and flexibility that carried them through their hypergrowth phases. After 8 years, however, Nubank’s sheer volume of customer growth, as well as geographic and product expansion beyond their original credit card business, led to an entangled, behemoth ETL with countless cross-dependencies and no clear path to continuing to scale.
For Nubankers, business critical data transformations started taking increasingly long to run, with chains of dependencies as deep as 70 and insufficient formal agreements on who was responsible for maintaining what. As the company continued to grow, it became clear that the ETL would be a primary bottleneck to scale.
Nubank concluded that there was an urgent need to split up their monolithic ETL repository, amassing over 6 million lines of code, into smaller, more flexible sub-modules.
Nubank’s code migration was filled with the monotonous, repetitive work that engineers dread. Moving each data class implementation from one architecture to another while tracing imports correctly, performing multiple delicate refactoring steps, and accounting for any number of edge cases was highly tedious, even to do just once or twice. At Nubank’s scale, however, the total migration scope involved more than 1,000 engineers moving ~100,000 data class implementations over an expected timeline of 18 months.
In a world where engineering resources are scarce, such large-scale migrations and modernizations become massively expensive, time-consuming projects that distract from any engineering team’s core mission: building better products for customers. Unfortunately, this is the reality for many of the world’s largest organizations.
At project outset in 2023, Nubank had no choice but to rely on their engineers to perform code changes manually. Migrating one data class was a highly discretionary task, with multiple variations, edge cases, and ad hoc decision-making — far too complex to be scriptable, but high-volume enough to be a significant manual effort.
Within weeks of Devin’s launch, Nubank identified a clear opportunity to accelerate their refactor at a fraction of the engineering hours. Migration or large refactoring tasks are often fantastic projects for Devin: after investing a small, fixed cost to teach Devin how to approach sub-tasks, Devin can go and complete the migration autonomously. A human is kept in the loop just to manage the project and approve Devin’s changes.
A task of this magnitude, with the vast number of variations that it had, was a ripe opportunity for fine-tuning. The Nubank team helped to collect examples of previous migrations their engineers had done manually, some of which were fed to Devin for fine-tuning. The rest were used to create a benchmark evaluation set. Against this evaluation set, we observed a doubling of Devin’s task completion scores after fine-tuning, as well as a 4x improvement in task speed. Roughly 40 minutes per sub-task dropped to 10, which made the whole migration start to look much cheaper and less time-consuming, allowing the company to devote more energy to new business and new value creation instead.
Devin contributed to its own speed improvements by building itself classical tools and scripts it would later use on the most common, mechanical components of the migration. For instance, detecting the country extension of a data class (either ‘br’, ‘co’, or ‘mx’) based on its file path was a few-step process for each sub-task. Devin’s script automatically turned this into a single step executable — improvements from which added up immensely across all tens of thousands of sub-tasks.
There is also a compounding advantage on Devin’s learning. In the first weeks, it was common to see outstanding errors to fix, or small things Devin wasn’t sure how to solve. But as Devin saw more examples and gained familiarity with the task, it started to avoid rabbit holes more often and find faster solutions to previously-seen errors and edge cases. Much like a human engineer, we observed obvious speed and reliability improvements with every day Devin worked on the migration.
“Devin provided an easy way to reduce the number of engineering hours for the migration, in a way that was more stable and less prone to human error. Rather than engineers having to work across several files and complete an entire migration task 100%, they could just review Devin’s changes, make minor adjustments, then merge their PR”
Jose Carlos Castro, Senior Product Manager
Linktree's mission is to empower anyone to own, grow, and monetize their digital presence. There are 50M+ creators and businesses using it.
Linktree’s mission is to empower anyone to own, grow, and monetize their digital presence. There are 50M+ creators and businesses using it. While the product may appear simple, it has lots of rich functionalities and it’s integrated with hundreds of partners to help people grow their audiences, sell products, and streamline their creative processes.
We at Linktree are optimistic about the power of AI to unlock greater velocity and value for creators, and the engineering team is always seeking the best AI tools available. That’s why we started exploring Devin as soon as it became generally available.
Over the past month Devin has authored ~300 PRs and merged ~100. Most of these are fixing customer-reported bugs, implementing small features, and prototyping larger features.
To support creators, Linktree is continually evaluating what new social media platforms to add. For example, the team recently discussed adding support for RedNote and Lemon8, given their recent rise in popularity. Before Devin it would have taken the team some time to debate the priority and trade-off to take on this task. However, giving it to Devin meant skipping the lengthy prioritization process to simply see what would happen.
Adding a social platform is conceptually straightforward but it involves a few PRs spanning multiple repos; for example, the database persistence, URL parsing and validation, updating the component library and the UI repos that surface the social icon. Linktree kicked off five Devins, one for each repo and PR.
The prompt for each Devin is pretty simple:
In some repos there are quite a few files to update, so we leverage the knowledge feature to teach Devin where to look:
The team provided some guidance to Devin about the URL format to expect from these platforms, and fixed up an issue with SVG rendering, and shipped it on the same day:
Since Linktree plans to implement many more integrations like this in the future, it’s important to streamline the workflow even more. For example, instead of manually managing multiple Devins for complex changes, the team wanted Devin to be able to compose a series of PRs on its own. After a quick discussion with Cognition team, they shared a Playbook script that leverages the Devin API to automatically spawn multiple Devins to implement the entire feature, which Linktree was able to leverage right away:
For some tasks Devin can nail it in one shot and it feels like magic. But it also struggles with a lot of tasks, so the key is for the team to develop the intuition on what tasks are the best candidates for Devin.
Once we find a type of common task that works well, we try to operationalize it. For example, Devin has a very good success rate with instrumenting analytics event tracking. We are able to eliminate this significant workload from all feature work by leveraging Devin and keep refining the same prompt.
Understand what tasks to give Devin can be challenging, but the Linktree team learned it’s about:
It’s been better to use Devin liberally for tasks that can be completed by an engineer within a couple of hours, rather than overthink the types of tasks to give Devin upfront. Devin usually produces a complete or partially useful PR, and if not then there wasn’t much time scoping and prompting lost.
Sometimes the team lets Devin work on new features, even though it’s likely to struggle. Devin’s attempted solution could still serve as a useful proof of concept. For example, the team recently needed a cron job in our legacy PHP backend to notify users about expiring social connections. Our limited PHP expertise made scoping the change time-consuming, so we asked Devin to implement it. That attempt led to a productive design discussion after which the team was able to provide more concrete guidance and completed the change.
Linktree’s main advice on how to work with Devin:
Linktree is excited about the future as Devin and the AI models continue to improve. Before Devin a lot of these bugs / features wouldn’t have made the cut in our team prioritization / scheduling. Now before spending any time debating about the priority the team asks: Can I just Devin it?