Skip to content

Add 'Investigating PRs and CI failures' guidance to copilot-instructions#54609

Merged
dsplaisted merged 2 commits into
dotnet:mainfrom
dsplaisted:copilot-instructions-investigating-prs
Jun 5, 2026
Merged

Add 'Investigating PRs and CI failures' guidance to copilot-instructions#54609
dsplaisted merged 2 commits into
dotnet:mainfrom
dsplaisted:copilot-instructions-investigating-prs

Conversation

@dsplaisted
Copy link
Copy Markdown
Member

What

Adds a short Investigating PRs and CI failures section to .github/copilot-instructions.md:

  • When asked to look at, investigate, or diagnose a pull request or build, first read the PR itself — its state, checks, and the conversation/comments — before deep analysis. Maintainers often post the root cause or the decided fix in the discussion, and a linked PR or issue may already carry it.
  • If a PR's CI checks are failing, prefer the ci-analysis skill (.claude/skills/ci-analysis) for the deep dive — Azure DevOps/Helix failures, known-issue matching, and retry guidance — rather than ad-hoc investigation.

Why

When asked to "look at" a PR, the agent tends to jump straight into ad-hoc investigation and skips the PR discussion — where the answer often already is. Concrete example: diagnosing #54484 (a release/10.0.1xx → 10.0.3xx auto-merge failing Restore with '[]' is not a valid version string), the discussion already had the maintainer's root cause and the decided resolution (wait for the 10.0.9 servicing build to flow through the VMR, then pin the reference), and pointed at the linked PR that added the component. Reading the PR + conversation first would have landed on the right answer immediately.

The repo already ships a ci-analysis skill built for exactly this, but a generic prompt like "Look at the issue with #54484" doesn't match its CI-failure trigger phrases, so it isn't auto-selected. This guidance routes failing-CI investigations to it.

Why this shape

  • Repo-scoped and conditioned on failing checks, so it won't over-trigger ci-analysis on code-review/explain requests.
  • The first bullet is tool-agnostic — "read the PR + conversation first" helps regardless of which skill is right.
  • Matches the file's existing "Title: + bullets" style; no behavior/code changes.

When asked to look at or diagnose a PR/build, the agent should first read the
PR itself — state, checks, and the conversation/comments — before deep analysis,
since maintainers often post the root cause or decided fix in the discussion and
a linked PR/issue may already carry it. When checks are failing, prefer the
repo's ci-analysis skill over ad-hoc investigation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 5, 2026 00:45
@dsplaisted dsplaisted requested review from a team, baronfel and marcpopMSFT June 5, 2026 00:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the repository’s .github/copilot-instructions.md to add guidance for how agents should approach PR/build investigations, emphasizing reading the PR discussion first and (when applicable) routing CI-failure deep dives to a specialized skill rather than ad-hoc analysis.

Changes:

  • Add a new “Investigating PRs and CI failures” section with two bullets: read PR state/checks/discussion first, and prefer a CI-analysis skill for failing checks.
  • Keep the instructions file’s existing “Section title + bullets” structure and placement (inserted between Testing and Output Considerations).

Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
@dsplaisted dsplaisted merged commit 9a43747 into dotnet:main Jun 5, 2026
11 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 6, 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.

3 participants