Skip to content

doc: contributing: document AI usage policy - #571

Merged
qdeslandes merged 1 commit into
facebook:mainfrom
qdeslandes:feature/ai_policy
Jul 22, 2026
Merged

doc: contributing: document AI usage policy#571
qdeslandes merged 1 commit into
facebook:mainfrom
qdeslandes:feature/ai_policy

Conversation

@qdeslandes

Copy link
Copy Markdown
Contributor

Move the content of CONTRIBUTING.md into the developer documentation so it lives on a single page, and reduce CONTRIBUTING.md to a link to it. Add a policy on AI-assisted contributions: AI is welcome, but authors must understand, build, and test what they submit, and disclose AI usage in the PR. Add a pull request template enforcing the same expectations, and restore the security disclosure instructions as a dedicated section.

@meta-cla meta-cla Bot added the cla signed label Jul 21, 2026
yaakov-stein
yaakov-stein previously approved these changes Jul 21, 2026

@yaakov-stein yaakov-stein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My main thought is that we may care less about AI usage and more about quality and an author willing to stand behind the work + deeply understand what they are sending. If that is the case, then it may make more sense to focus more on the rules that are in line with ensuring quality. But either way, this is more of a nit and the current change LGTM

Comment thread doc/developers/contributing.rst Outdated
Comment thread doc/developers/contributing.rst Outdated

**Follow the style guide.** Formatting is enforced by ``.clang-format``, the rest is in :doc:`style`, and commits use ``component: subcomponent: short description``. Ignoring the style after it's been pointed out tells me the same thing an untested diff does: nobody looked.

**Say if you used AI.** A line in the PR is enough ("AI-drafted the tests and description, wrote the code by hand"). "None" is a fine answer. I may ask, so just be straight about it. Undisclosed AI is one of the things that gets a PR closed with a link to this page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the PR is tested well, summary is clear, concise, and high-value, and the code is well-written and not overly verbose - is it really important to disclose AI usage?

Also, if it is purely based on an AI disclosure, how do we prevent garbage AI PR's where the author lies about AI usage?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If the PR is tested well, summary is clear, concise, and high-value, and the code is well-written and not overly verbose - is it really important to disclose AI usage?

I think it would be worth it anyway, as it could give us hints about the whether there's a human involved or not. This requirement can be dropped for trusted (for some definition of "trusted") contributors.

Also, if it is purely based on an AI disclosure, how do we prevent garbage AI PR's where the author lies about AI usage?

Some people will lie anyway, but it could make our life easier: em dashes in the commit message + "I didn't use AI at all" would be a solid ground to close the PR.

Move the content of CONTRIBUTING.md into the developer documentation so
it lives on a single page, and reduce CONTRIBUTING.md to a link to it.
Add a policy on AI-assisted contributions: AI is welcome, but authors
must understand, build, and test what they submit, and disclose AI
usage in the PR. Add a pull request template enforcing the same
expectations, and restore the security disclosure instructions as a
dedicated section.
@qdeslandes
qdeslandes merged commit 286e85d into facebook:main Jul 22, 2026
36 of 38 checks passed
@qdeslandes
qdeslandes deleted the feature/ai_policy branch July 22, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants