Conversation
Add repository instructions for GitHub Copilot sessions covering: - Build system phases (update/build/test) and key flags - High-level architecture (graph, optimizer, session, providers) - C++ conventions (error macros, container types, span/string_view) - Python conventions and testing patterns - C API guidelines and PR expectations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
FYI - This is what I got when I ran also renamed it to AGENTS.md to hopefully make it more general. |
There was a problem hiding this comment.
Pull request overview
Adds a new repository-level .github/copilot-instructions.md intended to guide GitHub Copilot sessions with ONNX Runtime-specific build, architecture, coding conventions, C API guidance, and PR expectations.
Changes:
- Introduces a Copilot instruction document covering build/test/lint workflows and key flags.
- Summarizes core architecture (graph/optimizer/framework/session/providers) and contrib/training structure.
- Captures C++/Python/C API conventions and PR guidelines in a single reference.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I have 2 suggestions:
|
- Add build duration section advising agents to run builds in the background and redirect output to a file for long builds - Document --target and --targets flags for building specific CMake targets - Add example for building a single target - Update workflow to mention continuing with other tasks during build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Advise agents to use an isolated virtual environment before building or testing, since those processes may install Python dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@fs-eire @justinchuby thanks for the suggestions of moving some information to skills. I'm new to this, so I am not sure what the appropriate scope of a skill is. Copilot came up with some initial skills. I asked it again afterwards: if you have other ideas about what should be moved into a skill, or just removed from AGENTS.md, please let me know. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
That sounds reasonable. As this grow we can then split. I think of topics like "how to create a new kernel for an op", etc. belonging to a skill. |
- AGENTS.md: Broaden contrib ops registration to list all EP-specific files - ort-build: Update --use_cuda flag docs, add build output path details, consolidate and streamline content - ort-test: Fix macOS platform name, add VS multi-config path info, consolidate and streamline content - ort-lint: Add coding standards doc reference, 80-char line preference, consolidate and streamline content Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merge Python Environment and Python Conventions under one heading - Add coding standards doc reference and 80-char aim to C++ style - Trim verbose source paths from container types - Consolidate C API header locations - Minor wording and formatting cleanup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix CMake file discovery wording (mix of globs and explicit lists) - Note that --target requires --build Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When --test is explicitly provided, the build script only runs the test phase. Add a note that this assumes a prior successful build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
### Description Add a pre-commit [git hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) that runs lintrunner on staged files, catching lint and formatting issues before they reach CI. The hook runs lintrunner in check-only mode (no auto-fix) to avoid issues with partial staging. If lint issues are found, the commit is blocked and the developer is prompted to run `lintrunner -a` to fix. The hook is opt-in. Contributors enable it with: `git config core.hooksPath .githooks` ### Motivation and Context Follow-up from #27856. Catching lint issues at commit time saves CI cycles and review time.
Description
Initial pass at some AI agent instructions for this repo.
Following some conventions:
Add repository instructions for AI agents covering:
--update/--build/--test) and key flagsSourced from existing docs (
CONTRIBUTING.md,docs/Coding_Conventions_and_Standards.md,docs/PR_Guidelines.md,docs/C_API_Guidelines.md) and codebase inspection.Copilot put most of this together.
Motivation and Context
Trying to help AI agents work better in this repo. Just getting some initial instructions in place. We should refine it.