Prep for the Forgejo CI gate. Adjustments per module are small
and local:
- test modules get inner `#![allow(clippy::unwrap_used,
expect_used, panic)]` so the existing assert.expect()
test idiom keeps working without rewriting every fixture
- the dead_code field that downstream consumers may still
want serialised gets an explicit #[allow(dead_code)]
- manual char/range comparisons fold to the idiomatic forms
(`['…']`, `(2..=5).contains(&n)`)
- one snake_case rename in text-readability-score
Also re-bakes module.wasm so the committed artefact matches
the post-fmt source byte-for-byte.
No behaviour change, no test change. cargo fmt --all -- --check
and cargo clippy --all-targets -- -D warnings now both pass.
Signed-off-by: flemming-it <sf@flemming.it>
Regex-based extraction of atomic deontic statements (Pflicht,
Verbot, Erlaubnis) from German legal text. Reuse-lens: contracts,
ISO standards, internal policies. Vorbild: Mercatus QuantGov /
RegData.
Pattern coverage in v0.1.0:
- OBLIGATION: muss, hat zu, ist verpflichtet, ist anzuzeigen,
aufzuzeichnen, muss eingehalten/geführt/...
- PROHIBITION: darf nicht, dürfen nicht, ist untersagt, verboten
- PERMISSION: kann, können, darf
Each emitted Duty carries a confidence ∈ [0, 1]. Pattern hits
default to 0.85; ambiguous structures (bare "kann") drop to 0.70.
Anything below 0.6 is the surrounding flow's signal to re-run
through llm.chat for human-readable refinement and feed the result
to system.approval@^0 — that keeps deterministic extraction
separate from non-deterministic LLM judgment.
Pure in-WASM (regex), zero filesystem, zero network.
Reserved for next versions:
- 0.2: EN / FR locale variants
- 0.3: addressee + frequency + authority detection (Phase 1
relies on flow-side LLM enrichment for those fields)
Signed-off-by: flemming-it <sf@flemming.it>