probity CLAUDE.md

Project instructions for Probity, a policy engine that checks coding-agent actions against configurable rules before allowing or blocking them. They also define a test-first development process and the project’s source-code layout.

In plain words
What is it for?
Writing failing tests before implementations, enforcing repository policies, adding rule matchers, and working with adapters for different coding-agent vendors.
Why use it?
They help agents follow the project’s discipline rules and understand where policy rules, vendor adapters, tests, and application wiring belong.

Instructions file

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 instructions/nizos/probity/claude-md
Clone the repo
git clone --depth 1 https://github.com/nizos/probity
Per session 396 This file is loaded in full into every session.
When invoked 396 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00396 $0.00396
Opus 5 $0.00198 $0.00198
Sonnet 5 $0.00079 $0.00079
Haiku 4.5 $0.00040 $0.00040

Measured yesterday against content hash 9918b21b57a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

probity CLAUDE.md scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 25 lines

What it actually says

Probity

Process discipline for coding agents. A vendor-agnostic policy engine that sits between the agent and the codebase, evaluating each attempted action against configurable rules and blocking or allowing it, and providing correction and guidance.

Discipline

  • Strict TDD — failing test first, minimum impl to pass, no speculation.
  • Atomic conventional commits — test and implementation together.

Layout

  • src/types.ts — the canonical domain types every layer shares.
  • src/rules/ — the built-in rules and the rule contract.
    • rules/utils/ — shared rule helpers.
    • rules/matchers/ — ast-grep test-node detection and the per-language modules enforceTdd's fast-path uses.
  • src/utils/ — low-level cross-cutting helpers (parsing, safe and size-capped file reads, JSON/JSONL).
  • src/vendors/ — vendor-agnostic shared pieces (adapter contract, Edit-to-Write substitution, verdict parsing, path normalization).
    • <vendor>/ — one vendor's adapter, AI agent, raw-event classifier, and transcript reader.
  • src/registry.ts — wires each supported vendor to its pieces.
  • src/ (top level) — application wiring: CLI, bin entry, config loading, the engine, and the trace it writes to the --debug log.
  • test/fixtures/ — captured hook payloads, transcript fixtures, and config scenarios.
  • test/helpers/ — shared helpers for the unit and integration suites (sandboxing, bin invocation, response decoding, auth preflight).
  • test/integration/ — end-to-end tests; the AI-gated ones (enforce-tdd-*) need PROBITY_INTEGRATION_AI=1, the rest always run.
  • docs/adr/ — ADRs for load-bearing decisions and their rationale.
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. yesterday First seen · 25 lines · 396 tokens per session scan A 9918b21b57a0

Subscribe to this mod's changes

probity CLAUDE.md is an instructions file published in the GitHub repository nizos/probity (186 stars, last pushed 15d ago), licensed MIT. It adds 396 tokens to every session, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.