-
Notifications
You must be signed in to change notification settings - Fork 18
Add AGENTS.md for AI agent guidance #455
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
Merged
harrism
merged 2 commits into
openvdb:main
from
harrism:issue-453-add-agents-md-for-ai-agent-guidance
Feb 11, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # AGENTS.md — AI Agent Guidelines for fVDB | ||
|
|
||
| This file provides persistent instructions for AI coding agents (Cursor, Copilot, | ||
| Codex, etc.) working on this codebase. Human contributors should also refer to | ||
| [CONTRIBUTING.md](CONTRIBUTING.md). | ||
|
|
||
| ## Git Commits | ||
|
|
||
| - All commits **must** include a DCO sign-off (`git commit --signoff` / `-s`). | ||
| - All commits **must** be SSH-signed (`git commit --gpg-sign` / `-S`). | ||
| - **Never** skip hooks or signing: do not use `--no-verify` or `--no-gpg-sign`. | ||
|
|
||
| ## General Style | ||
|
|
||
| - Avoid excessive use of emoji and non-ascii characters in code and documentation except | ||
| where it is helpful to user experience or user interfaces. | ||
|
|
||
| ## Python Code Style | ||
|
|
||
| - Format Python code with **black** using the exact flags from CI: | ||
|
|
||
| ``` | ||
| black --target-version=py311 --line-length=120 --extend-exclude='wip/' . | ||
| ``` | ||
|
|
||
| - **Do not** run `black` with default settings — the default line-length (88) does | ||
| not match this project's setting (120). | ||
| - There is currently no `[tool.black]` section in `pyproject.toml`; a future PR may | ||
| add one so that plain `black .` picks up the correct settings automatically. | ||
|
|
||
| ## C++ Code Style | ||
|
|
||
| - Format C++ source files under `src/` with **clang-format 18** using the | ||
| repository's `.clang-format` style file: | ||
|
|
||
| ``` | ||
| clang-format -i --style=file src/**/*.{h,cpp,cc,cu,cuh} | ||
| ``` | ||
|
|
||
| - Applicable extensions: `.h`, `.cpp`, `.cc`, `.cu`, `.cuh`. | ||
|
|
||
| ## License Headers | ||
|
|
||
| Every source file **must** include the Apache-2.0 SPDX identifier. | ||
|
|
||
| Python files: | ||
|
|
||
| ```python | ||
harrism marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Copyright Contributors to the OpenVDB Project | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| ``` | ||
|
|
||
| C++ files: | ||
|
|
||
| ```cpp | ||
| // Copyright Contributors to the OpenVDB Project | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| ``` | ||
|
|
||
| ## Whitespace | ||
|
|
||
| - No trailing whitespace (CI enforces this; `.wlt` files and `wip/` are excluded). | ||
| - Use spaces, not tabs (binary and a few config files are excluded from this check). | ||
|
|
||
| ## Testing | ||
|
|
||
| - Run relevant tests before pushing: | ||
|
|
||
| ``` | ||
| python -m pytest tests/ -v | ||
| ``` | ||
|
|
||
| - The `wip/` directory is excluded from test collection (see `norecursedirs` in | ||
| `pyproject.toml`). | ||
|
|
||
| ## Opening Issues | ||
|
|
||
| - Set appropriate labels (e.g. `bug`, `enhancement`, `documentation`). | ||
| - Reference any related issues or PRs. | ||
| - For bugs: provide clear reproduction steps, expected vs actual behavior, and | ||
| environment details. | ||
|
|
||
|
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. Anywhere in this file, we should request that the agents restrict generated code and documentation to ascii characters only - no emojis.
Contributor
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. Done. |
||
| ## Opening Pull Requests | ||
|
|
||
| - Reference the issue being fixed (e.g. "Fixes #NNN"). | ||
| - Include a test plan with specific commands to verify the change. | ||
| - Ensure all CI checks pass before requesting review (DCO, codestyle, tests). | ||
| - Keep PRs focused on a single concern. | ||
|
|
||
| **Do not commit unless directed:** | ||
| - `.vscode/settings.json` - local IDE settings | ||
| - `.cursor/` - local Cursor config | ||
| - Test-specific matrices or configs with hardcoded paths | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an open PR (#449 which adds black and clang format to build.sh). We might want to dry this up so build.sh is the source of truth for commands like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just literally in the process of writing our slack channel to ask if we can add this to a "format" script that subsumes src/scripts/run_clang_format.sh.
Please let's just have one and only one way this gets done, across all our file types, that's used in the same way by both CI and locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pre-commit would be the best way to consolidate all this. But it's devops work, we don't get paid for that. :)
An easier fix, at least for black, is to put the black command line arguments into pyproject.toml as mentioned in this file. I was planning to do that in a follow up.