@djibrilm/lazy-review 0.0.2 → 0.0.3
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.
- package/README.md +63 -49
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,43 +1,50 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="
|
|
2
|
+
<img src="https://github.com/DjibrilM/lazy-review/raw/develop/frontend/public/resources/images/logo.png" width="200" alt="Lazy Review Logo">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
# Lazy Review
|
|
5
|
+
# Lazy Review — PR Review Assistant
|
|
6
6
|
|
|
7
|
-
A
|
|
7
|
+
A CLI tool that reviews GitHub pull requests using local AI models. Point it at a repository, select a PR, and it posts a structured review comment back to GitHub — no cloud inference, no API keys beyond GitHub OAuth.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Overview
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Lazy Review fetches PR diffs from GitHub and runs them through a multi-agent pipeline on your machine. The output is a structured GitHub PR review comment with categorized findings (`approve` / `request_changes` / `comment`), severity scores, and file-level annotations.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
It uses two models:
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
- A coding LLM (~5 GB RAM) for review generation
|
|
16
|
+
- An embedding model (~2 GB RAM) for semantic codebase search
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
- **Specialist Reviewer** — investigates the PR through a specific lens, forming hypotheses without reading raw files directly
|
|
19
|
-
- **Repository Explorer** — a sub-agent with deterministic file tools (`read_file`, `search_symbol`, `semantic_search`) that the Reviewer delegates evidence-gathering to
|
|
20
|
-
- **Finding Verifier** — acts as a red team. Before anything is reported, it actively tries to _disprove_ each finding by searching for cleanup handlers, timeouts, or lifecycle methods that would make the issue impossible
|
|
21
|
-
- **Secret Scanner** — scans diff file names for sensitive candidates (`.env`, private keys, credential bundles), then reads the actual diff content to confirm before flagging anything
|
|
18
|
+
Both are downloaded and managed via the [QVAC SDK](https://www.npmjs.com/package/@qvac/sdk).
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
## Review pipeline
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
A review goes through five sequential stages:
|
|
26
23
|
|
|
27
|
-
**
|
|
24
|
+
1. **Change Analyzer** — classifies the PR diff and selects which specialist reviewers are needed (e.g. `security`, `performance`, `concurrency`, `correctness`, `architecture`, `maintainability`)
|
|
25
|
+
2. **Specialist Reviewers** — each runs a ReAct loop, forming hypotheses and querying the Repository Explorer for evidence rather than reading files directly
|
|
26
|
+
3. **Repository Explorer** — a sub-agent with deterministic tools (`read_file`, `search_symbol`, `semantic_search`) that answers evidence queries from the Specialist Reviewers
|
|
27
|
+
4. **Finding Verifier** — receives each candidate finding and attempts to disprove it by searching for cleanup handlers, timeouts, or lifecycle methods that would make the issue a false positive
|
|
28
|
+
5. **Secret Scanner** — independently scans diff file names for sensitive candidates (`.env`, private keys, credential bundles), reads the actual diff content to confirm before reporting
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
Confirmed findings are deduplicated by a hash of their text and location, ranked by `Impact × Likelihood`, and included in the final review verdict (`approve` / `request_changes` / `comment`).
|
|
30
31
|
|
|
31
|
-
##
|
|
32
|
+
## Codebase indexing
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
When you add a repository, Lazy Review scans the source tree and builds a local vector index. It:
|
|
35
|
+
|
|
36
|
+
- Parses symbols from TypeScript, JavaScript, Python, Rust, and Go files using Tree-sitter
|
|
37
|
+
- Chunks content at safe token boundaries (the embedding model has a 512-token context window)
|
|
38
|
+
- Stores embeddings in SQLite using the `sqlite-vec` extension
|
|
39
|
+
|
|
40
|
+
The index is used during reviews to provide semantic context to the agents.
|
|
41
|
+
|
|
42
|
+
## Tool-call parsing
|
|
43
|
+
|
|
44
|
+
Local models don't always return well-structured tool calls. The agent loop handles two fallback cases:
|
|
45
|
+
|
|
46
|
+
- A regex parser for non-standard formats (e.g. the `<|tool_call|>` dialect used by some quantized models)
|
|
47
|
+
- Tool results from fallback-parsed calls are injected as `user` messages to avoid strict API validation errors
|
|
41
48
|
|
|
42
49
|
## Tech stack
|
|
43
50
|
|
|
@@ -53,36 +60,31 @@ It connects to GitHub to fetch your PRs, runs a multi-agent review pipeline agai
|
|
|
53
60
|
|
|
54
61
|
## Hardware requirements
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
Tested on a Mac Mini (Apple Silicon). You need ~7 GB of free RAM to hold both models simultaneously:
|
|
57
64
|
|
|
58
|
-
| Model | RAM
|
|
59
|
-
| --------------- |
|
|
60
|
-
| Coding LLM | ~5 GB
|
|
61
|
-
| Embedding Model | ~2 GB
|
|
62
|
-
| **Total** | **~7 GB free** |
|
|
65
|
+
| Model | RAM |
|
|
66
|
+
| --------------- | ----- |
|
|
67
|
+
| Coding LLM | ~5 GB |
|
|
68
|
+
| Embedding Model | ~2 GB |
|
|
63
69
|
|
|
64
|
-
|
|
70
|
+
Since the models alone take up around 7 GB and other computer operations also need space, a good environment should have around 12 GB to 16 GB of total RAM.
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
GPU inference can be toggled in Settings. If the app crashes during model initialization (common on older GPUs), switch to CPU inference.
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
## Installation
|
|
75
|
+
|
|
76
|
+
### From npm
|
|
69
77
|
|
|
70
78
|
```bash
|
|
71
79
|
npm install -g @djibrilm/lazy-review
|
|
72
80
|
lrv run
|
|
73
81
|
```
|
|
74
82
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
You can also specify a custom port:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
lazy-review run --port 8080
|
|
81
|
-
```
|
|
83
|
+
Starts the server on `http://localhost:16500`.
|
|
82
84
|
|
|
83
|
-
###
|
|
85
|
+
### From source
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
Requires Node.js 18+ and pnpm.
|
|
86
88
|
|
|
87
89
|
```bash
|
|
88
90
|
git clone https://github.com/djibrilm/lazy-review
|
|
@@ -91,14 +93,26 @@ pnpm install
|
|
|
91
93
|
pnpm run dev
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
This starts the Express
|
|
96
|
+
This starts both the Express server (port `16500`) and the Vite dev server concurrently.
|
|
97
|
+
|
|
98
|
+
## CLI Commands
|
|
99
|
+
|
|
100
|
+
The CLI is available as either `lazy-review` or the `lrv` shorthand.
|
|
101
|
+
|
|
102
|
+
### `run`
|
|
103
|
+
|
|
104
|
+
Starts the Lazy Review server.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
lrv run
|
|
108
|
+
```
|
|
95
109
|
|
|
96
|
-
##
|
|
110
|
+
## Setup
|
|
97
111
|
|
|
98
|
-
1.
|
|
99
|
-
2.
|
|
100
|
-
3. Add a repository from the dashboard. Lazy Review will clone it and index the codebase
|
|
101
|
-
4.
|
|
112
|
+
1. Open Settings → Local AI Models and download both models.
|
|
113
|
+
2. Open Settings → GitHub Authentication and connect your GitHub account.
|
|
114
|
+
3. Add a repository from the dashboard. Lazy Review will clone it and index the codebase.
|
|
115
|
+
4. Select a PR from the repository view and run a review.
|
|
102
116
|
|
|
103
117
|
## License
|
|
104
118
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@djibrilm/lazy-review",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "",
|
|
6
6
|
"bin": {
|
|
7
7
|
"lazy-review": "./dist/bin.js",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"link": "pnpm run postbuild && pnpm run prod:build && pnpm link --global",
|
|
92
92
|
"link-watch": "nodemon --watch dist --ext js --exec \"pnpm link --global\"",
|
|
93
93
|
"lint": "eslint \"src/**/*.ts\"",
|
|
94
|
-
"format": "prettier --write \"**/*.{ts,js,json,md}\""
|
|
94
|
+
"format": "prettier --write \"**/*.{ts,js,json,md}\"",
|
|
95
|
+
"release": "pnpm run prod:build && pnpm publish --access public"
|
|
95
96
|
}
|
|
96
97
|
}
|