LIBRA v1: scanner/extractor/Nimble classifier/safety gate/approval UI/op log/undo/dupe hold

This commit is contained in:
drjones
2026-10-04 22:05:12 -07:00
commit 4e38f7257e
5 changed files with 776 additions and 0 deletions

26
README.md Normal file
View File

@@ -0,0 +1,26 @@
# LIBRA ♎ — the Scales. Nimble-classified file librarian.
Nimble is the classification brain; deterministic Python touches the filesystem.
Nothing moves without your click. Every move is logged and one-click reversible.
## Pipeline
scan → sha256 hash (deterministic dup detection) → content extract (pdf/zip/text/images) →
Nimble structured JSON classification (think:false, strict enums) → safety validate →
review plan UI → apply (dry-run default) → immutable op log → undo session.
## Run
```
python3 ~/libra/app.py # http://127.0.0.1:5731
```
Requires: flask, pypdf (optional: Pillow). Nimble served by Ollama on nightmare (10.30.20.29:11434, model nimble:latest).
## Safety gates
- No system paths, no symlinks, no overwrite (auto-suffix).
- Confidence gate (tunable) — below threshold → REVIEW.
- Duplicates are sha256-verified only; extras go to ~/libra/dupe_hold/, never deleted.
- Every operation logged with src/dst/sha256; sessions undoable.
## Layout
- app.py — everything (scanner, extractor, classifier, safety, organizer, UI)
- taxonomy.yaml — editable destination map (class+subject → folder)
- libra.db — SQLite index of files, operations, sessions