Skip to content

ci(docs-gate): link-check every tracked markdown file - #29

Merged
bketelsen merged 2 commits into
mainfrom
ci/docs-gate-link-every-markdown
Aug 19, 2026
Merged

bketelsen merged 2 commits into
mainfrom
ci/docs-gate-link-every-markdown

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

Summary

scripts/check-docs.mjs checked relative links only in a hardcoded list (AGENTS.md, README.md, docs/README.md, docs/org-adrs.md, and the four docs/ categories), so a dead link in .agents/skills/, .github/prompts/, .memory/, tests/e2e/README.md, or any other Markdown file left the Docs integrity gate green.

  • The link set is now derived from the tree walk the symlink check already does (hoisted ahead of section 2 with its SKIP_DIRS): every real-blob *.md is checked; symlinked Markdown stays out of the denominator (aliases are not docs and carry no cross-link obligations — ADR-0001; their content is link-checked at its canonical path, and a relative link cannot resolve from both paths); TEMPLATE.md files are skipped for their placeholder links; a symlinked directory is recorded and not descended, so .claude/skills does not double-count .agents/skills. Link regex, fenced-code stripping, and external/anchor skips are unchanged.
  • That surfaced exactly the two dead links this newly covers — both to frostyard/core ADRs that do not exist in std's docs/adr/ (only 0001 lives here). Choice: the links are fixed (.agents/skills/frostyard-repo-docs/SKILL.md → core ADR-0025, .agents/skills/frostyard-acmm-conformance/SKILL.md → core ADR-0029) to the absolute https://github.com/frostyard/core/blob/main/docs/adr/… URLs docs/org-adrs.md already uses, rather than excluding .agents/skills/**. .agents/skills/ is synced from core (core ADR-0026), so the same fix belongs upstream in core; until it lands, a core sync PR that reintroduces the relative links will go red here — which is the signal working. If you'd rather not touch synced skills locally, the alternative is a one-line exclusion of .agents/skills/** in the walk with a comment naming core ADR-0026 — say so and I'll switch.

.coverage-thresholds.json and docs/adr/ untouched; the AGENTS.md / quality-loop.md sentences ("every relative link resolving") are now more accurate, not less, so they were left alone. Snowcat queue item c152a0d5-2b50-4175-add2-8fd58b682722 (ci-gap-implementation).

Evidence

Before (origin/main 311151d) / after:

checked: 12 docs, 117 links, 9 symlinks
checked: 12 docs, 137 links, 9 symlinks

Negative control on the branch:

$ printf '\n[broken](./nope.md)\n' >> tests/e2e/README.md && node scripts/check-docs.mjs; echo exit=$?
FAIL link: tests/e2e/README.md -> ./nope.md does not resolve
ok   docs_index_coverage: 1.000 (required 1)
FAIL link_integrity: 0.993 (required 1)
ok   symlink_resolution: 1.000 (required 1)
checked: 12 docs, 138 links, 9 symlinks
exit=1
$ git checkout -- tests/e2e/README.md && node scripts/check-docs.mjs; echo exit=$?
checked: 12 docs, 137 links, 9 symlinks
exit=0

(git status --porcelain tests/e2e/README.md is clean afterwards; on origin/main the same broken link leaves the gate green.)

  • grep -n 'mdFiles' scripts/check-docs.mjs → declared empty at line 40, filled by the walker at 55, sorted at 59, iterated at 64 — no literal path list.
  • grep -rn '\.\./\.\./\.\./docs/adr/00' .agents/skills/ → nothing.
  • git diff origin/main -- .coverage-thresholds.json docs/adr/ → empty.
  • make check → lint 0 issues, ok reporter, ok tests/e2e.

🤖 Generated with Claude Code

bketelsen and others added 2 commits August 19, 2026 02:55
scripts/check-docs.mjs checked relative links only in a hardcoded list
(AGENTS.md, README.md, docs/README.md, docs/org-adrs.md, and the four docs
categories), so a dead link in .agents/skills/, .github/prompts/,
.memory/, tests/e2e/README.md, or any other Markdown file left the Docs
integrity gate green. The link set is now derived from the tree walk the
symlink check already does (hoisted ahead of section 2 with its SKIP_DIRS):
every real-blob *.md is checked; symlinked Markdown stays out of the
denominator (aliases are not docs and carry no cross-link obligations,
ADR-0001; their content is checked at its canonical path); TEMPLATE.md
files are skipped for their placeholder links; a symlinked directory is
recorded and not descended, so .claude/skills does not double-count
.agents/skills. Link regex, fenced-code stripping, and external/anchor skips
are unchanged.

That surfaced the two dead links this newly covers, both to frostyard/core
ADRs that do not exist in std's docs/adr/ (only 0001 lives here):
.agents/skills/frostyard-repo-docs/SKILL.md (core ADR-0025) and
.agents/skills/frostyard-acmm-conformance/SKILL.md (core ADR-0029) now use
the absolute https://github.com/frostyard/core/blob/main/docs/adr/... URLs
docs/org-adrs.md already uses. .agents/skills/ is synced from core (core
ADR-0026), so the same fix belongs upstream; until it lands, a core sync PR
that reintroduces the relative links will go red here — the signal working.

before: checked: 12 docs, 117 links, 9 symlinks
after:  checked: 12 docs, 137 links, 9 symlinks
Negative control: appending [broken](./nope.md) to tests/e2e/README.md ->
FAIL link: tests/e2e/README.md -> ./nope.md does not resolve, exit 1 (green
on origin/main). .coverage-thresholds.json and docs/adr/ untouched;
make check green.

Co-Authored-By: Claude Fable 5 <[email protected]>
@bketelsen
bketelsen merged commit 66375c0 into main Aug 19, 2026
5 checks passed
@bketelsen
bketelsen deleted the ci/docs-gate-link-every-markdown branch August 19, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant