diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..4f9ee54 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,58 @@ +# Recl∆Im — Context for Claude Code + +You are the **reclaim** agent. Read this first, every session. + +## Identity + +- **Product:** Recl∆Im (ASCII / code: `reclaim`) — a domain app for + law / duty reform-mapping (Pflicht-basierte Wirkungsanalyse). +- **Flutter package:** `reclaim_app` (snake_case Dart identifier — this + stays; only user-facing display names use the `∆` spelling). +- **Author:** Dr. Stefan Flemming, F∆I (Flemming.AI). +- **Repository (dev):** `git.flemming.ai/fai/reclaim`. +- **License:** Apache 2.0. + +> Naming: `∆` replaces the "AI" letters; in ASCII / code use the plain +> spelling `reclaim`. The Dart package identifier `reclaim_app` and the +> on-disk macOS bundle `reclaim_app.app` are code references and stay +> snake_case; user-facing product strings read **Recl∆Im**. + +## What this is + +Recl∆Im is **a domain app built on top of the Ch∆In platform.** It +consumes the platform — it is not the platform. It connects to a Ch∆In +hub over gRPC via the `chain_client_sdk` (a path dependency) and runs +WASM modules + YAML flows the hub orchestrates. + +## Cross-agent boundaries + +Read `../../shared/AGENTS.md` (the cross-agent charter) and +`../../shared/HANDOFFS.md` (your task list) every session. + +- **You own:** the Recl∆Im Flutter app (`reclaim_app`) — its UI and + domain logic — plus Recl∆Im-specific flows / modules, branding, and + the Recl∆Im docs (METHODIK, RUN, MACHBARKEITSSTUDIE). +- **You do NOT own** the platform. The hub, the `chain` CLI, the runtime + / sandbox, the module ABI (`chain:platform`), the gRPC wire + (`chain.v1`), Studio, and the client SDKs all belong to the **chain** + agent. Recl∆Im uses `chain_client_sdk` via a path dep but **never + modifies it.** +- Need a new RPC / SDK method / ABI capability, or any change to the + hub / SDK / wire? Do **not** edit it — append a handoff row to + `../../shared/HANDOFFS.md` (from: reclaim, to: chain) and skip that + item. + +## Confidentiality + +The internal `MACHBARKEITSSTUDIE.md` is **AG-intern** and must never go +into public docs, code, commits, or examples. Never name pilot +institutions (ITDZ, Kammergericht, HTW, J∆I) or customer↔label mappings +in public material. Generic terms only ("a regulated organization"). + +## Commit conventions + +- Conventional commits in English: `type(scope): message`. +- DCO sign-off on every commit: `git commit -s` + (`Signed-off-by: …`). No `Co-Authored-By` trailer. +- Make the smallest change that works; verify with `flutter analyze` + (in `app/`) before claiming done where practical. diff --git a/MACHBARKEITSSTUDIE.md b/MACHBARKEITSSTUDIE.md index 9305180..a8a3690 100644 --- a/MACHBARKEITSSTUDIE.md +++ b/MACHBARKEITSSTUDIE.md @@ -870,7 +870,7 @@ liegt dann woanders. 4. **Rechtliche Kurz-Stellungnahme** anstoßen (EU AI Act, DSGVO, §5 UrhG, juris-Lizenz). Möglichst kostenneutral über Lehrstuhl-Kooperation. -5. **Repo `fai/lawheatmap` initialisieren** (Forgejo unter `git.flemming.ai`, +5. **Repo `fai/reclaim` initialisieren** (Forgejo unter `git.flemming.ai`, Vendor-Namespace `fai/`), Lizenz Apache 2.0, DCO an, CI-Pipeline analog `fai/chain` (DCO-Sign-off, Conventional Commits, SBOM, sigstore). `law.*`-Module später in `chain-modules-law/` als product-scoped Org. @@ -890,7 +890,7 @@ liegt dann woanders. - **ELI**: European Legislation Identifier (eli.dlri.de / EUR-Lex) - **CELEX**: EU-Dokumenten-ID-System - **REFIT**: EU-Programm zur Regulatorischen Eignungsprüfung -- **Ch∆In** (CLI: `chain`): Orchestrierungs-Plattform unter `fai_lawheatmap`. Vendor: **F∆I = Flemming.AI**. +- **Ch∆In** (CLI: `chain`): Orchestrierungs-Plattform (eigenes Repo `fai_chain`), auf der Recl∆Im als Domänen-App aufsetzt. Vendor: **F∆I = Flemming.AI**. - **Hub / Module / Flow**: Ch∆In-Server (`chain serve`), WASM-Komponente (ABI `chain:platform`), YAML-Workflow - **RAG**: Retrieval Augmented Generation — LLM mit verpflichteter Quelleneinbindung - **Hochrisiko-KI (EU AI Act)**: KI-System, das Rechtsfolgen für Personen diff --git a/METHODIK.md b/METHODIK.md index bb3d292..7196e34 100644 --- a/METHODIK.md +++ b/METHODIK.md @@ -297,5 +297,5 @@ Jede Methodik-Version benötigt: --- **Kontakt:** Dr. Stefan Flemming, F∆I (Flemming.AI), -chain@flemming.ai. Repository: `git.flemming.ai/fai/lawheatmap`. +chain@flemming.ai. Repository: `git.flemming.ai/fai/reclaim`. Lizenz: Apache-2.0. diff --git a/app/lib/pages/heatmap_page.dart b/app/lib/pages/heatmap_page.dart index 9fd69ce..f6ebf48 100644 --- a/app/lib/pages/heatmap_page.dart +++ b/app/lib/pages/heatmap_page.dart @@ -50,9 +50,9 @@ class _HeatmapPageState extends State { Text('Heatmap', style: t.displaySmall), const SizedBox(height: ReclaimSpace.xs), Text( - 'X: jährliche Bürokratiekosten (€, log10). ' - 'Y: Nutzen-Score 0–5. Punktgröße: Betroffenheit. ' - 'Klick auf einen Punkt → Detail mit Pflichten + Quellen.', + 'Schaden × Nutzen × Betroffenheit pro Norm. ' + 'Klick auf einen Punkt öffnet das Detail mit ' + 'Pflichten, Quellen und Gesetzestext.', style: t.bodyLarge?.copyWith( color: ReclaimColors.mute, ), @@ -77,6 +77,8 @@ class _HeatmapPageState extends State { ), ), ), + const SizedBox(height: ReclaimSpace.md), + _LegendCard(), const SizedBox(height: ReclaimSpace.lg), Wrap( spacing: ReclaimSpace.md, @@ -126,3 +128,134 @@ class _HeatmapPageState extends State { ); } } + +/// Axis + circle legend below the heatmap. Spells out what is +/// plotted and how — the four-line top description deliberately +/// stays short and high-level, this card carries the precise +/// reading instructions a reviewer needs to defend the plot +/// against "what does that even mean?" +class _LegendCard extends StatelessWidget { + @override + Widget build(BuildContext context) { + final t = Theme.of(context).textTheme; + return ReclaimCard( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Legende', style: t.headlineSmall), + const SizedBox(height: ReclaimSpace.md), + _LegendRow( + symbol: '↔', + axis: 'Abszisse (X)', + label: 'Schaden', + description: + 'Bürokratiekosten pro Jahr in Euro, logarithmisch ' + 'skaliert (10⁴ = 10 k, 10⁶ = 1 Mio, 10⁹ = 1 Mrd). ' + 'Berechnet nach Standardkostenmodell ' + 'P × F × T × h (Studie §3.1).', + ), + const SizedBox(height: ReclaimSpace.sm), + _LegendRow( + symbol: '↕', + axis: 'Ordinate (Y)', + label: 'Nutzen', + description: + 'Komposit-Score von 0–5, Mittelwert aus den sieben ' + 'Dimensionen Schutz · Markt · Rechtssicherheit · ' + 'EU-Binnenmarkt · Sicherheit · Umwelt · Einnahmen ' + '(Studie §3.2). Jede Dimension einzeln ' + 'quellen-begründet.', + ), + const SizedBox(height: ReclaimSpace.sm), + _LegendRow( + symbol: '●', + axis: 'Punktgröße', + label: 'Betroffenheit', + description: + 'Anzahl der Adressaten (KMU, Bürger, Behörden), ' + 'wurzel-skaliert. Mehr Adressaten → größerer Kreis. ' + 'Quellen: DESTATIS Unternehmensregister, ' + 'IHK-/Handwerkskammer-Mitgliederzahlen.', + ), + const SizedBox(height: ReclaimSpace.sm), + _LegendRow( + symbol: '◐', + axis: 'Tier-Farbe', + label: 'Evidenz-Stufe', + description: + 'Petrol → warm-orange markiert die Stufe (T1–T4) der ' + 'schwächsten Eingangs-Variable. Eine SKM-Zahl mit ' + 'T4-Schätzwert für h trägt die ganze Zahl als T4 ' + '(Regel der niedrigsten Stufe, Studie §6.7).', + ), + ], + ), + ); + } +} + +class _LegendRow extends StatelessWidget { + const _LegendRow({ + required this.symbol, + required this.axis, + required this.label, + required this.description, + }); + + final String symbol; + final String axis; + final String label; + final String description; + + @override + Widget build(BuildContext context) { + final t = Theme.of(context).textTheme; + return Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + width: 28, + child: Text( + symbol, + style: t.titleMedium?.copyWith( + color: ReclaimColors.signal, + fontSize: 18, + ), + ), + ), + SizedBox( + width: 140, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + axis, + style: t.labelSmall?.copyWith( + color: ReclaimColors.mute, + letterSpacing: 0.4, + ), + ), + Text( + label, + style: t.titleMedium, + ), + ], + ), + ), + const SizedBox(width: ReclaimSpace.md), + Expanded( + child: Padding( + padding: const EdgeInsets.only(top: 2), + child: Text( + description, + style: t.bodyLarge?.copyWith( + color: ReclaimColors.mute, + height: 1.5, + ), + ), + ), + ), + ], + ); + } +} diff --git a/app/web/index.html b/app/web/index.html index ba23a71..a299f3b 100644 --- a/app/web/index.html +++ b/app/web/index.html @@ -18,18 +18,18 @@ - + - + - reclaim_app + Recl∆Im diff --git a/app/web/manifest.json b/app/web/manifest.json index 2bcfb6d..543e961 100644 --- a/app/web/manifest.json +++ b/app/web/manifest.json @@ -1,11 +1,11 @@ { - "name": "reclaim_app", - "short_name": "reclaim_app", + "name": "Recl∆Im", + "short_name": "Recl∆Im", "start_url": ".", "display": "standalone", "background_color": "#0175C2", "theme_color": "#0175C2", - "description": "A new Flutter project.", + "description": "Recl∆Im — Pflicht-basierte Wirkungsanalyse für Rechtsnormen, auf der Ch∆In-Plattform.", "orientation": "portrait-primary", "prefer_related_applications": false, "icons": [