# A second brain for engineering teams keeps the why next to the code

> A second brain for an engineering team holds decisions, runbooks and postmortems outside the repo, where people and coding agents both read and write them.

Source: https://baalda.com/blog/second-brain-for-engineering-teams
Site: Baalda, https://baalda.com
Published: 2026-11-27

**Short answer.** A second brain for an engineering team is one shared place outside the repo for what code cannot say: why decisions were made, runbooks, incident notes, postmortems and onboarding context. Anything that must change in the same commit as the code stays in the repo. The rest lives where engineers and their coding agents both read and write it.

A [second brain](/blog/what-is-a-second-brain) for an engineering team is one shared place, outside the repo, where the team writes down why things are the way they are: decisions, runbooks, incident write-ups, onboarding notes and the context nobody puts in a commit message. The code says what the system does. The second brain says why, who knows, and what to do at 3am when it breaks.

Most engineering teams already have the raw material. It is spread across PR threads, a wiki nobody trusts, a folder of postmortems in someone's drive and the head of whoever has been there longest. Coding agents make the gap louder, because Claude Code or Cursor can read every file in the repo and still start each session with no idea why the team picked the queue it picked. I run our team's version in Baalda, an open source app that keeps a team's notes as plain markdown files on each person's disk, edited together in real time, with AI assistants reading and writing the same files over MCP. So Baalda is part of the answer below, and so are the places where it is the wrong tool.

## What goes in an engineering second brain, and what stays in the repo?

The useful split is not "docs" against "code". It is whether the text has to change in the same commit as the code it describes.

| Belongs in the repo | Belongs in the second brain |
|---|---|
| README, setup steps, API reference | Why the architecture looks the way it does |
| Config and code comments | Runbooks for on-call, written by whoever last ran them |
| Architecture decisions the team reviews in PRs | Incident notes and postmortems |
| `AGENTS.md` or `CLAUDE.md` for coding agents | Onboarding notes, glossary, who owns which system |
| Anything a build or test reads | Meeting notes, RFC drafts, vendor evaluations, dead ends |

If a doc goes stale the moment someone merges a change, keep it in the repo where review catches it. If it describes people, history, judgement or operations, it rarely changes in step with the code, and the repo is a poor home for it. Product managers, support and new hires should be able to read it without cloning anything.

Decision records sit on the line. Some teams keep them in the repo so every decision gets reviewed like code. Others keep them where the whole company can read them. Both are reasonable, and [the decision log template post](/blog/decision-log-template) covers the format either way.

## Why do engineering wikis go stale?

Because writing in them is a separate trip. The engineer who just fixed the outage has to open another tool, find the right page and remember the page exists. Usually nobody does, so the wiki describes the system as it was the last time someone had a free afternoon.

Three things keep a second brain alive instead:

- **Writing happens where the work happens.** The runbook gets updated during the incident, not after it.
- **The coding agent writes too.** If Claude Code can append to the runbook or draft the postmortem from the incident notes, the cost of writing drops to reviewing.
- **The format outlives the tool.** Plain markdown files can be grepped, diffed, moved to another app or read by any model. Notes locked in a database last as long as the subscription.

## How do coding agents read and write the team's notes?

In Baalda there are two routes, and both end up in the same files.

The first is the folder itself. Every note is a `.md` file in the vault folder on your machine, so a coding agent running locally can open it like any other file. When it edits one, the desktop app sees the change on disk, diffs it and merges it into the live note, so a teammate typing in the same note keeps their edits and sees the agent's arrive.

The second is MCP, for agents that are not on the machine with the folder, or when you want the agent limited to what one person may see. You create a token in Vault Settings, MCP, and register the endpoint. For Claude Code that is:

```bash
claude mcp add --transport http context https://api.baalda.com/api/mcp \
  --header "Authorization: Bearer mcp_…"
```

On a self-hosted server it is your own URL with the same `/api/mcp` path. The token is scoped to the person who created it, so the agent can read and edit exactly the folders that person can and nothing else. The setup for several engineers sharing one vault, including what goes wrong when two agents write the same file, is in [Claude Code as a second brain for a team](/blog/claude-code-second-brain-for-a-team).

