Repository navigation
[NoQA] Convert code-inline-reviewer rules into proactive coding guidelines for Claude - #81604
Conversation
|
Let's wait with this PR until #81651 gets merged, should be EOD 🤞🏻 |
|
All good, feel free to resolve conflicts @kacper-mikolajczak |
9fc6e8a to
62488ac
Compare
DecisionsThis approach tries to convert rules into abstracted form that can be picked up both during review and development. We are also improving the structure so it should be easier for reviewer not to loose context and carefully go through the rules (i.e. addition of to-do list during review).
What Was Done
This needs to be tested first in order not to fall into any critical regressions - I will create a testing PR tomorrow. |
|
Conflicts resolved ✅ |
|
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6907bf4cd7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
I love the idea here of pulling the best coding practices earlier into developers workflows, I'm just not sure about the approach currently. Some thoughts:
- The searchPatterns are very wide and I'm not sure language such as
Hardcoded numbers/stringsworks as a search pattern - Mentioning the rules in the main Claude file feels a bit bloaty, though the main Claude file does seem the best place for coding standards 😕
- A preferable solution would pull relevant rules into context, rather than pulling all rules for each session, though this is easier said than done, obviously, and also bloats the memory
- The skill description should describe when it should be triggered
alwaysApplypulls the rule details, but not the rule itself, not sure this will work automatically, without manually being told to check the rules- I still kinda think hooks might be preferable here. Or we put these rules in a more typical style file that Claude is simply prompted to review when preparing PRs
Would like to hear @thienlnam's thoughts on this too when he's back
Agree! We've discussed it with @adhorodyski and I intend to look into with more depth as one of the next improvements. Let's keep them for now as they were not to introduce too much changes in one PR (we'd like to test moving rules into a skill in separation) |
Currently, Claude only loads the SKILL description (based on three steps of progressive disclosure) so it won't pollute context much until it really needs relevant info. It skips For the Cursor case, which makes use of Let me know if you have any specific idea of implementing this in mind.
With proper rule description + reference guide inside SKILL, rules should be pulled consistently. As we've discussed recently, we are lacking consistent testing framework, so most of those are tested in practice - I will create testing PR to increase our confidence. Skill has an advantage of progressive disclosure - if it's going to perform worse, then we can pivot to Thanks for the profound feedback @Julesssss! I applied/answered all the comments ❤️ CC @adhorodyski |
|
Created a testing PR: #82206 This refactor does not introduce any new rules, so the testing PR consist of synthetic tests that should check we don't have any regressions compared to existing setup. @mountiny @Julesssss asking kind souls to run that ❤️ |
|
Ah I missed that the rules sit under the I am unfamiliar with Cursor, perhaps we can simply run some manual prompts against main and then this branch to verify? Thanks for the test PR, let me modify the workflow and run a manual test tomorrow. |
@Julesssss I ran some "diagnostic" prompts (like |
@Julesssss When ready, could you please link to the test workflow? Thanks! In the meantime, I triggered current reviewer on the PR to check whether it picks up those violations, so we can compare with version from here. |
Yep sorry, just got to this. In the end I just ran locally with apparent success:
Locally I see Claude has knowledge of the rules and retrieves the skill when asked about code rules. Not a perfect test, of course.
|
Awesome news @Julesssss! Thanks for running that. We are ready to merge this 🚀 CC @mountiny |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.3.20-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.20-6 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.20-6 🚀
|

Explanation of Change
Fixed Issues
$ #81478
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari