Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/a11y-touch-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,3 @@ Per-element suppression follows the standard `RuleOverride` model.
## See also

- [WCAG 2.5.8 *Target Size (Minimum)*](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html).
- PRD §11.7 — accessibility rules.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/baseline-rhythm.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ severity = "error"

- [`spacing/grid-conformance`](./spacing-grid-conformance.md) — the
horizontal spacing-grid sibling.
- PRD §11.3 — vertical rhythm and baseline alignment.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/color-contrast-aa.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,3 @@ applied at the formatter layer.
size on the system scale.
- [`a11y/touch-target`](./a11y-touch-target.md) — the other shipped
accessibility rule.
- PRD §11.2 — built-in rule catalog.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/color-palette-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,3 @@ remapping is applied at the formatter layer.
same allow-list shape applied to the spacing scale.
- [`type/scale-conformance`](./type-scale-conformance.md) — the same
shape for `font-size`.
- PRD §11.3 — color rules and the token model.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/edge-near-alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,3 @@ tool today. Per-element suppression follows the standard

- [`sibling/height-consistency`](./sibling-height-consistency.md) —
the rule that catches sibling height drift.
- PRD §11.4 — the alignment rule family.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/opacity-scale-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ severity = "info"
rule for z-index tokens.
- [`shadow/scale-conformance`](./shadow-scale-conformance.md) — the
sibling rule for box-shadow tokens.
- PRD §11 — rule catalog.
5 changes: 2 additions & 3 deletions crates/plumb-mcp/rule-docs/radius-scale-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ The rule MUST skip a property when:
At most one violation is emitted per `(selector, property)` pair.

The `border-radius` shorthand is deliberately excluded — the Chromium
driver returns longhands per PRD §10.3, and checking both shapes would
emit two violations for the same logical issue.
driver returns longhands, and checking both shapes would emit two
violations for the same logical issue.

## Why it matters

Expand Down Expand Up @@ -109,4 +109,3 @@ applied at the formatter layer.
symmetric rule for margin / padding / gap.
- [`type/scale-conformance`](./type-scale-conformance.md) — the
symmetric rule for `font-size`.
- PRD §11.3 — the radius spec.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/shadow-scale-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,3 @@ severity = "info"

- [`opacity/scale-conformance`](./opacity-scale-conformance.md) —
the sibling rule for opacity tokens.
- PRD §11 — rule catalog.
3 changes: 1 addition & 2 deletions crates/plumb-mcp/rule-docs/sibling-height-consistency.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ into the rule and pinned by a unit test:
- Height-deviation threshold: 4 CSS px.

Future revisions MAY expose these under a `sibling.height` section
of the config — see PRD §11.6.
of the config.

## Suppression

Expand All @@ -129,4 +129,3 @@ Per-element suppression follows the standard `RuleOverride` model.

- [`edge/near-alignment`](./edge-near-alignment.md) — the rule that
catches sibling edges that almost-but-not-quite line up.
- PRD §11.6 — the sibling-relationship rule family.
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ severity = "warning"

- [`sibling/height-consistency`](./sibling-height-consistency.md) —
the sibling rule for row-height drift.
- PRD §11.6 — sibling-relationship rules.
5 changes: 2 additions & 3 deletions crates/plumb-mcp/rule-docs/spacing-grid-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ residue so subpixel rounding from `getComputedStyle` does not produce
spurious noise.

The `margin` and `padding` shorthands are deliberately excluded — the
Chromium driver returns longhands per PRD §10.3, and checking both
shapes would emit two violations for the same logical issue.
Chromium driver returns longhands, and checking both shapes would emit
two violations for the same logical issue.

The rule MUST skip a property when:

Expand Down Expand Up @@ -99,4 +99,3 @@ applied at the formatter layer.

- [`spacing/scale-conformance`](./spacing-scale-conformance.md) — the
discrete-token sibling check.
- PRD §11.2 — spacing rules and the token model.
5 changes: 2 additions & 3 deletions crates/plumb-mcp/rule-docs/spacing-scale-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ The rule MUST skip a property when:
At most one violation is emitted per `(selector, property)` pair.

The `margin` and `padding` shorthands are deliberately excluded — the
Chromium driver returns longhands per PRD §10.3, and checking both
shapes would emit two violations for the same logical issue.
Chromium driver returns longhands, and checking both shapes would emit
two violations for the same logical issue.

## Why it matters

Expand Down Expand Up @@ -108,4 +108,3 @@ applied at the formatter layer.

- [`spacing/grid-conformance`](./spacing-grid-conformance.md) — the
base-unit sibling check.
- PRD §11.2 — spacing rules and the token model.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/type-family-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,3 @@ severity = "info"
sibling rule for font-size tokens.
- [`type/weight-conformance`](./type-weight-conformance.md) — the
sibling rule for font-weight tokens.
- PRD §11.3 — type rules.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/type-scale-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ applied at the formatter layer.
sibling rule for spacing tokens.
- [`spacing/grid-conformance`](./spacing-grid-conformance.md) — the
base-unit check for spacing values.
- PRD §11.3 — type rules.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/type-weight-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ severity = "info"
sibling rule for font-family tokens.
- [`type/scale-conformance`](./type-scale-conformance.md) — the
sibling rule for font-size tokens.
- PRD §11.3 — type rules.
1 change: 0 additions & 1 deletion crates/plumb-mcp/rule-docs/z-scale-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ severity = "info"

- [`opacity/scale-conformance`](./opacity-scale-conformance.md) —
the sibling rule for opacity tokens.
- PRD §11 — rule catalog.
4 changes: 0 additions & 4 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

[Introduction](./introduction.md)

# Blog

- [Plumb v0.6 is here](./blog/launch-v0.6.md)

# Getting started

- [Install](./install.md)
Expand Down
61 changes: 0 additions & 61 deletions docs/src/blog/launch-v0.6.md

This file was deleted.

12 changes: 5 additions & 7 deletions docs/src/ci/reviewdog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Plumb does not ship a built-in reviewdog formatter. The integration
here converts `plumb lint --format json` output to reviewdog's
`rdjson` format with `jq`.

The committed runner config lives at `contrib/reviewdog-plumb.yaml`.
Copy that file from the Plumb repo into your own project before using
`-conf=contrib/reviewdog-plumb.yaml`.
The committed runner config lives at `contrib/reviewdog-plumb.yaml` in
the Plumb repo. Copy it into your own project's `contrib/` directory
and replace the `plumb-fake://hello` placeholder with the URL you want
to lint before passing `-conf=contrib/reviewdog-plumb.yaml` to
reviewdog.

## What the config does

Expand All @@ -27,10 +29,6 @@ layer, not source mapping.

## Local run

Before running this, copy `contrib/reviewdog-plumb.yaml` from this repo
into your project's `contrib/` directory. Then edit the copied file and
replace `plumb-fake://hello` with the real target URL.

