Skip to content

Commit 6b474cf

Browse files
authored
chore(review): require inline comments for code-specific suggestions; keep summary brief and non-actionable; adjust formatting and README to reflect inline review flow (#1)
1 parent e39ad61 commit 6b474cf

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Each example includes a complete workflow file that you can copy to your `.githu
8787
2. **Data Gathering**: Fetches PR metadata, changed files, and diff content from GitHub API
8888
3. **Template Rendering**: Uses Nunjucks templates to create a structured instruction for the AI
8989
4. **AI Processing**: Calls the Augment Agent to analyze the changes and generate a review
90-
5. **PR Update**: The Augment Agent updates the PR description with the generated review content
90+
5. **PR Review Submission**: The Augment Agent submits a single GitHub review containing a brief summary and multiple inline comments anchored to specific lines in the PR diff (including suggestion blocks where appropriate)
9191

9292
## Custom Guidelines
9393

templates/formatting/base.njk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414

1515
### Code References:
1616
- Use backticks for inline code references (function names, variables, etc.)
17-
- Use code blocks for multi-line code examples
18-
- Include file paths and line numbers when referencing specific code locations
17+
- In inline review comments, prefer GitHub suggestion blocks (```suggestion) for concrete code changes; ensure patches are minimal and accurate
18+
- Do not include code blocks or specific code suggestions in the top-level review summary
19+
- Include file paths and line numbers only within inline comments (not in the summary)
1920
- Use proper syntax highlighting when showing code examples
2021

2122
### Links and References:

templates/guidelines/base.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
### Comment Guidelines:
1616
- **HIGH CONFIDENCE ONLY**: Only suggest changes you are highly confident will improve the code
17-
- Be specific and reference exact lines or sections of code
18-
- Provide clear explanations of issues and suggest concrete improvements
17+
- Post one inline comment per distinct issue and location, anchored to the exact file and line in the PR diff
18+
- Provide clear explanations of issues and suggest concrete improvements; when proposing code, use GitHub suggestion blocks in inline comments
1919
- Use a constructive, helpful tone - focus on the code, not the person
2020
- Include examples of better approaches when suggesting changes
2121
- Prioritize critical issues over minor style preferences
22-
- Group related comments together when possible
22+
- Do not group multiple issues into a single comment; if an issue spans multiple locations, post separate inline comments and mention they are related
2323
- **Quality over quantity**: Better to miss some issues than create noise with low-value suggestions
2424

2525
### Review Focus Areas:

templates/request/base.njk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ You are conducting a comprehensive code review for PR #{{ pr.number }}. You have
2828

2929
## Action Required:
3030
- Use GitHub's review system to post your feedback directly on the relevant lines of code in the PR
31-
- Suggested changes should be used to make it easier to adopt your suggestions
32-
- **IMPORTANT:** All of your comments should be sent as a single review, not as separate reviews
33-
- Do not post comments outside of the single review
31+
- For any code-specific issue, you MUST post an inline review comment anchored to the exact file and line in the PR diff; when proposing code changes, use GitHub suggestion blocks (```suggestion ... ```)
32+
- The review summary MUST be at most 3 sentences and MUST NOT include code-specific suggestions, code blocks, or file/line references. Do not repeat details from inline comments.
33+
- Submit a single GitHub review containing your inline comments plus the brief summary. Do not create multiple reviews.
34+
- If you cannot find a valid diff anchor for a code-specific suggestion, comment on the closest changed line and clearly reference the exact location; only if no anchor is possible, write one short general comment for that item.
3435
- Never use "REQUEST_CHANGES" or "APPROVE"
3536
- If no line-specific suggestions, post a general comment like "Review completed. No suggestions at this time."
3637
- Only a single review should be created, never multiple reviews

0 commit comments

Comments
 (0)