Skip to content
Merged
Changes from 2 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
6 changes: 6 additions & 0 deletions getting-started/generative-ai.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ Unacceptable uses
Maintainers may close issues and PRs that are not useful or productive, including
those that are fully generated by AI. If a contributor repeatedly opens unproductive
issues or PRs, they may be blocked.

Anti-patterns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a second anti-pattern to include in the list? Other bad things: hallucinations, incorrectly changing tests instead of fixing code, ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you covered the incorrectly changing tests instead of fixing one. Good call. I like having that in the list.

I don't personally see that so often anymore with Opus 4.1 or Sonnet 4.5, but older or lower end models tend to reward hack their way into that state more often - it's a thing we'll likely encounter coming from new contributors for a while as they can't be assumed to be using the latest and greatest.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use a different title than antipatterns. I would like to move toward "Considerations or Keys for Success".

I would start by linking to the section about submitting a quality PR:

  • consider whether the change is necessary
  • small, focused changes
  • tests that exercise the change
  • style follows the existing code

AI coding tools will compose code. The contributor, not the AI tool, is responsible for the quality and validity of code submitted with a PR.

Take the time to consider the code changes suggested by an AI tool. Respect the reviewer's time by validating your PR before submission.

=============
- While AI-assisted tools such as autocompletion can enhance productivity, they sometimes rewrite entire code blocks instead of making small, focused edits.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd actually tighten this phrasing up a bit, we don't need to explain what shape AI tools can take or what they can do (anyone reading this knows that).

I find this list of anti-patterns to not be AI specific. We already reject PRs coming from people who make larger than necessary changes that are difficult to review. So I'd suggest wording it as a "positive desired thing, not negative example" phrasing, starting something like this:

  • Make small focused edits, prefer not rewriting entire code blocks.
    This makes it easier to review changes and fully understand both the original intent of the code and the rationale behind the new modifications.
    ...

This can make it more difficult to review changes and to fully understand both the original intent of the code and the rationale behind the new modifications.
Please keep maintaining consistency with the original code helps preserve clarity, traceability, and meaningful review.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Please keep maintaining consistency with the original code helps preserve clarity, traceability, and meaningful review.
Maintaining consistency with the original code helps preserve clarity, traceability, and meaningful review.

We also might want to mention (and link to?) the idea that we want to avoid churn.

Loading