warrant-mcp: Instructions file for Claude Code

CLAUDE.md

warrant-mcp CLAUDE.md is an instructions file for Claude Code from rmanish2000-del/warrant-mcp. It costs 4,139 tokens per session, scanned D, original, MIT.

Repository instructions for Claude Code working on a policy firewall that checks whether an agent’s tool actions are allowed. They document the product, architecture, rules, and limits.

In plain words
What is it for?
Use them when modifying the warrant-mcp repository, especially its policy checks, action types, MCP tool, or connection to the separate warrant authorization engine.
Why use it?
They keep future coding sessions consistent and prevent important security decisions from being forgotten or accidentally changed.

Instructions file for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is rmanish2000-del/warrant-mcp's own configuration. It tells Claude Code how to work on warrant-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything warrant-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rmanish2000-del/warrant-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rmanish2000-del/warrant-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/rmanish2000-del/warrant-mcp

Made for: Claude Code.

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 warrant-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rmanish2000-del/warrant-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/rmanish2000-del/warrant-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/rmanish2000-del/warrant-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/rmanish2000-del/warrant-mcp/claude-md/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 warrant-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/rmanish2000-del/warrant-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/rmanish2000-del/warrant-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,139 This file is loaded in full into every session.
When invoked 4,139 The same file — it is already loaded in full.
Security scan D 2 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.04139 $0.04139
Opus 5 $0.02070 $0.02070
Sonnet 5 $0.00828 $0.00828
Haiku 4.5 $0.00414 $0.00414

Measured 10d ago against content hash 886b766bcd6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade D, and why

warrant-mcp CLAUDE.md scanned grade D with 2 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 10d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

junk-dir", not `sudo rm -rf /`.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

junk-dir", not `sudo rm -rf /`.
CLAUDE.md · 275 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code working in this repository. Written in the same spirit as the sibling warrant repo's CLAUDE.md: decisions recorded once so the next session does not re-derive them — or quietly undo them.

Product

warrant-mcp — a policy firewall for agent tool calls. A human writes policy in plain English; Claude compiles it once, off stage into numbered clauses backed by structured rules; deterministic code checks every intended action and refuses what the policy does not allow, citing the governing clause; a Claude Code PreToolUse hook makes that refusal a hard block.

Claude compiles policy. Deterministic code decides. The hook makes a DENY mean the action does not happen.

This is a skeleton by design: two verdicts (ALLOW / DENY), three action kinds, one MCP tool. No payments, no ESCALATE, no UI, no accounts.

Relationship to the warrant repo

C:\Push-to-Prod-2026\warrant is the proven deterministic authorization engine for agentic commerce. It is reference only: read it to understand the model (type-level guarantee, cached replay, clause citation, fail closed). It has never been modified by this project and must not be — verify with git status there, and with its own invariant git diff submission..HEAD -- src/.

What was reused: the thinking. What was deliberately diverged:

warrant warrant-mcp why
compile cache gitignored committed the reviewed cache is the enforceable artifact; a fresh clone must enforce without an API key
compile failure labelled stub fallback no fallback, fail loud a recording must survive an outage; a made-up enforcement policy is worse than none
verdicts ALLOW / ESCALATE / DENY ALLOW / DENY only two values are what make the hook a hard veto

Architecture

  • Toolchain — TypeScript strict, no build step for development (--experimental-strip-types, Node ≥ 22.6). erasableSyntaxOnly is load-bearing: source must stay strippable.
  • The published package is different, and has to be. Node refuses to strip types under node_modules (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING), so an installed copy would not run at all. prepack emits dist/ via tsconfig.build.json and the tarball ships that. Because erasableSyntaxOnly is on, the emit is pure type erasure — there is no transform that could change a verdict. bin/warrant-mcp.mjs runs dist/ when it exists and src/ when it does not, so a checkout and an install behave identically.
  • src/engine/ — pure evaluation. No clock, no I/O, no network, no process spawning. Everything arrives as a parameter.
  • src/compiler/ — the only place the Anthropic SDK is imported. The server and the hook never import it.
  • src/hook/pretooluse.ts (the stdin/stdout boundary) plus a pure adapter.ts that maps Claude Code tool calls onto action kinds.
  • src/server/ — MCP stdio server (main.ts), pure handler.ts, presentation in present.ts.
  • src/record/ — the authorization record. Append-only by convention, not in fact: the only writer appends and nothing enforces it, there is no hash, chain or signature, and anyone who can reach the file can rewrite it. Do not describe it as an audit trail anywhere — README and SECURITY-SURFACE.md §4 both spell out the gap, and they are the wording to match. types.ts is pure (parsing, the policy fingerprint); store.ts is the only writer; observe.ts is what the two boundaries call. Never imported by the engine, handler, hook adapter or presentation — see invariant 6.
  • src/report/warrant-mcp report, pure: model.ts aggregates, redact.ts is screen safety both ways (rewrite what is private, scan for what is secret), client.ts holds the page's CSS and script as strings, html.ts renders. No clock, no filesystem; src/cli/report.ts is the boundary.
  • src/authoring/ — review-time only: rules→English, behaviour-diff corpus, unmapped guidance, CLI phrase parsing. Never imported by the engine, handler or hook.
  • src/cli/ — system boundaries: the only files that read the clock, the environment, or spawn anything.
  • src/config/ — where things live and how warrant merges into files it does not own. settings.ts is pure JSON merging, so the promise that a user's settings survive is testable without touching a disk.

Read the full file on GitHub · 275 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. 10d ago First seen · 275 lines · 4,139 tokens per session scan D 886b766bcd6e

Subscribe to this mod's changes

warrant-mcp CLAUDE.md is an instructions file published in the GitHub repository rmanish2000-del/warrant-mcp (1 stars, last pushed 16d ago), licensed MIT. It adds 4,139 tokens to every session, about $0.0207 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens