mirror of
https://github.com/Donchitos/Claude-Code-Game-Studios.git
synced 2026-06-27 04:51:46 +00:00
Adopt new Claude Code features: agent memory, context fork, worktree isolation, SubagentStop hook
- Add `memory: project` to 14 specialist agents for cross-session learning - Add `context: fork` + `agent:` to 6 analysis skills to preserve main context - Add `isolation: worktree` to prototyper agent for safe throwaway experiments - Add SubagentStop hook to complete agent audit trail (start + stop logging) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
25
.claude/hooks/log-agent-stop.sh
Normal file
25
.claude/hooks/log-agent-stop.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# Claude Code SubagentStop hook: Log agent completion for audit trail
|
||||
# Tracks when agents finish and their outcome
|
||||
#
|
||||
# Input schema (SubagentStop):
|
||||
# { "agent_id": "agent-abc123", "agent_name": "game-designer", ... }
|
||||
|
||||
INPUT=$(cat)
|
||||
|
||||
# Parse agent name -- use jq if available, fall back to grep
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
AGENT_NAME=$(echo "$INPUT" | jq -r '.agent_name // "unknown"' 2>/dev/null)
|
||||
else
|
||||
AGENT_NAME=$(echo "$INPUT" | grep -oE '"agent_name"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/"agent_name"[[:space:]]*:[[:space:]]*"//;s/"$//')
|
||||
[ -z "$AGENT_NAME" ] && AGENT_NAME="unknown"
|
||||
fi
|
||||
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
SESSION_LOG_DIR="production/session-logs"
|
||||
|
||||
mkdir -p "$SESSION_LOG_DIR" 2>/dev/null
|
||||
|
||||
echo "$TIMESTAMP | Agent completed: $AGENT_NAME" >> "$SESSION_LOG_DIR/agent-audit.log" 2>/dev/null
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user