policy-enforcer

policy-enforcer is an agent for Claude Code from SethGammon/Citadel. It costs 63 tokens per session (1,346 once invoked), scanned A, original, MIT.

A read-only policy checker that decides whether a proposed action follows a project's written rules.

In plain words
What is it for?
It checks specified policy rules and returns a structured verdict with any violated rules or warnings. It does not modify files.
Why use it?
It gives a clear allow-or-block decision before actions that may conflict with the project's constitution or safety requirements.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; names the NotebookEdit tool.

Part of the citadel plugin — 48 skills, 7 agents, 2 MCP servers shipped together

Good fit It checks specified policy rules and returns a structured verdict with any violated rules or warnings. It does not modify files.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sethgammon/citadel/policy-enforcer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/SethGammon/Citadel

Made for: Claude Code.

Or install citadel, the plugin that ships this one along with the rest of its 48 skills, 7 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for policy-enforcer

README.md
[![agentmods](https://agentmods.dev/badge/agents/sethgammon/citadel/policy-enforcer/github.svg)](https://agentmods.dev/agents/sethgammon/citadel/policy-enforcer)
Your own site
<a href="https://agentmods.dev/agents/sethgammon/citadel/policy-enforcer"><img src="https://agentmods.dev/badge/agents/sethgammon/citadel/policy-enforcer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for policy-enforcer

Your own site · 80×15
<a href="https://agentmods.dev/agents/sethgammon/citadel/policy-enforcer"><img src="https://agentmods.dev/badge/agents/sethgammon/citadel/policy-enforcer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,346 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01346
Opus 5.5 $0.00025 $0.00538
Sonnet 5.5 $0.00013 $0.00269
Haiku 4.5 $0.00006 $0.00135

Measured 1mo ago against content hash 6590d43011de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

policy-enforcer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/policy-enforcer.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Policy Enforcer

You are a lightweight, read-only policy judge. You receive a proposed action and check it against Citadel's constitution. You return a structured verdict: allow or block.

Inputs (always provided in the prompt)

Action:      {description of what the agent is about to do}
Tier:        {1 | 2 | 3 | all — which rules to check}
Rules:       {comma-separated rule IDs to check, e.g. P-001, P-007}
Context:     {campaign slug, agent type, session state — optional}

The caller may also tell you to read docs/CONSTITUTION.md for the full rule text if needed.

Protocol

  1. Read the specified rules from the prompt (or read docs/CONSTITUTION.md if needed)
  2. For each rule, assess whether the proposed action violates it:
    • Tier 1: Any violation → block. No exceptions.
    • Tier 2: Violation without justification in context → block. Justification logged to Decision Log → allow with warning.
    • Tier 3: Advisory only → always allow, but populate warnings if the rule applies.
  3. Return JSON verdict. No prose before or after the JSON block.

Violation Assessment

For each rule, ask:

  • P-001 (no force-push to main/master): Does the action include git push --force or git push -f targeting main or master?
  • P-002 (no secrets in commits): Does the action commit .env, *.pem, *.key, credentials.*, or secrets.* files?
  • P-003 (no audit deletion): Does the action delete or overwrite .planning/telemetry/audit.jsonl?
  • P-004 (no --no-verify): Does the action pass --no-verify to any git command?
  • P-005 (no harness.json modification in campaign): Does the action modify .claude/harness.json without evidence of explicit user confirmation in context?
  • P-006 (protected files): Does the action modify a file that appears in protectedFiles?
  • P-007 (no remote push without confirmation): Does the action push to a remote repository? Is there evidence of user confirmation in context?
  • E-001 through E-006: Does the action create a hook/agent/skill that violates the stated pattern?
  • W-001 through W-006: Does the action skip a workflow guardrail?

Read the full file on GitHub · 128 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 128 lines · 63 tokens per session scan A 6590d43011de

Subscribe to this mod's changes

policy-enforcer is an agent published in the GitHub repository SethGammon/Citadel (924 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 1,346 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

privacy-reviewer

Use before /app-ship on flagship work for the privacy pass — data inventory, consent, retention, third-party sharing, and regional compliance. Distinct evidence set from security. On utility projects this is not a role at all — security-reviewer runs it as its privacy MODE against the same checklist.

vmobifystudio/app-dev-team · 65 tokens

compliance-reviewer

Flags where a feature, document, or data flow may trigger a named regulatory regime, returning a flag list with each regime named - never legal advice or a legal conclusion. Use when a change touches personal data, health, finance, or regulated communications.

emtcmca/promptsmith · 55 tokens

governance-letter

Drafts HOA and condo board correspondence that is firm, fair, and compliant - violation notices, assessment letters, board communications. Use for community-association owner correspondence.

emtcmca/promptsmith · 38 tokens

patent-creator

Drafts complete patent applications autonomously through 6-phase workflow (estimated 55-80 min). Produces markdown + SVG output requiring DOCX/PDF conversion before USPTO filing.

RobThePCGuy/Claude-Patent-Creator · 42 tokens

eval-judge

Use this agent during the /eval Skill Phase 3 (Epic #803, issue #810; re-aimed by #1381) to judge — from a session-eval record's dimension evidence, kpis, sessionid and a pre-computed facts block — the record's instruction-adherence per rubric-v3.md's Judge Dimensions section and its six ordered decision rules.…

Kanevry/session-orchestrator · 275 tokens

scope

IP strategy — trademark clearance, patent landscape, open source license compliance, IP assignment.

tonone-ai/tonone · 18 tokens