-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Finding some reoccurring themes for prompting CoPilot as a "first reviewer" of local pre-commit, working branch code. We would like to provide a baseline prompt to review code and provide feedback...where possible, including suggested changes which can be applied with a couple of clicks.
The intention is to reduce engineer time needed to perform code reviews. By running some of these prompts and the PR diff through an LLM, we can ensure that code quality is held to a high standard. This removes the need for a human to catch syntax issues, documentation correctness, inefficiencies, and missing code coverage.
Describe the solution you'd like
- agent prompt(s)
List of inclusion
- evaluate my code for correctness
- evaluate my function docs and type hints for gaps and readability
- evaluate my approach for this functionality. Suggest alternative approaches. Look for more efficient ways to achieve the result.
- evaluate my code for quality and maintainability
- analyze this code for refactoring opportunities, look for ways to reduce code or simplify logic
- identify gaps in my unit test scenarios for this code
- evaluate if the log statements are accurate in describing the state of the logic throughout
consider
- user elicitation
- https://docs.github.com/en/copilot/tutorials/customization-library/prompt-files/review-code
- https://github.com/github/awesome-copilot/blob/main/instructions/code-review-generic.instructions.md
Alternatives you've considered
Copilot code review is a premium feature, available with the Copilot Pro, Copilot Pro+, Copilot Business, and Copilot Enterprise plans.
https://docs.github.com/en/copilot/concepts/agents/code-review
Additional context
Should be effective, but succinct, while allowing leads in projects to extend or add specific project level guidance as needed