Add IDE/Compiler specific custom instructions#80617
Conversation
JoeRobich
left a comment
There was a problem hiding this comment.
IDE instructions seem fine to get us started.
Co-authored-by: David Barbet <dibarbet@gmail.com>
| # Roslyn Compiler Instructions for AI Coding Agents | ||
|
|
||
| --- | ||
| applyTo: "src/{Compilers,Dependencies,ExpressionEvaluator,Tools}/**/*.{cs,vb}" |
There was a problem hiding this comment.
Neat. Didn't realize that you could do this. Where is this documented?
There was a problem hiding this comment.
| var compilation = CSharpCompilation.Create("TestAssembly", | ||
| syntaxTrees: new[] { syntaxTree }, | ||
| references: new[] { TestBase.MscorlibRef }); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
|
@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? |
|
@akhera99 did you intentionally close this? |
No I don't think I pressed close 😯 |
|
Perhaps file names should make it clear that the instructions are targeting AI agents |
This should allow us to have specific coding styles and language features instructions