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
12 changes: 12 additions & 0 deletions .agents/rules/starlark.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
trigger: glob
description: Starlark Language, Macro, and Testing Invariants
globs: "*.bzl,BUILD,BUILD.bazel,*.bazel"
---

# Starlark Language & Macro Invariants

## Macro Target Canonicalization
Expand All @@ -7,6 +13,12 @@
* Note that `python/private/common_labels.bzl` defines `labels`, a struct
containing common canonicalized label strings used across the project.

## Manual Tag on Internal Macro Helper Targets
* When macros instantiate internal helper targets (such as private rule targets
for artifact extraction or linking support), always include `tags = ["manual"]`.
* **Why**: This prevents internal helper targets from being implicitly built when
wildcard target patterns (e.g., `//...`) are expanded.

## Private Alias Pattern when Appending to User `deps`
* When macros append internal helper targets to user-provided dependency lists
(`deps`), use private alias targets (e.g.
Expand Down
10 changes: 8 additions & 2 deletions .agents/skills/create-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ to handle PR creation or description drafting.
(GitHub uses the PR description as the commit message upon merge,
which reflows text at 72 columns).
- **Formatting**: Follow repository style guidelines and structure.
- Create a Markdown artifact (`pr_info.md`) containing the PR title, body,
and link/metadata so the user can review and comment on it.
- Create a Markdown artifact (`pr_info.md`) meeting the following requirements:
- **User-facing**: Published so it is presented directly in the user interface.
- **Interactive feedback enabled**: Allows the user to select lines and leave inline comments on the draft.
- **User decision choices**: Ask the user if they want to:
1. Create a regular PR
2. Create a draft PR
3. Provide feedback on the draft text
4. Discard the draft text
- **Propose vs. Create**: If the user requested to propose or draft a PR
description, **do not** run `gh pr create`—just create the `pr_info.md`
artifact for the user to review. Otherwise, execute `gh pr create` with
Expand Down
15 changes: 13 additions & 2 deletions .agents/skills/monitor-ci-results/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ or when monitoring CI after PR updates:
> launch duplicate monitoring jobs for the same PR.

1. **Check Existing Process**: Check if a monitor script is already running for
the PR (e.g., `pgrep -f "monitor_remote_ci.py <pr_number>"`). If one is
already running, do not start another instance.
**this specific PR** using `pgrep -f "monitor_remote_ci.py <pr_number>"`. Do
NOT use a generic grep without `<pr_number>`, as other active agent
conversations may be monitoring different PRs concurrently. If one is
already running for this PR, do not start another instance.
2. **Launch Monitoring Script**: If no monitor process is active for
`<pr_number>`, launch the script in the background:
```bash
Expand All @@ -35,3 +37,12 @@ or when monitoring CI after PR updates:
the monitoring script, immediately launch a separate subagent using the
`invoke_subagent` tool with the role "CI Failure Analyzer" to run the
`analyze-ci-failure` skill on the reported failure.
5. **Autonomous Flake Retry**: If the CI Failure Analyzer subagent confirms
that the failure is a transient infrastructure or network flake (e.g. disk
I/O error, 504 gateway, sandbox initialization failure), **immediately and
autonomously** launch a separate subagent using `invoke_subagent` with the
role "CI Job Retrier" and the prompt template in
`.agents/skills/monitor-ci-results/retry-job-prompt.md` to run the
`buildkite-retry-job` skill for `<pr_number>`. Do not execute the script
directly; use the subagent and skill orchestration instead. Continue
monitoring without pausing to ask the user.
3 changes: 3 additions & 0 deletions .agents/skills/monitor-ci-results/retry-job-prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use the `buildkite-retry-job` skill to retry the failed Buildkite job(s) for PR {pr_number}.
Follow the instructions in `.agents/skills/buildkite-retry-job/SKILL.md` to retry the failing jobs using the skill.
Once the retry request completes, report back to the parent conversation.
12 changes: 12 additions & 0 deletions python/features.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def _features_typedef():
A map of public API targets available in rules_python for feature detection
purposes.

:::{seealso}
* {obj}`features.loadable_symbols`
:::

:::{versionadded} 1.9.0
:::
::::
Expand Down Expand Up @@ -54,6 +58,10 @@ def _features_typedef():

A map of bzl paths to the list of public symbols they export.

:::{seealso}
* {obj}`features.targets`
:::

:::{versionadded} 2.2.0
:::
::::
Expand Down Expand Up @@ -128,6 +136,10 @@ _TARGETS = {
}

_LOADABLE_SYMBOLS = {
"//python/cc:py_extension.bzl": [
# keep sorted
"py_extension",
],
"//python:py_info.bzl": [
# keep sorted
"PyInfo",
Expand Down
Loading