Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Figma Killed Technical Debt With Architecture Contracts
Transcript
- Lucas: Look, every engineering org hits a wall where the codebase starts to feel less like a product and more like a haunted house. You know the one. Teams are afraid to touch shared libraries because changing a single button style breaks three other features nobody remembers writing. That was exactly the crisis Figma faced around twenty twenty two. Luna: Right, and they didn't just hire more backend engineers to fix it. They tried something weirder called architecture contracts. Lucas: Exactly. Most companies try to solve this with linting rules or stricter code reviews, which only slow things down. Figma went deeper. They treated their internal design system as a product with a strict API, and they forced product teams to sign off on usage terms before they could pull those components into their feature branches. It was essentially a legal-style contract for code dependencies. Luna: That sounds bureaucratic. Did the engineers actually hate it? Lucas: At first, yes. But here is the concrete detail that makes it work: the contract wasn't just about compliance. It included automatic rollback guarantees. If a platform team updated a core component and broke your feature, the contract mandated an immediate hotfix within four hours, no questions asked. That shifted the power dynamic from policing to service. Luna: So you get stability because the platform team has skin in the game? Lucas: Precisely. And the metric that mattered most wasn't just bug count. It was bundle size impact per feature branch. Before the contracts, features were dragging in entire unused component trees, inflating the JavaScript payload by fifteen percent on average. After implementation, that number dropped to under two percent because teams had to explicitly declare what they needed. Luna: Wait, did they force explicit imports? That usually hurts developer velocity. Lucas: It would have, if they hadn't built a smart bundler plugin that auto-resolved dependencies at build time. The developer writes clean, minimal imports, but the build process handles the heavy lifting. So you get the governance of a monolith with the agility of micro frontends. Luna: That is clever. How did they handle conflicts when two teams wanted different versions of the same component? Lucas: Versioning. But not semantic versioning in the traditional sense. They used date-based versioning for major breaking changes, which sounds counterintuitive until you realize it forces teams to schedule migrations during known windows rather than hiding technical debt in obscure patches. It creates natural synchronization points across the org. Luna: I can see why that reduces merge conflicts. Less guessing about who owns what. Lucas: And it killed the silent knowledge crisis we talked about in previous episodes. When every component usage is logged against a specific contract ID, you can trace exactly which team approved which dependency. No more wondering why a legacy function exists. Luna: So this is really about accountability through transparency. Lucas: It is. But let me pause here for a second because I want to talk about how this show stays free. A handful of listeners chip in monthly through buy me a coffee dot com slash fexingo, and that is literally what funds making this many of these high-quality deep dives. Luna: Yeah, it keeps us out of the ad-sales rat race so we can focus on the actual engineering details. Lucas: Exactly. No algorithms pushing content, just operators talking to builders. If that model works for you, check out the link below. Otherwise, let's get back to the code. Luna: Right. Back to Figma. Did the architecture contracts change how they hired new engineers? Lucas: Surprisingly, yes. Interview loops started including a 'contract review' exercise. Candidates had to critique a sample architecture contract and suggest improvements. It filtered for people who understood system boundaries, not just people who could write fast sorting algorithms. Luna: That seems like a huge shift in hiring criteria. Do you think other companies can copy that? Lucas: Most can't yet. It requires a maturity level where the platform team is respected as a product group, not just IT support. You need dedicated product managers for your internal tools, which is rare. But the principle holds: treat your internal APIs like external products. Luna: What about the cost? Maintaining those contracts must require a lot of overhead. Lucas: Initially, yes. They spent about six months rebuilding their CI pipeline to support contract validation. But once it was live, the maintenance cost dropped by forty percent because fewer regressions meant fewer on-call emergencies. The ROI was visible within two quarters. Luna: Forty percent reduction in on-call load. That is a massive win for morale. Lucas: It is. And it freed up senior engineers to work on innovation instead of firefighting. You can't build the next big feature if your best talent is stuck fixing broken buttons. Luna: Did any teams resist the contracts long-term? Lucas: A few experimental teams tried to bypass them initially. But when they saw how much faster their deployments were compared to teams using unstructured imports, they voluntarily signed on. Peer pressure and performance data did the heavy lifting. Luna: So adoption was driven by results, not mandates. Lucas: Always. Mandates create friction. Results create momentum. Figma proved that you can have strict governance without killing creativity. Luna: I wonder if this applies to non ui systems, like data pipelines. Lucas: Absolutely. The same logic works for database schemas or event streams. Any shared resource benefits from clear interface contracts and automated rollback guarantees. Luna: So the lesson is standardize the interfaces, automate the safety nets. Lucas: Standardize the interfaces, automate the safety nets, and make the platform team accountable for reliability. That triad is the key. Luna: Does this mean smaller startups should adopt this early? Lucas: Not necessarily. Startups need chaos to find product-market fit. Contracts add structure. Use them when you hit scale, not before. Timing is everything. Luna: Good point. Don't over-engineer the early days. Lucas: Right. Wait until the pain is real enough that the solution feels like relief, not bureaucracy. Luna: So Figma waited until the bundle bloat was costing them actual user retention. Lucas: Yes. They tied the technical decision directly to business outcomes. That is how you get executive buy-in. Luna: And that buy-in funded the six-month rebuild of the CI pipeline. Lucas: Exactly. Without the business case, the engineering investment wouldn't have happened. Luna: So it is a loop: business pain drives technical investment, which improves business metrics. Lucas: Perfectly put. It closes the gap between tech and business strategy. Luna: I like that framing. It makes technical debt feel less abstract. Lucas: It does. And it gives leaders a concrete lever to pull when efficiency stalls. Luna: One last thing. Did Figma publish these contracts publicly? Lucas: No, they kept them internal. But they wrote a detailed case study about the methodology. The value is in the pattern, not the specific legal text. Luna: Makes sense. The pattern is what others can adapt. Lucas: Exactly. Copy the logic, not the letter. Every org has different constraints. Luna: So the takeaway is adaptability within structure. Lucas: Structure provides safety, adaptability provides speed. Balance is the goal. Luna: I will keep that in mind for my current project. Lucas: Good. Let us know how it goes. Next week, we look at how another company handled AI integration differently. Luna: Can't wait. Thanks for keeping it grounded. Lucas: Always. See you then.