Add Copilot custom instructions (code review standards)#519
Closed
bwateratmsft wants to merge 4 commits into
Closed
Add Copilot custom instructions (code review standards)#519bwateratmsft wants to merge 4 commits into
bwateratmsft wants to merge 4 commits into
Conversation
Add repo-wide `.github/copilot-instructions.md` and a path-scoped `.github/instructions/generated-and-curated-files.instructions.md`. The guidance is grounded in the existing code/conventions (TypeScript + esbuild, azext platform packages, l10n, command wrappers, lazy imports, MIT headers) and in recurring review feedback on recent PRs (async I/O with size guards, falsy-coercion and semver.coerce pitfalls, shared mutable object leaks, VS Code API semantics, Windows correctness, reuse of existing helpers, and not hand-editing/reviewing generated or curated files such as NOTICE.html, package-lock.json, and CHANGELOG.md). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
bwateratmsft
commented
Jul 6, 2026
Fold recurring, high-signal review patterns mined from top-commented PRs in both microsoft/vscode-docker and microsoft/vscode-containers into .github/copilot-instructions.md: - Add "Review scope & avoiding false positives" (verify API claims before flagging, don't repeat rejected points, respect intentional TODO/pre-release/ type-assertion decisions, keep diffs focused, fix root cause over new eslint-disable). - Correctness: locale-independent casing, handle-every-case, concurrency-safe stack caching + cheap config lookups, stream lifecycle, array membership. - Types: precise unions over string; define types before use. - New sections: Naming & constants, Code locality/coupling, Extension activation & performance, package.json contributions & settings, Scaffolding. - Conventions: composeArgs/withArg builders + parseDockerLikeImageName, zod for external tool output, override/polymorphism, non-obvious-code comments. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Address review feedback: in-repo package.json / package-lock.json versions are decreased frequently between releases without publishing, so a blanket "flag any version decrease" rule produces false positives. Clarify in both instruction files that only published marketplace versions must increase monotonically, and that an in-repo version decrease should not be flagged on its own. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Self-review corrections to .github/copilot-instructions.md: - Drop nonexistent setting containers.oci.jsonDetectionMaxSizeMB; generalize to a reasonable size guard. - Remove @microsoft/vscode-docker-extensibility (not a dependency); attribute registry data providers to @microsoft/vscode-docker-registries. - Correct arg-builder helpers to composeArgs/withArg/withQuotedArg from @microsoft/vscode-processutils (not vscode-container-client); drop withNamedArg/withFlagArg/withDockerBuildArg examples not used here. - Generalize image-name parsing guidance (no parseDockerLikeImageName in src); prefer the container client's structured fields. - Broaden command-wrapper location to src/commands/ since registerLocalCommand and registerWorkspaceCommand live in their own files. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
Closing in favor of #533 |
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
Adds Copilot custom instructions for this repository, with a strong emphasis on code review standards. These files are read by Copilot code review, the Copilot coding agent, and Copilot Chat.
Files
.github/copilot-instructions.md(repo-wide) — project overview, tech stack, build/lint/test commands, coding conventions, and a detailed Code review standards section..github/instructions/generated-and-curated-files.instructions.md(path-scoped viaapplyTo) — do not hand-edit or review-comment onNOTICE.html,package-lock.json, andCHANGELOG.md, plus monotonic-versioning rules.How it was developed
Grounded in the existing code/conventions and recurring feedback on recent PRs (e.g. #443, #444, #447, #452, #454, #458, #471, #473, #483, #491, #492, #518). Notable review themes captured:
x || nullon0/''),semver.coercereturningnull/ stripping prerelease.headers).MarkdownString.isTrusted).processutils,docker-extensibilityimage parser,AzureWizard)....not….NOTICE.html/package-lock.jsonas generated andCHANGELOG.mdas curated; monotonic version bumps.Opened as a draft so the wording can be reviewed and adjusted before merge. Happy to split, trim, or add more path-scoped rule files (e.g. for
src/test, scaffolding, or tasks) as desired.