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
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,31 @@ Closes #

<!-- A minimal, complete, and reproducible example demonstrating features introduced by this pull request. See https://stackoverflow.com/help/minimal-reproducible-example for additional suggestions on how to create such an example. -->


**AI Statement (required)**

<!-- Please include one of the following options in your PR description:

- **No generative AI was used.** This contribution was written entirely without AI
assistance.
- **Limited use of generative AI.**
Standard or boilerplate code snippets were generated with AI and manually reviewed;
all design, logic, and implementation decisions were made by the contributor.
Examples: IDE code-completions or brief LLM queries for common patterns.
- **Extensive use of generative AI.**
Significant portions of code or documentation were generated with AI, including
logic and implementation decisions. All generated code and documentation were
reviewed and understood by the contributor. Examples: Output from agentic coding
tools and/or substantial refactoring by LLMs (web-based or local).

For additional information on Cantera's AI policy, see https://github.com/Cantera/cantera/blob/main/CONTRIBUTING.md -->
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you add the section to the link?



**Checklist**

- [ ] The pull request includes a clear description of this code change
- [ ] Commit messages have short titles and reference relevant issues
- [ ] Build passes (`scons build` & `scons test`) and unit tests address code coverage
- [ ] Style & formatting of contributed code follows [contributing guidelines](https://github.com/Cantera/cantera/blob/main/CONTRIBUTING.md)
- [ ] AI Statement is included
- [ ] The pull request is ready for review
81 changes: 81 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ provide a starting point for contributing code to Cantera.
prepare your contribution in a way that makes it efficient to review.

## Getting Credit for your Contributions

* Configure Git with your name and e-mail address before making any commits
* From a terminal, run:
```shell
Expand Down Expand Up @@ -92,3 +93,83 @@ The following pages describe the Git development workflows for some other projec
may also find some helpful advice from these projects:
* [Matplotlib](https://matplotlib.org/devdocs/devel/development_workflow.html)
* [SciPy](https://docs.scipy.org/doc/scipy/dev/contributor/development_workflow.html)

## Restrictions on Generative AI Usage

We expect authentic engagement in our community.

- Do not post output from Large Language Models or similar generative AI as comments on
GitHub or our User Group, as such comments tend to be formulaic and low content.
Comment on lines +101 to +102
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to make a statement about LLM content. Also, many people use LLMs to help translate to English from their native tongue, and I'm loath to discourage that use if it enables more contributions. I'd prefer to soften this and leave more discretion to individuals (us and contributors).

Suggested change
- Do not post output from Large Language Models or similar generative AI as comments on
GitHub or our User Group, as such comments tend to be formulaic and low content.
- Please be considerate posting content generated by AI models. Make sure that the content is valuable, concise, and expresses the message you want to share.

Or something similar

- If you use generative AI tools as an aid in developing code or documentation changes,
you are required to disclose the use of AI and ensure that you fully understand the
proposed changes and can explain why they are the correct approach.

Make sure you have added value based on your personal competency to your contributions.
Just taking some input, feeding it to an AI and posting the result is not of value to
the project. To preserve precious core developer capacity, we reserve the right to
rigorously reject seemingly AI generated low-value contributions.
Comment on lines +109 to +110
Copy link
Member

Choose a reason for hiding this comment

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

I'd simplify this a bit. Low value is low value regardless of source.

Suggested change
the project. To preserve precious core developer capacity, we reserve the right to
rigorously reject seemingly AI generated low-value contributions.
the project. To preserve core developer capacity, we reserve the right to
reject low-value contributions.

(_adopted from
Copy link
Member

Choose a reason for hiding this comment

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

Looks like there's some misplaced _ here.

[Matplotlib's AI Usage](https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage)
guidelines_)

## AI Disclosures and Authorship

Cantera is distributed under a BSD-3-Clause license with contributions from
California Institute of Technology, Sandia Corporation (with U.S. Government rights),
and the Cantera Developers. Because this license requires clear attribution and
provenance, contributors must follow the rules below when using generative AI tools.

### **1. AI Use Disclosure**

All pull requests must include a brief **AI Use Statement** in the PR description:

- **No generative AI was used.** This contribution was written entirely without AI
assistance.
Comment on lines +124 to +127
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest the following to make this a little more flexible and encourage authors to provide more details rather than just copy-pasting one of these verbatim:

Suggested change
All pull requests must include a brief **AI Use Statement** in the PR description:
- **No generative AI was used.** This contribution was written entirely without AI
assistance.
All pull requests must include a brief **AI Use Statement** in the PR description.
Please start with the appropriate category below, and in the latter cases, adjust
the description to describe how generative AI was used in this specific PR.
- **No generative AI was used.** This contribution was written entirely without AI
assistance.

(and I guess the same applies for the additions to the PR template)

- **Limited use of generative AI.**
Standard or boilerplate code snippets were generated with AI and manually reviewed;
all design, logic, and implementation decisions were made by the contributor.
Examples: IDE code-completions or brief LLM queries for common patterns.
- **Extensive use of generative AI.**
Significant portions of code or documentation were generated with AI, including
logic and implementation decisions. All generated code and documentation were
reviewed and understood by the contributor. Examples: Output from agentic coding
tools and/or substantial refactoring by LLMs (web-based or local).

**How to choose:**
- **Limited:** AI helped with syntax, boilerplate, or standard patterns; you designed
the solution.
- **Extensive:** AI suggested the approach, algorithm, or structure; you validated it
works.
Comment on lines +141 to +142
Copy link
Member

Choose a reason for hiding this comment

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

This feels a little too broad to me. I like to have LLMs suggest approaches and algorithms, especially if I can have a conversation about trade-offs, but I generally do the entire implementation myself. That feels closer to the first option to me than the second. I don't feel very strongly about this though.


### **2. Authorship and Licensing Requirements**

Contributors must ensure that:

- They have the rights to license their contribution under the project’s BSD-3-Clause
terms.
- They do **not knowingly** submit AI-generated content derived from copyrighted or
license-incompatible sources (examples: GPL code, proprietary libraries).
- All required attribution and copyright notices for contributed material are preserved
as required under BSD-3-Clause.
Comment on lines +148 to +153
Copy link
Member

Choose a reason for hiding this comment

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

These statements are nominally all required regardless of whether LLM or human generated the code. Technically, the last one depends on the license of the contributed code, which may or may not be BSD-3-Clause, it could be e.g., MIT and be compatible with our license.


### **3. Provenance Awareness**

As generative AI systems may emit material similar to third-party codebases,
contributors must exercise caution. Contributors should exercise reasonable care in:

- verifying that AI suggestions are sufficiently original,
- avoiding verbatim snippets from incompatible licenses, and
- ensuring that any third-party content incorporated intentionally follows proper
attribution and is license-compatible.
Comment on lines +157 to +163
Copy link
Member

Choose a reason for hiding this comment

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

This seems very similar to the last section, is it a duplicate? How are contributors meant to ensure they've satisfied this section, especially "verbatim snippets from incompatible licenses"? Again, this is true regardless of whether the content is AI generated.

Copy link
Member

Choose a reason for hiding this comment

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

I think combining some elements of this section with the previous one would make sense. I don't think contributors have a way of evaluating the "originality" of AI suggestions, and the other two points are much more actionable when the code in question isn't coming through an LLM.

(and as I minor nitpick, I think it should be "snippets with incompatible licenses")


### **4. Maintainer Review and Discretion**

Maintainers may:

- request clarification about the origin of AI-assisted code,
- ask the contributor to manually rewrite suspect portions, or
- reject contributions where provenance is unclear or license compatibility cannot be
reasonably established.
Comment on lines +169 to +172
Copy link
Member

Choose a reason for hiding this comment

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

I think we should be able to request clarification about the origin of any code. Likewise, regardless of AI status, we may reject code where provenance is unclear if we believe it is licensed improperly or incompatible.


These measures protect the integrity of the project’s licensing and long-term
maintainability.