Transforms gap analysis findings into structured review comments with comprehensive rationale. Handles both initial draft generation and critique response iteration.
Transform evaluation findings into structured review comments with comprehensive rationale sections that cite evidence, baseline patterns, impact, and best practices.
Reference: Follow Core Review Principles from
paw-review-workflowskill.
Verify these artifacts exist in .paw/reviews/<identifier>/:
ReviewContext.md (PR metadata and parameters)CodeResearch.md (baseline codebase understanding)DerivedSpec.md (what the PR is trying to achieve)Review Mode from ReviewContext.md):single-model or absent: require ImpactAnalysis.md + GapAnalysis.mdsociety-of-thought: require REVIEW-SYNTHESIS.mdCrossRepoAnalysis.md (optional—only for multi-repo reviews)If any required artifact is missing, report blocked status—earlier stages must complete first.
SoT mode input mapping: When REVIEW-SYNTHESIS.md is the evaluation source, map findings to the comment pipeline as follows:
[Trade-off] prefix (note: this mapping is active only when Review Interactive is true or smart; with false default, trade-offs are auto-resolved by paw-sot and appear as regular findings)Multi-repo detection: Check if CrossRepoAnalysis.md exists. If present, incorporate cross-repo gaps into comment generation.
ReviewComments.md with all comments, rationale, and metadata**Final**: statusNote: GitHub posting is handled by the paw-review-github skill after critique iteration completes.
Group findings that share the same root cause:
Batching Criteria:
Batching Approach:
Examples:
Condition: Only if CrossRepoAnalysis.md exists in the artifact directory.
When CrossRepoAnalysis.md is present, add cross-repo gaps to the findings list:
Load Cross-Repo Gaps:
CrossRepoAnalysis.md → extract "Cross-Repository Gaps" sectionCross-Repo Finding Format:
**Type**: Must (from CrossRepoAnalysis.md)
**Category**: Cross-Repository Coordination
**Files**: [repo-b/src/api/client.ts:8](repo-b/src/api/client.ts#L8)
**Issue**: Missing consumer update for `lastLogin` field
**Evidence**:
- Added in repo-a: [repo-a/src/types/user.ts:22](repo-a/src/types/user.ts#L22)
- Missing in repo-b: [repo-b/src/api/client.ts](repo-b/src/api/client.ts)
**Cross-Reference**: (Cross-repo: see repo-a#123 for interface change)
Routing Cross-Repo Comments:
(Cross-repo: see owner/other-repo#NNN for [context])For each finding or batched group of findings, create structured comment:
Required Fields:
inline (line-specific) or thread (file/concept-level)Inline vs Thread Determination:
Use Inline for:
Use Thread for:
For EVERY comment, create comprehensive rationale with four components:
Evidence:
Baseline Pattern:
Impact:
Best Practice Citation:
Example Rationale:
**Rationale:**
- **Evidence**: `auth.ts:45` shows user input passed directly to SQL query without validation
- **Baseline Pattern**: Similar code in `database.ts:120-130` uses parameterized queries
- **Impact**: SQL injection vulnerability allowing unauthorized data access or modification
- **Best Practice**: OWASP Top 10 - Always use parameterized queries for user input
Generate comprehensive markdown document:
---
date: <timestamp>
git_commit: <sha>
branch: <branch>
repository: <repo>
topic: "Review Comments for <PR/Branch>"
tags: [review, comments, feedback]
status: draft
---
# Review Comments for <PR Number or Branch Slug>
**Context**: GitHub PR #X OR Non-GitHub branch feature/...
**Base Branch**: <base>
**Head Branch**: <head>
**Review Date**: <date>
**Reviewer**: <git user>
**Status**: ⏳ Pending critique
## Summary Comment
<Brief, positive opening acknowledging the work and effort>
<Overview of feedback scope and organization>
**Findings**: X Must-address items, Y Should-address items, Z optional suggestions
---
## Inline Comments
### File: `path/to/file.ts` | Lines: 45-50
**Type**: Must
**Category**: Safety
<Clear explanation of the issue>
**Suggestion:**
```typescript
// Proposed fix or approach with code example
Rationale:
file.ts:45 shows unchecked null accessfile.ts:100 uses null checks before accessing propertiespath/to/another.ts | Lines: 88Type: Could Category: Performance
Suggestion:
// Optional improvement example
Rationale:
another.ts:88 shows inefficient patternoptimized.ts:42path/to/module/ (Overall Architecture)Type: Should Category: Maintainability
Rationale: ...
**Key Requirements:**
- Default to a positive, constructive summary; honor explicit tone direction that remains professional and evidence-based
- Every comment has rationale with all four components
- File:line references for all evidence
- Code examples for non-trivial suggestions
## Critique Response Mode
When ReviewComments.md already contains Assessment sections (from `paw-review-critic`), enter Critique Response Mode to incorporate feedback and finalize comments.
### Detection
- Check if comments have `**Assessment:**` sections
- If assessments exist, this is a second pass to incorporate critique
- Skip to Critique Response Mode steps below
### Process
For each comment with an assessment:
1. **Preserve Original**: Keep the original comment text intact
2. **Include Critique**: The Assessment section remains as-is
3. **Add Updated Version**: Based on the recommendation:
- **Include as-is**: Add `**Final**: âś“ Ready for GitHub posting`
- **Modify**: Add `**Updated Comment:**` section with revised text addressing critique feedback, then `**Final**: âś“ Ready for GitHub posting`
- **Skip**: Add `**Final**: Skipped per critique - [reason]` (comment remains in artifact but won't post to GitHub)
### Updated Comment Structure
```markdown
### File: `auth.ts` | Lines: 45-50
**Type**: Must
**Category**: Safety
[Original comment text - preserved exactly]
**Suggestion:**
[Original suggestion code]
**Rationale:**
[Original rationale]
**Assessment:**
- **Usefulness**: Medium - [critique justification]
- **Accuracy**: [validation]
- **Alternative Perspective**: [alternatives considered]
- **Trade-offs**: [trade-off analysis]
- **Recommendation**: Modify to soften tone
**Updated Comment:**
[Revised comment text incorporating critique feedback]
**Updated Suggestion:**
[Revised suggestion if needed]
**Final**: âś“ Ready for GitHub posting
For comments with Recommendation: Skip:
**Final**: Skipped per critique - [reason from assessment]After processing all comments with assessments:
draft to finalized**Final**: markersSupport tone adjustments while preserving evidence and IDs:
Default Tone:
Tone Adjustment Parameters:
| Parameter | Low | High |
|---|---|---|
| Directness | More diplomatic | More direct |
| Encouragement | Matter-of-fact | More encouraging |
| Formality | More casual | More formal |
| Conciseness | More explanatory | More concise |
Adjustment Process:
No PAW Artifact References in Comments:
Rationale Required:
Evidence-Based:
Human Control:
Comprehensive Coverage:
One Issue, One Comment:
Before completing initial pass, verify:
draftBefore completing critique response, verify:
**Final**: marker added to every comment**Updated Comment:** added where Recommendation was ModifyfinalizedInitial Pass (Draft):
Activity complete.
Artifact saved: .paw/reviews/<identifier>/ReviewComments.md
Status: Draft - awaiting critique
Summary:
- Total comments generated: N
- Must: X, Should: Y, Could: Z
- Awaiting paw-review-critic assessment
Critique Response (Finalized):
Activity complete.
Artifact saved: .paw/reviews/<identifier>/ReviewComments.md
Status: Finalized - ready for GitHub posting
Summary:
- Comments ready for posting: X
- Comments modified per critique: Y
- Comments skipped per critique: Z
Next: Run paw-review-github to post finalized comments to GitHub pending review.