-
Notifications
You must be signed in to change notification settings - Fork 0
Detector: Docs Drift
Jacob Centner edited this page Apr 10, 2026
·
1 revision
Detects stale references, dependency drift, and optionally doc-code semantic drift in documentation.
| Property | Value |
|---|---|
| Name | docs-drift |
| Tier | LLM_ASSISTED |
| Languages | All (scans markdown documentation) |
| External tool | None |
| LLM required | Optional (for doc-code drift sub-check) |
| Confidence | 0.80–0.95 (deterministic), 0.65 (LLM) |
Three categories of documentation issues:
Markdown links and inline backtick paths that point to files or anchors that no longer exist.
- Resolves paths relative to the document and repo root
- Suffix matching against all repo files
- Skips external URLs, code blocks, strikethrough text, template patterns
pip install / npm install commands in documentation that reference packages not in the project's actual dependency list.
Compares documentation code blocks (Python imports, CLI commands) against the actual source code to detect semantic inconsistencies. Requires a model provider.
| Sub-check | Severity | Confidence |
|---|---|---|
| Stale markdown link | MEDIUM | 0.95 |
| Stale inline path | LOW–MEDIUM | 0.80 |
| Dependency drift | MEDIUM | 0.90 |
| Doc-code drift (LLM) | From LLM | 0.65 |
[DOCS-DRIFT] docs/contributing.md:45 — Stale reference
Link target: #asgi-transport → anchor not found in document
Severity: MEDIUM, Confidence: 0.95
| Repo | Findings | TP Rate | Notes |
|---|---|---|---|
| pip-tools | 2 | ~0% | 2 FP (edge-case inline paths) |
| httpx | 1 | 100% | Real stale anchor |
| shadcn-ui/ui | 8 | ~25% | 2 TP, 6 FP (user-project paths) |
- Template path detection (
path/to/your/example) - Example context detection ("e.g.", "for example", "such as")
- Fenced code block tracking (skip paths inside code blocks)
- Shell comment stripping in pip install commands
- Non-path npm import filtering
- Inline path resolution can produce FPs for template-like patterns in component libraries
- CHANGELOG feature descriptions without explicit "example" phrases may false-positive
- Doc-code drift sub-check not yet validated at scale (requires LLM)
Local Repo Sentinel · MIT License
Getting Started
Reference
Detectors
- Detector: Todo Scanner
- Detector: Complexity
- Detector: Dead Code
- Detector: Dep Audit
- Detector: Docs Drift
- Detector: Unused Deps
- Detector: Lint Runner
- Detector: ESLint Runner
- Detector: Go Linter
- Detector: Rust Clippy
- Detector: Git Hotspots
- Detector: Stale Env
- Detector: Semantic Drift
- Detector: Test Coherence
- Detector: CI/CD Drift
- Detector: Architecture Drift
- Detector: Inline Comment Drift
- Detector: Intent Comparison
Advanced
Workflow