Skip to content

docs: link the real plugin path for skill files in docs/ - #2393

Open
Harp404 wants to merge 1 commit into
apache:mainfrom
Harp404:docs/skill-links-docs
Open

Harp404 wants to merge 1 commit into
apache:mainfrom
Harp404:docs/skill-links-docs

Conversation

@Harp404

@Harp404 Harp404 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

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.

  • 430 links in 51 files under docs/ went through a skills/<name>/ symlink, which GitHub's web view doesn't follow, so each of them returned 404 there. Each now links the real plugins/magpie-<family>/skills/<alias>/ path, relative to its file, with its #fragment kept.
  • New check, tools/dev/check-symlink-links.py, wired as the check-symlink-links prek hook on docs/ only. It walks each relative link one path component at a time and refuses one that goes through any symlinked directory, not only skills/, so a future symlink layer is caught too. It prints the real path to use, and --fix rewrites the link. It checks inline links, images, reference definitions and href / src attributes, and skips code blocks, code spans, external URLs, absolute paths and missing targets (lychee reports those). The next PRs widen its files: as tools/ and the remaining files are converted.
  • Two things depended on the old form:
    • The validator's docs/modes.md row 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.
    • Two ai-tutors prompts embed docs/education. I refreshed them with inject-knowledge-base.py, and only the link lines changed.

AGENTS.md and the skill files are out of scope, as agreed.

Type of change

  • Documentation
  • Tooling / CI

Test plan

  • Every rewritten link was checked: it resolves to the same file as before, keeps its fragment, goes through no symlink, and nothing else on the line changed (430 links, 0 problems).
  • check-symlink-links.py on every docs/**/*.md: 430 findings before, 0 after. prek run check-symlink-links --all-files passes.
  • New tools/dev/tests/test_check_symlink_links.py, 22 tests:
    • each link form is rewritten;
    • code fences, code spans, external, absolute, anchor-only and missing targets, file symlinks and paths outside the repo are skipped;
    • a fence closes only on its own marker;
    • main reports, then fixes;
    • the real docs/ has none left.
  • New validator test, test_parses_rows_that_link_the_real_plugin_path. skill-and-tool-validate output is identical on main and on this branch.
  • Suites: tools/dev 522 passed, skill-and-tool-validator 505 passed, ai-tutors 9 passed.
  • prek run on 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?

  • Yes — Claude Code (Opus 5.5)

I made this with help from Claude Code (Opus 5.5). I checked every line and tested it myself.

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)
Copilot AI balanced review requested due to automatic review settings November 27, 2026 01:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added family:pr-management pr-management-* skills family:security security-* skills family:setup setup-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs family:ci .github workflows, prek, validators family:release-management release-* skills family:contributor-growth contributor-growth skills family:mentoring mentoring skills family:pairing pairing skills family:utilities utilities skills substrate:framework-dev Tool substrate: build / validate / eval the framework itself labels Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:ci .github workflows, prek, validators family:contributor-growth contributor-growth skills family:docs Docs, MISSION.md, READMEs family:mentoring mentoring skills family:pairing pairing skills family:pr-management pr-management-* skills family:release-management release-* skills family:security security-* skills family:setup setup-* skills family:tools tools/* family:utilities utilities skills substrate:framework-dev Tool substrate: build / validate / eval the framework itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants