Repo-wide stale-link checker for Markdown docs (OC_Chat maintenance tool).
Scans every ``.md`` file under the repo, extracts ``[](...)`` links and backtick
path code-spans, resolves each against the filesystem, and reports DEAD file
references. The output is filtered so the noise (illustrative example paths,
forward-refs to not-yet-authored TARGET files, generated views, preserved
receipts, frozen golden fixtures) is separated from genuine broken navigation.
The high-signal section ("A") is: markdown ``[](...)`` nav-links in *active*
docs whose target no longer exists but whose basename exists *elsewhere* (i.e.
the target moved) — with the new location. Those are the actionable stale links.
Usage: python tools/link_check.py
Origin: written 2026-07-04 to sweep for stale links after the Plan-142 archival
(the archival moved 17 plan files to plans/completed/ and left dead references
in lint config, specs, and cross-links). Caught 3 partial-scope misses that
several scoped greps had missed; kept as a reusable check.
TODO(oct-migration): this checker is generic, not OC_Chat-specific. Migrate it
into the `oct` linter as a repo-wide ``stale_links`` check when the monorepo
lands, respecting the exempt buckets below (receipts / old / archive /
completed / generated views / golden fixtures). Kept here meanwhile.