system-governor

system-governor is an agent for Claude Code from softspark/ai-toolkit. It costs 27 tokens per session (2,011 once invoked), scanned B, original, Apache-2.0.

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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit 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.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/softspark/ai-toolkit/system-governor
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/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 hooks.

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 system-governor

README.md
[![agentmods](https://agentmods.dev/badge/agents/softspark/ai-toolkit/system-governor/github.svg)](https://agentmods.dev/agents/softspark/ai-toolkit/system-governor)
Your own site
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/system-governor"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/system-governor/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 system-governor

Your own site · 80×15
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/system-governor"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/system-governor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 2,011 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00027 $0.02011
Opus 5.5 $0.00011 $0.00804
Sonnet 5.5 $0.00005 $0.00402
Haiku 4.5 $0.00003 $0.00201

Measured 22d ago against content hash 4153c2063dfd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 22d 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/rules/ai-toolkit-constitution.md` (a project without a global install: `.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/rules/ai-toolkit-constitution.md (a project without a global install: .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 of the constitution file read above 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. 22d ago Changed 4153c2063dfd
  2. 1mo 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 (180 stars, last pushed 2d ago), licensed Apache-2.0. It adds 27 tokens to every session and 2,011 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

go-observability-reviewer

Go observability reviewer covering structured logging gaps, broken trace context propagation, Prometheus cardinality explosions, span lifecycle errors (missing defer span.End(), unrecorded errors), and sensitive fields in logs. Use when Go code changes import go.uber.org/zap, log/slog, go.opentelemetry.io…

johnqtcg/awesome-skills · 119 tokens

go-concurrency-reviewer

Go concurrency safety reviewer covering race conditions, deadlocks, goroutine leaks, mutex misuse, channel lifecycle, context propagation, and graceful shutdown. Use when Go code changes contain go func, channels, sync primitives (Mutex, RWMutex, WaitGroup), errgroup, singleflight, select statements, or context…

johnqtcg/awesome-skills · 85 tokens

go-error-reviewer

Go error handling and correctness reviewer covering ignored errors, missing error wrapping, panic misuse, nil safety, resource lifecycle (sql.Rows, resp.Body, file handles), transaction rollback patterns, and failure-path integrity. Use when Go code changes contain error returns, panic calls, sql.Rows, tx.Begin, HTTP…

johnqtcg/awesome-skills · 97 tokens

go-logic-reviewer

Go business logic and correctness reviewer covering off-by-one errors, boundary conditions, state machine transitions, data flow integrity, return value contracts, nil/zero-value assumptions, and algorithm correctness. Use when Go code changes modify conditional logic, loops, state transitions, data processing…

johnqtcg/awesome-skills · 81 tokens

go-quality-reviewer

Go code quality and style reviewer covering function length, nesting depth, naming conventions, mutable globals, interface design, receiver consistency, modern Go idioms (slog, generics, typed atomics), and golangci-lint integration. Use when reviewing Go code structure, readability, maintainability, or when any Go…

johnqtcg/awesome-skills · 85 tokens

go-test-reviewer

Go test quality reviewer covering table-driven test patterns, t.Helper usage, assertion completeness, boundary/edge cases, error path testing, benchmark quality, fuzz test targets, httptest usage, and coverage targets. Use when Go code changes include test.go files, test helpers, testdata directories, testing.B…

johnqtcg/awesome-skills · 89 tokens