DocRefFixer – Auto-fix stale file:line refs in docs
Automatically finds and fixes outdated file:line references in project documentation
- Problem
- Many READMEs, architecture docs and tutorials reference concrete file paths and line numbers (e.g. `src/foo.ts:42`). After a refactor these all break, readers can't jump to the right place, and maintainers rarely check them. An HN post specifically calls out the need to 'find and fix stale file:line references in your docs'.
- Solution
- A CLI/CI tool that scans Markdown, comments and docs for file:line references, compares them against the current repo, detects broken or mismatched references, attempts to auto-correct line numbers via symbol matching, and outputs a committable patch or PR.
- Users
- Developers and technical writers maintaining open-source or internal docs, especially teams whose docs heavily reference code lines.
- MVP
- Parse file:line references in Markdown and code comments; validate file existence, line bounds and whether the line content matches referenced context; suggest corrected line numbers and generate a diff; run as a CI step with report on failure; GitHub Action to auto-open fix PRs.
- Revenue
- Open-source CLI free; hosted GitHub App/CI version by repo count or private repo seats (e.g. $5–20/month); enterprise self-hosted with audit reports.
- Why now
- AI-assisted coding dramatically speeds up refactors, making doc code references go stale faster, while existing tools mostly check links, not file:line content drift — a clear gap.