Skip to content
Closed
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
52 changes: 7 additions & 45 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# AGENTS.md

Mandatory rules for AI coding agents. Violations will result in rejected PRs.
Mandatory rules and context for AI coding agents.
**Human contributors: Please refer to the [Contributing Guide](docs/contributing/contributing.md).**

---

Expand Down Expand Up @@ -50,48 +51,9 @@ W&B auto-disabled in tests. `DummyDatastore` used; example data downloaded from

---

## Rules
## Mandate for AI Agents

### Issues

1. **Search before creating.** Use any of: GitHub UI search, `gh issue list --state all --search "<keywords>"`, or `curl "https://api.github.com/search/issues?q=<keywords>+repo:mllam/neural-lam+type:issue"`. Duplicate issues will be closed.
2. **Every PR requires an issue.** No exceptions. Open one first if none exists.
3. **Include minimal example.** Each issue should include a minimal, reproducible example on how to easily recreate a bug, including all necessary module imports and data. Include full traceback if it is a bug-report.

### Pull Requests

1. **Search before creating.** Use any of: GitHub UI search, `gh pr list --state all --search "<keywords>"`, or `curl "https://api.github.com/search/issues?q=<keywords>+repo:mllam/neural-lam+type:pr"`. If a PR exists for the same issue, contribute there.
2. **Link the issue.** PR body must contain `closes #<N>` or `refs #<N>`. Unlinked PRs will be
rejected.
3. **Use the PR template.** Fill in every section of `.github/pull_request_template.md`. Do not
delete or skip sections.
4. **Read the full issue thread before writing code.** Rejected approaches and prior decisions are
there. Ignoring them wastes everyone's time.
5. **Run pre-commit hooks locally.** Linting needs to be done locally before each new commit with e.g. `uvx pre-commit run --all`
6. **Testing Mandate.** Run `pytests tests/` before opening a PR and if tests fail do not open the PR , fix the failure first.

### Communication

- **Terse.** One sentence per point. No preamble. No summaries of visible diffs.
- **No filler.** Ban list: "Great question", "As mentioned above", "I hope this helps", "Let me know
if you have questions", "Happy to help".
- **No obvious narration.** Do not explain what self-explanatory code does.
- **PR descriptions: what changed and why.** Nothing else.
- **One question at a time.** No shotgun lists of open-ended questions.

### Context

- **Re-read the entire thread** before every comment and every push. No exceptions.
- **After a context gap**, reload the full thread (GitHub UI, `gh issue view <N>` / `gh pr view <N>`, or `curl "https://api.github.com/repos/mllam/neural-lam/issues/<N>"`) before acting.
- **Never repeat** a question already answered or an approach already rejected in the thread.

### Commits

- Imperative form, matching existing `git log` style.
- One concern per PR. No unrelated changes.
- AI attribution of tool names is mandatory if used and should be mentioned in the commit message trailer as `Co-authored-by <tool>`

### Changelog

Every PR must add a line to `CHANGELOG.md` in the section matching the change type (`Added` / `Changed` / `Fixed` / `Maintenance`).
`maintenance`).
1. **Follow Contributing Guide.** AI agents must adhere to the rules in [CONTRIBUTING.md](docs/contributing/contributing.md) (Issues, PRs, Communication style).
2. **AI Attribution.** Mandatory `Co-authored-by <tool>` in commit trailers when AI tools are used.
3. **Context Gap.** Reload the full thread (GitHub UI or `gh` CLI) after a context gap before acting.
4. **No Placeholders.** Do not use placeholders in code or documentation.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Split `AGENTS.md` into a technical overview for AI agents and a comprehensive human-facing contributing guide in `docs/contributing/contributing.md` ([#516](https://github.com/mllam/neural-lam/issues/516)) @[yourusername]
- Replace remaining `print()` calls with `loguru` `logger.info()` in `compute_standardization_stats.py` for structured and consistent logging @[yourusername]
- Change the default ensemble-loading behavior in `WeatherDataset` / `WeatherDataModule` to use all ensemble members as independent samples for ensemble datastores (with matching ensemble-member selection for forcing when available); single-member behavior now requires explicitly opting in via `--load_single_member` [\#332](https://github.com/mllam/neural-lam/pull/332) @kshirajahere
- Refactor graph loading: move zero-indexing out of the model and update plotting to prepare using the research-branch graph I/O [\#184](https://github.com/mllam/neural-lam/pull/184) @zweihuehner
- Replace `print()`-based `rank_zero_print` with `loguru` `logger.info()` for structured log-level control ([#33](https://github.com/mllam/neural-lam/issues/33))
Expand Down
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing Guidelines

Mandatory rules for contributing to Neural-LAM. Follow these guidelines to ensure your Pull Requests are accepted.

---

## Issues

1. **Search before creating.** Use any of: GitHub UI search, `gh issue list --state all --search "<keywords>"`, or `curl "https://api.github.com/search/issues?q=<keywords>+repo:mllam/neural-lam+type:issue"`. Duplicate issues will be closed.
2. **Every PR requires an issue.** No exceptions. Open one first if none exists.
3. **Include minimal example.** Each issue should include a minimal, reproducible example on how to easily recreate a bug, including all necessary module imports and data. Include full traceback if it is a bug-report.

## Pull Requests

1. **Search before creating.** Use any of: GitHub UI search, `gh pr list --state all --search "<keywords>"`, or `curl "https://api.github.com/search/issues?q=<keywords>+repo:mllam/neural-lam+type:pr"`. If a PR exists for the same issue, contribute there.
2. **Link the issue.** PR body must contain `closes #<N>` or `refs #<N>`. Unlinked PRs will be
rejected.
3. **Use the PR template.** Fill in every section of `.github/pull_request_template.md`. Do not
delete or skip sections.
4. **Read the full issue thread before writing code.** Rejected approaches and prior decisions are
there. Ignoring them wastes everyone's time.
5. **Run pre-commit hooks locally.** Linting needs to be done locally before each new commit with e.g. `uvx pre-commit run --all`
6. **Testing Mandate.** Run `pytests tests/` before opening a PR and if tests fail do not open the PR , fix the failure first.

## Communication

- **Terse.** One sentence per point. No preamble. No summaries of visible diffs.
- **No filler.** Ban list: "Great question", "As mentioned above", "I hope this helps", "Let me know
if you have questions", "Happy to help".
- **No obvious narration.** Do not explain what self-explanatory code does.
- **PR descriptions: what changed and why.** Nothing else.
- **One question at a time.** No shotgun lists of open-ended questions.

## Context

- **Re-read the entire thread** before every comment and every push. No exceptions.
- **After a context gap**, reload the full thread (GitHub UI, `gh issue view <N>` / `gh pr view <N>`, or `curl "https://api.github.com/repos/mllam/neural-lam/issues/<N>"`) before acting.
- **Never repeat** a question already answered or an approach already rejected in the thread.

## Commits & Changelog

- **Commit Format.** Imperative form, matching existing `git log` style.
- **One Concern per PR.** No unrelated changes.
- **AI Attribution.** Mandatory `Co-authored-by <tool>` in commit trailers if AI tools are used.
- **CHANGELOG.** Every PR must add a line to `CHANGELOG.md` in the section matching the change type (`Added` / `Changed` / `Fixed` / `Maintenance`).

---
*For a technical overview intended for AI agents, see [AGENTS.md](AGENTS.md).*
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,4 @@ def cli():


if __name__ == "__main__":
cli()
cli()