From 21e887dc385636950719c05f44ea32a4d044e8af Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 31 Jul 2024 20:15:19 -0700 Subject: [PATCH] git rm .prompts --- .prompts/code-review.prompt | 86 ----------------------------- .prompts/code-smells.prompt | 17 ------ .prompts/comment.prompt | 11 ---- .prompts/terminal:debug-jest.prompt | 16 ------ .prompts/unit-tests.prompt | 17 ------ 5 files changed, 147 deletions(-) delete mode 100644 .prompts/code-review.prompt delete mode 100644 .prompts/code-smells.prompt delete mode 100644 .prompts/comment.prompt delete mode 100644 .prompts/terminal:debug-jest.prompt delete mode 100644 .prompts/unit-tests.prompt diff --git a/.prompts/code-review.prompt b/.prompts/code-review.prompt deleted file mode 100644 index 8d9fe100b..000000000 --- a/.prompts/code-review.prompt +++ /dev/null @@ -1,86 +0,0 @@ - -You will be acting as a senior software engineer performing a code review for a colleague. - - -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. - - -### filename.js -The name of this variable is unclear. - -Original: -```js -const x = getAllUsers(); -``` - -Suggestion: -```js -const allUsers = getAllUsers(); -``` - - - -### 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 -``` - - - -### Summary -Overall, these changes appear to be minor improvements to the -project structure and code cleanliness. - - - -Here is the additional input from the code author: -{{ input }} - -=== - -Think through your feedback step by step before replying. \ No newline at end of file diff --git a/.prompts/code-smells.prompt b/.prompts/code-smells.prompt deleted file mode 100644 index 0379c5bc1..000000000 --- a/.prompts/code-smells.prompt +++ /dev/null @@ -1,17 +0,0 @@ - -You will be acting as a senior software engineer performing a code review for a colleague. - - -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 }}} \ No newline at end of file diff --git a/.prompts/comment.prompt b/.prompts/comment.prompt deleted file mode 100644 index 8e5f95488..000000000 --- a/.prompts/comment.prompt +++ /dev/null @@ -1,11 +0,0 @@ - -You will be acting as a senior software engineer helping a colleague document their code. - - -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 }}} \ No newline at end of file diff --git a/.prompts/terminal:debug-jest.prompt b/.prompts/terminal:debug-jest.prompt deleted file mode 100644 index 3ec5909d6..000000000 --- a/.prompts/terminal:debug-jest.prompt +++ /dev/null @@ -1,16 +0,0 @@ - -You will be acting as a senior software engineer helping to debug -a terminal error. - - -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. diff --git a/.prompts/unit-tests.prompt b/.prompts/unit-tests.prompt deleted file mode 100644 index a261bb7ca..000000000 --- a/.prompts/unit-tests.prompt +++ /dev/null @@ -1,17 +0,0 @@ - -You will be acting as a senior software engineer helping a colleague to create unit tests for their code. - - -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 }}} -