Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .claude/hooks/session-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -euo pipefail

# Only run in Claude Code on the web; skip on local machines.
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
exit 0
fi

cd "${CLAUDE_PROJECT_DIR:-$(pwd)}"

echo "[openboot session-start] Go version: $(go version)"

# Pre-fetch and verify Go module deps so tests/builds are fast and offline-safe.
echo "[openboot session-start] Downloading Go modules..."
go mod download

# Warm the build cache so the first `go build` / `go test` is fast.
echo "[openboot session-start] Warming build cache (go build ./...)..."
go build ./... >/dev/null

# Warm the test binary cache without executing tests.
echo "[openboot session-start] Warming test cache (go test -count=0 ./...)..."
go test -count=0 ./... >/dev/null

echo "[openboot session-start] Done."
14 changes: 14 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
}
]
}
]
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ __pycache__/

# Work tracking (internal)
.sisyphus/
.claude/
.claude/*
!.claude/hooks/
!.claude/settings.json
.claude/settings.local.json

# Go vendor (deps downloaded at build time)
vendor/
Expand Down
Loading