5e5002c883
Architecture-validation finding: the implementation mode produced compliance-
flavored output ("teilweise erfüllt", "covered") from a mere customer claim,
blurring the line to the Execution layer. This is a design decision, not a text
fix — the reasoning layer judges only the customer's STATEMENT, never conformity.
- CoverageStatus -> ClaimCoverage; values are claim-relative + carry "potential":
potentially_addresses / partially_addresses / does_not_address /
insufficient_information.
- ImplementationAssessment -> ClaimObligationMapping (coverage_status ->
claim_coverage); ImplementationResponse -> ImplementationReasoningResponse
(assessments -> mappings, + explicit `disclaimer`); request renamed; engine
entry assess_implementation -> reason_implementation_claim.
- Endpoint /reasoning/implementation-assessment -> /reasoning/implementation-reasoning.
- Summary/explanations reworded: "adressiert wahrscheinlich N Pflichten … für
eine Bewertung der tatsächlichen Umsetzung sind Nachweise erforderlich (keine
Konformitätsaussage)". No "erfüllt"/"abgedeckt" leaks.
- New guard test asserts no compliance verdict leaks (no "erfüllt"; disclaimer
separates ClaimCoverage from ComplianceStatus). 23 tests green, mypy clean.
Discovery (scope/obligations) was already structurally claim-free and unaffected.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
931 B
Python
28 lines
931 B
Python
"""Regulatory Reasoning Engine.
|
|
|
|
A deterministic reasoning layer ON TOP of the Legal Knowledge Graph (obligation
|
|
registry) and the Compliance Execution Graph (control mapping / evidence). It
|
|
answers, for a concrete product: which regulations apply, which obligations
|
|
follow, whether the customer's implementation covers them, and whether a
|
|
customer interpretation is legally sound.
|
|
|
|
No new RAG, no new controls, no DB schema changes — scope & reasoning metamodel
|
|
only (spec §14).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .claim_normalizer import normalize_claim
|
|
from .implementation_engine import reason_implementation_claim
|
|
from .interpretation_engine import assess_interpretation
|
|
from .obligation_engine import derive_obligations
|
|
from .scope_engine import discover_scope
|
|
|
|
__all__ = [
|
|
"discover_scope",
|
|
"derive_obligations",
|
|
"normalize_claim",
|
|
"reason_implementation_claim",
|
|
"assess_interpretation",
|
|
]
|