chore: bootstrap Claude setup

Add root CLAUDE.md, LESSONS.md, .env.example, .claude/settings.json
hooks (PostToolUse lint, Stop lint+test via bb dev:lint-and-test), and
a .gitea/workflows/ci.yml lint+test workflow. No development branch
exists here, so CI targets main; version.yml automation is skipped
since this repo already has its own tag-driven release/version flow
(scripts/bump-version.sh, build.yml on v* tags).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5 committed 2026-10-18 15:04:51 +02:00
1 parent b339cbb3b7
commit f4366407d8
8 files changed
+169 -1

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# PostToolUse hook: lint/format the file that was just edited or written.
# Reads the hook JSON payload from stdin and dispatches by extension.
# Best-effort: missing tooling is reported but never blocks the edit.
set -u
payload="$(cat)"
file_path="$(printf '%s' "$payload" | sed -n 's/.*"file_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n1)"
[ -z "$file_path" ] && exit 0
[ -f "$file_path" ] || exit 0
repo_root="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$repo_root" || exit 0
case "$file_path" in
*.clj|*.cljs|*.cljc)
if command -v clojure >/dev/null 2>&1; then
clojure -M:clj-kondo --lint "$file_path" --cache false || true
fi
;;
libs/*.ts|libs/*.tsx|libs/*.js)
if [ -f "libs/node_modules/.bin/prettier" ]; then
(cd libs && node_modules/.bin/prettier --write "${file_path#libs/}") || true
fi
;;
esac
exit 0