|
| 1 | +--- |
| 2 | +name: respond-to-rfc-comments |
| 3 | +description: Help respond to review comments on an RFC pull request. Use when the user wants to address, reply to, or resolve feedback on an open RFC PR for toolhive, toolhive-studio, toolhive-registry, toolhive-registry-server, toolhive-cloud-ui, or dockyard projects. |
| 4 | +allowed-tools: Read, Glob, Grep, Bash(git:*), mcp__github__*, mcp__fetch__fetch, WebFetch, Edit, Write, AskUserQuestion |
| 5 | +--- |
| 6 | + |
| 7 | +# Respond to RFC Comments Skill |
| 8 | + |
| 9 | +This skill helps you systematically respond to review comments on an RFC pull request by proposing changes, getting user approval, updating the RFC, and posting replies. |
| 10 | + |
| 11 | +## Overview |
| 12 | + |
| 13 | +When an RFC is under review, reviewers leave comments on the PR — questions, suggestions, nitpicks, and blockers. This skill walks through each comment one at a time, proposes a response and RFC change, gets the user's approval (with possible adjustments), applies the change, and posts the reply. |
| 14 | + |
| 15 | +## Workflow |
| 16 | + |
| 17 | +### Step 1: Fetch All Comments |
| 18 | + |
| 19 | +Gather all review feedback from the PR: |
| 20 | + |
| 21 | +1. Use `mcp__github__pull_request_read` with method `get_review_comments` to fetch inline review threads. |
| 22 | +2. Use `mcp__github__pull_request_read` with method `get_comments` to fetch PR-level comments. |
| 23 | +3. Filter to **unresolved** threads and actionable PR-level comments (skip resolved/outdated threads and the user's own replies). |
| 24 | + |
| 25 | +### Step 2: Read the RFC |
| 26 | + |
| 27 | +Read the full RFC document so you have context for every comment. |
| 28 | + |
| 29 | +### Step 3: Present Comments One at a Time |
| 30 | + |
| 31 | +For each comment, present to the user: |
| 32 | + |
| 33 | +1. **Who** left the comment and **where** (line number or PR-level). |
| 34 | +2. **The comment** — quote it or summarize it clearly. |
| 35 | +3. **Proposed response** — what you would reply on the PR. |
| 36 | +4. **Proposed RFC change** — what specific edit to make (or "none needed"). |
| 37 | + |
| 38 | +Then ask: **Approve, adjust, or skip?** |
| 39 | + |
| 40 | +- **Approve**: Apply the RFC change immediately, then move to the next comment. |
| 41 | +- **Adjust**: The user provides corrections or different direction. Revise the proposal and re-present for approval. |
| 42 | +- **Skip**: Move to the next comment without changes. |
| 43 | +- **Go back**: Re-present the previous comment for further adjustment. |
| 44 | + |
| 45 | +Important interaction rules: |
| 46 | +- Present exactly **one comment at a time**. Do not batch or summarize multiple comments. |
| 47 | +- Wait for explicit user approval before making any edits to the RFC. |
| 48 | +- When the user says "approve", apply the RFC change immediately before presenting the next comment. |
| 49 | +- When the user provides direction that changes the proposal, revise and re-present — do not apply until approved. |
| 50 | +- Track which comments have been approved so you can post all replies together at the end. |
| 51 | + |
| 52 | +### Step 4: Post Replies |
| 53 | + |
| 54 | +Once all comments have been reviewed, ask the user if they want to post the replies. When confirmed: |
| 55 | + |
| 56 | +1. Use `mcp__github__add_reply_to_pull_request_comment` for each inline review comment, using the **numeric comment ID** (not the GraphQL node ID). |
| 57 | +2. Use `mcp__github__add_issue_comment` for PR-level comment responses. |
| 58 | +3. Post all replies in a single batch (parallel tool calls). |
| 59 | + |
| 60 | +To get numeric comment IDs from GraphQL node IDs, use: |
| 61 | +```bash |
| 62 | +gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate --jq '.[] | "\(.id) \(.body[:60])"' |
| 63 | +``` |
| 64 | + |
| 65 | +### Step 5: Commit and Push |
| 66 | + |
| 67 | +After replies are posted, ask the user if they want to commit and push. If confirmed: |
| 68 | + |
| 69 | +1. Stage only the RFC file. |
| 70 | +2. Write a commit message summarizing all changes, referencing the reviewers addressed. |
| 71 | +3. Push to the PR branch. |
| 72 | + |
| 73 | +## Crafting Good Responses |
| 74 | + |
| 75 | +### Response Tone |
| 76 | +- Be direct and constructive. |
| 77 | +- Acknowledge the reviewer's point before explaining the change. |
| 78 | +- For questions: answer the question, then state what RFC change (if any) you're making. |
| 79 | +- For suggestions you agree with: say so concisely, describe the change. |
| 80 | +- For suggestions you disagree with: explain the reasoning, propose an alternative if relevant. |
| 81 | +- For blockers: treat these as high priority — always propose a concrete resolution. |
| 82 | + |
| 83 | +### RFC Changes |
| 84 | +- Make the minimum edit needed to address the comment. |
| 85 | +- When renaming fields or terms, use `replace_all` to catch every occurrence. |
| 86 | +- When adding new sections, match the style of existing sections in the RFC. |
| 87 | +- When adding sections required by the template (e.g., Security Considerations), reference existing RFCs in the repo for structural patterns: |
| 88 | + - Search for the section name across `rfcs/THV-*.md` files. |
| 89 | + - Use 2-3 examples to match the established format (threat model tables, subsection structure, etc.). |
| 90 | + |
| 91 | +### PR-Level Comment Responses |
| 92 | +- When responding to a PR-level comment that requests multiple changes, summarize all the changes made in one reply. |
| 93 | +- Tag the reviewer with `@username` so they get notified. |
| 94 | + |
| 95 | +## Edge Cases |
| 96 | + |
| 97 | +- **Comment on outdated code**: If the comment references code that has already changed, note this in your proposal and suggest whether the comment is still relevant. |
| 98 | +- **Conflicting comments**: If two reviewers disagree, flag this to the user and let them decide the direction. |
| 99 | +- **Comments that require design decisions**: These need user input — present the tradeoffs and ask for direction rather than proposing a specific change. |
| 100 | +- **Comments that invalidate other parts of the RFC**: Flag cascading impacts (e.g., "if we only rate-limit `tools/call`, then the `prompts:` config section may no longer apply"). |
0 commit comments