Files
PowerToys/.github/prompts/fix-spelling.prompt.md
Gordon Lam fc1307418e Update Copilot guidance and PR prompt workflow (This PR summary and commit are generated accordingly) (#42634)
## Summary of the Pull Request
- Added new Copilot agent prompts in
`.github/prompts/create-commit-title.prompt.md`,
`.github/prompts/create-pr.prompt.md`, and
`.github/prompts/fix-spelling.prompt.md` to streamline contributor
workflows.
- Refreshed `.github/copilot-instructions.md` with front matter and
clarified build/test guidance.
And added a new section titled `Language Style Rules` to help reduce
style issues in auto-generated code.

## Screenshot
a. For the new prompts, in VSCode, just type "/" and its name
<img width="477" height="124" alt="image"
src="https://github.com/user-attachments/assets/37c7330d-6fdc-45b4-9030-95920920c964"
/>
<img width="446" height="105" alt="image"
src="https://github.com/user-attachments/assets/55d3bb49-46cc-4441-9fb5-fed3a22983d9"
/>
b. All the spelling check problem, PR description, Commit title, are
generated and fixed by above prompts as demonstration (Except this
section)

## PR Checklist
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** N/A on doc updates.
- [x] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx (N/A)

## Detailed Description of the Pull Request / Additional comments
- Introduced prompt definitions so local tooling can generate commit
titles, PR descriptions, and resolve spell-check alerts using consistent
instructions.
- Added GitHub CLI prerequisites inside
`.github/prompts/fix-spelling.prompt.md` to ensure `gh` commands succeed
for new contributors.
- Converted `.github/copilot-instructions.md` to YAML-front-matter
format while aligning headings and terminology with current contributor
guidance.

## Validation Steps Performed
- No automated tests were run; changes are documentation and
configuration only.
2025-10-21 16:05:16 +08:00

1.5 KiB

mode, model, description
mode model description
agent GPT-5-Codex (Preview) Resolve Code scanning / check-spelling comments on the active PR.

Goal: Clear every outstanding GitHub pull request comment created by the Code scanning / check-spelling workflow by explicitly allowing intentional terms.

Guardrails:

  • Update only discussion threads authored by github-actions or github-actions[bot] that mention Code scanning results / check-spelling.
  • Resolve findings solely by editing .github/actions/spell-check/expect.txt; reuse existing entries.
  • Leave all other files and topics untouched.

Prerequisites:

  • Install GitHub CLI if it is not present: winget install GitHub.cli.
  • Run gh auth login once before the first CLI use.

Workflow:

  1. Determine the active pull request with a single gh pr view --json number call (default to the current branch).
  2. Fetch all PR discussion data once via gh pr view --json comments,reviews and filter to check-spelling comments authored by github-actions or github-actions[bot] that are not minimized; when several remain, process only the most recent comment body.
  3. For each flagged token, review .github/actions/spell-check/expect.txt for an equivalent term (for example an existing lowercase variant); when found, reuse that normalized term rather than adding a new entry, even if the flagged token differs only by casing. Only add a new entry after confirming no equivalent already exists.
  4. Add any remaining missing token to .github/actions/spell-check/expect.txt, keeping surrounding formatting intact.