feat: allow users to add their own review style prompts - #113
Conversation
There was a problem hiding this comment.
I will add a more serious one but just wanted to test this out aha
There was a problem hiding this comment.
I think there's a discussion to be had here where we should keep these files, if this is a change we want to keep. I personally feel they should be in their own repo, or even s3, so that people can freely make changes to their own files.
|
Detected new or modified files in |
| if (personalStyle?.mode === "augment") { | ||
| sections.push( | ||
| `\n## Reviewer Style Preferences (${personalStyle.login})\n\n` + | ||
| `The PR author has personal review-style preferences below. Where these conflict with the guidance above, prefer these.\n\n` + |
There was a problem hiding this comment.
This note is broader than the docs describe, and it sits after the repo's focus_areas/context/ignore_paths sections, so "the guidance above" includes them.
- README line 32 scopes the augment note to "tone conflicts."
- README precedence rule feat: add Conventional Commits reusable workflow #3 says repo
focus_areas/context/ignore_paths"still apply... scope stays with the repo, tone stays with you."
But "Where these conflict with the guidance above, prefer these" tells the model to prefer the personal style over everything above, including the repo's focus areas and the "Avoid False Positives" guardrails. That contradicts the documented precedence and weakens the "safest option, keeps guardrails" framing.
Scope the instruction to tone/formatting:
| `The PR author has personal review-style preferences below. Where these conflict with the guidance above, prefer these.\n\n` + | |
| `The PR author has personal review-style preferences below. Where these conflict with the *tone or formatting* guidance above, prefer these. They do not override the review scope, guardrails, or repo focus areas.\n\n` + |
SummaryAdds per-author "personal review styles": a PR author can drop The trust boundary is right: styles are read from the Issues Found🟡 Important — The appended note says "Where these conflict with the guidance above, prefer these." That section is pushed after the repo's
As written, a personal style can instruct the model to override repo focus areas or the guardrails, undermining the "safest option, keeps guardrails" framing. Suggested wording fix left inline. 🟢 Suggestion — The bullet says override keeps "no posting instructions, unless you write them yourself." But the workflow always appends the Areas Reviewed
Questions for Author
|
MounirDhahri
left a comment
There was a problem hiding this comment.
Nice! very welcome addition
|
Also, it's kind of a mindset shift, from AI being an external that reviews your work as a colleague, who might louder, nitpicking (except that it makes more mistakes), to being a pairing buddy or something like that. |
Adds support for individual, per-author review styles in the Claude PR review workflow, on top of the existing per-repo
.claude-review.ymlcustomisation.Previously the review prompt was a single hardcoded default merged only with per-repo config. Different engineers want different review tone and emphasis regardless of which repo they're working in. This adds a lightweight, centrally-managed mechanism for that: a personal file that's picked up automatically based on the PR author's GitHub login name, with no changes needed in any consuming repos.
Note however that repo-specific review prompts will currently cause user-specific settings to be ignored. We can come back and redesign that if this is a feature we like.
review-styles/<github-login>.mdfile per person, loaded via the PR author's login and merged into the review prompt.modevia YAML frontmatter (augment,replace_style, oroverride), controlling how much of the default prompt (guardrails, review format) their style keeps versus replaces.DEFAULT_PROMPTinbuild-review-prompt.tsinto named sections (PROMPT_HEADER,HOW_TO_WRITE,PROMPT_CLOSING) so the tone section can be swapped independently.PR_AUTHORenv var on the prompt-build step.prompt:overrides in.claude-review.ymlstill take precedence over personal styles.review-styles/README.mdexplaining setup and the three modes, an example personal style file, and documentation indocs/actions.md.Co-authored with Claude Opus 5 (plan) and Sonnet 5 (code).