groundtruth-block

groundtruth-block is a command for coding agents from akahkhanna/groundtruth. It costs 18 tokens per session (1,114 once invoked), scanned A, original, MIT.

A command for turning Groundtruth's blocking mode on or off, where blocking mode can halt work when configured rules are triggered. It reads the current rules and history before enabling the mode and requires explicit confirmation.

In plain words
What is it for?
Use it to check the current setting, disable blocking, or review rule activity before enabling blocking.
Why use it?
It lets users inspect how often rules have fired before allowing them to stop future work, while preserving other configuration settings.

Command

Part of the groundtruth plugin — 7 commands, 5 hooks shipped together

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 commands/akahkhanna/groundtruth/groundtruth-block
Clone the repo
git clone --depth 1 https://github.com/akahkhanna/groundtruth

Or install groundtruth, the plugin that ships this one along with the rest of its 7 commands, 5 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 groundtruth-block

README.md
[![agentmods](https://agentmods.dev/badge/commands/akahkhanna/groundtruth/groundtruth-block.svg)](https://agentmods.dev/commands/akahkhanna/groundtruth/groundtruth-block)
Your own site
<a href="https://agentmods.dev/commands/akahkhanna/groundtruth/groundtruth-block"><img src="https://agentmods.dev/badge/commands/akahkhanna/groundtruth/groundtruth-block.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,114 The whole file, excluding the scripts and references it only reads on demand.
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.00018 $0.01114
Opus 5 $0.00009 $0.00557
Sonnet 5 $0.00004 $0.00223
Haiku 4.5 $0.00002 $0.00111

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

Security

Grade A, and why

groundtruth-block 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 5d 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.

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.

commands/groundtruth-block.md · 31 lines

How it starts

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

Set Groundtruth's block mode based on the argument: $ARGUMENTS (on or off; empty ⇒ just report the current value).

off or empty

  • off → read .claude/groundtruth/config.json (preserve any other keys), write "block": false, confirm.
  • empty → report the current block value. Note if env GROUNDTRUTH_BLOCK is set — it overrides config (the un-disablable anchor).

on — never flip silently; confirm what will START HALTING first

The rule is: block must never enforce a predicate the user hasn't seen. So before writing anything, show an itemized, evidence-backed picture, then require an explicit yes.

  1. Read .claude/groundtruth/compiled-rules.json (the armed rules) and, if present, .claude/groundtruth/history.jsonl (the append-only per-turn log — each finding carries cls, sev, and, for a compiled rule, rule = its id).

  2. Compute per-rule fire counts from history: tally findings by their rule id across all lines (older lines predating id-logging won't have it — count what's there and say the window is "since the log carried ids"). This is the evidence — reviewing behavior ("fired 14×, unarmed twice" vs "fired 0× in 6 weeks") is tractable where re-reading regexes is not. Caveat the counts as advisory: history.jsonl is gitignored and agent-writable (not integrity-snapshotted), so a count can be forged — it can't hide a rule (the list below comes from compiled-rules.json, which is authoritative), only misstate a number. So never let a low count alone justify enabling a block rule; the count informs, the itemized list decides.

  3. Show the user what block actually changes — be honest about the severity gate (block only enforces findings that are already block-severity; it does NOT auto-promote your warn rules):

    • Built-in block checks that will now HALT (always, once block is on): hardcoded secret, committed .env, RLS-off / anon-permissive policy, and a contract CA (claimed-but-absent) — a claim the diff/transcript don't support: a tests_pass/build_pass that never ran or ran red, a created/modified/deleted file absent from the diff, or a claimed symbol not defined in the added code. These are code, not your rules — always block-severity. Plus an NC (no valid manifest on a code turn) when the repo is contract-aware/groundtruth-setup has written the groundtruth-claims instruction into CLAUDE.md; awareness is baseline-anchored (content and file tree), so a mid-turn strip or untrack of the instruction can't downgrade it. (UC stays warn.)
    • Your armed rules at block severity — the rules that will start refusing commits. List each: id · message · fired N× · last-fired. Flag any with 0 fires or that the user hasn't visibly reviewed: "never fired / unreviewed — look before enabling."
    • Your armed rules at warn severity — state plainly: these stay warn and will NOT halt under block mode. Optionally list the top few by fire count as promotion candidates (make one halt with severity:"block").

Read the full file on GitHub · 31 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. 5d ago First seen · 31 lines · 18 tokens per session scan A 7894cd6502cf

Subscribe to this mod's changes

groundtruth-block is a command published in the GitHub repository akahkhanna/groundtruth (6 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 1,114 once invoked, about $0.0001 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-31.