| name | safety/permission-gate |
| description | Gate every mutation request against the Claw's declared permission surface — fires before any write to filesystem, vault, or external system. No Claw bypasses this gate. Default skill for Starlight Sentinel and every Claw that carries filesystem or sis_vaults write permissions. |
| type | safety |
Permission Gate
Every mutation request passes through this gate. No Claw bypasses it.
When This Skill Activates
- Any Claw attempts to write files, execute shell commands, or export data
- Keywords: "write", "move", "delete", "execute", "export", "send", "upload"
- Always active when Sentinel Claw is running
- Default for: Starlight Sentinel
What This Skill Does
Evaluates permission requests from Claws against their declared permission surface in CLAW.md, the user's workspace contract, and the active safety posture. Issues a programmatic APPROVE or DENY with logged reasoning.
Procedures
Procedure 1: Permission Evaluation
- Receive permission request:
{ claw_id, action_type, target, declared_reason }
- Load the requesting Claw's
CLAW.md permission block
- Check: is the requested action within the Claw's declared
permissions.* surface?
- Check: is the target path within the declared workspace?
- Check: does the Claw's
mutation_default allow this action without explicit approval?
- If
mutation_default: false → escalate to Procedure 2 (Mutation Approval Request)
- If within permissions +
mutation_default: true → APPROVE, log, return
- If outside permissions → DENY, log reason, return
Procedure 2: Permission Boundary Violation
- Action requested is outside declared permission surface
- Log violation:
{ timestamp, claw_id, requested_action, declared_surface, verdict: DENY }
- Present violation to user in plain language
- Offer: "Update Claw contract to include this permission?" or "Proceed as one-time exception?"
- Never auto-approve boundary violations
Procedure 3: Permission Log Write
- Every decision (APPROVE or DENY) writes to
~/.starlight/logs/permission.jsonl
- Entry includes: timestamp, claw_id, action_type, target (sanitized), decision, reason
- Log is append-only — no entry is ever modified or deleted
Integration Points
- Vaults: Reads Wisdom vault for security principles
- Agents: Primary agent is Starlight Sentinel
- Claws: Called by every Claw with
requires_sentinel: true
- Skills: Composes with
mutation-approval for interactive approval flows
Quality Criteria
- Every mutation is logged before it executes
- Boundary violations are surfaced to the user, never silently resolved
- DENY decisions include a human-readable reason
- Log entries are parseable JSON (not freeform text)