-
Notifications
You must be signed in to change notification settings - Fork 0
feat: allow users to add their own review style prompts #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Personal review styles | ||
|
|
||
| The [Claude AI PR review](../docs/actions.md#run-claude-reviewyml) uses one default | ||
| prompt for everyone. If you want the review of *your* PRs to have a different tone | ||
| or emphasis, regardless of which repo the PR is in, add a file here. | ||
|
|
||
| ## Setup | ||
|
|
||
| Create `review-styles/<your-github-login>.md` (lowercase) in this repo, e.g. | ||
| `review-styles/amonkhouse.md`. It's picked up automatically the next time a PR you | ||
| author is reviewed, in any repo that uses this workflow. No other setup needed. | ||
|
|
||
| ## Format | ||
|
|
||
| Optional YAML frontmatter, then your style content in plain prose or bullets: | ||
|
|
||
| ```markdown | ||
| --- | ||
| mode: augment | ||
| --- | ||
| Be blunt and terse. Skip the summary on small PRs. | ||
| I care most about data-pipeline correctness and idempotency; flag anything | ||
| that could double-write or silently drop rows. UK English. | ||
| ``` | ||
|
|
||
| If you omit the frontmatter, `mode` defaults to `augment`. | ||
|
|
||
| ## Modes | ||
|
|
||
| - **`augment`** (default) - keeps the full default prompt (guardrails, review | ||
| format, priority emojis) and appends your content as a "Reviewer Style | ||
| Preferences" section, with a note that it wins on tone conflicts. Safest option; | ||
| right for most people who just want a different voice or emphasis. | ||
| - **`replace_style`** - keeps the default guardrails and review format, but swaps | ||
| out the "How to write" tone guidance for your content. Use this if you have | ||
| strong, complete opinions on tone and don't want the default tone advice | ||
| competing with yours. | ||
| - **`override`** - your content becomes the *entire* prompt. Nothing else is kept: | ||
| no false-positive guardrails, no required review format, no posting | ||
| instructions, unless you write them yourself. Only use this if you're | ||
| deliberately writing a full replacement prompt (mirrors the repo-level `prompt:` | ||
| field in `.claude-review.yml`, but scoped to you). | ||
|
|
||
| ## Precedence | ||
|
|
||
| 1. A repo's `.claude-review.yml` `prompt:` field (a full override for that repo) | ||
| always wins over your personal style - it's a deliberate repo-wide decision. | ||
| 2. Otherwise, your personal style is applied per its `mode`. | ||
| 3. A repo's `focus_areas`, `context`, and `ignore_paths` still apply in `augment` | ||
| and `replace_style` modes - scope stays with the repo, tone stays with you. | ||
| They do not apply under `override`, since there is no base prompt left to | ||
| append them to. | ||
|
|
||
| See `amonkhouse.md` in this directory for a worked example. |
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will add a more serious one but just wanted to test this out aha |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| mode: augment | ||
| --- | ||
| UK English. Be direct: state the issue and the fix, then stop, no closing summary. | ||
| I love emojis. Use more of them. Especially the frog. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.