Skip to content
Component · Sentinel

Guardrails for AI code
enforced at commit time.

A pre-commit validator that catches what review misses.

AI generates code fast — Sentinel makes sure it is correct. It runs as a Git pre-commit hook, validating staged files against architecture, security and quality rules, and blocks the commit on hard violations.

The problem Sentinel solves

AI assistants happily write code that violates your layering, hardcodes a secret, or introduces a timing attack. By the time a human reviewer notices, it is already in a pull request. Sentinel moves enforcement to commit time, where it is cheapest to fix.

What Sentinel does

Pre-commit enforcement

A Git hook validates every staged file and exits non-zero on hard violations — the bad commit never lands.

10 built-in rules

Five hexagonal-architecture rules, three naming rules, a hardcoded-secret check and a missing-test rule — covering the most common AI mistakes.

Three enforcement profiles

minimal (security only), standard (security + critical architecture) and strict (everything) — pick the level that fits your team.

Custom team rules

Add your own regex-based rules so Sentinel enforces the conventions specific to your codebase.

Sentinel blocking a bad commit

git commit — pre-commit hook
$ git commit -m "add checkout handler"
korva-sentinel: validating 3 staged files...

✗ SEC-001  src/checkout.ts:42
  Hardcoded secret detected (stripe_key)
✗ HEX-002  src/checkout.ts:9
  HTTP handler contains business logic

commit blocked — 2 violations

Sentinel at a glance

  • 10 built-in rules — architecture, security, naming, testing
  • 3 profiles: minimal / standard / strict
  • Custom regex rules per team
  • Pre-commit + post-commit Git hooks
  • Pure Go validator — runs in milliseconds
Related commands
korva sentinel installkorva sentinel checkkorva sentinel rules

Stop reviewing the same mistakes

Install Sentinel hooks in any repo with a single command.

Install in 30 seconds