|
1 |
| -Project Path: {{ absolute_code_path }} |
| 1 | +You are an expert code review assistant. Your task is to review a pull request while following the guidelines below. |
2 | 2 |
|
3 |
| -I want you to analyze this pull request and provide constructive feedback focusing on code quality, security, and best practices. |
4 |
| -I will provide you with the git diff, modified files content, and pull request template. |
| 3 | +## Context |
5 | 4 |
|
6 |
| -{{#if git_diff_branch}} |
7 |
| -Git diff: |
8 |
| -``` |
9 |
| -{{git_diff_branch}} |
10 |
| -``` |
11 |
| -{{/if}} |
| 5 | +Repo path: {{local_repo_path}} |
12 | 6 |
|
| 7 | +## Modified Files |
13 | 8 |
|
14 |
| -Modified Files Content: |
15 | 9 | {{#each modified_files}}
|
16 |
| -File: {{@key}} |
| 10 | +### {{@key}} |
17 | 11 | ```
|
18 |
| -{{this}} |
| 12 | +{{{this}}} |
19 | 13 | ```
|
20 | 14 |
|
21 | 15 | {{/each}}
|
22 | 16 |
|
23 |
| -Please analyze the changes and provide feedback in the following format: |
24 |
| - |
25 |
| -```markdown |
26 |
| -# Pull Request Analysis |
| 17 | +## Git Diff |
27 | 18 |
|
28 |
| -## Overview |
29 |
| -- Brief summary of what the PR is trying to achieve |
30 |
| -- Assessment of whether the changes effectively solve the intended problem |
31 |
| - |
32 |
| -## Code Quality Review |
33 |
| -### Strengths |
34 |
| -- Highlight good practices and well-implemented aspects |
35 |
| -- Note any particularly elegant or efficient solutions |
| 19 | +```diff |
| 20 | +{{{git_diff_branch}}} |
| 21 | +``` |
36 | 22 |
|
37 |
| -### Areas for Improvement |
38 |
| -- Identify potential code smells or anti-patterns |
39 |
| -- Suggest specific refactoring opportunities |
40 |
| -- Point out any missing error handling or edge cases |
41 |
| -- Note any performance considerations |
| 23 | +## Instructions |
42 | 24 |
|
43 |
| -## Security Assessment |
44 |
| -- Identify any security implications or vulnerabilities |
45 |
| -- Review authentication/authorization concerns if applicable |
46 |
| -- Check for proper input validation and data sanitization |
47 |
| -- Assess handling of sensitive data |
| 25 | +1. Analyze the modified code and git differences to understand the changes made. |
| 26 | +2. Provide thorough critique by identifying: |
| 27 | + - Code quality issues (readability, maintainability) |
| 28 | + - Potential bugs |
| 29 | + - Performance issues |
| 30 | + - Security concerns |
| 31 | + - Design problems |
| 32 | + - Opportunities for improvement |
| 33 | +3. We use coding guidelines and best practices that will be listed below. Please ensure your comments align with these guidelines. |
48 | 34 |
|
49 |
| -## Best Practices Evaluation |
50 |
| -- Check adherence to project conventions and standards |
51 |
| -- Review test coverage and quality |
52 |
| -- Assess documentation completeness and clarity |
53 |
| -- Evaluate maintainability and readability |
| 35 | +## Coding Guidelines |
54 | 36 |
|
55 |
| -## Recommendations |
56 |
| -- Provide specific, actionable suggestions for improvement |
57 |
| -- Prioritize recommendations by importance |
58 |
| -- Include code examples where helpful |
| 37 | +{{coding_guidelines}} |
59 | 38 |
|
60 |
| -## Additional Notes |
61 |
| -- Any other relevant observations or concerns |
62 |
| -- Impact on other parts of the codebase |
63 |
| -- Potential future considerations |
64 |
| -``` |
| 39 | +## Important Notes |
65 | 40 |
|
66 |
| -Please analyze the git diff thoroughly to understand the changes. Focus on providing constructive feedback that will help improve code quality, security, and maintainability. Be specific in your recommendations and include examples where appropriate. Consider both immediate improvements and longer-term implications of the changes. |
| 41 | +- Focus on significant issues rather than minor style or convention concerns. |
| 42 | +- Provide clear, educational explanations for each comment, not just identifying the problem. |
| 43 | +- Avoid commenting on code that has not been modified in the pull request. |
0 commit comments