Update Claude PR review instructions based on 6 months of review analysis#2998
Open
Update Claude PR review instructions based on 6 months of review analysis#2998
Conversation
epeicher
approved these changes
Apr 8, 2026
Contributor
epeicher
left a comment
There was a problem hiding this comment.
I like the approach of using existing code review patterns, great idea @bcotrim! I have reviewed it and it looks good to me, as usual, this should be a live document that we should update as soon as we find some comments unnecessary, but I would say to give a try and iterate.
I would add a line asking for conciseness, for example, the following from Anthropic review-pr command
Instruct each to only provide noteworthy feedback. Once they finish, review the feedback and post only the feedback that you also deem noteworthy.
Provide feedback using inline comments for specific issues. <-- Already added 👍
Use top-level comments for general observations or praise.. <-- Already added 👍
Keep feedback concise.
LGTM!
| 13. **Visual & UX Consistency** | ||
| - Changes must look correct in both light and dark mode | ||
| - Check RTL layout if touching layout/positioning code | ||
| - Interactive states (loading, disabled, error) must handle rapid user interaction |
Contributor
There was a problem hiding this comment.
We could also add there something regarding accessibility e.g. watch for low color contast would be the most straightforward one
katinthehatsite
approved these changes
Apr 8, 2026
Contributor
katinthehatsite
left a comment
There was a problem hiding this comment.
The changes look good to me, I added one small suggestion 👍
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.
Related issues
How AI was used in this PR
Claude analyzed ~400 merged PRs from the last 6 months (Jul 2025 – Apr 2026), extracted inline review comments from ~65 PRs with the most review activity, and categorized the feedback patterns. It also explored the codebase across 5 dimensions (ESLint/linting, code patterns, docs/contribution guides, CLI/shared code, CI workflows). The final review instructions were written by Claude and iterated with human review.
Proposed Changes
Updates the
@claudePR review workflow prompt from 6 generic categories to 14 data-driven review priorities, ordered by real-world frequency.What changed:
docs/ai-instructions.md(nowAGENTS.md), Jest → Vitest, removed "database query efficiency" (Studio uses JSON files, not a DB)What didn't change:
@claudeinvocation pattern is unchangedTesting Instructions
@claudeto trigger the reviewPre-merge Checklist
Research: PR Review Feedback Analysis (Jul 2025 – Apr 2026)
Analyzed ~400 merged PRs, ~130 had inline review comments. Deep-dived into ~65 PRs with the most review activity.
Top Review Priorities (by frequency)
1. Code Simplification & Reducing Complexity (Most Common — ~25+ instances)
The single most frequent feedback category. Reviewers consistently push back on unnecessary complexity, extra abstractions, and over-engineering.
Examples:
sequentialutil (PR#2850)2. Naming & Clarity (Very Common — ~20+ instances)
removeSiteFromConfig" (PR#2731)StoredAuthToken" (PR#2821)DEFAULT_SKILLS_REPO_BRANCH" (PR#2729)filterUnsupportedBlueprintFeatures" (PR#1810)3. Removing Dead Code, Leftovers & AI Artifacts (Common — ~15+ instances)
4. Error Handling & Logging (Common — ~12+ instances)
catch {}swallows all errors. Consider only ignoringENOENTand logging/propagating other errors." (PR#2924)Promise.allSettlednever rejects so any potential errors will go unnoticed. Consider some logging." (PR#2862)5. Type Safety & Schema Design (Common — ~12+ instances)
versionfield matches what we expect. Usez.literalinstead." (PR#2821)6–15. Additional categories
Architecture & Separation (~10+), Reuse Existing Code (~10+), i18n (~8+), Performance/React (~8+), UX/Visual Consistency (~8+), PR Scope (~7+), Testing (~7+), Data Safety/Locking (~5+), Security (~10+ automated), Cross-Platform (~5+).
Key Reviewers & Their Focus Areas
Research: Codebase Patterns & Best Practices Analysis
Compiled from 5 parallel deep-dives into ESLint/linting, code patterns, docs/contribution guides, CLI/shared code, and CI workflows.
Enforced Rules (Automated)
@typescript-eslint/no-floating-promises@typescript-eslint/no-explicit-anyanytypes (except rest args)@typescript-eslint/no-unused-vars_or removedimport-x/orderstudio/require-lock-before-saveno-restricted-globals(CLI)__dirname/__filenamein ESMprettier/prettierCI Quality Gates
Key Architecture Patterns
constants.tsmodules/<feature>/withcomponents/,hooks/,lib/z.literal()for versions,safeParse(), shared intools/common/__()+sprintf(), 22 locales, never string concatenationCritical Pitfalls
Final Review Instructions (full version)
Review Priorities
Ordered by real-world frequency — the first categories catch the most issues.
1. Scope & Intent
2. Simplicity
The single most common review feedback in Studio. Push back on:
tools/common/lib/already has what's being written.3. AI-Generated Code
4. Naming & Clarity
removeSiteFromConfigoverremove,filterUnsupportedBlueprintFeaturesoverfilterFeatures.DEFAULT_SKILLS_REPO_BRANCHnotDEFAULT_BRANCH.5. Type Safety & Schemas
z.literal()for version fields.tools/common/lib/.6. Error Handling & Logging
7. Security
8. Data Safety
atomicallypackage.9. Architecture & Separation
constants.ts.tools/common/, not duplicated.10. Cross-Platform Compatibility
path.join(), never hardcoded separators.11. i18n
__()withsprintf(), never string concatenation.12. React & Performance
13. Visual & UX Consistency
14. Testing
Quick Checklist