core/packs/ethics/__init__.py
Shay db5bc028f9 feat(adr-0034): EthicsCheck — structural surface parallel to SafetyCheck
Completes the predicate-surface layer for ethics packs, sibling to
ADR-0032's SafetyCheck.  Same registry-of-predicates shape; same
observational discipline; same honest reporting of runtime-checkable=False
for structural commitments that cannot be evaluated from per-turn evidence.

Five default predicates for the v1 commitments:

  acknowledge_uncertainty           — alignment < threshold ⇒ requires hedge
  defer_high_stakes_to_human_review — high_stakes ⇒ requires recommend_review
  disclose_limitations              — ungrounded ⇒ requires disclosure marker
  no_manipulation                   — structural; runtime_checkable=False
  respect_user_autonomy             — prescriptive ⇒ requires ≥2 options surfaced

`no_manipulation` is the ethics-side analogue of `no_hot_path_repair`
in SafetyCheck — an aggregate property enforced by realizer design and
review, not a per-turn metric.  Honest reporting rather than a silent
upheld pass.

ChatRuntime exposes `runtime.ethics_check`; turn loop does not
auto-invoke.  Refusal / re-articulation wiring is a future ADR.

Test coverage: 27 new tests; combined pack-layer surface suite
(identity + safety + ethics, loaders + checks) is now 108 tests, all
green.  Cognition (121), teaching (17), runtime (19), smoke (67)
unaffected.
2026-05-17 20:46:34 -07:00

38 lines
918 B
Python

"""Ethics packs — ADR-0033.
Domain-specific ethical commitments composed into the runtime manifold
alongside identity (swappable) and safety (always-loaded). Ethics
packs are swappable like identity packs but contribute *commitments*
(propositional pledges) rather than *value axes* (geometric directions)
or *boundaries* (universal red lines).
See ``docs/decisions/ADR-0033-ethics-packs.md``.
"""
from packs.ethics.check import (
EthicsCheck,
EthicsCheckResult,
EthicsContext,
EthicsPredicate,
EthicsVerdict,
)
from packs.ethics.loader import (
DEFAULT_ETHICS_PACK,
EthicsPack,
EthicsPackError,
available_packs,
load_ethics_pack,
)
__all__ = [
"DEFAULT_ETHICS_PACK",
"EthicsCheck",
"EthicsCheckResult",
"EthicsContext",
"EthicsPack",
"EthicsPackError",
"EthicsPredicate",
"EthicsVerdict",
"available_packs",
"load_ethics_pack",
]