← All hooks

Agentic Governance Review

non-blockingstable

Fires on Stop. Collects the latest commit diff and sends it to an LLM for governance review — covering rules that require semantic understanding and cannot be enforced by pattern-matching hooks. Auto-detects the cheapest model available for the current provider (Haiku for Anthropic, gpt-4o-mini for OpenAI, Gemini Flash for Google). Config override at ~/.config/ai/agentic-review.json. Non-blocking — emits GOVERNANCE-VIOLATION sentinel lines.

ID hook/agentic-reviewVersion 1.0.0Author convergent-systems-key
ai hooks run agentic-review
EventStopLanguagepythonTriggeralwaysSide effects
  • calls an external LLM API (Anthropic / OpenAI / Google) — incurs inference cost
  • emits GOVERNANCE-VIOLATION sentinel lines to stderr
linuxmacoswindowsRequires at least one of: ANTHROPIC_API_KEY, OPENAI_API_KEY, AZURE_OPENAI_API_KEY, GOOGLE_API_KEY. Uses only Python stdlib for HTTP — no pip dependencies. Config override: ~/.config/ai/agentic-review.json. Silently skips if no API key is found or diff is empty.
governanceagenticcode-qualityclaude-code
Attribution: convergent-systems-key.