Skip to content

Add ReEDS AI Policy - #237

Open
kennedy-mindermann wants to merge 9 commits into
mainfrom
km/ai-policy
Open

kennedy-mindermann wants to merge 9 commits into
mainfrom
km/ai-policy

Conversation

@kennedy-mindermann

@kennedy-mindermann kennedy-mindermann commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds an AI policy for ReEDS to the contributing guide. It also adds an AGENTS.md file into the repo.

Technical details

Implementation notes

The AGENTS.md file 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

  • Charge code provided to reviewers
  • Included comparison reports for appropriate test cases
  • Documentation updated if necessary
  • If input data added/modified:
    • Dollar year recorded and converted to 2004$ for GAMS
    • Timeseries are in Central Time
    • Units are specified
    • Preprocessing steps have been documented and committed to ReEDS_Input_Processing
    • New large data files handled with .h5 instead of .csv
    • If new parameters are added to d_objective.gms, they are included in objective_function_params.yaml for completeness checking
    • If spatially resolved inputs are modified, the following visualizations for each file are included in the PR description (time-averaged if the inputs are time-resolved):
      • Map of absolute values before
      • Map of absolute values after
      • Map of differences: (after - before) or (after / before)
    • If entries are added/removed/changed in the EIA-NEMS unit database:
      • Changes have been committed to ReEDS_Input_Processing
      • hourlize/resource.py was rerun to regenerate the existing/prescribed VRE capacity data
  • Code formatting standardized
  • Reusable functions used where possible instead of copy/pasted code

General information to guide review

  • Zero impact on results of default case
  • No large data file(s) added/modified
  • No substantive impact on runtime for full-US reference case
  • No substantive impact on folder size for full-US reference case
  • No change to process flow (runreeds.py, reeds/core/solve/solve.py)
  • No change to code organization
  • No change to package requirements (environment.yml or Project.toml)

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

@github-actions github-actions Bot added the docs label Oct 1, 2026
@pesap

pesap commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

@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.

@patrickbrown4
patrickbrown4 self-requested a review October 7, 2026 19:10
Comment thread AGENTS.md Outdated
@@ -0,0 +1,467 @@
# AGENTS.md — Guidance for AI Coding Assistants

This file gives AI coding tools (Claude, ChatGPT, GitHub Copilot, Cursor, Codex,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(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.

Comment thread AGENTS.md Outdated
@@ -0,0 +1,467 @@
# AGENTS.md — Guidance for AI Coding Assistants

This file gives AI coding tools (Claude, ChatGPT, GitHub Copilot, Cursor, Codex,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to list commercial products by name? If not, I'd avoid it to avoid an appearance of endorsement.

Comment thread AGENTS.md Outdated
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this file ensures the contributions are safe or high-quality. Could probably just cut this sentence.

Comment thread AGENTS.md Outdated
Comment on lines +32 to +33
requires a commercial license (CPLEX or compatible); Python 3.11 drives
preprocessing, orchestration, and postprocessing; Julia 1.12.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We use python 3.14 now (see environment.yaml). Do we have to specify the version here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nop. Actually, we should point it to the environment as you mentioned. Cheaper models will not pick-it up right away.

Comment thread AGENTS.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Max-Vanatta you also had a version of this file, right?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread AGENTS.md Outdated
Comment on lines +355 to +358
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It depends, there are still a few cases where files are overwritten in place (e.g. in forecast.py)

Comment thread AGENTS.md Outdated
Comment on lines +405 to +406
[`reeds/input_processing/runfiles.csv`](reeds/input_processing/runfiles.csv)
to identify which files a given script writes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

runfiles.csv mostly only has the directly copied files; it doesn't include most files written by input_processing scripts

Comment thread CONTRIBUTING.md Outdated
* **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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we be more specific on what "verification" means here?
For example, I'd support always running USA_defaults for LLM-heavy PRs.

Comment thread CONTRIBUTING.md
### Recommended Practices
**Planning and scope**
* Start in plan mode, and include a verification step in the plan.
* Break larger efforts into multiple PRs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread CONTRIBUTING.md
* 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It says above that "Contributors are responsible for understanding and verifying every change"; I'd use similar language here

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants