Architecture: Hooks

arch-hooks Doc

architecture active

Hooks

Claude Code lifecycle hooks in ~/claude-custom/hooks/. Shell scripts triggered by PreToolUse, PostToolUse, and session events. Enforce workflow gates (PR templates, branch protection, board advancement, spawn requirements) and automate housekeeping (worktree cleanup, board sync).

Key hooks

  • check-pr-template.sh — PR body validation (Closes #N, heading template)
  • block-claude-custom-main-edit.sh — prevents edits on main branch
  • cross-repo-isolation.sh — prevents unsafe checkouts on shared directories
  • check-board-advance.sh — review gate for board column transitions
  • agent-spawn-requirements.json — requires issue/PR references in agent prompts