#pizza cli
BekahHW
5 mins read
A couple of weeks ago, I came across this Reddit post where a developer was trying to navigate a challenge that many of us in the tech community have also faced: managing code ownership in a large, complex codebase.
With over 100 developers and a massive repository, they were looking for a way to automate the creation of a CODEOWNERS file. Their hope? To automatically assign ownership based on who had worked on each file.
Not everyone in the comments was on board with this idea, calling out that this could be a recipe for disaster. You’re not wrong to be cautious, but let’s not dismiss the underlying need. The OP’s question points to a real issue in the tech industry: how do we manage knowledge and responsibility as the codebase and teams grow?
If you want to see a complex codebase, Kubernetes is a great example, with contributions from thousands of developers across hundreds of organizations. How do they manage it? They use an OWNERS file system that’s been tested and refined over the years.
The Kubernetes approach is about creating a map of expertise, facilitating code reviews, and making sure changes are reviewed by the right people. This system recognizes that in a project of that scale, no single person can know everything. The solution is to create a culture of shared responsibility and continuous learning.
Here’s the thing: what works for Kubernetes might not work for every team. And that’s okay. The key is to understand the principles behind the system and adapt them to work for your team.
When you implement solutions like automated CODEOWNERS generation, keep in mind to:
Ensuring that each part of the codebase has an expert responsible for its maintenance and review, effectively helps to manage the hidden debt of lost knowledge.
Let’s take a look at what knowledge debt costs us:
Every time a developer writes a line of code without clear ownership, every time a key team member leaves without transferring their knowledge, the debt grows and the culture weakens. It compounds over time, making each new feature more costly, each bug more time-consuming to fix, each team interaction less effective. The debt of lost knowledge is often invisible, and we often don't realize it until we're in a crisis.
Eventually, every debt comes due. In tech, this often comes during critical moments:
These are the moments when companies often realize the real cost of their knowledge debt. But by then, it's often too late for an easy fix.
This is where tools like the CODEOWNERS file come into play. Think of it as a map of expertise for your codebase. But not just any map – a living, breathing document that evolves with your team.
At OpenSauced, we’ve taken this concept to the next level with our pizza-cli codeowners command. It's not just about assigning arbitrary owners to directories. This tool identifies who has the most relevant and recent expertise for each part of your codebase.
What sets it apart is its granularity and balance. It assigns up to three "owners" for each file or directory. Pair this with our pizza GitHub Action, and you've got a system that keeps your expertise map up-to-date automatically. You can learn more about how to get started in Introducing the Pizza CLI.
Generating your CODEOWNERS file using the pizza generate codeowners
command automatically creates or updates a CODEOWNERS file, mapping files to the appropriate owners.
Beyond just managing debt, the codeowners command helps create a culture of responsibility and expertise. It makes code ownership visible and actionable, encouraging developers to take pride in their areas of responsibility and seek out opportunities to share their knowledge.
It's not hard to accumulate knowledge debt in the name of quick wins and feature delivery. But like any form of debt, ignoring it only makes the problem worse-not just for your codebase, but for your entire engineering culture.
By recognizing knowledge debt for the serious threat it is, and utilizing tools like the pizza cli to manage it, teams can ensure they're building on a solid foundation. They're not just writing code—they're cultivating a culture of ownership, expertise, and collaborative learning.
Remember, every line of code you write is a promise to your future self and your team. Make sure it's a promise you can keep by managing your knowledge debt and creating a culture of knowledge sharing today. The codeowners
command is more than just a tool—it's a step towards a more sustainable and efficient development process, and a more collaborative engineering culture.
Bekah graduated from a coding bootcamp in May of 2019 and since then has spent time as a frontend developer, started the Virtual Coffee tech community, spent time in DevRel and has continued to mom her four kids. She currently co-hosts the Compressed.fm and Virtual Coffee podcasts, lifts heavy things in her free time, & works as the Developer Experience Lead at OpenSauced.
Recent Posts
BekahHW
6 mins read
Understand the important role of transparency in open source through the PearAI and Continue.dev case study.
#pizza-cli
BekahHW
6 mins read
Discover the hidden costs of siloed knowledge in developer culture and how embracing shared ownership and tools like the CODEOWNERS file can enhance t...