HERO Anti-OverDefense: a contract you paste and then re-paste by hand
HERO = Hashing · Edge cases · Rubrics · Overbuild — the four shapes coding agents over-defend in. A paste-in contract that stops them. Works with Claude Code, Codex, Antigravity, Cursor, Copilot, Windsurf, Gemini CLI.
At a glance
- What is it?
- A block of scope-limit rules aimed at coding agents that build fortresses around a feature instead of shipping it. There is nothing to install, but the one-line installer appends and never replaces, so the maintenance burden lands on whoever pasted it first.
- Who is it for?
- HERO is worth reading even if you never paste it, because the taxonomy is reusable and the changelog is a rare example of a prompt project shipping an operational note instead of a reworded block. Paste it if your agent spends its budget on edge cases nobody asked for, and expect to maintain it: the installer will not update your copy, three re-paste notices landed inside a month, and the block is expected to fade as a session grows.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 9 days ago.
- What is it written in?
- Mainly Markdown, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- wanshuiyin/HERO-Anti-OverDefense858 ★ · +412
| Repository | 2026-09-11 | 2026-11-15 |
|---|---|---|
| wanshuiyin/HERO-Anti-OverDefense | 446 | 858 |
412 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The install command appends once and will never update your copy
There is nothing to install, which is the point, and the one-line route pipes the rules out of the repository and into a file your agent already loads:
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.mdThe grep is an idempotence guard: run it twice and the second run does nothing. The README then uses that same property as a warning. Because the guard cannot tell an old block from a current one, it will not replace what is already there, so anyone who pasted the block before a later rule change is told to delete the old section by hand and run the command again. The awk range is the other half of the mechanism: it starts at the SCOPE LIMITS marker and stops at a sentence that has to exist in the source file, so the extract fails quietly if that marker moves.
Three of the five changelog entries tell you to re-paste
The changes section is filtered on purpose, and the filter is stated in the first line: only things that change what you should do, not rewording and not layout, because a changelog of everything buries the one line that mattered. Filtered that way, the entries are still mostly about your paste going stale. On 2026-08-11 the block changed with the addition of rule 6, which is the security carve-out, and a short version appeared at half the size. On 2026-09-02 the block changed again, with rule 8 on picking an option instead of returning a menu and rule 7 extended to ban process traces. On 2026-09-03 rule 7 gained the press-release principle. So a contract published on 2026-08-11 needed manual work three times in the following three weeks.
The block is designed to fade, and three causes need three answers
An entry from 2026-08-12 is about the contract losing effect on long runs, and it refuses to give one remedy. Something more specific in the session contradicts the block, and repeating it will not help. Or it is still in the context but buried under hours of output, and repeating helps. Or compaction thinned it, and re-emitting it helps. The advice against an hourly timer is the part worth keeping, on the grounds that context grows with work rather than with minutes, so a schedule keyed to time misreads every long session. A hook route is pointed at for the automated case. This is the honest part of the project: a pasted instruction block is a weak control against a long context, and the README treats it as one instead of pretending a rule in a file wins against an hour of output.
Rule 6 gives security and migration work back to the agent
A contract about over-defending has to say what over-defending is not, and the block opens with that. Rule 1 asks you to report anything actually wrong, including a rare-looking case, if the project really produces it. Rule 6 states that the block never overrides security or migration work you actually asked for, and the first two numbered items in the quickstart make the same carve-out in the text you paste: verification is welcome, over-defense is not, and unless the project says otherwise you should assume a cooperating operator on their own machine, with a real adversary declared by the project itself taking precedence. Eight examples came with that rule, two of them marked with a check as things to report rather than dismiss. This is what separates the contract from a blanket please-do-less-instruction.
The quickstart shows two rules and the changelog refers to nine
The block you are told to paste opens with the marker line and then carries two numbered items, and the copy ends there. The rest of the contract is named in the changes section: rule 6, rule 7, rule 8, rule 9, each with its own subject, and siblings recorded under identifiers of their own, SIB-003 for caveats scattered until the work reads as an apology, SIB-004 for instructions confessed into the product when told not to mention a topic, plus a behaviour named stalling. So the fence in the quickstart is not the whole agreement, and it is not obviously the short version either, since that is linked separately as a document of its own. Read it as an excerpt, and read RULES.md for what you are actually agreeing to before pasting anything into a file your agent obeys.
cases/ is the part you quote back, and examples/ is not part of the contract
The contents table is careful about which directory is the product. RULES.md is the contract, in English and Chinese. cases/ holds observed behaviours, each recorded as what was asked, what the agent did, why the response was disproportionate and what a proportionate one looks like, with an explicit instruction not to paste it, because its job is to be quoted at an agent that argues. examples/ is labelled optional and outside HERO, containing AGENTS.md and CLAUDE.md files that two contributors wrote for their own projects, with the warning that their thresholds are theirs and not HERO variants. One case is worth noting because it argues against a generic fix: a general instruction to only do the checks you need lost to a twelve-stage workflow in the same prompt, which is the argument for a specific rule over a broad principle.
The provenance note names a 13.7k star project and the tax it kept
The README is explicit about where this came from and what was dropped. It generalises out of a separate repository, ARIS, cited with a star count around 13.7 thousand, whose cross-model reviewer is described as genuinely good and also as spending a measurable share of its output proposing hashes nobody read. The kept part and the dropped part are the same sentence: the value without the tax. That framing also explains the project name, which is four initials for hashing, edge cases, rubrics and overbuild, described as the four shapes coding agents over-defend in. The framing is offered as a hypothesis that fits what the author observed rather than an account of how these models are trained, which is the right amount of claim for a prompt contract to make about model internals.
The file list is small and the contract ships in two languages
The repository is Markdown and MIT licensed with no releases published, and its top level is short: RULES.md, a Chinese README, LICENSE, and directories for assets, cases, examples and hosts, plus the usual ignore files. hosts/ is the part that turns the contract into seven integrations, one page per tool, and the quickstart names the file each one loads: CLAUDE.md for Claude Code, AGENTS.md for Codex and Antigravity, .github/copilot-instructions.md for Copilot, and .cursorrules for Cursor, with Windsurf and Gemini CLI covered in the same table. The contract itself is bilingual and the change log says rule 8 was distilled from a working researcher's own configuration, whose original sits in the examples directory under a Chinese filename.
Editorial conclusion
HERO is worth reading even if you never paste it, because the taxonomy is reusable and the changelog is a rare example of a prompt project shipping an operational note instead of a reworded block. Paste it if your agent spends its budget on edge cases nobody asked for, and expect to maintain it: the installer will not update your copy, three re-paste notices landed inside a month, and the block is expected to fade as a session grows. Read the curl pipeline before you run it, because it pulls whatever the branch contains at that moment straight into your agent configuration with no integrity check.
Frequently asked questions
What is HERO Anti-OverDefense, and what do I paste it into?
It is a block of scope-limit rules for coding agents, pasted into the configuration file your host already loads: CLAUDE.md, AGENTS.md, .github/copilot-instructions.md or .cursorrules. There is no package to install, and the hosts directory covers Claude Code, Codex, Antigravity, Copilot, Cursor, Windsurf and Gemini CLI.
Why does the HERO install command not update a block I pasted earlier?
The grep guard that stops the command appending the section twice also stops it replacing an older one. The README tells you to delete the stale SCOPE LIMITS section by hand and run the command again, and the changes section flags three dates on which a re-paste was required.
Do the HERO rules stop an agent from reporting security problems?
No. Rule 6 says the block never overrides security or migration work you actually asked for, and ships eight examples, two of them marked as things to report rather than dismiss. Rule 1 asks you to assume a cooperating operator on their own machine unless the project states otherwise.
Why does the HERO block stop working in a long session?
Three causes are named, each with a different answer: a more specific instruction contradicting it, the block being buried under hours of output, or compaction thinning it. The advice is against an hourly timer, because context grows with work rather than minutes, and a hook route is documented for the automated case.
Is the cases directory part of the HERO contract?
No. cases/ records observed behaviours as what was asked, what the agent did, why it was disproportionate and what proportionate looks like, and it is meant to be quoted back at an arguing agent, not pasted. examples/ holds contributors' own project files and is described as outside HERO, with thresholds that are theirs.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/wanshuiyin-hero-anti-overdefense)Star history chart for your README
[](https://hysenlabs.com/projects/wanshuiyin-hero-anti-overdefense)Was this useful?