Bazel Docs — Claude Context
What this repo is
Pipeline that syncs pre-converted MDX docs frombazelbuild/bazel and deploys them via Mintlify at https://preview.bazel.build. It also auto-generates PR previews for upstream doc changes and comments on those PRs.
Tech stack
- GitHub Actions — CI/CD orchestration
- Bazel — builds reference docs (Starlark/Java API)
- MDX — doc format, sourced directly from
upstream/docs/ - Mintlify — renders and hosts the docs; each branch deploys to
https://bazel-<branch>.mintlify.app - Git submodule (
upstream/) — tracksbazelbuild/bazel - Python (
docs2mdx.pyinbazelbuild/bazel) — converts Starlark/Java API docs; upstream builds reference docs viagen_reference_docsBazel target
Key files
Sync pipeline (pull-from-bazel-build.yml)
- Checkout repo +
upstreamsubmodule - Optionally checkout specific Bazel commit
- Detect upstream doc changes (if
detect_upstream_docs_changesis set) bazel build //src/main/java/com/google/devtools/build/lib:gen_reference_docs→reference-docs.ziprsync upstream/docs/ .— copies pre-converted MDX files (includingversions/fromupstream/docs/versions/)- Unzip
reference-docs.zip— extracts Starlark/Java API reference docs navigation.update.sh— regenerates nav (navigation.json+navigation/*.en.json; version list fromupstream/docs/versions/subdirs)- Strip
.mintignoreentries fromdocs.jsonnavigation - Commit + push with
[skip ci]to prevent re-trigger loop
generate-docs.yml (PRs to this repo)
Only runs the sync pipeline when the PR bumps theupstream submodule pointer (e.g. Dependabot). PRs that only touch pipeline files (workflows, .mintignore, etc.) skip the sync to keep the PR diff clean.
Broken MDX files
Files with MDX syntax errors that Mintlify cannot parse are listed in.mintignore (gitignore syntax). Mintlify skips them at deploy time. They still exist in the repo for reference. See issue #226 for fixing them properly.
- Wildcard patterns supported: e.g.
rules/lib/repo/*.mdx - The nav step also removes these from
docs.jsonso they don’t appear as broken nav links - Versioned nav entries (e.g.
versions/8.4.2/query/language) are NOT cleaned up — left as a known TODO
Required secrets
Commit conventions
feat, fix, chore, docs, refactor. Keep messages succinct.
Agent skills (docs migration)
For bazel.build migration work (issue #30598 and related):- Manager:
agent-skills/bazel-docs-migration-manager/SKILL.md - Worker:
agent-skills/bazel-docs-fix-worker/SKILL.md - Verification:
scripts/verify_mintlify_preview.mjs
.claude/skills/ and .cursor/skills/ → agent-skills/. See also AGENTS.md.
Working norms
- Always ask before editing the PR description.
- Read files before suggesting changes to them.
- Do not commit the
upstreamsubmodule pointer unless explicitly updating the pinned ref.