Files
PowerToys/.github/prompts/create-pr-summary.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.9 KiB

mode, model, description
mode model description
agent GPT-5-Codex (Preview) Generate a PowerToys-ready pull request description from the local diff.

Goal: Produce a ready-to-paste PR title and description that follows PowerToys conventions by comparing the current branch against a user-selected target branch.

Repo guardrails:

  • Treat .github/pull_request_template.md as the single source of truth; load it at runtime instead of embedding hardcoded content in this prompt.
  • Preserve section order from the template but only surface checklist lines that are relevant for the detected changes, filling them with [x]/[ ] as appropriate.
  • Cite touched paths with inline backticks, matching the guidance in .github/copilot-instructions.md.
  • Call out test coverage explicitly: list automated tests run (unit/UI) or state why they are not applicable.

Workflow:

  1. Determine the target branch from user context; default to main when no branch is supplied.
  2. Run git status --short once to surface uncommitted files that may influence the summary.
  3. Run git diff <target-branch>...HEAD a single time to review the detailed changes. Only when confidence stays low dig deeper with focused calls such as git diff <target-branch>...HEAD -- <path>.
  4. From the diff, capture impacted areas, key file changes, behavioral risks, migrations, and noteworthy edge cases.
  5. Confirm validation: list tests executed with results or state why tests were skipped in line with repo guidance.
  6. Load .github/pull_request_template.md, mirror its section order, and populate it with the gathered facts. Include only relevant checklist entries, marking them [x]/[ ] and noting any intentional omissions as "N/A".
  7. Present the filled template inside a fenced ```markdown code block with no extra commentary so it is ready to paste into a PR, clearly flagging any placeholders that still need user input.