# DWELL_AND_BOUND_RULES

**Type:** Doctrine (control-systems dampening, ceremonial detection, escalation routing)
**Authority:** Ogata closed-loop control theory; NICE clinical audit re-audit scheduling; E-S05 E-R5.3 five-signal inventory; Jacovi et al. (2021) trust-calibration oscillation.
**Invocation:** SKILL.md Phases 4, 5, 6 -- and Phase 2 for ceremonial detection. Runs AFTER predicate evaluation (`COMPOSITE_TRIGGER_SPEC.md`), BEFORE enforcement-surface handoff.

---

## 1. Five-Signal Inventory (E-S05, E-R5.3)

E7 tracks five diagnostic signals per cycle. They feed the gates below; they are NOT the verdict.

| Signal | Source | Reads |
|---|---|---|
| S1 Reopen count | Ledger | Reopen events in current cycle. |
| S2 Reopen-to-reopen interval | Ledger | Time since last reopen-close. |
| S3 Repeat-evidence pattern | Ledger + P4 | Artifact-key equality to prior close-evidence. |
| S4 Ceremonial-pattern signal | E9 | Over-report within reopen domain. |
| S5 Metric-identity flag | Charter + Ledger | Same metric triggers close and reopen. |

Signals are additive. No single signal produces a verdict.

---

## 2. Control-Systems Dampening (Three Gates)

Ogata: oscillation is guaranteed when trigger delay is shorter than plant response time, or when gain is unbounded. E7 imposes three gates.

### 2.1 Minimum dwell-time gate (Phase 4)

- Read `charter.dwell_time_floor` (seeded as expected-fix-implementation-time).
- If `(now - last_reopen_close) < dwell_time_floor` -> `PASS-DEFERRED`; increment `sub_dwell_deferral_counter`.
- If counter `>= charter.sub_dwell_cap` -> route to Phase 6.
- Analog (NICE): re-audit interval bounded to the lower of expected-change-realization and compliance-decay time. Sub-interval reopens are not audits; they are pressure.

### 2.2 Bounded-count gate (Phase 5)

- Read `charter.reopen_ceiling_N` (default `N=2`; pilot-calibrated).
- If `reopen_count >= N` -> Phase 6. Never silent `PASS`.
- Analog: unbounded loop gain implies instability. Bounding is the audit analog of gain margin.

### 2.3 Trigger threshold above noise floor

Materiality thresholds MUST sit above a Charter-declared noise floor. Omission -> halt with `EC-CHARTER-MISSING`.

---

## 3. Ceremonial-Reopen Detection (Phase 2)

Ceremonial reopens are driven by manufactured findings. E9 flags them; E7 suppresses without silent `PASS`.

1. Before composite evaluation, read E9 `ceremonial_pattern_signal` scoped to reopen domain.
2. If TRUE: emit suppression record `{suppressed, e9_signal, basis}`; notify E9; emit `PASS` WITH `ceremonial_detection.suppressed = true`.
3. If FALSE: proceed.

**Scoping fallback.** If E9 emits only global ceremonial signals, E7 derives a scoped signal restricted to findings that drove prior reopens in this cycle. Infeasible derivation -> halt with `EC-INPUT-MISSING`.

---

## 4. Oscillation / Escalation-to-Human (Phase 6 Internal Mode)

Escalation-to-human is an **internal mode** of E7, not a standalone skill.

**Triggers:** P4 failure (repeat evidence), sub-dwell cap reached, or bounded-count breached.

**Behavior:**

1. Construct convergence-failure history snapshot (reopen events, triggers, close-evidence, timestamps).
2. Emit `ESCALATED` with `{reason, history_snapshot, receiver_id}`.
3. FREEZE further automated reopens until human disposition arrives via Charter.
4. Notify E9.
5. Log via `REOPEN_EVENT_RECORD.md` (write-through via E4).

**Receiver.** Charter input `escalation_receiver_id`. E7 is agnostic to receiver identity; it only enforces the freeze.

---

## 5. Joint Guarantees

- No sub-dwell reopen -> short-wavelength oscillation prevented.
- No unbounded reopens -> loop gain bounded.
- No ceremonial-driven reopen -> E9 over-report cannot hijack.
- No silent convergence failure -> escalation fires before undefined-state exit.

Removing any gate re-introduces a failure mode from E-S05.
