Overview
EscalationDecision is the structured output of the PrefrontalLayer (Layer 3). It encapsulates the decision of whether to wake the agent, what question to ask, and metadata about the confidence and event window.
Invariant: should_escalate is True only when question is a non-empty string.
Import
Class Definition
EscalationDecision is a dataclass defined in pulse/prefrontal.py:17.
Attributes
Unique identifier of the module that triggered this decision.
Whether the agent should be woken for this event.
True only if:- Score meets or exceeds threshold
- Question template is valid and non-empty
- Template substitution succeeded
The escalation question to present to the agent, or
None if should_escalate is False.Constructed by substituting {location} in the module’s question_template with the location from the most recent event in the window.The relevance score from LimbicLayer that triggered this decision, in range [0.0, 1.0].This is the raw LSTM output before gating by Prefrontal.
The sequence of SignalEvent objects that were evaluated to produce this decision.Typically a single event in the current implementation, but the architecture supports multi-event windows.
Usage
EscalationDecision objects are produced by PrefrontalLayer.evaluate() and delivered to the kernel via the escalation handler registered with PulseRegistry.
Example Decision
No-Escalation Cases
Whenshould_escalate=False, the decision looks like:
See Also
- PrefrontalLayer — Produces EscalationDecision objects
- PulseRegistry — Delivers decisions via
on_escalation()handler - SignalEvent — Events contained in the
windowfield