# Invariants

| Invariant | Rule | Otherwise |
| --- | --- | --- |
| No self-triggered loop | An event the framework caused cannot start another action | `Prepare` feeds `Prepare`: endless cost and noise |
| No auto-silencing of guardrails | Any future auto-silencing applies to observer alerts only | Repeated rejections switch off the guard before the dangerous command that matters |

Enforced by the framework core. Rules cannot disable or work around them. Adversarial safety: [Threat model](https://fzkuji.github.io/OpenProgram/docs/reference/design/proactive/_research_archive/threat-model.html).

## The one allowed chain

1. A normal event (user, Agent or tool) reaches an observer.
2. The observer starts one `Prepare`.
3. `Prepare` finishes with a ready event.
4. That event may only decide whether to `Notify` once. No further `Prepare` or injection.

```
def allow_action(event, action):
    if event.started_by_framework:
        return action is Notify and chain_within_one_hop
    return True
```

## Implementation status

The engine drops every event with `origin="proactive"` or `metadata["root_origin"]="proactive"` before rules see it, so the loop cannot form. The one-hop `Notify` is not built, since `Prepare` has no runner yet. The only interruption control is `cooldown_s`, with `DangerousCommandGuard` at 0.

[Three template rules](https://fzkuji.github.io/OpenProgram/docs/reference/design/proactive/policies-mvp.html)
