Add PR review and PR comment response templates#242
Merged
Alan-Jowett merged 6 commits intomicrosoft:mainfrom Apr 14, 2026
Merged
Add PR review and PR comment response templates#242Alan-Jowett merged 6 commits intomicrosoft:mainfrom
Alan-Jowett merged 6 commits intomicrosoft:mainfrom
Conversation
Add two new templates for pull request workflows: - review-pull-request: Analyze a PR's diff, commits, and linked issues to produce a structured code review. Supports document mode (investigation report) or action mode (post inline review comments via GitHub API). Language-agnostic by default with optional language-specific focus. - respond-to-pr-comments: Process PR review feedback and generate per-thread responses (code fixes, explanations, or both). Detects contradictory feedback across reviewers. Supports document mode (response plan) or action mode (make code changes, post replies, and resolve threads via GitHub API). Both templates require explicit user confirmation before any mutation in action mode. Also adds the pr-comment-responses format for structured per-thread response output with contradiction detection and action summaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds PromptKit components to support pull-request workflows: one template to review PR diffs and another to respond to PR review comments, plus a dedicated output format for per-thread responses and manifest wiring so the new components are discoverable.
Changes:
- Added
review-pull-requesttemplate supporting document vs. action mode PR reviews. - Added
respond-to-pr-commentstemplate supporting document vs. action mode per-thread responses with contradiction detection. - Added
pr-comment-responsesoutput format and registered new components inmanifest.yaml.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| templates/review-pull-request.md | New PR review template (investigation-report output; optional action mode via gh api). |
| templates/respond-to-pr-comments.md | New template for per-thread responses to review feedback (document/action modes; contradiction detection). |
| formats/pr-comment-responses.md | New output format to structure per-thread response plans and contradiction reporting. |
| manifest.yaml | Registers the new format and templates so they’re available via PromptKit tooling. |
- Add operational-constraints protocol to respond-to-pr-comments (consistency with other mutation-capable templates) - Fix GitHub API endpoint for replying to PR review comments (use in_reply_to field, not /replies sub-path) - Fix inline review comment posting to use JSON input file (prevents array-as-string serialization errors) - Align format contradiction section with template non-goals (neutral options/tradeoffs instead of picking a side) - Update manifest.yaml protocol list to match Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add thread/comment ID capture instructions for action mode (respond-to-pr-comments Phase 1 now records GraphQL thread IDs and comment database IDs needed for replies and resolution) - Remove behavioral directives from pr-comment-responses format (formats define structure only; action-mode workflow stays in template) - Move response-type heuristics from format to template only (format now defines allowed enum values; heuristics stay in template) - Fix severity scale: Nit -> Informational to match investigation-report - Add Coverage row to document-mode mapping table - Clarify non-goals: forbid merge only, allow APPROVE/REQUEST_CHANGES reviews with user confirmation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add commit_id to review JSON payload and instruction to fetch head SHA (anchors review comments to the correct diff) - Switch reply posting from --field to --input reply.json approach (prevents shell escaping issues with multi-line or quoted content) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add PR reference to gh pr view command (makes it executable) - Use GraphQL variables for resolveReviewThread mutation (more robust for scripting than hardcoded string interpolation) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change contradiction section empty text from a custom sentence to 'None identified' matching the repo-wide formatting convention. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Add two new templates for pull request workflows:
review-pull-requestfor analyzing PR diffs andrespond-to-pr-commentsfor addressing reviewer feedback. Both support document mode (produce a report) and action mode (execute viaghCLI with mandatory user confirmation).New Components
pr-comment-responsesformats/pr-comment-responses.mdreview-pull-requesttemplates/review-pull-request.mdrespond-to-pr-commentstemplates/respond-to-pr-comments.mdDesign Decisions
systems-engineerpersona — code review expertise already covered; no new persona needed.investigation-reportformat forreview-pull-request— same findings/severity/remediation pattern asreview-code.pr-comment-responsesformat — per-thread response structure (fix vs explain, contradiction report, action summary) has no existing format analog.output_mode: document|action— document produces a report; action executes viaghCLI. Action mode requires explicit user confirmation before every mutation (posting comments, pushing commits, resolving threads).Checklist
tests/validate-manifest.py)