---
title: Rules reference
description: Every rule Gribble knows, with options, preset defaults and fix hints.
order: 32
---

<!-- Generated by packages/core/scripts/generate-rules-docs.ts from the rule registry. Do not edit by hand; run `pnpm docs:rules`. -->
Every rule has an id of the form `category/name`. Set it in `.gribble/rules.yaml` to a severity
(`off`, `info`, `warn`, `error`, `critical`) or to `[severity, { options }]`. `error` and `critical`
fail the gate; `warn` and `info` never block. Findings link here as `https://gribble.dev/rules/<id>`.

Presets: `gribble:recommended`, `gribble:strict`, `gribble:seo`, `gribble:a11y`. `gribble init` extends `gribble:recommended`.

## Contents

- **Links**: [links/broken](#links-broken), [links/broken-external](#links-broken-external), [links/redirect-chain](#links-redirect-chain), [links/empty-href](#links-empty-href), [links/target-blank-noopener](#links-target-blank-noopener)
- **Network**: [network/page-error](#network-page-error), [network/failed-requests](#network-failed-requests), [network/console-errors](#network-console-errors), [network/console-warnings](#network-console-warnings), [network/large-assets](#network-large-assets), [network/request-count](#network-request-count)
- **SEO**: [seo/title](#seo-title), [seo/duplicate-title](#seo-duplicate-title), [seo/meta-description](#seo-meta-description), [seo/single-h1](#seo-single-h1), [seo/heading-order](#seo-heading-order), [seo/canonical](#seo-canonical), [seo/robots-noindex](#seo-robots-noindex), [seo/robots-txt](#seo-robots-txt), [seo/sitemap](#seo-sitemap), [seo/lang-attribute](#seo-lang-attribute), [seo/open-graph](#seo-open-graph), [seo/twitter-card](#seo-twitter-card), [seo/structured-data](#seo-structured-data), [seo/hreflang](#seo-hreflang), [seo/url-format](#seo-url-format)
- **Accessibility**: [a11y/axe](#a11y-axe), [a11y/img-alt](#a11y-img-alt), [a11y/form-labels](#a11y-form-labels), [a11y/accessible-name](#a11y-accessible-name), [a11y/color-contrast](#a11y-color-contrast), [a11y/focus-visible](#a11y-focus-visible), [a11y/keyboard-reachable](#a11y-keyboard-reachable), [a11y/touch-target](#a11y-touch-target), [a11y/skip-link](#a11y-skip-link), [a11y/reduced-motion](#a11y-reduced-motion)
- **Performance**: [perf/lighthouse-performance](#perf-lighthouse-performance), [perf/lcp](#perf-lcp), [perf/cls](#perf-cls), [perf/tbt](#perf-tbt), [perf/page-weight](#perf-page-weight), [perf/unsized-images](#perf-unsized-images), [perf/image-format](#perf-image-format), [perf/render-blocking](#perf-render-blocking), [perf/regression](#perf-regression)
- **UI hard rules**: [ui/colors-from-tokens](#ui-colors-from-tokens), [ui/font-sizes-from-tokens](#ui-font-sizes-from-tokens), [ui/spacing-from-tokens](#ui-spacing-from-tokens), [ui/min-font-size](#ui-min-font-size), [ui/overlap](#ui-overlap), [ui/horizontal-overflow](#ui-horizontal-overflow), [ui/text-clipped](#ui-text-clipped), [ui/broken-images](#ui-broken-images), [ui/placeholder-text](#ui-placeholder-text), [ui/favicon](#ui-favicon), [ui/empty-state](#ui-empty-state)
- **Visual regression**: [visual/regression](#visual-regression)
- **Structure regression**: [structure/regression](#structure-regression)
- **HTML**: [html/doctype](#html-doctype), [html/charset](#html-charset), [html/viewport-meta](#html-viewport-meta), [html/duplicate-ids](#html-duplicate-ids), [html/deprecated-elements](#html-deprecated-elements), [html/valid](#html-valid)
- **Security**: [security/https-only](#security-https-only), [security/mixed-content](#security-mixed-content), [security/headers](#security-headers), [security/exposed-secrets](#security-exposed-secrets), [security/sourcemaps-exposed](#security-sourcemaps-exposed), [security/form-without-csrf](#security-form-without-csrf)
- **Internationalization**: [i18n/untranslated-keys](#i18n-untranslated-keys), [i18n/mixed-language](#i18n-mixed-language), [i18n/lang-mismatch](#i18n-lang-mismatch)
- **Flows**: [flows/replay](#flows-replay), [flows/max-duration](#flows-max-duration)
- **AI review**: [review/guidelines](#review-guidelines), [review/ux](#review-ux), [review/copy](#review-copy), [review/dead-ends](#review-dead-ends), [review/flow-coverage](#review-flow-coverage), [review/error-handling](#review-error-handling)

## Links

<a id="links-broken"></a>

### links/broken

Internal links must not resolve to a 4xx or 5xx response.

Every same-origin anchor, image, script and stylesheet reference is requested. A response of 400 or above, a connection failure or a timeout is reported with the link target as the subject.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Point the link at an existing route or asset, or remove it. For moved pages add a redirect instead of leaving a dead link.

Bad:

```html
<a href="/pricing-old">Pricing</a>  <!-- 404 -->
```

Good:

```html
<a href="/pricing">Pricing</a>
```

<a id="links-broken-external"></a>

### links/broken-external

External links must respond.

Links to other origins are requested with a HEAD (falling back to GET) request. Hosts listed in `ignore` are skipped; some sites block automated requests, so this rule defaults to warn.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"timeout":10000,"ignore":["linkedin.com"]}]` |
| `gribble:strict` | `[error, {"timeout":10000,"ignore":["linkedin.com"]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `timeout` | integer | `10000` | Per-request timeout in milliseconds. |
| `ignore` | string[] | `["linkedin.com"]` | Hostnames (or globs) that are never checked, e.g. sites that block bots. |

**Fix:** Update or remove the link. If the host blocks automated requests, add it to `ignore`.

<a id="links-redirect-chain"></a>

### links/redirect-chain

Links must not go through more than `max` redirects.

Each redirect adds a round trip and loses link equity. The rule counts the hops between the link target and the final 2xx response.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"max":1}]` |
| `gribble:strict` | `[error, {"max":1}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `max` | integer | `1` | Maximum number of redirects allowed. |

**Fix:** Link directly to the final URL.

<a id="links-empty-href"></a>

### links/empty-href

Anchors must have a real destination.

Reports `href="#"`, `href="javascript:void(0)"` and anchors without an href. These are usually buttons in disguise, which breaks keyboard access and "open in new tab".

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Use a `<button>` for actions, or give the anchor a real URL.

Bad:

```html
<a href="#" onclick="open()">Open</a>
```

Good:

```html
<button type="button" onclick="open()">Open</button>
```

<a id="links-target-blank-noopener"></a>

### links/target-blank-noopener

`target="_blank"` links must set `rel="noopener"`.

Without `noopener`, the opened page gets a reference to the opener window (reverse tabnabbing in older browsers). Modern browsers imply it, but the attribute keeps behaviour consistent.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add rel="noopener noreferrer" to the anchor.

Bad:

```html
<a href="https://example.com" target="_blank">Docs</a>
```

Good:

```html
<a href="https://example.com" target="_blank" rel="noopener noreferrer">Docs</a>
```

## Network

<a id="network-page-error"></a>

### network/page-error

The route itself must load.

The route's document response returned 5xx, the navigation failed, or the page threw an uncaught exception while rendering.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `critical` |
| `gribble:strict` | `critical` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Open the route locally and read the server log or the browser console; this is a crash, not a nit.

<a id="network-failed-requests"></a>

### network/failed-requests

No request made by the page may fail.

Any XHR, fetch, image, font, script or stylesheet request that fails (network error or status 400+) during load and interaction is reported with the request URL as the subject.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Fix the endpoint or asset path, or remove the request. Third-party failures can be excluded via `ignore` on network/console-errors if they only surface as console noise.

<a id="network-console-errors"></a>

### network/console-errors

The browser console must stay free of errors.

`console.error` calls and uncaught exceptions during load and interaction are reported. Messages matching an `ignore` pattern (substring or regular expression) are skipped.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"ignore":["ResizeObserver loop"]}]` |
| `gribble:strict` | `[error, {"ignore":["ResizeObserver loop"]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `ignore` | string[] | `["ResizeObserver loop"]` | Substrings or regular expressions of messages to ignore. |

**Fix:** Fix the source of the error. Add known-benign third-party messages to `ignore`.

<a id="network-console-warnings"></a>

### network/console-warnings

The browser console must stay free of warnings.

`console.warn` calls during load and interaction are reported. Noisy by default, so it is off.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Address the warning or turn the rule off for the route.

<a id="network-large-assets"></a>

### network/large-assets

No single asset may exceed `maxKb`.

Transfer size of every response is measured; anything over the limit is reported with its URL.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"maxKb":500}]` |
| `gribble:strict` | `[error, {"maxKb":500}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `maxKb` | number | `500` | Maximum transfer size per asset in kilobytes. |

**Fix:** Compress or resize the asset, split the bundle, or lazy-load it.

<a id="network-request-count"></a>

### network/request-count

A route may not issue more than `max` requests on load.

Counts every request made until the page is idle.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"max":100}]` |
| `gribble:strict` | `[error, {"max":100}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `max` | integer | `100` | Maximum number of requests during page load. |

**Fix:** Bundle assets, use sprites or inline small resources, remove unused third-party scripts.

## SEO

<a id="seo-title"></a>

### seo/title

Every page needs a `<title>` within the configured length.

A missing, empty, too short or too long document title is reported.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"min":10,"max":60}]` |
| `gribble:strict` | `[error, {"min":10,"max":60}]` |
| `gribble:seo` | `[error, {"min":10,"max":60}]` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `min` | integer | `10` | Minimum title length in characters. |
| `max` | integer | `60` | Maximum title length in characters. |

**Fix:** Set a descriptive <title> per route, typically `Page name – Site name`.

<a id="seo-duplicate-title"></a>

### seo/duplicate-title

Titles must be unique across routes.

Two or more audited routes share the same `<title>`. Search engines and tab bars cannot tell them apart.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Include the page-specific subject in each title.

<a id="seo-meta-description"></a>

### seo/meta-description

Every page needs a meta description within the configured length.

A missing, empty, too short or too long `<meta name="description">` is reported.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"min":50,"max":160}]` |
| `gribble:strict` | `[error, {"min":50,"max":160}]` |
| `gribble:seo` | `[warn, {"min":50,"max":160}]` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `min` | integer | `50` | Minimum length in characters. |
| `max` | integer | `160` | Maximum length in characters. |

**Fix:** Add a one-sentence description of the page in the document head.

<a id="seo-single-h1"></a>

### seo/single-h1

Exactly one `<h1>` per page.

Zero or multiple `<h1>` elements are reported. One top-level heading tells crawlers and screen readers what the page is about.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `error` |
| `gribble:a11y` | `off` |

**Fix:** Keep one `<h1>` for the page subject; demote the others to `<h2>`.

Bad:

```html
<h1>Shop</h1> ... <h1>Featured</h1>
```

Good:

```html
<h1>Shop</h1> ... <h2>Featured</h2>
```

<a id="seo-heading-order"></a>

### seo/heading-order

Heading levels must not skip.

An `<h4>` directly after an `<h2>` (and similar jumps) is reported. Heading order is the page outline for assistive technology.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Use the next heading level down; style with CSS, not by picking a smaller heading tag.

<a id="seo-canonical"></a>

### seo/canonical

Pages need a valid canonical link.

Reports a missing `<link rel="canonical">`, a relative or malformed href, or a canonical pointing at a different route than expected.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Emit an absolute canonical URL for each route.

<a id="seo-robots-noindex"></a>

### seo/robots-noindex

Public routes must not be marked noindex.

A `<meta name="robots" content="noindex">` or `X-Robots-Tag: noindex` on a route not covered by `allow` is reported. Catches staging flags shipped to production.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"allow":["/admin/**","/preview/**"]}]` |
| `gribble:strict` | `[error, {"allow":["/admin/**","/preview/**"]}]` |
| `gribble:seo` | `[error, {"allow":["/admin/**","/preview/**"]}]` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `allow` | string[] | `["/admin/**","/preview/**"]` | Route globs where noindex is intentional. |

**Fix:** Remove the noindex directive, or add the route to `allow` if it is intentionally hidden.

<a id="seo-robots-txt"></a>

### seo/robots-txt

robots.txt must exist and parse.

Requests `/robots.txt`; reports a missing file, a non-text response, unparsable directives, or a blanket `Disallow: /` for all agents.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Serve a robots.txt that allows crawling of public routes and lists the sitemap.

<a id="seo-sitemap"></a>

### seo/sitemap

sitemap.xml must exist, be valid and cover the discovered routes.

Loads the sitemap referenced by robots.txt or `/sitemap.xml`, validates the XML, and reports public routes that are missing from it.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Generate the sitemap from the router at build time so it cannot drift.

<a id="seo-lang-attribute"></a>

### seo/lang-attribute

`<html>` must declare a language.

A missing or invalid `lang` attribute on the root element is reported. Screen readers use it to pick a voice and search engines to pick a market.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `error` |
| `gribble:a11y` | `off` |

**Fix:** Set <html lang="en"> (or the page language, as a BCP 47 tag).

<a id="seo-open-graph"></a>

### seo/open-graph

Pages need Open Graph title, description and image.

Reports missing `og:title`, `og:description` or `og:image`, and an `og:image` that does not load.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Add the og:* meta tags; share previews on chat apps and social sites depend on them.

<a id="seo-twitter-card"></a>

### seo/twitter-card

Pages need Twitter card meta tags.

Reports a missing `twitter:card`. Off by default because Open Graph tags are usually enough.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Add <meta name="twitter:card" content="summary_large_image"> and matching title/description/image tags.

<a id="seo-structured-data"></a>

### seo/structured-data

JSON-LD blocks must parse and use known types.

Every `<script type="application/ld+json">` is parsed. Invalid JSON, a missing `@context`/`@type`, or an unknown schema.org type is reported.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Validate the JSON-LD with the schema.org validator and fix the offending block.

<a id="seo-hreflang"></a>

### seo/hreflang

Localized pages must declare hreflang alternates.

For multi-language sites, reports missing or non-reciprocal `<link rel="alternate" hreflang>` entries. Off by default.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `warn` |
| `gribble:a11y` | `off` |

**Fix:** Emit a full set of hreflang links, including `x-default`, on every localized page.

<a id="seo-url-format"></a>

### seo/url-format

URLs must be lowercase and use a consistent trailing slash.

Reports discovered internal URLs with uppercase characters (when `lowercase` is true) and inconsistent trailing slashes across routes.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"lowercase":true,"trailingSlash":"consistent"}]` |
| `gribble:strict` | `[error, {"lowercase":true,"trailingSlash":"consistent"}]` |
| `gribble:seo` | `[warn, {"lowercase":true,"trailingSlash":"consistent"}]` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `lowercase` | boolean | `true` | Require lowercase paths. |
| `trailingSlash` | "consistent" \\| "always" \\| "never" \\| "ignore" | `"consistent"` | Trailing slash policy. |

**Fix:** Normalize URLs in the router and redirect the other form.

## Accessibility

<a id="a11y-axe"></a>

### a11y/axe

axe-core must report no violations of the configured impact and tags.

Runs axe-core on each route and viewport. Violations whose impact is in `impact` and whose tags intersect `tags` are reported one per rule and selector. Rule ids in `disable` are skipped.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"impact":["critical","serious"],"tags":["wcag2a","wcag2aa"],"disable":[]}]` |
| `gribble:strict` | `[error, {"impact":["critical","serious"],"tags":["wcag2a","wcag2aa"],"disable":[]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `[error, {"impact":["critical","serious"],"tags":["wcag2a","wcag2aa"],"disable":[]}]` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `impact` | "minor" \\| "moderate" \\| "serious" \\| "critical"[] | `["critical","serious"]` | axe impact levels that produce findings. |
| `tags` | string[] | `["wcag2a","wcag2aa"]` | axe tags to run, e.g. wcag2a, wcag2aa, best-practice. |
| `disable` | string[] | `[]` | axe rule ids to skip. |

**Fix:** Follow the axe help link in the finding; each violation names the failing element.

<a id="a11y-img-alt"></a>

### a11y/img-alt

Images need alt text.

Mapped from axe `image-alt`. Reports <img> elements without an `alt` attribute. Decorative images must use `alt=""`.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `error` |

**Fix:** Describe the image in `alt`, or set alt="" for purely decorative images.

Bad:

```html
<img src="/hero.png">
```

Good:

```html
<img src="/hero.png" alt="A gribble boring into a plank">
```

<a id="a11y-form-labels"></a>

### a11y/form-labels

Form controls need labels.

Mapped from axe `label`. Reports inputs, selects and textareas without a <label>, `aria-label` or `aria-labelledby`.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `error` |

**Fix:** Add a <label for> that points at the control, or an aria-label.

<a id="a11y-accessible-name"></a>

### a11y/accessible-name

Buttons and links need an accessible name.

Mapped from axe `button-name` and `link-name`. Icon-only controls without text, `aria-label` or a labelled image are reported.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `error` |

**Fix:** Add visible text, an aria-label, or alt text on the icon image.

<a id="a11y-color-contrast"></a>

### a11y/color-contrast

Text must meet the WCAG contrast ratio for `level`.

Reports text whose contrast against its background is below 4.5:1 (AA) or 7:1 (AAA); large text uses the lower thresholds.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"level":"AA"}]` |
| `gribble:strict` | `[error, {"level":"AA"}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `[warn, {"level":"AA"}]` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `level` | "AA" \\| "AAA" | `"AA"` | WCAG conformance level. |

**Fix:** Darken the text or lighten the background until the ratio passes.

<a id="a11y-focus-visible"></a>

### a11y/focus-visible

Focused elements must be visibly focused.

Tabs through interactive elements and reports those whose computed style does not change on focus (outline removed with no replacement).

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `warn` |

**Fix:** Do not remove `outline` without providing a `:focus-visible` style.

<a id="a11y-keyboard-reachable"></a>

### a11y/keyboard-reachable

Every interactive element must be reachable with Tab.

Compares the set of clickable elements with the set reached by tabbing through the page; elements that are only mouse-reachable are reported.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `warn` |

**Fix:** Use native buttons and links, or add tabindex="0" and key handlers to custom controls.

<a id="a11y-touch-target"></a>

### a11y/touch-target

Interactive elements must be at least `minPx` square on mobile.

Measures bounding boxes of interactive elements in the mobile viewport; anything smaller than `minPx` in either dimension is reported.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"minPx":44}]` |
| `gribble:strict` | `[error, {"minPx":44}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `[warn, {"minPx":44}]` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `minPx` | number | `44` | Minimum width and height in CSS pixels. |

**Fix:** Increase padding or min-height/min-width on the control.

<a id="a11y-skip-link"></a>

### a11y/skip-link

Pages need a skip-to-content link.

Reports pages whose first focusable element is not a link to the main content. Off by default.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `warn` |

**Fix:** Add <a href="#main" class="skip-link">Skip to content</a> as the first element in `<body>`.

<a id="a11y-reduced-motion"></a>

### a11y/reduced-motion

Animations must respect prefers-reduced-motion.

Reports CSS animations and transitions longer than a threshold that still run under `prefers-reduced-motion: reduce`. Off by default.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `warn` |

**Fix:** Wrap animations in `@media (prefers-reduced-motion: no-preference)`.

## Performance

<a id="perf-lighthouse-performance"></a>

### perf/lighthouse-performance

Lighthouse performance score must be at least `min`.

Runs Lighthouse per route and viewport and compares the performance category score (0-100) with `min`.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"min":80}]` |
| `gribble:strict` | `[warn, {"min":80}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `min` | number | `80` | Minimum performance score (0-100). |

**Fix:** Open the Lighthouse report attached to the run and work through the opportunities list.

<a id="perf-lcp"></a>

### perf/lcp

Largest Contentful Paint must be under `maxMs`.

Measured by Lighthouse under simulated throttling.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"maxMs":2500}]` |
| `gribble:strict` | `[error, {"maxMs":2500}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `maxMs` | number | `2500` | Maximum LCP in milliseconds. |

**Fix:** Preload the LCP image or font, inline critical CSS, remove render-blocking scripts.

<a id="perf-cls"></a>

### perf/cls

Cumulative Layout Shift must be under `max`.

Measured by Lighthouse. Layout shifts usually come from images without dimensions, late-loading fonts and injected banners.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"max":0.1}]` |
| `gribble:strict` | `[error, {"max":0.1}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `max` | number | `0.1` | Maximum CLS score. |

**Fix:** Give images and embeds explicit dimensions, reserve space for late content, use font-display: optional or swap with size-adjust.

<a id="perf-tbt"></a>

### perf/tbt

Total Blocking Time must be under `maxMs`.

Measured by Lighthouse. Long tasks on the main thread block input.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"maxMs":200}]` |
| `gribble:strict` | `[warn, {"maxMs":200}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `maxMs` | number | `200` | Maximum TBT in milliseconds. |

**Fix:** Split long tasks, defer non-critical JavaScript, reduce hydration work.

<a id="perf-page-weight"></a>

### perf/page-weight

Total transfer size of a route must be under `maxKb`.

Sums the transfer size of every request made during load.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"maxKb":2000}]` |
| `gribble:strict` | `[warn, {"maxKb":2000}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `maxKb` | number | `2000` | Maximum total transfer size in kilobytes. |

**Fix:** Compress images, tree-shake bundles, lazy-load below-the-fold content.

<a id="perf-unsized-images"></a>

### perf/unsized-images

Images need explicit width and height.

Reports <img> elements without `width`/`height` attributes or CSS aspect-ratio; they cause layout shift.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add width and height attributes (or aspect-ratio in CSS) to every image.

<a id="perf-image-format"></a>

### perf/image-format

Images should use a modern format.

Reports large JPEG/PNG images that would be smaller as WebP or AVIF.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Serve WebP/AVIF via `<picture>` or an image CDN.

<a id="perf-render-blocking"></a>

### perf/render-blocking

No render-blocking scripts or styles.

Reports synchronous scripts and stylesheets in `<head>` that delay first paint. Off by default.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add defer/async to scripts, inline critical CSS, preload the rest.

<a id="perf-regression"></a>

### perf/regression

Metrics must not regress against the baseline by more than the thresholds.

Compares each route's Lighthouse score, LCP, CLS and page weight with `baseline/metrics.json`. A drop larger than the configured delta is reported. Skipped when there is no baseline for the route.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"score":-5,"lcpMs":500,"cls":0.05,"weightKb":300}]` |
| `gribble:strict` | `[warn, {"score":-5,"lcpMs":500,"cls":0.05,"weightKb":300}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `score` | number | `-5` | Allowed Lighthouse score delta (negative means a drop). |
| `lcpMs` | number | `500` | Allowed LCP increase in milliseconds. |
| `cls` | number | `0.05` | Allowed CLS increase. |
| `weightKb` | number | `300` | Allowed page weight increase in kilobytes. |

**Fix:** Compare the route against the baseline run and find the change that added weight or blocking time.

## UI hard rules

<a id="ui-colors-from-tokens"></a>

### ui/colors-from-tokens

Computed colors must come from the design tokens.

Collects computed `color`, `background-color` and `border-color` values and compares them with the token set (`auto` reads tailwind.config and CSS custom properties). Values not in the set are reported with their selector.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"tokens":"auto"}]` |
| `gribble:strict` | `[warn, {"tokens":"auto"}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `tokens` | "auto" \\| string[] | `"auto"` | `auto` to read tokens from the project, or an explicit list of allowed colors. |

**Fix:** Replace the hardcoded color with the closest token.

<a id="ui-font-sizes-from-tokens"></a>

### ui/font-sizes-from-tokens

Font sizes must come from the type scale.

Compares computed font sizes with the sizes defined in the project's tokens.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Use a size from the type scale instead of an arbitrary value.

<a id="ui-spacing-from-tokens"></a>

### ui/spacing-from-tokens

Margins and paddings must come from the spacing scale.

Compares computed margin and padding values with the project's spacing tokens. Off by default because it is noisy.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Use a spacing token.

<a id="ui-min-font-size"></a>

### ui/min-font-size

Text must be at least `px` pixels.

Reports visible text with a computed font size below the threshold.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"px":12}]` |
| `gribble:strict` | `[warn, {"px":12}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `px` | number | `12` | Minimum font size in CSS pixels. |

**Fix:** Increase the font size; 12px is the floor for body copy on most platforms.

<a id="ui-overlap"></a>

### ui/overlap

Interactive elements must not overlap.

Compares bounding boxes of interactive elements; overlapping pairs that are both visible are reported.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Fix the layout so that the elements do not share screen area.

<a id="ui-horizontal-overflow"></a>

### ui/horizontal-overflow

Pages must not scroll horizontally in the listed viewports.

Reports routes whose document width exceeds the viewport width, together with the widest offending element.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"viewports":["mobile"]}]` |
| `gribble:strict` | `[error, {"viewports":["mobile"]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `viewports` | string[] | `["mobile"]` | Viewport names (from gribble.yaml) to check. |

**Fix:** Constrain the offending element with max-width: 100% or overflow-x: hidden on the container.

<a id="ui-text-clipped"></a>

### ui/text-clipped

Text must not be clipped or overflow its container.

Reports elements whose scroll size exceeds their client size with overflow hidden and no text-overflow handling.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Let the container grow, wrap the text, or use text-overflow: ellipsis deliberately.

<a id="ui-broken-images"></a>

### ui/broken-images

Images must load and have a non-zero natural size.

Reports <img> elements whose `naturalWidth` is 0 after load.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Fix the image path or the asset pipeline.

<a id="ui-placeholder-text"></a>

### ui/placeholder-text

No placeholder text may ship.

Reports visible text matching any of the `patterns` (case-insensitive substrings or regular expressions).

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[error, {"patterns":["lorem ipsum","TODO","FIXME","placeholder"]}]` |
| `gribble:strict` | `[error, {"patterns":["lorem ipsum","TODO","FIXME","placeholder"]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `patterns` | string[] | `["lorem ipsum","TODO","FIXME","placeholder"]` | Substrings or regular expressions that identify placeholder copy. |

**Fix:** Replace the placeholder with real copy.

<a id="ui-favicon"></a>

### ui/favicon

The site needs a favicon.

Reports a missing or non-loading `<link rel="icon">` (and `/favicon.ico` fallback).

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add a favicon link in the document head and ship the file.

<a id="ui-empty-state"></a>

### ui/empty-state

Lists and tables with zero rows need an empty state.

Reports list and table containers that render no rows and no explanatory text. Off by default.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Render a short empty-state message with a next step.

## Visual regression

<a id="visual-regression"></a>

### visual/regression

Screenshots must not differ from the baseline by more than `threshold`.

Compares a screenshot per route and viewport with `baseline/screenshots/` using pixel diffing. The ratio of changed pixels above `threshold` is reported with the diff image as evidence. Skipped when the baseline has no screenshot for the route.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `threshold` | number | `0.01` | Maximum ratio of changed pixels (0-1). |
| `viewports` | string[] | `["mobile","desktop"]` | Viewport names to compare. |

**Fix:** Review the diff image. If the change is intended, update the baseline. Off in `gribble:recommended`: opt in with `visual/regression: warn` plus `baseline.screenshots: commit` (or `lfs`), because screenshots are binary churn in git and differ across rendering platforms.

## Structure regression

<a id="structure-regression"></a>

### structure/regression

Landmarks, navigation and forms must not disappear compared with the baseline.

Diffs the aria snapshot of each route against `baseline/snapshots/`. A removed navigation item, form, landmark or heading is reported. Additions are not.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Restore the removed element, or update the baseline if the removal is intended.

## HTML

<a id="html-doctype"></a>

### html/doctype

Documents must start with <!DOCTYPE html>.

A missing or non-HTML5 doctype puts the browser in quirks mode.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add <!DOCTYPE html> as the first line of the document.

<a id="html-charset"></a>

### html/charset

Documents must declare a UTF-8 charset.

Reports a missing `<meta charset>` or a charset other than UTF-8, and a charset declared after the first 1024 bytes.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Put <meta charset="utf-8"> first in `<head>`.

<a id="html-viewport-meta"></a>

### html/viewport-meta

Documents need a viewport meta tag.

Without `<meta name="viewport">` mobile browsers render the desktop layout and zoom out.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add <meta name="viewport" content="width=device-width, initial-scale=1">.

Good:

```html
<meta name="viewport" content="width=device-width, initial-scale=1">
```

<a id="html-duplicate-ids"></a>

### html/duplicate-ids

Element ids must be unique.

Reports id values used more than once in a document; duplicates break labels, anchors and ARIA references.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Rename one of the elements, or generate ids per instance in the component.

Bad:

```html
<input id="email"> ... <input id="email">
```

Good:

```html
<input id="login-email"> ... <input id="newsletter-email">
```

<a id="html-deprecated-elements"></a>

### html/deprecated-elements

No deprecated HTML elements.

Reports `<center>`, `<font>`, `<marquee>`, `<frame>` and other obsolete elements.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Replace the element with semantic HTML and CSS.

<a id="html-valid"></a>

### html/valid

Markup must validate.

Runs an HTML validator on each document. Noisy on most real sites, so it is off by default; `ignore` takes validator message patterns.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[off, {"ignore":[]}]` |
| `gribble:strict` | `[off, {"ignore":[]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `ignore` | string[] | `[]` | Validator message patterns to ignore. |

**Fix:** Fix the reported markup errors.

## Security

<a id="security-https-only"></a>

### security/https-only

Non-local targets must be served over HTTPS.

Reports an `http://` target URL or a redirect to http. Localhost and loopback addresses are exempt.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Serve the site over HTTPS and redirect http to https.

<a id="security-mixed-content"></a>

### security/mixed-content

HTTPS pages must not load http resources.

Reports subresources requested over http from an https document.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `error` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Use https or protocol-relative URLs for every subresource.

<a id="security-headers"></a>

### security/headers

Responses must include the required security headers.

Checks the document response for each header listed in `require`.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"require":["content-security-policy","x-content-type-options","strict-transport-security"]}]` |
| `gribble:strict` | `[error, {"require":["content-security-policy","x-content-type-options","strict-transport-security"]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `require` | string[] | `["content-security-policy","x-content-type-options","strict-transport-security"]` | Lowercase header names that must be present. |

**Fix:** Set the headers in the server or hosting configuration.

<a id="security-exposed-secrets"></a>

### security/exposed-secrets

No API keys or tokens in shipped HTML and JavaScript.

Scans document and script responses for known secret formats (cloud provider keys, private keys, bearer tokens). A match is reported with the asset URL; the secret value itself is redacted in the finding.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `critical` |
| `gribble:strict` | `critical` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Rotate the secret immediately, then move it to the server side.

<a id="security-sourcemaps-exposed"></a>

### security/sourcemaps-exposed

Production builds must not expose source maps.

Reports `//# sourceMappingURL` comments whose map file is publicly reachable.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `error` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Disable source map emission for production, or restrict access to the .map files.

<a id="security-form-without-csrf"></a>

### security/form-without-csrf

State-changing forms need CSRF protection.

Reports POST forms without a hidden token field or a same-site cookie policy. Off by default because frameworks differ.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add a CSRF token to the form or rely on SameSite cookies plus origin checks.

## Internationalization

<a id="i18n-untranslated-keys"></a>

### i18n/untranslated-keys

Raw translation keys must not leak into the UI.

Reports visible text matching any of the `patterns`, which by default catches dotted keys such as `home.hero.title`.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"patterns":["^[a-z]+(\\.[a-z_]+)+$"]}]` |
| `gribble:strict` | `[warn, {"patterns":["^[a-z]+(\\.[a-z_]+)+$"]}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `patterns` | string[] | `["^[a-z]+(\\.[a-z_]+)+$"]` | Regular expressions that identify translation keys. |

**Fix:** Add the missing translation, or fix the key.

<a id="i18n-mixed-language"></a>

### i18n/mixed-language

A page must not mix languages.

Detects the language of text blocks and reports pages with a significant share in a second language. Off by default.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Translate the remaining strings.

<a id="i18n-lang-mismatch"></a>

### i18n/lang-mismatch

The declared html lang must match the content language.

Compares the `lang` attribute with the detected language of the visible text. Off by default.

**Status:** planned (accepted in rules.yaml, no checker yet) · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `off` |
| `gribble:strict` | `off` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Set `lang` to the language the page is actually written in.

## Flows

<a id="flows-replay"></a>

### flows/replay

Recorded flows must replay without failing a step.

Replays every `flows/<name>.replay.json` in gate mode. A failed step (element not found, expectation not met, timeout) is reported with the step index.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `critical` |
| `gribble:strict` | `critical` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Open the flow, reproduce the failing step manually, then fix the site or re-record the flow.

<a id="flows-max-duration"></a>

### flows/max-duration

A flow must complete within `seconds`.

Wall-clock time of a replayed flow.

**Status:** implemented · **Kind:** deterministic

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `[warn, {"seconds":60}]` |
| `gribble:strict` | `[warn, {"seconds":60}]` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Options**

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `seconds` | number | `60` | Maximum flow duration in seconds. |

**Fix:** Find the slow step in the flow result and speed up that page or request.

## AI review

<a id="review-guidelines"></a>

### review/guidelines

Violations of guidelines.md found by the AI reviewer.

The reviewer reads `.gribble/guidelines.md` and reports pages or components that contradict it. Severity caps every finding in this category.

**Status:** implemented · **Kind:** AI review

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Apply the guideline, or refine the guideline text if it is ambiguous.

<a id="review-ux"></a>

### review/ux

Confusing interactions and unclear states found by the AI reviewer.

Unlabelled controls, ambiguous actions, missing feedback after an action, and similar usability problems.

**Status:** implemented · **Kind:** AI review

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Follow the suggestion in the finding; verify with a manual walk-through.

<a id="review-copy"></a>

### review/copy

Typos, tone and inconsistent terminology found by the AI reviewer.

Spelling mistakes, inconsistent product names, and copy that clashes with the tone described in guidelines.md.

**Status:** implemented · **Kind:** AI review

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Edit the copy as suggested.

<a id="review-dead-ends"></a>

### review/dead-ends

Pages with no way forward or back found by the AI reviewer.

Routes without navigation, actions that lead nowhere, and error pages without a way home.

**Status:** implemented · **Kind:** AI review

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add navigation or a clear next action to the page.

<a id="review-flow-coverage"></a>

### review/flow-coverage

Important flows that are not described in flows/.

The reviewer explores the site and reports user journeys that have no matching `flows/*.md`.

**Status:** implemented · **Kind:** AI review

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Write the flow as flows/`<name>`.md so that it is walked on every audit.

<a id="review-error-handling"></a>

### review/error-handling

Missing error, empty and loading states found by the AI reviewer.

Forms without validation messages, lists without empty states, and actions without loading feedback.

**Status:** implemented · **Kind:** AI review

| Preset | Setting |
| --- | --- |
| `gribble:recommended` | `warn` |
| `gribble:strict` | `warn` |
| `gribble:seo` | `off` |
| `gribble:a11y` | `off` |

**Fix:** Add the missing state and its copy.
