| name | review-code |
|---|---|
| description | High-level code review audit of local changes when preparing to send a PR for review |
| trigger | model_decision |
When preparing to send a Pull Request for review, invoke separate, concurrent
sub-agents (invoke_subagent), where each sub-agent focuses exclusively on
its assigned checklist category.
CRITICAL: Do NOT use a single sub-agent to validate multiple or all
dimensions at once. Each sub-agent must be launched with its own distinct prompt
file from .agents/skills/review-code/:
-
Starlark / Bazel Sub-Agent (
Role: "Starlark Code Auditor"):- Prompt file:
.agents/skills/review-code/review-starlark-prompt.md - Focus: Audits Starlark / Bazel changes (
*.bzl,BUILD,*.bazelfiles) ingit diffagainst.agents/rules/bzl.mdand Starlark rules inAGENTS.md.
- Prompt file:
-
Python Code Sub-Agent (
Role: "Python Code Auditor"):- Prompt file:
.agents/skills/review-code/review-python-prompt.md - Focus: Audits Python source, test, and inline script changes in
git diffagainst.agents/rules/python.mdand Python and pytest conventions inAGENTS.md.
- Prompt file:
-
Documentation Sub-Agent (
Role: "Documentation Auditor"):- Prompt file:
.agents/skills/review-code/review-docs-prompt.md - Focus: Audits documentation (
.md) changes and docs build targets against.agents/rules/docs.mdandAGENTS.md.
- Prompt file:
-
Contribution Guidelines Sub-Agent (
Role: "Contributing Auditor"):- Prompt file:
.agents/skills/review-code/review-contributing-prompt.md - Focus: Audits changes, requirements updates, and version directives against
CONTRIBUTING.md.
- Prompt file:
-
Project Conventions Sub-Agent (
Role: "Project Conventions Auditor"):- Prompt file:
.agents/skills/review-code/review-agents-prompt.md - Focus: Audits overall workspace compliance against
AGENTS.md.
- Prompt file:
-
Pull Request Standards Sub-Agent (
Role: "PR Standards Auditor"):- Prompt file:
.agents/skills/review-code/review-pr-standards-prompt.md - Focus: Audits PR titles and descriptions against Conventional Commits
formatting, PR update rules in
CONTRIBUTING.md, and open questions or "TODO / Things we could do" items in the PR description (ensuring the"do not merge"label is applied when open questions exist).
- Prompt file:
-
GitHub Workflows Sub-Agent (
Role: "GitHub Workflows Auditor"):- Prompt file:
.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 +xexecutable permissions, shebangs, action versions, fallback jobs).
- Prompt file:
-
rules_pythonUsage 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.mdandrules_python-specific Bzlmod and rule usage invariants (e.g.,pip.dep()declarations inMODULE.bazelfor@pypi//<pkg>references underpython/**).
- Prompt file:
-
News Entry Sub-Agent (
Role: "News Entry Auditor"):- Prompt file:
.agents/skills/review-code/review-news-prompt.md - Focus: Audits
news/<id>.<category>.mdfiles for presence, naming (no generic0000placeholders), brevity and skimmability, and formatting against.agents/rules/news.mdand.agents/skills/create-news/SKILL.md.
- Prompt file:
- Immediately create a user-facing review artifact named
code-review-results.mdin the conversation artifact directory so progress is visible right away. - Have sub-agents run
git diff $(git merge-base HEAD upstream/main)to audit committed and uncommitted branch changes without newerupstream/maincommits. - Launch all sub-agents concurrently using
invoke_subagent. - Update
code-review-results.mdas sub-agent responses come in. - The artifact must include:
- Overall summary and verdict across audit categories.
- Detailed analysis and findings from each sub-agent.
- Actionable findings and fix suggestions with specific code snippets, diffs, and clickable file links for any violations found.
- Once all sub-agents finish, finalize
code-review-results.mdand provide a concise summary with the overall verdict and a clickable markdown link tocode-review-results.mdin the response. - If a PR is being reviewed, ask the user if they want to post comments to the PR.
- When posting comments to the PR, add a note in italics at the end of each comment identifying it as an agent-generated comment and referring to yourself using a magnanimous title.