Skip to content

feat: link checker, self-healing sync, improved 404 page#9

Open
bychrisr wants to merge 4 commits intomainfrom
feat/link-checker-404-improvement
Open

feat: link checker, self-healing sync, improved 404 page#9
bychrisr wants to merge 4 commits intomainfrom
feat/link-checker-404-improvement

Conversation

@bychrisr
Copy link
Copy Markdown
Owner

Summary

  • scripts/check-links.mjs: Script ESM que escaneia todos os .mdx em content/ e reporta links internos quebrados. Suporta --section playbook|docs|all e --locale. Exit code 1 quando há links quebrados.
  • pr-validate.yml: Novo step após o build verifica links quebrados no playbook (conteúdo mantido manualmente). Links quebrados no docs/ sincronizado não bloqueiam PRs.
  • sync-content.yml: Auto-reparo em 4 etapas após o sync — detecta links quebrados, tenta corrigir via Claude Code CLI, re-verifica, abre GitHub Issue se não resolver. Requer secret ANTHROPIC_API_KEY.
  • app/not-found.tsx: Página 404 locale-aware que lê o cookie NEXT_LOCALE e exibe mensagem traduzida com links úteis para docs e playbook (PT-BR, EN, ES).

Test plan

  • node scripts/check-links.mjs --section playbook✓ No broken internal links found.
  • node scripts/check-links.mjs --section docs --locale pt-BR → reporta links quebrados com exit code 1
  • CI deste PR passa (build + link check playbook)
  • Acessar /qualquer-rota-inexistente → página 404 com links de navegação no locale correto
  • Adicionar secret ANTHROPIC_API_KEY nas GitHub Secrets do repo para ativar o auto-reparo no sync

🤖 Generated with Claude Code

- scripts/check-links.mjs: Node.js ESM script that scans all .mdx files in
  content/ and reports broken internal links (relative and absolute). Supports
  --section playbook|docs|all and --locale flags. Exit code 1 when broken
  links are found.
- pr-validate.yml: add link check step after build (playbook section only,
  to avoid false positives from pre-existing issues in synced docs)
- sync-content.yml: add four-step self-healing strategy after sync — detect
  broken links, attempt auto-repair via Claude Code CLI, re-check, open
  GitHub Issue if unresolved. Requires ANTHROPIC_API_KEY secret.
- app/not-found.tsx: locale-aware 404 page that reads NEXT_LOCALE cookie
  and renders translated messages with navigation links to docs and playbook

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aios-docs Error Error Feb 22, 2026 4:03am

…ecker

Remove the npx @anthropic-ai/claude-code step from sync-content.yml.
Add --fix mode to check-links.mjs: removes broken inline links and ref
definitions from MDX files, keeping the link text. Zero cost, no API key
needed. Runs deterministically in CI after every content sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove local --fix from CI. When broken links are detected after sync,
open a GitHub Issue with the full list for manual resolution.
Auto-repair with Claude Code is a separate local workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Links from synced aios-core content referenced files relative to the
original repository structure (e.g. ../CHANGELOG.md, ../../COMMUNITY.md)
that don't exist in the docs site. Removed link markup, kept text.

314 files fixed across pt-BR, en and es.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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