.clinerules/workflows/find-pr-reviewers.md
Analyze my current branch to find the best people to review my PR based on domain expertise and git history.
mainorigin/main:
git diff origin/main...HEAD --name-only to get changed filesgit diff origin/main...HEAD to understand the nature/spirit of the changesgit log --format="%an <%ae>" -- <related-files-pattern> to find who has expertise in that domaingit blame -L <start>,<end> origin/main -- <file-path> for exact lines changedOutput an ordered list:
git config user.email
git diff origin/main...HEAD --name-only
git diff origin/main...HEAD
# Find related files for a domain (adjust pattern based on what you learn from the diff)
find . -type f \( -name "*slash-command*" -o -name "*SlashCommand*" \) | head -20
# Get contributors for related files
find . -type f \( -name "*slash-command*" -o -name "*SlashCommand*" \) -print0 | xargs -0 git log --format="%an <%ae>" -- | sort | uniq -c | sort -rn
git log --format="%an <%ae>" -- <file> | sort | uniq -c | sort -rn
git blame -L 10,20 origin/main -- <file>
Do NOT ask questions - analyze the changes, identify the domain, and output the reviewer list.