Repository navigation
Add pr-review skill for GitHub and Reviewable - #3313
Merged
Merged
Conversation
Always-on repository instructions in GEMINI.md consume context on every turn, while GitHub and Reviewable PR review mechanics (paginated comment retrieval, Quote-reply threading, disposition prefixes, and auto-merge checks) are only needed during code review tasks. Placing these steps in an on-demand skill under .agents/skills/ keeps GEMINI.md lean while giving agents exact, reliable workflows when reviewing or responding to pull requests, preventing dropped Reviewable comments, duplicate replies, HTTP 422 inline review errors, and accidental auto-merges. Adds .agents/skills/pr-review/SKILL.md covering: - Guardrails for untrusted review input, public-repo hygiene, and explicit authorization before remote pushes or merges. - Paginated retrieval across all three GitHub REST endpoints plus GraphQL reviewThreads so bundled Reviewable discussions are not missed. - Author response workflow: rebasing onto upstream/master (with HTTPS fallback), running pr-polisher, live recheck before replying, single batched Reviewable Quote-replies (`Done.` / `Satisfied`), native GitHub thread replies and GraphQL resolution, and PR description syncing that preserves Reviewable footers. - Reviewer workflow: checking autoMergeRequest before approving, verifying exact RIGHT-side diff line numbers before posting reviews, and using Reviewable disposition prefixes (`Nit (non-blocking):`, `FYI:`, and blocking prefixes) intentionally. BUG=http://b/593117423
gbrodman
approved these changes
Dec 4, 2026
gbrodman
left a comment
Collaborator
There was a problem hiding this comment.
@gbrodman reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on CydeWeys).
Member
Author
CydeWeys
added a commit
to CydeWeys/nomulus
that referenced
this pull request
Dec 5, 2026
After migrating repository skills to `.agents/skills/` (google#3295), adding scoped `AGENTS.md` guides (google#3311), and adding the on-demand `pr-review` skill (google#3313), a full audit of all agent instructions and skill scripts uncovered remaining duplication, always-on context bloat, mis-routed/stale rules, and four concrete guardrail bugs: `check_diff.py` silently missed Valkey Protostuff fields on `@MappedSuperclass` parents and inline-annotated fields, `core/AGENTS.md` scoped the Netty `retainedDuplicate()` rule away from `proxy/` (its primary caller), `run_rewrite.sh` silently exited `0` on Gradle failure without cleanup traps, and `check_diff_test.py` never ran in presubmits or CI. Centralizing review rules into `pr-review`, moving `core/`-only rules out of root `GEMINI.md`, correcting stale Gradle/Spotless instructions, and fixing the guardrail scripts close these blind spots while cutting always-on `GEMINI.md` by 22%. Specifically, this change: - **Centralizes PR review rules in `.agents/skills/pr-review/SKILL.md`:** - `GEMINI.md` (`18,118 B` -> `14,071 B`): replaces duplicated `Processing PR Feedback` and `PR Description Sync` bullets with a 1-line pointer to `.agents/skills/pr-review/SKILL.md`. - `.agents/skills/pr-polisher/SKILL.md`: removes Step 9 (paginated PR review comment fetch), renumbers Step 10 -> 9, and adds `pr-review` negative routing to frontmatter `description`. - `console-webapp/AGENTS.md`: removes `## Review Calibration`, moving `Shared State` and `Build & Screenshots` into `pr-review` while keeping `Nested @if` as an Angular template authoring rule. - `core/AGENTS.md`: trims the review-only parenthetical from `JPQL Timestamp Ordering`. - `.agents/skills/pr-review/SKILL.md`: adds `### Nomulus Review Calibration` under `Conducting PR Reviews`. - **Re-scopes always-on rules and fixes stale build/formatting docs:** - Moves `Netty Retry Buffers` (`ByteBufHolder.retainedDuplicate()`) out of `core/AGENTS.md` into `GEMINI.md`'s Netty lifecycle bullet so `proxy/`, `networking/`, `prober/`, and `core/` all load it; removes the verbatim duplicated `console-webapp` sentence from `GEMINI.md`. - Moves `core/`-only idioms (CLI/Beam/`TestRegistryToolComponent`, model layering, `@GetterDelegate` sets, partial JSON updates, JAXB optional attributes, allocation tokens, Console actions, CSV output, time-projected entities, Valkey Protostuff compatibility, and async pipeline boundaries) from `GEMINI.md` into `core/AGENTS.md`, fixes exact `monthly_logs.sql` / `monthly_logs_test.sql` paths, and condenses `2-PR Schema Split` in `GEMINI.md`. - Corrects `spotlessApply` (`*.gradle` only) vs. `javaIncrementalFormatApply` (Java formatting & import order) and `checkstyleMain`/`checkstyleTest`, and replaces backend compile commands that triggered Docker `:core:buildToolImage` or `console-webapp` `npmInstallDeps` across `GEMINI.md`, `pr-polisher`, and `java-ast-refactoring`. - **Hardens guardrail scripts and wires unit tests into presubmits:** - `.agents/skills/pr-polisher/scripts/check_diff.py` (+ `SKILL.md` & `check_diff_test.py`): adds the 4 missing Protostuff `@MappedSuperclass` parents (`UpdateAutoTimestampEntity`, `GracePeriodBase`, `DomainDsDataBase`, `BaseTransferObject`), strips leading inline `@Annotation(...)` tokens instead of skipping annotated field lines, skips Java comment lines in anti-pattern checks (while still catching `/* package */`), fixes `fqn_pattern` capturing so full FQNs print, scopes `check_commit_message()` `[OK]` to local errors, and expands internal-leak checks to cover `//depot/configs` and `cl/<digits>` (`15/15` unit tests). - `config/presubmits.py`: adds `verify_agent_scripts()` so `check_diff_test.py` runs automatically on `./gradlew runPresubmits` and CI. - `.agents/skills/java-ast-refactoring/scripts/run_rewrite.sh`: adds `set -euo pipefail`, an `EXIT` cleanup trap for temporary files, and portable top-level `^name:` YAML extraction via `awk`. Verification: - `python3 .agents/skills/pr-polisher/scripts/check_diff_test.py -v`: `15/15` passed. - `python3 .agents/skills/pr-polisher/scripts/check_diff.py`: `0` errors, `0` warnings (`spotlessCheck` and `javaIncrementalFormatCheck` passed). - `./gradlew --no-daemon runPresubmits`: `BUILD SUCCESSFUL` (includes running `check_diff_test.py` via `verify_agent_scripts()`). - Strict `PyYAML` parse OK on all `.agents/skills/*/SKILL.md` files, `bash -n` on `run_rewrite.sh`, and `0` lines > 80 chars in `core/AGENTS.md` and `console-webapp/AGENTS.md`. BUG=http://b/593117423 Signed-off-by: Ben McIlwain <mcilwain@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Always-on repository instructions in
GEMINI.mdconsume context on every turn, while GitHub and Reviewable PR review mechanics (paginated comment retrieval, Quote-reply threading, disposition prefixes, and auto-merge checks) are only needed during code review tasks. Placing these steps in an on-demand skill under.agents/skills/keepsGEMINI.mdlean while giving agents exact, reliable workflows when reviewing or responding to pull requests—preventing dropped Reviewable comments, duplicate replies, HTTP 422 inline review errors, and accidental auto-merges.Adds
.agents/skills/pr-review/SKILL.mdcovering:pulls/<n>/reviews,pulls/<n>/comments,issues/<n>/comments) with--paginateplus paginated GraphQLreviewThreadsso bundled Reviewable discussions are not missed.upstream/master(with HTTPS fallback), applying surgical fixes with tests, amending the single commit, runningpr-polisheruntil green, live rechecking before replying, posting a single batched Reviewable Quote-reply (Done./Satisfied), replying to and resolving native GitHub threads via GraphQLresolveReviewThread, and syncing the PR description while preserving both Reviewable footer blocks.autoMergeRequestbefore approving, verifying exactRIGHT-side diff hunk line numbers before posting reviews, and using Reviewable disposition prefixes (Nit (non-blocking):,FYI:, and explicit blocking prefixes) intentionally.Intentionally leaves
GEMINI.mdand.gemini/skills/pr-polisher/untouched to avoid merge conflicts with #3295 and #3311.BUG=http://b/593117423
This change is