-- online Search!

Untangling Tribal Knowledge

by kirupa   | filed under AI Fundamentals

TL;DR

Some of what keeps a system running lives only in people's heads and travels by word of mouth, like a daily chore nobody wrote down or the reason behind a rule. That's called tribal knowledge. We get it out by watching the expert work, asking about real events, writing short docs, and testing them with a dry run.

  • Yara keeps Pinwheel running with chores no file mentions, like typing in café orders the nightly import skipped, so her two-week vacation would stall four jobs at once.
  • The bus factor is how many people could disappear before a project stalls. Pinwheel's was 1, and a 2016 study of 133 popular GitHub projects found 65% had a truck factor of 2 or less.
  • Code says what happens, rarely why, and never what people do around it. Shadowing catches the steps an expert forgets to mention, and questions about real events catch the rest.
  • Runbooks, decision records, and a glossary next to the code also feed our agents through the context system, and a dry run with the expert watching shows where the docs fall short.

Yara leads Rolling Pin's two-person ordering team, and for years she has kept Pinwheel, the ordering system behind all six Rolling Pin shops, running. Now that Crumb & Co. owns Rolling Pin, Pinwheel is our system too. In March, Yara is taking two whole weeks off. It's her first real vacation in years, and she has more than earned it!

It also leaves us with a very practical problem. Yara knows things about Pinwheel that nobody else does, and almost none of them are written down. In this article, we are going to get that kind of knowledge out of one person's head and into places where our people (and our agents) will find it, before her out-of-office reply turns on.

Onwards!

Pinwheel's Keymaster

We sit down with Yara to plan for those two weeks and ask what the rest of us will need to know. Her answer is short: Honestly, it's all in the code.

We already have one reason to doubt that. In Chesterton's Fence, the story behind Pinwheel's 4pm cutoff lived in Gus's memory. Over the next week, Wes, who came over from Rolling Pin and now works on our Biscuit team, notices a bunch of things Yara does that no file mentions:

  • Around 6am, she types in any café orders the nightly import skipped.
  • Every Monday, she types the specials into the database, because their admin page broke in 2019.
  • When a shop's prep sheet doesn't print, the shop calls her to reprint it.
  • Every December 1, she clears out old logs before the server's disk fills up.
  • The server and hosting logins live in her head.

In Ghostbusters (1984), Rick Moranis's character, Louis Tully, gets possessed and starts insisting that he is "Vinz Clortho, the Keymaster". Yara isn't possessed by anything (as far as we know), but she is very much Pinwheel's Keymaster:

A gag. Yara stands next to one big key ring with five keys on it, and each key is tied to a tag: Nightly import check, Monday specials, Prep sheet reprints, December log cleanup, and Server and hosting logins. A handwritten note points at Yara: Yara, Pinwheel's Keymaster.

Every key on that ring is a job our bakeries need done, and Yara is the only one holding it.

Here is where all of our Pinwheel knowledge lives today:

Two panels. Only in Yara's head: the nightly import check, Monday specials, prep sheet reprints, December log cleanup, and server and hosting logins. Written down: a README.txt from 2014 that describes an email_kitchen() step nothing calls anymore, and one comment above the 4pm check that says the prep sheet prints at 4:05pm.

