evidence-first-agent-rules/INSTALL.md

Documentation · Review before use · file 7 of 9

SHA-256 5b0e4616af138c92ed375f17ace973a2df11de8b9be45697b5f7f15cddae8c9b · 3,661 bytes

# Manual installation
Run these from the root of the project where you want the rules. Set `PKG` to the folder you unzipped (the one
containing this file):
```bash
PKG=path/to/evidence-first-agent-rules
```
## 1. Copy the rules, skipping anything that already exists
This copies each rule only if no file with that name exists, tells you what it skipped, and records what it created
so you can undo it exactly. It stops without changing anything if any of the folders or the record is a symbolic link.
The parentheses run it in a sub-shell, so a stop never closes your terminal.
```bash
(
LIST=.claude/setup-installs/evidence-first-agent-rules.txt
for p in .claude .claude/rules .claude/setup-installs "$LIST"; do
if [ -L "$p" ]; then echo "STOPPED: $p is a symbolic link. Nothing was installed."; exit 1; fi
done
mkdir -p .claude/rules .claude/setup-installs
for f in "$PKG"/.claude/rules/evidence-*.md; do
dest=".claude/rules/$(basename "$f")"
if [ -e "$dest" ] || [ -L "$dest" ]; then echo "SKIPPED (already exists): $dest"
else cp "$f" "$dest" && echo "$dest" >> "$LIST" && echo "installed: $dest"; fi
done
)
```
If anything was skipped, compare it with the package version (`diff "$PKG/$dest" "$dest"`) and decide yourself
whether to replace it. Nothing is overwritten automatically.
**Installing only some rules:** after installing, delete the ones you don't want from `.claude/rules/` (the uninstall
below simply skips files that are already gone). Two rules refer to another one, so keep it too:
- `evidence-research-after-one-failure.md` refers to `evidence-debug-by-diffing.md`
- `evidence-scope-every-change.md` refers to `evidence-verify-before-claiming.md`
## 2. Check it worked
```bash
cat .claude/setup-installs/evidence-first-agent-rules.txt
```
Then start Claude Code in the project and ask: *"Which rules do you follow before saying a bug is fixed?"* It should
describe the runtime-evidence rule.
## Uninstall
With `PKG` set as above, this removes a rule only if **all** of these are true:
- it's one of this package's five rule files;
- the install record lists it, so this install created it;
- it's a regular file (not a link);
- it's still identical to the package copy.
Anything you changed since installing is kept and reported, and stays on the record so you can find it later. Files
that were there before you installed are never on the list, so they're never removed. The record only narrows what's
removed; it can't add anything.
```bash
(
LIST=.claude/setup-installs/evidence-first-agent-rules.txt
for p in .claude .claude/rules .claude/setup-installs "$LIST"; do
if [ -L "$p" ]; then echo "STOPPED: $p is a symbolic link. Nothing was removed."; exit 1; fi
done
if [ ! -f "$LIST" ]; then echo "No install record at $LIST. Nothing was removed."; exit 1; fi
KEEP=""
for f in "$PKG"/.claude/rules/evidence-*.md; do
dest=".claude/rules/$(basename "$f")"
grep -qxF "$dest" "$LIST" || continue
if [ ! -e "$dest" ]; then echo "already gone: $dest"
elif [ -L "$dest" ] || [ ! -f "$dest" ]; then echo "KEPT (not a regular file): $dest"; KEEP="$KEEP$dest
"
elif cmp -s "$f" "$dest"; then rm -- "$dest" && echo "removed: $dest"
else echo "KEPT (changed since install): $dest"; KEEP="$KEEP$dest
"; fi
done
if [ -n "$KEEP" ]; then printf '%s' "$KEEP" > "$LIST" && echo "The install record now lists only the files kept above."
else rm -- "$LIST" && echo "removed the install record"; fi
)
```
If you installed version 1 and enabled its optional git hook, see "Upgrading from version 1" in `README.md`: remove
the settings entry before deleting the file.

Shown as plain text. Invisible or direction-changing characters are displayed as <U+XXXX>.