Repository navigation
Add ReEDS AI Policy - #237
kennedy-mindermann wants to merge 9 commits into
Conversation
|
@kennedy-mindermann , I like were this is going. Do you think it would be worth it to add to the AGENTS.md that it needs to match the code style of the repo? I have found that if you do not specify it, it will mix and match any style that it finds convenient at a time. |
| @@ -0,0 +1,467 @@ | |||
| # AGENTS.md — Guidance for AI Coding Assistants | |||
|
|
|||
| This file gives AI coding tools (Claude, ChatGPT, GitHub Copilot, Cursor, Codex, | |||
There was a problem hiding this comment.
(nitpick) I think we can avoid length-based line breaks in markdown files; since single breaks don't have semantic value, you can view these files with wrapping, and length-based breaks make later edits annoying (if you change the first line of a paragraph, you don't want to redo the spacing for every line that follows). In the docs we break on sentence-ending periods (and other punctuation for long sentences), so I'd do the same here.
| @@ -0,0 +1,467 @@ | |||
| # AGENTS.md — Guidance for AI Coding Assistants | |||
|
|
|||
| This file gives AI coding tools (Claude, ChatGPT, GitHub Copilot, Cursor, Codex, | |||
There was a problem hiding this comment.
Do we need to list commercial products by name? If not, I'd avoid it to avoid an appearance of endorsement.
| # AGENTS.md — Guidance for AI Coding Assistants | ||
|
|
||
| This file gives AI coding tools (Claude, ChatGPT, GitHub Copilot, Cursor, Codex, | ||
| etc.) the context and operating rules they need to make safe, high-quality |
There was a problem hiding this comment.
I don't think this file ensures the contributions are safe or high-quality. Could probably just cut this sentence.
| requires a commercial license (CPLEX or compatible); Python 3.11 drives | ||
| preprocessing, orchestration, and postprocessing; Julia 1.12.1 |
There was a problem hiding this comment.
We use python 3.14 now (see environment.yaml). Do we have to specify the version here?
There was a problem hiding this comment.
Nop. Actually, we should point it to the environment as you mentioned. Cheaper models will not pick-it up right away.
There was a problem hiding this comment.
@Max-Vanatta you also had a version of this file, right?
There was a problem hiding this comment.
Yep, I have one that does much of the same but for general coding rather than ReEDS specific. Happy to draft a version of this file with any of those additions are valuable to the team.
| the report, etc. You can re-run any individual step in isolation against the | ||
| inputs/outputs the prior steps already wrote into the run folder. This is | ||
| much faster than a full rerun and is often the right first check while | ||
| iterating on a single file. |
There was a problem hiding this comment.
It depends, there are still a few cases where files are overwritten in place (e.g. in forecast.py)
| [`reeds/input_processing/runfiles.csv`](reeds/input_processing/runfiles.csv) | ||
| to identify which files a given script writes. |
There was a problem hiding this comment.
runfiles.csv mostly only has the directly copied files; it doesn't include most files written by input_processing scripts
| * **DON'T** use AI to write PR descriptions. | ||
| * **DON'T** use AI-generated text in `model_documentation.md`. All text there must be original. *See below for permitted AI uses in this file*. | ||
| * **DO** disclose AI use in the PR template's LLM section, including *how* you verified any LLM-generated content. | ||
| * **DO** include verification for PRs with meaningful AI contributions so the reviewer can confirm correctness without rederiving the change themselves. |
There was a problem hiding this comment.
Could we be more specific on what "verification" means here?
For example, I'd support always running USA_defaults for LLM-heavy PRs.
| ### Recommended Practices | ||
| **Planning and scope** | ||
| * Start in plan mode, and include a verification step in the plan. | ||
| * Break larger efforts into multiple PRs. |
There was a problem hiding this comment.
PR should still stand alone though; it'd be good to avoid churn and temporary code on the main branch.
Consider using the approach for #185, where the subsidiary PRs are being merged into wjc/dev/separate_class instead of main, and that branch will then be compared and reviewed again before merging.
| * Have the AI tool pause at checkpoints for human review before proceeding. | ||
|
|
||
| **While developing** | ||
| * If you don't understand why a change was made, dig into it before moving on. |
There was a problem hiding this comment.
It says above that "Contributors are responsible for understanding and verifying every change"; I'd use similar language here
Summary
This PR adds an AI policy for ReEDS to the contributing guide. It also adds an
AGENTS.mdfile into the repo.Technical details
Implementation notes
The
AGENTS.mdfile is from Wesley.Additional changes
Switches added/removed/changed
Issues resolved
Known incompatibilities
Relevant sources or documentation
Validation, testing, and comparison report(s)
Checklist for author
Details to double-check
d_objective.gms, they are included inobjective_function_params.yamlfor completeness checkinghourlize/resource.pywas rerun to regenerate the existing/prescribed VRE capacity dataGeneral information to guide review
Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how
No, I didn't use AI when writing the AI policy.
Tag points of contact here if you would like additional review of the relevant parts of the model