agents: Do not remove comments that already exist#3742
Merged
joaomariolago merged 1 commit intobluerobotics:masterfrom Jan 26, 2026
Merged
agents: Do not remove comments that already exist#3742joaomariolago merged 1 commit intobluerobotics:masterfrom
joaomariolago merged 1 commit intobluerobotics:masterfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates AGENTS guidelines to require preserving existing comments when refactoring untouched logic. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The new guideline about preserving existing comments could be clearer about exceptions (e.g., when comments are incorrect, redundant, or violate the “no what-comments” rule) to avoid confusion when refactoring legacy code.
- Consider tightening the wording of the new line (e.g., splitting into two sentences or removing the comma after 'comments') to improve readability and keep it consistent with the style of the surrounding bullets.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new guideline about preserving existing comments could be clearer about exceptions (e.g., when comments are incorrect, redundant, or violate the “no what-comments” rule) to avoid confusion when refactoring legacy code.
- Consider tightening the wording of the new line (e.g., splitting into two sentences or removing the comma after 'comments') to improve readability and keep it consistent with the style of the surrounding bullets.
## Individual Comments
### Comment 1
<location> `AGENTS.md:48` </location>
<code_context>
- Use 120 character line length
- No docstrings unless the function is non-obvious
- No comments unless explaining "why", never "what"
+- Preserve existing comments, when refactoring code, do not delete comments from code you haven't logically changed
- Prefer editing existing files over creating new ones
- Use optional chaining (`?.`) when possible in typescript
</code_context>
<issue_to_address>
**issue (typo):** Consider fixing the comma splice by adjusting punctuation or restructuring the sentence.
This sentence currently has a comma splice. For example, you could rewrite it as: "Preserve existing comments when refactoring code; do not delete comments from code you haven't logically changed" or "When refactoring code, preserve existing comments and do not delete comments from code you haven't logically changed."
```suggestion
- Preserve existing comments when refactoring code; do not delete comments from code you haven't logically changed
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
23b5e5e to
7042ad4
Compare
joaomariolago
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Documentation: