Skip to main content

Module policy

Module policy 

Source
Expand description

DSFB-Debug: policy engine — paper §5.

Maps the tuple (matched motif, DSA score, confirmed grammar state) to the developer-facing four-level PolicyState:

StateMeaning
SilentNo structural deviation; suppress dashboard
WatchDeviation detected, below escalation threshold
ReviewSustained drift / low slew; surface to operator
EscalateHard envelope breach / high slew; page on-call

The policy state determines whether and how the typed episode reaches the operator surface. Silent and Watch episodes are suppressed from operator alerting (logged for the audit trail only); Review and Escalate episodes flow through to dashboards.

Policy decisions are pure functions of the motif + DSA score + grammar state inputs; they preserve Theorem 9 deterministic replay trivially.

Functions§

apply_policy
Apply policy based on grammar state, DSA score, motif match, and persistence.