Skip to main content

Docs drift script

A Python workflow that compares an OpenAPI specification against a folder of Markdown documentation and reports where they disagree. Built at Nium in response to a request for a documentation sanity check; it became the check that runs every sprint.

What it reports​

FindingMeaning
Stale referenceA method and path in the docs that is not an operation in the spec
Missing coverageAn operation in the spec that no guide mentions
Source-content gapA field, enum value, or status the spec defines that the docs describe differently or omit

Output is JSON for pipelines and a spreadsheet for people, one row per finding with file, line, what the docs say, and what the spec says.

Results​

  • First run on Nium's docs: 500+ potential inconsistencies across roughly 300 articles, triaged into a prioritized backlog.
  • In CI: a CircleCI job that pulls engineering's current specs each sprint, diffs them against the docs, and opens a pull request of the differences for review.

Why it exists​

The write-up covers the method and what changed once it ran on a schedule. The short version: a writer cannot re-read 300 articles every sprint, and a script can, so the script finds the candidates and the writer decides.

Code​

github.com/mettakite. Python 3, no framework; takes a spec path and a docs path and writes the report next to them.