Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

Plan for Adding copilot-instructions.md

  • Create .github/copilot-instructions.md file with repository-specific instructions
    • Include information about the repository structure
    • Reference the developer guide (eng/docker-tools/DEV-GUIDE.md) to ensure it stays updated
    • Add build and test instructions
    • Include information about the shared infrastructure pattern
  • Review and verify the copilot-instructions.md file
    • Fixed code block syntax for PowerShell examples
    • Simplified build and test commands with clearer examples
  • Add code review guidelines section
    • Document when to update eng/docker-tools/DEV-GUIDE.md
    • Document when to update README.md#building-locally
    • Document when to update src/README.md
    • Include general documentation update questions
  • Address review feedback
    • Remove hardcoded SDK version number to avoid stale documentation
    • Remove all code formatting and style preferences (enforced by .editorconfig and dotnet format)
  • Run final code review
  • Run security scan (no code changes to analyze)

Key Design Decision

Code formatting and style preferences are intentionally excluded from this document. All formatting rules are enforced by .editorconfig and fixable via dotnet format, preventing duplication and maintenance burden.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add copilot-instructions.md file for the repo</issue_title>
<issue_description>This was mentioned in #1889 (comment), specifically to help ensure the developer guide is kept up to date.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 17, 2025 16:31
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
…arameter

Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
Copilot AI changed the title [WIP] Add copilot-instructions.md file for the repo Add copilot-instructions.md to guide infrastructure maintenance Dec 17, 2025
Copilot AI requested a review from mthalman December 17, 2025 16:41
@lbussell
Copy link
Member

@copilot Add a section about code review. In that section, make sure to point out common documents that might need to be updated when changes are made. Common examples include:

  • Making changes to shared pipeline templates in eng/docker-tools/ -> make sure eng/docker-tools/DEV_GUIDE.md stays up to date
  • Making changes to repo build scripts -> make sure README.md#building-locally stays updated
  • Making changes to ImageBuilder's build scripts/processes -> make sure src/README.md stays updated

Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot Add a section about code review. In that section, make sure to point out common documents that might need to be updated when changes are made. Common examples include:

  • Making changes to ...

Added a "Code Review Guidelines" section that covers:

  • Updates to eng/docker-tools/ → update DEV-GUIDE.md
  • Updates to build scripts → update README.md#building-locally
  • Updates to ImageBuilder → update src/README.md
  • General documentation update checklist

Commit: 2d2bb6c


## Additional Context

- **.NET SDK Version**: Defined in `global.json` (currently 9.0.300)
Copy link
Member

Choose a reason for hiding this comment

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

@copilot

Suggested change
- **.NET SDK Version**: Defined in `global.json` (currently 9.0.300)
- **.NET SDK Version**: Defined in `global.json`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied. Removed the hardcoded version number to prevent documentation from becoming stale.

Commit: 7586446

Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
Copilot AI requested a review from mthalman December 17, 2025 18:35
@mthalman mthalman marked this pull request as ready for review December 17, 2025 18:36
@mthalman mthalman requested a review from a team as a code owner December 17, 2025 18:36
@mthalman mthalman enabled auto-merge (squash) December 17, 2025 18:37
Copy link
Member

@lbussell lbussell left a comment

Choose a reason for hiding this comment

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

@copilot, a general comment - exclude all code formatting and style preferences from this document. Any code style preferences should be expressed in .editorconfig. They should be enforced by emitting build warnings or errors. We should strive to have formatting issues fixed by running dotnet format --include <files> instead of duplicating code style preferences in the copilot instructions.

Comment on lines 77 to 81
- **License header required**: All C# files must start with:
```csharp
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
```
Copy link
Member

Choose a reason for hiding this comment

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

Not needed. This is covered by .editorconfig and will show up as an error in the IDE if it's missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the entire Coding Standards section, including license header requirements and all formatting/style rules.

Commit: c9e8a17

Comment on lines 82 to 91
- **Indentation**: 4 spaces (no tabs)
- **Braces**: Allman style - opening braces on new lines
- **Field naming**:
- Private/internal fields: `_camelCase` prefix
- Static fields: `s_camelCase` prefix
- Constants: `PascalCase`
- **Avoid `this.`** unless necessary
- **Use `var`** only when type is clear
- **Prefer keywords** over BCL types (e.g., `string` not `String`)
- **TreatWarningsAsErrors**: Enabled - all warnings must be resolved
Copy link
Member

Choose a reason for hiding this comment

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

All of this should be covered/enforced by editorconifg rules that cause code warnings or errors. We should strive to have this completely fixable using dotnet format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all code formatting and style preferences from the document. These are enforced by .editorconfig and fixable via dotnet format.

Commit: c9e8a17

…s.md

Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
auto-merge was automatically disabled December 17, 2025 18:53

Head branch was pushed to by a user without write access

Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot, a general comment - exclude all code formatting and style preferences from this document. Any code style preferences should be expressed in .editorconfig. They should be enforced by emitti...

Removed all code formatting and style preferences. The document now focuses on repository structure, documentation maintenance patterns, and workflows rather than duplicating .editorconfig rules.

Commit: c9e8a17

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.

Add copilot-instructions.md file for the repo

3 participants