Domains
Lefthook Commit Gate Glossary
Canonical language for the HI Catalogue local commit gate
Lefthook Commit Gate Glossary
This page is the durable language surface for the accepted Lefthook integration. The grill status and grill log remain the detailed decision record.
Terms
- Lefthook: The Evil Martians Git-hook manager distributed through the
lefthookpackage and executable. - Commit Gate: A first-class HI Catalogue contribution that applies local checks before Git creates a commit through the normal commit path.
- Commit Gate Consumer: A consumer with a supported JavaScript package manager and lockfile path plus a complete Quality Command Contract. Python-only and other unsupported consumers are non-applicable.
- Quality Command Contract: Compiled catalogue output containing one lint command and one read-only format-check command for a Commit Gate Consumer.
- Commit Gate Opt-Out: Durable project policy (
commitGate: "disabled") that prevents future runs from installing or reactivating the Commit Gate. Writing it changes no hook state. The nexthi updateremoves the Managed Hook Script when its digest matches and unsetscore.hooksPathonly when it is.githooks. - Hook Migration Proposal: An HI recommendation to replace a detected existing hook manager with Lefthook. It is not migration approval.
- Post-Command Handoff: Structured scaffold output that tells the
$hi-cliagent which lifecycle work and verification remain after the CLI command returns. - Commit Gate Lifecycle Receipt: Retired. CLI 6 migration deletes
.devpunks/commit-gate-lifecycle-receipt.json;hi commit-gate verifyreplaces it and writes nothing. - Managed Hook Script and Hook Activation: defined in the baseline video, retro and plan move glossary. Since lefthook 2.2.2, Git runs the Managed Hook Script, not a Lefthook-written
.git/hooks/pre-commit.
Relationships and axioms
- Commit Gate is separate from AI-agent lifecycle hooks and uses Lefthook as its local Git-hook manager.
- The default policy is enabled.
commitGate: "enabled" | "disabled"is stored in.devpunks/settings.json; an absent value means enabled. hi initwrites the policy only.hi updatematerializes a re-enable or runs the Opt-Out.hi commit-gate verifyreports the hook state (managed,inactiveorother) read-only. (ensureexists only ashi tools ensure.)- The normal pre-commit path requires both lint and read-only format-check success. Deliberate bypass remains possible, historical bypass is not tracked, and CI remains the merge authority.
- Context compilation rejects an applicable consumer without both Quality Command Contract commands. Applicable owner contracts run once, in parallel where independent, aggregate failures, and skip empty scope.
- HI owns exactly one Lefthook pre-commit command named
lint, preserves consumer entries, and returns unsafe conflicts for user decision. - A Hook Migration Proposal and authorized agent migration precede dependency, configuration, and installation materialization. Package lifecycle scripts must not perform unreviewed migration.
hi commit-gate verifypasses only for themanagedhook state (core.hooksPathis.githooksand the Managed Hook Script digest matches), the pinned dependency, the activelintconfiguration and an executable hook. An old.git/hooks/pre-commitis inert while activated; HI reports it and never deletes it.- The Installed Record proves desired HI-owned state;
hi commit-gate verifyproves operational health from live facts each time.