GWÖ-Antragsprüfer: Automatische Gemeinwohl-Bilanzierung von Parlamentsanträgen nach der GWÖ-Matrix 2.0
Go to file
Dotty Dotter e04eb6d340 feat: Block 2.2 — BUND WP20 (BTW 2021, Scholz-Ampel) historisch indiziert
7 Wahlprogramme zur BTW 26.09.2021 — die Programme der Scholz-Ampel-Periode
(SPD+GRÜNE+FDP, vereidigt 08.12.2021, vorgezogenes Ende 25.03.2025):

- cdu-bund-2021 (gemeinsam CDU/CSU "Stabilitaet und Erneuerung", 140 S., 232 chunks)
- csu-bund-2021 (eigenstaendige CSU-Bayern-Fokus-Variante, 18 S., 24 chunks)
- spd-bund-2021 (Zukunftsprogramm "Aus Respekt vor Deiner Zukunft", 66 S., 105 chunks)
- gruene-bund-2021 (272 S. barrierefreie Fassung, 269 chunks)
- fdp-bund-2021 (Beschluss 14.-16.05.2021 Berlin, 68 S., 136 chunks)
- afd-bund-2021 ("Deutschland. Aber normal.", 210 S., 160 chunks)
- linke-bund-2021 ("Zeit zu handeln!", 168 S., 324 chunks)

Total: 1.250 Chunks.

Geltungszeitraum 2021-09-26 (Wahltag) bis 2025-02-23 (Wahltag BTW 2025,
exklusiv). Antraege aus dieser Periode bekommen jetzt automatisch das
korrekte Programm zurueckgeliefert via wahlprogramm_zum_zeitpunkt():

- 2024-01-01 BUND/SPD -> spd-bund-2021 (Scholz-Ampel)
- 2025-02-22 BUND/SPD -> spd-bund-2021 (noch alt)
- 2025-02-23 BUND/SPD -> spd-bund-2025 (BTW-Wahltag, Wechsel)

Tests: 117 gruen, plus neue test_bund_2024_returns_btw_2021 und
test_bund_grenze_btw_2021_btw_2025.

