Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Salesforce Managed Technical Debt With Architecture Contracts
Transcript
- Lucas: If these conversations are useful for what you're building or running, a handful of listeners chip in monthly through buy me a coffee dot com slash fexingo, and that's literally what funds making this many of these. Luna: That is great to know because it means we get to keep doing deep dives like this without advertisers breathing down our necks. Lucas: Exactly. And speaking of keeping things stable, let's talk about one of the most painful problems in tech right now. It is not AI integration, and it is not hiring engineers. It is technical debt that has gone so far out of control that it starts eating your product roadmap alive. Luna: Right, because everyone talks about paying down debt, but almost nobody explains how you actually stop new debt from piling up while you are trying to ship features. Lucas: That is the key distinction. You can pay down old debt with overtime and weekend work, but if you do not fix the process that creates new debt, you are just bailing water out of a boat with a hole in the bottom. And I want to look at how Salesforce handled this around two thousand twenty three when they were facing a massive fragmentation problem across their platform. Luna: I remember reading some reports about that period where developers were complaining that the internal tools felt like they were built by different teams who never spoke to each other. Lucas: Precisely. The issue was that every business unit had built their own version of an API or a data model. So if Marketing needed to pull customer data, they built a connector. If Sales needed the same data, they built another connector. Within a few years, there were dozens of duplicate services, conflicting data definitions, and a maintenance nightmare that no single team could understand fully. Luna: So they had what we call distributed chaos where every team was optimizing for their own local speed but destroying global efficiency. Lucas: Yes, and the cost was staggering. They estimated that nearly thirty percent of their engineering capacity was being spent just trying to make these duplicate systems talk to each other. That is work that generates zero value for the customer. It is pure friction. And they realized that telling teams to stop building stuff would not work because the market was moving too fast. Luna: Because if you slow down development completely to clean up the codebase, your competitors will just eat your lunch in the meantime. Lucas: Exactly. So they did something interesting. They introduced what they called Architecture Contracts. Now, this is not just a fancy name for a meeting. It was a formalized agreement between the central platform team and the individual product teams. The platform team said, here are the standard ways you can store data, here are the standard security protocols, and here are the approved APIs you must use. Luna: But how did they enforce this without becoming the bottleneck that slows everyone down? Because usually, when you add a gatekeeper, innovation stalls. Lucas: That was the real challenge. They solved it by shifting the review point earlier in the process. Instead of reviewing code after it was written, they reviewed the design before a single line of code was written. They set up Architecture Review Boards, but these boards were staffed by senior engineers from the product teams themselves, not just central managers. Luna: So the people building the products were also the ones judging whether the designs fit the architecture. That changes the dynamic completely. Lucas: It does. Because now the reviewers have skin in the game. If they approve a bad design, they might end up maintaining it later. So they became much more rigorous about enforcing the contracts. And the contracts themselves were designed to be flexible. They defined the boundaries, but inside those boundaries, teams had total freedom to innovate. Luna: So it was like building a city with zoning laws. You can build whatever house you want, as long as it connects to the main grid and meets safety codes. Lucas: That is a perfect analogy. And the result was immediate. Within six months, they reduced the number of duplicate APIs by forty percent. Engineers stopped spending weekends debugging connectivity issues between mismatched systems. And because the data models were standardized, they could finally build better analytics tools on top of the platform. Luna: But I have to ask, did any teams push back? Because usually, when central leadership says you have to use our tools, the engineers feel like their autonomy is being taken away. Lucas: There was definitely pushback initially. Some teams felt like the contracts were too restrictive. But Salesforce handled this by giving the teams a clear path to request changes to the contracts. If a team had a valid reason why the standard API did not work for their use case, they could propose a new standard. And if the Architecture Board agreed, that new pattern became part of the official contract. Luna: So the rules were not static. They evolved based on actual usage patterns rather than theoretical assumptions made by a distant committee. Lucas: Right. This is crucial. Most companies fail at governance because they treat the rules as fixed law. Salesforce treated them as living documents. And this created a culture where engineers respected the architecture team because they knew their feedback could actually change the system. Luna: That makes sense. It turns governance into a collaborative process rather than a policing action. But what about the legacy systems? How did they deal with all the old duplicate APIs that were already in production? Lucas: They tackled that with a dedicated migration squad. This team was separate from the product teams. Their only job was to rewrite the critical duplicate services using the new standardized contracts. And they prioritized based on impact. If an old API was causing frequent outages or high support tickets, it went to the top of the list. Luna: So they used data to decide what to fix first, rather than just picking the easiest ones to refactor. Lucas: Exactly. And they gave the product teams a grace period. They told them, you can keep using your old API for six months, but after that, it will be deprecated. This forced the teams to prioritize the migration themselves, knowing that their custom solution was going away. Luna: That is smart pressure. It puts the responsibility back on the team that owns the service, but gives them enough time to plan it properly without disrupting customers. Lucas: Yes, and the key takeaway here is that technical debt is not just a code problem. It is a coordination problem. When you align incentives and provide clear standards, the code tends to clean itself up. The architecture contracts acted as the glue that held the organization together while it grew. Luna: I think a lot of smaller companies struggle with this because they assume they can just write good code and everything will be fine. But once you hit a certain scale, you need explicit agreements to keep the system sane. Lucas: Absolutely. You cannot rely on heroics at scale. You need systems. And for a lot of engineering leaders listening, the lesson is not to try to build a perfect architecture from day one. It is to establish enough guardrails early on so that when you do grow, you do not crash. Luna: So it is about setting the stage for future success rather than solving today's problems with tomorrow's constraints. Lucas: That is exactly it. You are buying yourself optionality. By having standard APIs and clear data models, you make it easier to swap out components, integrate new technologies, or even acquire other companies later on. Luna: Because integration becomes a matter of mapping standards rather than rebuilding the entire backend from scratch. Lucas: Precisely. And that reduces risk significantly. When you are dealing with acquisitions or major partnerships, having a clean architectural foundation is worth more than any single feature you could have shipped in the last quarter. Luna: It shifts the metric of success from how fast we can ship today to how easy it will be to ship next year. Lucas: And that is a mindset shift that separates mature engineering organizations from the rest. They measure their health by how hard it is to make changes, not just how often they make them. Luna: So the real victory for Salesforce was not just cleaning up their code, but changing how their engineers thought about building systems in the first place. Lucas: Right. They turned technical debt from a vague burden into a manageable operational metric. And that is something every CTO should aim for. Luna: I wonder if other large platforms are starting to adopt similar contract-based approaches now that the market is getting more competitive. Lucas: We are seeing more talk about internal developer platforms and self-service infrastructure, which is basically the evolution of this idea. The goal is always the same. Give teams the power to move fast, but give them the guardrails to stay safe. Luna: So the question for us is, what is the one rule we can put in place today that will save us headaches next year? Lucas: Probably defining one standard way to log errors or one standard way to authenticate users. Start small, but start with a contract. Luna: Simple, actionable, and it stops the fragmentation before it starts. Lucas: Exactly. And that is how you build a platform that lasts.