Our vision for better code ownership
Code ownership today is broken. We're setting out to fix it.

Code ownership today is broken. We're setting out to fix it.
A few months ago, we started exploring how Sourcegraph could help manage code ownership. For a few years, we'd been hearing from customers that having code ownership integrated within the code intelligence platform would solve many important problems and work hand in hand with Code Search, Batch Changes, and Code Insights.
But we realized there is a lot more to the space and that code ownership tooling is kinda broken:
To paraphrase a customer, "CODEOWNERS alone is a solution for small companies. There's no enterprise solution that works at scale."
What is code ownership, and why is it useful? Ownership is commonly defined as the one developer, or team of developers, who is responsible for a part of the codebase.
When we dug deeper with customers, we realized that code ownership doesn't mean the same thing for everybody. It actually can refer to two distinct things:
Code ownership also has wildly different importance for different-sized organizations. In very small organizations with a dozen developers, expertise is trivial to solve because one can easily ask around or take a quick look at the commit history. Accountability is trivial because when there's a problem, it's all hands on deck to fix it.
In larger teams, answering those two questions becomes hard.
The team grows all the time, and so does the codebase. Ownership needs to grow with the company. People join and leave or move around, so it's virtually impossible to mentally track who you can ask about parts of the code without a code ownership system. Looking at the commit history falls short because the committers might have left or moved, and the history tends to be noisy.
Tools like Sourcegraph help there because you can self-serve answers with Code Search! But that doesn't entirely replace finding someone you can ask about code, especially when onboarding, discovering a new system, or making abstraction or interface changes affecting many downstream teams. Studies have shown that code ownership correlates with code quality, substantiating the intuition that comprehensive code ownership coverage helps with keeping code quality high.
When there's a security vulnerability or an incident, finding who the first responders are is also a big bottleneck. A lot of the companies we talked to often have to resort to blasting large email announcements to find who needs to be involved in fixing things when the incident affects hundreds of repos and no clear owner is identified. This slows down remediation and often leads to resorting to the much-dreaded, always outdated spreadsheet to keep track of who needs to do what. Finally, in large teams, it's very likely someone's unavailable. Who's the next best person? Who can this be escalated to? Those questions are difficult to answer at scale: you can't just press a button and automatically escalate all the items that need attention.
Having a reliable, up-to-date code ownership system for accountable parties and experts answers those challenges.
We break down use cases for code ownership into 4 themes:
Most companies we talked to were either dissatisfied with off-the-shelf tooling or built their own ownership systems over the years.
Here's an overview of common problems:
We think there's a ton of potential to go a step further and build a radically better ownership system.
We're introducing a new feature, Sourcegraph Own, that'll radically improve over state of the art. Own will be an evergreen, scalable, automatically updated code ownership source of truth that knows about accountability and expertise and deeply integrates into productivity, incident response, platform changes, and capacity planning workflows.
We're working hard to bring those workflows to life:
Ultimately, we think that Own will be able to provide a powerful off-the-shelf alternative to the homegrown systems of many enterprise customers. But for customers that want to stick with their internal systems, great! Own can ingest existing ownership data and make it available in the Sourcegraph platform.
The first iteration of Sourcegraph Own will release as an experimental feature in Sourcegraph 5.0. Join our next Starship event on March 23 to learn more and be the first to try it. Meanwhile, here's a sneak peek.

With Sourcegraph, the code understanding platform for enterprise.
Schedule a demo