Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .agents/rules/rules_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ description: rules_python-specific Bzlmod, PyPI, and rule usage invariants
analysis when `<pkg>` is absent from their `pip.parse()` lockfiles. Package
names in `pip.dep(name = "...")` are normalized (hyphens and underscores map
to the same name).

## Minimum Supported Bazel Version
* `//:version.bzl` defines `MINIMUM_BAZEL_VERSION`. Do not add compatibility
logic, feature guards, or comments for older Bazel versions.
* When guarding a feature added after `MINIMUM_BAZEL_VERSION`, verify and
comment the exact Bazel version that introduced it.
7 changes: 3 additions & 4 deletions .agents/skills/review-code/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ file from `.agents/skills/review-code/`:
8. **`rules_python` Usage Sub-Agent** (`Role: "rules_python Usage Auditor"`):
- Prompt file:
`.agents/skills/review-code/review-rules-python-prompt.md`
- Focus: Audits changes against `.agents/rules/rules_python.md` and
`rules_python`-specific Bzlmod and rule usage invariants (e.g., `pip.dep()`
declarations in `MODULE.bazel` for `@pypi//<pkg>` references under
`python/**`).
- Focus: Audits changes against `.agents/rules/rules_python.md` (e.g.,
`pip.dep()` declarations in `MODULE.bazel` and `MINIMUM_BAZEL_VERSION`
bounds).

9. **News Entry Sub-Agent** (`Role: "News Entry Auditor"`):
- Prompt file:
Expand Down
7 changes: 5 additions & 2 deletions .agents/skills/review-code/review-rules-python-prompt.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
You are a specialized `rules_python` Usage Auditor sub-agent.
Your sole task is to audit all changes in `git diff` against `rules_python`
Bzlmod and rule usage invariants:
Bzlmod, Bazel version support, and rule usage invariants:

1. Read and strictly enforce `.agents/rules/rules_python.md` and `AGENTS.md`.
1. Read and strictly enforce `.agents/rules/rules_python.md`, `version.bzl`, and
`AGENTS.md`.
2. Verify that every `@pypi//<pkg>` target referenced by non-test rules,
macros, or `BUILD` files under `python/**` (including default attribute
values and `alias` targets) has a corresponding `pip.dep(name = "<pkg>")`
declaration on the non-dev `pip` extension in `MODULE.bazel` (with `"pypi"`
in `use_repo(pip, ...)`).
3. Verify no compatibility logic, feature guards, or comments target Bazel
versions older than `MINIMUM_BAZEL_VERSION` in `//:version.bzl`.

@.agents/skills/review-code/review-report-format.md
2 changes: 2 additions & 0 deletions .agents/skills/review-code/review-starlark-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ in `git diff` against the project's Starlark coding rules and conventions:
9. Verify `config_setting` names start with `is_` (or `_is_` when private).
10. Verify non-obvious workarounds have comments stating the intent, why the
direct approach fails, and why the workaround works.
11. Verify no compatibility logic or feature guards target Bazel versions
older than `MINIMUM_BAZEL_VERSION` in `//:version.bzl`.

@.agents/skills/review-code/review-report-format.md
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ This repository contains 3 Bazel bzlmod modules.
public API. DO NOT add, remove, or modify these build flags unless specifically
instructed to.

`version.bzl` defines `MINIMUM_BAZEL_VERSION`. Do not add compatibility logic
or feature guards for Bazel versions older than `MINIMUM_BAZEL_VERSION`.

`bazel query --output=build` can be used to inspect target definitions.

In WORKSPACE mode:
Expand Down
Loading