stale_scan
Detect documentation drift by scanning project markdown files to find references to commands, flags, APIs, or files that no longer match the actual codebase.
Instructions
Detect documentation drift — find places in README.md, CHANGELOG.md, and other project markdown where the docs reference commands, flags, APIs, or files that the code no longer matches.
When to use: before tagging a release, after large refactors or renames, when onboarding a new contributor, or as a periodic health check. Set git: true to additionally flag docs that have not been touched since a closely related source file changed significantly.
Side effects: reads all markdown files and source files reachable from the project root (respecting .gitignore). Never writes, auto-fixes, or moves files — this is a pure reporting tool.
Returns: plain-text, JSON, or markdown report listing each drifted section with file:line references and a one-line explanation of the mismatch (e.g. "README references --deep flag removed in src/cli.ts:42"). Exit 1 if any drift is found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute or relative path to the project root to scan. Defaults to the current working directory. | |
| format | No | Response format: "terminal" for human-readable ANSI-colored output, "json" for machine-parseable structured data, "markdown" for rendered tables (where supported). Defaults to "terminal". | |
| git | No | When true, additionally compare each markdown file's last-modified commit against the closest-related source file and flag docs that are significantly older. Requires the project to be a git repository; silently skipped otherwise. |