Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ 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

Expand Down
5 changes: 5 additions & 0 deletions dev-docs/FAQ.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ branch to avoid extra mailing list traffic etc.
Periodically review https://github.com/apache/solr/branches/all to see if you have
created a branch that can be deleted.

=== Can I use an AI coding assistant?

Yes, but you are responsible for reviewing all code and documentation, and to transparently
declare the use of AI in your PR. See xref:how-to-contribute.adoc#_use_of_ai_coding_assistants[Use of AI coding Assistants].

=== How do I run Solr in Docker?

You can review instructions for running Solr in Docker in the xref:running-in-docker.adoc[Running in Docker developer doc].
Expand Down
16 changes: 13 additions & 3 deletions dev-docs/how-to-contribute.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,31 @@ In order to make a new contribution to Solr you will use the fork you have creat

## PR Do-s and Don't-s

Please do not:
**Please do not:**

* reformat code unrelated to the bug being fixed: formatting changes should be separate patches/commits.
* comment out code that is now obsolete: just remove it.
* insert comments around each change, marking the change: folks can use git to figure out what's changed and by whom.
* make things public which are not required by end users.
* Combine multiple issues into a single patch, especially if they are unrelated or only loosely related. This is true even if the changes affect the same files. In some rare cases it is warranted, but for the most part it makes it harder for committers to evaluate the patch.
* combine multiple issues into a single patch, especially if they are unrelated or only loosely related. This is true even if the changes affect the same files. In some rare cases it is warranted, but for the most part it makes it harder for committers to evaluate the patch.
* contribute AI generated code without human review and transparent declaration.

Please do:
**Please do:**

* try to adhere to the coding style of files you edit;
* comment code whose function or rationale is not obvious;
* 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 (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:

- 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

## Getting Your Contribution Merged

Expand Down