Skip to content

Commit b78ffac

Browse files
authored
Merge pull request #1029 from Pythagora-io/code-reviewer-tweaks
Tell code reviewer not to suggest changes in other files.
2 parents 80f7a46 + 9d52557 commit b78ffac

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

core/prompts/code-reviewer/review_changes.prompt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ As you can see, there {% if hunks|length == 1 %}is only one hunk in this diff, a
1818
When reviewing the code changes, apply these principles to decide on each hunk:
1919
- Apply: Approve and integrate the hunk into our core codebase if it accurately delivers the intended functionality or enhancement, aligning with our project objectives. This action confirms the change is beneficial and meets our quality standards.
2020
- Ignore: Use this option sparingly, only when you're certain the entire hunk is incorrect or will introduce errors (logical, syntax, etc.) that could negatively impact the project. Ignoring means the hunk will be completely removed. This should be reserved for cases where the inclusion of the code is definitively more harmful than its absence. Emphasize careful consideration before choosing 'Ignore.' It's crucial for situations where the hunk's removal is the only option to prevent significant issues. Otherwise, 'Rework' might be the better choice to ensure the code's integrity and functionality.
21-
- Rework: Suggest this option if the concept behind the change is valid and necessary but is implemented in a way that introduces problems. This indicates a need for a revision of the hunk to refine its integration without fully discarding the underlying idea.
21+
- Rework: Suggest this option if the concept behind the change is valid and necessary but is implemented in a way that introduces problems. This indicates a need for a revision of the hunk to refine its integration without fully discarding the underlying idea. DO NOT suggest making changes to files other than the one you're reviewing.
2222

2323
When deciding what should be done with the hunk you are currently reviewing, pick an option that most reviewers of your skill would choose. Your decisions have to be consistent.
2424

core/prompts/developer/breakdown.prompt

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ Now, tell me all the code that needs to be written to implement ONLY this task a
2121

2222
{% include "partials/doc_snippets.prompt" %}
2323

24-
**IMPORTANT**
2524
{%- if state.epics|length == 1 %}
25+
**IMPORTANT**
2626
Remember, I created an empty folder where I will start writing files that you tell me and that are needed for this app.
2727
{% endif %}
2828
{% include "partials/relative_paths.prompt" %}
29+
2930
DO NOT specify commands to create any folders or files, they will be created automatically - just specify the relative path to each file that needs to be written.
3031

3132
{% include "partials/file_naming.prompt" %}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
**IMPORTANT**: Pay attention to file paths: if the command or argument is a file or folder from the project, use paths relative to the project root.
22
For example:
33
- use `dirname/filename.py` instead of `/path/to/project/dirname/filename.py`
4-
- use `filename.js` instead of `./filename.js`
4+
- use `filename.js` instead of `./filename.js`

0 commit comments

Comments
 (0)