# AI use cases for HERO Anti Over Defense (wanshuiyin/HERO-Anti-OverDefense)

Repo: [wanshuiyin/HERO-Anti-OverDefense](https://github.com/wanshuiyin/HERO-Anti-OverDefense) | Use cases: 4 | Page: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/

HERO is a short block of rules, pasted into a coding agent's config file, that stops the agent from over-defending: adding hashes, edge-case handling, review loops and extra scaffolding that the actual work does not need.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Stop Claude Code from over-hardening a small feature: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/paste-scope-limits-into-claude-md/
- Add the HERO block to Codex's AGENTS.md: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/adapt-hero-block-for-codex-agents-md/
- Quote a HERO case ID when an agent defends its extra checks: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/quote-hero-cases-when-agent-argues/
- Keep the HERO block active on overnight agent runs: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/keep-hero-rules-active-on-long-unattended-runs/

## How to stop Claude Code from over-hardening a small feature with HERO Anti Over Defense

Repo: [wanshuiyin/HERO-Anti-OverDefense](https://github.com/wanshuiyin/HERO-Anti-OverDefense) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Append the HERO scope block to CLAUDE.md so Claude Code stops adding unneeded hashes, flags and wrappers.

**Who it is for:** A solo developer using Claude Code on a small project who keeps getting checksums, feature flags and compat layers for features that will never need them.

**The problem:** The agent answers a simple feature request with defensive scaffolding and extra verification loops, and the feature is delayed or never finished.

**The outcome:** CLAUDE.md contains the SCOPE LIMITS block, so the agent loads the rules at the start of every session and proposes only fixes that are in scope.

### Steps

1. Open the terminal in your project root, where CLAUDE.md lives or should live.
2. Run `grep -qi 'scope.limits' CLAUDE.md` to check whether the block is already there. Exit status 0 means it is.
3. If it is not there, run the install command from the Quickstart section of README.md, with CLAUDE.md as the target file.
4. Open CLAUDE.md and confirm that a section starting with `=== SCOPE LIMITS` appears once at the end.
5. Start a new Claude Code session and ask for a small feature to see whether the agent keeps to the rules.

### Prompt to paste into your agent

```text
Read RULES.md in the HERO-Anti-OverDefense repo and confirm that the SCOPE LIMITS block is present in <project>/CLAUDE.md, appended once and nothing else changed. Then implement <small feature> and report which of rules 1 to 9 you applied, and confirm that no hashes, feature flags or wrappers were added unless the feature needed them.
```

### Caveat

The install command only appends the block, so a stale block from an earlier paste will not be replaced and must be deleted by hand before running it again.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/paste-scope-limits-into-claude-md/

## How to add the HERO block to Codex's AGENTS.md with HERO Anti Over Defense

Repo: [wanshuiyin/HERO-Anti-OverDefense](https://github.com/wanshuiyin/HERO-Anti-OverDefense) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Put the same contract in AGENTS.md so Codex follows the scope limits on each run.

**Who it is for:** A developer who runs Codex on a repo and wants the same over-defense limits they use with Claude Code.

**The problem:** Codex adds checksums, migration layers and repeated review passes on work that is simple, and it does not have the rules Claude Code has.

**The outcome:** AGENTS.md carries the SCOPE LIMITS block, and Codex reads it when it starts a task in that repo.

### Steps

1. In the project root, run `grep -qi 'scope.limits' AGENTS.md` to see whether the block already exists. (inferred, check the README)
2. Follow the Quickstart install from README.md, replacing the CLAUDE.md filename with AGENTS.md.
3. Open AGENTS.md and check that the block appears once, at the end of the file.
4. Give Codex a small task in that repo and check whether it proposes extra hashing or scaffolding.

### Prompt to paste into your agent

```text
Confirm that the HERO SCOPE LIMITS block from RULES.md is appended once to <project>/AGENTS.md. Then complete <task> and report whether any change was made under rules 2, 3 or 4 that the task did not require.
```

### Caveat

The README lists AGENTS.md as the file for Codex and Antigravity, and the hosts guide has the full placement table, so check it before assuming another filename works.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/adapt-hero-block-for-codex-agents-md/

## How to quote a HERO case ID when an agent defends its extra checks with HERO Anti Over Defense

Repo: [wanshuiyin/HERO-Anti-OverDefense](https://github.com/wanshuiyin/HERO-Anti-OverDefense) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Point the agent to a named catalogue case when it insists a hash or extra review is needed.

**Who it is for:** A reviewer or lead developer whose coding agent keeps arguing that an extra check is necessary.

**The problem:** The agent gives a reason for each hardening step, and a plain rule is easy to argue past in the moment.

**The outcome:** The reviewer names the matching case and the agent either justifies the check against the requirement or drops it.

### Steps

1. Open cases/README.md and find the case that matches the behaviour, for example HERO-R-006 for audit loops that consume the experiment they audit.
2. Read what was asked, what the agent did and what proportionate looks like for that case.
3. Paste the case ID and the matching line into the agent conversation.
4. Ask the agent to name the specific failure the check would detect, and what it would do differently if that failure happened.

### Prompt to paste into your agent

```text
Read cases/README.md in the HERO-Anti-OverDefense repo. Find the case that matches <behaviour you observed>, quote its ID and its proportionate example, and answer in one paragraph whether the check you are about to run would detect a failure that changes what happens next.
```

### Caveat

The cases are meant to be quoted back by ID, not loaded into the agent config, so they only help when someone reads them and raises them during the session.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/quote-hero-cases-when-agent-argues/

## How to keep the HERO block active on overnight agent runs with HERO Anti Over Defense

Repo: [wanshuiyin/HERO-Anti-OverDefense](https://github.com/wanshuiyin/HERO-Anti-OverDefense) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Put the block in an always-loaded file so long unattended runs keep the scope limits.

**Who it is for:** A researcher or engineer who starts an agent on a long unattended task, such as a multi-hour experiment or refactor, and comes back to a pile of defensive work.

**The problem:** Over a long run the block can fade from the agent's working context, and an invoked copy is absent when nobody is there to invoke it.

**The outcome:** The block sits in the agent's always-loaded config, and the hosts guide is used to pick a placement that survives long sessions.

### Steps

1. Confirm that the block is in the always-loaded file for your host, using the hosts guide in the hosts/ folder.
2. Run `grep -qi 'scope.limits' CLAUDE.md` in the project root, or use the filename for your host, to confirm it is present.
3. Start the unattended run and check the output at the first checkpoint for over-defensive steps.
4. If the block seems to have faded in a long session, follow the hook route described in hosts/README.md.

### Prompt to paste into your agent

```text
Check that the HERO SCOPE LIMITS block is in the always-loaded config for this project. Then run <long task> and, at each checkpoint, list any hashing, extra review or scaffolding step and state which rule it falls under.
```

### Caveat

The README says the block can fade on long runs and that the fix depends on the cause, so checking at checkpoints is needed, and the hook route is described only in hosts/README.md.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/wanshuiyin-hero-anti-overdefense/keep-hero-rules-active-on-long-unattended-runs/
