aboutsummaryrefslogtreecommitdiff
path: root/claude-templates
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-28 09:16:39 -0500
committerCraig Jennings <c@cjennings.net>2026-05-28 09:16:39 -0500
commit5c0c7a6f213609f5be8258f07b763201ad182876 (patch)
tree9d7c0d54cde859607fb1910b57395f4408900906 /claude-templates
parentbdf755d33aa6a207a538c85f18e38cc03f14e529 (diff)
downloadrulesets-5c0c7a6f213609f5be8258f07b763201ad182876.tar.gz
rulesets-5c0c7a6f213609f5be8258f07b763201ad182876.zip
fix(sync-check): ignore generated python and elisp artifacts
Pre-commit caught a false-positive on its first real-world run. The .ai/scripts/__pycache__ directory created by make test (pytest writes .pyc and .pytest_cache, emacs writes .elc) was flagged as drift against the canonical's clean tree. Added matching --exclude patterns to the diff -rq check and the --fix rsync calls. Patterns: __pycache__, *.pyc, *.pyo, .pytest_cache, *.elc. The --fix excludes prevent rsync's --delete from wiping the mirror's __pycache__ when the canonical has none. Four new bats tests cover the exclusions. All 12 pass.
Diffstat (limited to 'claude-templates')
-rw-r--r--claude-templates/Makefile39
1 files changed, 0 insertions, 39 deletions
diff --git a/claude-templates/Makefile b/claude-templates/Makefile
deleted file mode 100644
index e097cc2..0000000
--- a/claude-templates/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-.DEFAULT_GOAL := help
-
-PREFIX ?= $(HOME)/.local/bin
-SRC := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
-
-.PHONY: help install uninstall list test-scripts
-
-help:
- @printf 'claude-templates — session launcher + project seed\n\n'
- @printf 'Targets:\n'
- @printf ' make install symlink bin/ai into %s\n' "$(PREFIX)"
- @printf ' make uninstall remove the symlink\n'
- @printf ' make list show installed symlink\n'
- @printf ' make test-scripts run pytest + ERT suites under .ai/scripts/tests/\n'
-
-install:
- @mkdir -p $(PREFIX)
- @chmod +x $(SRC)/bin/ai
- @ln -sfn $(SRC)/bin/ai $(PREFIX)/ai
- @printf 'installed %s/ai -> %s/bin/ai\n' "$(PREFIX)" "$(SRC)"
-
-uninstall:
- @if [ -L $(PREFIX)/ai ]; then \
- rm $(PREFIX)/ai; \
- printf 'removed %s/ai\n' "$(PREFIX)"; \
- else \
- printf '%s/ai is not a symlink; nothing to remove\n' "$(PREFIX)"; \
- fi
-
-list:
- @ls -la $(PREFIX)/ai 2>/dev/null || printf 'not installed\n'
-
-test-scripts:
- @cd $(SRC)/.ai/scripts/tests && python -m pytest
- @set -e; for f in $(SRC)/.ai/scripts/tests/test-*.el; do \
- [ -e "$$f" ] || continue; \
- echo "ert: $$(basename "$$f")"; \
- emacs --batch -q -L $(SRC)/.ai/scripts -l ert -l "$$f" -f ert-run-tests-batch-and-exit; \
- done