Skip to content

Add IDE/Compiler specific custom instructions#80617

Merged
akhera99 merged 5 commits intodotnet:mainfrom
akhera99:add_path_specific_custom_instructions
Oct 13, 2025
Merged

Add IDE/Compiler specific custom instructions#80617
akhera99 merged 5 commits intodotnet:mainfrom
akhera99:add_path_specific_custom_instructions

Conversation

@akhera99
Copy link
Member

@akhera99 akhera99 commented Oct 9, 2025

This should allow us to have specific coding styles and language features instructions

@akhera99 akhera99 requested a review from a team October 9, 2025 22:16
@akhera99 akhera99 requested a review from a team as a code owner October 9, 2025 22:16
@akhera99 akhera99 changed the title Add IDE/Roslyn specific custom instructions Add IDE/Compiler specific custom instructions Oct 9, 2025
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

IDE instructions seem fine to get us started.

JoeRobich and others added 2 commits October 9, 2025 15:52
# Roslyn Compiler Instructions for AI Coding Agents

---
applyTo: "src/{Compilers,Dependencies,ExpressionEvaluator,Tools}/**/*.{cs,vb}"
Copy link
Member

Choose a reason for hiding this comment

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

Neat. Didn't realize that you could do this. Where is this documented?

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +41 to +43
var compilation = CSharpCompilation.Create("TestAssembly",
syntaxTrees: new[] { syntaxTree },
references: new[] { TestBase.MscorlibRef });
Copy link
Member

Choose a reason for hiding this comment

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

This is not how we usually create compilation in tests (we use CreateCompilation helpers), so not sure we should have this example (or even this whole section " Compilation Creation Pattern"). But if we do, I'd use collection expressions instead of array initializers.


### Testing Strategy
- **Unit tests**: Test individual compiler phases (lexing, parsing, binding)
- **Compilation tests**: Create `Compilation` objects and verify symbols/diagnostics
Copy link
Member

Choose a reason for hiding this comment

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

This makes it seem like "unit tests" and "compilation tests" are two different things. I guess we have lexing/parsing tests which don't create Compilation objects, so those are separate. But I don't think we have separate binding tests - we test binding via compilations.

@JoeRobich
Copy link
Member

@jjonescz We are looking for just getting a good first effort merged. Would you be willing to update the Compiler instructions (either remove or rewrite the parts that don't make sense), since you have a better understanding of that space?

@jjonescz
Copy link
Member

@akhera99 did you intentionally close this?

@akhera99 akhera99 reopened this Oct 13, 2025
@akhera99
Copy link
Member Author

akhera99 commented Oct 13, 2025

@akhera99 did you intentionally close this?

No I don't think I pressed close 😯
Ah it was because I referenced it in the other PR

@AlekseyTs
Copy link
Contributor

Perhaps file names should make it clear that the instructions are targeting AI agents

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.

8 participants