agentleFS
bazelbuildbazelbuild/bazel/AGENTS.md

bazel

AGENTS.md26k starsChanged 3 months agoApache-2.0View on GitHub

Welcome to the Bazel repository. This document provides essential context and workflows for working with the Bazel codebase. To build Bazel from source, use a pre-installed bazel or bazelisk binary. * Remote Execution: If you have access to a Remote Build Execution (RBE) cluster, use --config=remote to significantly speed up your builds: To test changes safely without interfering with your primary workspace, use a separate binary and output base: Note: Using a custom --output_base (e.g., /tmp/ob-dev) is crucial to avoid…

Trending

More talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 1 mention
Dec 2025Jun 2026Nov 2026
Mentions a month of the bazelbuild/bazel repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about bazelbuild/bazel

The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 53

Talked about on Stack Overflow, Hacker News, GitHub, YouTube, Bluesky and the web (53 times).

On Stack Overflow · 29

24 more on Stack Overflow

On Hacker News · 9

4 more on Hacker News

On GitHub · 8

3 more on GitHub

On YouTube · 5

On Bluesky · 1

On the web · 1

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Remote Execution: If you have access to a Remote Build Execution (RBE) cluster, use --config=remote to significantly speed up your builds:

    line 15
  2. Distinctive:

    If you modify a file, find tests that transitively depend on it:

    line 44
  3. Very specific:

    Starlark: Use buildifier for BUILD and .bzl files.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Bazel Codebase Guide for Gemini

Welcome to the Bazel repository. This document provides essential context and workflows for working with the Bazel codebase.

🏗️ Building & Running Bazel

To build Bazel from source, use a pre-installed bazel or bazelisk binary.

  • Fast Iteration Build (Recommended): bazel build //src:bazel-dev
  • Standard Build: bazel build //src:bazel

⚡ Performance Tips

  • Remote Execution: If you have access to a Remote Build Execution (RBE) cluster, use --config=remote to significantly speed up your builds:
    bazel build --config=remote //src:bazel-dev

🔄 Iterative Development Workflow

To test changes safely without interfering with your primary workspace, use a separate binary and output base:

  1. Build and Copy:
    bazel build //src:bazel-dev && cp bazel-bin/src/bazel-dev /tmp/bazel
  2. Run commands:
    /tmp/bazel --output_base=/tmp/ob-dev <command>

Note: Using a custom --output_base (e.g., /tmp/ob-dev) is crucial to avoid locking your main workspace server and ensures your development environment remains isolated.

🧪 Testing

Tests are located primarily in src/test.

Finding Relevant Tests

If you modify a file, find tests that transitively depend on it:

bazel query "rdeps(//src/test/..., path/to/file.java)"

Running Tests

  • Unit Tests: Typically java_test targets.
  • Integration Tests:
    • Java-based: Subclasses of BuildIntegrationTestCase.
    • Shell-based: Located in src/test/shell, using a bash test framework.

📜 Architecture & Codebase

Bazel uses a Client/Server architecture. The client (C++) is a lightweight wrapper that starts and communicates with a long-lived Java server.

  • Skyframe: The incremental evaluation framework. Most core logic is implemented as SkyFunctions evaluating SkyKeys into SkyValues.
  • Starlark: The configuration language used for BUILD and .bzl files.
  • Loading/Analysis/Execution: The three phases of a Bazel command.

For architectural details or introspection capabilities, see: docs/contribute/codebase.mdx

🧹 Linting & Formatting

  • Java: Follows Google Java Style.
  • Starlark: Use buildifier for BUILD and .bzl files.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.