Add public API governance instructions - #68168
Open
PureWeen wants to merge 1 commit into
Open
Conversation
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
Contributor
There was a problem hiding this comment.
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.mdthat requiresapi-approvedbefore implementing public/protected API changes and clarifiesPublicAPI.Unshipped.txtsemantics. - 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
currentvariant, 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
api-approvedbefore implementationPublicAPI.Unshipped.txtcompatibility tracking from API approvalEvaluation
A controlled local Vally comparison used the same analogous unapproved Blazor event API stimulus with
claude-opus-4.6as both agent and judge:The baseline agents recognized the broad API gate but consistently omitted the
PublicAPI.Unshipped.txtdistinction and re-review requirement. Updated agents included the complete governance response and stopped before implementation.Validation
vally lint --eval-spec eng/instructions-evals/copilot-instructions/eval.vally.yamleng/instructions-evals/instructions-vs-baseline.experiment.yamlas YAMLgit diff --checkLimitation
The locally installed Vally 0.5.0 does not expose the
experimentcommand used by the repository's existing experiment schema. The checked-in eval remains variant-neutral, and the experiment overlays.github/copilot-instructions.mdonly for the current variant. With Vally 0.5.0, the same A/B can be reproduced as two plain eval runs from an isolated empty directory.