## What happens to the notes during an incident?

This is where a shared vault earns its place. During an outage several people need to write in one document at once: one person keeps the timeline, another pastes logs, a third writes down what was tried.

In Baalda each note is a CRDT document, so those edits merge keystroke by keystroke instead of one save overwriting another. Everyone types into the same `incidents/2026-11-27-checkout-latency.md`, and it is an ordinary markdown file on every machine afterwards. When it is over, the on-call engineer can ask an assistant over MCP to turn the timeline into a postmortem draft in the same folder, then edit that draft like any other note.

Two safety nets matter here. Every note keeps a version history, and when one edit removes most of a note, the server keeps the version from before the deletion, so a bad paste in a hurry is recoverable. Deleted notes sit in the server's Trash for 30 days.

## Who can read the security postmortem?

Not everyone, and that decides a lot of tool choices. Some incident write-ups name customers, credentials that were rotated or a vulnerability that is not yet fixed.

Baalda sets access per folder and per note: Can edit, Can view or No access, for the whole team or for one person. A layout that works for most teams of five to fifty:

```text
eng/
  decisions/          everyone can view, staff engineers can edit
  runbooks/           everyone can edit
  incidents/          everyone can edit
  incidents-private/  No access for the team, Can edit for the security group
  onboarding/         everyone can view
  working/<name>/     each person's drafts, not shared until ready
```

An AI connected with someone's token inherits that person's access, so an assistant connected by a new hire cannot read `incidents-private/` either. [The access docs](/docs/access) spell out exactly which rule wins when a folder grant and a person's level disagree.

## Where is Baalda the wrong choice?

Said plainly, so you can rule it out early:

- **It does not read your code or review pull requests.** Tools built on the codebase answer "what does this function do". Baalda holds what the team wrote, nothing more.
- **It has no Git integration.** No branches and no pull request review on notes. If every decision must go through code review, keep those decision records in the repo.
- **It does not page anyone or open tickets.** It is the place the incident is written down, not the incident tool.
- **Other tools win elsewhere.** Obsidian is still the better pick for one developer's private notes and its plugin ecosystem. Notion is stronger if the team wants databases, boards and sprint tracking in the same tool. Confluence makes sense if the company already lives in Jira, and [the Confluence comparison](/compare/confluence) goes through that trade.

## How do you start one this week?

1. Pick the one document type that hurts most. For most teams it is runbooks or incident notes.
2. Create the folders above and set access before anyone writes, so private material never starts in a shared folder.
3. Move five real documents in, not fifty. Five that people use beat a migration nobody reads.
4. Connect each engineer's coding agent with their own token, and add a line to the repo's `AGENTS.md` pointing it at the runbooks folder.
5. After the next incident, write the postmortem in the vault. If nobody asks where it went, the system is working.

Baalda is free to run locally and to self-host under the Apache-2.0 licence, with an optional managed Team plan for hosted sync. The [guide for engineering teams](/for/engineering) walks through the setup step by step.

## FAQ

### What is a second brain for an engineering team?

A shared, written store of the context around the code: architecture reasoning, runbooks, incident timelines, postmortems, ownership and onboarding notes. It sits outside the repo so product, support and new hires can read it, and coding agents can read and add to it.

### Should engineering docs live in the repo or in a separate tool?

Keep in the repo anything that must change in the same commit as the code: README, setup, API reference, agent instruction files. Keep history, operations and judgement elsewhere, because they rarely change in step with the code and people outside engineering need them.

### Can Claude Code or Cursor write to the team's notes?

Yes. In Baalda a local agent can edit the markdown files in the vault folder directly, and the desktop app merges those edits into the live note. Agents elsewhere connect over MCP with a person's token and reach only the folders that person can.

### How do you keep security postmortems private in a shared vault?

Put them in a folder the team has No access to and give the security group Can edit on it. In Baalda an assistant connected with someone's token inherits that person's access, so it cannot read the folder either.