```bash
reviewdog \
-conf=contrib/reviewdog-plumb.yaml \
Expand Down
2 changes: 1 addition & 1 deletion docs/src/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Press Ctrl-C to exit. The status line on stderr after every cycle
records the cycle's shape:

```text
watching… changed: <N> files; lint: <M> violations; took <T> ms
watching… changed: 3 files; lint: 2 violations; took 412 ms
```

Stdout carries the rendered lint output (`pretty` by default;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/cli/suggest-ignores.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ the existing envelope:

```json
{
"plumb_version": "0.0.1",
"plumb_version": "0.0.x",
"run_id": "sha256:…",
"stats": { … },
"suggested_ignores": [
Expand Down
99 changes: 99 additions & 0 deletions docs/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ configuration fields.
[color] # named color tokens + ΔE tolerance
[radius] # allowed border-radius values
[alignment] # grid spec + near-alignment tolerance
[shadow] # allowed box-shadow values
[z_index] # allowed z-index values
[opacity] # allowed opacity values
[rhythm] # vertical-rhythm baseline and tolerance
[a11y] # contrast + touch target
[rules."<id>"] # per-rule overrides
[[ignore]] # selector-scoped runtime suppressions
```

If `[viewports.*]` is omitted, Plumb defaults to a single `desktop`
Expand Down Expand Up @@ -159,6 +164,67 @@ tolerance_px = 3

Consumed by `edge/near-alignment`.

## `[shadow]`

```toml
[shadow]
scale = [
"none",
"0 1px 2px rgba(0, 0, 0, 0.05)",
"0 4px 8px rgba(0, 0, 0, 0.08)",
"0 12px 24px rgba(0, 0, 0, 0.12)",
]
```

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `scale` | `[string]` | `[]` | Allowed `box-shadow` values. Each entry MUST match the exact string returned by `getComputedStyle`. Empty disables the rule. |

Consumed by `shadow/scale-conformance`.

## `[z_index]`

```toml
[z_index]
scale = [0, 10, 100, 1000]
```

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `scale` | `[i32]` | `[]` | Allowed `z-index` values. Negative integers are accepted. Empty disables the rule. |

Consumed by `z/scale-conformance`.

## `[opacity]`

```toml
[opacity]
scale = [0.0, 0.5, 0.75, 1.0]
```

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `scale` | `[f32]` | `[]` | Allowed `opacity` values in the closed range `[0.0, 1.0]`. Empty disables the rule. |

Consumed by `opacity/scale-conformance`.

## `[rhythm]`

```toml
[rhythm]
base_line_px = 8
tolerance_px = 2
cap_height_fallback_px = 0
```

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `base_line_px` | `u32` | `0` | Vertical-rhythm grid step in CSS pixels. `0` disables the rule. |
| `tolerance_px` | `u32` | `2` | Pixels of drift allowed before a baseline is reported off-rhythm. |
| `cap_height_fallback_px` | `u32` | `0` | Cap-height value to use when the snapshot lacks font metrics. `0` keeps the rule's built-in heuristic. |

Consumed by `baseline/rhythm`.

## `[a11y]`

```toml
Expand All @@ -178,6 +244,39 @@ min_height_px = 24

Consumed by `a11y/touch-target` and `color/contrast-aa`.

## `[[ignore]]`

Selector-scoped runtime suppressions. Each `[[ignore]]` block silences
every violation whose CSS selector path matches `selector` exactly
(string equality only — Plumb does not run a CSS engine over the
snapshot). When `rule_id` is set, the suppression is constrained to
that single rule; when `rule_id` is omitted, every rule fired at the
selector is suppressed. Suppressed violations are partitioned out of
the report and counted under `ignored` rather than silently dropped.

```toml
[[ignore]]
selector = "html > body"
rule_id = "spacing/grid-conformance"
reason = "mdBook root padding is theme-controlled"

[[ignore]]
selector = "main > article"
reason = "vendor widget styles its own column"
```

| Field | Type | Default | Meaning |
|-------|------|---------|---------|
| `selector` | `string` | required | Exact `SnapshotNode.selector` path to suppress. |
| `rule_id` | `string?` | `null` | Optional rule id (e.g. `spacing/grid-conformance`). When omitted, all rules at `selector` are suppressed. |
| `reason` | `string` | required | Human-readable justification. Documents why the exemption is intentional. |

`plumb lint --suggest-ignores` emits one suggestion per active
violation in the same shape — pipe its output into `[[ignore]]` blocks
to converge on a clean baseline. See
[`--suggest-ignores`](./cli/suggest-ignores.md) for the full footer
format.

## `[rules."<category>/<id>"]`

Per-rule overrides. Every rule is enabled by default at its declared
Expand Down
Loading
Loading