Code Ownership: Who Should Own What and Why It Matters
Apply code ownership best practices with stewards, backups and CODEOWNERS. Set review requirements, share expertise and check for bottlenecks across modules.
A 2011 study by Bird and colleagues examined Windows Vista and Windows 7. It found relationships between ownership measures, including low-expertise contributors and the top owner's contribution share, and software faults and failures. Its scope does not establish a universal defect multiplier for every contributor count.[1]
That sounds like a slam-dunk argument for strong ownership. One person owns each module, they know it deeply, and the code stays clean. Except there's a catch: strong ownership creates knowledge silos, reduces your bus factor, and can turn senior engineers into bottlenecks.[2]
I spent three years arguing for strong ownership. Then I spent two years arguing for collective ownership. Both were wrong. The answer is a hybrid model that I call Stewardship, and it took me five years of mistakes to figure it out.
One person (or a small team) owns each module. All changes go through them. They set the conventions, review every PR, and are responsible for quality.
Pros: Consistent code style. Deep expertise. Fast code review because the reviewer knows the codebase intimately. Lower defect rates within the module.
Cons: Bottleneck on the owner. Knowledge silo. The owner burns out or becomes a single point of failure. Changes that cross module boundaries require coordination between multiple owners, which slows everything down.
Everyone owns everything. Any developer can change any code. The codebase is the team's shared responsibility.
Pros: No bottlenecks. No knowledge silos. Maximum flexibility for task assignment.
Cons: Inconsistent conventions (everyone has different preferences). Diffuse responsibility (if everyone owns it, nobody owns it). Higher defect rates because changes are made by people with less context. "Tragedy of the commons" for code quality.
Figure 1. Share implementation knowledge while keeping review responsibility visible.
Every module has a steward, but anyone can make changes. The codebase understanding guide explains how a contributor builds the context needed for that work. The steward's job isn't to gatekeep. It's to guide. They set conventions, review PRs (but aren't the only reviewer), mentor others on the module, and ensure architectural consistency.
The critical difference from strong ownership: the steward actively transfers knowledge. Their goal is to make themselves replaceable, not indispensable.
Listing the steward first and the backup second is a convention for this team, not a GitHub hierarchy. CODEOWNERS requests reviews from matching owners. Configure required code-owner review through branch protection or a ruleset, and check its approval and bypass settings separately.[3][4]
This is the most important and most commonly skipped step. Rotate stewardship every 6-12 months. The backup becomes the steward. The steward becomes a contributor. A new backup is trained.
Rotation is one way to address knowledge concentration. If Marcus is the payments steward for three years, you're back to strong ownership in all but name.
# My Contrarian Take: The Shared Module Needs the Strongest Ownership
Most teams apply strong ownership to business-critical modules (payments, auth) and collective ownership to shared code (utilities, common components, infrastructure). I think this is backwards.
The shared module is the one that needs the strongest stewardship. Here's why: shared code affects everyone. A bad abstraction in a utility function propagates across the entire codebase. An inconsistent pattern in the shared component library creates confusion in every team that uses it.
I've seen shared modules become dumping grounds. "I don't know where to put this function. I'll put it in utils." Nobody pushes back because nobody owns utils. Over time, utils grows to 3,000 lines of unrelated functions with no consistent naming, no tests, and no documentation.
Assign your best architect as the steward of the shared module. Give them veto power over additions. Require that every function in the shared module has tests and JSDoc comments. The shared module should have the highest quality bar in the codebase, not the lowest.
1. Review latency by module. How long does it take for a PR in each module to get its first review? If one module consistently takes 3x longer than others, its steward might be a bottleneck.[5]
bash
# List review records for recent merged PRs that touched a pathgh pr list --state merged --json number,reviews,files --limit 50 | \ jq '.[] | select(any(.files[]; .path | startswith("src/payments/")))'
2. Contributor diversity. How many different people have committed to each module in the last 3 months? If it's just the steward, knowledge isn't being distributed.[6]
3. CODEOWNERS coverage. What percentage of your codebase is covered by CODEOWNERS? Uncovered directories are no-man's-land where quality degrades.
4. Backup readiness. Can the backup steward handle a production incident in their module without the primary steward? Test this by having the backup take on-call for one sprint.
Use this to decide the right ownership model for each part of your codebase:
Factor
Strong Ownership
Stewardship
Collective
Regulatory/compliance code
Yes
Core business logic
Yes
Feature modules
Yes
Shared utilities/libraries
Yes (senior steward)
Internal tools
Yes
Prototypes/experiments
Yes
Documentation
Yes
Regulatory code (payment processing, healthcare data, financial reporting) benefits from strong ownership because compliance requires accountability. Feature modules benefit from stewardship because they need both quality and velocity. Internal tools and prototypes benefit from collective ownership because speed matters more than consistency.
Mistake 1: CODEOWNERS without a process. Adding a CODEOWNERS file without defining what ownership means leads to confusion. Are owners gatekeepers or advisors? Define it explicitly.
Mistake 2: Too many owners. If a file has 6 owners, it has zero owners. Keep it to 2-3 per module: one steward, one or two backups.
Mistake 3: Never rotating. If the same person has been the steward for 2+ years, they've become a knowledge silo regardless of your ownership model.
Mistake 4: Ownership without authority. If the steward is responsible for quality but can't block a PR that violates the module's conventions, they're a figurehead. Give stewards the authority to match their responsibility.
Mistake 5: Confusing ownership with blame. When a bug is found in a module, the steward's job is to fix it or delegate the fix. It's not their fault the bug exists. If ownership is tied to blame, nobody will volunteer to steward anything.
Ownership is a social contract, not a technical configuration. CODEOWNERS files and review policies are the mechanism. The culture of stewardship, mentoring, and knowledge sharing is what makes it work.
Frequently asked questions
Does the first person in CODEOWNERS become the primary owner?
GitHub treats the listed names as code owners for that pattern. A steward-and-backup order can be a team convention, but the file does not encode a primary/backup hierarchy or assign different approval powers.
Does a CODEOWNERS file require approval before merging?
It requests reviews from owners for matching changes. Required approval is a separate branch protection or ruleset setting. Check those settings and bypass permissions when you need owner review to block a merge.
How is stewardship different from exclusive ownership?
The steward guides conventions and review while helping others learn the module. Other contributors can propose changes, and a capable backup shares responsibility. The process aims to keep expertise from depending on one person.
Which measurements show that ownership is becoming a bottleneck?
Compare review waiting time, contributor participation and backup readiness by module. A count alone will not explain a delay. Inspect the work and ask whether the team has enough qualified reviewers for the changes.
No single person can hold a large codebase in their head. A knowledge graph externalizes understanding into a queryable structure. Here's the 4-week playbook to build one.
Choose code search tools for text, symbols and cross-repository exploration. Use ripgrep, GitHub and Sourcegraph queries to find code and related changes.
Apply developer documentation best practices with ADRs, comments and tested examples. Use the WRITE system to keep changes reviewable and find stale guidance.
Compare monorepo vs polyrepo trade-offs for code discovery, ownership and shared contracts. Use practical search and change tasks to assess your own team.