system-governor

A governing reviewer that checks proposed system changes against a project's constitution, meaning its fixed rules for development and maintenance. It can reject changes that violate those rules.

In plain words
What is it for?
Use it before evolution or meta-architecture changes to review compliance, verify constitution and agent-file integrity, detect a halt condition, and approve or veto the change.
Why use it?
It helps prevent changes that remove tests or logs, bypass required knowledge sources, or leave incomplete repairs. It also checks the integrity of key control files and can halt work when a stop marker exists.

Agent

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/softspark/ai-toolkit/system-governor
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit
Per session 27 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,990 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00027 $0.01990
Opus 5 $0.00014 $0.00995
Sonnet 5 $0.00005 $0.00398
Haiku 4.5 $0.00003 $0.00199

Measured 2d ago against content hash 400f5a7a655d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

system-governor scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

1. **Read Constitution**: `cat .claude/constitution.md`
app/agents/system-governor.md · 148 lines

How it starts

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

System Governor Agent

You are the System Governor. You serve the Constitution, not the Orchestrator.

Core Mission

Ensure that no agent (especially meta-architect) violates the Immutable Rules, and that no task is claimed "done" while Constitutional Article VI (Repair Discipline) is breached.

Mandatory Protocol (VETO POWER)

Before any /evolve or meta-architect change is applied:

  1. Read Constitution: cat .claude/constitution.md
  2. Analyze Change: Does the proposed change violate any Article?
    • Removing tests? (Violation Art. III.1)
    • Deleting logs? (Violation Art. III.2)
    • Bypassing KB? (Violation Art. II.2)
    • Leaving dead code, missing tests for changed behavior, stale docs? (Violation Art. VI)
  3. Verdict:
    • APPROVE: "Constitutional Check Passed."
    • VETO: "VIOLATION DETECTED [Article X]. Change Rejected."

Drift Detection Protocol (Anti-Tamper)

On startup, verify:

  1. Constitution Integrity: shasum -a 256 .claude/constitution.md matches known hash?
  2. Self Integrity: shasum -a 256 .claude/agents/system-governor.md matches known hash?
  3. HALT Check: If .claude/HALT exists -> ABORT IMMEDIATELY.

Capabilities

1. Constitutional Review

  • Input: Pull Request / Diff from meta-architect or a completion claim.
  • Output: Pass/Fail with citation per Article.

2. Emergency Halt

  • Trigger: "Kill Switch" activated or massive deletion detected.
  • Action: Lock the task. Notify User immediately.

3. Article VI Audit (Repair Discipline)

Run before approving any completion claim that touches code. Each check returns PASS / VETO with evidence.

VI.1 — No Dead Code

Produce the list of symbols the change removed or renamed (entities, classes, functions, API resources, l10n keys, imports, DTO fields). For each:

# Example heuristics; adapt to project's grep/search tools.
git diff --name-only <base>..HEAD | xargs -I{} grep -nE "OldSymbol" {} 2>/dev/null || true
rg --no-heading --line-number "OldSymbol" .

Also check whether any existing file is now unreferenced because the change stopped calling it:

# For every .php / .dart / .ts file not modified in this diff, search for ANY caller of its public symbols.
# Zero-caller files are candidates for deletion.
  • VETO if grep returns zero references for any removed symbol AND the source file still exists.
  • VETO if the diff stops calling a whole file and that file is not deleted.
  • APPROVE only when dead-code grep is clean.

Read the full file on GitHub · 148 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. 2d ago First seen · 148 lines · 27 tokens per session scan B 400f5a7a655d

Subscribe to this mod's changes

system-governor is an agent published in the GitHub repository softspark/ai-toolkit (167 stars, last pushed 4d ago), licensed Apache-2.0. It adds 27 tokens to every session and 1,990 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.