Skip to content

Add basic assumptions to AGENTS.md#3552

Open
rambleraptor wants to merge 1 commit into
apache:mainfrom
rambleraptor:agents-md
Open

Add basic assumptions to AGENTS.md#3552
rambleraptor wants to merge 1 commit into
apache:mainfrom
rambleraptor:agents-md

Conversation

@rambleraptor

Copy link
Copy Markdown
Collaborator

Rationale for this change

Our AGENTS.md just talks about the security model. We get a non-trivial amount of AI activity on this repo and our AGENTS.md should reflect some basic assumptions we want for those PRs.

A lot of this was inspired by Iceberg AGENTS.md.

This is just meant to be an initial version with some thoughts that I've seen and some of the basic architecture (as seen in the Iceberg AGENTS.md)

Are these changes tested?

Just Markdown.

Are there any user-facing changes?

No.

Comment thread AGENTS.md
- One concern per PR. Keep unrelated formatting/import churn out of feature PRs.
- Keep the first version of a PR minimal; defer optimizations and edge cases to follow-ups.
- Commit messages explain the *what* and *why*, not line-by-line implementation. Be as succinct as possible.
- The Apache License header is required on every new source file (enforced by `./dev/check-license` and pre-commit).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The license header isn't enforced by pre-commit as far as I confirmed.

Comment thread AGENTS.md
- Formatting and linting are enforced by `ruff` via `prek` (pre-commit): line length **130**, double-quoted strings, isort with `pyiceberg`/`tests` as first-party. Run `make lint` — ruff autofixes most issues.
- Full type annotations are required (`mypy` runs in strict mode: `disallow_untyped_defs`, `no_implicit_optional`, `warn_unused_ignores`). Avoid Any types.
- Docstrings follow the project's pydocstyle config; one-line summaries on public functions. No personal pronouns in comments.
- Define typed exceptions in `pyiceberg/exceptions.py` and raise the most specific one; don't raise bare `Exception`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: ValueError is widely used in this project. We could rephrase it like this:

 Use domain-specific exceptions from pyiceberg/exceptions.py for Iceberg-specific error conditions. For invalid arguments/values, ValueError is acceptable. Don't raise bare Exception.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants