Most documentation projects fail on the same line. They are built as if the team will use them, and they are never tested against the moment someone actually needs the answer. This is why the best documentation is not the one with the most polished table of contents. It is the one people open, edit and trust at 4pm on a Thursday.
In the distributed teams I have worked with over the past three years, the pattern that separates durable documentation from a shelf project is almost always about mechanics, not writing quality. Teams with strong writing skills and no review loop decay inside a quarter. Teams with average writing and a strict loop keep their docs useful for years.
Forrester’s 2024 knowledge management research reports that teams that tie documentation review to code review cycles see up to two times the documentation retention rate versus teams that run separate writing sprints. The mechanism is simple. Docs are touched when the thing they describe changes, not when someone remembers to update them.
Step One. Classify Every Doc with a Decision Tree
Before choosing a tool, classify each document by two axes: how often it changes and who reads it.
| Change Frequency | Narrow, Engineering Audience | Broad, Cross-Functional Audience |
|---|---|---|
| Weekly or more | Docs as code. Runbooks, deployment notes, feature docs | Docs as code with a mirrored wiki view |
| Monthly | Docs as code with lighter review | Wiki such as Notion or Confluence |
| Quarterly or slower | Wiki. Design docs, roadmaps, retros | Wiki. Policy, onboarding, values |
The two boxes that most teams get wrong are the top-right and bottom-left corners. Weekly-changing docs with a broad audience are usually architecture decisions and API contracts. These need version control because they touch many people. Quarterly docs with a narrow audience are often internal design specs. These do not need a wiki and probably do not need code review.
Ask three questions when classifying a doc. How often does the underlying system change. Who is the reader. What is the cost of the doc being wrong. If any of the three answers is high, the doc belongs in a versioned workflow.
Step Two. Choose the Right Tool per Doc Type
The common mistake is treating docs as a company-level decision. It is a per-doc decision.
| Dimension | Docs as Code (GitLab, GitHub, Docusaurus) | Notion (or Confluence) |
|---|---|---|
| Review model | PR-based, tied to code review | Comment-based, ad-hoc |
| Best fit | Runbooks, API docs, feature docs | Playbooks, onboarding, retros |
| Change velocity | Weekly or higher | Monthly or lower |
| Discovery | Search and cross-link inside the repo | Wiki search and page hierarchy |
| Owner | Engineering code owner | Functional owner, often rotating |
| Cost per edit | High, requires PR cycle | Low, drag-and-drop |
| Drift risk without governance | High | Higher. Edits happen invisibly |
| Version history | Full Git history, blame available | Version history, harder to trace |
| Learning curve for contributors | Moderate. Requires Git literacy | Low. Native for non-engineers |
| Typical team fit | Distributed engineering-heavy teams | Distributed teams with many non-engineers |
Docs as code wins when the cost of a wrong doc is high. A runbook used at 3am by an on-call engineer who did not write the code needs a review trail and a blame pointer. Notion wins when the cost of a slow edit is high. A team playbook used by fifty non-engineers needs to be updated in the moment a decision is made, not after a PR review cycle.
Most distributed teams end up running both. The trick is to draw the boundary clearly and defend it. A doc that lives in both places is not covered by either.
Step Three. Stand Up the First Contribution Loop
The tool is not the workflow. The workflow is the loop that fires every time someone changes the system the doc describes.
A minimal contribution loop has four pieces.
- A PR template that includes a docs-required checkbox.
- A CI check that fails the build if a broken link is added.
- A CODEOWNERS file that assigns each doc path to one owner.
- A rotation of reviewers, so no single person becomes the bottleneck.
The template does most of the work. If the pull request template forces the author to answer whether docs were touched, roughly half of the drift disappears. The remaining half is what the CI check and CODEOWNERS file handle.
Here is a concrete PR template that handles most of the workflow:
yaml
name: "Docs PR"
body:
- type: textarea
id: summary
attributes:
label: "What changed"
description: "One sentence describing what this PR changes."
validations:
required: true
- type: checkboxes
id: docs-required
attributes:
label: "Docs"
options:
- label: "Docs updated or added in this PR"
required: true
- label: "Docs verified as still accurate (no changes needed)"
- label: "N/A. This change does not affect docs"
- type: checkboxes
id: review
attributes:
label: "Review"
options:
- label: "Link check passed"
required: true
- label: "CODEOWNERS owner assigned as reviewer"
required: true
The checkbox that matters is the third one, N/A. It forces the author to state explicitly that no docs change is needed. Silence is the enemy of documentation. Silence in a PR template is especially loud.
Step Four. Run the Three-Phase Rollout
The rollout has three phases across four to six weeks. Teams that skip phase one and jump straight to tooling will discover the boundary between docs-as-code and wiki on the day they inherit someone else’s messy folder structure.
| Phase | Duration | Primary Scope | Success Criteria |
|---|---|---|---|
| Phase 1. Decide | Weeks 1-2 | Decision tree, pilot scope, owner assignment | Every doc type classified. One pilot area chosen. Owners named. |
| Phase 2. Build | Weeks 3-4 | Templates, CI, first contribution cycle | First PR with the template merged. Broken-link check green. Owners respond to reviews. |
| Phase 3. Scale | Weeks 5-6 | Review rotation, retro, archive pass | Retrospective documented. Archive list agreed. Rotation calendar published. |
Phase one is the phase teams skip. Do not skip it. The two weeks of deciding are worth more than a month of editing.
In phase one, pick one pilot area. It should be the doc type that causes the most pain today. Common choices are the onboarding guide, the deployment runbook, or the API reference. Do not try to migrate everything at once. You will exhaust your energy before the loop is proven.
Phase two is the phase most teams focus on. Get the templates in place, wire the CI check and land the first real contribution through the new loop. The success bar is that a real engineer made a real edit through the new process, not that the pipeline went green on a hello-world test.
Phase three is where the workflow becomes durable. Introduce the review rotation. Run a retro and write it down. Archive the docs nobody opened in the last sixty days. The pruning step is not optional. Without it, phase three collapses into the same digital basement the team left behind.
A Concrete Case Study. A FinTech Onboarding Migration
I ran this playbook at a fintech with about nineteen engineers across five time zones. Their onboarding took six weeks. The team wanted three.
Phase one took nine working days. The team drew the decision tree in a two-hour session. They classified forty-two existing docs and picked the onboarding guide as the pilot area. They named three owners, one for engineering onboarding, one for security onboarding and one for business onboarding.
Phase two took ten working days. The onboarding guide moved into a dedicated docs-as-code folder with a PR template, a CODEOWNERS entry and a broken-link CI check. The team migrated five pieces of onboarding content in the first week. The first full contribution loop happened on day eight when a new engineer updated a setup script doc and got the review assigned automatically.
Phase three took eight working days. The rotation was published. The first retro surfaced three friction points. Two were fixed. The third became a follow-up ticket. The team archived four docs nobody had opened in ninety days.
The new hire onboarding time dropped to about three weeks for the next two engineers. It is not a magic number. But the team has kept using the workflow because the mechanics hold, not because someone promised.
Failure Modes. What Kills These Workflows
The same three failure modes repeat across every team.
- The docs live outside the code review loop. The moment a doc is separate from the change it describes, drift starts. Configure the PR template first. Wire the CODEOWNERS file second. Pick the tool third.
- One owner carries the workflow. The owner becomes a bottleneck. Reviews pile up. People stop submitting doc edits. Introduce rotation in phase three, not phase five.
- The archive list is never touched. Docs accumulate. Search results get noisy. Nobody trusts any of it. Run the archive pass in phase three and repeat it every quarter.
Each of these is a governance choice, not a tooling choice. The tool does not fix them.
What I Would Do on Day One
If your team has documentation today and it is not working, do three things before you touch any tool. Draw the decision tree. Pick one pilot area. Wire the PR template. Do not buy a new wiki before you have a workflow. The workflow decides which wiki, not the other way around.
Teams that follow the three-phase rollout with a real PR template keep the workflow going. Teams that skip the phases and jump to tooling spend the next six months cleaning up the mess they just built.
The best documentation is not the one you would write if you had a perfect quarter. It is the one someone else can update on a Friday afternoon.