Skip to content

Commit 84cfa4c

Browse files
committed
README.md: Add AI-assisted review documentation
Document the AI review feature with Claude integration, including: - Setup instructions for Claude Code and review-prompts - Semcode integration for better context - SEMCODE_DB environment variable for sharing databases - Lore mailing list integration with -M option - Usage examples and optimization tips Replace linux-kernel with lkml/0 in examples to match standard lore.kernel.org naming convention. Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent 7672f2d commit 84cfa4c

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,70 @@ Example usages:
222222
./kernel_patch_verify -d -1
223223
```
224224
225+
Notes on AI-assisted review
226+
============================
227+
228+
AI Review with Claude
229+
---------------------
230+
231+
The tool supports AI-powered patch review using Claude and the `review-prompts`
232+
framework. This provides intelligent, context-aware reviews of complete patch series.
233+
234+
To use this feature:
235+
1. Install Claude Code: https://code.claude.com/docs/en/setup
236+
2. Install review-prompts: https://github.com/masoncl/review-prompts
237+
3. Use the `-A` option to enable AI review
238+
239+
Example:
240+
```bash
241+
# Review the last patch with AI
242+
kpv -V -L -A -1
243+
244+
# Review a complete series with AI
245+
kpv -V -L -A -b base_branch -t test_branch
246+
```
247+
248+
### Semcode Integration
249+
250+
The AI review works best with semcode indexing, which provides better context
251+
about the codebase. The tool will automatically use semcode if available.
252+
253+
You can optimize semcode database reuse by setting the `SEMCODE_DB` environment
254+
variable in your `~/.bashrc`:
255+
256+
```bash
257+
export SEMCODE_DB=/path/to/shared/semcode-db
258+
```
259+
260+
When set, the tool will create a softlink from `.semcode.db` in your kernel
261+
directory to the shared database, allowing multiple kernel trees to share the
262+
same semcode index.
263+
264+
### Lore Mailing List Integration
265+
266+
When using AI review with semcode, you can specify which kernel mailing lists
267+
to index for additional context using the `-M` option:
268+
269+
```bash
270+
# Custom lore mailing lists
271+
kpv -A -M linux-arm-kernel,lkml/0 -1
272+
273+
# Skip lore indexing (useful for repeated runs after initial indexing)
274+
kpv -A -M "" -1
275+
```
276+
277+
Default lists indexed: `linux-arm-kernel,linux-devicetree,linux-clk,linux-pm,netdev,dri-devel`
278+
279+
**Optimization tip:** Lore mailing list indexing only needs to run once to populate
280+
the semcode database. For subsequent runs on the same codebase, you can use `-M ""`
281+
to skip lore indexing and speed up the review process, as the mailing list context
282+
is already available in the database.
283+
284+
**Warning:** Do not use `-M ""` if there have been recent relevant discussions on
285+
the mailing lists related to your changes. Re-indexing ensures the AI has access
286+
to the latest conversations, bug reports, and feedback that might be relevant to
287+
your patch review.
288+
225289
Notes on patchwise
226290
==================
227291

0 commit comments

Comments
 (0)