Open Source · Model-Agnostic · Rust CLI
Engineering leads are nervous about giving agents write access. ScopeWarden holds Claude, Codex, OpenCode, and any shell-wrapped agent accountable — every file changed is checked against the goal you declared, automatically, on every turn.
Why this exists
01
Scope drift
Agent finishes the task, then silently "fixes" adjacent files. The diff is hard to review and trust collapses at code review.
universal02
No accountability
You gave the agent a goal but there's no record, no audit, no check that it actually stayed inside it. You find out at review — or in production.
engineering leads03
No write-access boundary
Agents touch .env, migrations, auth. One wrong run wipes data. No native guardrail exists across any agent tool today.
security · productionScopeWarden adds accountability at the diff boundary.
No editor integration required. If your agent runs in a shell, ScopeWarden can hold it accountable.
Integration
Your agent doesn't change. ScopeWarden works at the Git boundary — checking every diff against your declared goal. Three ways to integrate.
Keep running Claude or Codex exactly as you do today. Open a second terminal for ScopeWarden. Set your mission, run your agent, then check.
Install once per repo. Every git commit automatically runs scopewarden check. Your agent workflow is completely unchanged.
Run once per project. ScopeWarden writes your policy rules and scope commands into the agent's native instructions file — CLAUDE.md for Claude, AGENTS.md for Codex. The agent reads these automatically, no flags needed.
How it works
ScopeWarden is a layered Rust CLI that holds agents accountable. Deterministic rules run first — fast, always. The LLM judge is opt-in and can only make the result more cautious, never less safe.
Captures the baseline commit on scopewarden start. After the agent runs, it diffs the working tree against that baseline: changed files, line counts, deleted files, binary changes, and untracked files.
Pure deterministic rules. No LLM. Checks allowed paths, blocked paths, max files, max lines, protected files, package manifests, migrations, lock files, and deleted files. Hard blocks cannot be overridden by the judge.
Asks an LLM: "Does this diff match the stated goal?" Supports the shared judge interface and real local Ollama CLI execution. Returns a 0-100 drift score, verdict, reasons, risky files, and a recommended action.
Combines policy result + judge result using a strict hierarchy: hard block > judge recommendation > soft warn. Outputs: continue, warn, ask, or block — configured per-rule in YAML.
Three output formats: action-first terminal guidance for humans, JSON for automation, and Markdown for PR comments or session logs. Reports are saved under .scopewarden/.
scopewarden agents detect inspects your project for local agent context files and infers the active session. scopewarden attach --agent auto --apply writes a session from the detected context. scopewarden monitor --agent auto watches continuously.
scopewarden watch opens a live terminal dashboard: changed files, policy meters, run history, and scope status updating in real time as your agent edits the codebase.
Declare your mission and pick your agent. ScopeWarden records the git baseline, then checks every changed file against your goal when you're done.
--agent claude
Claude
--agent codex
OpenAI Codex CLI
--agent codex-app
Codex App (GUI)
--agent cursor
Cursor AI
--agent gemini
Google Gemini CLI
--agent opencode
OpenCode
--agent openclaw
OpenClaw
--agent hermes
Hermes Agent
--agent copilot
GitHub Copilot CLI
--agent antigravity
Antigravity IDE
Applications
Run the app directly if it is installed, or launch the same app through Ollama with qwen3.5.
Claude Code
Native
Ollama
Codex App
Native
Ollama
OpenClaw
Native
Ollama
Hermes Agent
Native
Ollama
Codex
Native
Ollama
OpenCode
Native
Ollama
Live TUI Dashboard
Run scopewarden watch alongside your agent. The live dashboard shows scope status, file change activity, and an LLM judge verdict — all without wrapping or interrupting your agent.
j in the watch TUI to send all changed files and your mission statement to Claude, OpenAI, Gemini, OpenRouter, or a local Ollama model. It responds with a semantic verdict, a confidence score, and a natural-language reasoning string — not just pattern matching.
judge.provider = "claude" | "openai" | "gemini" | "openrouter" | "ollama" — configure once in scopewarden.yaml.
Plugin Integration Workflow
Use ScopeWarden in two ways: local instruction files for any agent, or Claude Code's plugin marketplace flow. The pre-commit hook still enforces scope at every commit — no wrapper command, no manual review step.
agent
Claude / Codex
makes changes
pre-commit hook
scopewarden check
runs automatically
scopewarden
check --json
runs in < 100ms
continue
✓ commit allowed
agent continues
block
✗ commit halted
violations shown
Claude Code marketplace
Local instruction files
OpenCode
MCP tools exposed to the agent
How the agent uses it — after install
Pre-commit hook — the safety net that always runs
Both Claude Code and Codex commit via git commit. The hook intercepts every commit regardless of which agent issued it — no agent cooperation required.
CLAUDE.md / AGENTS.md
Agent-specific instruction file. Written to the location each agent reads automatically.
.cursor/rules/
Cursor rules file. Automatically picked up by Cursor's agent context.
.github/copilot-instructions.md
Copilot custom instructions file. Read by GitHub Copilot Chat.
.scopewarden/plugin/
Local record of installed plugins. Used by scopewarden plugins list.
Decision modes
Configure globally or per-rule. Mix and match. Solo devs use warn. Teams use block. Interactive sessions use ask.
continue
Log it, allow it. Full audit trail with no interruption.
warn
Print warning, allow the change. Developer decides manually.
ask
Pause and prompt. Interactive y/N with context shown.
block
Exit non-zero. CI fails. The change cannot proceed.
# Safety hierarchy — cannot be overridden
Judge engine
The judge answers one question: does this diff match the stated goal? It's opt-in, privacy-conscious by default, and uses a strict prompt that prevents code quality opinions from bleeding in.
input
goal + diff stat
openai
openai models
anthropic
claude models
local / free
ollama (llama 3)
output
score + verdict
ollama CLI, so judging can stay on your machine. Remote judge providers are optional.
Configuration
# Install
# CLI reference
Local Development
Want to contribute, inspect the source, or use a local build? ScopeWarden is a single Rust binary — clone, build, point at your repo.
rustup update stable), Git.
Run cargo test to verify your build.
Open Source
ScopeWarden is actively developed and currently tested with Ollama and local models. Multi-provider cloud support (Claude, OpenAI, Gemini) is implemented but undertested. Rough edges exist — bug reports and PRs are genuinely appreciated.
ollama launch commands on Linux/Windows. Report what works.Developer workflow
ScopeWarden does not require editor hooks, cloud dashboards, or a new agent runtime. It works at the shell and Git boundary.
Public launch
v0.1 · ready
Core engine
scopewarden.yamlscopewarden hook install)next
Provider polish
later
Team workflow
later
Ecosystem
Current stack
Launch gate
scopewarden.yaml with initstart, check, run, reportopen source · mit license
ScopeWarden records the goal, checks every changed file against it, and stops drift automatically — as a pre-commit hook, MCP tool, or standalone CLI. Before review, merge, or handoff.