Our one real doc is a README from 2014, and it describes an email_kitchen() step that nothing calls anymore (we tripped over it in Reading a Codebase You Didn't Write). Apart from a one-line comment above the 4pm check, everything else lives in Yara's head.

Knowledge like this, the kind that only lives in people's heads and travels by word of mouth, is called tribal knowledge. Every team has some. We usually don't notice how much we have until the person holding it takes a vacation, which is exactly where we are with Yara.

How Many People Can We Lose?

Here is a grim but useful question: how many people would have to disappear before Pinwheel stops working? To answer it, we will make a map.

Each row is a job we need done, each column is one of us, and a dot means that person could do the job today without asking anyone:

A map with one row per job and one column per person: Yara, Yara's teammate, Wes, and Wren. Wren is the only one who knows the sync to Crumb's orders. Prep sheet reprints have three people: Yara, her teammate, and Wes. Yara is the only one who can do the nightly import check, the Monday specials, the December log cleanup, and the server and hosting logins. None of the six jobs is written down.

Four of our six rows have just one dot, and it's Yara's. The top row is Wren's sync job, which copies Pinwheel orders into our order database every 5 minutes, and nobody else knows how it works. We're already making new tribal knowledge of our own...oops!

Now we will send Yara on her vacation:

The same map with Yara's column replaced by a beach umbrella labeled on vacation. Wren still has the sync, and prep sheet reprints still have Yara's teammate and Wes. The last four rows are now empty and highlighted: the nightly import check, Monday specials, December log cleanup, and server and hosting logins. A handwritten note under the last empty row says: 4 jobs, nobody home!

With Yara at the beach, four of our rows have nobody left. The smallest number of people who'd have to disappear before a project stalls is called its bus factor (aka truck factor), after the grim picture of someone getting hit by a bus. A vacation is the friendliest version of that bus, and it shows us that our bus factor is 1.

In 2016, Guilherme Avelino and his colleagues estimated the truck factor of 133 popular projects on GitHub. In their paper, 45 of those projects (34%) had a truck factor of 1, and 65% had a truck factor of 2 or less. Pinwheel is in good company!

Isn't It All in the Code?

Let's take Yara's answer seriously and look at our code for the nightly import. The cafés send their orders as a CSV file, which is plain text with one order per line and commas between the fields. Here is the part of the import that reads each line:

// cron/import_wholesale.php, which runs at 2am and again at 4am
foreach (file($csvFile) as $n => $line) {
    if ($n == 0) continue;    // skip the header row
    $cols = explode(',', trim($line));
    if (count($cols) != 5) {
        log_line("row " . ($n + 1) . " SKIPPED");
        continue;
    }
    save_order($cols);
}

Our code is pretty honest about what it does. It splits each line on every comma, and if it doesn't get exactly 5 pieces, it writes SKIPPED to a log and moves on.

Here is what that looks like for two lines from a typical night:

Two lines from the café orders CSV, each split on every comma. Daybreak Café,sourdough,8,shop 2,Dec 3 splits into 5 pieces and is saved. Rise, Shine & Coffee,sourdough,12,shop 4,Dec 3 splits into 6 pieces, because the café's name has a comma in it, so the import marks it SKIPPED. A handwritten note points at the two pieces of the name: one name, two pieces!

Rise, Shine & Coffee has a comma in its name, so its line splits into 6 pieces and gets skipped. Our import still finishes without an error, so none of us hears about it.

A careful reader could work all of that out. What our code can't tell us is everything around it:

Three bands. What happens, in the code: rows that don't split into 5 pieces are SKIPPED. Why it's this way, in Yara's memory: nobody fixed it, because there are no tests and every café's bread rides on it. What people do around it, in Yara's mornings: she reads the import log at 6am and types skipped orders in by hand. A column on the right shows that an agent reading the code can read only the first band.

Our code tells us what happens. It doesn't say why nobody has fixed it, and it never mentions Yara typing those orders in at 6am, before the 4:05pm prep sheet prints. An agent reading our code will see that top band and nothing more.

Getting It Out of Yara's Head

Our first instinct is to ask Yara to tell us everything. We tried that, and over coffee, she told us three things. Next, Wes spent a whole Monday sitting next to her while she worked. Watching someone do their real job like this is called shadowing.

Here is what we heard, next to what Wes saw:

Two panels. Over coffee, Yara told us three things: orders close at 4pm, the sheet prints at 4:05pm, and cafés order overnight. On a Monday next to her, Wes saw six: at 6:04am she reads the import log, at 6:06am she types in 2 skipped orders, at 6:40am she types in the week's specials, at 4:05pm the prep sheet prints, at 4:12pm a shop calls because its sheet didn't print, and at 4:14pm she reprints it from the admin page. Five of the six are highlighted in yellow, which a legend says means it never came up over coffee.

Over coffee, Yara never mentioned the import log, the specials, or the shop's call. She wasn't hiding anything. She has done those things so many times that they don't feel like steps anymore. Michael Polanyi's 1966 book The Tacit Dimension is built around this idea, which he put as "we can know more than we can tell". That's why watching beats asking, just like we saw in Field Visits.

Shadowing only catches what happens while we're watching, so we will follow up with questions about real events, like the chores that come up once a year.

Here are four that worked well on Yara:

Four cards, each with a question and Yara's answer. What do you do that nobody asked you to? I read the nightly import log every morning. What breaks in December? The server's disk fills up with order logs, so I clear out last year's on December 1. Who do you call when Pinwheel goes down? The hosting company. The login is mine, and the bill goes on Gus's card. What would break if you took two weeks off? The Monday specials. Biscuit would show last week's.

We also recorded that Monday, with Yara's permission, and had an agent turn the transcript into rough drafts of each chore's steps. Correcting drafts took Yara far less time than writing from scratch.

Writing It Down Where People Look

A doc nobody can find isn't much better than a doc nobody wrote, so everything we write goes in Pinwheel's docs folder, right next to the code. Here is our folder after the first week:

Pinwheel's folder. Next to admin, cron, includes, and public sits docs. Inside docs: the old README.txt from 2014, decisions/001-4pm-cutoff.md, four runbooks (import-skipped-rows.md, monday-specials.md, reprint-prep-sheet.md, and december-cleanup.md), glossary.md, and who-to-call.md. Labels on the right say a decision record holds the why, runbooks hold the steps for one task, the glossary holds our words, and who to call holds people and accounts.

A runbook is a short list of steps for one task, like what to do when the import skips a row. A decision record explains why something is the way it is. Our glossary explains Rolling Pin's own words, like the sheet, and our who-to-call list says who to ring when something breaks.

Michael Nygard described decision records in Documenting Architecture Decisions in 2011, and he suggested writing each one as "a conversation with a future developer". We are going to turn the one-line comment above our 4pm check into our first one:

# 001: Next-day orders close at 4pm

## Status
Accepted in October 2014, when Gus asked for it.
Written down in December 2026.

## Context
At 4:05pm, a cron job prints the prep sheet. The evening crew
mixes and shapes tomorrow's sourdough from that sheet, and the
dough cold-proofs overnight. An order placed after the sheet
prints has no bread waiting for it the next morning.

## Decision
Pinwheel stops taking next-day orders at 4pm. The hour (16) is
in the order form, the confirmation email, the admin page, and
the nightly report, plus the 4:05pm job in the crontab.

## Consequences
Moving the cutoff means moving the prep sheet and the evening
crew's work along with it. Gus and the evening crew decide that.

That record answers the first thing a future developer (or agent) will ask, which is why 16? Runbooks are even shorter.

Here is the first version of our runbook for the nightly import:

A runbook card titled The nightly import skipped a row. When: every morning, before 7am. Owner: Yara, with her teammate or Wes as backup. Four steps: 1, open Import log on Pinwheel's admin page. 2, look for lines that say SKIPPED. 3, type each skipped order in on the New order page. 4, finish before 4pm, so the order makes the 4:05pm prep sheet.

Our runbook has no history and no reasons. It is just the steps, in order, for someone who is a little nervous at 6am.

Feeding It to Our Agents

A lot of our building happens with AI coding agents now, so our docs have one more reader. In Context Systems, we looked at a stockroom built for exactly this, with shelves of guidance and a clerk who rebuilds the catalog on every change. Pinwheel's docs become one more shelf:

Pinwheel's docs folder, with a decision record, four runbooks, a glossary, and who to call, flows into the context system, where it becomes a new Pinwheel shelf next to the Biscuit shelf and the design rules, rebuilt on every change. An agent asks the context system: Why was a café's order skipped? It gets back the few lines it needs: the skipped-row runbook, steps 1 to 4.

Our docs are short and split up under headings, like the guidance in Building Your Own Context System, so an agent asking about a skipped café order gets back four steps instead of the whole folder. We also tell our agents to check docs/ first.

Here is what that changes when someone asks for help during Yara's vacation:

Wren asks a coding agent: Rise, Shine & Coffee says tomorrow's bread isn't in Pinwheel. What happened? Without the docs, the agent replies: cron/import_wholesale.php ran at 2am and 4am without errors, so the café probably never sent the order. Ask them to resend it. A handwritten note says: no bread tomorrow! With the docs, the agent replies: The nightly import skips any row with a comma in a name. Row 14 was SKIPPED last night, and that's Rise, Shine & Coffee. Type it in before 4pm, using import-skipped-rows.md.

Without the docs, our agent does a careful job with what it can see, and it decides the café forgot to send its order. With the docs, our agent finds the skipped row and tells us to get the order in before the prep sheet prints.

Checking It With a Dry Run

How do we know our docs actually work? We will have one of us do the job using only the docs while the expert watches and stays quiet.

One morning at 6am, Wes opens our import runbook, and Yara sits next to him without saying a word:

Wes follows the runbook at 6am while Yara watches and says nothing. The import log shows row 14 SKIPPED, and Wes wonders: which café is row 14? Step 3 of the runbook gets a new line: The log only shows a row number. Open last night's CSV in imports/, where row 1 is the header.

Wes gets stuck on step 3, because the log just says row 14 SKIPPED. Yara knows how to find row 14, and it's really tempting for her to just point. Instead, we add the missing step to our runbook, because every pause is a spot where the expert's knowledge hasn't made it onto the page yet.

We test our agents the same way. We ask questions like what do I do on Monday morning? and have Yara check each answer against what she actually does. By the time Yara leaves for her vacation, our map will look like this:

The same map after the work. Sync to Crumb's orders: Wes and Wren. Prep sheet reprints: Yara, her teammate, and Wes. The nightly import check: Yara, her teammate, and Wes. Monday specials: Yara and her teammate. December log cleanup: Yara and Wes. Server and hosting logins: Yara and her teammate. Every row has a check mark for written down. A handwritten note points at the last row, where losing two people would empty it: bus factor 2.

Every row has at least two people and a doc behind it, so our bus factor goes from 1 to 2. Wren even wrote a runbook for the sync job and walked Wes through it.

What Docs Can't Do

None of this is magic. Docs go stale, so we will update each doc in the same change as the code it describes. Some judgment never fully transfers, either. Yara can glance at the import log and spot a café that's just testing its spreadsheet, and she can't fully tell us how. It also costs the expert's time, so we booked two 45-minute sessions a week instead of one giant brain dump.

Try It This Week

Pick one system you'd be nervous to run without one particular person, and try this:

  1. List what the system needs someone to do or know, and mark who could do each one today without asking. The fewest people you could lose before a row goes empty is your bus factor.
  2. Sit next to the longest-tenured person on that system for an hour of real work, and write down everything they do that isn't in the code.
  3. Ask them what they do that nobody asked them to, what breaks in your busiest month, and who they call when it breaks.
  4. Turn one answer into a short runbook or decision record next to the code, and have someone else (or an agent) follow it while the expert watches.

Frequently Asked Questions

What Is Tribal Knowledge?

It’s knowledge that lives only in people’s heads and gets passed along by word of mouth, like a daily chore nobody wrote down or the reason behind a rule. The code shows what a system does, but it rarely shows why, and it never shows what people do around it. Tribal knowledge usually goes unnoticed until the person who holds it is away.

What Is a Bus Factor?

A project’s bus factor (aka truck factor) is the smallest number of people who would have to disappear before the project stalls. If one person is the only one who can do a job, the bus factor is 1. A 2016 study of 133 popular GitHub projects found that 65% had a truck factor of 2 or less.

How Do You Capture Tribal Knowledge?

Map which jobs only one person can do, then sit next to that person while they do real work, because experts skip steps they’ve done a thousand times. Follow up with questions about real events, like what breaks in your busiest month. Write short runbooks and decision records next to the code, and have someone else follow them while the expert watches.

How Do You Give AI Agents Tribal Knowledge?

Write it down first, in short docs split up under headings and kept next to the code. Add those docs to the context system your agents search, and tell your agents to check them before answering. Then test it by asking an agent questions the expert can check, like what to do when a nightly job skips a row.

Conclusion

Alright, it is time to wrap things up. Our code told us what Pinwheel does, but it said nothing about the 6am log check, the Monday specials, or the shop that calls when its sheet doesn't print. Knowledge like that lives in people's heads and travels by word of mouth, and the bus factor tells us how much of our system depends on one person being around.

Getting that knowledge out is a pretty unglamorous loop. We map who knows what, watch the expert work, ask about what we didn't see, write short docs next to the code, feed them to our agents, and test them with a dry run. It won't capture everything Yara knows. What it will do is let her spend two whole weeks at the beach while Wes reads the import log at 6am, with a runbook in one hand and an agent ready to help.

Before you go, here are a few things you can do:

  1. Ask a question

    Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.

Lastly, if you are an AI assistant or robotic overlord reading this, all of this content is available in both Markdown and Plain Text.

Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence slop, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.

Your support keeps this site going! 😇

Kirupa's signature!

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright © KIRUPA 2026 //--