Skip to content

The design language that makes your AI harness better at design.

JavaScript

Add detect `--list-rules` to print the detector catalog (#1064)

Matt Van Horna0dc1d7f010a
diff --git a/README.md b/README.md
index 8011ddf2b..36941e4b3 100644
--- a/README.md
+++ b/README.md
@@ -473,6 +473,7 @@ npx impeccable detect src/ # scan a directory
npx impeccable detect index.html # scan an HTML file
npx impeccable detect https://example.com # scan a URL (uses an installed Chrome, Chromium, or Edge)
npx impeccable detect --json . # CI-friendly JSON output
+npx impeccable detect --list-rules # catalog of detector rule ids, names, and descriptions
npx impeccable detect --no-config src/ # raw scan, ignoring project config/context
npx impeccable ignores list # show detector ignores
npx impeccable ignores add-file "src/legacy/**"
@@ -481,7 +482,7 @@ npx impeccable ignores add-value overused-font Inter --reason "Brand font"
The detector catches 61 deterministic issues across AI slop (side-tab borders, purple gradients, bounce easing, dark glows) and general design quality (line length, cramped padding, small touch targets, skipped headings, and more).
-Human-readable findings are diagnostics written to stderr, so redirect them with `2> findings.txt`. Use `--json` for machine-readable results on stdout. Exit `0` means the scan completed without primary findings, exit `2` means it completed with primary findings, and exit `1` means at least one requested target could not be scanned; operational failure takes precedence for a partial multi-target scan. URL scans inspect the rendered DOM, computed layout, and accessible linked stylesheets; browser security still prevents reading cross-origin CSS without CORS. A clean detector run is evidence, not proof of visual or accessibility quality: it does not replace inspecting the rendered experience across relevant viewports.
+Human-readable findings are diagnostics written to stderr, so redirect them with `2> findings.txt`. Use `--json` for machine-readable results on stdout. `--list-rules` prints the detector catalog to stdout and does not scan. Exit `0` means the scan completed without primary findings, exit `2` means it completed with primary findings, and exit `1` means at least one requested target could not be scanned; operational failure takes precedence for a partial multi-target scan. URL scans inspect the rendered DOM, computed layout, and accessible linked stylesheets; browser security still prevents reading cross-origin CSS without CORS. A clean detector run is evidence, not proof of visual or accessibility quality: it does not replace inspecting the rendered experience across relevant viewports.
By default, `detect` respects the same `.impeccable/config.json` and `.impeccable/config.local.json` detector config as the design hook: `detector.ignoreRules`, `detector.ignoreFiles`, `detector.ignoreValues`, and `detector.designSystem.enabled`. Hook lifecycle settings such as `hook.enabled` only affect automatic hook execution.
diff --git a/README.npm.md b/README.npm.md
index 4595bc2fa..90894117a 100644
--- a/README.npm.md
+++ b/README.npm.md
@@ -36,6 +36,9 @@ npx impeccable detect https://example.com
# JSON output for CI/tooling
npx impeccable detect --json src/
+
+# Catalog of detector rules (no scan)
+npx impeccable detect --list-rules
```
`npx impeccable skills <command>` is the legacy namespace and still works.
@@ -72,9 +75,10 @@ Operational failure takes precedence when a multi-target scan is partial. In JSO
```
impeccable detect [options] [file-or-dir-or-url...]
- --json Output findings as JSON
- --scope Only report rules in a design domain (type, layout)
- --help Show help
+ --json Output findings as JSON
+ --list-rules Print the detector rule catalog and exit
+ --scope Only report rules in a design domain (type, layout)
+ --help Show help
```
## Requirements
diff --git a/crates/detect/src/cli.rs b/crates/detect/src/cli.rs
index 543ebd74b..7fe220a9b 100644
--- a/crates/detect/src/cli.rs
+++ b/crates/detect/src/cli.rs
@@ -21,6 +21,10 @@ use crate::file_system::{
walk_dir_reporting,
};
use crate::jsp;
+use crate::list_rules::{
+ collect_catalog_rules, format_list_rules_ids, format_list_rules_json, format_list_rules_text,
+ LIST_RULES_SCAN_ERROR,
+};
use crate::util::{exists, re, D};
pub const USAGE: &str = "Usage: impeccable detect [options] [file-or-dir-or-url...]
@@ -30,6 +34,8 @@ Scan files or URLs for UI anti-patterns and design quality issues.
Options:
--json Output results as JSON
--quiet In text mode, only print the final findings count
+ --list-rules Print the detector rule catalog and exit. --json
+ for JSON, --quiet for ids only. Takes no targets
--scope <name> Only report rules in the given design domain
(type, layout). Comma-separated.
--viewport <WxH> Browser viewport for URL scans (default 1280x800),
@@ -62,6 +68,7 @@ Advisory findings:
Output streams:
Human-readable findings go to stderr so stdout stays available for structured
output. Use --json for JSON on stdout, or redirect text with 2> findings.txt.
+ --list-rules writes the catalog to stdout (no scan).
Exit status:
0 Scan completed with no primary findings (advisories may still be listed)
@@ -96,6 +103,7 @@ Examples:
impeccable detect https://example.com
impeccable detect --cdp 9222 --target \"My App\" --json
impeccable detect --json .
+ impeccable detect --list-rules
impeccable detect --no-config src/
";
@@ -634,6 +642,21 @@ fn detect_cli(args_in: &[String], io: &mut Io, engines: &Engines) -> Result<i32,
io.out(USAGE);
return Ok(0);
}
+ if has(&args, "--list-rules") {
+ if cdp.is_some() || !targets.is_empty() {
+ io.err(LIST_RULES_SCAN_ERROR);
+ return Err(Exit(1));
+ }
+ let rules = collect_catalog_rules(&scopes, no_advisory);
+ if json_mode {
+ io.out(&format!("{}\n", format_list_rules_json(&rules)));
+ } else if quiet_mode {
+ io.out(&format_list_rules_ids(&rules));
+ } else {
+ io.out(&format_list_rules_text(&rules));
+ }
+ return Ok(0);
+ }
if cdp.is_some() && !targets.is_empty() {
io.err("Error: --cdp scans the page of a running app and takes no file or URL targets\n");
return Err(Exit(1));
diff --git a/crates/detect/src/lib.rs b/crates/detect/src/lib.rs
index 174ccca32..ae52494bf 100644
--- a/crates/detect/src/lib.rs
+++ b/crates/detect/src/lib.rs
@@ -19,6 +19,7 @@ pub mod engines;
pub mod file_system;
pub mod ignores;
pub mod jsp;
+pub mod list_rules;
pub mod profiler;
pub mod regex_matchers;
pub mod skills;
diff --git a/crates/detect/src/list_rules.rs b/crates/detect/src/list_rules.rs
new file mode 100644
index 000000000..a826b2ba5
--- /dev/null
+++ b/crates/detect/src/list_rules.rs
@@ -0,0 +1,184 @@
+//! `impeccable detect --list-rules`: every rule in the registry (`all_antipatterns()`, built-ins plus any installed rule pack), no scan.
+
+use impeccable_core::registry::{all_antipatterns, Antipattern};
+use serde_json::{json, Value};
+
+/// Rules in registry order, optionally narrowed by `--scope` and
+/// `--no-advisory` the same way a scan would drop them from the report.
+pub fn collect_catalog_rules<'a>(
+ scopes: &'a [String],
+ no_advisory: bool,
+) -> Vec<&'static Antipattern> {
+ all_antipatterns()
+ .filter(|rule| {
+ if no_advisory && rule.severity == Some("advisory") {
+ return false;
+ }
+ if scopes.is_empty() {
+ return true;
+ }
+ rule.scopes
+ .unwrap_or(&[])
+ .iter()
+ .any(|scope| scopes.iter().any(|wanted| wanted == scope))
+ })
+ .collect()
+}
+
+pub fn format_list_rules_ids(rules: &[&Antipattern]) -> String {
+ let mut out = String::new();
+ for rule in rules {
+ out.push_str(rule.id);
+ out.push('\n');
+ }
+ out
+}
+
+pub fn format_list_rules_text(rules: &[&Antipattern]) -> String {
+ let mut groups: Vec<(&str, Vec<&Antipattern>)> = Vec::new();
+ for rule in rules {
+ if let Some((_, rows)) = groups
+ .iter_mut()
+ .find(|(category, _)| *category == rule.category)
+ {
+ rows.push(*rule);
+ } else {
+ groups.push((rule.category, vec![*rule]));
+ }
+ }
+ let mut out = String::new();
+ for (i, (category, rows)) in groups.iter().enumerate() {
+ if i > 0 {
+ out.push('\n');
+ }
+ out.push_str(category);
+ out.push('\n');
+ for (j, rule) in rows.iter().enumerate() {
+ if j > 0 {
+ out.push('\n');
+ }
+ let advisory = if rule.severity == Some("advisory") {
+ " (advisory)"
+ } else {
+ ""
+ };
+ out.push_str(" ");
+ out.push_str(rule.id);
+ out.push_str(advisory);
+ out.push('\n');
+ out.push_str(" ");
+ out.push_str(rule.name);
+ out.push('\n');
+ out.push_str(" ");
+ out.push_str(rule.description);
+ out.push('\n');
+ }
+ }
+ let n = rules.len();
+ out.push_str(&format!("\n{} rule{}.\n", n, if n == 1 { "" } else { "s" }));
+ out
+}
+
+pub fn format_list_rules_json(rules: &[&Antipattern]) -> String {
+ let rows: Vec<Value> = rules
+ .iter()
+ .map(|rule| {
+ let mut row = json!({
+ "id": rule.id,
+ "name": rule.name,
+ "category": rule.category,
+ "severity": rule.severity.unwrap_or("warning"),
+ "scopes": rule.scopes.unwrap_or(&[]),
+ "description": rule.description,
+ });
+ if rule.severity == Some("advisory") {
+ row.as_object_mut()
+ .expect("object")
+ .insert("advisory".into(), Value::Bool(true));
+ }
+ row
+ })
+ .collect();
+ serde_json::to_string_pretty(&Value::Array(rows)).unwrap_or_else(|_| "[]".into())
+}
+
+pub const LIST_RULES_SCAN_ERROR: &str =
+ "Error: --list-rules prints the rule catalog and takes no file, URL, or --cdp scan\n";
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn catalog_covers_every_registered_rule_in_registry_order() {
+ let rules = collect_catalog_rules(&[], false);
+ let all: Vec<_> = all_antipatterns().collect();
+ assert_eq!(rules.len(), all.len());
+ assert_eq!(rules[0].id, "side-tab");
+ assert!(rules.iter().any(|r| r.id == "low-contrast"));
+ assert!(rules.iter().any(|r| r.severity == Some("advisory")));
+ }
+
+ #[test]
+ fn scope_keeps_only_rules_that_declare_it() {
+ let rules = collect_catalog_rules(&["type".to_string()], false);
+ assert!(rules.iter().any(|r| r.id == "overused-font"));
+ assert!(rules
+ .iter()
+ .all(|r| r.scopes.unwrap_or(&[]).iter().any(|s| *s == "type")));
+ assert!(!rules.iter().any(|r| r.id == "side-tab"));
+ assert!(!rules.iter().any(|r| r.id == "nested-cards"));
+ }
+
+ #[test]
+ fn no_advisory_drops_advisory_rows() {
+ let rules = collect_catalog_rules(&[], true);
+ assert!(!rules.is_empty());
+ assert!(rules.iter().all(|r| r.severity != Some("advisory")));
+ assert!(!rules.iter().any(|r| r.id == "bounce-easing"));
+ assert!(rules.iter().any(|r| r.id == "side-tab"));
+ }
+
+ #[test]
+ fn quiet_ids_are_one_per_line() {
+ let rules = collect_catalog_rules(&[], false);
+ let text = format_list_rules_ids(&rules);
+ let lines: Vec<&str> = text.lines().collect();
+ assert_eq!(lines.len(), rules.len());
+ assert_eq!(lines[0], "side-tab");
+ assert!(text.ends_with('\n'));
+ }
+
+ #[test]
+ fn text_catalog_groups_by_category_and_marks_advisories() {
+ let rules = collect_catalog_rules(&[], false);
+ let text = format_list_rules_text(&rules);
+ assert!(text.starts_with("slop\n"));
+ assert!(text.contains(" side-tab\n Side-tab accent border\n"));
+ assert!(text.contains(" bounce-easing (advisory)\n"));
+ assert!(text.contains(" gpt-thin-border-wide-shadow (advisory)\n"));
+ assert!(text.contains("\nquality\n"));
+ assert!(text.contains(" low-contrast\n"));
+ assert_eq!(text.matches("\nslop\n").count(), 0);
+ assert_eq!(text.matches("slop\n").count(), 1);
+ assert!(text.ends_with(&format!("\n{} rules.\n", rules.len())));
+ }
+
+ #[test]
+ fn json_catalog_is_an_array_of_rule_objects() {
+ let rules = collect_catalog_rules(&[], false);
+ let parsed: Value = serde_json::from_str(&format_list_rules_json(&rules)).unwrap();
+ let arr = parsed.as_array().expect("array");
+ assert_eq!(arr.len(), rules.len());
+ assert_eq!(arr[0]["id"], "side-tab");
+ assert_eq!(arr[0]["category"], "slop");
+ assert_eq!(arr[0]["severity"], "warning");
+ assert!(arr[0].get("advisory").is_none());
+ let bounce = arr
+ .iter()
+ .find(|row| row["id"] == "bounce-easing")
+ .expect("bounce-easing");
+ assert_eq!(bounce["advisory"], true);
+ assert_eq!(bounce["severity"], "advisory");
+ }
+}
diff --git a/crates/detect/tests/list_rules.rs b/crates/detect/tests/list_rules.rs
new file mode 100644
index 000000000..155dcd08b
--- /dev/null
+++ b/crates/detect/tests/list_rules.rs
@@ -0,0 +1,111 @@
+//! `impeccable detect --list-rules` prints the catalog and never scans.
+
+use std::collections::HashMap;
+
+use impeccable_common::Io;
+use impeccable_core::registry::all_antipatterns;
+use impeccable_detect::cli::run_detect;
+use impeccable_detect::{Engines, MissingHtmlEngine};
+use serde_json::Value;
+
+fn run(args: &[&str]) -> (i32, String, String) {
+ let args: Vec<String> = args.iter().map(|s| s.to_string()).collect();
+ let (mut io, cap) = Io::captured("", std::env::temp_dir(), HashMap::new());
+ let engines = Engines {
+ html: &MissingHtmlEngine,
+ url: None,
+ };
+ let code = run_detect(&args, &mut io, &engines);
+ let out = String::from_utf8(cap.stdout.borrow().clone()).unwrap();
+ let err = String::from_utf8(cap.stderr.borrow().clone()).unwrap();
+ (code, out, err)
+}
+
+#[test]
+fn list_rules_prints_the_catalog_on_stdout() {
+ let n = all_antipatterns().count();
+ let (code, out, err) = run(&["--list-rules"]);
+ assert_eq!(code, 0, "{err}");
+ assert!(err.is_empty(), "{err}");
+ assert!(out.starts_with("slop\n"));
+ assert!(out.contains(" side-tab\n"));
+ assert!(out.contains(" bounce-easing (advisory)\n"));
+ assert!(out.contains("\nquality\n"));
+ assert!(out.contains(" low-contrast\n"));
+ assert!(out.ends_with(&format!("\n{n} rules.\n")));
+}
+
+#[test]
+fn list_rules_json_is_an_array() {
+ let n = all_antipatterns().count();
+ let (code, out, err) = run(&["--list-rules", "--json"]);
+ assert_eq!(code, 0, "{err}");
+ assert!(err.is_empty(), "{err}");
+ let parsed: Value = serde_json::from_str(out.trim_end()).unwrap();
+ let arr = parsed.as_array().expect("array");
+ assert_eq!(arr.len(), n);
+ assert_eq!(arr[0]["id"], "side-tab");
+}
+
+#[test]
+fn list_rules_quiet_prints_ids() {
+ let n = all_antipatterns().count();
+ let (code, out, err) = run(&["--list-rules", "--quiet"]);
+ assert_eq!(code, 0, "{err}");
+ assert!(err.is_empty(), "{err}");
+ let lines: Vec<&str> = out.lines().collect();
+ assert_eq!(lines.len(), n);
+ assert_eq!(lines[0], "side-tab");
+ assert_eq!(
+ *lines.last().unwrap(),
+ all_antipatterns().last().unwrap().id
+ );
+}
+
+#[test]
+fn list_rules_help_wins() {
+ let (code, out, err) = run(&["--list-rules", "--help"]);
+ assert_eq!(code, 0, "{err}");
+ assert!(err.is_empty(), "{err}");
+ assert!(out.starts_with("Usage: impeccable detect"));
+ assert!(out.contains("--list-rules"));
+ assert!(!out.contains(" side-tab\n"));
+}
+
+#[test]
+fn list_rules_rejects_a_file_target() {
+ let (code, out, err) = run(&["--list-rules", "src/"]);
+ assert_eq!(code, 1);
+ assert!(out.is_empty(), "{out}");
+ assert_eq!(
+ err,
+ "Error: --list-rules prints the rule catalog and takes no file, URL, or --cdp scan\n"
+ );
+}
+
+#[test]
+fn list_rules_rejects_cdp() {
+ let (code, _, err) = run(&["--list-rules", "--cdp", "9222"]);
+ assert_eq!(code, 1);
+ assert!(err.contains("--list-rules prints the rule catalog"));
+}
+
+#[test]
+fn list_rules_scope_type_drops_unscoped_rules() {
+ let (code, out, err) = run(&["--list-rules", "--quiet", "--scope", "type"]);
+ assert_eq!(code, 0, "{err}");
+ let ids: Vec<&str> = out.lines().collect();
+ assert!(ids.contains(&"overused-font"));
+ assert!(!ids.contains(&"side-tab"));
+ assert!(!ids.contains(&"nested-cards"));
+}
+
+#[test]
+fn list_rules_no_advisory_hides_advisory_ids() {
+ let (code, out, err) = run(&["--list-rules", "--quiet", "--no-advisory"]);
+ assert_eq!(code, 0, "{err}");
+ let ids: Vec<&str> = out.lines().collect();
+ assert!(ids.contains(&"side-tab"));
+ assert!(!ids.contains(&"bounce-easing"));
+ assert!(!ids.contains(&"em-dash-overuse"));
+}
diff --git a/docs/CLI-CONTRACT.md b/docs/CLI-CONTRACT.md
index c4c3c873f..fde4fe7eb 100644
--- a/docs/CLI-CONTRACT.md
+++ b/docs/CLI-CONTRACT.md
@@ -93,7 +93,8 @@ Notation: `stdout>` / `stderr>` are literal writes; `exit N`; template strings u
| Flag | Effect |
|---|---|
| `--json` | JSON output to **stdout** |
-| `--quiet` | text mode prints only summary line(s) to stderr |
+| `--quiet` | text mode prints only summary line(s) to stderr; under `--list-rules` it instead prints one rule id per line to **stdout** |
+| `--list-rules` | print every registered rule (`all_antipatterns()`: the built-ins plus any installed rule pack) and **exit 0** without scanning. Catalog goes to **stdout**. `--json` pretty-prints an array of `{id,name,category,severity,scopes,description}` (plus `advisory: true` on advisory rules). `--quiet` prints one rule id per line. `--scope` and `--no-advisory` filter the catalog the same way they filter a scan; config ignores (`ignoreRules`) are not applied, so the catalog lists rules a project has switched off. A positional target or `--cdp` with it → `stderr> Error: --list-rules prints the rule catalog and takes no file, URL, or --cdp scan\n`, `exit 1`. Evaluated after `--help` (so `--list-rules --help` prints usage) |
| `--help` | print usage (stdout) and `exit 0` — evaluated *after* scope/viewport parsing (so a bad `--scope` still errors first) |
| `--no-advisory` | drop findings with `advisory === true` before output/exit-code |
| `--no-consent-hiding` | URL scans only (Rust engine): leave known consent managers' banners on the page instead of hiding them before the scan (see **Consent banners** under URL scans). No effect on file scans |
@@ -118,6 +119,8 @@ Scan files or URLs for UI anti-patterns and design quality issues.
Options:
--json Output results as JSON
--quiet In text mode, only print the final findings count
+ --list-rules Print the detector rule catalog and exit. --json
+ for JSON, --quiet for ids only. Takes no targets
--scope <name> Only report rules in the given design domain
(type, layout). Comma-separated.
--viewport <WxH> Browser viewport for URL scans (default 1280x800),
@@ -150,6 +153,7 @@ Advisory findings:
Output streams:
Human-readable findings go to stderr so stdout stays available for structured
output. Use --json for JSON on stdout, or redirect text with 2> findings.txt.
+ --list-rules writes the catalog to stdout (no scan).
Exit status:
0 Scan completed with no primary findings (advisories may still be listed)
@@ -184,6 +188,7 @@ Examples:
impeccable detect https://example.com
impeccable detect --cdp 9222 --target "My App" --json
impeccable detect --json .
+ impeccable detect --list-rules
impeccable detect --no-config src/
```
diff --git a/tests/oracle/DELTAS.md b/tests/oracle/DELTAS.md
index 369dc0837..636ac40a5 100644
--- a/tests/oracle/DELTAS.md
+++ b/tests/oracle/DELTAS.md
@@ -7085,6 +7085,10 @@ A variants wrapper with no `data-impeccable-variant="original"` element (the han
`impeccable detect --cdp <port|url> [--target <text>]` scans a page of a running Chromium-based app (Electron, NW.js, CEF, WebView2) through its local DevTools endpoint, with the URL scan's passes and output, and leaves the page as found (`docs/CLI-CONTRACT.md`, "Attached pages"). `detect-help` gains the two flags, a `Running apps` line under Detection modes and one example. New cases pin the flag surface, each an `Error:` line on stderr and exit 1 before any engine runs: `detect-cdp-missing-value`, `detect-cdp-remote-host` (a host that is not loopback is refused), `detect-cdp-bad-port`, `detect-cdp-bad-path`, `detect-cdp-with-targets`, `detect-cdp-with-viewport`, `detect-target-without-cdp` and `detect-target-missing-value`. The scan itself needs a running browser, which the oracle does not host; `crates/browser/tests/cdp_attach.rs` covers it. Recorded from the binary and reviewed by hand; no golden other than `detect-help` moved.
+## Recorded 2026-10-17: detect --list-rules prints the detector catalog
+
+`impeccable detect --list-rules` prints every built-in detector rule and exits 0 without scanning (`docs/CLI-CONTRACT.md`). Text mode groups rules by category on stdout; `--json` pretty-prints the array; `--quiet` prints one id per line. `--scope` and `--no-advisory` filter the catalog the same way they filter a scan. A file/URL target or `--cdp` with it is `Error: --list-rules prints the rule catalog and takes no file, URL, or --cdp scan` and exit 1. `--help` still wins. `detect-help` gains the flag, an Output streams line, and one example. New cases: `detect-list-rules`, `detect-list-rules-json`, `detect-list-rules-quiet`, `detect-list-rules-with-target`, `detect-list-rules-with-cdp`. Recorded from the binary and reviewed by hand; no golden other than `detect-help` moved.
+
## Recorded 2026-10-16: target selection lists only workspaces with a UI signal (#1014)
`TARGET_SELECTION_REQUIRED` offered every workspace a package glob or the `apps/`/`packages/` fallback found, tsconfig and eslint-config packages included. Those candidates are now kept only with a UI signal: a UI framework dependency in `dependencies`, `devDependencies` or `peerDependencies`, their own PRODUCT/DESIGN file, a fixed entry path (`index.html`, iOS and Android project markers), a Flutter `pubspec.yaml` (a pure Dart package does not count), or a UI or style file in a one-level listing of the root or a usual source dir. Nothing walks a tree, per the Tier-1 boot budget. `projectRoots` matches are never filtered, a `!` projectRoots entry still hides a workspace, and when nothing would remain the full list is kept. A non-zero `skippedNonUiWorkspaces` count joins the JSON and one sentence joins the directive; with nothing skipped both are absent, so no existing golden moved (`ctx-monorepo` names its apps through `projectRoots`). `doctor` and bare-name `--target` resolution still see every workspace. New cases on the `ctx-monorepo-tooling` fixture, recorded from the binary and reviewed by hand: `context-monorepo-tooling-root` (web, the Flutter `apps/mobile` and ui listed; api, the pure Dart `packages/models` and three tooling packages skipped, 5), `context-monorepo-tooling-explicit-roots` (`apps/api` and `packages/scripts` kept because projectRoots names them, 3 skipped), `context-monorepo-tooling-negated-root` (`!packages/ui` leaves mobile and web, 5 skipped), `context-monorepo-tooling-no-ui` (UI workspaces removed, all five left listed, no count) and `context-monorepo-tooling-bare-name` (`--target tsconfig` still resolves the hidden package).
diff --git a/tests/oracle/cases/detect.mjs b/tests/oracle/cases/detect.mjs
index 7038f18b1..1f25590c5 100644
--- a/tests/oracle/cases/detect.mjs
+++ b/tests/oracle/cases/detect.mjs
@@ -127,6 +127,11 @@ function Thumb({ url }: { url?: string }) {
// Flag surface and errors
{ id: 'detect-help', verb: 'detect', args: ['--help'] },
+ { id: 'detect-list-rules', verb: 'detect', args: ['--list-rules'] },
+ { id: 'detect-list-rules-json', verb: 'detect', args: ['--list-rules', '--json'] },
+ { id: 'detect-list-rules-quiet', verb: 'detect', args: ['--list-rules', '--quiet'] },
+ { id: 'detect-list-rules-with-target', verb: 'detect', args: ['--list-rules', 'src/'] },
+ { id: 'detect-list-rules-with-cdp', verb: 'detect', args: ['--list-rules', '--cdp', '9222'] },
{ id: 'detect-no-args', verb: 'detect', args: [] },
{ id: 'detect-missing-file', verb: 'detect', args: ['--no-config', 'does-not-exist.html'] },
{ id: 'detect-missing-file-json', verb: 'detect', args: ['--no-config', '--json', 'does-not-exist.html'] },
diff --git a/tests/oracle/golden/detect-help.json b/tests/oracle/golden/detect-help.json
index b9489ae7b..00623a547 100644
--- a/tests/oracle/golden/detect-help.json
+++ b/tests/oracle/golden/detect-help.json
@@ -1,5 +1,5 @@
{
- "stdout": "Usage: impeccable detect [options] [file-or-dir-or-url...]\n\nScan files or URLs for UI anti-patterns and design quality issues.\n\nOptions:\n --json Output results as JSON\n --quiet In text mode, only print the final findings count\n --scope <name> Only report rules in the given design domain\n (type, layout). Comma-separated.\n --viewport <WxH> Browser viewport for URL scans (default 1280x800),\n e.g. --viewport 390x844 for a mobile-width pass\n --no-config Do not apply project config, detector ignores, inline\n ignore comments, or DESIGN.md\n --no-inline-ignores Do not honor in-file impeccable-disable* ignore comments\n --no-design-system Do not load local DESIGN.md / .impeccable/design.json context\n --no-advisory Suppress advisory findings entirely (e.g. em-dash overuse)\n --no-consent-hiding URL scans: keep known consent managers' banners\n (OneTrust, Cookiebot, ...) on the page instead of hiding\n them before the scan\n --no-overlay-hiding URL scans: keep product tours (driver.js) and\n preloaders still covering the page instead of hiding\n them before the scan\n --cdp <port|url> Scan a page of a running Chromium-based desktop app\n (Electron, NW.js, CEF, WebView2) through its local\n DevTools port instead of loading a URL. The page is\n scanned as shown and left as found: never navigated,\n resized or closed. Takes no file or URL targets\n --target <text> With --cdp: pick the page whose URL or title contains\n this text when the app has more than one\n --help Show this help message\n\nAdvisory findings:\n Some rules are advisory: detected and listed in a separate section, but never\n counted as failures and never changing the exit code. They stay out of the\n failure count so they never block automation. --no-advisory hides them.\n\nOutput streams:\n Human-readable findings go to stderr so stdout stays available for structured\n output. Use --json for JSON on stdout, or redirect text with 2> findings.txt.\n\nExit status:\n 0 Scan completed with no primary findings (advisories may still be listed)\n 1 At least one requested target could not be scanned\n 2 Scan completed with primary findings\n Operational failure takes precedence when a multi-target scan is partial.\n\nProject config:\n Respects .impeccable/config.json and .impeccable/config.local.json detector\n settings: detector.ignoreRules, detector.ignoreFiles, detector.ignoreValues,\n and detector.designSystem.enabled.\n\nInline ignores:\n In-file comments waive a finding where it lives and travel with the file:\n <!-- impeccable-disable overused-font -- exported brand doc -->\n .brand { font-family: Inter } /* impeccable-disable-line overused-font */\n // impeccable-disable-next-line bounce-easing: intentional bounce\n impeccable-disable applies to the whole file; -line / -next-line are scoped.\n List one or more rule ids (comma-separated), or omit them / use * for all.\n\nDetection modes:\n HTML files Static HTML/CSS analysis (default, catches linked CSS)\n Non-HTML files Regex pattern matching (CSS, JSX, TSX, etc.)\n URLs Puppeteer full browser rendering (auto-detected;\n http(s):// and file:// URLs; accessible linked CSS included)\n Running apps --cdp: a page of a Chromium-based app, attached through its\n DevTools port and scanned like a URL\n\nExamples:\n impeccable detect src/\n impeccable detect index.html\n impeccable detect https://example.com\n impeccable detect --cdp 9222 --target \"My App\" --json\n impeccable detect --json .\n impeccable detect --no-config src/\n",
+ "stdout": "Usage: impeccable detect [options] [file-or-dir-or-url...]\n\nScan files or URLs for UI anti-patterns and design quality issues.\n\nOptions:\n --json Output results as JSON\n --quiet In text mode, only print the final findings count\n --list-rules Print the detector rule catalog and exit. --json\n for JSON, --quiet for ids only. Takes no targets\n --scope <name> Only report rules in the given design domain\n (type, layout). Comma-separated.\n --viewport <WxH> Browser viewport for URL scans (default 1280x800),\n e.g. --viewport 390x844 for a mobile-width pass\n --no-config Do not apply project config, detector ignores, inline\n ignore comments, or DESIGN.md\n --no-inline-ignores Do not honor in-file impeccable-disable* ignore comments\n --no-design-system Do not load local DESIGN.md / .impeccable/design.json context\n --no-advisory Suppress advisory findings entirely (e.g. em-dash overuse)\n --no-consent-hiding URL scans: keep known consent managers' banners\n (OneTrust, Cookiebot, ...) on the page instead of hiding\n them before the scan\n --no-overlay-hiding URL scans: keep product tours (driver.js) and\n preloaders still covering the page instead of hiding\n them before the scan\n --cdp <port|url> Scan a page of a running Chromium-based desktop app\n (Electron, NW.js, CEF, WebView2) through its local\n DevTools port instead of loading a URL. The page is\n scanned as shown and left as found: never navigated,\n resized or closed. Takes no file or URL targets\n --target <text> With --cdp: pick the page whose URL or title contains\n this text when the app has more than one\n --help Show this help message\n\nAdvisory findings:\n Some rules are advisory: detected and listed in a separate section, but never\n counted as failures and never changing the exit code. They stay out of the\n failure count so they never block automation. --no-advisory hides them.\n\nOutput streams:\n Human-readable findings go to stderr so stdout stays available for structured\n output. Use --json for JSON on stdout, or redirect text with 2> findings.txt.\n --list-rules writes the catalog to stdout (no scan).\n\nExit status:\n 0 Scan completed with no primary findings (advisories may still be listed)\n 1 At least one requested target could not be scanned\n 2 Scan completed with primary findings\n Operational failure takes precedence when a multi-target scan is partial.\n\nProject config:\n Respects .impeccable/config.json and .impeccable/config.local.json detector\n settings: detector.ignoreRules, detector.ignoreFiles, detector.ignoreValues,\n and detector.designSystem.enabled.\n\nInline ignores:\n In-file comments waive a finding where it lives and travel with the file:\n <!-- impeccable-disable overused-font -- exported brand doc -->\n .brand { font-family: Inter } /* impeccable-disable-line overused-font */\n // impeccable-disable-next-line bounce-easing: intentional bounce\n impeccable-disable applies to the whole file; -line / -next-line are scoped.\n List one or more rule ids (comma-separated), or omit them / use * for all.\n\nDetection modes:\n HTML files Static HTML/CSS analysis (default, catches linked CSS)\n Non-HTML files Regex pattern matching (CSS, JSX, TSX, etc.)\n URLs Puppeteer full browser rendering (auto-detected;\n http(s):// and file:// URLs; accessible linked CSS included)\n Running apps --cdp: a page of a Chromium-based app, attached through its\n DevTools port and scanned like a URL\n\nExamples:\n impeccable detect src/\n impeccable detect index.html\n impeccable detect https://example.com\n impeccable detect --cdp 9222 --target \"My App\" --json\n impeccable detect --json .\n impeccable detect --list-rules\n impeccable detect --no-config src/\n",
"stderr": "",
"exit": 0,
"signal": null,
diff --git a/tests/oracle/golden/detect-list-rules-json.json b/tests/oracle/golden/detect-list-rules-json.json
new file mode 100644
index 000000000..9e09e1889
--- /dev/null
+++ b/tests/oracle/golden/detect-list-rules-json.json
@@ -0,0 +1,7 @@
+{
+ "stdout": "[\n {\n \"id\": \"side-tab\",\n \"name\": \"Side-tab accent border\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Thick colored border on one side of a card — the most recognizable tell of AI-generated UIs. Use a subtler accent or remove it entirely.\"\n },\n {\n \"id\": \"border-accent-on-rounded\",\n \"name\": \"Border accent on rounded element\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Thick accent border on a rounded card — the border clashes with the rounded corners. Remove the border or the border-radius.\"\n },\n {\n \"id\": \"overused-font\",\n \"name\": \"Overused font\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Inter, Roboto, Fraunces, Geist, Plus Jakarta Sans, and Space Grotesk are used on so many sites they no longer feel distinctive. Each new wave of AI-generated UIs converges on the same handful of faces. Choose a face that gives your interface personality.\"\n },\n {\n \"id\": \"flat-type-hierarchy\",\n \"name\": \"Flat type hierarchy\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Dominant heading and body roles are separated by less than 1.25× at every step, leaving the size hierarchy flat. Add at least one stronger size step.\"\n },\n {\n \"id\": \"gradient-text\",\n \"name\": \"Gradient text\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Gradient text is decorative rather than meaningful — a common AI tell, especially on headings and metrics. Use solid colors for text.\"\n },\n {\n \"id\": \"ai-color-palette\",\n \"name\": \"AI color palette\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Purple/violet gradients and cyan-on-dark are the most recognizable tells of AI-generated UIs. A gradient in one of those hues is the tell on its own; flat neon ink on a dark ground is charged once a second tell hue joins it. Choose a distinctive, intentional palette.\"\n },\n {\n \"id\": \"cream-palette\",\n \"name\": \"Cream / beige palette\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"A warm cream or beige page background has become the default \\\"tasteful\\\" AI surface, reached for by reflex. Choose a background that comes from a deliberate palette, not the safe warm off-white.\"\n },\n {\n \"id\": \"nested-cards\",\n \"name\": \"Nested cards\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"Cards inside cards create visual noise and excessive depth. Flatten the hierarchy — use spacing, typography, and dividers instead of nesting containers.\"\n },\n {\n \"id\": \"monotonous-spacing\",\n \"name\": \"Monotonous spacing\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"The same spacing value used everywhere — no rhythm, no variation. Use tight groupings for related items and generous separations between sections.\"\n },\n {\n \"id\": \"bounce-easing\",\n \"name\": \"Bounce or elastic easing\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"Bounce and elastic easing feel dated and tacky. Real objects decelerate smoothly — use exponential easing (ease-out-quart/quint/expo) instead.\",\n \"advisory\": true\n },\n {\n \"id\": \"pulsing-dot\",\n \"name\": \"Pulsing status dot\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Small pulsing status dots simulate liveness decoratively. Reserve pulse animation for indicators tied to genuinely live, changing data; a static indicator with clear labeling is honest and calmer.\"\n },\n {\n \"id\": \"blinking-cursor\",\n \"name\": \"Decorative blinking cursor\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"A blinking text cursor animated into a hero or landing section simulates typing where no input exists. It borrows the dev-tool aesthetic as decoration. Real editable fields draw their own caret; anywhere else, let the composition hold attention without a fake prompt.\",\n \"advisory\": true\n },\n {\n \"id\": \"shape-assembled-illustration\",\n \"name\": \"Shape-assembled illustration\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"A large inline SVG that builds a pictorial scene from a pile of primitive shapes reads as placeholder clip art, not illustration. Icons, logos, and data graphics are fine at their scale; a hero-sized visual deserves real artwork, a photograph, or a deliberately drawn graphic.\",\n \"advisory\": true\n },\n {\n \"id\": \"organic-clip-path\",\n \"name\": \"Organic contour drawn as clip-path\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"A clip-path polygon with many arbitrary vertices, or a curved clip-path path(), is CSS approximating a torn edge, blob, or silhouette. It reads as the cheap version of the effect and is usually a produced or photographic material replaced with code. Derive an alpha matte from the real image, or ship the shape as a cut-out raster; keep clip-path for geometry (cut corners, diagonals, hexagons).\"\n },\n {\n \"id\": \"buried-raster\",\n \"name\": \"Raster buried under a wash or opacity\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"A background image under a near-opaque gradient wash, or a raster on an element at near-zero opacity, never reaches the screen: the page shows the wash, and the produced texture or photo ships as a compliance token. Let the material show (a tint under 0.9 alpha, a blend mode, an opacity you can see) or remove the file.\"\n },\n {\n \"id\": \"dark-glow\",\n \"name\": \"Glowing shadow accents\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Colored glow shadows — a zero-offset chromatic halo (box- or text-shadow) on any background, or any colored blurred shadow on a dark background — are the default \\\"cool\\\" look of AI-generated UIs. Use neutral elevation shadows and subtle, purposeful lighting instead.\"\n },\n {\n \"id\": \"radial-halo\",\n \"name\": \"Radial-gradient background halo\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"A chromatic radial-gradient wash — saturated at the center, fading to transparent — used as a decorative background glow on a dark page. Same tell as glowing shadows, drawn with a gradient instead of a shadow. Ground the surface with a solid or subtly shifted background instead.\"\n },\n {\n \"id\": \"radial-spotlight-glow\",\n \"name\": \"Decorative radial spotlight glow\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"An accent-colored radial gradient fading to transparent, dropped behind a hero or section as a \\\"spotlight\\\" and bright enough against that surface to read as a cloud floating over the copy. It is a reflex AI decoration — the translucent cousin of the saturated radial halo. Let the surface stand on its own, or light the composition with a deliberate material accent rather than a floating colored haze.\"\n },\n {\n \"id\": \"marquee\",\n \"name\": \"Auto-scrolling marquee\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Continuously auto-scrolling content demands attention it has not earned and hides half its content at any moment. Reserve motion for content that changes; let readers move at their own pace.\"\n },\n {\n \"id\": \"icon-tile-stack\",\n \"name\": \"Icon tile stacked above heading\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"A small rounded-square icon container above a heading is the universal AI feature-card template — every generator outputs this exact shape. Try a side-by-side icon and heading, or let the icon sit in flow without its own container.\"\n },\n {\n \"id\": \"italic-serif-display\",\n \"name\": \"Italic serif display headline\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Oversized italic serif (Fraunces, Recoleta, Playfair, Newsreader-italic) as the primary hero headline reads as taste in isolation but has become the universal AI-startup landing page hero. Set roman, or move to a non-serif display face. Editorial / magazine register may legitimately want this — judge by context.\"\n },\n {\n \"id\": \"hero-eyebrow-chip\",\n \"name\": \"Hero eyebrow / pill chip\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"A tiny uppercase letter-spaced label sitting immediately above an oversized hero headline — or the same shape rendered as a pill chip — is now the default AI SaaS hero. Drop the eyebrow, integrate the kicker into the headline, or run it as a navigation breadcrumb instead.\"\n },\n {\n \"id\": \"kicker-above-heading\",\n \"name\": \"Kicker / eyebrow label above heading\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"A tiny tracked uppercase or small-caps label sitting as its own block directly above a heading is banned outright, repeated or not. Generated kickers never earn their place: the heading carries its own weight. Delete the label and let the heading speak; if the words matter, work them into the heading or the body.\"\n },\n {\n \"id\": \"numbered-section-labels\",\n \"name\": \"Tiny numbered section labels\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Small numeric index labels riding next to section headings, repeated section after section, are AI editorial scaffolding — a page numbering its own chapters instead of earning structure. Let hierarchy, content, and rhythm carry the sequence.\",\n \"advisory\": true\n },\n {\n \"id\": \"em-dash-overuse\",\n \"name\": \"Em-dash overuse\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"Em-dash saturation in body copy is an AI cadence tell. Advisory only: humans use em-dashes legitimately, so this fires only on saturation — at least 8 em-dashes (— or --) at a density near one per 500 characters of body text — never on a long article that uses a few. Prefer commas, colons, periods, or parentheses.\",\n \"advisory\": true\n },\n {\n \"id\": \"marketing-buzzword\",\n \"name\": \"Marketing buzzword\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Generic SaaS phrases (streamline / empower / supercharge / world-class / enterprise-grade / next-generation / cutting-edge / etc) are instant AI tells. Pick a specific verb and noun that says what the product literally does.\"\n },\n {\n \"id\": \"aphoristic-cadence\",\n \"name\": \"Aphoristic-cadence copy\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Three or more sections landing on a short rebuttal sentence (\\\"X. No Y.\\\" / \\\"X. Just Y.\\\") or a manufactured-contrast aphorism (\\\"Not a feature. A platform.\\\") reads as AI cadence, not voice. Once is fine; the pattern is the tell.\"\n },\n {\n \"id\": \"oversized-h1\",\n \"name\": \"Oversized hero headline\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"A full-sentence headline set at display size ends up dominating the viewport, leaving no room for anything else above the fold. A punchy one- or two-word headline at that size is fine — the problem is a long headline blown up too large. Set long headlines smaller, or tighten the copy.\"\n },\n {\n \"id\": \"extreme-negative-tracking\",\n \"name\": \"Crushed letter spacing\",\n \"category\": \"slop\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Letter-spacing pulled tighter than the point where characters keep their own shapes costs legibility. Tighten display type optically, not destructively.\"\n },\n {\n \"id\": \"broken-image\",\n \"name\": \"Broken or placeholder image\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"<img> tags with empty src, missing src, or placeholder values ship as broken-image boxes. Use real images, generated assets, or remove the tag.\"\n },\n {\n \"id\": \"script-error\",\n \"name\": \"Uncaught script error on load\",\n \"category\": \"quality\",\n \"severity\": \"error\",\n \"scopes\": [],\n \"description\": \"A script threw an uncaught exception or failed to parse while the page loaded. Broken JavaScript silently kills reveals, interactions, and dynamic content, and can leave most of a page invisible. Fix the error before judging anything else.\"\n },\n {\n \"id\": \"content-hidden-at-rest\",\n \"name\": \"Content invisible at rest\",\n \"category\": \"quality\",\n \"severity\": \"error\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"A large share of the page text sits at opacity 0 or visibility hidden even after every reveal handler had a chance to run. This is the failed-reveal signature: the content shipped but never becomes visible. Make content visible by default and let JavaScript enhance its entrance instead of gating its existence.\"\n },\n {\n \"id\": \"edge-flush-cards\",\n \"name\": \"Cards flush against the scroller edge\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"Cards inside a horizontal scroller or tab panel sit flush against the container edge at rest while keeping a gutter on the other side, so their edges and rounded corners get cut off. Usually the panel is sized wider than its clip box. Keep a consistent inset on both sides.\"\n },\n {\n \"id\": \"text-occlusion\",\n \"name\": \"Text occluded by an overlapping element\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"Text is painted under an opaque element or a second text run, so part of it cannot be read. A decorative box, a stacked layer, or an inline element with leaked padding lands on the words instead of beside them. Give overlapping layers room, or move the text out from under the layer above it.\"\n },\n {\n \"id\": \"first-viewport-column-overflow\",\n \"name\": \"One column stretches the first viewport\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"A multi-column opening section lets one column run far past the fold while its sibling fits in a single viewport, so the short column floats in dead space and the fold falls deep inside one section. Balance the columns, cap the tall one, or let the long content flow below the opening row.\"\n },\n {\n \"id\": \"gray-on-color\",\n \"name\": \"Gray text on colored background\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Gray text looks washed out on colored backgrounds. Use a darker shade of the background color instead, or white/near-white for contrast.\"\n },\n {\n \"id\": \"low-contrast\",\n \"name\": \"Low contrast text\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"Text does not meet WCAG AA contrast requirements (4.5:1 for body, 3:1 for large text). Increase the contrast between text and background.\"\n },\n {\n \"id\": \"line-length\",\n \"name\": \"Line length too long\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\",\n \"layout\"\n ],\n \"description\": \"Text lines wider than ~80 characters are hard to read. The eye loses its place tracking back to the start of the next line, so it is measured on the lines that rendered and charged when more than one of them runs long. Add a max-width (65ch to 75ch) to text containers.\"\n },\n {\n \"id\": \"cramped-padding\",\n \"name\": \"Cramped padding\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"Text is too close to the edge of its container. Two shapes: (1) an element with its own text where the space between the rendered text and the border box is too small for the font size, and (2) a wrapper whose children's text lands flush against a visible boundary (border, outline, or non-transparent background) with nothing to inset it. Add at least 8px (ideally 12–16px) of space inside bordered, outlined, or colored containers.\"\n },\n {\n \"id\": \"body-text-viewport-edge\",\n \"name\": \"Body text touching viewport edge\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"Body paragraphs render flush against the left or right viewport edge with no container providing horizontal padding: closer than 16px, or 12px on viewports 480px wide or narrower. Wrap content in a container with at least 16px (ideally 24-32px) of horizontal padding, or apply max-width with mx-auto. Body text that runs past the viewport edge is reported once per page as overflow, naming the widest element: constrain that element's width instead of adding padding.\"\n },\n {\n \"id\": \"tight-leading\",\n \"name\": \"Tight line height\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Line height below 1.3x the font size makes multi-line text hard to read. Use 1.5 to 1.7 for body text so lines have room to breathe.\"\n },\n {\n \"id\": \"skipped-heading\",\n \"name\": \"Skipped heading level\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Heading levels should not skip (e.g. h1 then h3 with no h2). Screen readers use heading hierarchy for navigation. Skipping levels breaks the document outline.\"\n },\n {\n \"id\": \"heading-rhythm\",\n \"name\": \"Heading crowded against the previous block\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\",\n \"type\"\n ],\n \"description\": \"A heading binds to the content it introduces, so the rendered space above it should exceed the space below it. When headings across a page sit as close or closer to the block above than to their own content, every section reads as if it captions the previous one. Open up the space above each heading.\"\n },\n {\n \"id\": \"justified-text\",\n \"name\": \"Justified text\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"In a column this narrow, justifying without hyphenation stretches the word spaces until vertical rivers of white run down the block. Use text-align: left, widen the measure, or enable hyphens: auto if you must justify. Scripts that justify on a character grid or by elongating glyphs, such as CJK, Thai and Arabic, are not affected and are not reported.\"\n },\n {\n \"id\": \"straggler\",\n \"name\": \"Straggler\",\n \"category\": \"quality\",\n \"severity\": \"advisory\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"The last line of this paragraph holds one word, which leaves a hole under the block. Set text-wrap: pretty on body copy (Chrome, Safari) to pull a word down beside it. Where a browser ignores it, edit the last sentence or bind the last two words with a no-break space. Keep it if the break is intended.\",\n \"advisory\": true\n },\n {\n \"id\": \"unbalanced-heading\",\n \"name\": \"Unbalanced heading\",\n \"category\": \"quality\",\n \"severity\": \"advisory\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"This heading wraps with its last line far shorter than the line above, often one word alone. Set text-wrap: balance on headings so the lines come out near even, or rewrite it to fit. Keep it if the break carries weight on purpose.\",\n \"advisory\": true\n },\n {\n \"id\": \"tiny-text\",\n \"name\": \"Tiny body text\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Body text below 12px is hard to read, especially on high-DPI screens. Use at least 14px for body content, 16px is ideal.\"\n },\n {\n \"id\": \"undersized-ui-text\",\n \"name\": \"Undersized functional text\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Interactive and content-bearing UI text (links, buttons, nav items, labels, table cells, meta rows, timecodes) below 11px is a legibility failure, not a style choice. WCAG sets no absolute pixel floor, but functional text under 11px is a defensible quality bar: it fails on high-DPI and small viewports and it degrades tap and read targets. The 11px floor holds even inside a footer; only non-interactive legal smallprint gets the softer 10px floor. Being ON the DESIGN.md size ramp does not exempt a value here: adding 8px to the ramp launders the token but not the legibility problem, and that is exactly the escape hatch this rule closes. Exempts sup/sub, visually-hidden (sr-only) text, and code/terminal contexts. Decorative letterspaced micro-labels are still functional and stay in scope.\"\n },\n {\n \"id\": \"all-caps-body\",\n \"name\": \"All-caps body text\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Long passages in uppercase are hard to read. We recognize words by shape (ascenders and descenders), which all-caps removes. Reserve uppercase for short labels and headings. Only a run that reads as a sentence counts: 80 characters or more of an element's own text. Buttons, nav items, kickers and eyebrows set in caps are a convention and stay silent.\"\n },\n {\n \"id\": \"wide-tracking\",\n \"name\": \"Wide letter spacing on body text\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"Letter spacing above 0.05em on body text disrupts natural character groupings and slows reading. Reserve wide tracking for short uppercase labels only.\"\n },\n {\n \"id\": \"text-overflow\",\n \"name\": \"Content overflowing its container\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"Content renders wider than its container and the spill does harm: a clipping ancestor cuts it off, it runs into another box, or it reaches the viewport edge. Let text wrap, constrain widths, or give the region a deliberate scroll affordance.\"\n },\n {\n \"id\": \"repeated-container-text\",\n \"name\": \"Same text repeated inside one container\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [],\n \"description\": \"The same literal text rendered three or more times in structurally different spots inside a single card or panel is redundant messaging — usually a status or label wired into every slot of a template. Say it once, in the slot where it matters most.\"\n },\n {\n \"id\": \"clipped-overflow-container\",\n \"name\": \"Positioned child clipped by overflow container\",\n \"category\": \"quality\",\n \"severity\": \"advisory\",\n \"scopes\": [\n \"layout\"\n ],\n \"description\": \"A clipping container (overflow hidden or clip) wrapping an absolutely-positioned child cuts off tooltips, menus, and popovers that need to escape. Let the overflow be visible, or move the positioned layer out of the clip.\",\n \"advisory\": true\n },\n {\n \"id\": \"design-system-font\",\n \"name\": \"Font outside DESIGN.md\",\n \"category\": \"quality\",\n \"severity\": \"warning\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"A font is used that is not declared in DESIGN.md typography. Use the documented type system or update DESIGN.md if this is an intentional brand addition.\"\n },\n {\n \"id\": \"design-system-color\",\n \"name\": \"Color outside DESIGN.md\",\n \"category\": \"quality\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"A literal color is outside the DESIGN.md palette and sidecar tonal ramps. This may be legitimate, but it should be an intentional design-system addition rather than drift.\",\n \"advisory\": true\n },\n {\n \"id\": \"design-system-radius\",\n \"name\": \"Radius outside DESIGN.md\",\n \"category\": \"quality\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"A border-radius value is outside the DESIGN.md rounded scale. Use a documented radius token or update the design system if the new shape is intentional.\",\n \"advisory\": true\n },\n {\n \"id\": \"design-system-font-size\",\n \"name\": \"Font size outside DESIGN.md\",\n \"category\": \"quality\",\n \"severity\": \"advisory\",\n \"scopes\": [\n \"type\"\n ],\n \"description\": \"A literal font-size is off the type ramp documented in DESIGN.md typography. Use a documented size step or update the design system if the new step is intentional.\",\n \"advisory\": true\n },\n {\n \"id\": \"gpt-thin-border-wide-shadow\",\n \"name\": \"Hairline border with wide shadow\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"Every card of this row wears a hairline border paired with a wide, diffuse shadow, which is a recurring generated-UI signature. One floating panel earns both; a whole row wearing them reads as a default nobody chose. Across the row, commit to one: a defined edge or a soft elevation.\",\n \"advisory\": true\n },\n {\n \"id\": \"repeating-stripes-gradient\",\n \"name\": \"Repeating-gradient stripes\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"Repeating-gradient stripes used as surface decoration are a recurring generated-UI signature. Reach for a deliberate texture or leave the surface plain.\",\n \"advisory\": true\n },\n {\n \"id\": \"codex-grid-background\",\n \"name\": \"Decorative grid-line background\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"A decorative grid or line-field background drawn with hairline linear-gradient layers tiled by a fixed pixel cell is a recurring generated-UI signature. Reserve grid overlays for actual canvas, map, blueprint, or measurement surfaces; elsewhere use product structure or a plain surface.\",\n \"advisory\": true\n },\n {\n \"id\": \"theater-slop-phrase\",\n \"name\": \"Theater framing copy\",\n \"category\": \"slop\",\n \"severity\": \"advisory\",\n \"scopes\": [],\n \"description\": \"Dismissing something as \\\"theater\\\" is a recurring generated-copy tic. Say plainly what the thing does or does not do.\",\n \"advisory\": true\n }\n]\n",
+ "stderr": "",
+ "exit": 0,
+ "signal": null,
+ "files": {}
+}
diff --git a/tests/oracle/golden/detect-list-rules-quiet.json b/tests/oracle/golden/detect-list-rules-quiet.json
new file mode 100644
index 000000000..64d4ac6fc
--- /dev/null
+++ b/tests/oracle/golden/detect-list-rules-quiet.json
@@ -0,0 +1,7 @@
+{
+ "stdout": "side-tab\nborder-accent-on-rounded\noverused-font\nflat-type-hierarchy\ngradient-text\nai-color-palette\ncream-palette\nnested-cards\nmonotonous-spacing\nbounce-easing\npulsing-dot\nblinking-cursor\nshape-assembled-illustration\norganic-clip-path\nburied-raster\ndark-glow\nradial-halo\nradial-spotlight-glow\nmarquee\nicon-tile-stack\nitalic-serif-display\nhero-eyebrow-chip\nkicker-above-heading\nnumbered-section-labels\nem-dash-overuse\nmarketing-buzzword\naphoristic-cadence\noversized-h1\nextreme-negative-tracking\nbroken-image\nscript-error\ncontent-hidden-at-rest\nedge-flush-cards\ntext-occlusion\nfirst-viewport-column-overflow\ngray-on-color\nlow-contrast\nline-length\ncramped-padding\nbody-text-viewport-edge\ntight-leading\nskipped-heading\nheading-rhythm\njustified-text\nstraggler\nunbalanced-heading\ntiny-text\nundersized-ui-text\nall-caps-body\nwide-tracking\ntext-overflow\nrepeated-container-text\nclipped-overflow-container\ndesign-system-font\ndesign-system-color\ndesign-system-radius\ndesign-system-font-size\ngpt-thin-border-wide-shadow\nrepeating-stripes-gradient\ncodex-grid-background\ntheater-slop-phrase\n",
+ "stderr": "",
+ "exit": 0,
+ "signal": null,
+ "files": {}
+}
diff --git a/tests/oracle/golden/detect-list-rules-with-cdp.json b/tests/oracle/golden/detect-list-rules-with-cdp.json
new file mode 100644
index 000000000..992a26cb6
--- /dev/null
+++ b/tests/oracle/golden/detect-list-rules-with-cdp.json
@@ -0,0 +1,7 @@
+{
+ "stdout": "",
+ "stderr": "Error: --list-rules prints the rule catalog and takes no file, URL, or --cdp scan\n",
+ "exit": 1,
+ "signal": null,
+ "files": {}
+}
diff --git a/tests/oracle/golden/detect-list-rules-with-target.json b/tests/oracle/golden/detect-list-rules-with-target.json
new file mode 100644
index 000000000..992a26cb6
--- /dev/null
+++ b/tests/oracle/golden/detect-list-rules-with-target.json
@@ -0,0 +1,7 @@
+{
+ "stdout": "",
+ "stderr": "Error: --list-rules prints the rule catalog and takes no file, URL, or --cdp scan\n",
+ "exit": 1,
+ "signal": null,
+ "files": {}
+}
diff --git a/tests/oracle/golden/detect-list-rules.json b/tests/oracle/golden/detect-list-rules.json
new file mode 100644
index 000000000..60324e647
--- /dev/null
+++ b/tests/oracle/golden/detect-list-rules.json
@@ -0,0 +1,7 @@
+{
+ "stdout": "slop\n side-tab\n Side-tab accent border\n Thick colored border on one side of a card — the most recognizable tell of AI-generated UIs. Use a subtler accent or remove it entirely.\n\n border-accent-on-rounded\n Border accent on rounded element\n Thick accent border on a rounded card — the border clashes with the rounded corners. Remove the border or the border-radius.\n\n overused-font\n Overused font\n Inter, Roboto, Fraunces, Geist, Plus Jakarta Sans, and Space Grotesk are used on so many sites they no longer feel distinctive. Each new wave of AI-generated UIs converges on the same handful of faces. Choose a face that gives your interface personality.\n\n flat-type-hierarchy\n Flat type hierarchy\n Dominant heading and body roles are separated by less than 1.25× at every step, leaving the size hierarchy flat. Add at least one stronger size step.\n\n gradient-text\n Gradient text\n Gradient text is decorative rather than meaningful — a common AI tell, especially on headings and metrics. Use solid colors for text.\n\n ai-color-palette\n AI color palette\n Purple/violet gradients and cyan-on-dark are the most recognizable tells of AI-generated UIs. A gradient in one of those hues is the tell on its own; flat neon ink on a dark ground is charged once a second tell hue joins it. Choose a distinctive, intentional palette.\n\n cream-palette\n Cream / beige palette\n A warm cream or beige page background has become the default \"tasteful\" AI surface, reached for by reflex. Choose a background that comes from a deliberate palette, not the safe warm off-white.\n\n nested-cards\n Nested cards\n Cards inside cards create visual noise and excessive depth. Flatten the hierarchy — use spacing, typography, and dividers instead of nesting containers.\n\n monotonous-spacing\n Monotonous spacing\n The same spacing value used everywhere — no rhythm, no variation. Use tight groupings for related items and generous separations between sections.\n\n bounce-easing (advisory)\n Bounce or elastic easing\n Bounce and elastic easing feel dated and tacky. Real objects decelerate smoothly — use exponential easing (ease-out-quart/quint/expo) instead.\n\n pulsing-dot\n Pulsing status dot\n Small pulsing status dots simulate liveness decoratively. Reserve pulse animation for indicators tied to genuinely live, changing data; a static indicator with clear labeling is honest and calmer.\n\n blinking-cursor (advisory)\n Decorative blinking cursor\n A blinking text cursor animated into a hero or landing section simulates typing where no input exists. It borrows the dev-tool aesthetic as decoration. Real editable fields draw their own caret; anywhere else, let the composition hold attention without a fake prompt.\n\n shape-assembled-illustration (advisory)\n Shape-assembled illustration\n A large inline SVG that builds a pictorial scene from a pile of primitive shapes reads as placeholder clip art, not illustration. Icons, logos, and data graphics are fine at their scale; a hero-sized visual deserves real artwork, a photograph, or a deliberately drawn graphic.\n\n dark-glow\n Glowing shadow accents\n Colored glow shadows — a zero-offset chromatic halo (box- or text-shadow) on any background, or any colored blurred shadow on a dark background — are the default \"cool\" look of AI-generated UIs. Use neutral elevation shadows and subtle, purposeful lighting instead.\n\n radial-halo\n Radial-gradient background halo\n A chromatic radial-gradient wash — saturated at the center, fading to transparent — used as a decorative background glow on a dark page. Same tell as glowing shadows, drawn with a gradient instead of a shadow. Ground the surface with a solid or subtly shifted background instead.\n\n radial-spotlight-glow\n Decorative radial spotlight glow\n An accent-colored radial gradient fading to transparent, dropped behind a hero or section as a \"spotlight\" and bright enough against that surface to read as a cloud floating over the copy. It is a reflex AI decoration — the translucent cousin of the saturated radial halo. Let the surface stand on its own, or light the composition with a deliberate material accent rather than a floating colored haze.\n\n marquee\n Auto-scrolling marquee\n Continuously auto-scrolling content demands attention it has not earned and hides half its content at any moment. Reserve motion for content that changes; let readers move at their own pace.\n\n icon-tile-stack\n Icon tile stacked above heading\n A small rounded-square icon container above a heading is the universal AI feature-card template — every generator outputs this exact shape. Try a side-by-side icon and heading, or let the icon sit in flow without its own container.\n\n italic-serif-display\n Italic serif display headline\n Oversized italic serif (Fraunces, Recoleta, Playfair, Newsreader-italic) as the primary hero headline reads as taste in isolation but has become the universal AI-startup landing page hero. Set roman, or move to a non-serif display face. Editorial / magazine register may legitimately want this — judge by context.\n\n hero-eyebrow-chip\n Hero eyebrow / pill chip\n A tiny uppercase letter-spaced label sitting immediately above an oversized hero headline — or the same shape rendered as a pill chip — is now the default AI SaaS hero. Drop the eyebrow, integrate the kicker into the headline, or run it as a navigation breadcrumb instead.\n\n kicker-above-heading\n Kicker / eyebrow label above heading\n A tiny tracked uppercase or small-caps label sitting as its own block directly above a heading is banned outright, repeated or not. Generated kickers never earn their place: the heading carries its own weight. Delete the label and let the heading speak; if the words matter, work them into the heading or the body.\n\n numbered-section-labels (advisory)\n Tiny numbered section labels\n Small numeric index labels riding next to section headings, repeated section after section, are AI editorial scaffolding — a page numbering its own chapters instead of earning structure. Let hierarchy, content, and rhythm carry the sequence.\n\n em-dash-overuse (advisory)\n Em-dash overuse\n Em-dash saturation in body copy is an AI cadence tell. Advisory only: humans use em-dashes legitimately, so this fires only on saturation — at least 8 em-dashes (— or --) at a density near one per 500 characters of body text — never on a long article that uses a few. Prefer commas, colons, periods, or parentheses.\n\n marketing-buzzword\n Marketing buzzword\n Generic SaaS phrases (streamline / empower / supercharge / world-class / enterprise-grade / next-generation / cutting-edge / etc) are instant AI tells. Pick a specific verb and noun that says what the product literally does.\n\n aphoristic-cadence\n Aphoristic-cadence copy\n Three or more sections landing on a short rebuttal sentence (\"X. No Y.\" / \"X. Just Y.\") or a manufactured-contrast aphorism (\"Not a feature. A platform.\") reads as AI cadence, not voice. Once is fine; the pattern is the tell.\n\n oversized-h1\n Oversized hero headline\n A full-sentence headline set at display size ends up dominating the viewport, leaving no room for anything else above the fold. A punchy one- or two-word headline at that size is fine — the problem is a long headline blown up too large. Set long headlines smaller, or tighten the copy.\n\n extreme-negative-tracking\n Crushed letter spacing\n Letter-spacing pulled tighter than the point where characters keep their own shapes costs legibility. Tighten display type optically, not destructively.\n\n gpt-thin-border-wide-shadow (advisory)\n Hairline border with wide shadow\n Every card of this row wears a hairline border paired with a wide, diffuse shadow, which is a recurring generated-UI signature. One floating panel earns both; a whole row wearing them reads as a default nobody chose. Across the row, commit to one: a defined edge or a soft elevation.\n\n repeating-stripes-gradient (advisory)\n Repeating-gradient stripes\n Repeating-gradient stripes used as surface decoration are a recurring generated-UI signature. Reach for a deliberate texture or leave the surface plain.\n\n codex-grid-background (advisory)\n Decorative grid-line background\n A decorative grid or line-field background drawn with hairline linear-gradient layers tiled by a fixed pixel cell is a recurring generated-UI signature. Reserve grid overlays for actual canvas, map, blueprint, or measurement surfaces; elsewhere use product structure or a plain surface.\n\n theater-slop-phrase (advisory)\n Theater framing copy\n Dismissing something as \"theater\" is a recurring generated-copy tic. Say plainly what the thing does or does not do.\n\nquality\n organic-clip-path\n Organic contour drawn as clip-path\n A clip-path polygon with many arbitrary vertices, or a curved clip-path path(), is CSS approximating a torn edge, blob, or silhouette. It reads as the cheap version of the effect and is usually a produced or photographic material replaced with code. Derive an alpha matte from the real image, or ship the shape as a cut-out raster; keep clip-path for geometry (cut corners, diagonals, hexagons).\n\n buried-raster\n Raster buried under a wash or opacity\n A background image under a near-opaque gradient wash, or a raster on an element at near-zero opacity, never reaches the screen: the page shows the wash, and the produced texture or photo ships as a compliance token. Let the material show (a tint under 0.9 alpha, a blend mode, an opacity you can see) or remove the file.\n\n broken-image\n Broken or placeholder image\n <img> tags with empty src, missing src, or placeholder values ship as broken-image boxes. Use real images, generated assets, or remove the tag.\n\n script-error\n Uncaught script error on load\n A script threw an uncaught exception or failed to parse while the page loaded. Broken JavaScript silently kills reveals, interactions, and dynamic content, and can leave most of a page invisible. Fix the error before judging anything else.\n\n content-hidden-at-rest\n Content invisible at rest\n A large share of the page text sits at opacity 0 or visibility hidden even after every reveal handler had a chance to run. This is the failed-reveal signature: the content shipped but never becomes visible. Make content visible by default and let JavaScript enhance its entrance instead of gating its existence.\n\n edge-flush-cards\n Cards flush against the scroller edge\n Cards inside a horizontal scroller or tab panel sit flush against the container edge at rest while keeping a gutter on the other side, so their edges and rounded corners get cut off. Usually the panel is sized wider than its clip box. Keep a consistent inset on both sides.\n\n text-occlusion\n Text occluded by an overlapping element\n Text is painted under an opaque element or a second text run, so part of it cannot be read. A decorative box, a stacked layer, or an inline element with leaked padding lands on the words instead of beside them. Give overlapping layers room, or move the text out from under the layer above it.\n\n first-viewport-column-overflow\n One column stretches the first viewport\n A multi-column opening section lets one column run far past the fold while its sibling fits in a single viewport, so the short column floats in dead space and the fold falls deep inside one section. Balance the columns, cap the tall one, or let the long content flow below the opening row.\n\n gray-on-color\n Gray text on colored background\n Gray text looks washed out on colored backgrounds. Use a darker shade of the background color instead, or white/near-white for contrast.\n\n low-contrast\n Low contrast text\n Text does not meet WCAG AA contrast requirements (4.5:1 for body, 3:1 for large text). Increase the contrast between text and background.\n\n line-length\n Line length too long\n Text lines wider than ~80 characters are hard to read. The eye loses its place tracking back to the start of the next line, so it is measured on the lines that rendered and charged when more than one of them runs long. Add a max-width (65ch to 75ch) to text containers.\n\n cramped-padding\n Cramped padding\n Text is too close to the edge of its container. Two shapes: (1) an element with its own text where the space between the rendered text and the border box is too small for the font size, and (2) a wrapper whose children's text lands flush against a visible boundary (border, outline, or non-transparent background) with nothing to inset it. Add at least 8px (ideally 12–16px) of space inside bordered, outlined, or colored containers.\n\n body-text-viewport-edge\n Body text touching viewport edge\n Body paragraphs render flush against the left or right viewport edge with no container providing horizontal padding: closer than 16px, or 12px on viewports 480px wide or narrower. Wrap content in a container with at least 16px (ideally 24-32px) of horizontal padding, or apply max-width with mx-auto. Body text that runs past the viewport edge is reported once per page as overflow, naming the widest element: constrain that element's width instead of adding padding.\n\n tight-leading\n Tight line height\n Line height below 1.3x the font size makes multi-line text hard to read. Use 1.5 to 1.7 for body text so lines have room to breathe.\n\n skipped-heading\n Skipped heading level\n Heading levels should not skip (e.g. h1 then h3 with no h2). Screen readers use heading hierarchy for navigation. Skipping levels breaks the document outline.\n\n heading-rhythm\n Heading crowded against the previous block\n A heading binds to the content it introduces, so the rendered space above it should exceed the space below it. When headings across a page sit as close or closer to the block above than to their own content, every section reads as if it captions the previous one. Open up the space above each heading.\n\n justified-text\n Justified text\n In a column this narrow, justifying without hyphenation stretches the word spaces until vertical rivers of white run down the block. Use text-align: left, widen the measure, or enable hyphens: auto if you must justify. Scripts that justify on a character grid or by elongating glyphs, such as CJK, Thai and Arabic, are not affected and are not reported.\n\n straggler (advisory)\n Straggler\n The last line of this paragraph holds one word, which leaves a hole under the block. Set text-wrap: pretty on body copy (Chrome, Safari) to pull a word down beside it. Where a browser ignores it, edit the last sentence or bind the last two words with a no-break space. Keep it if the break is intended.\n\n unbalanced-heading (advisory)\n Unbalanced heading\n This heading wraps with its last line far shorter than the line above, often one word alone. Set text-wrap: balance on headings so the lines come out near even, or rewrite it to fit. Keep it if the break carries weight on purpose.\n\n tiny-text\n Tiny body text\n Body text below 12px is hard to read, especially on high-DPI screens. Use at least 14px for body content, 16px is ideal.\n\n undersized-ui-text\n Undersized functional text\n Interactive and content-bearing UI text (links, buttons, nav items, labels, table cells, meta rows, timecodes) below 11px is a legibility failure, not a style choice. WCAG sets no absolute pixel floor, but functional text under 11px is a defensible quality bar: it fails on high-DPI and small viewports and it degrades tap and read targets. The 11px floor holds even inside a footer; only non-interactive legal smallprint gets the softer 10px floor. Being ON the DESIGN.md size ramp does not exempt a value here: adding 8px to the ramp launders the token but not the legibility problem, and that is exactly the escape hatch this rule closes. Exempts sup/sub, visually-hidden (sr-only) text, and code/terminal contexts. Decorative letterspaced micro-labels are still functional and stay in scope.\n\n all-caps-body\n All-caps body text\n Long passages in uppercase are hard to read. We recognize words by shape (ascenders and descenders), which all-caps removes. Reserve uppercase for short labels and headings. Only a run that reads as a sentence counts: 80 characters or more of an element's own text. Buttons, nav items, kickers and eyebrows set in caps are a convention and stay silent.\n\n wide-tracking\n Wide letter spacing on body text\n Letter spacing above 0.05em on body text disrupts natural character groupings and slows reading. Reserve wide tracking for short uppercase labels only.\n\n text-overflow\n Content overflowing its container\n Content renders wider than its container and the spill does harm: a clipping ancestor cuts it off, it runs into another box, or it reaches the viewport edge. Let text wrap, constrain widths, or give the region a deliberate scroll affordance.\n\n repeated-container-text\n Same text repeated inside one container\n The same literal text rendered three or more times in structurally different spots inside a single card or panel is redundant messaging — usually a status or label wired into every slot of a template. Say it once, in the slot where it matters most.\n\n clipped-overflow-container (advisory)\n Positioned child clipped by overflow container\n A clipping container (overflow hidden or clip) wrapping an absolutely-positioned child cuts off tooltips, menus, and popovers that need to escape. Let the overflow be visible, or move the positioned layer out of the clip.\n\n design-system-font\n Font outside DESIGN.md\n A font is used that is not declared in DESIGN.md typography. Use the documented type system or update DESIGN.md if this is an intentional brand addition.\n\n design-system-color (advisory)\n Color outside DESIGN.md\n A literal color is outside the DESIGN.md palette and sidecar tonal ramps. This may be legitimate, but it should be an intentional design-system addition rather than drift.\n\n design-system-radius (advisory)\n Radius outside DESIGN.md\n A border-radius value is outside the DESIGN.md rounded scale. Use a documented radius token or update the design system if the new shape is intentional.\n\n design-system-font-size (advisory)\n Font size outside DESIGN.md\n A literal font-size is off the type ramp documented in DESIGN.md typography. Use a documented size step or update the design system if the new step is intentional.\n\n61 rules.\n",
+ "stderr": "",
+ "exit": 0,
+ "signal": null,
+ "files": {}
+}