# Sossego · a little less sorting

A new project for DEV Hacktoberfest 2026 Week 3: **Slow and Steady**. Started October 19, 2026, inside the entry period. English/Portuguese interface. Application code MIT, Bruno Fernandes.

**Demo:** https://brunof94-debug.github.io/sossego-week3/

## Use it

1. Try the fictional messy folder, or add your own supported documents.
2. Find their places. First use downloads about 125 MB of open model data. No document content is sent to a server.
3. Inspect suggestions and the extracted text. Change a folder or keep an omitted copy if you want.
4. Download an organized ZIP with the original bytes in folders and a JSON plan. Originals on your device are untouched. Review files are included under Review/, not silently discarded.

Folders: Money, Work, Home, Learning and Travel, plus Review. Exact-byte copies are initially omitted using SHA-256; near-duplicate detection is not provided. Same-name different-content files remain distinct, and colliding export names receive numeric suffixes.

## Open inference

Transformers.js 3.8.1 runs **Xenova/paraphrase-multilingual-MiniLM-L12-v2**, revision `2c4055b12046f11709e9df2c122e59ffbdc2f900`, q8, in a browser worker using ONNX Runtime WASM (one CPU thread). Mean-pooled normalized embeddings compare document content with two authored bilingual examples per folder. Multiple text excerpts are averaged for longer documents. The filename is excluded from model input. Top similarity below 0.28 or top-two margin below 0.045 sends the file to Review. These are heuristics, not calibrated probabilities or a guarantee of correct filing. User-selected folders override suggestions.

The model creates folder suggestions; ordinary code extracts text, checks exact duplicates, names paths and packages files. There is no simulated inference or silent keyword fallback. If the model cannot load, manual filing still works and the interface reports the failure.

## Scope and privacy

TXT, MD, CSV, JSON and text-based PDFs. UTF-8 text. Up to 24 files, 6 MB each, 40 MB total. PDFs use the first 5 pages; text is bounded to 12,000 characters, with short excerpts used for embeddings. Scanned/encrypted/unreadable PDFs need manual filing. No OCR, Office parser, image recognition, filesystem watching or automatic original-file moves. Files are inert text, never instructions to execute.

Documents live only in page memory and are released when the page is closed or the batch is cleared. This is not a secure erasure guarantee. The chosen language persists in localStorage. Normal app/asset requests go to the host; model requests go to Hugging Face and its download CDN. Those services see normal request metadata. No analytics, account, inference API or content-upload endpoint is used. Exported ZIPs include chosen files, names, hashes and model/manual decisions; share them deliberately.

App offline caching is opt-in. Model downloads are separately cached by Transformers.js. Offline operation needs both caches to remain available. Storage eviction, private browsing and browser changes may remove them. The model is pinned; browser/runtime performance can vary. Mobile memory limits can prevent loading; manual filing remains available.

## Develop

Node 22+:

```
npm ci
npm test
npm run build
npm start
```

Preview: http://127.0.0.1:4337/ . GitHub Actions installs the locked dependencies, runs deterministic checks, builds the static site and publishes GitHub Pages. Model weights stay at a pinned Hugging Face revision, outside the Git repository. Build emits asset-manifest.json with SHA-256 hashes.

## Verification

See `VERIFICATION.md` for actual model/browser observations and `evaluation-results.json` for the synthetic experiment when generated. Authored expected labels in samples.mjs never enter the inference request. This demonstration is small and not a representative accuracy study. No customers, revenue or measured human time savings are claimed.

Codex assisted implementation, documentation and testing. See THIRD_PARTY_NOTICES.md for the open components and their licenses. This project does not claim Copilot code generation.
