Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration reference

Generated from jevgate.schema.json, which is generated from the configuration types. Configuration explains how the keys work together.

KeyTypeMeaning
cache_ttl_secsintegerCache lifetime in seconds for an alias, a model name without an x.y.z version such as jev-latest; pinned versions never expire. Default: 3600.
concurrencyintegerMost simultaneous requests; flags can only lower it. JevGate sends at most 6 at once, so a higher value means 6. Default: 6 with a TypeSafe key, 3 with an OpenRouter or Vercel AI Gateway key.
contextlist of stringsFiles always sent as related evidence, like --context.
fail_onlist of stringsThe level for rules without their own, like --fail-on. Default: [“mature”], which fails only on the levels of a rule measured right at least 80% of the time on projects JevGate was never tuned on, never in a preview language, and on a custom question’s own level; jevgate rules shows them.
generatedlist of stringsGlobs of generated files, which are skipped, in addition to the built-in names.
include_testsbooleanJudge tests, like --include-tests. Default: false.
max_context_bytesintegerCeiling on context bytes per request. Default: 32768.
max_costnumberCeiling on a check’s estimated spend in dollars; what is left unasked leaves the run incomplete. Flags can only lower it. Default: unlimited.
max_file_bytesintegerFiles larger than this are reported as needs-context, never truncated. Default: 262144.
max_requestsintegerCeiling on API attempts per invocation; flags can only lower it. Default: unlimited.
max_secondsintegerCeiling on the seconds a check asks for; what is left unasked leaves the run incomplete. Flags can only lower it. Default: 60 with --staged and --pre-push, else unlimited.
modelstringModel, as the key’s provider names it; a pinned version keeps results repeatable. --model overrides it. Default: jev-1.13.0 with a TypeSafe key, typesafe/jev-1.13 with an OpenRouter key, typesafe-ai/jev with a Vercel AI Gateway key.
on_incompletepass, failWhat a run that cannot finish exits with, like --on-incomplete: pass (exit 0, saying so on stderr) or fail (exit 2). Default: pass with --staged and --pre-push, else fail.
questionlist of tablesCustom questions: a yes/no question per convention, asked of each unit it names, whose yes is a finding. .jevgate/questions/ holds one per file, named by its id.
rulesrules list or tableA list selects rules; a table gives each group or rule a level. Default: the default group.
scopelist of tablesGate levels for the files some paths match, such as report-only tooling.
testslist of stringsGlobs of additional test files.
upload_allowlist of stringsGlobs of the paths that may be uploaded, including instruction files and context. Default: every path.
upload_denylist of stringsGlobs never uploaded, even when allowed.

[[scope]]

[[scope]]: gate levels for the files paths match. fail_on applies to every rule there, and rules to single rules or groups. The last scope that matches a file and addresses a rule wins; other files and rules keep the levels set outside scopes.

KeyTypeMeaning
fail_onlist of stringsThe level for every rule in these files.
pathslist of stringsGlobs of the files this scope applies to.
rulesobjectLevels of single rules or groups in these files; off is not accepted (use upload_deny).

[[question]]

A question as a configuration writes it.

KeyTypeMeaning
backgroundstringWhy the rule exists; sent with the question.
failinglist of tablesExamples of code that breaks the rule: jevgate rules test fails when the answer about one stays below the threshold.
guidancestringHow to decide: what counts as a violation and what does not; sent with the question.
idstringNames the rule: custom/ and the id, of lowercase letters, digits and single hyphens, starting with a letter. Required in jevgate.toml; a question file’s name gives it.
levelreview, consider, noteThe level of its findings, and the level at which it fails the gate unless fail_on or --fail-on says otherwise. Default: review.
next_stepstringThe next step a finding shows. Default: fix it; a person can accept it with a jevgate: allow comment and a reason.
passinglist of tablesExamples of code that keeps the rule: jevgate rules test fails when the answer about one reaches the threshold.
pathslist of stringsGlobs of the files it applies to. Default: every file its unit applies to. For file and hunk, they can also name text files in languages JevGate does not parse.
questionstringOne yes/no question about each unit, ending in ?; yes is a violation.
thresholdnumberThe probability of yes at or above which a unit breaks the rule (0.5 to 0.99); at or below one minus it, the unit is clear. Default: 0.8.
unitfunction, file, test, section, comment, hunkWhat the question is asked about.

[[question.failing]], [[question.passing]]

An example of a custom question: a file’s text that breaks or keeps its rule, written inline or read from a file.

KeyTypeMeaning
codestringThe example’s text: a file’s content, or for a hunk question the lines of a diff (+ added, - removed, a space unchanged). Use code or file.
filestringA file holding the example, relative to the repository root. It is uploaded as a checked file is: inside the repository, not hidden (except under .jevgate/questions/), and within upload_allow and upload_deny. Use code or file.
pathstringThe file the example stands for, relative to the repository root: its language, and the path Jev reads. It must match the question’s paths. Required with code; default: file.

Levels

review, consider, mature, uncertain, report, none, off. off is accepted in [rules] only.

Rule names

maintainability/file-organization, file-organization, file_organization, maintainability/function-simplification, function-simplification, function_simplification, maintainability/shared-logic, shared-logic, shared_logic, maintainability/hardcoded-values, hardcoded-values, hardcoded_values, security/injection, injection, security/sensitive-data, sensitive-data, sensitive_data, security/unsafe-settings, unsafe-settings, unsafe_settings, security/access-control, access-control, access_control, security/workflows, workflows, tests/value, value, test_value, tests/redundancy, redundancy, test_redundancy, tests/laws, laws, documentation/agent-context, agent-context, agent_context, documentation/large-docs, large-docs, large_docs, documentation/staleness, staleness, doc_staleness, documentation/duplication, duplication, doc_duplication, documentation/comments, comments, maintainability, security, tests, documentation, default, all, and custom/<id> for each custom question.