Session 4 step 17 — 5 autonomy levels (0-4), PreToolUse approval-gate hook polls approval-responses.jsonl with 60s timeout, blocks on no-response. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.3 KiB
Markdown
40 lines
1.3 KiB
Markdown
# Governance: {{PROJECT_NAME}}
|
|
|
|
## Autonomy Levels
|
|
|
|
- Level 0: Full manual approval (all tool calls require human OK)
|
|
- Level 1: Auto-approve safe operations (Read, Glob, Grep)
|
|
- Level 2: Auto-approve file operations (+ Write, Edit within project)
|
|
- Level 3: Auto-approve all except destructive (+ Bash non-destructive)
|
|
- Level 4: Full autonomy with hooks as guardrails
|
|
|
|
Current level: {{AUTONOMY_LEVEL}}
|
|
|
|
## Approval Gates
|
|
|
|
Gates are checkpoints where the agent MUST pause and request human approval.
|
|
|
|
- {{GATE_1_NAME}}: {{GATE_1_CONDITION}}
|
|
Action: {{GATE_1_ACTION}}
|
|
- {{GATE_2_NAME}}: {{GATE_2_CONDITION}}
|
|
Action: {{GATE_2_ACTION}}
|
|
|
|
## Escalation Rules
|
|
|
|
- Budget exceeded: pause agent, notify via {{NOTIFICATION_METHOD}}
|
|
- Error threshold: after {{ERROR_THRESHOLD}} consecutive errors, pause agent
|
|
- Unknown tool call: block and log
|
|
- Scope violation: block and notify
|
|
|
|
## Audit Requirements
|
|
|
|
- All tool calls logged to audit.log
|
|
- Budget events logged to cost-events.jsonl
|
|
- Approval decisions logged to approvals.log
|
|
- Retention: {{LOG_RETENTION_DAYS}} days
|
|
|
|
## Philosophy
|
|
|
|
Autonomy is a privilege you grant. Start at Level 0 and increase only
|
|
when the agent has demonstrated reliable behavior at the current level.
|
|
Each level adds capability while hooks maintain the guardrails.
|