gemini: add code review style guide - #890
Open
Aditya Shantanu (aditya-shantanu) wants to merge 1 commit into
Open
gemini: add code review style guide#890Aditya Shantanu (aditya-shantanu) wants to merge 1 commit into
Aditya Shantanu (aditya-shantanu) wants to merge 1 commit into
Conversation
Adds .gemini/styleguide.md, which Gemini Code Assist picks up automatically to guide its inline PR review comments. The guide establishes: - A four-tier severity system (blocking/should-fix/nit/question) with mandatory named labels — color dots alone aren't a convention PR authors know, so the name is required alongside the color - Exact comment format: severity tag → one-sentence problem with consequence → one-sentence fix, nothing more - Brevity rules: cut content not prose, complete sentences, no preamble, no derivations the author can reconstruct from the claim - What to review (correctness, races, error handling, context propagation, resource leaks, SSA field-clearing, proto contracts) and what to skip (formatting, summaries, praise, speculative concerns) - A higher confidence bar than a draft-review workflow would require: Gemini posts directly, so false positives cost the author time with no human checkpoint in between - Substrate-specific Go patterns: SSA apply-config field clearing, port-forward teardown in tests, context.Background() in helpers, proto field removals, sync.Mutex copied by value Also adds !.gemini/styleguide.md to .gitignore: .gemini/ is ignored for personal AI tool configs, but the style guide is a repo-level artifact. Derived from the review principles in the post-draft-review skill (agent-substrate#870), adapted for Gemini's direct-post model.
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.
Fixes #<issue_number>
What changed and why
Adds
.gemini/styleguide.md, which Gemini Code Assist picks up automatically to guide its inline PR review comments. Also exempts the file from the.gemini/gitignore rule (that rule targets personal AI tool configs; the style guide is a repo-level artifact).The guide establishes:
blocking🔴 /should-fix🟡 /nit🟢 /question🟢, with mandatory named labels (color dots alone aren't a convention PR authors know)context.Background()in helpers, proto field removals as breaking changes,sync.Mutexcopied by valueDerived from the review principles in the post-draft-review skill (#870), adapted for Gemini's direct-post model.
Checklist
go test ./...)hack/run-root-tests.sh)