{
  "id": 7902150,
  "title": "Your README code examples are silently lying — I built a CLI to detect documentation drift using only AST, no LLM",
  "url": "https://urgent.news/2026/09/16/your-readme-code-examples-are-silently-lying-i-built-a-cli-to-detect",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-16T23:58:15.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sunnydachs/your-readme-code-examples-are-silently-lying-i-built-a-cli-to-detect-documentation-drift-using-1blp"
  },
  "original_language": "en",
  "account": "Your README code examples aren't always accurate, and I've built a command-line tool to detect documentation drift using only Abstract Syntax Trees (AST), without relying on Large Language Models (LLMs). This tool, named doc-drift, is available at https://github.com/sunnydachs/doc-drift.\n\nDoc-drift scans your repository for Markdown files with fenced code blocks, extracts the defined functions and classes, and compares them to the actual codebase. It reports three main findings: SIGNATURE DRIFT (the documented function exists, but its arguments have changed), MISSING (the documented function/class no longer exists in the repository), and UNPARSEABLE (the block isn't valid Python code). The tool is designed to be deterministic, safe, and read-only, with no dependencies beyond Python 3.11+.\n\nThe author emphasizes that the tool is meant to catch issues that other tools, like IDEs and static analysis, cannot. This includes scenarios where code examples in docs are simplified versions of the actual codebase. The tool is currently limited to Python, but the author plans to expand support for other languages in the future.",
  "summary": "Your README code examples are silently lying — I built a CLI to detect documentation drift using only AST, no LLM \"Did you know? This README example doesn't work.\" Have you ever had a junior engineer tell you that? Or worse — have you added a line to your code, forgot the docs, and broke it yourself ? This time I want to tell you about doc-drift , a CLI I built that detects this \"documentation…",
  "key_points": [
    "Doc-drift tool detects documentation drift using AST",
    "Reports signature drift, missing functions/classes, and unparseable code blocks",
    "Designed to be deterministic, safe, and read-only"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}