Proactive layer
- Model
rm -rf ~ - Event
tool.before - Rule
DangerousCommandGuardevaluate(event, state) - Action
Gate.askcommand stopped
Rules never watch Agent internals; they watch the event stream. Landing the action is the framework's job.
| Concept | Is | Detail |
|---|---|---|
| Event | A record that something just happened; append-only | Event layer |
| Policy | A Python class: which events it watches, and how it decides. A new capability is a new class. | Rules and how they run |
| Lane | Gate blocks before and must be fast; observer watches after and may be slow. Opposite timing, so they stay apart. | Rules and how they run |
| Action | Fixed set: block, allow or ask; remind; inject a hint; prepare in the background | Three template rules |
| State | The current situation, folded from events | Events and state |
State is why this is more than a hook. A rule that only looks at one moment needs nothing else. “Same tool failed three times in a row” needs memory, and with hooks every such rule hand-rolls a counter, its resets and session isolation.
Left out on purpose
Each can be added without rework; research notes are in _research_archive/.
- Crash recovery and tamper resistance for persisted events
- Offline replay to measure a new rule's false-positive rate
- Adversarial security and secret redaction
- Interruption budgets and automatic breakers;
cooldown_scarries the load
Implementation status
The code is in openprogram/runtime/proactive/, tested but not installed at worker start. Per-action state: Rules and how they run.
Last updated · 2026-11-25