Skip to content

docs: overhaul Copilot instructions with coding conventions and prompt files#40113

Merged
benhillis merged 2 commits intomasterfrom
user/benhill/copilot_updates
Apr 6, 2026
Merged

docs: overhaul Copilot instructions with coding conventions and prompt files#40113
benhillis merged 2 commits intomasterfrom
user/benhill/copilot_updates

Conversation

@benhillis
Copy link
Copy Markdown
Member

Summary of the Pull Request

Overhauls the Copilot instruction files so that AI-assisted code generation and review follows the actual conventions used in this repo.

PR Checklist

  • Closes: N/A
  • Communication: N/A (documentation-only change)
  • Tests: N/A (no code changes)
  • Localization: N/A
  • Dev docs: This PR is the dev docs update
  • Documentation updated: N/A

Detailed Description of the Pull Request / Additional comments

Updated .github/copilot-instructions.md:

  • Added coding conventions section: naming, WIL error handling, RAII/smart pointers, synchronization, strings, headers, localization, telemetry, IDL/COM ABI rules, config file conventions
  • Added namespace-to-directory map for top-level namespaces
  • Added key source files list
  • Replaced clang-format references with .\FormatSource.ps1
  • Consolidated duplicate timing info into single reference table
  • Fixed Unix-only find command

New files:

  • .github/copilot/review.md - Review prompt for high-risk areas
  • .github/copilot/test.md - Test generation prompt with TAEF patterns
  • .github/copilot/commit.md - Commit message guidelines
  • .editorconfig - Editor settings for non-C++ files

Validation Steps Performed

Manual review of all conventions against actual codebase patterns.

…t files

Major update to .github/copilot-instructions.md:
- Add coding conventions (naming, error handling, RAII, strings, headers,
  synchronization, localization, telemetry, formatting, IDL/COM, config)
- Add test authoring summary pointing to detailed test.md prompt
- Add namespace-to-directory map for top-level namespaces
- Add key source files list (defs.h, WslTelemetry.h, wslc.idl, etc.)
- Replace clang-format references with .\FormatSource.ps1
- Consolidate duplicate timing info into single reference table

New files:
- .github/copilot/review.md: Review prompt focused on high-risk areas
  (ABI breaks, missing localization, resource safety)
- .github/copilot/test.md: Test generation prompt with TAEF patterns
- .github/copilot/commit.md: Commit message guidelines
- .editorconfig: Editor settings for non-C++ files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

Documentation update that refines the repository’s Copilot guidance so AI-assisted code generation/review better matches established WSL repo conventions (coding patterns, testing practices, and workflow commands).

Changes:

  • Expands .github/copilot-instructions.md with coding conventions (WIL/RAII, localization, telemetry, IDL/COM ABI rules), navigation pointers, and updated workflow/validation sections.
  • Adds scoped Copilot prompt files for review focus areas, test generation guidance, and commit message guidance.
  • Introduces an .editorconfig to standardize formatting defaults for non-C++ files.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/copilot-instructions.md Major expansion of repo-specific conventions and dev workflow guidance.
.github/copilot/review.md New review prompt emphasizing ABI/resource safety/localization/telemetry risks.
.github/copilot/test.md New TAEF-focused test generation guidelines and helper macro references.
.github/copilot/commit.md New lightweight commit message guidelines.
.editorconfig New formatting defaults intended to complement .clang-format for non-C++ files.

- Scope precomp.h guidance to Windows components (Linux doesn't use it)
- Fix review.md reference to .github/copilot-instructions.md
- Restore clang-format as Linux formatting option alongside FormatSource.ps1
- Note FormatSource.ps1 requires cmake . first
- Fix en-us -> en-US casing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benhillis benhillis merged commit 11ae8b2 into master Apr 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants