Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS
Launch fixes: portable Chrome lookup and file URLs in the capture, picture and render scripts, install.mjs help and unknown-flag guard, the render prerequisites stated, the global install command in the README, OpenCode slash metadata, gate 85 lets a sign-up or order form close its own page, exemplars name their job, and the eval set drops briefs that pointed at personal apps
Youssef00e774f51707
diff --git a/README.md b/README.mdindex 3c3012e..e14bbef 100644--- a/README.md+++ b/README.md@@ -85,16 +85,18 @@ A full redesign keeps the content and the wiring and changes the system and the## Install```-npx skills add nutlope/hallmark+npx skills add nutlope/hallmark -g```+`-g` installs for every project; leave it off to install into the current one. Needs Node 18 or later. The browser checks (`sloplint --render`, screenshots) also need `npm i -g puppeteer-core` and Chrome; without them the static checks still run.+| Harness | Lands in | Invoke || --- | --- | --- || Claude Code | `~/.claude/skills/hallmark` | `/hallmark <brief>` or describe a new build || Codex CLI | `~/.agents/skills/hallmark` | `$hallmark <brief>` or describe a new build || OpenCode | finds the copies above | `/hallmark <brief>` or describe a new build |-- **One harness only:** `npx skills add nutlope/hallmark --agent claude-code` (or `codex`, `opencode`, `cursor`, `github-copilot`).+- **One harness only:** `npx skills add nutlope/hallmark -g --agent claude-code` (or `codex`, `opencode`, `cursor`, `github-copilot`).- **From a clone:** `node skills/hallmark/scripts/install.mjs` validates every theme and reference before it copies; `install-hook.mjs` adds an edit-time Floor check to Claude Code.- **Lint any page:** `node skills/hallmark/scripts/sloplint.mjs <file-or-dir> --render`.- **If it does not fire on its own,** name it: *use hallmark to build ...*. Worked examples in [`docs/recipes.md`](docs/recipes.md).diff --git a/eval/briefs.json b/eval/briefs.jsonindex 4ad2799..9488e78 100644--- a/eval/briefs.json+++ b/eval/briefs.json@@ -242,60 +242,6 @@"notes": "Opus 5.5 at medium effort, vague brief."}},- {- "id": "b28",- "name": "real product",- "brief": "Make a landing page for SubStudio, my subtitles app. It's on my Desktop at ~/Desktop/Apps/ai-subtitles. You can run it yourself (npm run dev -- -p 3128) and take screenshots of what it looks like to use on the page.",- "expect": {- "scope": "page",- "notes": "Opus 5.5 at medium effort; the product exists and should be captured, not mocked."- },- "addDirs": [- "~/Desktop/Apps/ai-subtitles"- ]- },- {- "id": "b29",- "name": "real product",- "brief": "Landing page for Moji, my Slack emoji generator. The code is at ~/Desktop/Apps/together-emoji.",- "expect": {- "scope": "page",- "notes": "Opus 5.5 at medium effort; the product exists and should be captured, not mocked."- },- "addDirs": [- "~/Desktop/Apps/together-emoji"- ]- },- {- "id": "b30",- "name": "real product",- "brief": "Build a landing page for Qwest, my game. It's live at https://playqwest.vercel.app.",- "expect": {- "scope": "page",- "notes": "Opus 5.5 at medium effort; the product exists and should be captured, not mocked."- }- },- {- "id": "b31",- "name": "real product",- "brief": "I need a landing page for Stylepicker, the app in ~/Desktop/Apps/stylepicker-v2.",- "expect": {- "scope": "page",- "notes": "Opus 5.5 at medium effort; the product exists and should be captured, not mocked."- },- "addDirs": [- "~/Desktop/Apps/stylepicker-v2"- ]- },- {- "id": "b32",- "name": "real product",- "brief": "Landing page for Model Arena, my side project, live at https://model-arena-flax.vercel.app.",- "expect": {- "scope": "page",- "notes": "Opus 5.5 at medium effort; the product exists and should be captured, not mocked."- }- },{"id": "b33","name": "custom",diff --git a/skills/hallmark/SKILL.md b/skills/hallmark/SKILL.mdindex 0ebb8f2..0527a6d 100644--- a/skills/hallmark/SKILL.md+++ b/skills/hallmark/SKILL.md@@ -3,6 +3,8 @@ name: hallmarkdescription: "Design skill for new pages, sites, app screens and components that look made, not generated: deals a theme or designs from scratch, builds on a hard floor, lints and reviews. Use when the user asks to build or design something new, or names Hallmark. Never use it to change an existing design (a restyle, new colours or theme, a polish, a redesign, a small edit) unless the user names Hallmark: `/hallmark redesign <path>` is the explicit full redesign, keeping content and wiring; `/hallmark audit <path>` only reports."argument-hint: "<brief> | redesign <path> | audit <path>"version: 2.0.0+metadata:+ opencode/slash: "true"---# Hallmarkdiff --git a/skills/hallmark/references/flow.md b/skills/hallmark/references/flow.mdindex ccaa3db..83e4c19 100644--- a/skills/hallmark/references/flow.md+++ b/skills/hallmark/references/flow.md@@ -114,6 +114,8 @@ Hallmark is tuned for Claude Code, Codex CLI and OpenCode. This section tunes ex| Network | yes | off by default in the `workspace-write` sandbox; `imagegen.mjs` needs an explicit ask and an approval | `webfetch` permission-gated || Node scripts | run freely | `sloplint.mjs` runs in-sandbox (local reads only) | bash gated allow / ask / deny; if *ask*, warn once and suggest allowing `node *` for the session; never edit the permission config |+**The render tier** (`sloplint --render`, `capture.mjs`, `picture.mjs`) needs Node 18 or later, `puppeteer-core` (local, global or `HALLMARK_PUPPETEER`) and Chrome or Chromium (`CHROME_PATH` when it is not in a usual place). Without them sloplint runs the static gates and prints that the render tier did not run: say so in the handoff, never claim a render pass, and offer `npm i -g puppeteer-core`.+Codex: batch a page's files into one patch so a dev server reloads once; never suggest editing `~/.codex/config.toml`, the sandbox mode or the approval policy; if the sandbox blocks something, name the block and take the fallback. OpenCode: a plan-style agent with edits denied cannot run Hallmark; say so rather than pasting files into chat; formatters cannot break a gate, LSP diagnostics are yours to fix before Step 7.**Model tics to refuse, keyed on symptoms** (the Floor outranks any model's taste): ghost cards (outline-only filler; climb the surface ladder instead); drawn SVG or CSS illustrations as filler (80); grain or noise washes as ambience (texture is a budgeted recipe on themes that earn it); repeated stripe or grid backgrounds with nothing under them; emoji bullets; a tight grotesk at 600 on near-white with one blue accent and a 1px border under a soft shadow (product chrome erasing the theme); gradient ramps standing in for material; a first viewport that commits and a third section that quietly becomes a card grid on white.diff --git a/skills/hallmark/references/gates.md b/skills/hallmark/references/gates.mdindex ce13b22..f43dce6 100644--- a/skills/hallmark/references/gates.md+++ b/skills/hallmark/references/gates.md@@ -112,7 +112,7 @@ One line each. `a`/`b` clauses share a number and carry their own tier. Genre no| 82 | Reflex | R | The counting device: 24 or more identical marks (ticks, dots, bars, squares) standing for a quantity, one for each bottle, identity or day. Guard: a chart whose marks differ in value or colour | set the number in type || 83 | Reflex | R | The photo wall: below the hero, photographs cover more than about a third of the page at 1440 (45% on a Photographic or Portfolio Grid shape), so it reads as a stock gallery. Guard: a gallery or portfolio of the user's own work | keep the strongest pictures, set big; carry the rest in the theme's material: type, figures, the product, a table (`imagery.md` § 5) || 84 | Reflex | J | The fake product: the page shows a built mock of a product that exists and could be reached (a URL, a running dev server, a project in the folder, an app on the machine), or a drawn interface where a screenshot belonged. Guard: the product does not run yet, or capturing it would show private data | run it, put it in a telling state and capture it with `scripts/capture.mjs` or the OS; frame the captures in the theme (`imagery.md` § 4) |-| 85 | Reflex | R | The stock close: the last section before the footer, or the footer, is an email sign-up (a form of one or two fields, one an email) on a page whose job is not one where a mailing list is native (subscribe, join, attend, listen, visit), or whose stamp names no `job:`. Guard: the user asked for a sign-up; a form whose button books, enquires or requests | end on what the visitor came to do, in the form the job takes (the booking, the buy box, the download, the next date and the address, the latest issue), or on the last strong section (`anatomy.md`) |+| 85 | Reflex | R | The stock close: the last section before the footer, or the footer, is an email sign-up (a form of one or two fields, one an email) on a page whose job is not one where a mailing list is native (subscribe, join, attend, listen, visit), or whose stamp names no `job:`. Guard: the user asked for a sign-up; a form whose button books, enquires, orders or starts the product | end on what the visitor came to do, in the form the job takes (the booking, the buy box, the download, the next date and the address, the latest issue), or on the last strong section (`anatomy.md`) |### Chrome and copydiff --git a/skills/hallmark/scripts/capture.mjs b/skills/hallmark/scripts/capture.mjsindex 5558c76..bbdc77b 100644--- a/skills/hallmark/scripts/capture.mjs+++ b/skills/hallmark/scripts/capture.mjs@@ -40,7 +40,7 @@ const SIZES = { desktop: [1440, 900, false], laptop: [1280, 800, false], tablet:let puppeteer = null;const roots = [process.env.HALLMARK_PUPPETEER, process.cwd(), HERE].filter(Boolean);-try { const { execSync } = await import('node:child_process'); roots.push(dirname(execSync('npm root -g', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim())); } catch {}+const globalRoot = async () => { try { const { execSync } = await import('node:child_process'); return dirname(execSync('npm root -g', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim()); } catch { return null; } };for (const root of roots) {for (const n of ['puppeteer-core', 'puppeteer']) {try { puppeteer = (await import(pathToFileURL(createRequire(join(root, 'noop.js')).resolve(n)).href)).default; } catch {}@@ -48,8 +48,11 @@ for (const root of roots) {}if (puppeteer) break;}+if (!puppeteer) { const g = await globalRoot(); for (const n of ['puppeteer-core', 'puppeteer']) { if (puppeteer || !g) break; try { puppeteer = (await import(pathToFileURL(createRequire(join(g, 'noop.js')).resolve(n)).href)).default; } catch {} } }if (!puppeteer) { console.error('capture.mjs needs puppeteer-core or puppeteer (local, global or HALLMARK_PUPPETEER). Without it, take the screenshots with the harness or the OS (imagery.md § 4).'); process.exit(1); }-const chrome = [process.env.CHROME_PATH, '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium', '/usr/bin/google-chrome', '/usr/bin/chromium', '/usr/bin/chromium-browser'].find((p) => p && existsSync(p)) || (typeof puppeteer.executablePath === 'function' ? puppeteer.executablePath() : null);+const CHROMES = [process.env.CHROME_PATH, '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium', '/usr/bin/google-chrome', '/usr/bin/google-chrome-stable', '/usr/bin/chromium', '/usr/bin/chromium-browser', '/snap/bin/chromium', 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe', 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'];+const findChrome = () => { const c = CHROMES.find((x) => x && existsSync(x)); if (c) return c; try { const b = typeof puppeteer.executablePath === 'function' ? puppeteer.executablePath() : null; if (typeof b === 'string' && existsSync(b)) return b; } catch {} return null; };+const chrome = findChrome();if (has('cdp')) {const port = Number(flag('cdp', ''));if (!Number.isInteger(port) || port < 1 || port > 65535) { console.error('--cdp takes the app\'s DevTools port, for example --cdp 9222'); process.exit(2); }diff --git a/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html b/skills/hallmark/scripts/fixtures/exemplars/atmospheric.htmlindex ee15c97..a654e4b 100644--- a/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html+++ b/skills/hallmark/scripts/fixtures/exemplars/atmospheric.html@@ -9,7 +9,7 @@<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Young+Serif&family=Instrument+Sans:wght@400;500;600&display=swap" rel="stylesheet"><style>-/* Hallmark · shape: Photographic · genre: atmospheric · theme: Spore (by request)+/* Hallmark · job: visit · shape: Photographic · genre: atmospheric · theme: Spore (by request)* hero: Settled · nav: floating pill · footer: statement · imagery: photographs, library 3, warm con=6 exp=-4 · signature: a pour into the decanter after five beside the head, with tonight's door in the nav · spore: cellar* axes: dark/roman-serif/warm · posture: committed · contrast: pass · fold: pass · v2.0.0 *//* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: S, the photographs are a stand-in bar; every head carries a fact from the brief, the pour is pink like the one signal, and the nav reads tonight's door from the brief's hours */diff --git a/skills/hallmark/scripts/fixtures/exemplars/editorial.html b/skills/hallmark/scripts/fixtures/exemplars/editorial.htmlindex c088269..5a782ae 100644--- a/skills/hallmark/scripts/fixtures/exemplars/editorial.html+++ b/skills/hallmark/scripts/fixtures/exemplars/editorial.html@@ -9,7 +9,7 @@<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Grenze+Gotisch:wght@600&family=Hanken+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@400&display=swap" rel="stylesheet"><style>-/* Hallmark · shape: Trade Ledger (custom: the roast as a Poster, the house's day book set as its own ledger, the cup as a pair, the order on the pigment) · genre: editorial · theme: Vellum (by request)+/* Hallmark · job: buy · shape: Trade Ledger (custom: the roast as a Poster, the house's day book set as its own ledger, the cup as a pair, the order on the pigment) · genre: editorial · theme: Vellum (by request)* hero: Poster · nav: masthead, the blackletter wordmark centred over a double rule, one link at each end · footer: letter close · imagery: photographs, library 3, warm con=6 · signature: the roast itself, beans swept round the cooling tray full-bleed under a parchment plate · vellum: parchment* axes: light/blackletter/cool · posture: committed · contrast: pass · fold: pass · v2.0.0 *//* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V4 · weakest: E, the plate must not bury the hand and the falling beans; it rests on the tray's far side and the plain wall, so the stream and the lever stay clear */diff --git a/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html b/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.htmlindex cd66f80..6a595e4 100644--- a/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html+++ b/skills/hallmark/scripts/fixtures/exemplars/modern-minimal.html@@ -11,7 +11,7 @@<link href="https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400&display=swap" rel="stylesheet"><style>-/* Hallmark · shape: Conversational FAQ, opened by the product · genre: modern-minimal · theme: Coral (by request)+/* Hallmark · job: sign up · shape: Conversational FAQ, opened by the product · genre: modern-minimal · theme: Coral (by request)* hero: Settled · nav: edge-aligned, the wordmark at the left, one link and one outlined pill at the right · footer: mast, the wordmark large over the links · imagery: product sample in hero, demo-2 and demo-3, photographs library 1 muted sepia=8 · signature: invoice 0042 being chased, live in the hero* axes: light/grotesk-sans/warm · posture: restrained · contrast: pass · fold: pass · v2.0.0 *//* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V5 · weakest: E, the built screens must read as one product at every width, so every inner length is in em on a container-unit base, the screens scale as a whole and re-lay themselves on a phone */diff --git a/skills/hallmark/scripts/fixtures/exemplars/playful.html b/skills/hallmark/scripts/fixtures/exemplars/playful.htmlindex 2c28836..08b8ef9 100644--- a/skills/hallmark/scripts/fixtures/exemplars/playful.html+++ b/skills/hallmark/scripts/fixtures/exemplars/playful.html@@ -9,7 +9,7 @@<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Anybody:wdth,[email protected],900&family=Archivo:wght@400;600&family=Archivo+Narrow:wght@600&display=swap" rel="stylesheet"><style>-/* Hallmark · shape: Photographic · genre: playful · theme: Overprint (by request)+/* Hallmark · job: visit · shape: Photographic · genre: playful · theme: Overprint (by request)* hero: Poster · nav: slab, the ink bar with the wordmark in stock colour, three links and a knocked-out Tickets outline · footer: mast, the wordmark across the container over the bar rule · imagery: photographs, library 6, mono pulled through one pass each · signature: the bill knocked out of a gig photograph printed in the orange pass · overprint: newsprint* axes: light/grotesk-heavy/cool · posture: full-palette · contrast: pass · fold: pass · v2.0.0 *//* Hallmark · pre-emit critique: P4 H5 E4 S4 R4 V4 · weakest: S, the brief names no acts, so the listing is one honest slot and the photographs and the two times carry the night */diff --git a/skills/hallmark/scripts/install.mjs b/skills/hallmark/scripts/install.mjsindex 1e19a07..003a1aa 100644--- a/skills/hallmark/scripts/install.mjs+++ b/skills/hallmark/scripts/install.mjs@@ -31,6 +31,19 @@ const TARGETS = {const args = process.argv.slice(2);const has = (f) => args.includes(f);+const FLAGS = ["--claude", "--codex", "--opencode", "--copy", "--dry-run", "--force", "--remove", "--help", "-h"];+const unknown = args.filter((a) => !FLAGS.includes(a));+if (has("--help") || has("-h") || unknown.length) {+ if (unknown.length) console.log(`Unknown option: ${unknown.join(" ")}\n`);+ console.log(`node install.mjs [--claude] [--codex] [--opencode] [--copy] [--dry-run] [--force] [--remove]++ Installs Hallmark for every harness it finds (or only the ones named), after checking every theme and reference.+ --dry-run print what would be copied and change nothing+ --copy give OpenCode its own copy instead of reading the Claude Code or Codex one+ --force install even if the checks find a problem+ --remove delete every installed copy`);+ process.exit(unknown.length ? 2 : 0);+}const DRY = has("--dry-run");function copyDir(src, dest) {@@ -121,8 +134,7 @@ for (const key of picked) {installTo(t.dir);if (key === "codex" && fs.existsSync(t.legacy)) {- console.log(` legacy copy found at ${t.legacy} (superseded location); refreshing it too so nothing stale is ever discovered:`);- installTo(t.legacy);+ console.log(` an older copy sits at ${t.legacy}; Codex may list Hallmark twice. Remove it with: node install.mjs --remove, then install again.`);}}diff --git a/skills/hallmark/scripts/picture.mjs b/skills/hallmark/scripts/picture.mjsindex 3e94c94..5ee04de 100644--- a/skills/hallmark/scripts/picture.mjs+++ b/skills/hallmark/scripts/picture.mjs@@ -28,9 +28,10 @@ for (const root of roots) {if (puppeteer) break;}if (!puppeteer) { console.error('picture.mjs needs puppeteer-core or puppeteer (local, global or HALLMARK_PUPPETEER)'); process.exit(1); }-const chromes = [process.env.CHROME_PATH, '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/usr/bin/google-chrome', '/usr/bin/chromium', '/usr/bin/chromium-browser'];-let chrome = chromes.find((p) => p && existsSync(p));-if (!chrome && typeof puppeteer.executablePath === 'function') chrome = puppeteer.executablePath();+const CHROMES = [process.env.CHROME_PATH, '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium', '/usr/bin/google-chrome', '/usr/bin/google-chrome-stable', '/usr/bin/chromium', '/usr/bin/chromium-browser', '/snap/bin/chromium', 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe', 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'];+const findChrome = () => { const c = CHROMES.find((x) => x && existsSync(x)); if (c) return c; try { const b = typeof puppeteer.executablePath === 'function' ? puppeteer.executablePath() : null; if (typeof b === 'string' && existsSync(b)) return b; } catch {} return null; };+const chrome = findChrome();+if (!chrome) { console.error('no Chrome or Chromium found; set CHROME_PATH to its executable'); process.exit(1); }const browser = await puppeteer.launch({ executablePath: chrome, headless: true });const p = await browser.newPage();await p.emulateMediaFeatures([{ name: 'prefers-reduced-motion', value: 'reduce' }]);diff --git a/skills/hallmark/scripts/sloplint-render.mjs b/skills/hallmark/scripts/sloplint-render.mjsindex 328c005..bc20e55 100644--- a/skills/hallmark/scripts/sloplint-render.mjs+++ b/skills/hallmark/scripts/sloplint-render.mjs@@ -1,7 +1,7 @@#!/usr/bin/env nodeimport { existsSync, mkdirSync, writeFileSync } from 'node:fs';import { join, dirname, basename, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';+import { fileURLToPath, pathToFileURL } from 'node:url';const WIDTHS = [320, 375, 414, 768, 1024, 1280, 1920];const CHROMES = ['/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium', '/usr/bin/google-chrome', '/usr/bin/google-chrome-stable', '/usr/bin/chromium', '/usr/bin/chromium-browser', '/snap/bin/chromium', 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'];@@ -76,7 +76,6 @@ export async function renderCheck(htmlFiles, metaIn) {const inventories = {};let puppeteer = null;const { createRequire } = await import('node:module');- const { pathToFileURL } = await import('node:url');const tryRoots = async (roots) => {for (const root of roots) {for (const name of ['puppeteer-core', 'puppeteer']) {@@ -124,7 +123,7 @@ export async function renderCheck(htmlFiles, metaIn) {page.on('requestfailed', (r) => { if (['stylesheet', 'font'].includes(r.resourceType())) lost.add(lostName(r.url())); });page.on('response', (r) => { try { if (r.status() >= 400 && ['stylesheet', 'font'].includes(r.request().resourceType())) lost.add(lostName(r.url())); } catch {} });await page.emulateMediaFeatures([{ name: 'prefers-reduced-motion', value: 'reduce' }]).catch(() => {});- const nav = await page.goto(isUrl(file) ? file : 'file://' + file, { waitUntil: isUrl(file) ? 'networkidle0' : 'load', timeout: 30000 }).then((r) => ({ r }), (e) => ({ e }));+ const nav = await page.goto(isUrl(file) ? file : pathToFileURL(file).href, { waitUntil: isUrl(file) ? 'networkidle0' : 'load', timeout: 30000 }).then((r) => ({ r }), (e) => ({ e }));if (nav.e && !/timeout/i.test(nav.e.message)) throw nav.e;if (nav.r && isUrl(file) && !nav.r.ok() && nav.r.status() !== 304) throw new Error(`HTTP ${nav.r.status()} from ${file}`);await page.evaluate(async () => {@@ -889,7 +888,7 @@ function observeSpace(atLaptop, heroOnly, heroPosture, photoShape, job) {const foot = [...document.querySelectorAll('body footer, [role="contentinfo"]')].filter(vis).pop();const before = foot ? secs.filter((x) => x !== foot && abs(x).bottom <= abs(foot).top + 2).pop() : secs[secs.length - 1];// a form whose submit books, asks or requests is the job's own action, not a mailing list- const asks = (f) => /\b(book|enquir|inquir|request|contact|walkthrough|demo|quote|reserve|apply)/i.test([...f.querySelectorAll('button, input[type=submit]')].map((b) => b.innerText || b.value || '').join(' '));+ const asks = (f) => { const t = [...f.querySelectorAll('button, input[type=submit]')].map((b) => b.innerText || b.value || '').join(' '); return /\b(book|enquir|inquir|request|contact|walkthrough|demo|quote|reserve|apply|start|create|order|buy|download|try)/i.test(t) && !/newsletter|updates|subscribe|the list|mailing/i.test(t); };const signup = (box) => box && [...box.querySelectorAll('form, [role="form"]')].find((f) => { if (asks(f)) return false; const fields = [...f.querySelectorAll('input:not([type=hidden]):not([type=submit]):not([type=checkbox]):not([type=radio]), textarea, select')].filter(vis); return fields.length >= 1 && fields.length <= 2 && fields.some((x) => x.type === 'email' || /e-?mail/i.test(`${x.name} ${x.id} ${x.placeholder} ${x.getAttribute('autocomplete') || ''}`)); });const hit = signup(before) || signup(foot);if (hit) push(85, 'REFLEX', `the page closes on an email sign-up${job ? ` on a ${job} page` : ' and the stamp names no job'}`, 'End on what the visitor came to do (the booking, the buy box, the download, the next date, the latest issue) or on the last strong section; an email close is for a subscribe or join page, and the stamp says job: (anatomy.md)');@@ -1245,7 +1244,7 @@ async function observeOcclusion() {return out;}-if (import.meta.url === `file://${process.argv[1]}`) {+if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) {const htmls = process.argv.slice(2).filter((p) => p.endsWith('.html'));const res = await renderCheck(process.argv.slice(2).filter((p) => isUrl(p)).concat(htmls.map((p) => resolve(process.cwd(), p))));console.log(JSON.stringify(res, null, 2));