Skip to main content

Module meta_deontic

Module meta_deontic 

Source
Expand description

Meta-deontic (Phase 5, DEONTIC_LOGIC_PLAN §11) — provenance, endorsement, and the court-admissible record.

An obligation is only as strong as the authority asserting it and the record proving its breach. This layer turns a DeonticVerdict into durable, attributable evidence:

  • Provenance anchoring — a breach record carries, in context, the instrument the norm derived from (prov:wasDerivedFrom), so a violation points back to its ground.
  • Court-admissible record — a Violated verdict is written to the Write-Ahead Log (crate::wal), which is Merkle-DAG–linked (prev_dag_hash) — an immutable, time-ordered BreachRecord history.
  • Cryptographic endorsement — the Curation Directive: a human signs the interpretation. The breach record is wrapped as a Credential claim and verified with real Ed25519 (crate::verifiable_credential). The engine never holds keys — signing is the identity layer’s job (verifiable_credential::issue); this module only constructs the endorsement envelope and verifies it.

Structs§

EvidencePackage
A compiled, court-admissible evidence package: the breach record, the provenance instrument it is anchored to, and the human endorsement (the Curation-Directive attestation). Bundles the three artefacts a tribunal needs into one structure.

Functions§

breach_predicate
Predicate marking a breach record in the WAL / graph.
breach_provenance
The instrument a breach record is anchored to (its provenance ground).
build_breach_record
Build a court-admissible breach record from a verdict — only if it is Violated. subject = the party in breach, object = the breached content, context = the source instrument (provenance anchor), metadata = the breach time. Zero-heap.
compile_evidence_package
Compile a court-admissible evidence package from a Violated verdict: build the breach record, anchor it to its instrument (provenance), and wrap it as an endorsement credential by endorser (the human attestor). None if the verdict is not a violation (nothing to compile). The package is then SIGNED by the identity layer (verifiable_credential::issue) — the engine never holds keys.
endorsement_credential
Build the endorsement envelope: the Curation-Directive attestation that wraps a breach record as a Credential claim. endorser is the attesting (human) agent; subject is the party the breach concerns. Unsigned — the identity layer signs it with the endorser’s key via verifiable_credential::issue, then anyone verifies with verifiable_credential::verify. Authenticates ORIGIN (who endorsed), not truth.
record_breach_to_wal
Append a breach record to the WAL (court-admissible, Merkle-DAG–linked). Returns true iff a record was written (i.e. the verdict was Violated).
translate_norm_across_jurisdictions
Translate a norm’s content across jurisdictions via a mapping of (source, target) content rows — e.g. mapping an ICCPR Article-7 prohibition to the equivalent domestic-statute provision. Gated by the Curation Directive: a mapping is applied only if attested (a human ratifies the cross-jurisdictional equivalence). Returns the translated norm (content remapped), or None if unmapped/unattested.