Bazel
$ bazel Official Low RiskGoogle's hermetic, reproducible build and test tool for large multi-language repositories. Provides expressive dependency query commands and --build_event_json_file structured JSON build events, though JVM server warm-up and verbose output require careful flag tuning.
brew install bazelisk Runs sandboxed local builds, dependency queries, and test suites directly against workspace BUILD files.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports aquery --output=jsonproto, --build_event_json_file, --color=no, and --noshow_progress, though stdout is chatty without flags.
bazel aquery --output=jsonprotoemits JSON action graphs--build_event_json_filewrites structured BEP JSON
Hermetic sandboxing isolates build actions from host state and never mutates source files.
- Sandboxed action execution prevents stray host writes
Heavy JVM server binary (bazelisk wrapper recommended) with slow cold startup and large disk cache (~/.cache/bazel).
- Requires JVM server spin-up and substantial cache space
Unmatched incrementality and query power in massive polyglot monorepos.
bazel query/cquery/aqueryanalyze exact dependency graphs
Official Google-led Apache-2.0 build system.
- Active
bazelbuild/bazelLTS releases
Detailed reference docs at bazel.build, though Starlark/Bzlmod rules have a steep learning curve.
- Official docs at bazel.build/docs
Security, Auth & Guardrails
Local builds need no auth; remote caching/execution uses .netrc or Google credential helpers configured via .bazelrc.
Apache-2.0 open-source CLI; completely free (optional remote build farms are separate infrastructure).
# Bazel (bazel) Agent Rules - Always pass `--color=no --noshow_progress` in agent shells to prevent noisy progress output. - Use `bazel query` or `bazel aquery --output=jsonproto` before running broad `//...` builds. - Prefer `--build_event_json_file` for parsing test/build outcomes reliably.
Agent-Ready Command Recipes
Safe Read-Only Queries
bazel query 'rdeps(//..., //pkg/core:lib)' --output=label
Lists all targets depending on //pkg/core:lib without compiling anything.
bazel aquery //app:bin --output=jsonproto
Emits the exact build action graph and command lines as JSON.
Controlled Writes & Previews
bazel test //pkg/... --color=no --noshow_progress --build_event_json_file=/tmp/bep.json
Executes sandboxed tests cleanly without ANSI spinners and writes machine-readable Build Event Protocol JSON.
Strengths for Agents
- +
--build_event_json_fileandaquery --output=jsonprotoprovide rich structured build telemetry. - + Hermetic sandboxing makes test/build results highly reproducible.
- +
bazel querydiscovers impacted targets before building.
Caveats & Pitfalls
- ! Background JVM server startup and memory usage are heavy in constrained containers.
- ! Default stderr progress bars spam agent context unless
--noshow_progress --color=nois passed.