chore: bootstrap Claude setup

Add root CLAUDE.md, docs/architecture.md, LESSONS.md, .env.example, VERSION,
.claude/settings.json hooks (syntax/JSON checks since no linter/tests exist
yet), and CI/version-bump GitHub workflows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5 committed 2026-10-18 11:42:56 +02:00
1 parent aa24c77bc8
commit 980f9ffe17
11 files changed
+255

No files matched your search

+1
View File
@@ -0,0 +1 @@
2
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# PostToolUse hook (Edit/Write): quick syntax check on the file that was just changed.
# No linter/formatter is configured for this project, so this only catches
# JS syntax errors and invalid JSON.
set -euo pipefail
input=$(cat)
file_path=$(echo "$input" | node -e "
let d='';
process.stdin.on('data', c => d += c);
process.stdin.on('end', () => {
try {
const j = JSON.parse(d);
process.stdout.write(j.tool_input?.file_path || '');
} catch { process.stdout.write(''); }
});
" <<< "$input")
[ -z "$file_path" ] && exit 0
[ -f "$file_path" ] || exit 0
case "$file_path" in
*.js)
node --check "$file_path"
;;
*.json)
node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))" "$file_path"
;;
*)
exit 0
;;
esac
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Stop hook: quickest meaningful check for this repo. No test suite and no
# linter are configured, so this syntax-checks every tracked JS file and
# validates every tracked JSON file. Fails (blocking) on the first error.
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
status=0
while IFS= read -r -d '' f; do
node --check "$f" || status=1
done < <(git ls-files -z -- '*.js')
while IFS= read -r -d '' f; do
node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))" "$f" || status=1
done < <(git ls-files -z -- '*.json')
exit $status
+19
View File
@@ -0,0 +1,19 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/lint-file.sh" }
]
}
],
"Stop": [
{
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/stop-check.sh" }
]
}
]
}
}