Repository navigation
Conversation
GitHub's web view does not follow a directory symlink, so a link through skills/<name>/ returns 404 there, while local readers, agents and lychee resolve it (apache#2330). Rewrite the 430 such links in docs/ to the real plugins/magpie-<family>/skills/<alias>/ path, keeping each #fragment; every link still resolves to the same file. Add tools/dev/check-symlink-links.py and its prek hook, scoped to docs/ for now: it walks each relative link one path component at a time and refuses one that goes through any symlinked directory, so a future symlink layer is caught too, and --fix rewrites it. The validator's docs/modes.md row pattern accepts the real path, and the two ai-tutors prompts that embed docs/education are refreshed. Refs apache#2330 Generated-by: Claude Code (Opus 5.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 1 of #2330 (option 3, as agreed there):
docs/now links the real path of each skill file, and a check keeps it that way.docs/went through askills/<name>/symlink, which GitHub's web view doesn't follow, so each of them returned 404 there. Each now links the realplugins/magpie-<family>/skills/<alias>/path, relative to its file, with its#fragmentkept.tools/dev/check-symlink-links.py, wired as thecheck-symlink-linksprek hook ondocs/only. It walks each relative link one path component at a time and refuses one that goes through any symlinked directory, not onlyskills/, so a future symlink layer is caught too. It prints the real path to use, and--fixrewrites the link. It checks inline links, images, reference definitions andhref/srcattributes, and skips code blocks, code spans, external URLs, absolute paths and missing targets (lychee reports those). The next PRs widen itsfiles:astools/and the remaining files are converted.docs/modes.mdrow pattern only matched../skills/<slug>/SKILL.md, so it would have found no skill rows. It now also accepts the real plugin path. The slug still comes from the backticked name.ai-tutorsprompts embeddocs/education. I refreshed them withinject-knowledge-base.py, and only the link lines changed.AGENTS.mdand the skill files are out of scope, as agreed.Type of change
Test plan
check-symlink-links.pyon everydocs/**/*.md: 430 findings before, 0 after.prek run check-symlink-links --all-filespasses.tools/dev/tests/test_check_symlink_links.py, 22 tests:mainreports, then fixes;docs/has none left.test_parses_rows_that_link_the_real_plugin_path.skill-and-tool-validateoutput is identical onmainand on this branch.tools/dev522 passed,skill-and-tool-validator505 passed,ai-tutors9 passed.prek runon the changed files passes. I couldn't run lychee locally (it doesn't build here), but every new target was checked to exist, as above.Linked issues
Refs #2330
Was generative AI tooling used to co-author this PR?
I made this with help from Claude Code (Opus 5.5). I checked every line and tested it myself.