Skip to main content

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

FieldTypeDescription
idnumberPrimary key
projectIdnumberOwning project
titlestringShort label
descriptionstringFull rule definition
categorystringGrouping 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

ScopeWhat it guards
WORLD_RULE_CREATECreating a rule
WORLD_RULE_EDITEditing an existing rule
WORLD_RULE_DELETEDeleting a rule