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:
| State | Meaning |
|---|---|
Silent | No structural deviation; suppress dashboard |
Watch | Deviation detected, below escalation threshold |
Review | Sustained drift / low slew; surface to operator |
Escalate | Hard 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.