Concepts

Guardrails

Hooks and checks that enforce the rules instead of asking for them.

Four hooks and a few scripts do the checking. They are silent outside agent-kit projects and take about 70–100 ms each. Full list in Hooks.

Git guard

A PreToolUse(Bash) hook applies the git flow you chose, even through bash -c, eval, $( ) and git aliases:

FlowThe agent mayBlocked
Read-onlyread (status, diff, log, …)every git write — the agent hands you the exact command
Branches + PRscommit on a feature branchcommits / pushes on the main branch
Trunkcommit on main—

Every flow blocks force-push, reset --hard, clean -f, branch -D and --no-verify, and the guard validates git commit -m messages before they run. Permission rules in .claude/settings.json are the first layer; the hook is the backstop.

Preflight

agent-kit preflight [base] (and the preflight skill) before a merge:

  • Violations (block): changed logic without a test (SDD + TDD), an edited committed migration, grants to the browser roles, possible secrets, undocumented kept scripts, done changes with uncovered scenarios or not merged into the living specs.
  • Report: migrations to apply, new env vars, new dependencies.
  • Warnings: debug leftovers, living-spec gaps, notation errors, a stale QA checklist, migrations without seed / purge changes.

Commits

With Conventional Commits, init adds commitlint + husky. The commit skill runs preflight, writes the message, checks it with agent-kit commit check and commits within the git flow — or gives you the command in a read-only project. agent-kit commit draft groups changed files by suggested scope.

Reviewer

A read-only reviewer agent reviews a diff against its change: every scenario's proof, the EARS requirements, the knowledge rules, and correctness bugs (scope checks, rounding, idempotent migrations).