{"owner":"bazelbuild","repo":"bazel","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"files":{"AGENTS.md":"# Bazel Codebase Guide for Gemini\n\nWelcome to the Bazel repository. This document provides essential context and\nworkflows for working with the Bazel codebase.\n\n## 🏗️ Building & Running Bazel\n\nTo build Bazel from source, use a pre-installed `bazel` or `bazelisk` binary.\n\n*   **Fast Iteration Build (Recommended):** `bazel build //src:bazel-dev`\n*   **Standard Build:** `bazel build //src:bazel`\n\n### ⚡ Performance Tips\n\n*   **Remote Execution:** If you have access to a Remote Build Execution (RBE)\ncluster, use `--config=remote` to significantly speed up your builds:\n    ```bash\n    bazel build --config=remote //src:bazel-dev\n    ```\n\n### 🔄 Iterative Development Workflow\n\nTo test changes safely without interfering with your primary workspace,\nuse a separate binary and output base:\n\n1.  **Build and Copy:**\n    ```bash\n    bazel build //src:bazel-dev && cp bazel-bin/src/bazel-dev /tmp/bazel\n    ```\n2.  **Run commands:**\n    ```bash\n    /tmp/bazel --output_base=/tmp/ob-dev <command>\n    ```\n\n**Note:** Using a custom `--output_base` (e.g., `/tmp/ob-dev`) is crucial to\navoid locking your main workspace server and ensures your development\nenvironment remains isolated.\n\n## 🧪 Testing\n\nTests are located primarily in `src/test`.\n\n### Finding Relevant Tests\nIf you modify a file, find tests that transitively depend on it:\n```bash\nbazel query \"rdeps(//src/test/..., path/to/file.java)\"\n```\n\n### Running Tests\n\n*   **Unit Tests:** Typically `java_test` targets.\n*   **Integration Tests:**\n    *   Java-based: Subclasses of `BuildIntegrationTestCase`.\n    *   Shell-based: Located in `src/test/shell`, using a bash test framework.\n\n## 📜 Architecture & Codebase\n\nBazel uses a **Client/Server** architecture. The client (C++) is a lightweight\nwrapper that starts and communicates with a long-lived Java server.\n\n*   **Skyframe:** The incremental evaluation framework. Most core logic is\nimplemented as `SkyFunction`s evaluating `SkyKey`s into `SkyValue`s.\n*   **Starlark:** The configuration language used for `BUILD` and `.bzl` files.\n*   **Loading/Analysis/Execution:** The three phases of a Bazel command.\n\nFor architectural details or introspection capabilities,\nsee: `docs/contribute/codebase.mdx`\n\n## 🧹 Linting & Formatting\n\n*   **Java:** Follows Google Java Style.\n*   **Starlark:** Use `buildifier` for `BUILD` and `.bzl` files.\n"}}