From 444e4acad38a00ec4b837ce57e9b4ef561297450 Mon Sep 17 00:00:00 2001 From: Vinay Pokharkar <139057357+vinaypokharkar@users.noreply.github.com> Date: Sun, 3 May 2026 00:31:43 +0530 Subject: [PATCH] Detector: add italic-serif display headline + hero eyebrow chip rules (#127) (#129) * feat(detector): flag italic-serif display heroes and uppercase eyebrow chips (#127) Two new rules covering the structural tells of late-2025/early-2026 AI-generated marketing pages. - italic-serif-display: oversized italic serif (Fraunces, Recoleta, Newsreader, Playfair, Cormorant, Tiempos, ...) as the primary hero headline. Anchored on h1 (or h2 at >= 48px) with font-style: italic and a serif primary face. - hero-eyebrow-chip: uppercase letter-spaced label sitting as the previousElementSibling of a hero h1 (font-size >= 48px). Bounded text length 2-30 chars, letter-spacing >= 1.6px, font-size <= 14px. The pill-chip variant (background + border-radius: 999px) falls out of the same gates for free. Both follow the existing icon-tile-stack pattern: pure check function + browser DOM adapter + jsdom adapter, wired into both element loops. Two-column fixtures (4 flag / 6 pass each) drive the jsdom tests. Skill copy in source/skills/impeccable/reference/typography.md and critique.md calls out the patterns by name. The italic-serif rule's description acknowledges that editorial/magazine register may legitimately want the pattern -- judge by context. Closes #127 Co-Authored-By: Claude Opus 4.7 (1M context) * Add sandbox gotchas for Codex * Trim verbose detector skill copy --------- Co-authored-by: Claude Opus 4.7 (1M context) Co-authored-by: Paul Bakaus --- .../skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .kiro/skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .pi/skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- .trae/skills/impeccable/reference/critique.md | 2 +- AGENTS.md | 9 + README.npm.md | 2 +- .../skills/impeccable/reference/critique.md | 2 +- site/pages/index.astro | 8 +- site/scripts/generated/counts.js | 2 +- .../skills/impeccable/reference/critique.md | 2 +- src/detect-antipatterns-browser.js | 172 +++++++++++++++ src/detect-antipatterns.mjs | 178 ++++++++++++++++ tests/detect-antipatterns-fixtures.test.mjs | 74 +++++++ .../antipatterns/hero-eyebrow-chip.html | 195 ++++++++++++++++++ .../antipatterns/italic-serif-display.html | 190 +++++++++++++++++ 23 files changed, 838 insertions(+), 20 deletions(-) create mode 100644 tests/fixtures/antipatterns/hero-eyebrow-chip.html create mode 100644 tests/fixtures/antipatterns/italic-serif-display.html diff --git a/.agents/skills/impeccable/reference/critique.md b/.agents/skills/impeccable/reference/critique.md index 82aeb3ecf..3ea213989 100644 --- a/.agents/skills/impeccable/reference/critique.md +++ b/.agents/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.claude/skills/impeccable/reference/critique.md b/.claude/skills/impeccable/reference/critique.md index f4d230098..428f22a5f 100644 --- a/.claude/skills/impeccable/reference/critique.md +++ b/.claude/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.cursor/skills/impeccable/reference/critique.md b/.cursor/skills/impeccable/reference/critique.md index 9bc43cd21..1c7b82742 100644 --- a/.cursor/skills/impeccable/reference/critique.md +++ b/.cursor/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.gemini/skills/impeccable/reference/critique.md b/.gemini/skills/impeccable/reference/critique.md index 701a72b7e..6800cc870 100644 --- a/.gemini/skills/impeccable/reference/critique.md +++ b/.gemini/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.github/skills/impeccable/reference/critique.md b/.github/skills/impeccable/reference/critique.md index 4d003ddcd..d20655dde 100644 --- a/.github/skills/impeccable/reference/critique.md +++ b/.github/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.kiro/skills/impeccable/reference/critique.md b/.kiro/skills/impeccable/reference/critique.md index fb9de1ad1..e64d9c17c 100644 --- a/.kiro/skills/impeccable/reference/critique.md +++ b/.kiro/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.opencode/skills/impeccable/reference/critique.md b/.opencode/skills/impeccable/reference/critique.md index 76e49cf0e..c0d17e990 100644 --- a/.opencode/skills/impeccable/reference/critique.md +++ b/.opencode/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.pi/skills/impeccable/reference/critique.md b/.pi/skills/impeccable/reference/critique.md index b8068446f..0a4784a54 100644 --- a/.pi/skills/impeccable/reference/critique.md +++ b/.pi/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.qoder/skills/impeccable/reference/critique.md b/.qoder/skills/impeccable/reference/critique.md index b8068446f..0a4784a54 100644 --- a/.qoder/skills/impeccable/reference/critique.md +++ b/.qoder/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.rovodev/skills/impeccable/reference/critique.md b/.rovodev/skills/impeccable/reference/critique.md index b8068446f..0a4784a54 100644 --- a/.rovodev/skills/impeccable/reference/critique.md +++ b/.rovodev/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.trae-cn/skills/impeccable/reference/critique.md b/.trae-cn/skills/impeccable/reference/critique.md index 04f48df56..b47d25fff 100644 --- a/.trae-cn/skills/impeccable/reference/critique.md +++ b/.trae-cn/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/.trae/skills/impeccable/reference/critique.md b/.trae/skills/impeccable/reference/critique.md index 04f48df56..b47d25fff 100644 --- a/.trae/skills/impeccable/reference/critique.md +++ b/.trae/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/AGENTS.md b/AGENTS.md index 36e165c57..26728b0fc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,6 +20,15 @@ If you load the Impeccable skill from `.agents/skills/impeccable/SKILL.md` (or a Run `bun run build` after changing anything in `source/`, transformer code, or user-facing counts. +## Sandbox gotchas for Codex agents + +Some repo workflows need to run outside the sandbox in the desktop app: + +- GitHub SSH operations that depend on the 1Password SSH agent, such as `gh pr checkout`, may fail in the sandbox with `sign_and_send_pubkey` or no 1Password approval prompt. Rerun them outside the sandbox instead of falling back to unrelated workarounds. +- `bun run build` rewrites committed harness directories such as `.agents/skills/`. In the sandbox, Bun can hit filesystem errors while removing/recreating those trees (for example `EFAULT` on `.agents/skills`). Rerun the build outside the sandbox before treating it as a real build failure. +- Puppeteer/headless-Chrome tests, especially `node --test tests/detect-antipatterns-browser.test.mjs` and the browser portion of `bun run test`, can hang in the sandbox while launching Chrome. Run them outside the sandbox for authoritative results. +- The jsdom fixture suite is intentionally run with Node, not Bun: use `node --test tests/detect-antipatterns-fixtures.test.mjs` or the `bun run test` script. A direct `bun test tests/detect-antipatterns-fixtures.test.mjs` can time out and is not the supported signal. + ## Coding Style & Naming Conventions Use ESM, semicolons, and the existing two-space indentation style in JS, HTML, and CSS. Prefer small, single-purpose modules over large abstractions. Keep filenames descriptive and lowercase with hyphens where needed; skill entrypoints stay as `SKILL.md`, helper scripts use `.js` or `.mjs`. In source frontmatter, use clear kebab-case names and concise descriptions. There is no dedicated formatter or linter configured here, so match surrounding code closely. diff --git a/README.npm.md b/README.npm.md index 0d4dc20b6..8084382c7 100644 --- a/README.npm.md +++ b/README.npm.md @@ -1,6 +1,6 @@ # Impeccable CLI -Detect UI anti-patterns and design quality issues from the command line. Scans HTML, CSS, JSX, TSX, Vue, and Svelte files for 25 specific patterns including AI-generated UI tells, accessibility violations, and general design quality problems. +Detect UI anti-patterns and design quality issues from the command line. Scans HTML, CSS, JSX, TSX, Vue, and Svelte files for 27 specific patterns including AI-generated UI tells, accessibility violations, and general design quality problems. ## Quick Start diff --git a/plugin/skills/impeccable/reference/critique.md b/plugin/skills/impeccable/reference/critique.md index f4d230098..428f22a5f 100644 --- a/plugin/skills/impeccable/reference/critique.md +++ b/plugin/skills/impeccable/reference/critique.md @@ -39,7 +39,7 @@ Return structured findings covering: AI slop verdict, heuristic scores, cognitiv #### Assessment B: Automated Detection -Run the bundled deterministic detector, which flags 25 specific patterns (AI slop tells + general design quality). +Run the bundled deterministic detector, which flags 27 specific patterns (AI slop tells + general design quality). **CLI scan**: ```bash diff --git a/site/pages/index.astro b/site/pages/index.astro index 24467731f..ec5d37ce9 100644 --- a/site/pages/index.astro +++ b/site/pages/index.astro @@ -489,7 +489,7 @@ import '../styles/sub-pages.css';