import 'models.dart'; /// The Recl∆Im evaluation flow, submitted inline per norm via /// `HubClient.submit`. No `system.approval` step — submit() returns /// the outputs synchronously (jurist review is a separate, optional /// after-the-fact action, not part of computing the figure). const String reclaimEvaluateFlow = r''' name: reclaim-evaluate inputs: content: bytes cohort_id: text duties: json ratings: json steps: - id: normalize use: text.akoma-normalize@^0 with: content: $inputs.content mime: "application/xml" - id: deontic use: text.deontic-extract@^0 with: norm: $normalize.norm - id: citations use: graph.citation-extract@^0 with: norm: $normalize.norm - id: cohort use: stats.cohort-size@^0 with: cohort_id: $inputs.cohort_id - id: frust use: text.readability-score@^0 with: norm: $normalize.norm graph: $citations.citations - id: skm use: econ.skm-score@^0 with: duties: $inputs.duties - id: benefit use: law.benefit-score@^0 with: ratings: $inputs.ratings outputs: norm: $normalize.norm skm: $skm.report benefit: $benefit.score frust: $frust.score cohort: $cohort.cohort duties: $deontic.duties citations: $citations.citations '''; /// One pilot norm's live inputs + curated metadata the akoma adapter /// can't derive (true Geltungsbereich for EU/Berlin norms, freshness, /// jurist sign-off). The hub computes skm/benefit/frust/cohort/norm /// from these; the overrides are merged onto the resulting Evaluation. class NormLiveInput { const NormLiveInput({ required this.assetPath, required this.cohortId, required this.duties, required this.ratings, required this.jurisdiction, this.freshness = Freshness.current, this.supersededNote, this.reviewedBy, this.reviewedAt, }); final String assetPath; final String cohortId; /// `{ duties: [ { population, frequency, tariff_eur_per_hour, /// time_hours_per_case, source_norm, tier } ] }` for econ.skm-score. final Map duties; /// `{ schutz, markt, rechtssicherheit, eu_binnenmarkt, sicherheit, /// umwelt, einnahmen }` (each 0..5) for law.benefit-score. final Map ratings; final Jurisdiction jurisdiction; final Freshness freshness; final String? supersededNote; final String? reviewedBy; final DateTime? reviewedAt; } Map _duty( String norm, double population, double frequency, double tariff, double time, String tier, ) => { 'duties': [ { 'population': population, 'frequency': frequency, 'tariff_eur_per_hour': tariff, 'time_hours_per_case': time, 'source_norm': norm, 'tier': tier, } ] }; Map _ratings(double schutz, double markt, double rs, double eu, double sicherheit, double umwelt, double einnahmen) => { 'schutz': schutz, 'markt': markt, 'rechtssicherheit': rs, 'eu_binnenmarkt': eu, 'sicherheit': sicherheit, 'umwelt': umwelt, 'einnahmen': einnahmen, }; /// The five pilot norms, live-evaluated against the hub. final List reclaimNormInputs = [ NormLiveInput( assetPath: 'assets/norms/gewo-14.xml', cohortId: 'berlin-kmu', duties: _duty('GewO § 14', 180000, 1.0, 35.0, 0.5, 'T3'), ratings: _ratings(2, 3, 3.5, 2, 1.5, 0, 2), jurisdiction: Jurisdiction.deutschland, ), NormLiveInput( assetPath: 'assets/norms/kassensichv.xml', cohortId: 'gastro-de', duties: _duty('KassenSichV § 1–4', 500000, 1.0, 40.0, 1.25, 'T2'), ratings: _ratings(3, 3, 3.5, 2.5, 3, 1, 5), jurisdiction: Jurisdiction.deutschland, reviewedBy: 'RA Dr. M. Kessler', reviewedAt: DateTime.utc(2026, 1, 20), ), NormLiveInput( assetPath: 'assets/norms/dsgvo-art30.xml', cohortId: 'de-kmu', duties: _duty('DSGVO Art. 30', 3000000, 1.0, 50.0, 3.0, 'T1'), ratings: _ratings(4, 4, 4.5, 4, 3, 2, 5), jurisdiction: Jurisdiction.eu, reviewedBy: 'Prof. Dr. A. Lindner', reviewedAt: DateTime.utc(2026, 2, 3), ), NormLiveInput( assetPath: 'assets/norms/bauo-bln-60.xml', cohortId: 'bauwirtschaft-be', duties: _duty('BauO Bln § 60–69', 15000, 1.0, 60.0, 80.0, 'T2'), ratings: _ratings(4, 3, 4, 2, 4, 3, 4), jurisdiction: Jurisdiction.berlin, reviewedBy: 'RAin S. Brandt', reviewedAt: DateTime.utc(2026, 1, 28), ), NormLiveInput( assetPath: 'assets/norms/milog-17.xml', cohortId: 'de-kmu', duties: _duty('MiLoG § 17', 3000000, 220.0, 30.0, 0.014, 'T1'), ratings: _ratings(4, 3, 4, 2, 3, 1, 5), jurisdiction: Jurisdiction.deutschland, freshness: Freshness.superseded, supersededNote: 'BEG IV hat die Dokumentationspflichten zum ' '1.1.2026 entschärft — diese Fassung ist neu zu bewerten.', ), ];