Create ERDL Rule
erdl_create_ruleCreate behavioral rules from natural language to control AI agent actions, enabling instant enforcement of allow/deny/correct decisions across coding, writing, design, and more.
Instructions
Create a new ERDL rule from natural language. Use this when the user corrects your behavior and wants you to "remember" it.
EXAMPLE SCENARIOS:
User: "Never use 'any' types" → Create: coding rule, intent: "write typescript code", DENY if "any" appears
User: "Don't start with 'in today's world'" → Create: writing rule, intent: "write blog post", DENY
User: "Always use Tailwind, never inline styles" → Create: design rule, intent: "create UI", ALLOW with instruction
The rule is saved to ~/.openoba/rules/ and takes effect immediately (no restart needed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | Rule category | |
| decision | Yes | ALLOW with instruction, or DENY with reason, CORRECT with correction, REQUEST_HUMAN for approval | |
| keywords | No | Tool names or arg values to match against | |
| triggers | No | Tool names that should trigger this rule (e.g., ["exec", "write_file"]) | |
| instruction | Yes | What the Agent should do (for ALLOW) or the reason for blocking (for DENY) | |
| naturalLanguage | Yes | The rule described in natural language, e.g., "Never use TypeScript any type, use unknown instead" |