Glossary
Single source of truth
Definition
A single source of truth is one artifact designated as authoritative for a given fact, from which every other representation is derived rather than independently maintained.
The question it is supposed to answer
For documentation, the principle reduces to one question: when the documentation and the code disagree, which one is wrong?
Most teams have never answered it explicitly, which is why the principle gets cited more often than it gets applied. The documentation describes a two-second default; the code uses five. Someone has to decide whether that is a documentation bug or a regression, and without a declared source of truth that decision gets made case by case, usually by whoever noticed.
Declaring one is not the same as having one
This is where the term is most often misused. A wiki page announced as "the single source of truth" is still a copy. Someone updated it by hand, and someone else will update the system it describes without returning to it. Declaring authority does not create it.
The test is mechanical: can the derived copy be regenerated from the source? If yes, it is a derivation, and it cannot silently diverge — regenerate and the difference disappears. If no, it is a duplicate wearing the label, and it will drift at whatever rate the two are maintained independently.
By that test, most documentation described as a single source of truth is not one. It is a second copy of information that also lives in code, maintained by different people on a different schedule.
Taking code as the source
For anything describing system behaviour, the honest answer is that the code is authoritative — not because code is well written, but because it is what actually runs. When documentation and code disagree about a default, the code is the default. The software does not consult the documentation.
Accepting that has a consequence: documentation describing behaviour should be derived from code rather than maintained beside it. Derived documentation can be wrong, but it cannot be silently wrong in the way a hand-maintained copy can, because regeneration surfaces the difference.
Where it stops
Code is not the source of truth for everything, and overstating this is its own error.
Code expresses what the system does. It does not express why a design was chosen, which approach was rejected, what a feature is for, or how it fits a user's workflow. That material has no home in a repository and no mechanism to derive it from.
Which means the realistic answer is not one source but a clear split: behaviour derived from code, intent authored by people, and a visible boundary between them so nobody has to guess which kind of claim they are reading.
Go deeper
Questions people ask
Can documentation be the single source of truth instead of code?
Only where the documentation is what gets executed — a specification the implementation is generated from, as in contract-first API development. Otherwise the running system is authoritative whatever the documentation claims.
Does a single source of truth mean only one document?
No. It means one authoritative source per fact. A system typically has several, each owning a different domain, with everything else derived.
What about information that isn't in the code?
It needs an authored home and an owner. Design rationale, intent and workflow context cannot be derived from a repository, and pretending otherwise is how they get lost.