Repository navigation
Add instructions for the use of AI coding tools #4286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: b4b-dev
Are you sure you want to change the base?
Changes from 14 commits
25118f5
b943765
d822d27
edb2bc5
f962503
a21691f
45d4fe5
4dfbe59
3fa8461
63a3f87
803ab61
7b6708c
1b47c4a
e22579d
41ddc3d
27f5a89
4de9ce9
e8f23bf
d8a8551
91bba3b
5a6d5a3
dd3c065
d9a138e
2c417c8
e8e0bfa
4d69270
3708e93
302b329
0708800
17a9905
9ab2ab3
acb2d3f
9dba65a
096ed27
3826095
81c2a82
8e39b2c
38b258a
7e367d4
060b3dd
b7393e4
37cafd8
60c883c
6b6611b
3a91aa4
951c086
0b07c9d
60ece91
302dd9a
fedddf2
4469ada
7e24ef5
354a765
80a77dc
2b0bce7
f74c5c9
7395179
4c43299
abe8f45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
samsrabin marked this conversation as resolved.
Resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # AGENTS.md | ||
|
|
||
| **Read and obey all standards described in `CONTRIBUTING.md`, including the webpage linked under "Coding Practices and Style."** | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
|
|
||
| ## General rules | ||
| - You must assume that any development design or implementation plan documents will not be brought into the repository upon merge. It's fine to commit them, but the maintainers will remove them before merge. Therefore, all work you do -- code comments, persistent documentation, commit messages -- must stand on their own without reference to those documents. | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
|
|
||
| ## Commits | ||
| - Commits must, as much as possible, do one "thing" and do it completely. It's fine for commits to work in multiple places across the codebase, if this is necessary to perform one coherent step of development. | ||
| - The "headline" of commit messages must, as much as possible, be written in plain language that can be understood by someone familiar with CTSM but not necessarily with the issue being addressed. | ||
| - No part of any commit message may reference development plan documents without at least explaining the referent. E.g., "Task 2 Step 4" is not acceptable without saying what that *is* (e.g., "Separate xyz functionality into a separate subroutine). Ideally, though, such references would be stripped by rebasing before requesting review on a PR. | ||
| - Commit messages that you as an LLM write must include a "Co-Authored-By" credit at the end naming your model and version. This also applies to messages a human writes for commits containing *material* that you wrote -- make sure the human complies, or ask to amend commits to add it as necessary. For example: | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
| ``` | ||
| Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> | ||
| ``` | ||
|
|
||
| ## GitHub issues and pull requests | ||
| "The CTSM repo" in this section specifically refers to the GitHub repo ESCOMP/CTSM, not forks. | ||
|
|
||
| - **You may never submit, edit, or comment on an issue or PR in the CTSM repo, with one exception.** The maintainers are humans who will take the time and care to use their human brains to work with the contributing human. The only exception is that you may edit the "AI disclosure" section to keep it accurate as the issue or PR evolves. | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
| - You *are* allowed to help draft issues and PRs. If doing so, first read the standards described under the AI section in `CONTRIBUTING.md`. Make sure the human user understands and follows these rules during the contribution process. Then follow the repository templates: `.github/PULL_REQUEST_TEMPLATE.md` for PRs and the relevant template under `.github/ISSUE_TEMPLATE/` for issues. Preserve the template's sections and checklist, filling in or adapting placeholders as needed. | ||
| - You are also allowed to read issues and PRs in the CTSM repo, including ones your human submits. Prompt your human to keep the entire description up to date as the issue or PR evolves. Remember, you are not allowed to edit an issue or PR description except for the "AI disclosure" section. | ||
| - Unless your user tells you otherwise, you are also allowed to push to branches in forks, including branches that have associated PRs in ESCOMP/CTSM. | ||
| - Contributions (both issues and pull requests) often have implications for our documentation. You must ensure that our documentation has been reviewed for such implications and that these are accounted for in the contribution. Our documentation is mostly at `doc/source/`; make sure to look at the "documentation documentation" at `doc/source/users_guide/working-with-documentation/`. Also consider in-code documentation (docstrings, type annotations, and comments) as well as READMEs. | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,10 +27,39 @@ This also allows your changes to be planned for and slated for a time to come in | |
| cases you won't merge the Pull Request yourself, but a software engineer responsible for CTSM will do | ||
| additional testing and bring the changes to CTSM master. | ||
|
|
||
| Please keep pull requests focused and small enough for the very busy maintainers to understand and review. | ||
|
|
||
| ### CTSM Developers Guide: | ||
|
|
||
| https://wiki.ucar.edu/display/ccsm/Community+Land+Model+Developers+Guide | ||
|
|
||
| ## AI Usage Policies | ||
|
|
||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
| AI tools make it very easy to find apparent issues and submit suggested changes. If what you have found is not already an issue in this repo, we **strongly recommend** opening an issue or discussion here, as described at the top of this document. | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
|
|
||
| We permit generative AI assistance, but responsibility remains with people. AI assistance must not shift the work of understanding, debugging, or validating a contribution onto maintainers. The same quality, licensing, and reproducibility standards apply whether or not AI is used. | ||
|
|
||
| In this policy, "you" refers to the human contributor. AI tools drafting an issue or PR (or whose humans say they will be opening one) should direct their human operator to this policy and remind them to personally review and understand an issue before submission, or the complete set of changes in a PR before requesting review. An AI tool must not claim that the operator has done so unless the operator confirms it. | ||
|
samsrabin marked this conversation as resolved.
Resolved
|
||
|
|
||
| Before requesting review on a PR, personally review and understand the complete set of changes in the PR, whether or not AI was used. This includes code, tests, configuration, documentation, and generated files. If your PR does not yet satisfy this requirement, leave it as a draft. | ||
|
|
||
| You must be able to explain why the changes are correct, how they fit CTSM, and how they were validated. AI review and passing automated checks do not replace human understanding or project review. You remain responsible for your contribution and for personally addressing review feedback. | ||
|
|
||
| **Do not submit unreviewed AI output to this repository.** Issue and PR descriptions, comments, and review responses must reflect your own reasoning and understanding. Translation, grammar, and phrasing assistance are welcome, provided you verify the meaning. | ||
|
|
||
| **Do not delegate conversations with maintainers to an agent.** The maintainers of this repo are human beings who will use their human brains to review every single line of your contribution. Please show them the same courtesy when discussing an issue or PR. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do want to aspire to reviewing every line of code carefully. But, realistically as humans we won't be able to do that for large changes, or lines we can't advise on. So I think maybe we soften the wording a bit? But, also giving the expectation that every line is reviewed by a human might also help people to NOT submit huge changes. So maybe we leave it in.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also wonder about giving a ballpark limitation on the size of a PR. For example, saying something like
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would say that, if people aren't sure about the acceptable size of a PR, they should discuss that with us on the issue page they're supposed to have opened. We could also add something here like, "We may ask you to break up large PRs into smaller pieces," without giving any sort of number. ("Many tens of thousands of lines of changes" is way, way too high of a number anyway in my opinion.)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also:
That's an argument for (1) not letting people bring in large changes and (2) bringing in subject-matter experts to review the things that we as SEs can't—not for letting people bring in code we don't understand. |
||
|
|
||
| Every issue and PR must state whether generative AI was used in preparing the contribution, including research, code, tests, documentation, or language assistance. If AI was used, briefly describe how it was used; this description is required. Provider and model are optional. Keep the disclosure current as the PR changes, even if generated material was subsequently rewritten. Ordinary formatters, compilers, and test runners do not require AI disclosure. For example: | ||
|
|
||
| > - [x] Was AI used in this contribution? **Yes**: | ||
| > If yes: | ||
| > - [x] Types of work: Designing changes, writing tests. | ||
| > - Provider (optional): Anthropic | ||
| > - Model (optional): Claude Opus 5.5 (extra-high effort) | ||
|
|
||
| Further instructions can be found in `AGENTS.md`. | ||
|
|
||
|
|
||
| ## Getting Started: | ||
|
|
||
| The following resources give you information on the project and how to get started. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.