Skip to content

patronum.json Schema

The protection config is stored at ~/.claude/patronum/patronum.json.

Full schema

The config file contains a blacklist, a whitelist, and a version field:

json
{
  "blacklist": [
    {
      "pattern": "**/.env",
      "type": "glob",
      "reason": "Environment files may contain credentials",
      "addedAt": "2026-04-08T10:00:00Z",
      "source": "default"
    }
  ],
  "whitelist": [
    {
      "pattern": "**/.env.example",
      "type": "glob",
      "reason": "Safe to read — no real secrets",
      "addedAt": "2026-04-17T10:00:00Z",
      "source": "user"
    }
  ],
  "version": "2"
}

Fields

Entry fields

Both blacklist and whitelist entries share the same structure:

FieldTypeRequiredDescription
patternstringyesGlob pattern or Bash(<command>) format
typestringyesAlways "glob"
reasonstringyesHuman-readable explanation
addedAtstringyesISO 8601 UTC timestamp
sourcestringyes"default" (shipped) or "user" (added manually)

Root fields

FieldTypeDescription
blacklistarrayPatterns that block agent access
whitelistarrayPatterns that explicitly allow access (override blacklist)
versionstringSchema version ("2")

Enforcement order

  1. If the target matches any whitelist pattern → allow (blacklist is skipped)
  2. If the target matches any blacklist pattern → block
  3. Otherwise → allow

This lets you protect a broad pattern (e.g. **/.env.*) while carving out specific exceptions (e.g. **/.env.example).

File location

PathPurpose
~/.claude/patronum/patronum.jsonUser config (survives plugin updates)
defaults/patronum.jsonPlugin defaults (copied on first setup)