Documentation Index
Fetch the complete documentation index at: https://docs.enact.cloud/llms.txt
Use this file to discover all available pages before exploring further.
What is a Policy?
The workflow does whatever you tell it to. Policies decide whether it should run at all. They run first, before any action fires. If any policy fails, the whole run is blocked and you get a receipt explaining why. A policy is a plain Python function — no LLMs, no magic. It reads thecontext and returns pass or fail with a reason.
Writing a Policy
Here’s a concrete example. The standard engineering rule: no one pushes directly tomain. Agents break this constantly because no one told them not to. The Amazon Kiro incident was exactly this pattern — a direct infrastructure change with no review step caused a 13-hour AWS outage.
Registering Policies
Pass them toEnactClient. Multiple policies = all must pass:
Built-in Policies
Enact ships 30 built-in policies across 9 categories:| Category | Policies | What they block |
|---|---|---|
| Git | dont_push_to_main, require_branch_prefix, max_files_per_commit, dont_delete_branch, dont_merge_to_main | Direct pushes to main, wrong branch names, blast radius |
| Database | dont_delete_row, dont_delete_without_where, dont_update_without_where, protect_tables, block_ddl | Dangerous deletes, unscoped updates, DDL like DROP TABLE |
| Filesystem | dont_delete_file, restrict_paths, block_extensions | File deletions, path traversal, sensitive files (.env, .key) |
| Access | contractor_cannot_write_pii, require_actor_role, require_user_role, dont_read_sensitive_tables, dont_read_sensitive_paths, require_clearance_for_path | Unauthorized access, PII exposure |
| CRM | dont_duplicate_contacts, limit_tasks_per_contact | Duplicate records, rate limiting |
| Time | within_maintenance_window, code_freeze_active | Actions outside allowed hours, during code freezes |
| Slack | require_channel_allowlist, block_dms | Off-list channel posts, direct messages to users |
no_mass_emails, no_repeat_emails | Mass email blasts, spamming the same recipient | |
| Cloud Storage | dont_delete_without_human_ok | S3/GDrive deletions without cryptographic HITL approval |