Skip to content

docs: add AI policy and link from CONTRIBUTING.md - #16583

Open
rmuir wants to merge 1 commit into
apache:mainfrom
rmuir:ai-policy
Open

docs: add AI policy and link from CONTRIBUTING.md#16583
rmuir wants to merge 1 commit into
apache:mainfrom
rmuir:ai-policy

Conversation

@rmuir

@rmuir rmuir commented Aug 29, 2026

Copy link
Copy Markdown
Member

Per discussion on dev, add simple AI policy and link it from CONTRIBUTING.md.
Policy is sourced from astral's policy

PR template today already links to CONTRIBUTING.md:

<!--
If this is your first contribution to Lucene, please make sure you have reviewed the contribution guide.
https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
-->

Issue templates already link to CONTRIBUTING.md (via github's default widgets):

Screen_Shot_2026-08-29_at_08 19 04

So the content is reachable from the key places where it counts. If there is trouble, we could always do more aggressive stuff as a followup (e.g. direct links to AI policy from these templates, required checkboxes on those templates that you've read it, etc etc). But it seems best to avoid that kind of thing unless it becomes strictly necessary.

@rmuir rmuir added the skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. label Aug 29, 2026

@dweiss dweiss 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.

LGTM.

Comment thread AI_POLICY.md

**AI should not be used to generate comments when communicating with
maintainers**. We expect comments on our projects to be written by humans. We
may hide any comments that we believe are AI generated.

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.

can we add a note like "It is OK to use AI to translate text authored by a human writing in a differnt language." Or maybe just move the last paragraph immediately after this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know what you are asking. can you re-read it again? The current document is very specific about exactly how to do this.

I don't want to read slop.

@uschindler uschindler Aug 30, 2026

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.

I am fine with the last paragraph about machine translations. Adding the original language in the text and only add translation as blockquote, clearly marked, is fine. People may translate with AI, but they should instruct their AI agent to not also add slop. "Keep sentence structure and stay away from addingtext or extra formatting" is a good AI prompt.

in general, Google Translate is much better as it keeps original sentence structure, so I'd prefer to ask people to use a conventional translator instead of a chatbot.

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.

I was suggesting we could move the last paragraph up so it is the second paragraph. That way it comes right aftrer the part that (in my opinion) it is modifying or clarifying, so the reader isn't held in a suspended state until the end, but you know it's fine as it is,, just trying to make it a little clearer

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@msokolov If you want to wordsmith it, do you mind making a followup PR?

I was just imagining such a policy could be heavily controversial and was attempting the route of "use an existing one verbatim that appears to already be working".

Does not mean it is perfect for our needs, just a way to take a step in the right direction.

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.

yes, please go ahead. We can fight the grammar battles and such in another thread, LOL

@uschindler uschindler 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.

Looks good!

Maybe some additional comments as it fits the same thing: Please also add a text somewhere to forbid intensive use of Emojis in PR descriptions. I know those are mostly AI generated, but we should maybe still add this to the pull request template, too. I have seen PRs where every second line contains an emoji or colored bullet points, or checkmarks in wild colors everywhere. Not all of them are AI generated (I am still unsure), but people should also not create those colorful descriptions! This has to end....

An emoji in the normal discussion of the PR is fine, but not a colorful issue/PR descriptions (and pages of AI slop - of course).

@uschindler

Copy link
Copy Markdown
Contributor

I also added a PR with a SECURITY.md file for our repo: #16585

Feel free to review it, too. The mass of rejected security issues which could have also done as a normal PR were too immense, so I'd like to clarify that tampered index files are no security issue .... and so on.

@sgup432

sgup432 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Please also add a text somewhere to forbid intensive use of Emojis in PR descriptions

+1 on this!

I have also seen AI generating overly verbose code comments, unnecessary test cases and benchmarks, maybe we can add a note around that as well later.

@javanna

javanna commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

+1

I really like this proposal, thanks for taking the time to write it!

@rmuir

rmuir commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

For things like "don't make unnecessary emoji, tests, comments", all that kinda stuff probably belongs in AGENTS.md IMO, not here.

This file is for human contributor. I'm already concerned it has a near-zero chance of actually ever getting merged, so we should try to keep the concerns separate to simplify the situation. Just my opinion

@uschindler

Copy link
Copy Markdown
Contributor

For things like "don't make unnecessary emoji, tests, comments", all that kinda stuff probably belongs in AGENTS.md IMO, not here.

This file is for human contributor. I'm already concerned it has a near-zero chance of actually ever getting merged, so we should try to keep the concerns separate to simplify the situation. Just my opinion

That's all fine. I just wanted to add my findings when reviewing PRs. Actually some emojis are also coming from persons (not sure which culture encourages that, maybe also because of AI suggest and they copy AI's behaviour). As said, some Emojis were in PR descriptions which were heavily human written (because of typos), but still had those empojis. Therefor I suggested to add this somewhere.

But yes, an AGENTS.md would be fine, too. Best would be an AGENTS.md saying "stay away and f*ck yourself".

I think nobody has something against this PR, lets get in in after maybe 72 hours of waiting time. I will do the same for my SECURITY.md file (see other PR you already reviewed).

Uwe

@rmuir

rmuir commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

@uschindler Yeah I use them sometimes. But I try to not do it excessively. Sometimes you need a 💩 or a 🤯. Sorry, could not resist. 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. type:documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants