Skip to content

Add public API governance instructions - #68168

Merged
PureWeen merged 6 commits into
mainfrom
pureween-public-api-instructions
Aug 25, 2026
Merged

Add public API governance instructions#68168
PureWeen merged 6 commits into
mainfrom
pureween-public-api-instructions

Conversation

@PureWeen

@PureWeen PureWeen commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

  • teach coding agents to recognize new or changed public/protected API surface and require api-approved before implementation
  • point agents to the ASP.NET Core API review workflow and distinguish PublicAPI.Unshipped.txt compatibility tracking from API approval
  • correct stale API review team references to the current @dotnet/aspnet-api-review handle

Validation

  • git diff --check
  • independently reviewed by GPT-5.6 Terra and MAI-Code-1.1-Flash; both approved without findings

Teach coding agents to stop before implementing unapproved public API changes and preserve the behavior with a Vally A/B evaluation harness.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c6e15e01-fdd2-4645-8e63-a64375d7ea15
@PureWeen
PureWeen marked this pull request as ready for review August 5, 2026 16:44
@PureWeen
PureWeen requested review from a team and wtgodbe as code owners August 5, 2026 16:44
Copilot AI review requested due to automatic review settings August 5, 2026 16:44

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 strengthens repository-wide coding-agent governance around public/protected API changes by adding explicit guidance to stop implementation unless the linked issue is api-approved, and by adding Vally eval/experiment definitions to measure that behavior via an instructions-off vs instructions-on A/B.

Changes:

  • Add a “Public API Changes” governance section to .github/copilot-instructions.md that requires api-approved before implementing public/protected API changes and clarifies PublicAPI.Unshipped.txt semantics.
  • Add a variant-neutral Vally eval spec that prompts for three representative unapproved API-change categories and grades for correct “stop and drive API review” behavior.
  • Add an experiment YAML that injects the instructions overlay only for the current variant, keeping the eval itself variant-neutral.
Show a summary per file
File Description
eng/instructions-evals/instructions-vs-baseline.experiment.yaml Defines the baseline vs current experiment by varying /environment/files to toggle the repo instructions overlay.
eng/instructions-evals/copilot-instructions/eval.vally.yaml Adds the variant-neutral eval spec with shared graders/rubric across three governance stimuli.
.github/copilot-instructions.md Adds explicit public API governance instructions (api-approved gate, API review workflow, and Unshipped vs approval distinction).

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

Comment thread eng/instructions-evals/copilot-instructions/eval.vally.yaml Outdated
Copilot AI added 2 commits August 16, 2026 21:34
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c6e15e01-fdd2-4645-8e63-a64375d7ea15
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c6e15e01-fdd2-4645-8e63-a64375d7ea15
@PureWeen
PureWeen requested a review from SamMonoRT as a code owner August 17, 2026 03:17
@kotlarmilos

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits August 17, 2026 08:23
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in dab8c83. The only conflict was in .github/copilot-instructions.md, where main added a "Framework assembly boundaries" section adjacent to this PR's new "Public API Changes" section — both are kept.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c6e15e01-fdd2-4645-8e63-a64375d7ea15
@PureWeen
PureWeen merged commit 56dd36c into main Aug 25, 2026
10 checks passed
@PureWeen
PureWeen deleted the pureween-public-api-instructions branch August 25, 2026 15:52
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 26, 2026
## Public API Changes

* Treat any new or changed `public` or `protected` type, member, signature, default, or convention as a potential public API change. Before implementing it, verify that the linked issue is `api-approved`.
* If approval is missing, stop and explain the required [API review process](../docs/APIReviewProcess.md): an issue owner or champion drives an `api-suggestion` with the proposal in ref-assembly form, then applies `api-ready-for-review` and notifies `@dotnet/aspnet-api-review` when it is mature. Implementation starts only after `api-approved`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI, this is not how we work and caused my agents to refuse doing any work.

I think it's important that we get more eyes on changes like these

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.

8 participants