# POLICY.md — Implementation Notes Policy rules are enforced by the policy engine and the action classifier. --- ## Code Locations - Policy lists: `workspace/james/lib/policy.py` - Engine: `workspace/james/agents/policy/policy_engine.py` --- ## Action Classes ### Internal (auto-allowed) - `restart_container` - `refresh_status` - `reassign_workload` - `collect_logs` - `update_metrics` - `organize_files` - `git_commit` ### External (approval required) - `send_discord` - `send_email` - `publish_message` - `home_automation_changes` - `create_github_issue` - `post_to_social` ### Forbidden - `delete_data` - `shutdown_node` - `purchase` - `public_posting` - `share_private_info` --- ## Decision Logic - Confidence `< 0.6` -> `pending_approval` with clarification - External actions -> `pending_approval` - Forbidden actions -> `denied` - Internal actions -> `allowed` --- ## Approval Timeouts - Critical: 5 minutes - Non-critical: 60 minutes --- ## Policy Event Types - `action.allowed` - `action.pending_approval` - `action.denied`