Implement GitHub suggestion format instructions (#79)
* implement github suggestion format instructions add instructions for agents to use github's suggestion format (```suggestion blocks) when providing code suggestions in comments. this enables one-click apply for suggested changes. updated: - action/mcp/review.ts: added suggestion format guidance to create_pull_request_review tool description and comment body parameter - action/mcp/comment.ts: added suggestion format guidance to all comment tools with clarification that suggestions only work on pr line-level review comments - action/modes.ts: added detailed example in review mode and reminder in address reviews mode fixes #70 * Address PR review feedback - Remove suggestion format guidance from report_progress (not applicable) - De-duplicate description across Comment, EditComment, ReplyToReviewComment - Drop outer fence in suggestion format example - Clarify that suggestions only work for self-contained changes - Remove useless example comment from review tool description --------- Co-authored-by: pullfrog <team@pullfrog.com>
This commit is contained in:
committed by
pullfrog[bot]
parent
5e291edf05
commit
3b880eb478
@@ -89,7 +89,7 @@ ${dependencyInstallationGuidance}
|
||||
|
||||
4. Make the necessary code changes to address the feedback. Work through each review comment systematically.
|
||||
|
||||
5. **CRITICAL: Reply to EACH review comment individually.** After fixing each comment, use ${ghPullfrogMcpName}/reply_to_review_comment to reply directly to that comment thread. Keep replies extremely brief (1 sentence max, e.g., "Fixed by renaming to X" or "Added null check").
|
||||
5. **CRITICAL: Reply to EACH review comment individually.** After fixing each comment, use ${ghPullfrogMcpName}/reply_to_review_comment to reply directly to that comment thread. Keep replies extremely brief (1 sentence max, e.g., "Fixed by renaming to X" or "Added null check"). If suggesting a small, specific, self-contained code change, use GitHub's suggestion format with \`\`\`suggestion blocks.
|
||||
|
||||
6. Test your changes to ensure they work correctly.
|
||||
|
||||
@@ -119,7 +119,15 @@ ${
|
||||
- Can you imagine a better approach? If so, explain. Make sure it's strictly better, not just different.
|
||||
- Are there bugs, edge cases, security issues, or usability issues? Use your imagination.
|
||||
|
||||
3. **DRAFT** - For each inline comment, find the line in the diff. Each code line shows: \`| OLD | NEW | TYPE | CODE\`. Use the NEW line number (second column).
|
||||
3. **DRAFT** - For each inline comment, find the line in the diff. Each code line shows: \`| OLD | NEW | TYPE | CODE\`. Use the NEW line number (second column). When suggesting specific code changes, use GitHub's suggestion format with \`\`\`suggestion blocks to enable one-click apply. Example:
|
||||
you could simplify this
|
||||
\`\`\`suggestion
|
||||
const result = data.map(x => x.value);
|
||||
\`\`\`
|
||||
or you could use reduce instead
|
||||
\`\`\`suggestion
|
||||
const result = data.reduce((acc, x) => [...acc, x.value], []);
|
||||
\`\`\`
|
||||
|
||||
4. **FILTER COMMENTS** - Do not nitpick! Do not leave compliments that are not actionable. Do not critique the code hygiene or anything stylistic.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user