Rules
A Rule is a built-in entity type for instructions that live inside your world. Because a rule is an entity like any other, a connected agent can search for it, read it, and follow it — which makes rules much more flexible than one big block of instructions.
Rules cover two broad jobs:
- Descriptive rules document how your world works — laws, canon, policies, game mechanics, a magic system’s constraints. They keep agents (and collaborators) consistent with how things are.
- Active rules direct what an agent does — trackers, workflows, output formats, guidance. Think of them as mini “app” instructions your chat agent runs when the right topic comes up.
Anatomy of a rule
Section titled “Anatomy of a rule”The rule’s properties say when it applies and how it ranks; the actual instructions go in the rule’s lore, where the agent reads them.
| Property | What it does |
|---|---|
trigger |
The cue that activates the rule — e.g. “user mentions exercising or asks about their workout streak”. |
scope |
What the rule reads and writes — one or more entity types, or world for global. |
rule_type |
The category — tracker, app, workflow, format, guidance (active); law, lore, canon, game_mechanic, policy (descriptive). |
priority |
Precedence when several rules apply — higher wins. |
status |
active, paused (temporarily off), archived (retired), or draft. |
trust |
Provenance, ordered high to low: self-authored, imported, ai-generated, shared. A lower-trust rule never overrides a higher one. |
owns_tags |
Tags this rule manages — entities carrying them are the rule’s data. |
Keep your world instructions short
Section titled “Keep your world instructions short”Rules are how you stop the world instructions from sprawling. Instead of spelling out every workflow there, write each one as a rule and leave only a trigger line in the instructions:
When the user mentions working out, look up the Workout Tracker rule and follow it.
The agent pulls the detailed instructions on demand — the world instructions stay a tight index, and you can add, revise, pause, or retire a behavior by editing the rule, without touching them.
Example: a tracker rule
Section titled “Example: a tracker rule”A rule named Workout Tracker might look like:
rule_type: tracker,status: active,scope: eventtrigger:“user mentions exercising or asks about their workout streak”owns_tags: ["workout"]- Lore: “When the user reports a workout, create an event tagged
workoutwith the date, activity, and duration. When asked about streaks or progress, search events taggedworkoutand summarize by week.”
From then on, “I ran 5k this morning” is all it takes — the agent activates the rule, logs the event, and your world accumulates structured history.
The same shape works for anything: a game_mechanic rule that constrains combat resolution, a canon rule that protects established facts, a format rule that fixes how session recaps are written.
For a complete, paste-ready rule — full data model, workflows, query patterns, and the world instructions router line to go with it — see Example: a mini-app rule. And the Orbismo Playbook has ready-made mini apps to install — movie, book, and travel trackers, a recipe box — each a rule entity with its operating instructions as lore.