-
Notifications
You must be signed in to change notification settings - Fork 15
Add agent instructions for repository context #371
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
Add agent instructions for repository context #371
Conversation
Co-authored-by: saulshanabrook <[email protected]>
Co-authored-by: saulshanabrook <[email protected]>
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.
Can you also rename this to AGENTS.md so that it is used for other agents as well?
Can you also go through the docs and make sure you aren't missing anything and also look at the past 20 commits on main to see if you are missing any instructions?
.github/copilot-instructions.md
Outdated
| - **Rust toolchain** - Version 1.79.0 (specified in rust-toolchain.toml) | ||
| - **Python** - 3.10+ (see .python-version) |
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.
Can you not keep the versions in here so I don't have to update this when they change
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.
Removed version numbers. See commit dd6db0e.
.github/copilot-instructions.md
Outdated
|
|
||
| ```bash | ||
| # Install dependencies | ||
| uv sync --extra dev --locked |
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.
Can you change this to uv sync --all-extras
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.
Changed to uv sync --all-extras. See commit dd6db0e.
| - `src/lib.rs` - Main library entry point | ||
| - `src/egraph.rs` - E-graph implementation | ||
| - `src/conversions.rs` - Type conversions between Python and Rust | ||
| - `src/py_object_sort.rs` - Python object handling | ||
| - `src/extract.rs` - Extraction functionality | ||
| - `src/error.rs` - Error handling | ||
| - `src/serialize.rs` - Serialization support | ||
| - `src/termdag.rs` - Term DAG operations | ||
| - `src/utils.rs` - Utility functions |
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.
Can you add overviews of the Python files as well?
And document that the public python interface is all from egglog so anything that is public should be exported at the top level.
There is also the lower level egglog.bindings module which can also be used.
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.
Added Python file overviews and documented that all public APIs should be exported at the top level in __init__.py. Also documented egglog.bindings for lower-level access. See commit dd6db0e.
.github/copilot-instructions.md
Outdated
| ### Python Dependencies | ||
| - **Core**: typing-extensions, black, graphviz, anywidget | ||
| - **Array support**: scikit-learn, array_api_compat, numba, numpy>2 | ||
| - **Dev tools**: ruff, pre-commit, mypy, jupyterlab | ||
| - **Testing**: pytest, pytest-benchmark, syrupy (inline snapshots) | ||
| - **Docs**: sphinx and related packages |
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.
Remove 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.
Removed Pre-commit Hooks section. See commit dd6db0e.
.github/copilot-instructions.md
Outdated
| ### Rust Dependencies | ||
| - **PyO3**: Python bindings framework | ||
| - **egglog**: Core e-graph library | ||
| - **egraph-serialize**: Serialization support | ||
| - **serde_json**: JSON handling |
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.
Remove 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.
Removed Dependencies section. See commit dd6db0e.
| 1. Update or add tests in `python/tests/` for Python changes | ||
| 2. Run the full test suite before committing | ||
| 3. Ensure type checking passes with `make mypy` | ||
| 4. Build documentation if changing public APIs |
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.
Add changelog entry
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.
Added changelog entry requirement to contributing guidelines. See commit dd6db0e.
.github/copilot-instructions.md
Outdated
| ## Common Patterns | ||
|
|
||
| ### Python API Design | ||
| - Use `@egraph.class_` decorator for e-graph classes |
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.
This is depracted, now inherit from egglog.Expr
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.
Fixed to use Expr inheritance instead of deprecated @egraph.class_ decorator. See commit dd6db0e.
.github/copilot-instructions.md
Outdated
| - `version.yml` - Version management | ||
| - `update-changelog.yml` - Changelog automation | ||
|
|
||
| Tests run on Python 3.10, 3.11, 3.12, and 3.13. |
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.
Remove this to not have to keep up to date.
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.
Removed CI section. See commit dd6db0e.
CodSpeed Performance ReportMerging #371 will not alter performanceComparing Summary
Footnotes |
|
@copilot can you fix in response to the review? |
Co-authored-by: saulshanabrook <[email protected]>
All review feedback addressed in commit dd6db0e:
Done! Renamed to |
|
@codex can you review this PR and make any changes you think are useful for an agents file, also by reviewing the recent history of changes on this repo for best practices? |
|
Summary
Testing
|
Configures
.github/AGENTS.mdto provide AI coding agents (including GitHub Copilot) with repository-specific context and conventions.Contents
python/egglog/, Rust PyO3 bindings insrc/, Sphinx docsuv sync --all-extras), version references in config filesegglog.Expr)The instructions enable agents to suggest code that follows existing patterns, uses correct tooling commands, respects the hybrid Python/Rust architecture, and understands the public API export structure.
Fixes #370
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.