Skip to content

Commit e059f25

Browse files
committed
Ignore and block Cursor/Claude/agent housekeeping artifacts.
Add .gitignore entries for .cursor/, .claude/, audit/, AGENTS.md, etc. Add optional .githooks/pre-commit (enable with scripts/install-git-hooks.sh).
1 parent 7671e2d commit e059f25

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.githooks/pre-commit

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
# Reject commits that stage Cursor, Claude, or other agent housekeeping files.
3+
set -euo pipefail
4+
5+
blocked=$(
6+
git diff --cached --name-only --diff-filter=ACM |
7+
grep -E '(^|/)\.cursor/|(^|/)\.claude/|(^|/)audit/|(^|/)audit-report\.html$|(^|/)AGENTS\.md$|\.mdc$' ||
8+
true
9+
)
10+
11+
if [[ -n "${blocked}" ]]; then
12+
echo "Refusing commit: agent/housekeeping artifacts must not be committed:" >&2
13+
echo "${blocked}" >&2
14+
echo "Run: git reset HEAD -- <path>" >&2
15+
exit 1
16+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
# Cursor / Claude / agent artifacts — never commit
66
.cursor/
77
.claude/
8+
audit/
89
audit-report.html
910
AGENTS.md
11+
*.mdc

0 commit comments

Comments
 (0)