Context
In PR #116 we discovered that the docs site shipped 43 broken GitHub links pointing at .claude/skills/... for ~24 hours after PR #114 relocated skills to skills/. Neither lint script caught it:
scripts/docs-lint.mjs — checkAuditFreshness silently skips when the linked file doesn't exist locally (scripts/docs-lint.mjs:68-70).
scripts/docs-link-check.mjs — only resolves internal /docs/... paths; external https://github.com/... URLs are ignored entirely.
The breakage was discovered manually during release prep, not by CI. Without a guard, the next file relocation will reintroduce the problem.
Proposal
Add a lint rule that fails (or warns) when a frontmatter links: entry of the form https://github.com/bitrix24/b24jssdk/blob/main/<path> (or tree/main/<path>) points to a <path> that does NOT exist in the working tree.
Approaches in increasing rigor:
- Extend
docs-lint.mjs: in checkAuditFreshness (or a new checkGithubPathsExist function), turn the silent skip into a warn (or error under --strict). One-line change at scripts/docs-lint.mjs:68-70.
- Extend
docs-link-check.mjs: parse to: fields in frontmatter, detect the github.com/bitrix24/b24jssdk/(blob|tree)/main/<path> shape, verify <path> exists via statSync or git ls-tree. Add to the existing 0 broken link(s), 0 warning(s) report.
Approach 1 is cheaper and lives next to the existing audit-freshness logic, so failures share the same --strict switch with the rest of the docs-lint pipeline. Approach 2 is more thorough — it also catches links in body Markdown — but a larger surface.
Acceptance criteria
Out of scope
- Catching link rot in plain Markdown link syntax (
[label](url)) — useful but a wider net; start narrow.
- Re-validating after a relocation — the lint will catch stale paths next time around, that's the point.
Related
Context
In PR #116 we discovered that the docs site shipped 43 broken GitHub links pointing at
.claude/skills/...for ~24 hours after PR #114 relocated skills toskills/. Neither lint script caught it:scripts/docs-lint.mjs—checkAuditFreshnesssilently skips when the linked file doesn't exist locally (scripts/docs-lint.mjs:68-70).scripts/docs-link-check.mjs— only resolves internal/docs/...paths; externalhttps://github.com/...URLs are ignored entirely.The breakage was discovered manually during release prep, not by CI. Without a guard, the next file relocation will reintroduce the problem.
Proposal
Add a lint rule that fails (or warns) when a frontmatter
links:entry of the formhttps://github.com/bitrix24/b24jssdk/blob/main/<path>(ortree/main/<path>) points to a<path>that does NOT exist in the working tree.Approaches in increasing rigor:
docs-lint.mjs: incheckAuditFreshness(or a newcheckGithubPathsExistfunction), turn the silent skip into awarn(orerrorunder--strict). One-line change at scripts/docs-lint.mjs:68-70.docs-link-check.mjs: parseto:fields in frontmatter, detect thegithub.com/bitrix24/b24jssdk/(blob|tree)/main/<path>shape, verify<path>exists viastatSyncorgit ls-tree. Add to the existing0 broken link(s), 0 warning(s)report.Approach 1 is cheaper and lives next to the existing audit-freshness logic, so failures share the same
--strictswitch with the rest of the docs-lint pipeline. Approach 2 is more thorough — it also catches links in body Markdown — but a larger surface.Acceptance criteria
https://github.com/bitrix24/b24jssdk/(blob|tree)/main/<path>in frontmatter where<path>is missing in the working tree..claude/skills/paths).mainpost-PR-docs: fix stale skills links + refresh examples landing page #116.--strictor equivalent).CLAUDE.md/AGENTS.mdunder conventions pointing at the rule, so contributors know why their lint failed.Out of scope
[label](url)) — useful but a wider net; start narrow.Related