ci(lint): check Markdown links offline with lychee #184
Notifications
Due Date
No due date set.
Depends on
Reference: Mortis/Kamino#184
Reference in new issue
Block a user
Spec: AGENTS.md structure and what happens to CLAUDE.md's content (resolution, section 4).
What to build
lychee in
--offlinemode on tracked*.mdfiles, as a pre-commit hook (so it also runs in Lint), so that a pointer in anAGENTS.mdor doc to a moved or deleted file fails.id: lychee) islanguage: scriptand downloads lychee on its first run (cargo-binstall into the hook repository);pre-commit install-hooksduring the image build does not run it. So every fast-path Lint would download lychee, which the bake-in rule calls a defect, and a network-off Lint fails. Put the lychee binary into theciimage and use thelychee-systemhook (it expectslycheeonPATH), pinned by commit SHA with# frozen: vX.Y.Z; havescripts/dev-setup.shprovide or check for lychee locally. Or run the hook once during the image build, so the cache holds the binary. Say which in the PR. If Renovate is to track the hook'srev:, check that itsgit-tagslookup reads lychee'slychee-v0.x.ytags (it may needextractVersion)..pre-commit-config.yamlis an image input: the consumer pins move in the follow-up pin PR. This PR carries no version bump: ci(images): assign image versions in CI and open the pin PR right after a push blocks this issue, and once it lands CI assigns the image version andscripts/bump_image_versions.pyis gone.CHANGELOG.rstis not Markdown anyway), each with a reason. If.claude/is tracked when this lands, exclude it (third-party content), with that reason.--include-verbatimonly looks for URLs in it. The pointers this check exists for are therefore written as Markdown links (docs(agents): replace CLAUDE.md with a root AGENTS.md, docs(contributing): split the contributor docs into CONTRIBUTING.md and docs/contributing/). Onelychee --offline --dumpon a file with a backticked path settles the extraction question. List any pointer in a trackedAGENTS.mdordocs/contributing/file that is still a bare backticked path, and turn it into a link.Acceptance
.mdfails the hook; external URLs are not fetched.AGENTS.mdpoints to fails the hook.pre-commit run --all-filespasses onmainafter the PR (fix or report existing broken links).ci(images): assign image versions in CI (#165) now blocks this; once it lands CI assigns the image version, so skip the
bump_image_versions.pystep. (From Order of the implementation backlog, #198.)Review of the map (2026-11-15): corrections to this issue.
id: lychee) islanguage: scriptand runs a wrapper that installs cargo-binstall and lychee into the hook repository the first time it runs;pre-commit install-hooksduring the image build does not run it. So every fast-path Lint would download lychee, which the bake-in rule calls a defect, and a network-off Lint fails. Change: put the lychee binary into theciimage and use thelychee-systemhook (which expectslycheeonPATH), and havescripts/dev-setup.shprovide or check for lychee locally. Or run the hook once during the image build, so the cache holds the binary, and say which in the PR. If Renovate is to track the hook'srev:, check that itsgit-tagslookup reads lychee'slychee-v0.x.ytags (it may needextractVersion).ciimageversion:(scripts/bump_image_versions.py)". The ordering comment overrides this: the image versions issue lands first and removes the script. Change: fold the comment into the body and drop the bump line, so an agent reading only the body is not misled..claude/may be tracked by then. chore: commit the deployed agent skills, trim the apm plugins and pin apm-cli says to exclude.claude/from the lychee link check, and neither issue blocks the other. Change: add "if.claude/is tracked when this lands, exclude it (third-party content), with that reason".Review of the map (2026-11-17).
--include-verbatimonly looks for URLs in it. Read in lychee's README and extractor source onmaster, not run; onelychee --offline --dumpon a file with a backticked path settles it. The pointers this check exists for are therefore written as Markdown links (docs(agents): replace CLAUDE.md with a root AGENTS.md, docs(contributing): split the contributor docs into CONTRIBUTING.md and docs/contributing/).AGENTS.mdpoints to fails the hook. Also list any pointer in a trackedAGENTS.mdordocs/contributing/file that is still a bare backticked path, and turn it into a link.Final validation round, second pass (2026-11-20): body edited.
ciimageversion:andscripts/bump_image_versions.py: the image versions issue blocks this one and removes the script.lychee-systemhook with the binary in theciimage (or run once during the image build),dev-setup.shprovides lychee, RenovateextractVersioncheck, and excluding.claude/if tracked.AGENTS.mdpoints to; bare backticked pointers are listed and turned into links.