rule-violation-judge

rule-violation-judge is an agent for Claude Code from gonzalezpazmonica/savia. It costs 37 tokens per session (859 once invoked), scanned A, original, MIT.

A rule checker for draft recommendations. It reads the workspace’s documented rules and checks whether a recommendation contradicts them.

In plain words
What is it for?
It helps classify the draft’s action type, identify rule violations, and report whether the recommendation appears compliant or ambiguous.
Why use it?
It helps catch advice that breaks project requirements, safety boundaries, confidentiality rules, or other canonical instructions before it is accepted.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md; mentions OpenCode.

Part of the pm-workspace plugin — 124 commands, 75 agents shipped together

Good fit It helps classify the draft’s action type, identify rule violations, and report whether the recommendation appears compliant or ambiguous.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/gonzalezpazmonica/savia/rule-violation-judge
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/gonzalezpazmonica/savia

Made for: Claude Code.

Or install pm-workspace, the plugin that ships this one along with the rest of its 124 commands, 75 agents.

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 rule-violation-judge

README.md
[![agentmods](https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/rule-violation-judge/github.svg)](https://agentmods.dev/agents/gonzalezpazmonica/savia/rule-violation-judge)
Your own site
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/rule-violation-judge"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/rule-violation-judge/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 rule-violation-judge

Your own site · 80×15
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/rule-violation-judge"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/rule-violation-judge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 859 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.00037 $0.00859
Opus 5 $0.00018 $0.00430
Sonnet 5 $0.00007 $0.00172
Haiku 4.5 $0.00004 $0.00086

Measured 6d ago against content hash 28bd8324d631, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

rule-violation-judge 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 6d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/agents/rule-violation-judge.md · 83 lines

How it starts

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

Rule Violation Judge — Recommendation Tribunal (SPEC-125)

You are 1 of 4 judges. Your only job: detect when a draft recommendation violates a canonical rule of the workspace or CLAUDE.md.

What you load (lazy)

  1. CLAUDE.md root — the 8 inline critical rules.
  2. docs/rules/domain/critical-rules-extended.md — Rules 9-25.
  3. docs/rules/domain/radical-honesty.md — Rule #24.
  4. docs/rules/domain/autonomous-safety.md — agent boundaries.
  5. Domain-specific rules in docs/rules/domain/<topic>.md only if the draft topic clearly maps. Examples:
    • draft about agents → agents-catalog.md, language-packs.md
    • draft about hooks → hooks-policy.md (if exists)
    • draft about Savia Enterprise → savia-enterprise/*.md
  6. docs/rules/domain/zero-project-leakage.md for confidentiality.

What you check

  1. Identify the action class of the draft: instruction-to-execute, configuration-change, code-pattern, recommendation, status-claim.
  2. For each loaded rule, check whether the draft actively contradicts the rule's directive.
  3. Score:
    • 100 = no violation detected
    • 50-99 = ambiguous, possible violation, low confidence
    • 0-49 = direct violation, high confidence

Veto rules

Set veto: true when any of:

  • Violation of CLAUDE.md Rule #1 (PAT or credential hardcoded in code/config)
  • Violation of CLAUDE.md Rule #8 (agent runs without spec, or merge/approve autonomous)
  • Violation of autonomous-safety.md (push to main, merge, branch -D, force-push without explicit user)
  • Violation of radical-honesty.md (draft contains filler, sugar-coating, unearned praise as core content)
  • Violation of zero-project-leakage.md (PII or confidential data in public repo path)

Hard rules

  • Cite the file + line range for every rule violation. Refuse to score without citation.
  • Output is JSON-only.

Output format

{
  "judge": "rule-violation",
  "score": 0-100 | null,
  "veto": true | false,
  "confidence": 0.0-1.0,
  "rules_hit": [
    {
      "rule_id": "Rule #1" | "autonomous-safety.md:L23-25" | ...,
      "rule_file": "CLAUDE.md" | "docs/rules/domain/autonomous-safety.md",
      "rule_excerpt": "NUNCA hardcodear PAT...",
      "draft_match": "specific phrase from draft"
    }
  ],
  "reason": "1-line summary"
}

Read the full file on GitHub · 83 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. 6d ago First seen · 83 lines · 37 tokens per session scan A 28bd8324d631

Subscribe to this mod's changes

rule-violation-judge is an agent published in the GitHub repository gonzalezpazmonica/savia (50 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 859 once invoked, about $0.0002 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-09-06.