Pack fields
| Field | Type | Required | What it does |
|---|---|---|---|
id | string | yes | Lowercase letters, digits, and hyphens. Must equal the file name without the extension. |
feature | string | yes | aiWriting or emDash. |
category | string or object | yes | A category id, or an object with id, label, description, and tags. |
scope | array | no | Where the pack runs. Defaults to files, comments, gh, commit, reply. |
presets | array | no | Preset names that turn the pack on. |
tags | array | no | Tags for tag:<tag> selection. Falls back to category.tags. |
options | object | no | Thresholds handed to detect as ctx.options. |
notes | string | no | Prose printed under the category in the generated reference. |
patterns | array | yes, unless detect is set | Pattern entries. |
detect | function | yes, unless patterns is set | .mjs packs only. |
Pattern entry fields:
| Field | Type | Required | What it does |
|---|---|---|---|
phrase | string | one of the 3 | A word-bounded phrase. |
opening | string | one of the 3 | A sentence-initial phrase. |
regex | string | one of the 3 | A raw regular expression. |
flags | string | no | Regex flags for a regex entry. Defaults to gi. |
fix | string | yes | The replacement text printed in the deny message. |
tier | 1 or 2 | no | Defaults to 1. |
show | string | no | The text the reference renderer prints instead of the expanded pattern. |
A tier-2 pattern reports only when 2 distinct tier-2 patterns land in the same paragraph. A single tier-2 hit stays quiet.
A regex entry with a named group hit reports only that group as the flagged text.