ClaudeMap

HERO Anti-OverDefense

A paste-in RULES.md contract that stops coding agents from over-defending their changes.

Prompt Librariespromptingrulesagent-behaviorconfig

HERO targets four over-defense behaviours coding agents drift into — Hashing, Edge cases, Rubrics, Overbuild — where the agent optimises for not being blamed rather than for the work being good. Nine rules bound proposed fixes without suppressing legitimate work; ships with a quoted case catalogue and calibration examples of what is not over-defense. Nothing to install: paste into CLAUDE.md, AGENTS.md, or any agent's config file. Works with Claude Code, Codex, Antigravity, Cursor, GitHub Copilot, Windsurf, and Gemini CLI.

What it does

  • Names the four families so you can say which one just happened: Hashing (digests nothing reads), Edge cases (defending inputs that don't occur here), Rubrics (judgement replaced by scoring machinery), Overbuild (guards guarding guards) — plus sibling "over-correction", catalogued outside HERO on purpose
  • Nine rules bound what the agent PROPOSES, never what it looks for: report real defects freely, keep the fix in scope — "The test is not how rare does this sound. It is does this happen here."
  • The case catalogue is not loaded by your agent — it is what YOU quote back, by ID, when the agent insists some hardening is necessary; counterexamples marked ✓ are report-don't-dismiss
  • Generalised out of ARIS (~13.7k stars), whose cross-model reviewer kept proposing hashes nobody reads — HERO keeps the value and drops the tax
  • Changelog discipline: when the block changes, the README marks it BLOCK and says re-paste — the grep guard that prevents double-appending also prevents auto-updating

When to use it

Long unattended runs are the target scenario — the README is explicit that an invoked copy fails exactly on the overnight jobs nobody is awake to invoke. Also useful as a vocabulary for code review: "this is R, an audit loop" lands better than "stop over-engineering". Give the block to adversarial reviewer models too — a reviewer told to propose fixes is the most productive source of the behaviour.

Getting started

Paste the block from RULES.md into the file your agent loads automatically — CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, or .cursorrules. Or append it in one command (idempotent — the grep guard makes a second run a no-op):

grep -qi 'scope.limits' CLAUDE.md 2>/dev/null || { printf '\n\n'; curl -sL \
  https://raw.githubusercontent.com/wanshuiyin/HERO-Anti-OverDefense/main/RULES.md \
  | awk '/^=== SCOPE LIMITS/,/^Say plainly when something is correct/'; } >> CLAUDE.md

Too long? There is a short version in RULES.md — same nine rules, about half the size.

Things to know

The README's own honesty section sets the bar low: asked whether markdown rules actually work, the most-agreed answer was "it helps a little" — some runs will still fortify. The model can decline (natural-language config is defeasible), the block fades on long runs for three distinct causes (contradicted vs buried vs compacted — each has a different fix), and switching models is sometimes the more direct lever than any prompt.

Repository

wanshuiyin/HERO-Anti-OverDefense

Charted

Related on the map

  • Version-by-version teardown of Claude Code's system prompts and 27 built-in tool descriptions, updated with every release.

    • system-prompt
    • claude-code
    • analysis
    • prompt-engineering
  • A single-file CLAUDE.md distilling Karpathy's coding observations into four working rules (211k stars).

    • claude-md
    • rules
    • prompt-engineering
    • best-practices
  • prompts.chat

    Prompt Library

    The de-facto standard ChatGPT role-prompt collection (f.k.a. Awesome ChatGPT Prompts).

    • prompts
    • awesome-list
    • roles
    • community