← All hooks

Dirty Tree Guard

non-blockingstable

Checks the session working directory for uncommitted tracked changes and unpushed commits at Stop and SubagentStop. Emits GIT-HYGIENE-VIOLATION sentinel lines to stdout and stderr — non-blocking.

ID hook/dirty-tree-guardVersion 1.0.0Author convergent-systems-key
ai hooks run dirty-tree-guard
EventStopLanguagepythonTriggeralwaysSide effects
  • emits GIT-HYGIENE-VIOLATION sentinel lines to stdout and stderr
linuxmacoswindowsRequires git. Reads cwd from the hook event payload (field 'cwd' or 'workingDirectory'), falling back to process cwd. Client-agnostic — works with Claude Code, Codex, Copilot. Non-blocking — uses the sentinel pattern. Cross-platform via 'ai hooks run'.
gitgovernanceagentic-lifecycleclaude-code
Attribution: convergent-systems-key.