> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rules

> Automated reward logic triggered by events

A rule pairs a CEL `condition` with a list of `actions`. When an event is processed, rules evaluate in `order` within the program. Matching rules execute their actions in the same transaction. Each rule can include an optional `description`, time windows, and budget constraints.

## Endpoints

* **CRUD**: create, list, get, and update rules
* **Validate**: check a CEL condition for syntax errors without creating a rule
* **Simulate**: dry-run a rule against a test event payload
* **Reset budget**: reset per-asset `budgets` on a rule
* **Change history**: retrieve the audit trail for a rule

<Note>
  For usage patterns and examples, see the [Writing Rules guide](/guides/writing-rules).
</Note>
