World Rules
World rules encode the canon of a project — physical laws, lore constraints, character behavioral limits, and content policies. They are injected into every LLM prompt as part of the system context, ensuring AI-generated content stays consistent with the project universe.
Data model
| Field | Type | Description |
|---|---|---|
id | number | Primary key |
projectId | number | Owning project |
title | string | Short label |
description | string | Full rule definition |
category | string | Grouping label (e.g. setting, character, content-policy) |
Role in AI generation
Whenever the LLM service generates or analyzes content, it builds a context object that includes all world rules for the project. The canon check (POST /llm/canon-check) explicitly evaluates each scene block against the rule set and flags violations.
Frontend
World rules are managed in the Project Settings → World Rules panel. Writers with WORLD_RULE_CREATE can add rules; admins can edit or delete any rule.
Permission scopes
| Scope | What it guards |
|---|---|
WORLD_RULE_CREATE | Creating a rule |
WORLD_RULE_EDIT | Editing an existing rule |
WORLD_RULE_DELETE | Deleting a rule |