When to Use This Skill
- A hook script returns inconsistent JSON decision envelopes (missing
action, reason, or confidence keys)
- Exit codes from hook scripts are not mapped to block/warn/allow semantics consistently
- A new policy hook is being authored and needs a standard output contract
- Hook decision output is being parsed by downstream routing or audit logic that requires a stable schema
- A hook exits 0 on error, causing silent policy bypasses
Not for: hooks that emit human-readable text only, or hooks whose output is not consumed by routing or audit agents.
Decision Envelope Schema
{
"action": "block | warn | allow",
"reason": "string (required, max 120 chars)",
"confidence": 0.0,
"tags": ["policy:boundary", "severity:high"],
"exit_code": 0
}