How a rule fires
Agent wants to edit `src/infra/terraform.tf`
│
▼
┌───────────────┐
│ Global rules │ locked: "no hardcoded secrets"
└───────┬───────┘
▼
┌───────────────┐
│ Group rules │ "infra changes require approval"
└───────┬───────┘
▼
┌───────────────┐
│ Project rules │ "block /infra/ in feature jobs"
└───────┬───────┘
▼
◆ DENY → notify author + dashboard banner -
01
Stack rules from four scopes
Global, group, project, and per-job. Locked rules at the global level cannot be exempted, so a compliance policy survives every downstream customisation.
-
02
Evaluate before the write
Every tool call that would modify state passes through the engine first. Pattern checks, path restrictions, file/line limits, and naming rules all fire synchronously — nothing executes if a locked rule denies.
-
03
Surface the denial, not a crash
Denials become dashboard notifications with the rule, the scope, and an exemption link if the rule is non-locked. The audit trail records who exempted what and why.