law-benefit-score/Cargo.toml
flemming-it c94b55e539 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>
2026-06-18 11:25:47 +02:00

36 lines
821 B
TOML

[package]
name = "law_benefit_score"
version = "0.1.0"
edition = "2024"
authors = ["Dr. Stefan Flemming <chain@flemming.ai>"]
license = "Apache-2.0"
publish = false
description = "F∆I module — 7-dimensional benefit score per Studie §3.2"
repository = "https://git.flemming.ws/chain-modules-law/law-benefit-score"
rust-version = "1.85"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
chain-module-sdk = { git = "https://git.flemming.ai/fai/chain-module-sdk-rust.git", branch = "main" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
[profile.release]
opt-level = "s"
lto = true
codegen-units = 1
strip = "symbols"
[lints.rust]
unsafe_op_in_unsafe_fn = "warn"
[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
print_stdout = "deny"
print_stderr = "deny"
[workspace]