pub const HOOK_PRE_TOOL: &str = "#!/bin/bash\n# Seshat PreToolUse hook \u{2014} soft nudge before Grep/Glob/Read for code exploration.\n# Installed by `seshat init` into ~/.claude/hooks/ or .claude/hooks/.\n# Fires on: Grep, Glob, Read, Search tool calls.\n# Soft mode: prints reminder but does NOT block (exit 0).\n# One nudge per session via atomic gate directory (PPID + bash PID).\n\n# Include $$ (this script\'s PID) to avoid PPID collisions across OS reuse.\nGATE=/tmp/seshat-pre-tool-gate-${PPID}-$$\n\n# Clean up gate dirs older than 60 minutes (session-scoped, not day-scoped).\nfind /tmp -maxdepth 1 -name \'seshat-pre-tool-gate-*\' -mmin +60 -exec rm -rf {} + 2>/dev/null\n\n# Atomic gate: mkdir succeeds only once per PPID+PID combination.\nif ! mkdir \"$GATE\" 2>/dev/null; then\n exit 0\nfi\n\necho \'Seshat tip: for code exploration, consider using MCP tools first \u{2014} query_code_pattern() to find existing implementations, query_convention() for patterns. Fall back to file search for string literals, config values, and non-code files.\' >&2\nexit 0\n";Expand description
Soft PreToolUse hook — one nudge per session before Grep/Glob/Read (exit 0).