From 129b13f85ede90b50ac9e2131bddf30659fa57a9 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 19 Apr 2026 12:46:59 -0500 Subject: chore: add Claude Code ruleset via ~/code/rulesets install-elisp Installs the Elisp ruleset from the rulesets repo: - CLAUDE.md (project instructions template) - .claude/rules/ (testing, verification, elisp, elisp-testing) - .claude/hooks/validate-el.sh (check-parens + byte-compile + run matching tests on every .el edit via PostToolUse) - .claude/settings.json (permission allowlist + hook wiring) - githooks/pre-commit (secret scan + staged-file paren check) core.hooksPath set to githooks/ so the pre-commit activates automatically. Hooks use \$CLAUDE_PROJECT_DIR with a script-relative fallback, so a fresh clone works without path edits. .gitignore extended with personal-override entries (settings.local.json, .cache/) and byte-compile artifacts (*.elc, *.eln). --- .claude/settings.json | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .claude/settings.json (limited to '.claude/settings.json') diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..cca0eaa --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,70 @@ +{ + "permissions": { + "allow": [ + "Bash(make)", + "Bash(make help)", + "Bash(make targets)", + "Bash(make test)", + "Bash(make test *)", + "Bash(make test-all)", + "Bash(make test-unit)", + "Bash(make test-integration)", + "Bash(make test-file *)", + "Bash(make test-name *)", + "Bash(make validate-parens)", + "Bash(make validate-modules)", + "Bash(make compile)", + "Bash(make lint)", + "Bash(make profile)", + "Bash(emacs --batch *)", + "Bash(emacs -Q --batch *)", + "Bash(git status)", + "Bash(git status *)", + "Bash(git diff)", + "Bash(git diff *)", + "Bash(git log)", + "Bash(git log *)", + "Bash(git show)", + "Bash(git show *)", + "Bash(git blame *)", + "Bash(git branch)", + "Bash(git branch -v)", + "Bash(git branch -a)", + "Bash(git branch --list *)", + "Bash(git remote)", + "Bash(git remote -v)", + "Bash(git remote show *)", + "Bash(git ls-files *)", + "Bash(git rev-parse *)", + "Bash(git cat-file *)", + "Bash(git stash list)", + "Bash(git stash show *)", + "Bash(jq *)", + "Bash(date)", + "Bash(date *)", + "Bash(which *)", + "Bash(file *)", + "Bash(ls)", + "Bash(ls *)", + "Bash(wc *)", + "Bash(du *)", + "Bash(readlink *)", + "Bash(realpath *)", + "Bash(basename *)", + "Bash(dirname *)" + ] + }, + "hooks": { + "PostToolUse": [ + { + "matcher": "Edit|Write|MultiEdit", + "hooks": [ + { + "type": "command", + "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/validate-el.sh" + } + ] + } + ] + } +} -- cgit v1.2.3