Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell code reviewer not to suggest changes in other files. #1029

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/prompts/code-reviewer/review_changes.prompt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ As you can see, there {% if hunks|length == 1 %}is only one hunk in this diff, a
When reviewing the code changes, apply these principles to decide on each hunk:
- 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.
- 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.
- 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.
- 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.

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.

Expand Down
3 changes: 2 additions & 1 deletion core/prompts/developer/breakdown.prompt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ Now, tell me all the code that needs to be written to implement ONLY this task a

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

**IMPORTANT**
{%- if state.epics|length == 1 %}
**IMPORTANT**
Remember, I created an empty folder where I will start writing files that you tell me and that are needed for this app.
{% endif %}
{% include "partials/relative_paths.prompt" %}

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.

{% include "partials/file_naming.prompt" %}
Expand Down
2 changes: 1 addition & 1 deletion core/prompts/partials/relative_paths.prompt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**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.
For example:
- use `dirname/filename.py` instead of `/path/to/project/dirname/filename.py`
- use `filename.js` instead of `./filename.js`
- use `filename.js` instead of `./filename.js`
Loading