Block 2.2 abgeschlossen — Block 2 Roadmap (16 BL × 3 WPs) ist 2/16 BL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 10:25:51 +02:00
app feat: Block 2.2 — BUND WP20 (BTW 2021, Scholz-Ampel) historisch indiziert 2026-05-08 10:25:51 +02:00
docs docs: Roadmap Programme/Legislaturen mit 11 Entscheidungen 2026-05-08 09:03:20 +02:00
scripts feat(Phase 11b): Bypass-DB-Logging + Auto-Rotation-Skript 2026-05-06 23:31:51 +02:00
tests feat: Block 2.2 — BUND WP20 (BTW 2021, Scholz-Ampel) historisch indiziert 2026-05-08 10:25:51 +02:00
.coveragerc build(#134): Coverage-Schwelle 45% → 50% nach Test-Backfill-Welle 2026-04-28 11:14:09 +02:00
.dockerignore Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
.env.example Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
.gitignore build(#134): Coverage-Baseline (.coveragerc) + pytest-cov in dev-deps 2026-04-28 02:05:39 +02:00
.tarignore Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
CHANGELOG.md release(1.0): README + CHANGELOG + DATA-LICENSE (CC-BY-4.0) 2026-04-25 20:59:28 +02:00
DATA-LICENSE release(1.0): README + CHANGELOG + DATA-LICENSE (CC-BY-4.0) 2026-04-25 20:59:28 +02:00
docker-compose.dev.yml feat: DEBUG_AUTH_TOKEN Bypass fuer Diagnose-Sessions auf dev 2026-05-06 22:26:39 +02:00
docker-compose.yml ops: GITEA_TOKEN + GITEA_*-Settings im docker-compose.yml durchreichen 2026-04-28 01:06:57 +02:00
Dockerfile ops: Dockerfile + docker-compose Anpassungen, ADR-Index aktuell 2026-04-25 20:55:57 +02:00
LICENSE Initial commit: GWÖ-Antragsprüfer v1.0 2026-03-28 22:30:24 +01:00
mkdocs.yml docs(Phase 19): ADR 0012 DEBUG_AUTH_TOKEN-Bypass 2026-05-06 23:53:55 +02:00
pytest.ini docs+ops: ADRs 0006/0008, DDD-Bewertung, Zugriffsrechte, Smoke-Test, Cron-Scripts 2026-04-25 20:55:57 +02:00
README.md release(1.0): README + CHANGELOG + DATA-LICENSE (CC-BY-4.0) 2026-04-25 20:59:28 +02:00
requirements-dev.txt build(#134): Coverage-Baseline (.coveragerc) + pytest-cov in dev-deps 2026-04-28 02:05:39 +02:00
requirements.txt #43 Keycloak SSO: JWT-Middleware + UI-Guiding 2026-04-10 14:28:57 +02:00

GWÖ-Antragsprüfer

Automatische Gemeinwohl-Bilanzierung von Parlamentsanträgen nach der GWÖ-Matrix 2.0 für Gemeinden

Python FastAPI Code-License Data-License Version

Live unter https://gwoe.toppyr.de/.

Was macht das Tool?

Der GWÖ-Antragsprüfer analysiert Anträge aus deutschen Landesparlamenten und dem Bundestag und bewertet sie nach den Kriterien der Gemeinwohl-Ökonomie (GWÖ):

  • GWÖ-Score (010) — Wie gut entspricht der Antrag den GWÖ-Werten?
  • Matrix-Zuordnung — Welche der 25 Felder der GWÖ-Matrix für Gemeinden werden adressiert?
  • Programm-Treue — Passt der Antrag zum Wahl- und Grundsatzprogramm jeder Fraktion?
  • Verbesserungsvorschläge — Konkrete Textänderungen mit GWÖ-Begründung im Redline-Format
  • Zitate mit Verifikation — Belege aus den Wahl-/Grundsatzprogrammen, server-seitig gegen Original-Chunks geprüft (siehe ADR 0001)

Aktive Datenquellen (Stand Release 1.0)

16 Bundesländer + Bundestag — alle aktiven Adapter:

BL Wahlperiode Quelle
BUND 21 (20252029) bundestag.de DIP
BW 17 (20212026) PARLIS
BY 19 (20232028) Bayern Landtag
BE 19 (20232026) Berlin AGH
BB 8 (20242029) StarWeb
HB 21 (20232027) ParlDok
HH 23 (20252029) ParlDok
HE 21 (20242029) Hessen Landtag
MV 8 (20212026) ParlDok
NI NILAS (login-protected, deferred)
NRW 18 (20222027) OPAL
RP 18 (20212026) StarWeb
LSA 8 (20212026) StarWeb
SL 17 (20222027) Umbraco
SN 8 (20242029) XML-Export
SH 20 (20222027) Schleswig-Holstein
TH 8 (20242029) StarWeb

Plus abgeordnetenwatch.de-Integration für strukturierte namentliche Abstimmungen (alle 16 BL + BT).

Features

Frontend (v2, ECOnGOOD-CD)

  • Listenansicht mit Score-Band-Filter, BL-Chip-Filter, Sort-Dropdown (8 Optionen), Live-Suche
  • Antragsdetail mit ScoreHero, Matrix 5×5, Zitaten, Redline-Diff, Programm-Treue pro Fraktion, Versionshistorie, namentlichem Abstimmungsverhalten (wenn vorhanden)
  • Bookmark-Liste (server-seitig pro User), Kommentare, Voting, Share-Buttons (Threads/X/Mastodon mit LLM-Texten), Re-Analyze
  • Auswertungen mit BL×Partei-Matrix, Themen×Fraktion-Heatmap, Cluster-Bubble-Chart
  • Tag-Cloud, Cluster-Liste, Landtag-Live-Suche, Methodik, Quellen
  • Admin-Panel Freischaltungen / Queue / Abos / Wahlprogramme
  • Dark-Mode, Phosphor-Icons, Avenir/Nunito-Sans, Keyboard-Shortcuts (j/k/Enter/Esc/?/⏎)

Backend

  • FastAPI + Jinja2 + Vanilla JS (kein Build-Tool)
  • SQLite mit aiosqlite (Source of Truth)
  • Qwen-Plus (DashScope) für die LLM-Bewertung — austauschbar via LlmBewerter-Port (ADR 0008)
  • Embeddings v4 für die Zitat-Verifikation (ADR 0006)
  • Keycloak SSO mit Direct-Access-Grant (Login-Modal in der App, kein Redirect)
  • Background-Queue mit 3 parallelen Workern + Graceful Shutdown
  • Daily-Digest-Mail für Abonnent:innen
  • Monitoring-Scan aller Adapter mit Kosten-Schätzung — Beobachtung ohne Auto-Fetch
  • OG-Cards (Open-Graph-Bilder pro Antrag, Playwright-gerendert)
  • WeasyPrint für PDF-Reports

Tests

  • 574 Tests, 13 skipped — Unit + Integration + Property + Bug-Regression + DDD
  • Live-Adapter-Tests gegen alle 17 Quellen (pytest -m integration)
  • Citation-Substring-Verification gegen Original-PDFs
  • E2E-Browser-Tests via Playwright (pytest -m e2e)

Architektur

Detailliert in docs/:

DDD-Lightweight-Migration ist Tag 1-4 abgeschlossen (Ports, Adapter, Repositories, Domain-Verhalten — siehe ADR 0008). Callsite-Migration in main.py ist Folge-PR.

Schnellstart

Voraussetzungen

  • Docker + Docker Compose
  • Python 3.12 (für lokale Tests)
  • DashScope API-Key (Qwen)
  • Keycloak (optional, für Login)

Installation

git clone https://repo.toppyr.de/tobias/gwoe-antragspruefer
cd gwoe-antragspruefer/webapp
cp .env.example .env       # API-Keys eintragen
docker compose up -d --build

App auf http://localhost:8000.

Tests

python3 -m pytest tests/ -q                  # Unit-Suite (574 Tests, < 2 s)
python3 -m pytest tests/ -m integration      # Live-Adapter-Tests (langsam)
./scripts/smoke-test.sh                       # Gesamt-Funktionsprüfung gegen Live

Deploy (Server)

./scripts/deploy.sh                           # mit Uptime-Kuma-Wartungsmodus
./scripts/run-digest.sh                       # Daily-Mail-Digest (Cron 07:00)
./scripts/run-monitoring-scan.sh              # Monitoring-Scan (manuell oder Cron)

Lizenz

Zwei getrennte Lizenzen:

  • QuellcodeMIT
  • Bewertungs-Daten und -Berichte (Assessments, Matrix-Zuordnungen, Verbesserungsvorschläge, Themen-Tags etc.) — CC BY 4.0

Wahlprogramme und Antrags-PDFs der Parlamente unterliegen der jeweiligen Urheber-Lizenz der Quelle und werden hier nur zur Verifikation referenziert.

Mitwirken

Issues unter https://repo.toppyr.de/tobias/gwoe-antragspruefer. Pull Requests willkommen — beachte ADR 0004 (Deployment-Workflow) und die Test-Konventionen in pytest.ini.

Statistiken (Stand Release 1.0)

  • 16 BL + Bundestag aktiv
  • 85 Wahlprogramme indexiert (Embeddings v4)
  • 71 produktive Bewertungen in der Live-DB
  • 28 977 abgeordnetenwatch-Votes (BUND)
  • 11 789 LOC Python in app/