diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d4bc690db2bf..fa280f828d2e 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -143,6 +143,12 @@ For compatibility with specific branches: - **Never** check in changes to `templatestrings.json` files - These files are automatically generated and should not be modified manually +### File Reset Guidelines for AI Agents +Since coding agents function as both CI and pair programmers, they need to handle CI-generated files appropriately: + +- **Always reset changes to `cgmanifest.json` files** - These are generated during CI builds and should not be committed by coding agents +- **Always reset changes to `templatestrings.json` files** - These localization files are auto-generated and should not be committed by coding agents + ### Branching - `main` - For bug fixes without API changes - `net10.0` - For new features and API changes diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index cd8cdfe953d2..0d6a0fd38435 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -35,3 +35,8 @@ jobs: dotnet --version dotnet --info dotnet workload --info + + - name: Reset tracked files to clean workspace + shell: bash + run: | + git reset --hard HEAD