diff --git a/.agents/rules/github_actions_workflows.md b/.agents/rules/github_actions_workflows.md index 85ff59cd85..a61f57d4a1 100644 --- a/.agents/rules/github_actions_workflows.md +++ b/.agents/rules/github_actions_workflows.md @@ -6,9 +6,10 @@ globs: ".github/workflows/**,.github/actions/**,.github/dependabot.yml" # GitHub Actions Workflows Rule -* Use the latest version of referenced actions in `.github/workflows/` and - `.github/actions/` (ensuring actions target supported Node.js runtimes such as - `node24` rather than deprecated `node20`). +* Use the latest release of referenced actions and downloaded tools in + `.github/workflows/` and `.github/actions/` (check via + `gh release view --repo /`), targeting supported Node.js + runtimes (`node24`, not `node20`). * **Dependabot Coverage for Composite Actions**: When adding a composite action directory under `.github/actions/`, add `"/.github/actions/"` to the `github-actions` `directories` list in `.github/dependabot.yml` (since diff --git a/.agents/skills/create-pr/SKILL.md b/.agents/skills/create-pr/SKILL.md index 273ace1d58..908511889c 100644 --- a/.agents/skills/create-pr/SKILL.md +++ b/.agents/skills/create-pr/SKILL.md @@ -9,11 +9,11 @@ to a subagent. NEVER create or draft PRs directly in the main conversation. ### Instructions -1. **Code Review Audit**: Launch a subagent with `review-code` to verify - `git diff` conforms to all rules (news entry in `news/`, line wrapping, - copyright, conventions, Starlark formatting). Fix any issues before - proceeding. -2. **Launch Subagent**: Use `invoke_subagent` (`TypeName: "self"`). +1. **Code Review Subagent**: Before launching the PR subagent, launch a + subagent (`invoke_subagent`, `TypeName: "self"`) to run the `review-code` + skill (`.agents/skills/review-code/SKILL.md`). Wait for it to finish and fix + any issues before proceeding. +2. **Launch PR Subagent**: Use `invoke_subagent` (`TypeName: "self"`). 3. **Subagent Prompt Instructions**: - Follow `CONTRIBUTING.md` and `@/.agents/rules/pr.md`. - **PR Title**: Conventional commits format (`agents:` prefix for agent diff --git a/.agents/skills/review-code/SKILL.md b/.agents/skills/review-code/SKILL.md index 41d66d8a3a..ee1d2225d2 100644 --- a/.agents/skills/review-code/SKILL.md +++ b/.agents/skills/review-code/SKILL.md @@ -59,8 +59,8 @@ file from `.agents/skills/review-code/`: `.agents/skills/review-code/review-workflows-prompt.md` - Focus: Audits workflow files (`.github/**`) and workflow tests against `.agents/rules/github_actions_workflows.md` (e.g. `chmod +x` executable - permissions, shebangs, action versions, `./.github/actions/setup-bazel` - wrapper usage, fallback jobs). + permissions, shebangs, action and tool versions, + `./.github/actions/setup-bazel` wrapper usage, fallback jobs). 8. **`rules_python` Usage Sub-Agent** (`Role: "rules_python Usage Auditor"`): - Prompt file: diff --git a/.agents/skills/review-code/review-workflows-prompt.md b/.agents/skills/review-code/review-workflows-prompt.md index c0ef0d0520..c596ac0a80 100644 --- a/.agents/skills/review-code/review-workflows-prompt.md +++ b/.agents/skills/review-code/review-workflows-prompt.md @@ -8,10 +8,11 @@ project's workflow rules and conventions: 2. Verify executable permissions: any script invoked directly as a workflow step (e.g. `.github/workflows/*.py`, `*.sh`) must have `chmod +x` (filemode `100755`) and an appropriate shebang (e.g. `#!/usr/bin/env python3`). -3. Verify action versions and Dependabot coverage: ensure steps in - `.github/workflows/**` and `.github/actions/**` use the latest action - versions, and verify every `.github/actions/` directory is listed under - `github-actions` `directories` in `.github/dependabot.yml`. +3. Verify action and tool versions and Dependabot coverage: ensure + `.github/workflows/**` and `.github/actions/**` use the latest release of + referenced actions and downloaded tools (check via + `gh release view --repo /`), and verify every + `.github/actions/` directory is in `.github/dependabot.yml`. 4. Verify fallback jobs: ensure `suppress-no-jobs-ran-error` / `noop` fallback jobs exist in conditional workflows. 5. Check event payload handling: for steps that are a single Python script,