Safe
The most restrictive mode. Foenix operates within a strict whitelist of allowed operations. Allowed:- Editing files only in
/wp-content/themes/[current_theme]/and/wp-content/uploads/ - Database operations only via WordPress APIs (
wp_insert_post,update_option,WP_Query, etc.)
- Any access to
/wp-admin/,/wp-includes/,/wp-content/plugins/, root files (wp-config.php,.htaccess,robots.txt) - A large list of PHP functions and constructs including
eval(),exec(),file_get_contents(),fopen(),shell_exec(),$wpdbdirect queries, and many more - No outgoing HTTP requests without explicit instruction
- No schema changes (CREATE, ALTER, DROP)
- All inputs must be sanitized, all outputs must be escaped
Balance
A middle ground. Foenix can operate in a wider scope but still respects core safety boundaries. Allowed:- Same file system scope as Safe mode
- Database read/write via WordPress API
/wp-admin/,/wp-includes/,/wp-content/plugins/, root files- Critical dangerous functions:
eval(),create_function(),exec(),shell_exec(),system(),passthru(),base64_decode() - No outgoing HTTP requests to payment gateways without explicit user confirmation
- No raw SQL schema changes
Hard
The least restrictive mode. No safety policy is applied - Foenix generates code without additional constraints. This gives the most power and flexibility, but also the highest risk of something breaking. Use with caution on production sites.Which mode to choose
| Situation | Recommended mode |
|---|---|
| Production site, content tasks | Safe or Balance |
| Active development on staging | Balance or Hard |
| Complex plugin or theme work | Hard (with backup) |
| Autonomous agents | Safe or Balance |