Skip to content

Consolidate generated-file guardrails in agent instructions - #55218

Merged
mthalman merged 4 commits into
dotnet:mainfrom
mthalman:mthalman-strengthen-agent-guardrails
Jul 14, 2026
Merged

mthalman merged 4 commits into
dotnet:mainfrom
mthalman:mthalman-strengthen-agent-guardrails

Conversation

@mthalman

@mthalman mthalman commented Jul 9, 2026

Copy link
Copy Markdown
Member

Add an Agent Guardrails section to .github/copilot-instructions.md that lists the generated files agents must not hand-edit (.xlf, generated manpages, and workflow lock files) as a single source of truth, and remove the duplicated restrictions from the Localization and Documentation sections.

Add an Agent Guardrails section to .github/copilot-instructions.md that
lists the generated files agents must not hand-edit (.xlf, generated
manpages, and workflow lock files) as a single source of truth, and
remove the duplicated restrictions from the Localization and
Documentation sections.

Co-authored-by: Copilot App <[email protected]>
Copilot AI review requested due to automatic review settings July 9, 2026 17:15
@mthalman
mthalman requested a review from lbussell as a code owner July 9, 2026 17:15
@mthalman mthalman mentioned this pull request Jul 9, 2026
25 of 39 tasks

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates “do not hand-edit generated files” guidance in .github/copilot-instructions.md by introducing a single Guardrails section and removing duplicated generated-file restrictions from other sections, making the agent instructions easier to keep consistent over time.

Changes:

  • Added a Guardrails section that centrally lists generated file types agents must not edit by hand (.xlf, documentation/manpages/sdk, workflow *.lock.yml, and linguist-generated=true files).
  • Removed the duplicated .xlf restriction from Localization and removed the now-redundant Documentation guidance about generated man pages.

Comment thread .github/copilot-instructions.md Resolved
Comment thread .github/copilot-instructions.md Resolved
Comment thread .github/copilot-instructions.md Resolved
mthalman and others added 2 commits July 14, 2026 10:20
Remove generated-file rules from the file-area table and link the
repository-conventions check to the Guardrails section in
copilot-instructions.md, keeping that section as the single source
of truth.

Co-authored-by: Copilot App <[email protected]>
Add a reference to documentation/project-docs/Localization.md on the
.xlf guardrail bullet so the resx/xlf regeneration workflow stays
discoverable and interconnected.

Co-authored-by: Copilot App <[email protected]>
@mthalman
mthalman force-pushed the mthalman-strengthen-agent-guardrails branch from 903f81b to 1433c37 Compare July 14, 2026 15:23
…gent-guardrails

# Conflicts:
#	.github/copilot-instructions.md
#	.github/skills/code-review/SKILL.md
@mthalman
mthalman requested a review from lbussell July 14, 2026 15:33
@mthalman
mthalman merged commit 9d1b3a6 into dotnet:main Jul 14, 2026
11 checks passed
@mthalman
mthalman deleted the mthalman-strengthen-agent-guardrails branch July 14, 2026 15:56
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants