How valentynkit/jev-commit works
jev-commit is a Git commit-message hook that compares a cleaned commit message with the staged diff, reports five risk judgments, and normally fails open. The principal flow is: Git invokes the hook; it captures the message and diff, prepares budget-sized states, checks added lines for credential patterns, asks Jev to judge the states, combines scores, then reports and applies the configured blocking policy. The README documents optional strict mode, exclusions, amend-base behavior, and local gateway configuration. Corpus recording and measurement modules are omitted as development tooling; edges reflect the documented flow and the sampled CLI references.
Main entry points: cli.py Hook coordinator · jev.py Jev HTTP client · git.py Git capture · chunk.py State chunking
Components 10
Commit capture
- Hook coordinator
jev_commit/cli.py - Git capture
jev_commit/git.py
Diff analysis
- State chunking
jev_commit/chunk.py - Credential belt
jev_commit/belt.py
Judgment
- Judgment questions
jev_commit/questions.py - Jev HTTP client
jev_commit/jev.py - Score and gate
jev_commit/cli.py
Hook surface
- Hook report
jev_commit/report.py
Other components
- Git commit
- Jev service
Connections 9
- Git commit → Hook coordinator: invokes hook
README.md - Hook coordinator → Git capture: captures diff
jev_commit/cli.py - Hook coordinator → State chunking: builds states
jev_commit/cli.py - Hook coordinator → Credential belt: scans lines
jev_commit/cli.py - Hook coordinator → Judgment questions: selects questions
jev_commit/cli.py - Hook coordinator → Jev HTTP client: requests judgments
jev_commit/cli.py - Jev HTTP client → Jev service: sends request
jev_commit/jev.py - Hook coordinator → Score and gate: combines and gates
jev_commit/cli.py - Hook coordinator → Hook report: prints result
jev_commit/cli.py