Docs as Code

Docs as Code is a philosophy that documentation should be written and maintained using the same tools and processes that teams already use to build software. The Write the Docs community, which has documented and promoted the approach since the mid-2010s, states the core idea plainly: “Documentation as Code (Docs as Code) refers to a philosophy that you should be writing documentation with the same tools as code.” Rather than treating docs as a separate artifact produced in a word processor or a proprietary content system, the practice folds them into the ordinary development workflow.

In concrete terms this means writing in lightweight plain-text markup such as Markdown, reStructuredText, or AsciiDoc; keeping the source in version control alongside the code it describes; tracking work in the same issue trackers; subjecting documentation changes to code review through pull requests; and running automated builds and tests on the docs as part of continuous integration. The output is typically a generated site or set of pages, produced by a documentation tool from the plain-text sources.

The motivation is both practical and cultural. Because the documentation lives next to the code, developers can update docs in the same change that alters behavior, and reviewers can catch outdated or missing documentation before a feature merges. Writers and engineers collaborate in a shared toolchain instead of handing drafts back and forth across a tooling boundary. Teams can also enforce documentation requirements as a gate, refusing to merge a change until its docs are present and pass the build.

The Docs as Code framing was popularized by Eric Holscher and the broader Write the Docs community, and it has been the subject of numerous conference talks from engineers at large software organizations describing how they applied it in practice. The approach pairs naturally with the documentation generators of the markup-and-typesetting ecosystem, which turn version-controlled plain text into published sites.

Docs as Code does not prescribe a single tool. It is a set of habits that can be assembled from many components: a markup language, a generator, a version control system, a review platform, and a CI pipeline. What unites them is the conviction that documentation is a first-class engineering deliverable, deserving the same rigor, automation, and review discipline as the source code itself.

Sources

Last verified June 8, 2026