Files
breakpilot-core/document-templates
Benjamin Admin b14be8583d feat: Betriebsrats-Compliance — BAG-Ingestion Script + BV-Template
1. BAG-Urteile Ingestion Script (21 kuratierte Urteile zu §87 BetrVG)
   - Microsoft 365, SAP ERP, E-Mail, Standardsoftware, Video, SaaS/Cloud
   - 14 erfolgreich ingestiert (4.726 Chunks in bp_compliance_datenschutz)
2. Betriebsvereinbarung Template (6. Document Template)
   - SQL-Migration mit 13 Sektionen (A-M), ~30 Placeholders
   - Conditional Blocks fuer KI-Systeme, Video, HR
   - Python-Generator mit automatischer TOM-Befuellung

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 10:49:01 +02:00
..

Document Templates V2

Erweiterte Compliance-Vorlagen (DSFA, TOM, VVT, AVV) fuer den BreakPilot Document Generator.

Branch: feature/document-templates-v2 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

Python Generators (generators/)

Datei Beschreibung
dsfa_template.py DSFA-Generator mit Schwellwertanalyse, Bundesland-Mapping, SDM-TOM, Art. 36
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

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

# 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)

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

# 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.