Policy Engine 1.4.0
A deterministic, inspectable stage that maps signal snapshots to already allowlisted candidate intents.
Responsibility
evaluatePolicy(signals, { root }) is pure with respect to DOM writes. controller.runAuto() may evaluate and then submit candidates through the normal apply pipeline.
Pipeline position
Signals → Policy → candidate Intents. An optional local ranker may reorder those candidates before validation; it cannot add candidates.
Automatic mode
const controller = startAdapt(document, { auto: true });
controller.runAuto({ viewport: { width: 500, height: 800 } });Constraints
| Policy may | Policy must not |
|---|---|
| Use semantic roles and aggregate signals | Write DOM |
| Emit known intent types and values | Bypass scope, allowlists, or guardrails |
| Remain deterministic without AI | Require Local AI |
Loop protection
Automatic resize collection is enabled only with auto: true. Mutations made by Semantic Apply do not re-enter policy.