Required fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the rule. Used in CLI output and in .vectorlint.ini overrides. PascalCase recommended (e.g., GrammarChecker). |
name | string | Human-readable display name shown in CLI output. |
Optional fields
| Field | Default | Description |
|---|---|---|
specVersion | (none) | Rule spec version. Set to 1.0.0 for rules using the full judge schema. |
evaluator | base | Evaluator type. Use base for standard rules. Use technical-accuracy for rules that verify factual claims against live web search (requires a search provider). |
type | check | Evaluation mode. check finds specific, countable violations. judge scores content against weighted criteria on a 1–4 rubric. |
severity | warning | How a failing result is reported. error causes a non-zero exit code; warning reports the issue without failing the run. |
evaluateAs | chunk | Whether to evaluate content in sections (chunk) or as a single unit (document). Chunking is applied automatically to documents over 600 words. Set to document to disable chunking for a specific rule. |
target | (none) | Regex specification to extract and evaluate a specific portion of the content, such as the H1 headline. See Target fields below. |
criteria | (none) | Required when type is judge. Defines the scoring dimensions and their weights. See Criteria fields below. |
Target fields
Thetarget field narrows evaluation to a specific part of the document. It is an object with the following sub-fields:
| Field | Type | Required | Description |
|---|---|---|---|
regex | string | Yes | Regular expression pattern to match the target content. |
flags | string | No | Regex flags (e.g., "mu" for multiline and Unicode). |
group | number | No | Capture group index to extract. If omitted, the full match is used. |
required | boolean | No | When true, a missing match immediately reports an error with the suggestion text and skips LLM evaluation. When false or omitted, a missing match causes VectorLint to evaluate the full document instead. |
suggestion | string | No | Message shown when required: true and the pattern does not match. |
Criteria fields
Thecriteria field is an array of criterion objects used with type: judge. Each criterion defines one scoring dimension.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable criterion name shown in CLI output. |
id | string | Yes | Unique identifier for this criterion. PascalCase recommended (e.g., TechnicalAccuracy). Referenced in the Markdown body rubric as # CriterionName <weight=N>. |
weight | number | No | Relative importance of this criterion in the weighted average. Higher values increase the criterion’s influence on the final score. Defaults to 1. |
target | object | No | Criterion-specific content matching. Uses the same sub-fields as the top-level target. Overrides the rule-level target for this criterion only. |