Repository navigation
CONTRIBUTING: AI-assisted contributions section - #10701
felixpalmer wants to merge 4 commits into
Conversation
|
chrisgervang
left a comment
There was a problem hiding this comment.
Some initial thoughts - I'm directionally supportive of this policy, but want to make sure we're addressing the root causes
On a practical note, every AI's default action is to write some sort of PR description on its own when it opens a PR.
It's common practice now for me to build up a big set of changes and then have an LLM split them out into reviewable PRs for me.
I think our repo is missing a good writing style guideline for creating PRs. Creating one with examples of good and bad and why seems worth doing.
Probably a non-trivial effort to create, however, we do benefit from ~8 years of PR descriptions written by humans we can analyze and fit a guide around
|
|
||
| - **Think**. If a contribution will take more effort to review than it took you to create, something is wrong. | ||
| - Avoid **copy-pasting** responses from AI into conversations with humans (a.k.a. "don't be a meat-proxy"). | ||
| - Avoid AI-generated **PR descriptions**, they will likely *not* be read. The maintainers of this repo are perfectly capable of generating their own AI summary of a PR. |
There was a problem hiding this comment.
Soft-banning AI generated descriptions doesn't address the underlying issue, since a human can also write a horribly unclear description as well
I'd rather see a writing style guideline for what is not encouraged, and what is. This would be helpful to everyone, honestly
We can publish a better PR template and direct LLMs to use it.
And finally, if a description is poorly written, I'd expect a maintainer to be free to close the PR citing our guidelines
There was a problem hiding this comment.
I did link to an example, and I'm not against having a clearer guide. Although honestly, adding a style guide to enable AI to better imitate us maintainers is ignoring the second point I made before.
There was a problem hiding this comment.
I agree there needs to be a way to know whether or not the "author" has actually read their code, but I do not believe the qualities of a PR description are a good positive or authoritative signal.
They're a great negative signal, but we shouldn't conflate the two.
I don't believe the industry has popularized a method for this..
In the short term I suggest an alternative proposal:
AI authored PRs must be submitted as draft and manually switched to "Ready for review" by the human responsible for the contribution.
This is still trust-based, but is likely a better match for the intent here:
has a human reviewed this change before throwing it to maintainers?
| - Avoid **copy-pasting** responses from AI into conversations with humans (a.k.a. "don't be a meat-proxy"). | ||
| - Avoid AI-generated **PR descriptions**, they will likely *not* be read. The maintainers of this repo are perfectly capable of generating their own AI summary of a PR. | ||
| - The best PR description is a short set of **bulletpoints written by a human**. [Example](https://github.com/visgl/deck.gl/pull/10570) | ||
| - If you must, **label any AI-generated context** in a PR message, under a heading: "Context for AI". |
There was a problem hiding this comment.
Does AI need context? I'm not familiar with the use case
There was a problem hiding this comment.
The pattern is giving a new AI session a "handoff" document. I can see this being useful for AI bots that can read a trillion words per second, but irritating for humans. For example, why should a human be reading:
Validation
yarn build — passed.
yarn lint — passed.
yarn test-fast — passed (19 tests).
./node_modules/.bin/vitest run --project headless test/modules/core test/modules/maplibre — passed (446 tests across 71 files).
Full headless suite with --bail 1 — 279 passed, 3 skipped, then stopped on a timeout in Deck#multi-canvas mode cannot be changed. That test passes in the isolated core/MapLibre run; full-suite validation remains unresolved.
on every PR (just randomly chose: #10697 but this is a common pattern)
What I'm proposing is that if the AI wants to give some useful context to the AI agent the reviewer will inevitably use when reviewing the PR then it should be in a section that a human should know they can skip
There was a problem hiding this comment.
Ah, yes - I prefer this was not included in the PR. It's as-if this should add credibility, when it is in fact meaningless.. our own CI needs to pass and I don't care what happened locally.
I'd support discouraging this by putting it in the "bad example" section of the PR guide. And, being clear of what to include will likely result in these sections going away, too.
| - Avoid AI-generated **PR descriptions**, they will likely *not* be read. The maintainers of this repo are perfectly capable of generating their own AI summary of a PR. | ||
| - The best PR description is a short set of **bulletpoints written by a human**. [Example](https://github.com/visgl/deck.gl/pull/10570) | ||
| - If you must, **label any AI-generated context** in a PR message, under a heading: "Context for AI". | ||
| - Break larger contributions into **manageable chunks**. AI is a great tool for refactoring into multiple PRs. |
that depends on your usage pattern - I don't let AI
I appreciate that this is my personal view, but I think we could all agree that at least it should be clear what text is written by us humans. If it isn't clear, the assumption will become that it is all AI generated |
|
To me, the function of a PR description is to guide human reviewers through the change, and leave a trace about why a change was made.
That has become my assumption as well. I support a contributor who wants to attest their description was written by a human.
Many contributors do allow this (myself included), and agree to assume responsibility for their agent's actions.
Yeah.. the walls aren't helping anyone. I have pushed a guideline that includes specific lines about brevity and description title. Also, if a PR description is equivalent to a design document about the change then it should follow our guidelines and either be written as an RFC and/or an issue, not a PR, anyways. A PR is but one implementation option for the issue.. I appreciate this discussion and hope to continue refining my development workflow in this new era. I always thought of deck as having great dev hygiene, and I want to see the quality bar increase with AI assistance. I think these guidelines are a good step in the right direction. Overtime, I would like to see what best practices emerge that touch on
|
chrisgervang
left a comment
There was a problem hiding this comment.
I'm supportive of merging this after redirecting the PR description language towards the guidelines.
I've seen an improvement over the last week for new PRs generated by LLMs.
The community continues to iterate on how to format posts to differentiate human vs generated communication.. for instance, I quite like how @kylebarron has formatted his recent PRs and issues.
|
|
||
| - **Think**. If a contribution will take more effort to review than it took you to create, something is wrong. | ||
| - Avoid **copy-pasting** responses from AI into conversations with humans (a.k.a. "don't be a meat-proxy"). | ||
| - Avoid AI-generated **PR descriptions**, they will likely *not* be read. The maintainers of this repo are perfectly capable of generating their own AI summary of a PR. |
There was a problem hiding this comment.
| - Avoid AI-generated **PR descriptions**, they will likely *not* be read. The maintainers of this repo are perfectly capable of generating their own AI summary of a PR. | |
| - Follow the [guidelines](https://github.com/visgl/deck.gl/tree/master/dev-docs/pr-description-guidelines.md) for AI-generated **PR descriptions** |
| @@ -1,3 +1,6 @@ | |||
| <!-- If using AI to draft the PR description (discouraged), remove this line. Maintainers are under no obligation to read AI summaries. See CONTRIBUTING.md --> | |||
There was a problem hiding this comment.
| <!-- If using AI to draft the PR description (discouraged), remove this line. Maintainers are under no obligation to read AI summaries. See CONTRIBUTING.md --> | |
| <!-- If using AI to draft the PR description, remove this line. Maintainers are under no obligation to read descriptions that do not follow our guidelines. See CONTRIBUTING.md --> |
My general feelings on AI in issues and PR descriptions specifically are:
|
Text below is written by me without AI assistance
Background
Replaces #10680
Change List