Documentation Index
Fetch the complete documentation index at: https://docs.sigilix.ai/llms.txt
Use this file to discover all available pages before exploring further.
deterministicChecks is the sigilix.json v3 field for regex rules that run before the LLM specialists. Matches surface as structured findings injected into specialist prompts as authoritative facts.
This page is the practical reference. For the conceptual layer (why deterministic checks exist alongside LLMs), see Deterministic Checks.
Quick example
+) for console.log(. Any match becomes a warning finding the synthesizer must contend with.
Rule shape
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | Kebab-case, unique within this config. Used in telemetry. |
pattern | string | yes | Regex source (no surrounding slashes). Standard JavaScript regex semantics. |
severity | "info" | "warning" | "critical" | yes | Maps to score 2 / 4 / 5. |
message | string | yes | One-line finding text. Markdown is allowed. |
flags | string | no | Regex flags. i for case-insensitive. Do not pass g — it’s implied. |
What the regex runs against
Each rule runs against added diff lines — the lines starting with+ in the unified diff, with the + itself included in the input. To anchor to a real added line, start your pattern with ^\+.
+ // XXX: revisit this but won’t match // XXX in an unchanged context line.
This means deterministic checks don’t see deletions, context, or anything outside the changed hunks. If you want a check that fires on the presence of a pattern in the file (regardless of whether this PR touched it), that’s an AST rule pack, not deterministicChecks.
Severity mapping
| Severity | Score | Synthesizer behavior |
|---|---|---|
info | 2 | Surfaces as an inline finding only if no higher-severity findings dominate |
warning | 4 | Always surfaces; included in the verdict body |
critical | 5 | Always surfaces; sets the verdict to Request changes |
critical deterministic finding the way it can down-grade an LLM finding whose structural provenance is weak — by construction, a regex match has perfect provenance.
Writing the regex
The pattern is plain JavaScript regex syntax. Double-escape backslashes for JSON.| You want | You write in JSON | |
|---|---|---|
\d+ | "\\d+" | |
\b | "\\b" | |
\. | "\\." | |
^\+ | "^\\+" | |
| `(?:foo | bar)` | "(?:foo|bar)" |
g flag so the rule can match multiple times per file. Don’t pass g yourself — it’s a no-op and may produce a warning.
Lookbehind & advanced features
Most ES2018+ regex features work: lookbehind ((?<=...)), named groups ((?<name>...)), unicode property escapes (\p{Letter}). If you need a feature that requires a specific flag (e.g., u for unicode property escapes), include it in flags.
Worked examples
Stray debug prints
Hardcoded secrets
deterministicChecks for repo-specific secret patterns the built-in scanner won’t know about (internal API key prefixes, partner credentials).
Forbidden imports
Banned APIs in production paths
eval( in any added line. To scope to a path subtree, combine with pathFilters to exclude tests where eval may be legitimate.
TODO / FIXME hygiene
(YYYY-MM-DD) date. Inverted-assertion regexes get unwieldy fast; this is about the upper limit of complexity worth doing in deterministicChecks versus an AST rule pack.
Gotchas
The + is in the input
Forgetting this is the #1 mistake. "console\\.log" matches both added and context lines. "^\\+.*console\\.log" only matches added lines.
JSON escaping doubles the slashes
\b (word boundary) is "\\b" in JSON. \\b in JSON is a literal backspace character — wrong. If your rule isn’t firing, paste the pattern into an MDN regex tester and check that it compiles to the regex you think it should.
Don’t match the diff metadata
Diff headers (diff --git, +++ b/path) start with + too. To avoid matching +++ b/..., anchor with ^\+[^+] instead of just ^\+:
Severity inflation costs trust
Tagging every TODO ascritical is a fast way to teach your team to ignore Sigilix. Use info and warning liberally; reserve critical for things that genuinely should block merge (secrets, banned APIs, security regressions).
Validation
Sigilix validates each rule on every review:id,pattern,severity,messageare required.patternmust be a compilable JavaScript regex. Invalid regex → that rule is dropped, warning logged in telemetry, review proceeds with remaining rules.- Duplicate
idwithin a single config → second occurrence dropped. - Severity must be one of the three values; unknown severity → rule dropped.
deterministicChecks still fires.
Read next
Deterministic Checks — how it works
The pre-LLM signal layer, end-to-end.
Configuration reference
Full
sigilix.json schema.
