governance

A set of rules that requires all file and system operations to go through a governed-filesystem service.

In plain words
What is it for?
It controls how files are read, written, edited, searched, listed, and handled, while disallowing file deletion.
Why use it?
It prevents built-in file, search, shell, and deletion tools from bypassing the required governance process.

Cursor rule

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 rules/elliot35/deterministic-agent-control-protocol/governance
Clone the repo
git clone --depth 1 https://github.com/elliot35/deterministic-agent-control-protocol
Per session 525 This file is loaded in full into every session.
When invoked 525 The same file — it is already loaded in full.
Security scan C 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.00525 $0.00525
Opus 5 $0.00262 $0.00262
Sonnet 5 $0.00105 $0.00105
Haiku 4.5 $0.00052 $0.00052

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

Security

Grade C, and why

governance scanned grade C 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.

Instruction-override phrasinghighPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

All file and system operations must go through the Deterministic Agent Control Protocol governance layer for policy enforcement and audit logging. Using built-in tools would bypass security policies, forbidden path prote
integrations/cursor/governance.mdc · 39 lines

How it starts

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

Mandatory Governance Rule

You MUST use the governed-filesystem MCP server for ALL file and system operations. You are strictly forbidden from using your built-in tools to bypass governance.

Required Tool Mapping

Instead of your built-in tools, you MUST use these governed equivalents:

Instead of (built-in) Use (governed MCP)
Read tool governed-filesystemread_text_file
Write tool governed-filesystemwrite_file
StrReplace / Edit governed-filesystemedit_file
LS tool governed-filesystemlist_directory
Glob / Search governed-filesystemsearch_files
Reading multiple files governed-filesystemread_multiple_files
Delete tool Not available — you may not delete files

Rules

  1. NEVER use the built-in Read, Write, StrReplace, LS, Glob, Delete, or Shell tools for any file operation.
  2. ALWAYS route file reads through governed-filesystemread_text_file.
  3. ALWAYS route file writes through governed-filesystemwrite_file.
  4. ALWAYS route file edits through governed-filesystemedit_file.
  5. ALWAYS route directory listings through governed-filesystemlist_directory.
  6. ALWAYS route file searches through governed-filesystemsearch_files.
  7. If a governed tool call is denied by policy, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback. Report the denial to the user instead.
  8. If you need a tool that is not available through the governed MCP server, ask the user for permission before proceeding.

Why

All file and system operations must go through the Deterministic Agent Control Protocol governance layer for policy enforcement and audit logging. Using built-in tools would bypass security policies, forbidden path protections, and the tamper-evident evidence ledger.

Read the full file on GitHub · 39 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 · 39 lines · 525 tokens per session scan C f8783e8af9a6

Subscribe to this mod's changes

governance is a cursor rule published in the GitHub repository elliot35/deterministic-agent-control-protocol (88 stars, last pushed 6mo ago), licensed MIT. It adds 525 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it C with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.