Evidence-First Agent Rules
Five Claude Code rules that push agents to show evidence before claiming "fixed".
Claude said it fixed the bug. Did it actually run the test?
Example
You ask your agent to fix a failing test. The "Verify before claiming" rule tells it not to reply "fixed" unless it has run the test and seen it pass; if it can't run it, it has to say so ("this compiles, but I haven't verified it at runtime").
Read the Verify before claiming fileAll 9 files
The example is written by the creator and checked by a StackPlug reviewer before each version is approved.
Claude said it fixed the bug. Did it actually run the test?
Example
You ask your agent to fix a failing test. The "Verify before claiming" rule tells it not to reply "fixed" unless it has run the test and seen it pass; if it can't run it, it has to say so ("this compiles, but I haven't verified it at runtime").
Read the Verify before claiming fileAll 9 files
The example is written by the creator and checked by a StackPlug reviewer before each version is approved.
Five short Claude Code rule files, taken from the instructions we run daily. They target five expensive agent habits: claiming a fix without runtime evidence; guessing at regressions instead of diffing; retrying fixes without researching; hardcoding guessed numbers; dropping or padding parts of a request. You get plain Markdown rules for .claude/rules/. Pick any of them; two refer to another rule and bring it along. You also get a README, manual install steps that record what they create and remove only unchanged files, and a copy-paste prompt for AI-assisted install that inspects first and asks before changing anything. There are no scripts, hooks or settings. The research rule asks you before any web search that uses details from your project, secrets never go into a query, and no rule authorizes production actions or destructive commands. What it can't do: rules are instructions, not enforcement, and a model can still ignore them. Tested in Claude Code 2.1 only; Codex and other tools are untested.
Use it to
- Stop the agent claiming a bug is fixed without running it
- Make the agent diff against the last working version before guessing
- Break guess-and-retry fix loops
- Stop hardcoded guessed numbers in code
- Keep the agent's changes to what you actually asked for
What you get
6 components. Pick any of them; anything a component needs comes along automatically, and the README, install notes and licence always do. Read every file
- Always-on instructions
- Load into every session once installed. The installer skips them unless you opt in.
- Documentation
- Read-only reference. Your assistant never loads it on its own.
Inside the files
Calculate numbers before hardcoding them
Guessing a value (padding, offset, timeout, threshold, retry count) and nudging it until it looks right is slow and fragile. In one mobile layout fix a guessed 32-point inset failed because the real requirement was about 84 points: a 50-po…
**Rule.** Before writing a hardcoded numeric value:
1. Identify the known quantities it depends on (component sizes, safe-area insets, measured latencies, limits from documentation). 2. Write a short comment showing the calculation, for example:
``` // 50pt tab bar + 34pt home indicator = 84pt bottom inset ```
3. If a value cannot be derived, say that it is an estimate, explain where it came from, and prefer making it a named constant that is easy to find and change.
This applies to configuration as well as code: timeouts, rate limits, cache lifetimes and batch sizes all need a stated reason.
How to use it
Install
Download the stack, then follow SETUP-INSTALL.md (included in every download).
- Try it first in a separate trial project: sh SETUP-install.sh trial ~/stackplug-trials/evidence-first
- When you're happy, install into a real project with apply --include-always-on. These rules are always-on instructions, so read them first (each takes under a minute).
- Prefer doing it by hand? Follow INSTALL.md (about five commands). Or paste the prompt in INSTALL-WITH-AI.md so your assistant inspects first and asks before changing anything.
Installing safely
Nothing is installed automatically. Every download includes SETUP-INSTALL.md, a checksum file you can compare with the file checksums listed on this stack's Files page, and StackPlug's standard installer.
- Try it first in a separate trial project with protective settings:
sh SETUP-install.sh trial ~/stackplug-trials/evidence-first-agent-rules-d731ba - Install on-demand instructions (skills, agents, commands) into a real project with
apply. Always-on rules are skipped unless you opt in after reading them. - Hooks, scripts, settings and project instructions are never installed or run by StackPlug.
What to expect
Expect your agent to show evidence (test output, a real run) before saying "done", read the diff before guessing at a regression, research after one failed fix (asking you first before any search that uses details from your project), show its arithmetic instead of guessing numbers, and keep its changes to what you asked for. Treat it as a strong nudge, not a guarantee.
Limitations
- These are instructions, not enforcement. A model can still ignore a rule, especially in very long sessions.
- Tested in Claude Code 2.1 with project rules. Codex, Cursor and other tools are untested.
- Every file starts with evidence- to avoid clashing with rules you already have.
- Expect the research rule to ask for your OK before searching with anything from your project.
The walkthrough is written by the creator and checked by a StackPlug reviewer before each version is approved. Review and pattern checks reduce risk but can't prove instructions are harmless. A well-hidden instruction in an always-on rule could keep steering your assistant, so read rules before turning them on.
Evidence of real use
These are the StackPlug team's own Claude Code instructions, in daily use since spring 2026 across several of our software projects. Each rule was written after the failure it describes cost real time; the examples are those incidents with project details removed. In a small test (three runs each, Sonnet), an assistant with the rules installed stopped answering "yes" to "is the bug fixed?" without running the code (0 of 3, against 3 of 3 without the rules). Without the rules it already added a "haven't run it" caveat, so the effect is a change in framing, not a new behaviour. We make no outcome claims beyond that. StackPlug publishes this stack itself. It goes through the same automated screening and review as any creator's stack.
Written by the creator. It isn't independent proof of results.
Details
Checked by StackPlug
- What's included
- 5 rules, 1 documentation set · 9 files, all readable before you download
- Latest approved version
- Version 2 (2.0.2), approved after review by StackPlug
- Security review
- Automated security screening, AI-assisted analysis and review by StackPlug
- Installation
- Nothing installs automatically. Each download includes checksums and StackPlug's installer, with a separate trial mode.
Stated by the creator
- Works with
- Claude Code
- Requirements
- Claude Code 2.x
- Last tested
- Creator reports testing with Claude Code 2.1 on macOS on Nov 24, 2026
StackPlug policy
- Updates
- Future versions of this listing are included at no extra cost for anyone who gets it. That isn't a promise of future updates or support.
"Checked by StackPlug" covers what StackPlug checked itself: automated checks of every file, the approved version and StackPlug's review decision. It doesn't mean StackPlug tested the workflow's results.
Install report
Tell the creator whether it installed and worked. Reports are private: they go to the creator and StackPlug, not onto this page. One per account, and you can edit it any time.
Sign in and save or download this stack to share how the install went. Downloading free stacks never requires an account.
Version history
- Version 2 (2.0.2) Current · approved
Version 2.0.2. Compared with version 1, the optional git hook (block_no_verify.py) and its setup guide are removed. We took the hook out after a review found it can block every shell command if its settings entry is left behind after the file is deleted, misses some ways of skipping git hooks, and blocks some ordinary commits. If you enabled it, see "Upgrading from version 1" in the README: remove the settings entry first, then the file. The rules also gained safeguards after an independent review: - Research after one failure now removes private details from anything taken from your project and asks for an explicit yes before each such search; secrets never go into a query. Searches with nothing from your project still run normally. - Research after one failure records lessons in LEARNINGS.md and asks before changing CLAUDE.md, AGENTS.md or other always-on rules. - Debug by diffing checks for uncommitted work before any git command that changes your checked-out files. - Scope every change and Verify before claiming say they never authorize production actions, destructive commands or reverting changes someone else made. - The manual uninstall removes only this package's files that are still unchanged, and keeps changed files on its record.
- Version 1 (1.0.0) Held · approved
6fecd766d84b7db3…