doc-drift

Detect documentation drift by comparing docstrings, markdown examples, and config references against code.

Updated Sep 9, 2024
One-click install
npx skills add https://github.com/axel-kaliff/dotfiles --skill doc-drift-axel-kaliff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-drift
Source: https://github.com/axel-kaliff/dotfiles/tree/main/claude/.claude/skills/doc-drift
Command: npx skills add https://github.com/axel-kaliff/dotfiles --skill doc-drift-axel-kaliff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Documentation often falls out of sync with implementation after refactors, feature changes, or API updates, causing confusion, failing examples, and incorrect onboarding material. This Skill helps teams detect those mismatches early by comparing docstrings, README examples, and configuration references against the actual code.

Core Features & Use Cases

  • Docstring Analysis: Inspect public functions, classes, and methods to flag parameter, return, and behavioral inconsistencies between docstrings and implementation.
  • README/Markdown Validation: Verify code references and usage examples in README and docs/*.md files against the current codebase to detect removed or renamed symbols and outdated examples.
  • Config and Schema Checks: Scan pyproject.toml, CI workflows, Makefiles, and other config files for references to removed scripts, entry points, or keys not found in code.
  • Use Case: Run after a large refactor or before merging a feature branch to produce a concise report of confirmed documentation mismatches to guide edits and PR notes.

Quick Start

Run the doc-drift skill on a feature branch to scan changed files and produce a consolidated drift report.

Frequently Asked Questions about doc-drift

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect documentation drift in my codebase?

Documentation drift is detected by comparing docstrings, markdown examples, and configuration references against actual implementation. The skill checks signatures, referenced symbols, and command presence to report confirmed mismatches.

Can I check README markdown examples against current code behavior?

Yes, README and docs/*.md files are validated by verifying code references and usage examples against the current codebase to detect removed or renamed symbols and outdated examples.

What is the best way to verify docstrings match implementation after a refactor?

The best way to verify docstrings after a refactor is to inspect public functions, classes, and methods to flag parameter, return, and behavioral inconsistencies between docstrings and the implementation.

Does documentation drift detection work on specific files or feature branches?

Yes, documentation drift detection can be applied to changed files on a feature branch, to a specified file or directory, or to src/ and project root docs for comprehensive scans.

How do I scan configuration files for references to removed scripts or entry points?

Configuration drift is found by scanning pyproject.toml, CI workflows, Makefiles, and other config files for references to removed scripts, entry points, or keys not found in code.

Why does my documentation report show false positives during static analysis?

To prevent false positives, documentation drift detection uses static analysis to verify referenced symbols, signatures, and commands, reporting only confirmed mismatches that need editing.