First end-to-end-buildable cut of the pflicht-/graph-basierte
Wirkungsanalyse von Rechtsnormen, running on Ch∆In. Demo runs
without external dependencies and without a hub connection so
the methodology + UI stack can be reviewed before any Verbands-
Kooperation or Beirats-Validierung kicks in.
Tree layout
MACHBARKEITSSTUDIE.md v0.3 — pflicht-basierte Methodik,
4-Tier-Evidenz, 8 law*-Module
auf Ch∆In statt der alten F∆I-
Plattform.
RUN.md one-page how-to-run.
flows/durchstich-gewo-14.yaml
vertical Phase-0 flow: pull →
normalize → duties → citations →
cohort → skm → frust → benefit →
attribution → system.approval.
app/ Flutter macOS client, design
language pulled from fai_web
(ink #08090A, paper #F4F3EF,
petrol signal #2E8F9E). Mock
repository ships five fixture
norms with real source URLs and a
permanent T4 demo-banner so no
figure can be mistaken for a
validated one.
Module repos (separate, see chain-modules*/):
text-akoma-normalize, text-deontic-extract, graph-citation-
extract, text-readability-score, stats-cohort-size, graph-
shapley-attribution, econ-skm-score, law-benefit-score.
What runs today
- flutter analyze: 0 issues
- flutter test: 2/2 (landing + nav-to-shell smoke)
- flutter build macos (via app/build-macos.sh) and ad-hoc
codesign, app launches and the Dart VM service comes up
- native cargo test green on every module
- cargo build --release --target wasm32-wasip2 produces a
130 KiB artefact for text-akoma-normalize
What is deliberately mock / stub
- gRPC wire from the client to a chain serve hub (Repository
abstraction is in place; live impl is the next step)
- NKR Bürokratiekosten-Datenbank ingestion (for the canonical
h-Werte that close out the Engpass per Studie §6.7)
- DESTATIS GENESIS-API adapter for stats.cohort_size
License: Apache-2.0. Author/contact in MACHBARKEITSSTUDIE.md.
Signed-off-by: flemming-it <sf@flemming.it>
131 lines
3.6 KiB
YAML
131 lines
3.6 KiB
YAML
# Vertikaler Durchstich Phase 0 — eine Norm (GewO §14) durch
|
|
# alle 8 law*-Schritte + Juristen-Approval + Audit.
|
|
#
|
|
# Voraussetzung:
|
|
# chain install text.akoma_normalize text.deontic_extract \
|
|
# graph.citation_extract text.readability_score \
|
|
# stats.cohort_size graph.shapley_attribution \
|
|
# econ.skm_score law.benefit_score \
|
|
# http.request system.approval
|
|
#
|
|
# Aufruf:
|
|
# chain run flows/durchstich-gewo-14.yaml \
|
|
# --input norm_url=https://www.gesetze-im-internet.de/gewo/__14.xml \
|
|
# --input cohort_id=berlin-kmu
|
|
|
|
inputs:
|
|
norm_url:
|
|
type: string
|
|
required: true
|
|
description: ELI-resolvable URL der Quell-Norm
|
|
cohort_id:
|
|
type: string
|
|
required: true
|
|
description: Adressaten-Kohorte (siehe stats.cohort_size v0.1)
|
|
tariff_eur_per_hour:
|
|
type: number
|
|
default: 35.0
|
|
description: SKM-Tarif T
|
|
|
|
outputs:
|
|
norm: ${{ normalize.norm }}
|
|
duties: ${{ duties.duties }}
|
|
citations: ${{ citations.citations }}
|
|
cohort: ${{ cohort.cohort }}
|
|
skm: ${{ skm.report }}
|
|
frust: ${{ frust.score }}
|
|
benefit: ${{ benefit.score }}
|
|
attribution: ${{ attribution.attribution }}
|
|
reviewed: ${{ review.decision == 'approve' }}
|
|
|
|
steps:
|
|
- id: pull
|
|
use: http.request@^0
|
|
with:
|
|
url: ${{ inputs.norm_url }}
|
|
method: GET
|
|
etag_cache: true
|
|
|
|
- id: normalize
|
|
use: text.akoma_normalize@^0
|
|
with:
|
|
content: ${{ pull.body }}
|
|
mime: application/xml
|
|
|
|
- id: duties
|
|
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 }}
|
|
|
|
# SKM-Aufbereitung: jede Duty bekommt P/F/T/h aus
|
|
# Kohorten-Größe + per-Duty-Heuristik (Phase 1: NKR-Datenbank).
|
|
# Hier inline aufgebaut; in Phase 1 wird das ein eigener
|
|
# `econ.duties_enrich`-Schritt.
|
|
- id: skm
|
|
use: econ.skm_score@^0
|
|
with:
|
|
duties:
|
|
duties:
|
|
- population: ${{ cohort.cohort.count }}
|
|
frequency: 1.0
|
|
tariff_eur_per_hour: ${{ inputs.tariff_eur_per_hour }}
|
|
time_hours_per_case: 0.5
|
|
source_norm: ${{ normalize.norm.eli }}
|
|
tier: ${{ cohort.cohort.tier }}
|
|
|
|
- id: frust
|
|
use: text.readability_score@^0
|
|
with:
|
|
norm: ${{ normalize.norm }}
|
|
graph: ${{ citations.citations }}
|
|
|
|
- id: benefit
|
|
use: law.benefit_score@^0
|
|
with:
|
|
ratings:
|
|
schutz: 2.0
|
|
markt: 3.0
|
|
rechtssicherheit: 3.5
|
|
eu_binnenmarkt: 2.0
|
|
sicherheit: 1.5
|
|
umwelt: 0.0
|
|
einnahmen: 2.0
|
|
_sources:
|
|
schutz: NKR Stellungnahme zur GewO 2018
|
|
rechtssicherheit: IHK Berlin Mittelstandsumfrage 2024
|
|
|
|
# Attribution-Schritt mit Demo-Graph aus citations.
|
|
# Phase 1: graph.normalize baut den vollen Norm-Graph hier.
|
|
- id: attribution
|
|
use: graph.shapley_attribution@^0
|
|
with:
|
|
graph:
|
|
nodes:
|
|
- ${{ normalize.norm.eli }}
|
|
- eli/bund/gewo
|
|
edges:
|
|
- from: eli/bund/gewo
|
|
to: ${{ normalize.norm.eli }}
|
|
target: ${{ normalize.norm.eli }}
|
|
|
|
# Juristen-Gate — Studie §3.3 macht das obligatorisch.
|
|
- id: review
|
|
use: system.approval@^0
|
|
with:
|
|
title: "F∆I Law-Heatmap — Review ${{ normalize.norm.eli }}"
|
|
payload:
|
|
norm: ${{ normalize.norm }}
|
|
skm: ${{ skm.report }}
|
|
benefit: ${{ benefit.score }}
|
|
frust: ${{ frust.score }}
|
|
cohort: ${{ cohort.cohort }}
|