tlc-claude-code 1.5.6 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -120,21 +120,68 @@ For each provider in `reviewProviders` (except `claude` which is the current ses
|
|
|
120
120
|
|
|
121
121
|
**How to invoke:**
|
|
122
122
|
|
|
123
|
-
1. **Save diff to temporary file** (
|
|
123
|
+
1. **Save diff to temporary file with size limit** (max 500 lines per chunk):
|
|
124
124
|
```bash
|
|
125
|
-
|
|
125
|
+
# Get diff and check size
|
|
126
|
+
git diff main...HEAD > /tmp/review-diff-full.patch
|
|
127
|
+
line_count=$(wc -l < /tmp/review-diff-full.patch)
|
|
128
|
+
|
|
129
|
+
if [ "$line_count" -gt 500 ]; then
|
|
130
|
+
echo "⚠️ Large diff ($line_count lines) - chunking for review..."
|
|
131
|
+
|
|
132
|
+
# Split by file for targeted review
|
|
133
|
+
git diff --name-only main...HEAD | while read file; do
|
|
134
|
+
git diff main...HEAD -- "$file" > "/tmp/review-chunk-${file//\//_}.patch"
|
|
135
|
+
done
|
|
136
|
+
|
|
137
|
+
# Or truncate with warning
|
|
138
|
+
head -500 /tmp/review-diff-full.patch > /tmp/review-diff.patch
|
|
139
|
+
echo "... truncated (showing first 500 of $line_count lines)" >> /tmp/review-diff.patch
|
|
140
|
+
else
|
|
141
|
+
cp /tmp/review-diff-full.patch /tmp/review-diff.patch
|
|
142
|
+
fi
|
|
126
143
|
```
|
|
127
144
|
|
|
128
|
-
2. **Invoke each configured provider
|
|
145
|
+
2. **Invoke each configured provider** (one chunk at a time if split):
|
|
129
146
|
|
|
130
147
|
```bash
|
|
131
|
-
# For Codex (GPT-5.2) -
|
|
132
|
-
codex --print "
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
148
|
+
# For Codex (GPT-5.2) - detailed review prompt
|
|
149
|
+
codex --print "You are a senior code reviewer. Analyze this diff thoroughly:
|
|
150
|
+
|
|
151
|
+
1. **Line-by-line Analysis**: Comment on specific lines with issues
|
|
152
|
+
2. **Bugs**: Identify potential bugs, edge cases, null checks
|
|
153
|
+
3. **Security**: SQL injection, XSS, command injection, auth issues
|
|
154
|
+
4. **Performance**: N+1 queries, unnecessary loops, memory leaks
|
|
155
|
+
5. **Code Quality**: Naming, duplication, complexity, SOLID principles
|
|
156
|
+
6. **Test Coverage**: Are the changes properly tested?
|
|
157
|
+
|
|
158
|
+
For each issue found:
|
|
159
|
+
- File and line number
|
|
160
|
+
- Severity (critical/high/medium/low)
|
|
161
|
+
- What's wrong
|
|
162
|
+
- How to fix it
|
|
163
|
+
|
|
164
|
+
End with: APPROVED (no critical/high issues) or CHANGES_REQUESTED (has critical/high issues)
|
|
165
|
+
|
|
166
|
+
File: /tmp/review-diff.patch"
|
|
167
|
+
|
|
168
|
+
# For Gemini - detailed review prompt
|
|
169
|
+
gemini --print "Review this code diff as a senior engineer. Provide:
|
|
170
|
+
- Specific line-by-line feedback
|
|
171
|
+
- Security vulnerabilities with file:line references
|
|
172
|
+
- Performance concerns
|
|
173
|
+
- Code quality issues
|
|
174
|
+
- Missing test coverage
|
|
175
|
+
|
|
176
|
+
Be thorough and specific. File: /tmp/review-diff.patch"
|
|
136
177
|
```
|
|
137
178
|
|
|
179
|
+
**Large Diff Handling:**
|
|
180
|
+
- Diffs over 500 lines are automatically chunked by file
|
|
181
|
+
- Each file's changes reviewed separately
|
|
182
|
+
- Results aggregated across all chunks
|
|
183
|
+
- Alternative: truncate with warning (shows first 500 lines)
|
|
184
|
+
|
|
138
185
|
**Note:** Each CLI has its own syntax. Check `codex --help` and `gemini --help` for exact flags. The `--print` flag outputs the response without interactive mode.
|
|
139
186
|
|
|
140
187
|
**Example output:**
|