feat: initial law-benefit-score v0.1.0 (law.benefit_score@0.1.0)
Seven-dimensional benefit score aggregator (Studie §3.2):
schutz · markt · rechtssicherheit · eu_binnenmarkt
sicherheit · umwelt · einnahmen
Each dimension is 0..5. Output carries the mean total (also 0..5)
plus the dispersion (standard deviation across the seven
dimensions), so the UI can flag "high mean but split panel" cases
where a juristisch-politisch konventionierte Dimension dominates
and others disagree. Per-dimension sources can be passed via the
optional _sources sub-object so the audit log preserves the
"hier kommt jede 5 her"-Beleg.
This is the one genuinely domain-bound module: the seven
dimensions are juristisch-politisch konventioniert and won't
generalise to other domains. Lives in the chain-modules-law org
once the org is created on Forgejo; until then the remote URL
is set accordingly.
v0.1.0 input shape is a flat ratings object so the surrounding
flow can pre-compute the scores from any source (LLM proposal +
Juristen-review, NKR-Stellungnahme, Beirats-Konsens).
Pure in-WASM, zero filesystem, zero network.
Reserved for next versions:
- 0.2: per-dimension Juristen-vote panel (inter-rater κ output)
- 0.3: LLM-proposed ratings + RAG-Quellen integration via
the surrounding flow (this module stays deterministic)
Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
commit
c94b55e539
6 changed files with 648 additions and 0 deletions
44
module.yaml
Normal file
44
module.yaml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
schema_version: 3
|
||||
provider: chain
|
||||
name: law-benefit-score
|
||||
version: 0.1.0
|
||||
|
||||
# 7-dimensional benefit score: Schutz/Markt/Rechtssicherheit/
|
||||
# EU-Binnenmarkt/Sicherheit/Umwelt/Einnahmen — each 0..5.
|
||||
#
|
||||
# This is the ONE genuinely domain-bound module — the seven
|
||||
# dimensions are juristisch-politisch konventioniert. It lives
|
||||
# in `chain-modules-law/` once the org exists.
|
||||
#
|
||||
# v0.1.0 ships a simple uniform-input scorer: the flow supplies
|
||||
# expert ratings; this module aggregates + normalises. v0.2
|
||||
# integrates with `llm.chat` proposals + Juristen-review.
|
||||
provides:
|
||||
- capability: law.benefit_score
|
||||
version: 0.1.0
|
||||
|
||||
inputs:
|
||||
ratings:
|
||||
type: json
|
||||
description:
|
||||
en: |
|
||||
{ schutz, markt, rechtssicherheit, eu_binnenmarkt,
|
||||
sicherheit, umwelt, einnahmen } — each 0..5.
|
||||
Source field per dimension is recommended for the audit
|
||||
log; pass `_sources: {dimension: source_label}` to surface
|
||||
in the output report.
|
||||
de: |
|
||||
Bewertungen pro Dimension (0..5) + optional _sources.
|
||||
|
||||
outputs:
|
||||
score:
|
||||
type: json
|
||||
description:
|
||||
en: |
|
||||
{ dimensions, total: 0..5, dispersion,
|
||||
sources: {dimension: source_label?} }.
|
||||
de: |
|
||||
{ dimensions, total: 0..5, dispersion,
|
||||
sources: {dimension: source_label?} }.
|
||||
|
||||
permissions: []
|
||||
Loading…
Add table
Add a link
Reference in a new issue