anshumg commented on code in PR #5409: URL: https://github.com/apache/solr/pull/5409#discussion_r4751250872
########## dev-docs/how-to-contribute.adoc: ########## @@ -60,16 +60,28 @@ In order to make a new contribution to Solr you will use the fork you have creat * update documentation (e.g., package.html files, this wiki, etc.) * try to provide a unit test that shows a bug was indeed fixed or the new functionality truly works * use the "draft state" for PRs which are work in progress -* carefully review and take responsibility for any AI-assisted code or documentation (see below) - -## Use of AI Coding Assistants - -AI-powered tools or agents (like GitHub Copilot, ChatGPT, etc.) can assist with contributions, but human contributors remain fully responsible for all submitted code and documentation. See the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for the foundation's policy. If you use AI tools: - -- Do include our `AGENTS.md` file in the LLM's context for best result. -- Carefully review all generated content for correctness, security, and alignment with Solr's architecture -- For major AI-assisted contributions, disclose the use of AI tools in your PR description -- For documentation contributions, prefer concise, human-readable content over verbose AI-generated text +* review and take responsibility for AI-assisted work, and disclose AI-written text (see below) + +## Use of AI / Generative Tooling + +Using AI tools (Copilot, ChatGPT, Claude, coding agents, etc.) to work on Solr is welcome -- for code, tests, docs, research, reviews, and more. +We have one firm expectation: **don't pass off AI-written text as your own words.** + +* **Mark AI-written prose.** + When people read a PR description, JIRA issue, comment, review, or mailing list post, they assume a human wrote it unless told otherwise. + If AI wrote it, or a substantial part of it, mark it -- a 🤖 is enough; naming the tool is a nice touch. + Text you wrote yourself and only had AI polish (grammar, wording) doesn't need marking. +* **Code and docs needn't be marked line by line.** + But if AI substantially generated a PR's contents, say so in the commit message(s) with a trailer naming the tool, e.g. `Generated-by: <tool>` (or similar -- there's no standard yet; `Assisted-by:` or `Co-authored-by:` are fine). + Committers squash-merging such a PR should keep the trailer. +* **You own what you submit.** + Review and understand it, and be ready to explain it. + If you didn't review it or don't understand it then admit this in a comment up front. Review Comment: I wouldn't want contributors to merely admit not having reviewed the changes they are submitting. The manual/human review is a mandatory step that we shouldn't allow folks to bypass. ########## .github/PULL_REQUEST_TEMPLATE.md: ########## @@ -26,14 +23,10 @@ Please provide a short description of the changes you're making with this pull r # Solution Please provide a short description of the approach taken to implement your solution. -We appreciate transparent disclosure of significant [AI Coding assistants](https://github.com/apache/solr/blob/main/dev-docs/how-to-contribute.adoc#setup-for-contributing) usage. # Tests Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem. -# Checklist - -Please review the following and check all that apply: - -- [ ] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability. +- [ ] I have reviewed and understand all changes in this PR. Review Comment: Let's be explicit about that this box **must always** be checked by a human. It's easy for an agent to check this otherwise. ########## AGENTS.md: ########## @@ -10,6 +10,11 @@ While README.md and CONTRIBUTING.md are mainly written for humans, this file is - Try first declaring a dependency without a version (the version might already be in a BOM); and if fails to resolve _then_ specify a version - Always run `gradlew updateLicenses resolveAndLockAll --write-locks` after adding or changing a dependency. See `dev-docs/gradle-help/dependencies.txt` for more info +## AI Disclosure + +- Prose you write for humans to read (PR descriptions, JIRA issues, PR/JIRA comments, mailing list posts) must be marked as AI-written, e.g. with 🤖 +- When you substantially generated a commit's contents, include a trailer naming the tool in the commit message, e.g. `Generated-by: <tool>` (or similar, like `Co-authored-by:`) Review Comment: While I was merging something recently, I realised how if one or few of the commits were generated by an agent but the first (or last?) one wasn't - the squashed merge has a tendency to lose that information by dropping that line. Let's put in something that ensures that information isn't lost. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
