policy-enforcer

policy-enforcer is an agent for coding agents 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

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

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.

agentmods
npx agentmods add agents/sethgammon/citadel/policy-enforcer
Clone the repo
git clone --depth 1 https://github.com/SethGammon/Citadel

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00063 $0.01346
Opus 5 $0.00032 $0.00673
Sonnet 5 $0.00013 $0.00269
Haiku 4.5 $0.00006 $0.00135

Measured 4d ago against content hash 6590d43011de, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (916 stars, last pushed today), licensed MIT. It adds 63 tokens to every session and 1,346 once invoked, about $0.0003 per session on Opus 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

implementer

Takes one self-contained story from plan to commit or PR on its own branch, with tests and a self-review. Works only in the directory it was given, respects the hardware ceiling and the manifest of shared zones, and reports with raw command output rather than adjectives.

jjanczur/tyran · 57 tokens

claude_science.zh

Claude Science 采用了更严格的沙箱(sandbox)策略,默认情况下无法读写主目录()下的文件。这会导致通过常规方式配置的 MCP-for-Stata 服务端在启动时直接报错:.

SepineTam/mcp-for-stata · 0 tokens

engineer

Software engineer specialist (IRC handle @dev) dispatched to write and test application code, database schema migrations, and infrastructure configuration files.

NexaDuo/mARC · 30 tokens

incident-commander

Use only when incident-ledger.mjs has an open sev1/sev2 record — a production incident, not a routine bug. Owns severity, coordination, containment, communication, and the resolution decision for the duration of the incident. Conditional role, off between incidents.

vmobifystudio/app-dev-team · 60 tokens

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

delivery-lead

Delivery team lead. Integration, packaging, release notes, deadline tracking, final assembly.

MohamedEmbarak/Supreme-Leader · 21 tokens