feat: enhance search, ranking, reranker and CLI tooling across ccw and codex-lens

Major improvements to smart-search, chain-search cascade, ranking pipeline,
reranker factory, CLI history store, codex-lens integration, and uv-manager.
Simplify command-generator skill by inlining phases. Add comprehensive tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
catlog22
2026-03-16 20:35:08 +08:00
parent 1cd96b90e8
commit 5a4b18d9b1
73 changed files with 14684 additions and 2442 deletions

View File

@@ -41,6 +41,56 @@ pip install codex-lens[semantic-directml]
pip install codex-lens[full]
```
### Local ONNX Reranker Bootstrap
Use the pinned bootstrap flow when you want the local-only reranker backend in an
existing CodexLens virtual environment without asking pip to resolve the whole
project extras set at once.
1. Start from the CodexLens repo root and create or activate the project venv.
2. Review the pinned install manifest in `scripts/requirements-reranker-local.txt`.
3. Render the deterministic setup plan:
```bash
python scripts/bootstrap_reranker_local.py --dry-run
```
The bootstrap script always targets the selected venv Python, installs the local
ONNX reranker stack in a fixed order, and keeps the package set pinned to the
validated Python 3.13-compatible combination:
- `numpy==2.4.0`
- `onnxruntime==1.23.2`
- `huggingface-hub==0.36.2`
- `transformers==4.53.3`
- `optimum[onnxruntime]==2.1.0`
When you are ready to apply it to the CodexLens venv, use:
```bash
python scripts/bootstrap_reranker_local.py --apply
```
To pre-download the default local reranker model (`Xenova/ms-marco-MiniLM-L-6-v2`)
into the repo-local Hugging Face cache, use:
```bash
python scripts/bootstrap_reranker_local.py --apply --download-model
```
The dry-run plan also prints the equivalent explicit model download command. On
Windows PowerShell with the default repo venv, it looks like:
```bash
.venv/Scripts/hf.exe download Xenova/ms-marco-MiniLM-L-6-v2 --local-dir .cache/huggingface/models/Xenova--ms-marco-MiniLM-L-6-v2
```
After installation, probe the backend from the same venv:
```bash
python scripts/bootstrap_reranker_local.py --apply --probe
```
## Requirements
- Python >= 3.10