From aed6b0aa63cb21412097ed76b2edbf53ab3a47bf Mon Sep 17 00:00:00 2001 From: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:34:11 -0800 Subject: [PATCH] chore(prompts): add fix active PR comments prompt with scoped changes (#44996) ## Summary of the Pull Request Enhance the active PR comments prompt to allow for scoped changes while removing outdated model references from various prompt files. ## PR Checklist - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **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 ## Detailed Description of the Pull Request / Additional comments The changes include the addition of a new prompt for fixing active PR comments with scoped changes, ensuring that only simple fixes are applied. Additionally, references to the model 'GPT-5.1-Codex-Max' have been removed from several prompt files to streamline the prompts. ## Validation Steps Performed Manual validation of the new prompt functionality was conducted to ensure it correctly identifies and resolves active PR comments. ``` --- .github/prompts/create-commit-title.prompt.md | 1 - .github/prompts/create-pr-summary.prompt.md | 1 - .github/prompts/fix-issue.prompt.md | 1 - .../prompts/fix-pr-active-comments.prompt.md | 70 +++++++++++++++++++ .github/prompts/fix-spelling.prompt.md | 1 - .github/prompts/review-issue.prompt.md | 1 - .github/prompts/review-pr.prompt.md | 1 - 7 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 .github/prompts/fix-pr-active-comments.prompt.md diff --git a/.github/prompts/create-commit-title.prompt.md b/.github/prompts/create-commit-title.prompt.md index 3696fed262..f61285c304 100644 --- a/.github/prompts/create-commit-title.prompt.md +++ b/.github/prompts/create-commit-title.prompt.md @@ -1,6 +1,5 @@ --- agent: 'agent' -model: 'GPT-5.1-Codex-Max' description: 'Generate an 80-character git commit title for the local diff' --- diff --git a/.github/prompts/create-pr-summary.prompt.md b/.github/prompts/create-pr-summary.prompt.md index 82bb0c869e..9e47c2fc3c 100644 --- a/.github/prompts/create-pr-summary.prompt.md +++ b/.github/prompts/create-pr-summary.prompt.md @@ -1,6 +1,5 @@ --- agent: 'agent' -model: 'GPT-5.1-Codex-Max' description: 'Generate a PowerToys-ready pull request description from the local diff' --- diff --git a/.github/prompts/fix-issue.prompt.md b/.github/prompts/fix-issue.prompt.md index d7aeda0381..9b758c4e8d 100644 --- a/.github/prompts/fix-issue.prompt.md +++ b/.github/prompts/fix-issue.prompt.md @@ -1,6 +1,5 @@ --- agent: 'agent' -model: 'GPT-5.1-Codex-Max' description: 'Execute the fix for a GitHub issue using the previously generated implementation plan' --- diff --git a/.github/prompts/fix-pr-active-comments.prompt.md b/.github/prompts/fix-pr-active-comments.prompt.md new file mode 100644 index 0000000000..4d7c67d986 --- /dev/null +++ b/.github/prompts/fix-pr-active-comments.prompt.md @@ -0,0 +1,70 @@ +--- +description: 'Fix active pull request comments with scoped changes' +name: 'fix-pr-active-comments' +agent: 'agent' +argument-hint: 'PR number or active PR URL' +--- + +# Fix Active PR Comments + +## Mission +Resolve active pull request comments by applying only simple fixes. For complex refactors, write a plan instead of changing code. + +## Scope & Preconditions +- You must have an active pull request context or a provided PR number. +- Only implement simple changes. Do not implement large refactors. +- If required context is missing, request it and stop. + +## Inputs +- Required: ${input:pr_number:PR number or URL} +- Optional: ${input:comment_scope:files or areas to focus on} +- Optional: ${input:fixing_guidelines:additional fixing guidelines from the user} + +## Workflow +1. Locate all active (unresolved) PR review comments for the given PR. +2. For each comment, classify the change scope: + - Simple change: limited edits, localized fix, low risk, no broad redesign. + - Large refactor: multi-file redesign, architecture change, or risky behavior change. +3. For each large refactor request: + - Do not modify code. + - Write a planning document to Generated Files/prReview/${input:pr_number}/fixPlan/. +4. For each simple change request: + - Implement the fix with minimal edits. + - Run quick checks if needed. + - Commit and push the change. +5. For comments that seem invalid, unclear, or not applicable (even if simple): + - Do not change code. + - Add the item to a summary table in Generated Files/prReview/${input:pr_number}/fixPlan/overview.md. + - Consult back to the end user in a friendly, polite tone. +6. Respond to each comment that you fixed: + - Reply in the active conversation. + - Use a polite or friendly tone. + - Keep the response under 200 words. + - Resolve the comment after replying. + +## Output Expectations +- Simple fixes: code changes committed and pushed. +- Large refactors: a plan file saved to Generated Files/prReview/${input:pr_number}/fixPlan/. +- Invalid or unclear comments: captured in Generated Files/prReview/${input:pr_number}/fixPlan/overview.md. +- Each fixed comment has a reply under 200 words and is resolved. + +## Plan File Template +Use this template for each large refactor item: + +# Fix Plan: + +## Context +- Comment link: +- Impacted areas: + +## Overview Table Template +Use this table in Generated Files/prReview/${input:pr_number}/fixPlan/overview.md: + +| Comment link | Summary | Reason not applied | Suggested follow-up | +| --- | --- | --- | --- | +| | | | | + +## Quality Assurance +- Verify plan file path exists. +- Ensure no code changes were made for large refactor items. +- Confirm replies are under 200 words and comments are resolved. diff --git a/.github/prompts/fix-spelling.prompt.md b/.github/prompts/fix-spelling.prompt.md index 008fd5fae3..bd40c1feea 100644 --- a/.github/prompts/fix-spelling.prompt.md +++ b/.github/prompts/fix-spelling.prompt.md @@ -1,6 +1,5 @@ --- agent: 'agent' -model: 'GPT-5.1-Codex-Max' description: 'Resolve Code scanning / check-spelling comments on the active PR' --- diff --git a/.github/prompts/review-issue.prompt.md b/.github/prompts/review-issue.prompt.md index 45c6b7fcaa..2ed4b9ef1f 100644 --- a/.github/prompts/review-issue.prompt.md +++ b/.github/prompts/review-issue.prompt.md @@ -1,6 +1,5 @@ --- agent: 'agent' -model: 'GPT-5.1-Codex-Max' description: 'Review a GitHub issue, score it (0-100), and generate an implementation plan' --- diff --git a/.github/prompts/review-pr.prompt.md b/.github/prompts/review-pr.prompt.md index 3f8f07d6b0..0f72b6171d 100644 --- a/.github/prompts/review-pr.prompt.md +++ b/.github/prompts/review-pr.prompt.md @@ -1,6 +1,5 @@ --- agent: 'agent' -model: 'GPT-5.1-Codex-Max' description: 'Perform a comprehensive PR review with per-step Markdown and machine-readable outputs' ---