# Aspect Build: Docs

## Docs

### Get started

- [Introduction](https://aspect.build/docs/index.md): What Aspect builds for Bazel teams, and where to start.
- [Quickstart](https://aspect.build/quickstart.md): Install the Aspect CLI, connect a Bazel repo and its CI to Aspect Cloud's remote cache and Build Results UI, then customize tasks with config.axl and write your first custom AXL task.
- [Aspect docs in your AI assistant](https://aspect.build/docs/cli/guides/mcp.md): Connect Claude, Claude Code, Codex, Cursor, or VS Code to the Aspect docs MCP server so your AI assistant can search and cite Aspect documentation.

### Platform

- [Aspect Workflows](https://aspect.build/docs/aspect-workflows/platform/overview.md): Aspect Workflows gives Bazel a remote cache, the Build Results UI, remote execution, CI runners and selective delivery. Start free on Aspect Cloud, or run an isolated Aspect Enterprise deployment. The Aspect CLI and rulesets are free and open source.
- [Choosing Aspect Cloud or Aspect Enterprise](https://aspect.build/docs/aspect-workflows/platform/choosing.md): Compare Aspect Cloud with Aspect Enterprise, hosted by Aspect or self-hosted, on isolation, data ownership, who operates it, and what you can configure.

#### Features

- [Remote cache](https://aspect.build/docs/aspect-workflows/platform/features/remote-cache.md): A Bazel remote cache for CI and developer machines: one shared cache on Aspect Cloud, or an isolated cache of your own on Aspect Enterprise.
- [Remote execution](https://aspect.build/docs/aspect-workflows/platform/features/remote-execution.md): Aspect Workflows remote execution, implementing the Bazel REv2 protocol to parallelize actions across remote workers.
- [CI runners](https://aspect.build/docs/aspect-workflows/platform/features/ci-runners.md): Persistent, NVMe-backed self-hosted CI runners from Aspect Workflows that keep Bazel's output base warm across jobs for faster CI builds.
- [Build Results UI](https://aspect.build/docs/aspect-workflows/platform/features/webui.md): The Aspect Workflows Build Results UI: a live build feed, per-build timing, cache and execution breakdowns, searchable logs, per-target artifacts and JUnit results, cross-build target trends, and build comparison.
- [Selective delivery](https://aspect.build/docs/aspect-workflows/platform/features/selective-delivery.md): Push only the artifacts whose Bazel output digests changed, to your bucket or container registry.
- [Supported build systems](https://aspect.build/docs/aspect-workflows/platform/features/build-systems.md): Which Aspect Workflows capabilities work with Bazel, Buck2, Pants and other build systems that speak the Remote Execution API.

#### Guides

- [Connect an AI assistant to build results with MCP](https://aspect.build/docs/aspect-workflows/platform/guides/build-results-mcp.md): Point Claude Code, Claude Desktop, Codex, Cursor, or VS Code at the Aspect CLI's MCP server so your AI assistant can read build and test results from your Aspect Workflows deployment.
- [Query build results with the REST API](https://aspect.build/docs/aspect-workflows/platform/guides/build-results-api.md): Read the build data behind the Build Results UI from your own tooling or AI agents: authentication with the Aspect CLI, addressing builds, logs, targets, and cross-invocation statistics.
- [Build Results UI repository setup](https://aspect.build/docs/aspect-workflows/platform/guides/webui-repository-setup.md): Set the build metadata keys the Aspect Workflows Build Results UI reads, and the Bazel flags that populate its Timing, Artifacts, and dependency views.
- [Parallelize remote execution](https://aspect.build/docs/aspect-workflows/platform/guides/parallelization.md): Bazel remote execution tuning: avoid client-side throttling so remote execution workers run more actions in parallel.
- [Targeting remote execution worker pools](https://aspect.build/docs/aspect-workflows/platform/guides/remote-execution-worker-pools.md): How a Bazel platform's exec_properties select an Aspect Workflows remote execution worker pool, why REv2 platform matching is whole-set equality, and how to route actions to Arm, macOS or larger pools.
- [macOS remote execution](https://aspect.build/docs/aspect-workflows/platform/guides/macos-remote-execution.md): Run iOS, macOS and other Apple-platform Bazel actions on remote execution: bare-metal Mac workers in the same cluster as Linux, lazy NFSv4 input fetching, and several concurrent actions per host.
- [Optimizing CI runners](https://aspect.build/docs/aspect-workflows/platform/guides/optimizing-ci-runners.md): Tune Aspect Workflows CI runners for CI speed and cost: instance size, runner group scaling and warming.

#### Benchmarks

- [AOSP build benchmark on Aspect Workflows](https://aspect.build/docs/aspect-workflows/platform/benchmarks/aosp-remote-execution.md): Measured results for a full AOSP android-14.0.0_r22 build on a self-hosted Aspect Enterprise deployment, with complete infrastructure configuration and links to the public CI runs.

### Aspect Cloud

- [Aspect Cloud](https://aspect.build/docs/aspect-workflows/cloud/overview.md): Aspect Cloud runs Aspect Workflows as a multi-tenant service: a shared Bazel remote cache and the Build Results UI, with nothing to provision, starting at $0.
- [Aspect Cloud local setup](https://aspect.build/docs/aspect-workflows/cloud/local-setup.md): Connect your machine to Aspect Cloud: log in once, then build with aspect --remote or point vanilla bazel at the shared remote cache and Build Results UI.
- [Aspect Cloud CI setup](https://aspect.build/docs/aspect-workflows/cloud/ci-setup.md): Give the CI runners you already have a shared Bazel remote cache and build history, with a packaged setup integration for GitHub Actions, Buildkite, CircleCI and GitLab, or a few shell commands on any other CI.

### Aspect Enterprise

- [Aspect Enterprise](https://aspect.build/docs/aspect-workflows/enterprise/overview.md): Aspect Enterprise is an isolated Aspect Workflows deployment for one organization: remote execution, remote cache, CI runners and the Build Results UI, in your own AWS account or GCP project or hosted by Aspect, and operated by Aspect.
- [Remote execution on Aspect Enterprise](https://aspect.build/docs/aspect-workflows/enterprise/remote-execution.md): The remote execution fleet in an Aspect Enterprise deployment: worker pools with their own images, instance types and platforms, including GPU and macOS; how pools scale; and what you configure.
- [Remote cache on Aspect Enterprise](https://aspect.build/docs/aspect-workflows/enterprise/remote-cache.md): The remote cache in an Aspect Enterprise deployment: an autoscaling cache tier on object storage, on the private network beside CI runners and remote execution, with an external endpoint for developers and CI outside the deployment.
- [CI runners on Aspect Enterprise](https://aspect.build/docs/aspect-workflows/enterprise/ci-runners.md): Aspect Workflows CI runners on Aspect Enterprise: persistent, auto-scaling runners for GitHub Actions, Buildkite, GitLab and CircleCI that keep Bazel warm between jobs and sit next to the deployment's remote cache and remote execution.
- [Estimating capacity](https://aspect.build/docs/aspect-workflows/enterprise/capacity.md): How to make a first estimate of the CI runner and remote execution vCPUs an Aspect Enterprise deployment needs, starting from your current CI, with a worked example.
- [Aspect Enterprise trial](https://aspect.build/docs/aspect-workflows/enterprise/trial.md): A 30-day trial of Aspect Enterprise measures your existing Bazel build on remote execution and the remote cache against your current CI, on the same commits: what to measure, how to set up the comparison, and how to compare fairly.

#### Deployment options

- [Hosted by Aspect](https://aspect.build/docs/aspect-workflows/enterprise/deployment-options/hosted.md): Aspect Enterprise hosted in Aspect's cloud: an isolated Aspect Workflows deployment for your organization, provisioned and operated by Aspect. What Aspect runs, what stays yours, what you provide and what you can configure.
- [Self-hosted Aspect Enterprise](https://aspect.build/docs/aspect-workflows/enterprise/deployment-options/self-hosted.md): Self-hosted Aspect Enterprise runs Aspect Workflows in your own AWS account or GCP project: isolated infrastructure, with your data in your own account. Cloud, operating model, network topology, identity and hardware options.

#### Customer docs

- [Aspect Enterprise customer docs](https://aspect.build/docs/aspect-workflows/enterprise/customers/overview.md): Setup, operations and release notes for your Aspect Enterprise deployment, with your login and Enterprise account settings.

### Aspect CLI

- [Aspect CLI](https://aspect.build/docs/cli/overview.md): Overview of the Aspect CLI, an open-source task runner extending Bazel with built-in workflows for format, lint, gazelle, delivery, and AXL tasks.
- [AXL, the Aspect Extension Language](https://aspect.build/docs/cli/axl.md): Configure the Aspect CLI, write custom tasks, extend BUILD file generation and subscribe to build events in a Starlark dialect Bazel users already know.
- [Install the Aspect CLI](https://aspect.build/docs/cli/install.md): Install the Aspect CLI on macOS or Linux via curl, Homebrew, direnv, GitHub Actions, or manual download to launch the right Bazel version.
- [Pin the Aspect CLI version](https://aspect.build/docs/cli/version-pinning.md): Pin the Aspect CLI version per repository with .aspect/version.axl, configure custom download sources, and decouple updates from CI runner upgrades.
- [Authenticating the Aspect CLI](https://aspect.build/docs/cli/authentication.md): One Aspect account, signed in with aspect auth login on your machine and an ASPECT_API_TOKEN on CI, for Aspect Cloud's remote cache and for status checks and comments on GitHub and GitLab.
- [GitHub App](https://aspect.build/docs/cli/authentication-github.md): Install and link the Aspect Workflows GitHub App so authenticated Aspect CLI features can post live status checks and inline lint comments on your GitHub pull requests.
- [GitLab App](https://aspect.build/docs/cli/authentication-gitlab.md): Link the Aspect Workflows GitLab App to your GitLab top-level group so authenticated Aspect CLI features can post commit statuses, rolling MR notes, and inline lint comments.
- [Aspect CLI tasks](https://aspect.build/docs/cli/tasks.md): Overview of built-in Aspect CLI AXL tasks including aspect build, test, format, lint, delivery, gazelle, and buildifier on any Bazel CI system.
- [Running tasks in CI](https://aspect.build/docs/cli/tasks-ci.md): Run Aspect CLI tasks in CI with ready-to-paste YAML for GitHub Actions, Buildkite, GitLab CI, and CircleCI, covering retries and status checks.

#### Build & test

- [aspect build & test](https://aspect.build/docs/cli/tasks/build_test.md): Run aspect build and aspect test to wrap Bazel with auto-configured flags, status checks, artifact upload, coverage, and CI integration examples.
- [aspect run](https://aspect.build/docs/cli/tasks/run.md): Build a Bazel target and run its binary with aspect run, adding the Aspect CLI task lifecycle and CI status reporting to what bazel run does.

#### Formatting & linting

- [aspect format](https://aspect.build/docs/cli/tasks/format.md): Run formatters on changed or all files with aspect format, covering Bazel change detection, git snapshot diffing, config.axl, and CI examples.
- [aspect buildifier](https://aspect.build/docs/cli/tasks/buildifier.md): Format Starlark BUILD, MODULE.bazel, and .bzl files with aspect buildifier, configured via format.alias() and buildifier_prebuilt in the Aspect CLI.
- [aspect lint](https://aspect.build/docs/cli/tasks/lint.md): Run aspect lint with rules_lint aspects, SARIF diagnostics, the hold-the-line strategy, GitHub PR annotations, and Bazel-cached lint results in CI.

#### BUILD file generation

- [aspect gazelle](https://aspect.build/docs/cli/tasks/gazelle.md): Keep Bazel BUILD files in sync with aspect gazelle, covering incremental scope, smart escalation, diff-mode detection, and Aspect CLI CI examples.

#### Delivery

- [aspect delivery](https://aspect.build/docs/cli/tasks/delivery.md): Deliver Bazel artifacts selectively with aspect delivery using content-hash change detection, deliveryd state tracking, dry-run, and CI examples.

#### Affected targets

- [aspect cache diff](https://aspect.build/docs/cli/tasks/cache_diff.md): Determine which test targets are affected by the current source tree by mining a single remote-cache probe with aspect cache diff, which runs no tests.

#### Agents

- [aspect mcp](https://aspect.build/docs/cli/tasks/mcp.md): aspect mcp runs a Model Context Protocol server over stdio that gives AI agents read-only access to builds, logs, targets and cross-build statistics from Aspect Workflows.

#### CI runners

- [aspect ci warming](https://aspect.build/docs/cli/tasks/ci_warming.md): Pre-populate a CI runner's Bazel caches with aspect ci warming, then upload them as the warming archive on Aspect Workflows runners.
- [aspect ci runner-health-check](https://aspect.build/docs/cli/tasks/ci_runner_health_check.md): Run the Aspect Workflows runner health check on demand: wait for warming, print the last check, and probe the runner's Bazel server.
- [aspect ci runner-metadata](https://aspect.build/docs/cli/tasks/ci_runner_metadata.md): Print the Aspect Workflows runner metadata table: cloud, region and instance, cache and storage paths, warming status, and the bootstrap-logs command.

#### Setup

- [aspect init](https://aspect.build/docs/cli/tasks/init.md): Scaffold a new Bazel workspace with aspect init: pick a language preset, choose a template source, and let tools/repin materialize the lockfiles.
- [aspect axl add](https://aspect.build/docs/cli/tasks/axl_add.md): Add an AXL module from a GitHub release to MODULE.aspect, with the archive's integrity hash computed for you.
- [aspect setup bazelrc](https://aspect.build/docs/cli/tasks/setup_bazelrc.md): Write a Bazel rc that points vanilla bazel invocations at an Aspect deployment's remote cache, BES and remote execution, with every flag in a named --config group.
- [aspect setup tools-bazel-wrapper](https://aspect.build/docs/cli/tasks/setup_tools_bazel_wrapper.md): Drop a tools/bazel wrapper into your workspace so bazel routes through the Aspect CLI for the verbs it wraps, and to vanilla Bazel for everything else.
- [aspect setup workspace-data](https://aspect.build/docs/cli/tasks/setup_workspace_data.md): Attribute vanilla bazel invocations in the Build Results UI by pointing --workspace_status_command at the Aspect CLI.

#### Housekeeping

- [aspect output-bases](https://aspect.build/docs/cli/tasks/output_bases.md): List the Bazel output bases on a machine with their state, Bazel server memory, git branch, workspace and size, with aspect output-bases.
- [aspect gc](https://aspect.build/docs/cli/tasks/gc.md): Remove Bazel output bases whose workspace is gone or that have gone unused, and prune the download cache, with aspect gc.

#### Misc

- [aspect version](https://aspect.build/docs/cli/tasks/version.md): Print the Aspect CLI version the launcher resolved for this repository, and tell it apart from the launcher's own version.

#### Worktrees

- [Aspect CLI worktrees](https://aspect.build/docs/cli/worktrees.md): Reuse git worktrees at stable paths so Bazel keeps its server, analysis cache and external repositories between them, instead of paying a cold build per worktree.
- [aspect worktree add](https://aspect.build/docs/cli/worktrees/add.md): Take a git worktree from a pool of reused paths with aspect worktree add, so Bazel's server, analysis cache and external repositories are already in place.
- [aspect worktree release](https://aspect.build/docs/cli/worktrees/release.md): End the lease on a pooled worktree and return its slot to the pool, leaving the slot path in place so Bazel's server and output base survive for the next one.
- [aspect worktree list](https://aspect.build/docs/cli/worktrees/list.md): Show every slot in this repository's worktree pool with the branch holding it and whether its Bazel server and output base are still there.
- [aspect worktree path](https://aspect.build/docs/cli/worktrees/path.md): Print the directory a pooled worktree lives in, and nothing else, so a shell can step into it.
- [aspect worktree prune](https://aspect.build/docs/cli/worktrees/prune.md): Delete pooled worktree slots and their Bazel output bases: name one to delete it however recently it was used, or name nothing to reclaim every free slot that has gone stale.
- [aspect worktree inspect](https://aspect.build/docs/cli/worktrees/inspect.md): Report a slot, named or the one the working directory is in: its Bazel output base, whether a server holds it, how many worktrees it has held, who has had them, and its checkout.
- [Agent skill: pooled worktrees](https://aspect.build/docs/cli/worktrees/agent-skill.md): Instructions you can give a coding agent so it uses aspect worktree correctly: the safety boundary, how to take and release a slot, and when to hold work rather than discard it.
- [Which agent holds a slot](https://aspect.build/docs/cli/worktrees/agents.md): How the pool works out which coding agent holds each slot, what each harness reports, and why some sessions can be resumed and reclaimed while others can only be named.

#### Guides

- [Working in parallel with warm worktrees](https://aspect.build/docs/cli/guides/worktrees.md): A guide to running several branches or agents side by side with aspect worktree, so each one starts with Bazel's server, analysis cache and external repositories already in place.
- [Add and customize tips](https://aspect.build/docs/cli/guides/tips.md): Surface actionable Aspect CLI tips in the terminal, GitHub checks, Buildkite, and PR comments with add_tip and the tip_suggestion hook in config.axl.
- [How to customize CI status surfaces](https://aspect.build/docs/cli/guides/status-surfaces.md): Customize what Aspect CLI reports on GitHub checks, PR and MR summary comments, GitLab commit statuses, and Buildkite annotations — with presets, templates, or by intercepting each write with a hook.
- [Collect and publish code coverage](https://aspect.build/docs/cli/guides/coverage.md): Collect Bazel code coverage with aspect test --coverage and publish the merged LCOV report to Codecov from Buildkite, GitLab CI, CircleCI, or GitHub Actions.
- [Customize repro & fix suggestions](https://aspect.build/docs/cli/guides/repro-fix-suggestions.md): Accept, reject, or rewrite Aspect CLI repro and fix command suggestions emitted by built-in Bazel tasks using Phases in config.axl.
- [Customize the delivery manifest](https://aspect.build/docs/cli/guides/delivery-manifest.md): Customize the Aspect CLI delivery manifest with DeliveryTrait hooks in config.axl to enrich targets, render files, upload artifacts, and act on output.
- [Extend Gazelle BUILD file generation](https://aspect.build/docs/cli/guides/gazelle.md): Write Starlark Gazelle extensions with Orion to generate Bazel BUILD files via the Aspect CLI without depending on Gazelle's Go extension API.
- [Generate a GitHub App token](https://aspect.build/docs/cli/tasks/github_token.md): Mint a short-lived token from the Aspect Workflows GitHub App for one repository, optionally narrowed to specific roles, and print it to stdout.
- [Listen for build events](https://aspect.build/docs/cli/guides/build-events.md): Subscribe AXL extensions to Bazel's Build Event Service (BES) stream, iterating events from aspect build and aspect test inside the Aspect CLI.
- [Run and define tasks](https://aspect.build/docs/cli/guides/basic.md): Run built-in Aspect CLI tasks, see how the CLI discovers AXL extensions, and write a custom Bazel task with typed arguments.
- [Run code before and after a task](https://aspect.build/docs/cli/guides/task-hooks.md): Run AXL before and after any Aspect CLI task with ctx.hooks.pre_task and ctx.hooks.post_task. Post-task hooks get the TaskConclusion, even on error.
- [Drive the CLI from scripts and AI agents](https://aspect.build/docs/cli/guides/agents.md): Drive the Aspect CLI from scripts and AI agents with aspect describe, JSON auth status, pipe-safe output, and the aspect mcp build results server.
- [Reclaim disk and memory from Bazel](https://aspect.build/docs/cli/guides/reclaim-disk.md): Find what Bazel is holding on a machine with aspect output-bases and reclaim it with aspect gc, by hand or on a schedule.
- [Use external AXL modules](https://aspect.build/docs/cli/guides/module.md): Reuse AXL extension code across repositories with MODULE.aspect declarations, the Aspect CLI's external module system for Bazel-style dependencies.

#### Reference

- [Built-in features reference](https://aspect.build/docs/cli/reference/features.md): Reference for the Aspect CLI's built-in features: what each one does, its flags and defaults, and how to set them per invocation or per repository.

##### AXL reference

- [Types](https://aspect.build/docs/axl/types.md)
- [Builtins](https://aspect.build/docs/axl/builtins.md)
- [TaskContext](https://aspect.build/docs/axl/types/task_context.md)
- [TaskInfo](https://aspect.build/docs/axl/types/task_info.md)
- [FeatureContext](https://aspect.build/docs/axl/types/feature_context.md)
- [ConfigContext](https://aspect.build/docs/axl/types/config_context.md)
- [Http](https://aspect.build/docs/axl/types/http.md)
- [Future](https://aspect.build/docs/axl/types/future.md)

#### Migrating from YAML tasks

- [Migrating from YAML tasks](https://aspect.build/docs/cli/migration.md): Migration guide for Aspect Workflows customers moving from legacy Rosetta YAML tasks to AXL-driven Aspect CLI tasks like aspect build and test.
- [aspect build and aspect test](https://aspect.build/docs/cli/migration/build_test.md): Migrate the Workflows 5.x Rosetta build and test tasks to aspect build and aspect test in CI, covering the Workflows feature, GithubStatusChecks, and ArtifactUpload setup.
- [aspect delivery](https://aspect.build/docs/cli/migration/delivery.md): Migrate the Workflows 5.x Rosetta delivery and delivery_manifest tasks to a single aspect delivery command with selective change detection in the Aspect CLI.
- [aspect format](https://aspect.build/docs/cli/migration/format.md): Migrate the Workflows 5.x Rosetta format task to aspect format, configuring rules_lint formatter targets and change detection in config.axl for Aspect CLI CI runs.
- [aspect buildifier](https://aspect.build/docs/cli/migration/buildifier.md): Migrate the Workflows 5.x Rosetta buildifier task to aspect buildifier with format.alias() in config.axl, using buildifier_prebuilt to format Bazel Starlark files.
- [aspect gazelle](https://aspect.build/docs/cli/migration/gazelle.md): Migrate the Workflows 5.x Rosetta gazelle and configure tasks to aspect gazelle, configuring BUILD file synchronization and check mode in Aspect CLI config.axl.
- [aspect lint](https://aspect.build/docs/cli/migration/lint.md): Migrate the Workflows 5.x Rosetta lint task to aspect lint with rules_lint aspects, SARIF diagnostics, and GithubLintComments PR annotations from the Aspect CLI.
- [aspect ci warming](https://aspect.build/docs/cli/migration/warming.md): Migrate the Workflows 5.x rosetta run warming + warming_archive two-step to a single aspect ci warming task on Aspect Workflows runners.

### Bazel

- [Bazel rules and guides](https://aspect.build/docs/bazel/index.md): Aspect's open-source Bazel rulesets for Python, JavaScript, TypeScript and linting, and guides for getting more out of Bazel.
- [Linting and formatting](https://aspect.build/docs/bazel/linting.md)

#### Python

- [Python with Bazel](https://aspect.build/docs/bazel/python/index.md): Build, test, and containerize Python projects with Bazel using aspect_rules_py, rules_python, uv lockfiles, and hermetic python-build-standalone interpreters.
- [Migrate from rules_python](https://aspect.build/docs/bazel/python/migrating.md): Migrate Bazel Python projects from rules_python to aspect_rules_py: drop-in py_binary, py_library, py_test rules plus optional uv for dependencies.
- [Manage dependencies with uv](https://aspect.build/docs/bazel/python/uv.md): Use uv with Bazel aspect_rules_py for Python dependency management: cross-platform uv.lock lockfiles and container builds.
- [Virtual dependencies](https://aspect.build/docs/bazel/python/virtual_deps.md): Bazel aspect_rules_py virtual deps with uv dependency-groups: resolve conflicting Python package versions in a monorepo and switch sets via a flag.
- [Python interpreter provisioning](https://aspect.build/docs/bazel/python/python-interpreter.md): Bazel aspect_rules_py interpreter provisioning preview backed by python-build-standalone (PBS), replacing rules_python python.toolchain interpreter management.

##### API reference

- [@aspect_rules_lint//lint:flake8.bzl](https://aspect.build/docs/bazel/python/aspect_rules_lint/lint_flake8.md): Bazel rules_lint flake8 integration: lint_flake8_aspect to run the flake8 Python linter as a Bazel aspect over py_library and other Python rules.
- [@aspect_rules_lint//lint:pylint.bzl](https://aspect.build/docs/bazel/python/aspect_rules_lint/lint_pylint.md): Bazel rules_lint Pylint integration: lint_pylint_aspect to run the Pylint Python linter as a Bazel aspect across py_binary, py_library, and py_test.
- [@aspect_rules_lint//lint:ruff.bzl](https://aspect.build/docs/bazel/python/aspect_rules_lint/lint_ruff.md): Bazel rules_lint Ruff integration: lint_ruff_aspect to run the Ruff Python linter and formatter as a Bazel aspect across py_binary, py_library, py_test.
- [@aspect_rules_lint//lint:ty.bzl](https://aspect.build/docs/bazel/python/aspect_rules_lint/lint_ty.md): Bazel rules_lint Ty integration: lint_ty_aspect to run the Ty Python type checker as a Bazel aspect across py_binary, py_library, and py_test rules.
- [@aspect_rules_py//py:defs.bzl](https://aspect.build/docs/bazel/python/aspect_rules_py/py_defs.md): Bazel rules_py public API: re-implemented py_binary, py_library, py_test, and py_pytest_main rules with hermetic Python toolchain version selection.
- [@aspect_rules_py//py:repositories.bzl](https://aspect.build/docs/bazel/python/aspect_rules_py/py_repositories.md): Bazel rules_py repository rules to declare and fetch rules_py runtime dependencies for legacy WORKSPACE-based Python projects without bzlmod.
- [@aspect_rules_py//py:toolchains.bzl](https://aspect.build/docs/bazel/python/aspect_rules_py/py_toolchains.md): Bazel rules_py toolchain helpers including register_autodetecting_python_toolchain to autodetect a local Python interpreter compatible with rules_py.
- [@aspect_rules_py//py/unstable:defs.bzl](https://aspect.build/docs/bazel/python/aspect_rules_py/py_unstable_defs.md): Bazel rules_py preview API with py_venv and other unstable Python rules; APIs may change between releases until promoted to stable in rules_py.

#### JavaScript and TypeScript

- [JavaScript and TypeScript](https://aspect.build/docs/bazel/javascript/index.md): Build JavaScript and TypeScript with Bazel using rules_js, rules_ts, pnpm workspaces, Jest, esbuild, webpack, and Next.js integrations.
- [rules_js](https://aspect.build/docs/bazel/javascript/rules_js.md): Bazel rules_js usage guide: practical patterns for linking node_modules, running JavaScript programs, packaging, and using npm dependencies in Bazel.
- [pnpm and rules_js](https://aspect.build/docs/bazel/javascript/pnpm_rules_js.md): Bazel rules_js pnpm integration guide: how npm_translate_lock and npm_import use pnpm-lock.yaml to fetch and link JavaScript npm packages reproducibly.
- [TypeScript with Bazel](https://aspect.build/docs/bazel/javascript/typescript.md): Bazel TypeScript guide for rules_ts: configure ts_project, swap the transpiler for swc or esbuild, share tsconfig.json, and integrate with rules_js.
- [Isolated declarations](https://aspect.build/docs/bazel/javascript/isolated-declarations.md): Bazel rules_ts guide to TypeScript isolatedDeclarations: parallelize type-check actions for JavaScript monorepos by emitting .d.ts without full type checks.

##### API reference

- [@aspect_rules_cypress//cypress:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_cypress/cypress_defs.md): Bazel rules_cypress public API reference: cypress_test macro and re-exports for running Cypress end-to-end JavaScript tests under Bazel with rules_js.
- [@aspect_rules_cypress//cypress:extensions.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_cypress/cypress_extensions.md): Bazel rules_cypress bzlmod module extensions to register the Cypress toolchain and dependencies in MODULE.bazel for JavaScript end-to-end testing.
- [@aspect_rules_esbuild//esbuild:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_esbuild/esbuild_defs.md): Bazel rules_esbuild public API: esbuild_bundle rule for bundling JavaScript and TypeScript with the esbuild compiler under Bazel and rules_js.
- [@aspect_rules_jasmine//jasmine:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_jasmine/jasmine_defs.md): Bazel rules_jasmine public API: jasmine_test rule and jasmine_test_rule for running JavaScript unit tests with the Jasmine framework under Bazel.
- [@aspect_rules_jest//jest:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_jest/jest_defs.md): Bazel rules_jest public API: jest_test rule for running Jest JavaScript and TypeScript unit tests with sharding, filtering, and snapshot updates.
- [@aspect_rules_js//contrib/nextjs:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_js/contrib_nextjs_defs.md): Bazel rules_js contrib API for Next.js: macros to build, dev, start, and export Next.js JavaScript applications using a next_js_binary target.
- [@aspect_rules_js//js:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_js/js_defs.md): Bazel rules_js core API: js_library, js_binary, js_test, js_run_binary, and js_image_layer rules for running JavaScript programs under Bazel.
- [@aspect_rules_js//js:proto.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_js/js_proto.md): Bazel rules_js experimental Protobuf and gRPC support: js_proto_library rule generating JavaScript and TypeScript code from .proto files via protoc plugins.
- [@aspect_rules_js//npm:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_js/npm_defs.md): Bazel rules_js npm API: rules for fetching and linking npm dependencies and packaging or linking first-party JavaScript packages from pnpm workspaces.
- [@aspect_rules_js//npm:extensions.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_js/npm_extensions.md): Bazel rules_js bzlmod extensions including npm_translate_lock and npm_import for resolving pnpm lockfiles and fetching npm packages in MODULE.bazel.
- [@aspect_rules_lint//lint:eslint.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_lint/lint_eslint.md): Bazel rules_lint ESLint integration: lint_eslint_aspect for running ESLint as a Bazel aspect over JavaScript and TypeScript rules_js targets.
- [@aspect_rules_lint//lint:stylelint.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_lint/lint_stylelint.md): Bazel rules_lint Stylelint integration: lint_stylelint_aspect to run Stylelint as a Bazel aspect against CSS sources tagged for linting.
- [@aspect_rules_rollup//rollup:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_rollup/rollup_defs.md): Bazel rules_rollup public API: rollup_bundle wrapper macro for bundling JavaScript and TypeScript with Rollup under Bazel and rules_js.
- [@aspect_rules_swc//swc:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_swc/swc_defs.md): Bazel rules_swc API: swc rule and macros to compile TypeScript and JavaScript with the SWC CLI under Bazel using .swcrc configuration.
- [@aspect_rules_swc//swc:dependencies.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_swc/swc_dependencies.md): Bazel rules_swc Starlark helper to fetch rules_swc workspace dependencies for non-bzlmod users; superseded by bzlmod on Bazel 6.0 and above.
- [@aspect_rules_swc//swc:providers.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_swc/swc_providers.md): Bazel rules_swc Starlark providers for building derivative SWC rules that compose with rules_swc compilation of TypeScript and JavaScript targets.
- [@aspect_rules_swc//swc:repositories.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_swc/swc_repositories.md): Bazel rules_swc repository rules for fetching the SWC toolchain, including swc_register_toolchains and swc_version_from for syncing JavaScript SWC versions.
- [@aspect_rules_swc//swc:toolchain.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_swc/swc_toolchain.md): Bazel rules_swc Starlark toolchain rule swc_toolchain that exposes the SWC compiler binary to Bazel for JavaScript and TypeScript transpilation.
- [@aspect_rules_ts//ts:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_ts/ts_defs.md): Bazel rules_ts public API for TypeScript: ts_project macro that type-checks and transpiles TypeScript sources to JavaScript or .d.ts declaration outputs.
- [@aspect_rules_ts//ts:extensions.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_ts/ts_extensions.md): Bazel rules_ts bzlmod module extensions for registering the TypeScript compiler version and dependencies of rules_ts in your MODULE.bazel file.
- [@aspect_rules_ts//ts:proto.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_ts/ts_proto.md): Bazel rules_ts unstable Protobuf and gRPC support: ts_proto_library rule using bufbuild Connect to generate TypeScript code for Web and Node.js.
- [@aspect_rules_webpack//webpack:defs.bzl](https://aspect.build/docs/bazel/javascript/aspect_rules_webpack/webpack_defs.md): Bazel rules_webpack public API: webpack_bundle, webpack_devserver, and related rules for bundling JavaScript and TypeScript with webpack under Bazel.
- [@rules_nodejs//nodejs:extensions.bzl](https://aspect.build/docs/bazel/javascript/rules_nodejs/nodejs_extensions.md): Bazel rules_nodejs bzlmod module extensions for registering a Node.js toolchain in MODULE.bazel, with version pinning from .nvmrc for JavaScript builds.
- [@rules_nodejs//nodejs:providers.bzl](https://aspect.build/docs/bazel/javascript/rules_nodejs/nodejs_providers.md): Bazel rules_nodejs public providers, aspects, and helpers shipped with rules_nodejs, including UserBuildSettingInfo used by JavaScript build rules.
- [@rules_nodejs//nodejs:repositories.bzl](https://aspect.build/docs/bazel/javascript/rules_nodejs/nodejs_repositories.md): Bazel rules_nodejs repository rules including nodejs_repositories to install rules_nodejs WORKSPACE dependencies for legacy Node.js JavaScript setups.
- [@rules_nodejs//nodejs:toolchain.bzl](https://aspect.build/docs/bazel/javascript/rules_nodejs/nodejs_toolchain.md): Bazel rules_nodejs toolchain rule nodejs_toolchain defining a Node.js toolchain for a target platform so JavaScript rules can resolve the node binary.

#### Guides

- [Optimizing your Bazel build](https://aspect.build/docs/bazel/guides/optimizing-builds.md): Make CI builds faster and cheaper: download less with Build without the Bytes, and find the non-determinism that lowers your cache hit rate.
- [Tuning test resource usage](https://aspect.build/docs/bazel/guides/test-resources.md): Keep resource-hungry Bazel tests from running out of memory by limiting how many run at once: the exclusive tag, CPU reservations, custom resources and global concurrency flags.

#### Open source

- [Contributing](https://aspect.build/docs/bazel/contributing.md): How to contribute to Aspect's open-source Bazel rulesets and tools, and the tiers Aspect uses to prioritize customer, community, and ecosystem work.
- [Open-source projects](https://aspect.build/docs/bazel/open-source.md): Index of Aspect's open-source Bazel projects: rulesets, the Aspect CLI, Gazelle generators, and shared utilities organized by language and category.

### Learning

- [Bazel courses](https://aspect.build/learning.md): Aspect's Bazel courses for product developers and platform engineers, covering Bazel 101 through advanced topics across multiple languages.

#### Bazel 101: Getting started

- [Course Overview](https://aspect.build/learning/bazel-101.md): Bazel 101 course overview that covers Bazel fundamentals, repository structure, build configuration, and the essential commands for working with projects.
- [Wrapping Up](https://aspect.build/learning/bazel-101/wrap-up.md): Wrap up the Bazel 101 training with next steps, including the Bazel Slack community, the Aspect newsletter, and the training survey.

##### Introduction

- [What is a build system?](https://aspect.build/learning/bazel-101/build-system.md): Understand what a build system is, why scripts stop scaling, and how Bazel compares to Make, Buck2, Pants, MSBuild, Gradle, and Nx for large codebases.
- [Bazel’s Essential Properties](https://aspect.build/learning/bazel-101/essential-properties.md): Learn the essential properties that make Bazel a strong build system: incremental, correct, cacheable, and parallel, with hermeticity and determinism explained.
- [Mental model](https://aspect.build/learning/bazel-101/mental-model.md): Learn the Bazel mental model: how BUILD files, dependency graphs, rules, action graphs, and spawned tools combine to populate the bazel-out tree from sources.
- [Bazel’s Ecosystem](https://aspect.build/learning/bazel-101/ecosystem.md): Understand the Bazel ecosystem, including the core build engine, rulesets in bazelbuild and bazel-contrib, community maintenance, and total cost of ownership.
- [Installing Bazel](https://aspect.build/learning/bazel-101/installing.md): Learn how to install Bazel using GitHub Codespaces starter templates or Bazelisk, the version-aware wrapper that pins Bazel via the .bazelversion file.

##### Setup & configuration

- [Create a repository](https://aspect.build/learning/bazel-101/create-repository.md): Explore the structure of a Bazel repository, the role of REPO.bazel and MODULE.bazel marker files, and how bazel info reveals where outputs are stored.
- [Bazel Modules](https://aspect.build/learning/bazel-101/modules.md): Learn how Bazel modules work, what MODULE.bazel does, how to declare dependencies with bazel_dep, and how to find packages in the Bazel Central Registry.
- [Command-line flags](https://aspect.build/learning/bazel-101/flags.md): Learn how Bazel command-line flags work, including short forms, negation, the bare -- separator, and how .bazelrc files manage flag configuration across builds.
- [Packages, Rules, Targets, and Labels](https://aspect.build/learning/bazel-101/terminology.md): Learn the core Bazel vocabulary of packages, rules, targets, and labels, including how BUILD files define package boundaries and how glob and exports work.

##### Building

- [Create and update BUILD files](https://aspect.build/learning/bazel-101/create-build-files.md): Learn how to create and update Bazel BUILD files automatically with Gazelle, and when to author them manually using macros, examples, and the #keep directive.
- [The ‘build' and ‘run’ commands](https://aspect.build/learning/bazel-101/build-and-run.md): Learn how the Bazel build and run commands work, including useful flags like --config, --jobs, and --keep_going, and how bazel run executes binary targets.
- [Manually using rules in BUILD files](https://aspect.build/learning/bazel-101/manual-build-files.md): Learn how to manually edit Bazel BUILD files using Starlark, editor extensions, and load statements when Gazelle cannot generate the configuration you need.

##### Testing

- [The ‘test' command](https://aspect.build/learning/bazel-101/test.md): Learn how the Bazel test command runs testable targets and how flags like --test_args, --test_env, and --test_output control runner behavior and log streaming.
- [How Bazel runs tests](https://aspect.build/learning/bazel-101/test-actions.md): Understand how Bazel runs tests as a special kind of action, the role of the test runner, the Test Encyclopedia, and patterns for hermetic external services.
- [Flags and Tags](https://aspect.build/learning/bazel-101/flags-and-tags.md): Learn how Bazel test flags and tags work, including size, timeout, and filters like --test_size_filters that control how tests run and which targets execute.
- [Coverage and Test Cases](https://aspect.build/learning/bazel-101/coverage-and-test-cases.md): Learn how Bazel collects test coverage with bazel coverage, reports JUnit test cases, and captures extra outputs via the TEST_UNDECLARED_OUTPUTS_DIR variable.
- [Flakiness](https://aspect.build/learning/bazel-101/flakiness.md): Learn how Bazel handles flaky tests using --flaky_test_attempts and the flaky attribute, plus strategies for keeping CI signal reliable without masking bugs.

##### Advanced topics

- [What is Bzlmod?](https://aspect.build/learning/bazel-101/bzlmod.md): Learn what Bzlmod is, why MODULE.bazel replaces the legacy WORKSPACE file, and the common migration path for Bazel 6, 7, 8, and 9 dependency management.

#### Bazel 102: Python

- [Outline](https://aspect.build/learning/bazel-102.md): Bazel 102 covers Python projects with rules_python, aspect_rules_py, and rules_uv — interpreters, virtualenvs, and package dependency resolution.
- [Write a simple application](https://aspect.build/learning/bazel-102/write-simple-app.md): Write a simple Python app with Bazel using the py starter, learning how Bazel manages the interpreter, PyPI packages, and BUILD file generation.
- [Editor features: virtualenvs](https://aspect.build/learning/bazel-102/virtualenvs.md): Generate Python virtualenvs from Bazel with aspect_rules_py venv targets to give your editor auto-complete, jump-to-definition, and docs-on-hover.
- [Watch mode](https://aspect.build/learning/bazel-102/watch-mode.md): Use ibazel watch mode with Bazel and Python to keep your app or tests running and reload immediately as source files change during development.
- [Using monorepo dependencies](https://aspect.build/learning/bazel-102/monorepo-deps.md): Wire Python monorepo dependencies in Bazel so first-party libraries are live at HEAD, scaffolding a new lib with copier and avoiding wheel publishing.
- [Testing and Debugging](https://aspect.build/learning/bazel-102/test-and-debug.md): Add Python pytest tests in Bazel with py_test targets, configure BUILD files via aspect gazelle, and debug failing assertions in monorepo libraries.
- [Integrate Python console scripts as tools](https://aspect.build/learning/bazel-102/console-scripts.md): Integrate Python console scripts like Jinja2 as build-time tools in Bazel, pinning them via requirements and invoking their CLIs from BUILD rules.
- [Formatting and Linting](https://aspect.build/learning/bazel-102/format-and-lint.md): Format and lint Python code in Bazel using aspect_rules_lint with ruff, catching quote style, unused imports, and format string errors automatically.
- [Shipping artifacts](https://aspect.build/learning/bazel-102/ship-artifacts.md): Ship Python apps from Bazel as OCI container images using aspect_rules_py's py_image_layer, running them locally and pushing to a cloud registry for staging deployment.

#### Bazel 103: Go

- [Outline](https://aspect.build/learning/bazel-103.md): Bazel 103 covers Go with rules_go and Gazelle — hermetic Go SDK toolchains, formatting and linting, running tools, and deploying containers.
- [rules_go and gazelle](https://aspect.build/learning/bazel-103/rules-go-and-gazelle.md): Understand how Bazel supports Go through rules_go for first-party packages and gazelle for external modules and automatic BUILD file generation.
- [Create and run an application](https://aspect.build/learning/bazel-103/create-app.md): Create and run a Go application with Bazel, following the cmd folder convention and importing third-party modules to build your first go_binary target.
- [Formatting and Linting](https://aspect.build/learning/bazel-103/format-and-lint.md): Format and lint Go code in Bazel using aspect_rules_lint with gofumpt and pre-commit hooks, ensuring consistent style enforced locally and in CI.
- [Running Go tools](https://aspect.build/learning/bazel-103/running-go-tools.md): Run Go tools like cobra-cli with Bazel using the tools.go unused imports pattern, replacing go install with hermetic bazel run invocations.
- [Deploying containers](https://aspect.build/learning/bazel-103/deploy-container.md): Build Go containers with Bazel using go_image and rules_oci on a Distroless base, producing reproducible, parallel-layered OCI images for deployment.

#### Bazel 104: C++

- [Outline](https://aspect.build/learning/bazel-104.md): Bazel 104 covers C and C++ with hermetic LLVM toolchains, rules_cc, rules_foreign_cc for legacy cmake projects, and external library dependencies.
- [Running a “hello world” application](https://aspect.build/learning/bazel-104/run-hello-world.md): Write and run a simple C hello world program with Bazel, declaring a cc_binary target and executing it with bazel run for your first C/C++ build.
- [Link against pre-installed system libraries](https://aspect.build/learning/bazel-104/link-against-system-libs.md): Link C programs in Bazel against system libraries like libmagic installed via apt or brew, a non-hermetic approach useful during migrations.
- [Build external dependencies from source](https://aspect.build/learning/bazel-104/external-deps.md): Build C/C++ external dependencies like libmagic from source with Bazel via the Bazel Central Registry for hermetic, reproducible cross-platform builds.
- [Configuring the IDE or editor](https://aspect.build/learning/bazel-104/ide.md): Configure C/C++ editors for Bazel using clangd and the hedron compile-commands-extractor, enabling completion, diagnostics, and jump-to-definition.
- [Testing and debugging with GoogleTest](https://aspect.build/learning/bazel-104/test-and-debug.md): Test and debug C++ code in Bazel with GoogleTest, declaring cc_test targets that exercise existing cc_library sources and run with bazel test.
- [Cross-compilation to target platforms](https://aspect.build/learning/bazel-104/cross-compile.md): Cross-compile C/C++ code with Bazel by defining platforms with OS, CPU, and ABI constraints, enabling builds for Linux aarch64 and other targets.
- [Linting and Formatting](https://aspect.build/learning/bazel-104/lint-and-format.md): Lint and format C/C++ code in Bazel with clang-tidy and clang-format, running checks as Bazel aspects over cc_library targets without BUILD changes.
- [BUILD file generation](https://aspect.build/learning/bazel-104/gazelle.md): Generate C/C++ BUILD files in Bazel with Gazelle, scanning sources and include statements to maintain cc_library srcs and deps non-destructively.

#### Bazel 105: JavaScript & TypeScript

- [Introduction](https://aspect.build/learning/bazel-105.md): Get started with Bazel for JavaScript, TypeScript, Node.js, and the web, learning the Aspect-supported modules and tooling that power modern JS monorepos.
- [Get Started: Create Your First Application](https://aspect.build/learning/bazel-105/hello-world.md): Create your first JavaScript hello world app in Bazel using the js starter repository, generating BUILD files with Gazelle and running it via bazel run.
- [TypeScript and Web](https://aspect.build/learning/bazel-105/hello-browser.md): Build a TypeScript web app in a Bazel monorepo using the Lit framework, sharing libraries across packages and running a fast watch-mode dev server.
- [Formatting & Linting](https://aspect.build/learning/bazel-105/format-and-lint.md): Format and lint JavaScript in Bazel with aspect_rules_lint, wiring Prettier and ESLint into pre-commit hooks, CI checks, and the Aspect CLI workflow.
- [Generating code](https://aspect.build/learning/bazel-105/code-generation.md): Generate JavaScript source code in Bazel with Yeoman generators, scaffolding new Fastify routes and React components from templates to enforce conventions.

#### Bazel 201: The way Bazel works

- [Overview](https://aspect.build/learning/bazel-201.md): Overview of Aspect's Bazel 201 course covering Bazel internals, evaluation phases, caches, hermeticity, and dependency graphs in depth.
- [Orientation to the bazel-examples repo](https://aspect.build/learning/bazel-201/bazel-examples.md): Tour the aspect-build/bazel-examples kitchen-sink monorepo used across Bazel 200-series training to explore real multi-language Bazel module setups.
- [Bazel's Evaluation Model](https://aspect.build/learning/bazel-201/evaluation-model.md): Build a mental model of Bazel's evaluation phases - loading, analysis, and execution - and how Skymeld in Bazel 7 overlaps them as a pipeline.
- [Repository Structure: Bazel packages](https://aspect.build/learning/bazel-201/packages.md): Understand Bazel's package model - BUILD.bazel files written in Starlark - and use bazel query to explore the first-party dependency graph of a repo.
- [Dependency and Action Graphs](https://aspect.build/learning/bazel-201/dep-action-graph.md): Understand how Bazel rule implementations lower the dependency graph into the action graph, and inspect both with query, cquery, and aquery.
- [Interaction with Package Managers](https://aspect.build/learning/bazel-201/package-managers.md): See how Bazel's bzlmod package manager pins dependencies, enforces supply-chain integrity hashes, and configures the downloader for external repositories.
- [Caches: local and remote](https://aspect.build/learning/bazel-201/caches.md): Explore Bazel's caching layers including the in-memory action graph, repository cache, action cache, and remote cache, and how each affects rebuilds.
- [Determinism: Preventing cache misses](https://aspect.build/learning/bazel-201/determinism.md): Learn how Bazel determinism prevents cascading cache misses on CI, and how to diagnose and repair non-hermetic actions that stamp variable data.
- [Spawns](https://aspect.build/learning/bazel-201/spawns.md): Learn how Bazel spawns actions during the execution phase using sandboxed, local, worker, and remote strategies, and how heuristics pick between them.
- [Outputs in the source tree](https://aspect.build/learning/bazel-201/output-to-source-tree.md): Learn when Bazel rules should write outputs into the source tree so editors and IDEs can find generated files like ts_proto_library type definitions.
- [Hermeticity: trade-offs](https://aspect.build/learning/bazel-201/hermeticity.md): Understand the trade-offs of Bazel hermeticity, including external test tags and spawn strategies that relax sandboxing for legacy or non-hermetic workloads.
- [Locating and interpreting Bazel timing profiles](https://aspect.build/learning/bazel-201/profiling.md): Locate Bazel's automatic timing profile, view it with bazel analyze-profile or Perfetto, and spot critical-path actions and easy performance wins.

#### Bazel 202: Macros and rules

- [Overview](https://aspect.build/learning/bazel-202.md): Overview of Aspect's Bazel 202 advanced training, teaching engineers to extend Bazel by composing existing rules and authoring custom macros and rules.
- [Introducing Macros and Rules](https://aspect.build/learning/bazel-202/intro-macros-rules.md): Introduction to Bazel macros and rules - how rule implementations lower the dependency graph into the action graph during the analysis phase.
- [Writing Macros](https://aspect.build/learning/bazel-202/macros.md): Learn how to write Bazel macros to compose existing rules, share BUILD file boilerplate, and provide ergonomic syntax sugar without breaking compatibility.
- [Finding existing rules](https://aspect.build/learning/bazel-202/existing-rules.md): Discover the Bazel rule ecosystem - bazel_skylib, aspect-bazel-lib, and recommended rules - before reinventing utilities in your own BUILD files.
- [Actions spawn Tools](https://aspect.build/learning/bazel-202/tools.md): Learn the constraints Bazel imposes on tools spawned by actions - PATH, working directory, read-only inputs, and symlink handling for hermetic builds.
- [A better genrule](https://aspect.build/learning/bazel-202/run_binary.md): Use Bazel's run_binary as a hermetic alternative to genrule, adapting an executable into a deterministic action with declared inputs and outputs.
- [Writing Rules](https://aspect.build/learning/bazel-202/rules.md): Author custom Bazel rules in Starlark by studying the tool CLI, designing the BUILD developer experience, and implementing the rule with the actions API.

#### Bazel 203: Migrate dev workflows

- [Overview](https://aspect.build/learning/bazel-203.md): Overview of Aspect's Bazel 203 training on the human side of Bazel migrations - sequencing rollouts, operating CI, and making Bazel a seamless DX.
- [Incubate Net Promoters](https://aspect.build/learning/bazel-203/net-promoters.md): Incubate net promoters during a Bazel rollout by shaping first impressions, polishing CI error messages, and giving early users a positive experience.
- [Don’t disrupt workflows](https://aspect.build/learning/bazel-203/leave-workflows.md): Avoid disrupting developer workflows during Bazel migration by preserving Makefiles, package scripts, and editor integrations that engineers rely on daily.
- [Change one thing at a time](https://aspect.build/learning/bazel-203/change-one-thing.md): Apply the change-one-thing-at-a-time discipline to Bazel migrations so regressions are bisectable and bazel build --subcommands can verify each step.
- [Ratchet Mechanism](https://aspect.build/learning/bazel-203/ratchet.md): Use a Bazel ratchet mechanism in CI to lock in invariants like type-check fixes so new commits cannot reintroduce previously eliminated build errors.
- [Gradient Ascent](https://aspect.build/learning/bazel-203/gradient-ascent.md): Apply BazelCon's gradient-ascent strategy during a Bazel migration to maximize benefits and defer risks without leaving developer experience worse off.
- [Closing the loop](https://aspect.build/learning/bazel-203/close-loop.md): Close the loop on Bazel migration tasks by fixing root causes, validating attributes, improving error messages, and finishing the deletion of the old way.
- [Leaving code alone](https://aspect.build/learning/bazel-203/leave-code-alone.md): Minimize source changes during a Bazel migration so the legacy build keeps working and product engineers retain ownership of their own application code.
- [Bazel enables the “integration” in CI](https://aspect.build/learning/bazel-203/ci-integration.md): How Bazel enables real continuous integration across languages and frameworks, beyond the continuous-build-occasional-integration pattern most teams use.
- [Operating an efficient Continuous Integration system](https://aspect.build/learning/bazel-203/operate-ci.md): Operate an efficient Bazel continuous integration system using setup-bazel on GitHub Actions and the bazel-examples reference workflow as a starting point.
- [Shared green vs. per-project pipelines](https://aspect.build/learning/bazel-203/shared-green.md): Compare shared-green and per-project CI pipelines for Bazel monorepos, and see why a single BuildCop with fast reverts scales best across many teams.
- [Versioning artifacts in a monorepo](https://aspect.build/learning/bazel-203/versioning.md): Version artifacts released from a Bazel monorepo using a date-and-SHA scheme like 2023.07.123+abc1234 instead of fragile per-library semantic versions.
- [Stamping VCS info into artifacts](https://aspect.build/learning/bazel-203/stamping.md): Stamp VCS info into Bazel artifacts only at delivery time, since stamping is non-deterministic and unnecessarily triggers action cache misses upstream.
- [Selective Delivery of changed artifacts](https://aspect.build/learning/bazel-203/selective-delivery.md): Use Bazel selective delivery to ship only artifacts that actually changed from a green build, reducing deploy churn and downstream rollout risk.
- [Defend your Leverage](https://aspect.build/learning/bazel-203/defend-leverage.md): Defend the leverage of a small Bazel DevInfra team by resisting fragmentation, preventing snowflake projects, and enforcing monorepo standards uniformly.
- [Metaphor: village to city](https://aspect.build/learning/bazel-203/metaphor-municipal-services.md): The municipal-services metaphor for Bazel monorepos - polyrepo villages versus a city where a small DevInfra team operates shared plumbing for all engineers.
- [Prevent “weeds”](https://aspect.build/learning/bazel-203/pull-weeds.md): Pull weeds in a Bazel monorepo early - preventing accidental dependency edges, network access in actions, and other bad patterns before they take root.
- [Patching external libraries and Bazel modules](https://aspect.build/learning/bazel-203/patching.md): Apply Bazel's patch-and-PR workflow to fix external libraries and Bazel modules without forking, using patch files attached to module dependency declarations.

#### Aspect 150: BUILD file generators in Starlark

- [Introduction](https://aspect.build/learning/aspect-150.md): Hands-on course for automating BUILD file generation with Gazelle and Starlark, including writing custom Gazelle extensions for new languages.
- [Why generate BUILD files](https://aspect.build/learning/aspect-150/motivation.md): Why Bazel projects need BUILD file generation: Starlark friction, manual dependency graphs, and the gap between infra experts and product engineers on builds.
- [Intro to Gazelle](https://aspect.build/learning/aspect-150/gazelle.md): Intro to Gazelle, the Bazel tool that visits source trees, reads directives, and generates or merges BUILD files non-destructively while preserving #keep edits.
- [Install](https://aspect.build/learning/aspect-150/install.md): Learn how to install Gazelle for Bazel using a pre-built binary, the Aspect CLI configure command, or by building a custom gazelle_binary from source.
- [Available Languages](https://aspect.build/learning/aspect-150/languages.md): Overview of languages supported by Gazelle for Bazel BUILD generation, including Go, Protobuf, Kotlin, JavaScript, TypeScript, Python, Java, Rust, and Swift.
- [Configuration](https://aspect.build/learning/aspect-150/config.md): Learn how Gazelle directives configure Bazel BUILD files, including gazelle:exclude, gazelle:map_kind, and gazelle:resolve for dependency resolution.
- [Introducing the Starlark extension API](https://aspect.build/learning/aspect-150/orion.md): Introducing orion, the Aspect CLI Starlark extension API for writing Gazelle generators that register rule kinds and configure extensions for Bazel BUILD files.
- [Query API](https://aspect.build/learning/aspect-150/query-api.md): Learn the Aspect CLI Starlark Query API for Gazelle extensions, including RegexQuery and tree-sitter AST queries used to detect imports and rule kinds in Bazel.
- [Examples](https://aspect.build/learning/aspect-150/examples.md): Real-world examples of Starlark Gazelle extensions for Bazel, including a port of bzl_library from bazel-skylib and a Kotlin generator from the Aspect CLI repo.
- [Extending existing languages](https://aspect.build/learning/aspect-150/extending.md): Use small Starlark Gazelle extensions to augment the stock Gazelle binary — generate OCI images, lint tests, codegen targets, and other custom rules alongside existing languages.
- [Testing](https://aspect.build/learning/aspect-150/testing.md): Learn how to test Gazelle extensions for Bazel using golden BUILD.in and BUILD.out fixtures with the gazelle_generation_test rule for Go or Starlark generators.
- [Case studies](https://aspect.build/learning/aspect-150/case-studies.md): Case studies showcasing companies that write Starlark Gazelle extensions with Aspect CLI to generate Bazel BUILD files for their own languages and conventions.

#### Aspect 160: Extending Bazel with Starlark

- [Introduction](https://aspect.build/learning/aspect-160.md): Hands-on course for extending Bazel with AXL: custom commands driven by programmable queries, live build-event and execution-log analysis, BUILD file generation, and delivery — all local.
- [Install the CLI](https://aspect.build/learning/aspect-160/install.md): Install the Aspect CLI, understand the launcher it installs, and pin a CLI version for a repository.
- [Setting up the course repository](https://aspect.build/learning/aspect-160/setup.md): Clone the lab repository, start its build warming, and meet the pinned Aspect CLI you'll extend for the rest of the course.
- [Your first command](https://aspect.build/learning/aspect-160/changed.md): Read a fifty-line AXL task, run it, and learn which output stream a command's contract lives on.
- [A rule you can actually enforce](https://aspect.build/learning/aspect-160/policy.md): An architecture rule is a Bazel query. If the query returns anything, the rule is broken.
- [Watch Bazel work](https://aspect.build/learning/aspect-160/observe.md): Bazel publishes an event for everything it does. Subscribe to the ones you care about.
- [You won't ship that](https://aspect.build/learning/aspect-160/hooks.md): Add behaviour to a command you did not write, without wrapping it.
- [Generate it, then ship it](https://aspect.build/learning/aspect-160/generate.md): Teach Gazelle one of your repository's conventions, in Starlark.
- [Hand it to an agent](https://aspect.build/learning/aspect-160/agent.md): Commands that describe themselves are commands an agent can use.
