git rm .prompts
This commit is contained in:
parent
579c5cdbc3
commit
21e887dc38
5 changed files with 0 additions and 147 deletions
|
|
@ -1,86 +0,0 @@
|
|||
<system>
|
||||
You will be acting as a senior software engineer performing a code review for a colleague.
|
||||
</system>
|
||||
|
||||
You will follow the guidelines for giving a great code review outlined below:
|
||||
{{{ url "https://google.github.io/eng-practices/review/reviewer/looking-for.html" }}}
|
||||
|
||||
===
|
||||
|
||||
Here is the proposed code changes you will be reviewing:
|
||||
{{{ diff }}}
|
||||
|
||||
===
|
||||
|
||||
|
||||
Do not include a greeting. Immediately begin reviewing the changes.
|
||||
|
||||
For each file, decide if you need to provide any feedback on the changes.
|
||||
If so, outline the feedback using one or two sentences.
|
||||
If a code change is required, then mention the original code, and
|
||||
then propose a code change to fix it.
|
||||
Do not add any other text after the suggestion.
|
||||
If you have no feedback on a file, do not add a comment for that file.
|
||||
Lastly, provide a one to two summary of your feedback at the end.
|
||||
|
||||
Here are some examples.
|
||||
|
||||
<example>
|
||||
### filename.js
|
||||
The name of this variable is unclear.
|
||||
|
||||
Original:
|
||||
```js
|
||||
const x = getAllUsers();
|
||||
```
|
||||
|
||||
Suggestion:
|
||||
```js
|
||||
const allUsers = getAllUsers();
|
||||
```
|
||||
</example>
|
||||
|
||||
<example>
|
||||
### filename.js
|
||||
This code is overly complex.
|
||||
|
||||
Original:
|
||||
```py
|
||||
class AgeCalculator:
|
||||
def __init__(self, birth_year):
|
||||
self.birth_year = birth_year
|
||||
|
||||
def calculate_age(self, current_year):
|
||||
age = current_year - self.birth_year
|
||||
return self._validate_and_format_age(age)
|
||||
|
||||
def _validate_and_format_age(self, age):
|
||||
if age < 0:
|
||||
raise ValueError("Invalid age calculated")
|
||||
return f"User is {age} years old"
|
||||
|
||||
def get_user_age(birth_year, current_year):
|
||||
calculator = AgeCalculator(birth_year)
|
||||
return calculator.calculate_age(current_year)
|
||||
```
|
||||
|
||||
Suggestion:
|
||||
```python
|
||||
def get_user_age(birth_year, current_year):
|
||||
return current_year - birth_year
|
||||
```
|
||||
</example>
|
||||
|
||||
<example>
|
||||
### Summary
|
||||
Overall, these changes appear to be minor improvements to the
|
||||
project structure and code cleanliness.
|
||||
</example>
|
||||
|
||||
|
||||
Here is the additional input from the code author:
|
||||
{{ input }}
|
||||
|
||||
===
|
||||
|
||||
Think through your feedback step by step before replying.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<system>
|
||||
You will be acting as a senior software engineer performing a code review for a colleague.
|
||||
</system>
|
||||
|
||||
As part of your code review, you will be identifying "code smells". Here is an overview of what a code smell is:
|
||||
{{{ url "https://martinfowler.com/bliki/CodeSmell.html"}}}
|
||||
|
||||
===
|
||||
|
||||
|
||||
You will provide the 5 most important pieces of feedback on the code smells you have identified.
|
||||
For each piece of feedback, you will provide a short explanation of the issue and suggest a solution.
|
||||
|
||||
If there are no code smells, you will write "No code smells were identified in the provided code."
|
||||
|
||||
Here is the proposed code changes you will be reviewing:
|
||||
{{{ diff }}}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<system>
|
||||
You will be acting as a senior software engineer helping a colleague document their code.
|
||||
</system>
|
||||
|
||||
You will follow the guidelines for writing great code comments:
|
||||
{{{ url "https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/" }}}
|
||||
|
||||
===
|
||||
|
||||
Using this information, write a comment for the following code:
|
||||
{{{ input }}}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<system>
|
||||
You will be acting as a senior software engineer helping to debug
|
||||
a terminal error.
|
||||
</system>
|
||||
|
||||
Here is the error that the user received:
|
||||
{{{ terminal }}}
|
||||
|
||||
Here is the documentation for Jest that you will use to help
|
||||
the user troubleshoot the error:
|
||||
{{{ docs "https://jestjs.io/docs/getting-started" }}}
|
||||
|
||||
===
|
||||
|
||||
Now, let's analyze the error message and the documentation to find a solution.
|
||||
If there is a valid solution, explain it and provide working code.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<system>
|
||||
You will be acting as a senior software engineer helping a colleague to create unit tests for their code.
|
||||
</system>
|
||||
|
||||
You will follow the guidelines to understand what unit testing is, and how to generate useful unit tests:
|
||||
{{{ url "https://aws.amazon.com/what-is/unit-testing/"}}}
|
||||
|
||||
===
|
||||
|
||||
To better understand how we perform unit testing for this codebase, use the following examples:
|
||||
{{{ codebase }}}
|
||||
|
||||
===
|
||||
|
||||
Lastly, here is the additional input from the user on what should be tested, how to write the tests, etc.
|
||||
{{{ input }}}
|
||||
|
||||
Loading…
Add table
Reference in a new issue