From b185997ce804a53e4114543a7a70ab797b4eea92 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 29 Jul 2024 12:23:30 -0700 Subject: [PATCH] Update prompt files (#1867) * Update prompt files * Update .gitignore --- .gitignore | 4 +++- .prompts/code-review.prompt | 10 ++++------ .prompts/code-smells.prompt | 3 ++- .prompts/comment.prompt | 2 +- .prompts/terminal:debug-jest.prompt | 2 ++ .prompts/unit-tests.prompt | 4 ++-- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a092b3caa..bf28524cd 100644 --- a/.gitignore +++ b/.gitignore @@ -166,4 +166,6 @@ Icon? .continue # Sandbox env default file -extensions/vscode/manual-testing-sandbox/example.ts \ No newline at end of file +extensions/vscode/manual-testing-sandbox/example.ts + +.prompts/ \ No newline at end of file diff --git a/.prompts/code-review.prompt b/.prompts/code-review.prompt index ec101a72e..8d9fe100b 100644 --- a/.prompts/code-review.prompt +++ b/.prompts/code-review.prompt @@ -5,12 +5,12 @@ You will be acting as a senior software engineer performing a code review for a 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. @@ -23,7 +23,7 @@ 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 is some examples. +Here are some examples. ### filename.js @@ -79,10 +79,8 @@ 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 index 2aa1bd2cf..0379c5bc1 100644 --- a/.prompts/code-smells.prompt +++ b/.prompts/code-smells.prompt @@ -5,7 +5,8 @@ You will be acting as a senior software engineer performing a code review for a 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. diff --git a/.prompts/comment.prompt b/.prompts/comment.prompt index 1162ee815..8e5f95488 100644 --- a/.prompts/comment.prompt +++ b/.prompts/comment.prompt @@ -5,7 +5,7 @@ You will be acting as a senior software engineer helping a colleague document th 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 index 3b92b5a1f..3ec5909d6 100644 --- a/.prompts/terminal:debug-jest.prompt +++ b/.prompts/terminal:debug-jest.prompt @@ -10,5 +10,7 @@ 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 index 228cc6ea9..a261bb7ca 100644 --- a/.prompts/unit-tests.prompt +++ b/.prompts/unit-tests.prompt @@ -5,12 +5,12 @@ You will be acting as a senior software engineer helping a colleague to create u 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 }}}