Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS
A full redesign test's lessons: brand against stock, reworded lines, a fallback face is flagged
Youssef2953fc8fd4af
diff --git a/skills/hallmark/references/components/n5-floating-pill.md b/skills/hallmark/references/components/n5-floating-pill.mdindex 4822c20..dcc09e0 100644--- a/skills/hallmark/references/components/n5-floating-pill.md+++ b/skills/hallmark/references/components/n5-floating-pill.md@@ -92,4 +92,4 @@ An observer on an 80px sentinel at the top of the page flips the class once per## Mobile-- Below 60rem: the morph is off and the links go behind a menu control; wordmark, menu and action stay in the pill. Below 40rem: a corner chip, wordmark left, menu right.+- Below 60rem: the morph is off and links that no longer fit go behind a menu control (two or three short ones that fit stay in the pill, `craft.md` § 9); wordmark, menu and action stay in the pill. Below 40rem: a corner chip, wordmark left, menu right.diff --git a/skills/hallmark/references/gates.md b/skills/hallmark/references/gates.mdindex 332c592..57d6932 100644--- a/skills/hallmark/references/gates.md+++ b/skills/hallmark/references/gates.md@@ -13,7 +13,7 @@ Every gate carries a **tier**, which says whether you may disagree with it:**Class** says who can check it: **M** mechanical (sloplint, in CSS and in markup, including Tailwind utilities in `.jsx`, `.tsx`, `.vue`, `.svelte` and `.astro` files), **M/R** static half plus the render tier (`--render`, which SKILL.md runs at the hero stage and at Step 7; `--url` renders a running dev server), **R** the render tier alone, **R/J** render or judge, **J** judged at Step 7 by the model. When sloplint has run, walk only the J and R/J gates plus the judged halves of M/R gates; re-litigating what the script passed is wasted judgement.-**Grades:** `FAIL` (Floor, nothing ships) · `REFLEX` (unanswered Reflex, fix or waive) · `WAIVED` (guard satisfied, visible) · `WARN` (suspected, confirm or dismiss; a dismissal reports as `DISMISSED`) · `ANSWERED` (Finish finding with a recorded reason) · `NOTE` (bookkeeping). `FAIL` and `REFLEX` report separately so "0 FAIL" stays a true statement about the Floor.+**Grades:** `FAIL` (Floor, nothing ships) · `REFLEX` (unanswered Reflex, fix or waive) · `WAIVED` (guard satisfied, visible) · `WARN` (suspected, confirm or dismiss; a dismissal reports as `DISMISSED`) · `ANSWERED` (Finish finding with a recorded reason) · `NOTE` (bookkeeping). `FAIL` and `REFLEX` report separately so "0 FAIL" stays a true statement about the Floor. A finding marked `kept` is not a gate: it comes from a redesign's record of what the page had (`redesign.md` § After), and it binds like the Floor.**Retired numbers stay retired:** 5, 13, 14, 21, 31, 35, 36, 43, 45, 51, 52, 57, 60 and 61 are never reused, so an older stamp still reads.@@ -213,8 +213,8 @@ The gates above that a script cannot settle, with enough to judge them well.## 6. The reviews, in fresh context-The thread that built the page is its weakest reviewer. Two reviews run with no inherited transcript (a subagent in Claude Code): the **hero review** once at Step 6, before any section below the fold exists, and the **finish review** at Step 7. Do not read their briefs yourself: start the reviewer with *Read `<skill-dir>/references/review-hero.md` (or `review-finish.md`) and follow it* and pass these, as paths. The hero review: the four `hero-*` screenshots, the stamp's first two lines, the Picks block's Material and Signature rows, the theme's picture. The finish review: the render tier's screenshots, the page's HTML, the stamp's theme line or direction contract, the theme's picture, the hero review's findings with how each was settled, `gates.md` § 4, and on a redesign the `before` screenshots. Wait for it once.+The thread that built the page is its weakest reviewer. Two reviews run with no inherited transcript (a subagent in Claude Code): the **hero review** once at Step 6, before any section below the fold exists, and the **finish review** at Step 7. Do not read their briefs yourself: start the reviewer with *Read `<skill-dir>/references/review-hero.md` (or `review-finish.md`) and follow it* and pass these, files as paths and lines as quoted text. The hero review: the four `hero-*` screenshots, the stamp's first two lines, the Picks block's Material and Signature rows, the theme's picture. The finish review: the render tier's screenshots, the page's HTML, the stamp's theme line or direction contract, the theme's picture, the hero review's findings with how each was settled, `gates.md` § 4, and on a redesign the `before` screenshots. Wait for it once.-Act on its first word. Fix what is real, recapture the same shots (`--stage hero` for the hero), and score each finding yourself against its recapture: `resolved`, `partial` or `unresolved`, with a reason. Send the recaptures back for one scoring round only when the first word was `rebuild` or a finding named a Floor gate; scoring is not a second review. Record the outcome in the stamp, hero first: `hero-review: fix · 4 findings · 4 resolved`, then `finish-review: subagent · 5 findings · 4 resolved 1 unresolved · gap: none`. No subagents: re-read the artifact cold, run the same brief against yourself, and record `in-thread`.+Act on its first word. `recapture` means the screenshots were wrong (a fallback face, a blank frame): retake them and start the review again; it does not use up the one round. Otherwise fix what is real, recapture the same shots (`--stage hero` for the hero), and score each finding yourself against its recapture: `resolved`, `partial` or `unresolved`, with a reason. Send the recaptures back for one scoring round only when the first word was `rebuild` or a finding named a Floor gate; scoring is not a second review. Record the outcome in the stamp, hero first: `hero-review: fix · 4 findings · 4 resolved`, then `finish-review: subagent · 5 findings · 4 resolved 1 unresolved · gap: none`. No subagents: re-read the artifact cold, run the same brief against yourself, and record `in-thread`.**Nothing ships with an open `FAIL` or an open `REFLEX`.** A Floor finding is fixed; a Reflex finding is fixed or waived; a Finish finding is read and answered.diff --git a/skills/hallmark/references/redesign.md b/skills/hallmark/references/redesign.mdindex 141d6b7..9347839 100644--- a/skills/hallmark/references/redesign.md+++ b/skills/hallmark/references/redesign.md@@ -4,11 +4,11 @@ Loaded when the request opens with `redesign` or `audit`, or plainly asks to red## What a redesign keeps-- **The content.** Every fact, claim, name, price, date and quote the page states. Figures, quotes and logos already on the page are the user's material: carried over as found, never added to, and listed in the handoff for the user to verify.-- **The wiring.** Every link, form field, action, handler, route, id and test hook; every script, data call and analytics call. Edit markup inside the component that owns it. Never move logic, rename a prop, or drop a `name`, an `id`, a `key`, an `href` or a `data-testid` that a script or a test reads.-- **The files.** No file deleted, no route removed and no component tree replaced without a file-level plan the user approved, and no test edited to make the redesign pass. Documents in the repo (a README, a brief, a deck) explain the product; they are not page copy. In a git project, start from a clean tree, `.hallmark/` aside (ask the user to commit or stash; never do it for them), so the redesign is one diff they can read and revert.-- **The brand.** A logo, a brand colour and a brand face the pre-flight finds stay at every depth unless the user lets them go; their values come from the project's own files, never from memory. A locked `design.md` is the system at every depth.-- **The words,** unless a gate names them. Wording that fails a copy gate (19, 54, 58, 63, 69) is tightened from the facts already on the page, and the handoff lists every changed line, before and after. An eyebrow is never just deleted: where its heading is figurative, the plain label becomes the heading or folds into it (*Opening hours* over *When to find us* becomes *Opening hours*). Terms, disclaimers and consent text are never reworded. When the user says to keep every word, stamp `copy: verbatim`: 19, 58 and 69 then report as notes.+- **The content.** Every fact, claim, name, price, date and quote the page states. Figures, quotes and logos already on the page are the user's material: carried over as found, never added to, and listed in the handoff for the user to verify. Nothing is added either: no action, section or visual the page did not have, beyond what the user hands over.+- **The wiring.** Every link, form, field, handler, route, id and test hook; every script, data call and analytics call. Edit markup inside the component that owns it. Never move logic, rename a prop, or drop a `name`, an `id`, a `key`, a `type`, an `href` or a `data-testid` that a script or a test reads.+- **The files.** No file deleted, no route removed and no component tree replaced without a file-level plan the user approved, and no test edited to make the redesign pass. Documents in the repo (a README, a brief, a deck) explain the product; they are not page copy. In a git project, start from a clean tree, `.hallmark/` aside (ask the user to commit or stash; never do it for them), so the redesign is one diff they can read and revert. The stylesheet itself is the redesign's to edit: the append-only rule guards it from a build, not from its own redesign.+- **The brand,** when there is one. A brand is chosen: a logo, a colour or a face the project names (a brand file, a logo asset, named tokens, a font file of its own) or the user states. It stays at every depth, its values read from the project's files, never from memory. A framework default or a look the gates name (the purple-to-blue gradient, Inter as the display, a stock swatch) is not a brand: restyle and full replace it, and the Picks block says so in case it was. A locked `design.md` is the system at every depth.+- **The words,** unless a gate names them. Wording that fails a copy gate (19, 54, 58, 63, 69) is tightened from the facts already on the page, and the handoff lists every changed line, before and after. An eyebrow is never just deleted: where its heading is figurative, the plain label becomes the heading (*Opening hours* over *When to find us* becomes *Opening hours*). Terms, disclaimers and consent text are never reworded. When the user says to keep every word, stamp `copy: verbatim`: 19, 58 and 69 then report as notes.## Depth@@ -16,22 +16,22 @@ How far the run goes. The user's words pick it; otherwise the project does, and| Depth | Stays | Changes | Picked by || --- | --- | --- | --- |-| **polish** | the system and the layout | only what a gate names: the tells, contrast, states, motion, tokens | *polish*, *clean up*, *fix the design*; a `design.md`; a design system the project owns |-| **restyle** | the layout | the system: colour, type, radius, shadow, motion, the controls | *restyle*, *reskin*, *a new look*; an app screen |-| **full** | the content and the wiring | the system and the composition: shape, hero, section objects, chrome | *redesign* on a marketing page; *looks generic*, *looks generated* |+| **polish** | the system and the layout | only what a gate names: the tells, contrast, states, motion, tokens | *polish*, *clean up*, *fix the design*; *keep our look*; a `design.md` |+| **restyle** | the layout | the system: colour, type, radius, shadow, motion, the controls | *restyle*, *reskin*, *a new look*; the bare verb on an app screen, or on a page with a brand |+| **full** | the content and the wiring | the system and the composition: shape, hero, section objects, chrome | *redesign it fully*, *looks generic*, *looks generated*; the bare verb on a marketing page with no brand |*From scratch* is a build, not a depth: SKILL.md as written, the old page as its Step 2 inventory, in new files beside the old ones.## Before-1. Run the pre-flight (Step 0), then list the pages in the target: route, file, and whether each is a page or an app screen (`flow.md` § App screens). In a framework project start the dev server. An unstamped page has no genre: infer it as Step 1 does and say so.+1. Run the pre-flight (Step 0), then list the pages in the target: route, file, and whether each is a page or an app screen (`flow.md` § App screens). In a framework project start the dev server. An unstamped page has no genre: infer it from the page as Step 1 would from a brief, and say so.2. Record the page as it stands:```node <skill-dir>/scripts/sloplint.mjs <target> --genre <genre> --render --before [--url <route> ...] [--scope app]```-It prints the findings grouped by gate and writes every line to `.hallmark/before.txt`, the screenshots to `.hallmark/before/`, and the record to `.hallmark/before.json`: every link, field, form action, inline handler, test hook, script hook, heading and figure. The folder ignores its own screenshots and records in git.+It prints the findings grouped by gate and writes every line to `.hallmark/before.txt`, the screenshots to `.hallmark/before/`, and the record to `.hallmark/before.json`: every link, form, field, inline handler, test hook, script tag, selector a script queries, heading and figure. The folder ignores its own screenshots and records in git.3. Look at the screenshots before you weigh the findings, so the linter does not write the verdict, then give the read in four lines: what the page is for (the audience, the one action); what works and stays (at least one thing); what reads as generated (the worst tells, by gate); what is broken.@@ -54,22 +54,21 @@ The Picks block opens with four rows of its own, and nothing is deleted until th- **Files** · edit: app/page.tsx, app/pricing/page.tsx, app/globals.css · create: tokens.css, base.css · delete: none```-Then the build rows the depth reaches: Theme at restyle and full (dealt, `brand` or locked); Shape, Chrome, Hero, Signature and Sections at full only, where Step 2 runs with the page's own content as its inventory. At polish the block stops after Files.+Then the build rows the depth reaches: Theme at restyle and full (dealt, `brand` or locked); Shape, Chrome, Hero, Signature and Sections at full only, where Step 2 runs with the page's own content as its inventory. At polish the block stops after Files. The deal's `--brief` is the read's first line (what the page is for, in plain nouns), never the page's own copy, which is what the redesign is leaving behind.## Build- **Polish** is `flow.md` § The sweep, on the user's own page: fix in place, single elements and tokens, never restructure, under the check stamp with `built: the project · redesign: polish`. It loads `gates.md` § 1 to § 5 and `patterns.md`, `interaction-and-states.md` when the page has a form, and from `craft.md` only the section a finding points at.- **Where the layout stays** (polish and restyle), the stamp's `redesign:` field tells sloplint to report the layout gates (6b, 8, 9, 32, 42, 44a, 44c, 58) as notes; at polish the spacing gates (24b, 59) too, so a polish does not re-space a site it was asked to keep. Print them for the user with the depth that would settle them; do not rebuild them.-- **The stylesheet is the redesign's to edit.** The append-only rule guards a project's stylesheet from a build, not from its own redesign; the framework's directives still stay where they are.-- **Restyle and full** start from the scaffold: `tokens.css` and `base.css` imported below the project's own styles and mapped onto the project's token names (a Tailwind theme, shadcn variables: `export-formats.md`). Pass the depth so the stamp carries it: `theme.mjs scaffold <slug> --redesign <depth>`. A kept brand takes `scaffold --brand --redesign <depth>` and fills the tokens from the palette and faces the pre-flight found (no `check`: the coordinates are the user's); otherwise the deal runs as in Step 3. Then the shared components and the chrome, then the pages, the most visited first, each swept before the next.+- **Restyle and full** start from the scaffold, with the depth in the stamp: `theme.mjs scaffold <slug> --redesign <depth>`, or `scaffold --brand --redesign <depth>` for a kept brand, its tokens filled from the palette and faces the pre-flight found (no `check`: the coordinates are the user's). `tokens.css` and `base.css` are imported below the project's own styles and mapped onto its token names (a Tailwind theme, shadcn variables: `export-formats.md`). Then the shared components and the chrome, then the pages, the most visited first, each swept before the next.- **More than one page** at restyle or full: lock the system first (`design-md.md`). Every page reads it and the variety rule inverts: pages share theme, type and accent, and differ only in shape. Past three pages, give each page to its own subagent where the harness has them, with `design.md`, the page's files and this file.-- **Full depth** runs the hero stage and the hero review. Polish and restyle skip both.+- **Full depth** runs the hero stage and the hero review; polish and restyle skip both. The old sections still sit below the new hero at that stage: the stage judges the first screen alone, and what it reports below the fold waits for the sweep. Gate 8 judges the composition, not the order of the content: a kept sequence in a new composition is waived on the record.## After-1. The sweep, against the record: `sloplint <target> --render --kept`. Anything the page had and no longer has is a `FAIL kept` (a link, a field, a form action, a handler, a test hook, a selector a script still queries) or a `WARN kept` (a heading, a figure, an image, an id). Restore it, or record what the user agreed to lose: `/* Hallmark · dropped /blog, #team · the user is retiring the blog and the team section */`. The run also writes `.hallmark/compare.html`, the before and after screenshots side by side: give the user its path.+1. The sweep, against the record: `sloplint <target> --render --kept`. Anything the page had and no longer has is a `FAIL kept` (a link, a form, a field, a handler, a test hook, a script, a selector a script still queries) or a `WARN kept` (a heading, a figure, an image, an id). Restore it, or put it on the record in the stamp: `/* Hallmark · dropped /blog, #team · the user is retiring the blog and the team section */`, or for a line a copy gate named, `/* Hallmark · reworded "Built for modern teams" to "Out of your way" · 19 names the opener */`. The run also writes `.hallmark/compare.html`, the before and after screenshots side by side: give the user its path.2. The project's own checks, where it has them: the type check, the build, the tests. A redesign that breaks one is not finished.-3. The finish review also takes the `before` screenshots and answers what the old page did better (`review-finish.md`). A polish hands it only the full pages at 1440, before and after, and takes at most five findings. A finding that is a plain defect (a misalignment, a broken glyph, a label that lies) is fixed at any depth; one that asks for a new composition joins the layout findings.+3. The finish review also takes the `before` screenshots and answers what the old page did better (`review-finish.md`). A polish hands it only the full pages at 1440, before and after, and takes at most five findings. A finding that is a plain defect (a misalignment, a broken glyph, a label that lies) is fixed at any depth; one that asks for a new composition joins the layout findings; one that asks for content the page never had goes to the owner in the handoff.4. The log entry carries `mode: redesign`, `depth` and `scope` (page, site or app), plus the build's fields at full depth.5. The handoff, ahead of the material ask:diff --git a/skills/hallmark/references/review-finish.md b/skills/hallmark/references/review-finish.mdindex 215292e..f44e603 100644--- a/skills/hallmark/references/review-finish.md+++ b/skills/hallmark/references/review-finish.md@@ -8,6 +8,6 @@ Then the findings, ranked by cost to the page, at most eight, one line each: theThen one answer to the question no gate can: does the stamp's contract or theme describe the page in front of you? Name the largest gap, or say there is none.-On a redesign you also get the `before` screenshots. Add one answer: what did the old page do better? Name anything a visitor could do, read or find before that is harder now; if nothing, say so.+On a redesign you also get the `before` screenshots, and the content is fixed: never ask for copy, an action or a visual the old page did not have. Add one answer: what did the old page do better? Name anything a visitor could do, read or find before that is harder now; if nothing, say so. On a polish you get only the full pages at 1440, before and after: the layout was kept on purpose, so ask one thing, whether anything still reads as machine-made, in at most five findings.Close with one line naming what must not be diluted while fixing. Do not fix anything.diff --git a/skills/hallmark/references/review-hero.md b/skills/hallmark/references/review-hero.mdindex 1219814..5e63288 100644--- a/skills/hallmark/references/review-hero.md+++ b/skills/hallmark/references/review-hero.md@@ -13,4 +13,6 @@ Then at most five findings, one line each, worst first. Ask:- Does the type carry the theme at this size?- With the theme's picture: is this first screen as finished as its first screen, in a composition of its own?+On a redesign the page's content is fixed and what sits below the first screen is the old page, not yet rebuilt: neither is a finding. Never ask for copy, an action or a visual the page does not have; say in one line what the owner could supply.+What the theme file prescribes (its blooms, its control pair) or refuses is not a finding. Do not fix anything.diff --git a/skills/hallmark/scripts/sloplint-render.mjs b/skills/hallmark/scripts/sloplint-render.mjsindex 822a109..e329185 100644--- a/skills/hallmark/scripts/sloplint-render.mjs+++ b/skills/hallmark/scripts/sloplint-render.mjs@@ -118,6 +118,10 @@ export async function renderCheck(htmlFiles, metaIn) {try {const scriptErrors = [];page.on('pageerror', (e) => scriptErrors.push(String((e && e.message) || e).split('\n')[0]));+ const lost = new Set();+ const lostName = (u) => { try { const x = new URL(u); return x.protocol === 'file:' ? x.pathname.split('/').pop() : x.host; } catch { return String(u).slice(0, 40); } };+ 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 }));if (nav.e && !/timeout/i.test(nav.e.message)) throw nav.e;@@ -213,6 +217,7 @@ export async function renderCheck(htmlFiles, metaIn) {if (cut.words >= 40) findings.push({ gate: 'F25', grade: 'WARN', file, line: 1, evidence: `[375px] ${cut.words} words shown at 1440 are hidden on a phone (first: "${cut.first}")`, fix: 'If it matters, make it work on a phone; if it does not, cut it everywhere' });}if (scriptErrors.length) findings.push({ gate: 'render', grade: 'FAIL', file, line: 1, evidence: `a script threw on load: ${scriptErrors[0].slice(0, 90)}`, fix: 'Fix the script; a page that throws ships half-working' });+ if (lost.size) findings.push({ gate: 'render', grade: 'WARN', file, line: 1, evidence: `the shots show a fallback: fonts or stylesheets did not load (${[...lost].slice(0, 2).join(', ')})`, fix: 'Recapture when the host answers or the path is right; never review or sign off a fallback face' });} catch (e) {console.error(`render tier: failed on ${file}: ${e.message}`);failed.push({ file, message: e.message });diff --git a/skills/hallmark/scripts/sloplint.mjs b/skills/hallmark/scripts/sloplint.mjsindex 5fb288d..3e59422 100644--- a/skills/hallmark/scripts/sloplint.mjs+++ b/skills/hallmark/scripts/sloplint.mjs@@ -2097,7 +2097,7 @@ function check49(ctx) {if (t.close || t.selfClosing) continue;const cls = getAttr(t.attrs, 'class') || '';const clickable = t.name === 'button' || (t.name === 'a' && /btn|cta|button|nav/i.test(cls))- || /(^|\s)(btn|cta|button)(\s|$|__|--)/i.test(cls);+ || (/(^|\s)(btn|button)(\s|$|__|--)/i.test(cls) && !/^(section|header|footer|main|article|aside|nav|form|ul|ol)$/.test(t.name));if (!clickable) continue;const inner = innerOf(doc, i);if (!inner) continue;@@ -2348,8 +2348,13 @@ function checkCopyTell(ctx) {const prose = maskedProse(doc);const m = /\w\s--\s\w|[\u2014\u2013]|—|–|—|–/.exec(prose);if (m) report(19, 'FAIL', doc.file, doc.lineOf(m.index), `dash "${m[0]}" in copy`, 'A comma, a colon, a full stop or parentheses; never a dash');- const buzz = /\b(seamless(ly)?|robust|empower(s|ing)?|supercharge[sd]?|best[- ]in[- ]class|industry[- ]leading|mission[- ]critical|future[- ]proof(ed)?|unleash(es|ed|ing)?|elevate[sd]?|effortless(ly)?|unlock(s|ing)?|next[- ]generation|world[- ]class|cutting[- ]edge|streamline[sd]?|revolutioni[sz]e[sd]?|game[- ]chang(er|ing)|enterprise[- ]grade|quietly (trusted|in use)|built for the modern|in today's)\b/i.exec(prose);- if (buzz) report(19, 'FAIL', doc.file, doc.lineOf(buzz.index), `buzzword "${buzz[0]}"`, 'Say what the product does, in its own nouns');+ const seenBuzz = new Set();+ for (const buzz of prose.matchAll(new RegExp(/\b(seamless(ly)?|robust|empower(s|ing)?|supercharge[sd]?|best[- ]in[- ]class|industry[- ]leading|mission[- ]critical|future[- ]proof(ed)?|unleash(es|ed|ing)?|elevate[sd]?|effortless(ly)?|unlock(s|ing)?|next[- ]generation|world[- ]class|cutting[- ]edge|streamline[sd]?|revolutioni[sz]e[sd]?|game[- ]chang(er|ing)|enterprise[- ]grade|quietly (trusted|in use)|built for the modern|in today's)\b/.source, 'gi'))) {+ const word = buzz[0].toLowerCase();+ if (seenBuzz.has(word) || seenBuzz.size >= 8) continue;+ seenBuzz.add(word);+ report(19, 'FAIL', doc.file, doc.lineOf(buzz.index), `buzzword "${buzz[0]}"`, 'Say what the product does, in its own nouns');+ }const cadence = prose.match(/(^|[.!?]\s+)(not|no)\s+[a-z][^.!?\n]{0,40}[.]\s+(just|only|a|an)?\s*[a-z][^.!?\n]{0,40}[.]/gi) || [];if (cadence.length >= 3) report(19, 'FAIL', doc.file, doc.lineOf(prose.indexOf(cadence[0].trim()) || 0), `rebuttal cadence repeated ${cadence.length} times ("${trunc(cadence[0].trim(), 40)}")`, 'Once is voice; three times is a tic');}@@ -2956,6 +2961,14 @@ function check19Tells(ctx) {const m = re.exec(prose);if (m) tell(m.index, what, m[0]);}+ const stock = [];+ for (let i = 0; i < doc.tags.length; i++) {+ const t = doc.tags[i];+ if (t.close || t.name !== 'a') continue;+ const label = plainText(innerOf(doc, i)?.inner || '').replace(/[\u2192\u203a\u00bb]|->/g, '').trim();+ if (/^(learn more|read more|find out more|click here|more info|see more)$/i.test(label)) stock.push({ t, label });+ }+ if (stock.length >= 2) report(19, 'WARN', doc.file, stock[0].t.line, `stock link label "${stock[0].label}" x${stock.length}`, 'Say where each link goes: the thing it opens, in its own noun');for (let i = 0; i < doc.tags.length; i++) {const t = doc.tags[i];if (t.close || !/^h[1-6]$/.test(t.name)) continue;@@ -4078,7 +4091,12 @@ function wiringOf(src) {const w = { handlers: [], links: [], fields: [], hooks: [], ids: [], scripts: [] };const val = String.raw`("[^"]*"|'[^']*'|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})`;for (const m of body.matchAll(new RegExp(String.raw`(?<![\w-])(on[A-Z]\w*|on:[\w|]+|@[a-z][\w.:-]*|v-on:[\w.:-]+|on(?:click|submit|change|input|keydown|keyup|blur|focus))\s*=\s*` + val, 'g'))) w.handlers.push(`${m[1]}=${squash(m[2])}`);- for (const m of body.matchAll(new RegExp(String.raw`(?<![\w:-])(?:href|to|action)\s*=\s*` + val, 'g'))) { const v = squash(m[1]).replace(/^["']|["']$/g, '').replace(/^\.\//, ''); if (v && v !== '#') w.links.push(v); }+ for (const m of body.matchAll(new RegExp(String.raw`(?<![\w:-])(?:href|to|action)\s*=\s*` + val, 'g'))) {+ const tag = (/<([A-Za-z][\w.-]*)[^<]*$/.exec(body.slice(Math.max(0, m.index - 600), m.index)) || [])[1] || '';+ if (/^(link|base|use|image|script|style)$/i.test(tag)) continue;+ const v = squash(m[1]).replace(/^["']|["']$/g, '').replace(/^\.\//, '');+ if (v && v !== '#') w.links.push(v);+ }for (const m of body.matchAll(/(?<![\w-])name\s*=\s*["']([^"']+)["']/g)) {const tag = (/<([A-Za-z][\w.-]*)[^<]*$/.exec(body.slice(Math.max(0, m.index - 600), m.index)) || [])[1] || '';if (!/^(meta|slot|iframe|param|a|map|object|link)$/i.test(tag)) w.fields.push(m[1]);@@ -4146,7 +4164,7 @@ if (opts.kept) {const outside = Object.keys(was.files || {}).filter((f) => !(f in now.files) && existsSync(resolve(f)));if (was.files) was.wiring = unionWiring(Object.entries(was.files).filter(([f]) => !outside.includes(f)).map(([, w]) => w));const stamps = contexts.map(([, c]) => c.stampText).join('\n');- const allowed = [...stamps.matchAll(/\/\*\s*Hallmark\s*·\s*dropped\s+([^·*]+?)\s*·\s*([^*]+?)\s*\*\//gi)].filter((m) => m[2].trim().length >= 12).flatMap((m) => m[1].split(',').map((t) => t.trim().replace(/^[`"']|[`"']$/g, '').toLowerCase()).filter(Boolean));+ const allowed = [...stamps.matchAll(/\/\*\s*Hallmark\s*·\s*(dropped|reworded)\s+([^·*]+?)\s*·\s*([^*]+?)\s*\*\//gi)].filter((m) => m[3].trim().length >= 12).flatMap((m) => (m[1].toLowerCase() === 'reworded' ? [...m[2].matchAll(/"([^"]+)"/g)].map((q) => q[1]) : m[2].split(',')).map((t) => t.trim().replace(/^[`"']|[`"']$/g, '').toLowerCase()).filter(Boolean));const acked = {};const gone = (a, b, cat) => (a || []).filter((x) => {if ((b || []).includes(x)) return false;@@ -4180,7 +4198,7 @@ if (opts.kept) {wordsWas += b.words || 0; wordsNow += a.words || 0;}const list = (set, n = 8) => { const a = [...set]; return a.slice(0, n).map((x) => trunc(x, 48)).join(', ') + (a.length > n ? ` and ${a.length - n} more` : ''); };- const fix = 'Restore each one, or record it in the stamp: /* Hallmark · dropped <item>, <item> · <the reason, in the user\'s words> */';+ const fix = 'Restore each one, or record it in the stamp: /* Hallmark · dropped <item>, <item> · <the reason> */';total['script hooks'] = new Set(); hard['script hooks'] = new Set();for (const [f, h] of Object.entries(was.scripts || {})) {if (outside.includes(f)) continue;@@ -4207,7 +4225,7 @@ if (opts.kept) {}}for (const [k, set] of Object.entries(hard)) if (set.size) report('kept', 'FAIL', SNAP, 1, k === 'script hooks' ? `a script still queries what its page no longer has: ${list(set)}` : k === 'forms' ? `a form lost what it had before: ${list(set)}` : `${k} the page had before and no longer has: ${list(set)}`, k === 'script hooks' ? 'Keep the ids, classes and attributes scripts query, or change the script with the markup' : fix);- for (const [k, set] of Object.entries(soft)) if (set.size) report('kept', 'WARN', SNAP, 1, `${k} gone or reworded since the before record: ${list(set)}`, 'Confirm each was meant to go, restore it, or record it as dropped in the stamp');+ for (const [k, set] of Object.entries(soft)) if (set.size) report('kept', 'WARN', SNAP, 1, `${k} gone or reworded since the before record: ${list(set)}`, 'Restore it, or record it in the stamp: /* Hallmark · reworded "<old>" to "<new>" · <the gate that named it> */ or dropped <item> · <the reason>');if (wordsWas > 80 && wordsNow < wordsWas * 0.6) report('kept', 'WARN', SNAP, 1, `the pages hold ${wordsNow} words where they held ${wordsWas}`, 'Check that no section of content was dropped');if (skipped.length) report('kept', 'WARN', SNAP, 1, `not compared, because this run did not render them: ${list(skipped, 4)}`, 'Render the same pages or URLs the before record holds');if (outside.length) report('kept', 'WARN', SNAP, 1, `not compared, because this run did not read them: ${list(outside, 4)}`, 'Run --kept on the same target as --before');