Global Rules
Claustrum supports two global rule scopes:
workspaceglobal rules: shared by everyone in the workspace.userglobal rules: personal rules for a specific user inside the workspace.
Design Goals
- No hard cap like "max 5 rules".
- Use token budget + score-based selection instead of hard truncation.
- Keep important rules (
pinned/high) highly prioritized. - Preserve quality with soft guidance and summary fallback.
Rule Fields
Each rule stores:
title,contentcategory:policy | security | style | process | otherpriority:1..5severity:low | medium | highpinned,enabled
API
GET /v1/global-rules?workspace_key=...&scope=workspace|user&user_id?POST /v1/global-rulesPUT /v1/global-rules/:idDELETE /v1/global-rules/:idPOST /v1/global-rules/summarize
Summarize endpoint
POST /v1/global-rules/summarize
Body:
{
"workspace_key": "personal",
"scope": "workspace",
"mode": "preview"
}
Modes:
preview: returns summary text only.replace: upsertsglobal_rule_summariesfor bundle compression.
Soft Guardrails
Workspace settings control guidance thresholds:
global_rules_recommend_max(default5)global_rules_warn_threshold(default10)
Behavior:
- Above recommend max: info-level guidance.
- At/above warn threshold: warning-level quality warning.
Admin UI
Workspace → Global Rules
- CRUD for workspace/user scope rules.
- Set severity, priority, pinned, enabled.
- See recommendation/warning badges.
- Auto summarize (
preview/apply). - Configure selection mode and budget percentages.
Security & Permissions
- Workspace scope rules: workspace admin required.
- User scope rules: self or workspace admin.
- Summary apply writes
global_rules.summarizedaudit event.