Orchestrata Ultimate › Plans › constitutional-invariants-ratification

Ratification packet — real deny conditions for the remaining decorative invariants

Source: plans/constitutional-invariants-ratification.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-07-24 · 113 lines.

Prose pending.

Plan text

Ratification packet — real deny conditions for the remaining decorative invariants

Design pattern (uniform across all four): deny on positive evidence

Each invariant stays permissive by default and denies iff a ground evidence fact exists for the action. Evidence facts are asserted from outside the rulebase (Python / the Tier-H runtime-signal path / a human), never by rules — consistent with ADR-0005 and the just-ratified human_override change. This gives every article a REAL deny path with zero boot-time fact burden and no behavior change until evidence starts flowing.

All four evidence predicates are declared :- dynamic and enumerable (no cut, no negation of derived predicates — meta-lint stays green by construction).

Proposed clauses

1. accountable_operation/2 (Article 8 — Accountability)

:- dynamic accountability_gap/2.   %% accountability_gap(Action, Gap)
%% Gap ∈ {no_audit_trail, unattributed_actor, unlogged_decision}

accountable_operation(Action, _Context) :-
    atom(Action),
    \+ accountability_gap(Action, _).

Evidence writers: the gateway audit writer (missing audit node for a completed op ⇒ no_audit_trail), the kernel dispatcher (packet with empty actor ⇒ unattributed_actor).

2. resource_efficient/2 (Efficiency article)

:- dynamic resource_budget_exceeded/3.  %% (Action, Metric, Observed)
%% Metric ∈ {tokens, wall_seconds, memory_mb, llm_calls}

resource_efficient(Action, _Context) :-
    atom(Action),
    \+ resource_budget_exceeded(Action, _, _).

Evidence writers: the performance manager / cost tracker on budget breach (budgets already exist as MAX_QA_ROUNDS-class constants; this surfaces breaches to governance).

3. respects_dignity/2 (Article 10 — Dignity)

:- dynamic degrading_interaction/2.  %% (Action, Category)
%% Category ∈ {deception, coercion, harassment, manipulation}

respects_dignity(Action, _Context) :-
    atom(Action),
    \+ degrading_interaction(Action, _).

Evidence writers: human adjudication (stage 3 of the B13 cascade) and compliance-volk findings; no automated classifier in scope for this packet.

4. protects_rights/2 (Article 10 — Rights)

:- dynamic rights_violation/2.  %% (Action, Right)
%% Right ∈ {privacy, data_ownership, consent, access, erasure}

protects_rights(Action, _Context) :-
    atom(Action),
    \+ rights_violation(Action, _).

Evidence writers: privacy/PII handlers (Article 4 machinery already tracks pii_data/2 — an unconsented PII access can assert rights_violation(Action, consent)).

Stratification note (ADR-0010)

Every \+ above negates a DYNAMIC BASE FACT — exactly the stratified-safe class; none can reach extension_point/1 through any closure. The meta-lint remains green.

Tests (delivered with the edit, extending test_constitutional_suite.py)

Per invariant: (1) permit with no evidence fact; (2) DENY once the evidence fact is asserted (ground, test_id-scoped, retracted in finally); (3) the corresponding constitutional_check/3 article fails end-to-end with the fact present; (4) the suite's completeness guard is unaffected (no export changes).

Rollout

Pure tightening with an empty evidence base ⇒ zero behavior change on day one. Denials begin exactly when a writer asserts evidence — each writer wiring is its own reviewed change. No shadow period needed; the fail-open-until-evidence property IS the shadow.

What ratification means

Approving this packet authorizes: the 4 clause replacements + 4 dynamic declarations in constitutional.pl, the suite extension, and nothing else. Evidence-writer wiring comes as separate, ordinarily-reviewed changes.