Rewrite Copilot instructions and move to AGENTS.md#53630
Rewrite Copilot instructions and move to AGENTS.md#53630lbussell wants to merge 11 commits intodotnet:mainfrom
Conversation
nagilson
left a comment
There was a problem hiding this comment.
Thanks, I think that it's a smart idea to improve the instructions we have nowadays! Left some questions to ponder.
|
|
||
| This puts the built SDK on your PATH so `dotnet build`, `dotnet test`, etc. use your local changes. | ||
|
|
||
| ### Running Tests |
There was a problem hiding this comment.
One use case that I have encountered a number of times recently is simulating the Helix run environment. This is described in https://github.com/dotnet/sdk/blob/main/documentation/project-docs/repro-helix-failure.md. Scenarios in which this is important is to flush out dependencies on test-assets where the available content is limited. Thoughts on if this scenario should be called out?
There was a problem hiding this comment.
Is that document up-to-date? If so I can link to it here.
|
|
||
| By default (without `-pack`), the build skips crossgen and installers (`SkipUsingCrossgen=true`, `SkipBuildingInstallers=true`) to speed up inner-loop iteration. Build output goes to `artifacts/bin/redist/<Configuration>/dotnet/`. | ||
|
|
||
| Key flags: |
There was a problem hiding this comment.
There are some secondary flags that can be important. e.g. BuildSdkDeb, BuildSdkRpm. I am sure there are others. Is it worth noting these or giving hints on how to self discover these?
There was a problem hiding this comment.
How do you discover these? Are they documented somewhere centrally? Or do you just need to inspect some of the msbuild files in the repo?
There was a problem hiding this comment.
I don't know of them being called out in any docs. I always look at the build definition to see what build options/parameters it uses. For the ones I called out, they are specified here - https://github.com/dotnet/sdk/blob/main/eng/pipelines/templates/jobs/sdk-job-matrix.yml#L26
There was a problem hiding this comment.
Feel free to propose more specific changes if you know what you want to see here.
f3f0691 to
9cac85c
Compare
There was a problem hiding this comment.
Pull request overview
Updates repository-level agent guidance by replacing the previous Copilot instructions file with a new AGENTS.md focused on repo orientation and local build/test workflow.
Changes:
- Add
AGENTS.mdwith repo overview, build/test commands, and a high-level project layout map. - Remove
.github/copilot-instructions.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| AGENTS.md | Introduces new repo overview + local workflow guidance intended for agent use. |
| .github/copilot-instructions.md | Removes the prior Copilot instruction content. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/ba-g docs-only change. |
The bulk of
.github/copilot-instructions.mdwas written before most frontier models were released. In my limited experience working with this repo, the existing instructions were mostly a waste of context/tokens and sometimes even reduced the quality of Copilot's output.I have rewritten the instructions based on Write effective instructions | Claude Code documentation.
Before: ~700 tokens
After: ~500 tokens
The new instructions focus on telling agents the basics of how to work in the repo, and avoid overloading them with instructions. Research shows that LLMs' ability to follow instructions degrades the more rules that they are given (see: How Many Instructions Can LLMs Follow at Once?).