Files
breakpilot-core/document-templates/README.md
Benjamin Admin bc23c6815a docs: README aktualisiert — BV + FRIA Templates + Domain-Risiken
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 07:05:05 +02:00

85 lines
3.4 KiB
Markdown

# Document Templates V2
Erweiterte Compliance-Vorlagen (DSFA, TOM, VVT, AVV, BV, FRIA) fuer den BreakPilot Document Generator.
**Branch:** `feature/betriebsrat-compliance-module`
**Ziel-Integration:** breakpilot-compliance (nach Abschluss des Refactoring)
**Datenbank:** `compliance.compliance_legal_templates` (shared PostgreSQL)
## Inhalt
### SQL Migrations (`migrations/`)
| Datei | Typ | Beschreibung |
|-------|-----|--------------|
| `001_dsfa_template_v2.sql` | DSFA | Schwellwertanalyse (WP248), SDM-TOM, KI-Modul, ~60 Placeholders |
| `002_tom_sdm_template.sql` | TOM | 7 SDM-Gewaehrleistungsziele, Sektorbloecke, Compliance-Bewertung |
| `003_vvt_sector_templates.sql` | VVT | 6 Branchen-Muster (IT/SaaS, Gesundheit, Handel, Handwerk, Bildung, Beratung) |
| `004_avv_template.sql` | AVV | Auftragsverarbeitungsvertrag Art. 28, 12 Sections, TOM-Anlage |
| `005_additional_templates.sql` | Div. | Verpflichtungserklaerung + Art. 13/14 Informationspflichten |
| `006_betriebsvereinbarung_template.sql` | BV | Betriebsvereinbarung §87 BetrVG, 13 Sektionen (A-M), KI/IT-Systeme |
| `007_fria_template.sql` | FRIA | Grundrechte-Folgenabschaetzung Art. 27 AI Act, 8 Sektionen |
### Python Generators (`generators/`)
| Datei | Beschreibung |
|-------|--------------|
| `dsfa_template.py` | DSFA-Generator mit Schwellwertanalyse, Bundesland-Mapping, SDM-TOM, Art. 36, Domain-Risiken (HR/Edu/HC/Finance) |
| `tom_template.py` | TOM-Generator mit SDM-Struktur, NIS2/ISO27001/AI Act Erweiterungen, Sektoren |
| `vvt_template.py` | VVT-Generator mit 6 Branchen-Katalogen, Art. 30 Validierung |
| `betriebsvereinbarung_template.py` | BV-Generator mit TOM-Befuellung, Konflikt-Score-basierte Schutzklauseln |
| `fria_template.py` | FRIA-Generator mit Domain→Grundrechte-Mapping (6 Domains), Risikomatrix |
### Scripts (`scripts/`)
| Datei | Beschreibung |
|-------|--------------|
| `cleanup_temp_vorlagen.py` | Loescht temporaere DPA-Vorlagen aus Qdrant (`temp_vorlagen=true`) |
## Integration in breakpilot-compliance
### 1. SQL Migrations ausfuehren
```bash
# Migrations gegen die shared DB ausfuehren
# Auf dem Mac Mini:
ssh macmini "docker exec bp-core-postgres psql -U breakpilot -d breakpilot_db -f -" < migrations/001_dsfa_template_v2.sql
ssh macmini "docker exec bp-core-postgres psql -U breakpilot -d breakpilot_db -f -" < migrations/002_tom_sdm_template.sql
# ... usw.
```
### 2. Python Generators kopieren (bei Compliance-Integration)
```bash
cp generators/*.py /path/to/breakpilot-compliance/backend-compliance/compliance/api/document_templates/
```
### 3. Neue document_types registrieren
In `breakpilot-compliance/backend-compliance/compliance/api/legal_template_routes.py`,
`VALID_DOCUMENT_TYPES` erweitern um:
- `verpflichtungserklaerung`
- `informationspflichten`
### 4. Qdrant Cleanup ausfuehren
```bash
# Vorschau
ssh macmini "python3 /path/to/cleanup_temp_vorlagen.py --dry-run"
# Ausfuehren
ssh macmini "python3 /path/to/cleanup_temp_vorlagen.py"
```
## Template-Syntax
- `{{PLACEHOLDER}}` — Wird durch Kontext-Wert ersetzt
- `{{#IF FELD}}...{{/IF}}` — Bedingter Block (wird nur angezeigt wenn Feld gesetzt)
- `{{#IF_NOT FELD}}...{{/IF_NOT}}` — Invertierter bedingter Block
- `[BLOCK:ID]...[/BLOCK:ID]` — Block der per Rule Engine entfernt werden kann
## Lizenz
Alle Templates: MIT License, BreakPilot Compliance.
Keine Texte aus DPA-Dokumenten uebernommen — alle Formulierungen eigenstaendig.