Add comprehensive developer README for remote cloning

This commit is contained in:
2026-10-21 14:29:41 +02:00
parent 3af9892d28
commit 5b10db5537
+45
View File
@@ -0,0 +1,45 @@
# Legal Shield Engine
Local-first, deterministic utility bill auditing and contradiction engine for German rental law (BGB, BetrKV, BGH jurisprudence).
## Philosophy & Architecture
- **Zero Cloud / Local-First:** Designed to run self-hosted (Docker / CLI).
- **Separation of Concerns:**
- **LLM Layer:** Used strictly as an unformatted OCR-to-JSON text extractor.
- **Deterministic Rule Engine:** Hardcoded Python logic executing strict statutory rules (no LLM hallucinations in legal decision-making).
- **Evidence-Based:** Cross-references lease agreements, prior bills, and municipal utility tax notices against statutory allocation keys.
---
## Project Structure
```
legal_shield/
├── models.py # Dataclasses for LeaseContext, BillPeriod, CostItem, AuditViolation
├── rules.py # Statutory rules (Grundsteuer proportionality, BetrKV exclusions)
├── reconciler.py # Multi-year reconciliation & offsetting (§ 387 BGB)
├── generator.py # DIN 5008 formal legal objection letter generator
└── engine_v2.py # Main CLI auditor connecting to Paperless-ngx API
```
---
## Quickstart & Development
### Prerequisites
- Python 3.11+
- Access to a Paperless-ngx instance (or local JSON backup)
- OpenRouter API key (for structured text extraction)
### Installation
```bash
git clone https://git.infra.mintel.me/mmintel/legal-shield.git
cd legal-shield
pip install requests
```
### Running the Audit
```bash
python3 legal_shield/engine_v2.py
```