siftcode 0.3.1__tar.gz → 0.4.0__tar.gz
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.
- {siftcode-0.3.1 → siftcode-0.4.0}/PKG-INFO +154 -27
- {siftcode-0.3.1 → siftcode-0.4.0}/README.md +153 -26
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/_version.py +2 -2
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/cli.py +126 -29
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/analyzer.py +64 -8
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/config.py +71 -5
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/llm.py +147 -12
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/manual.py +28 -1
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/analyzer_view.py +12 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/settings_view.py +59 -1
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode.egg-info/PKG-INFO +154 -27
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_analyzer.py +120 -3
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_cli.py +131 -7
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_cli_extended.py +70 -53
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_config.py +153 -3
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_llm.py +191 -4
- {siftcode-0.3.1 → siftcode-0.4.0}/LICENSE +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/pyproject.toml +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/setup.cfg +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/__init__.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/__main__.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/__init__.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/cache.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/core/prompts.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/data/__init__.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/data/hicolor/128x128/apps/siftcode-logo.png +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/data/hicolor/256x256/apps/siftcode-logo.png +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/data/hicolor/48x48/apps/siftcode-logo.png +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/data/siftcode-logo.png +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/__init__.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/app.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/guide_window.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/project_list.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/widgets/__init__.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/widgets/exclusion_list.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/widgets/log_view.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/widgets/markdown_view.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/widgets/project_row.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode/gui/window.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode.egg-info/SOURCES.txt +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode.egg-info/dependency_links.txt +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode.egg-info/entry_points.txt +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode.egg-info/requires.txt +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/src/siftcode.egg-info/top_level.txt +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_cache.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_gui_analyzer.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_gui_extended.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_gui_project_list.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_gui_settings.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_gui_smoke.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_manual.py +0 -0
- {siftcode-0.3.1 → siftcode-0.4.0}/tests/test_prompts.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: siftcode
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Local LLM-powered code analysis and developer guide generator
|
|
5
5
|
Author-email: Tuomas Lähteenmäki <lahtis@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -76,7 +76,7 @@ generated in minutes.
|
|
|
76
76
|
- **Configurable per project**: model, context size, temperature, file
|
|
77
77
|
exclusions, and cache settings are all saved per project
|
|
78
78
|
- **Two front-ends**: a modern GTK4 + libadwaita GUI and a scriptable CLI
|
|
79
|
-
- **Tested**:
|
|
79
|
+
- **Tested**: 353 unit tests, 79 % overall coverage (88–100 % for core modules)
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
@@ -120,12 +120,20 @@ GPU and the model you choose.
|
|
|
120
120
|
|---|---|---|---|---|
|
|
121
121
|
| `qwen2.5-coder:7b` | ~5 GB | ~3 min | Basic | Small projects, laptops |
|
|
122
122
|
| **`qwen2.5-coder:14b`** | **~10 GB** | **~7 min** | **Good** | **Recommended default** |
|
|
123
|
-
| `qwen2.5-coder:32b` | ~22 GB | ~33 min | Excellent |
|
|
123
|
+
| `qwen2.5-coder:32b` | ~22 GB | ~33 min | Excellent | 24 GB+ GPUs, best quality |
|
|
124
|
+
|
|
125
|
+
**Quick rule of thumb by VRAM:**
|
|
126
|
+
|
|
127
|
+
- **< 8 GB** → use `7b`, or accept slow CPU-only runs
|
|
128
|
+
- **8–16 GB** → use `14b`; it's the sweet spot for most projects
|
|
129
|
+
- **24 GB+** → use `32b`. It fits comfortably (e.g. Quadro P6000,
|
|
130
|
+
RTX 3090, RTX 4090) and produces noticeably fewer hallucinations —
|
|
131
|
+
in particular it stops inventing files like `setup.py` in modern
|
|
132
|
+
`pyproject.toml` projects.
|
|
124
133
|
|
|
125
134
|
For CUDA GPUs, ensure your driver is recent enough for your Ollama
|
|
126
135
|
build. CPU-only operation works but is slow (expect 5–15× longer runs).
|
|
127
136
|
|
|
128
|
-
|
|
129
137
|
**Observations from real runs:**
|
|
130
138
|
|
|
131
139
|
- **14B** produces a comprehensive guide in ~7 minutes. It occasionally
|
|
@@ -136,38 +144,138 @@ build. CPU-only operation works but is slow (expect 5–15× longer runs).
|
|
|
136
144
|
concise and may skip smaller files.
|
|
137
145
|
- **7B** is useful for small projects or when you need a quick pass.
|
|
138
146
|
|
|
139
|
-
|
|
140
|
-
|
|
147
|
+
### Context length
|
|
148
|
+
|
|
149
|
+
The default `num_ctx` is **8192** tokens, which fits the default 14B
|
|
150
|
+
model on a 10 GB GPU comfortably.
|
|
151
|
+
|
|
152
|
+
**When to raise it:** The guide generation prompt includes the root
|
|
153
|
+
summary, all directory summaries, and all file summaries. For a
|
|
154
|
+
40-file project, this can be ~23,000 tokens. With `num_ctx=8192`,
|
|
155
|
+
Ollama truncates the context and the model may not see most of the
|
|
156
|
+
files — the guide ends up mentioning only a handful of modules.
|
|
157
|
+
|
|
158
|
+
If you have the VRAM, raise it per project:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
siftcode analyze myproject --num-ctx 32768
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Multi-model support
|
|
165
|
+
|
|
166
|
+
Different analysis stages have different needs. Per-file summaries
|
|
167
|
+
are simple tasks where a small model excels; the root summary and
|
|
168
|
+
the final guide require broader reasoning and benefit from a larger
|
|
169
|
+
model. Siftcode lets you assign a different model to each stage.
|
|
170
|
+
|
|
171
|
+
Stages: `root`, `file`, `directories`, `guide`.
|
|
172
|
+
|
|
173
|
+
**With a 24 GB GPU** (Quadro P6000, RTX 3090, RTX 4090), the best
|
|
174
|
+
configuration is:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
siftcode analyze myproject \
|
|
178
|
+
--model-stage root=qwen2.5-coder:32b \
|
|
179
|
+
--model-stage guide=qwen2.5-coder:32b
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This takes ~9 minutes instead of ~33 (32B on every file) or
|
|
183
|
+
~7 (14B everywhere), and gives most of the quality benefit: the
|
|
184
|
+
32B model handles the two stages where its broader reasoning
|
|
185
|
+
matters most, while 14B handles the file summaries where speed
|
|
186
|
+
matters more than depth.
|
|
187
|
+
|
|
188
|
+
Persist the configuration so you don't have to type it every
|
|
189
|
+
time — the stage overrides are saved to the project's TOML file:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
siftcode analyze myproject --model-stage guide=qwen2.5-coder:32b
|
|
193
|
+
siftcode show myproject
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
Model:
|
|
198
|
+
Name: qwen2.5-coder:14b
|
|
199
|
+
Stages:
|
|
200
|
+
root (default)
|
|
201
|
+
file (default)
|
|
202
|
+
directories (default)
|
|
203
|
+
guide qwen2.5-coder:32b
|
|
204
|
+
Ollama URL: http://127.0.0.1:11434
|
|
205
|
+
num_ctx: 8192
|
|
206
|
+
spec_num_ctx: 16384
|
|
207
|
+
temperature: 0.0
|
|
208
|
+
timeout: 600s
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
You can also edit the TOML directly:
|
|
212
|
+
```toml
|
|
213
|
+
[model]
|
|
214
|
+
name = "qwen2.5-coder:14b"
|
|
215
|
+
|
|
216
|
+
[model.stages]
|
|
217
|
+
root = "qwen2.5-coder:32b"
|
|
218
|
+
guide = "qwen2.5-coder:32b"
|
|
219
|
+
```
|
|
220
|
+
How the cache behaves: the cache is keyed per model, so
|
|
221
|
+
switching a single stage's model does not invalidate the other
|
|
222
|
+
stages' cached results. If you later re-run with the same stage
|
|
223
|
+
models, the previous summaries are reused — you only pay for the
|
|
224
|
+
stages you actually changed.
|
|
225
|
+
|
|
226
|
+
Shortcut: to use the same model for every stage, use --model:
|
|
227
|
+
```bash
|
|
228
|
+
siftcode analyze myproject --model qwen2.5-coder:32b
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Tip — keeping both models loaded:** If you have enough VRAM to
|
|
232
|
+
hold both 14B and 32B simultaneously (~32 GB VRAM total), you can
|
|
233
|
+
avoid model reloads between stages:
|
|
141
234
|
|
|
142
235
|
```bash
|
|
143
236
|
export OLLAMA_MAX_LOADED_MODELS=2
|
|
144
237
|
export OLLAMA_KV_CACHE_TYPE=q8_0
|
|
145
238
|
```
|
|
146
239
|
|
|
147
|
-
|
|
148
|
-
guide without reloading models from disk.
|
|
240
|
+
---
|
|
149
241
|
|
|
150
|
-
|
|
151
|
-
build. CPU-only operation works but is slow (expect 5–15× longer runs).
|
|
242
|
+
### Advanced per-file specifications (`--advanced`)
|
|
152
243
|
|
|
153
|
-
|
|
244
|
+
The `--advanced` flag generates a detailed technical specification for
|
|
245
|
+
each source file instead of the usual developer guide. Specs are much
|
|
246
|
+
longer than regular file summaries, so they use a separate context
|
|
247
|
+
length: `spec_num_ctx` (default **16384**).
|
|
154
248
|
|
|
155
|
-
|
|
249
|
+
**On a 24 GB GPU**, 32B Q4_K_M plus a 16k KV cache is right at the
|
|
250
|
+
VRAM limit — Ollama offloads ~4% of the model to the CPU, which roughly
|
|
251
|
+
doubles the run time. Lowering the spec context to 12k keeps the whole
|
|
252
|
+
model on the GPU:
|
|
156
253
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
modules.
|
|
254
|
+
```bash
|
|
255
|
+
siftcode analyze myproject --advanced \
|
|
256
|
+
--model-stage file=qwen2.5-coder:32b \
|
|
257
|
+
--spec-num-ctx 12288
|
|
258
|
+
```
|
|
163
259
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
`cache.py`, `cli.py`, and all GUI views.
|
|
260
|
+
Verify with `ollama ps`: the `PROCESSOR` column should read `100% GPU`.
|
|
261
|
+
If it shows any CPU percentage, lower `--spec-num-ctx` further
|
|
262
|
+
(10240, 8192) until the model fits entirely on the GPU.
|
|
168
263
|
|
|
169
|
-
|
|
170
|
-
|
|
264
|
+
`spec_num_ctx` is saved per project, so you only need the flag once:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
siftcode analyze myproject --advanced \
|
|
268
|
+
--model-stage file=qwen2.5-coder:32b \
|
|
269
|
+
--spec-num-ctx 12288
|
|
270
|
+
siftcode show myproject
|
|
271
|
+
# → spec_num_ctx: 12288
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
> **Note:** `--advanced` mode with a 32B model is very slow (one
|
|
275
|
+
> document per file, each taking 10+ minutes on a 24 GB GPU). For
|
|
276
|
+
> projects with more than ~10 files, use the default 14B model:
|
|
277
|
+
>
|
|
278
|
+
> siftcode analyze myproject --advanced
|
|
171
279
|
|
|
172
280
|
---
|
|
173
281
|
|
|
@@ -191,8 +299,6 @@ pip install -e ".[dev]"
|
|
|
191
299
|
|
|
192
300
|
```bash
|
|
193
301
|
siftcode --version
|
|
194
|
-
|
|
195
|
-
|
|
196
302
|
siftcode about
|
|
197
303
|
# → prints version, author, and license
|
|
198
304
|
```
|
|
@@ -248,6 +354,11 @@ siftcode analyze "My Project" --output ~/siftcode-output
|
|
|
248
354
|
# Analyze it with advanced per-file technical specifications
|
|
249
355
|
siftcode analyze "My Project" --output ~/siftcode-output --advanced
|
|
250
356
|
|
|
357
|
+
# Advanced + multi-model: 32B for specs, 14B for the rest
|
|
358
|
+
siftcode analyze "My Project" --advanced \
|
|
359
|
+
--model-stage file=qwen2.5-coder:32b \
|
|
360
|
+
--spec-num-ctx 12288
|
|
361
|
+
|
|
251
362
|
# Delete a project
|
|
252
363
|
siftcode delete "My Project"
|
|
253
364
|
```
|
|
@@ -272,7 +383,7 @@ siftcode cache gc --days 30 # prune entries unused for 30 days
|
|
|
272
383
|
|
|
273
384
|
### Output
|
|
274
385
|
|
|
275
|
-
Analysis produces
|
|
386
|
+
Analysis produces these files in the output directory:
|
|
276
387
|
|
|
277
388
|
- `findings_<project>_<timestamp>.json` — raw structured findings (root, directories, files, errors)
|
|
278
389
|
- `guide_<project>_<timestamp>.md` — the generated developer guide
|
|
@@ -308,6 +419,22 @@ human-readable and can be edited by hand if you prefer.
|
|
|
308
419
|
|
|
309
420
|
---
|
|
310
421
|
|
|
422
|
+
### Default exclusions
|
|
423
|
+
|
|
424
|
+
The default exclusion list already covers:
|
|
425
|
+
|
|
426
|
+
- Version control directories (`.git`, `.venv`, `node_modules`)
|
|
427
|
+
- Build artifacts (`build`, `dist`, `.pytest_cache`)
|
|
428
|
+
- Documentation directories (`docs`, `doc`)
|
|
429
|
+
- Binary file suffixes (`.png`, `.jpg`, `.zip`, `.so`)
|
|
430
|
+
- **Database files** (`.sqlite`, `.sqlite3`, `.db`, `.db3`, `.mdb`)
|
|
431
|
+
- Editor configs (`.editorconfig`, `.env`)
|
|
432
|
+
|
|
433
|
+
You can add or remove patterns per project from the GUI, or by editing
|
|
434
|
+
the `analysis.exclude` list in the project's TOML file.
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
311
438
|
## How it works
|
|
312
439
|
|
|
313
440
|
1. **Root analysis** — the LLM sees the project tree and infers the
|
|
@@ -43,7 +43,7 @@ generated in minutes.
|
|
|
43
43
|
- **Configurable per project**: model, context size, temperature, file
|
|
44
44
|
exclusions, and cache settings are all saved per project
|
|
45
45
|
- **Two front-ends**: a modern GTK4 + libadwaita GUI and a scriptable CLI
|
|
46
|
-
- **Tested**:
|
|
46
|
+
- **Tested**: 353 unit tests, 79 % overall coverage (88–100 % for core modules)
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -87,12 +87,20 @@ GPU and the model you choose.
|
|
|
87
87
|
|---|---|---|---|---|
|
|
88
88
|
| `qwen2.5-coder:7b` | ~5 GB | ~3 min | Basic | Small projects, laptops |
|
|
89
89
|
| **`qwen2.5-coder:14b`** | **~10 GB** | **~7 min** | **Good** | **Recommended default** |
|
|
90
|
-
| `qwen2.5-coder:32b` | ~22 GB | ~33 min | Excellent |
|
|
90
|
+
| `qwen2.5-coder:32b` | ~22 GB | ~33 min | Excellent | 24 GB+ GPUs, best quality |
|
|
91
|
+
|
|
92
|
+
**Quick rule of thumb by VRAM:**
|
|
93
|
+
|
|
94
|
+
- **< 8 GB** → use `7b`, or accept slow CPU-only runs
|
|
95
|
+
- **8–16 GB** → use `14b`; it's the sweet spot for most projects
|
|
96
|
+
- **24 GB+** → use `32b`. It fits comfortably (e.g. Quadro P6000,
|
|
97
|
+
RTX 3090, RTX 4090) and produces noticeably fewer hallucinations —
|
|
98
|
+
in particular it stops inventing files like `setup.py` in modern
|
|
99
|
+
`pyproject.toml` projects.
|
|
91
100
|
|
|
92
101
|
For CUDA GPUs, ensure your driver is recent enough for your Ollama
|
|
93
102
|
build. CPU-only operation works but is slow (expect 5–15× longer runs).
|
|
94
103
|
|
|
95
|
-
|
|
96
104
|
**Observations from real runs:**
|
|
97
105
|
|
|
98
106
|
- **14B** produces a comprehensive guide in ~7 minutes. It occasionally
|
|
@@ -103,38 +111,138 @@ build. CPU-only operation works but is slow (expect 5–15× longer runs).
|
|
|
103
111
|
concise and may skip smaller files.
|
|
104
112
|
- **7B** is useful for small projects or when you need a quick pass.
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
### Context length
|
|
115
|
+
|
|
116
|
+
The default `num_ctx` is **8192** tokens, which fits the default 14B
|
|
117
|
+
model on a 10 GB GPU comfortably.
|
|
118
|
+
|
|
119
|
+
**When to raise it:** The guide generation prompt includes the root
|
|
120
|
+
summary, all directory summaries, and all file summaries. For a
|
|
121
|
+
40-file project, this can be ~23,000 tokens. With `num_ctx=8192`,
|
|
122
|
+
Ollama truncates the context and the model may not see most of the
|
|
123
|
+
files — the guide ends up mentioning only a handful of modules.
|
|
124
|
+
|
|
125
|
+
If you have the VRAM, raise it per project:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
siftcode analyze myproject --num-ctx 32768
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Multi-model support
|
|
132
|
+
|
|
133
|
+
Different analysis stages have different needs. Per-file summaries
|
|
134
|
+
are simple tasks where a small model excels; the root summary and
|
|
135
|
+
the final guide require broader reasoning and benefit from a larger
|
|
136
|
+
model. Siftcode lets you assign a different model to each stage.
|
|
137
|
+
|
|
138
|
+
Stages: `root`, `file`, `directories`, `guide`.
|
|
139
|
+
|
|
140
|
+
**With a 24 GB GPU** (Quadro P6000, RTX 3090, RTX 4090), the best
|
|
141
|
+
configuration is:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
siftcode analyze myproject \
|
|
145
|
+
--model-stage root=qwen2.5-coder:32b \
|
|
146
|
+
--model-stage guide=qwen2.5-coder:32b
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
This takes ~9 minutes instead of ~33 (32B on every file) or
|
|
150
|
+
~7 (14B everywhere), and gives most of the quality benefit: the
|
|
151
|
+
32B model handles the two stages where its broader reasoning
|
|
152
|
+
matters most, while 14B handles the file summaries where speed
|
|
153
|
+
matters more than depth.
|
|
154
|
+
|
|
155
|
+
Persist the configuration so you don't have to type it every
|
|
156
|
+
time — the stage overrides are saved to the project's TOML file:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
siftcode analyze myproject --model-stage guide=qwen2.5-coder:32b
|
|
160
|
+
siftcode show myproject
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
Model:
|
|
165
|
+
Name: qwen2.5-coder:14b
|
|
166
|
+
Stages:
|
|
167
|
+
root (default)
|
|
168
|
+
file (default)
|
|
169
|
+
directories (default)
|
|
170
|
+
guide qwen2.5-coder:32b
|
|
171
|
+
Ollama URL: http://127.0.0.1:11434
|
|
172
|
+
num_ctx: 8192
|
|
173
|
+
spec_num_ctx: 16384
|
|
174
|
+
temperature: 0.0
|
|
175
|
+
timeout: 600s
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
You can also edit the TOML directly:
|
|
179
|
+
```toml
|
|
180
|
+
[model]
|
|
181
|
+
name = "qwen2.5-coder:14b"
|
|
182
|
+
|
|
183
|
+
[model.stages]
|
|
184
|
+
root = "qwen2.5-coder:32b"
|
|
185
|
+
guide = "qwen2.5-coder:32b"
|
|
186
|
+
```
|
|
187
|
+
How the cache behaves: the cache is keyed per model, so
|
|
188
|
+
switching a single stage's model does not invalidate the other
|
|
189
|
+
stages' cached results. If you later re-run with the same stage
|
|
190
|
+
models, the previous summaries are reused — you only pay for the
|
|
191
|
+
stages you actually changed.
|
|
192
|
+
|
|
193
|
+
Shortcut: to use the same model for every stage, use --model:
|
|
194
|
+
```bash
|
|
195
|
+
siftcode analyze myproject --model qwen2.5-coder:32b
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Tip — keeping both models loaded:** If you have enough VRAM to
|
|
199
|
+
hold both 14B and 32B simultaneously (~32 GB VRAM total), you can
|
|
200
|
+
avoid model reloads between stages:
|
|
108
201
|
|
|
109
202
|
```bash
|
|
110
203
|
export OLLAMA_MAX_LOADED_MODELS=2
|
|
111
204
|
export OLLAMA_KV_CACHE_TYPE=q8_0
|
|
112
205
|
```
|
|
113
206
|
|
|
114
|
-
|
|
115
|
-
guide without reloading models from disk.
|
|
207
|
+
---
|
|
116
208
|
|
|
117
|
-
|
|
118
|
-
build. CPU-only operation works but is slow (expect 5–15× longer runs).
|
|
209
|
+
### Advanced per-file specifications (`--advanced`)
|
|
119
210
|
|
|
120
|
-
|
|
211
|
+
The `--advanced` flag generates a detailed technical specification for
|
|
212
|
+
each source file instead of the usual developer guide. Specs are much
|
|
213
|
+
longer than regular file summaries, so they use a separate context
|
|
214
|
+
length: `spec_num_ctx` (default **16384**).
|
|
121
215
|
|
|
122
|
-
|
|
216
|
+
**On a 24 GB GPU**, 32B Q4_K_M plus a 16k KV cache is right at the
|
|
217
|
+
VRAM limit — Ollama offloads ~4% of the model to the CPU, which roughly
|
|
218
|
+
doubles the run time. Lowering the spec context to 12k keeps the whole
|
|
219
|
+
model on the GPU:
|
|
123
220
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
modules.
|
|
221
|
+
```bash
|
|
222
|
+
siftcode analyze myproject --advanced \
|
|
223
|
+
--model-stage file=qwen2.5-coder:32b \
|
|
224
|
+
--spec-num-ctx 12288
|
|
225
|
+
```
|
|
130
226
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
`cache.py`, `cli.py`, and all GUI views.
|
|
227
|
+
Verify with `ollama ps`: the `PROCESSOR` column should read `100% GPU`.
|
|
228
|
+
If it shows any CPU percentage, lower `--spec-num-ctx` further
|
|
229
|
+
(10240, 8192) until the model fits entirely on the GPU.
|
|
135
230
|
|
|
136
|
-
|
|
137
|
-
|
|
231
|
+
`spec_num_ctx` is saved per project, so you only need the flag once:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
siftcode analyze myproject --advanced \
|
|
235
|
+
--model-stage file=qwen2.5-coder:32b \
|
|
236
|
+
--spec-num-ctx 12288
|
|
237
|
+
siftcode show myproject
|
|
238
|
+
# → spec_num_ctx: 12288
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
> **Note:** `--advanced` mode with a 32B model is very slow (one
|
|
242
|
+
> document per file, each taking 10+ minutes on a 24 GB GPU). For
|
|
243
|
+
> projects with more than ~10 files, use the default 14B model:
|
|
244
|
+
>
|
|
245
|
+
> siftcode analyze myproject --advanced
|
|
138
246
|
|
|
139
247
|
---
|
|
140
248
|
|
|
@@ -158,8 +266,6 @@ pip install -e ".[dev]"
|
|
|
158
266
|
|
|
159
267
|
```bash
|
|
160
268
|
siftcode --version
|
|
161
|
-
|
|
162
|
-
|
|
163
269
|
siftcode about
|
|
164
270
|
# → prints version, author, and license
|
|
165
271
|
```
|
|
@@ -215,6 +321,11 @@ siftcode analyze "My Project" --output ~/siftcode-output
|
|
|
215
321
|
# Analyze it with advanced per-file technical specifications
|
|
216
322
|
siftcode analyze "My Project" --output ~/siftcode-output --advanced
|
|
217
323
|
|
|
324
|
+
# Advanced + multi-model: 32B for specs, 14B for the rest
|
|
325
|
+
siftcode analyze "My Project" --advanced \
|
|
326
|
+
--model-stage file=qwen2.5-coder:32b \
|
|
327
|
+
--spec-num-ctx 12288
|
|
328
|
+
|
|
218
329
|
# Delete a project
|
|
219
330
|
siftcode delete "My Project"
|
|
220
331
|
```
|
|
@@ -239,7 +350,7 @@ siftcode cache gc --days 30 # prune entries unused for 30 days
|
|
|
239
350
|
|
|
240
351
|
### Output
|
|
241
352
|
|
|
242
|
-
Analysis produces
|
|
353
|
+
Analysis produces these files in the output directory:
|
|
243
354
|
|
|
244
355
|
- `findings_<project>_<timestamp>.json` — raw structured findings (root, directories, files, errors)
|
|
245
356
|
- `guide_<project>_<timestamp>.md` — the generated developer guide
|
|
@@ -275,6 +386,22 @@ human-readable and can be edited by hand if you prefer.
|
|
|
275
386
|
|
|
276
387
|
---
|
|
277
388
|
|
|
389
|
+
### Default exclusions
|
|
390
|
+
|
|
391
|
+
The default exclusion list already covers:
|
|
392
|
+
|
|
393
|
+
- Version control directories (`.git`, `.venv`, `node_modules`)
|
|
394
|
+
- Build artifacts (`build`, `dist`, `.pytest_cache`)
|
|
395
|
+
- Documentation directories (`docs`, `doc`)
|
|
396
|
+
- Binary file suffixes (`.png`, `.jpg`, `.zip`, `.so`)
|
|
397
|
+
- **Database files** (`.sqlite`, `.sqlite3`, `.db`, `.db3`, `.mdb`)
|
|
398
|
+
- Editor configs (`.editorconfig`, `.env`)
|
|
399
|
+
|
|
400
|
+
You can add or remove patterns per project from the GUI, or by editing
|
|
401
|
+
the `analysis.exclude` list in the project's TOML file.
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
278
405
|
## How it works
|
|
279
406
|
|
|
280
407
|
1. **Root analysis** — the LLM sees the project tree and infers the
|
|
@@ -38,9 +38,9 @@ __all__ = [
|
|
|
38
38
|
]
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
__version__ = "0.
|
|
41
|
+
__version__ = "0.4.0"
|
|
42
42
|
__version_info__ = tuple(int(p) for p in __version__.split(".") if p.isdigit())
|
|
43
|
-
__release_date__ = "2026-
|
|
43
|
+
__release_date__ = "2026-11-12"
|
|
44
44
|
__status__ = "beta"
|
|
45
45
|
|
|
46
46
|
APP_ID = "io.codeberg.lahtis.Siftcode"
|