We audited our own docs against our own code. It found 22 mismatches.
Several agents writing to one repository make documentation drift. We ran a read-only audit to see how bad it was, and whether it is worth repeating.
Why we did it
We let several AI agents write to the same repository. That is productive, but each one edits the part it is working on, and nobody is responsible for the whole. Our own rule of thumb is that this is what causes documentation to drift away from the code.
The idea of a periodic "drift audit" came from a public collection of agent prompts, where a persona called the Codebase Archaeologist compares a repository's docs with its code and lists the differences. We wanted to test the claim, not adopt it. Is the audit useful, or is it a nice-sounding idea that produces noise?
What we set up
The plan was deliberately small:
- A one-off job. No new agent role and no new account.
- Our homelab repository, whose main instructions file is long and changes often. Read-only.
- A short prompt: the ten or so useful lines of the Archaeologist file, not the persona. The full file is about 26 KB, roughly 7,000 tokens, and most of that is character.
- One cheap model, with tokens, time and cost to be recorded.
- Every reported mismatch checked by hand against the code. Verify, do not trust.
What the run actually compared: the main instructions file, the homelab overview, the docs folder and the inventory files, against the repository, the running containers, the build server and the live onboarding endpoint. Nothing was changed.
What it found
22 mismatches, each with the claim, where it is stated, what is true, the evidence, a severity and a suggested fix. All 22 held up when checked by hand. We counted the table rows ourselves and they matched the stated totals.
The shape of them is more useful than the list:
| Kind of drift | What it looked like |
|---|---|
| Facts that were once true | Image versions in the service inventory had moved on. A machine described as "this machine" no longer was. |
| Services marked running that were not | Six services in the inventory were listed as running, but every connection to them was refused. |
| Docs describing a retired workflow | A device-specific instructions file from May described a deploy method we no longer use. |
| A doc contradicting a newer doc | One onboarding guide still recommended an identity scheme that the main file says is being retired. |
| A job that had quietly gone red | A weekly job that posts a count had failed twice. One failure was a database-locked error from our Git server. |
| Counts that no longer matched | "Six agents" where the file had seven roles. Roadmap phases 1-7 where it now had more. |
The one that mattered
The single high-severity finding was this. Our rules say a project's commits should carry the identity of the agent doing the work, and that a shared identity is for three specific repositories only. But the live onboarding page still told every new project to commit as the shared identity, using the shared credential's name. The page contradicted the rule in its own text a few lines later.
That is the useful kind of find. Nobody had noticed because each part looked right on its own. Only a comparison of two places caught it.
The audit also said something we were glad to read: the core of the main instructions file was sound.
What we did about it
We fixed 15 of the 22 in docs and inventory on one branch, and the two onboarding findings in the API repository on another. Neither was merged without review: three reviewing agents (tests, security, architecture) each checked both branches and each said merge.
We also added a small test that fails if the inventory drifts in the specific ways the audit found. The reviewers were fair about its limits: it pins single strings, so it will not catch a reworded version of the same drift.
Some findings were not docs fixes, and we left them for their own tickets: a missing machine in our container-listing script, the red weekly job, and a larger documentation job for build-server jobs nobody had written up.
Two findings needed a human decision, and the owner made them. The main Docker host is now the laptop, so the old machine was marked retired. An untracked leftover folder was deleted after we checked what in it was unique and where the copies lived.
What we did not measure
Be careful with this part, because it is where the story is thinner than the findings.
- Cost. The plan said to record tokens, time and cost for a single run on one cheap model. Our records of the work do not give us those figures, so we are not going to quote any. One reviewer noted that cost was described as a context budget, not as billing.
- False positives. Every reported item was checked and held up, but that is what the run reported, not a measure of what it missed. We have no count of mismatches it failed to find.
- A fair comparison with the prompt we borrowed. We did not run the full persona file against our short prompt, so we cannot say the ten lines are better.
- Fix verification. The fixes passed the test suites. Not all of them are deployed. The onboarding fix only goes live when the API is deployed.
Our verdict
Worth repeating, but not as another agent. The audit's own recommendation, which the architecture reviewer called sensible, was:
- A weekly deterministic script that checks the things a script can check (image versions, service status, counts) and posts only new drift.
- A monthly pass by a model for the things a script cannot check, such as a sentence in a guide that contradicts the main file.
- No new role and no new account.
Much of what we found was mechanical. Versions, counts and "is it up" do not need a model, and the test we added now covers a few of them. The model earned its keep on the judgement calls: spotting that two pages disagreed about who may commit as whom.
What we would tell you
- If several people or agents write to one repository, your docs are drifting already. Assume it.
- Make the audit read-only, and check every finding by hand at least the first time. That is how you learn whether to trust it.
- Rank the findings. One of 22 mattered a great deal and the rest were housekeeping. Fix the high one first.
- Turn what the audit finds into tests where you can, so the same drift is caught without anyone asking.
- Write down tokens, time and cost while you run it. We did not, and we cannot now tell you what it cost.