Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS
A dashboard test's lessons: Tailwind projects get working tokens, the kept check reads React apps
Youssefcf153e7de188
diff --git a/skills/hallmark/SKILL.md b/skills/hallmark/SKILL.mdindex 3d02634..2d9b25e 100644--- a/skills/hallmark/SKILL.md+++ b/skills/hallmark/SKILL.md@@ -29,7 +29,7 @@ Binds every output in every harness, and none of it is waivable. Read nothing el12. The hero's headline, one sentence and primary action are all visible at 1280 x 800 without scrolling. (44b)13. About 80 words on any one screen; the hero's text is the headline, one sentence and its actions. (58)14. The container is capped and centred: at 1920 the gutters grow, the measure and the grids do not. (44d)-15. The first non-empty line of emitted CSS is the Hallmark stamp, then the critique line, then any waivers. (20)+15. The first non-empty line of the CSS source is the Hallmark stamp, then the critique line, then any waivers. (20)16. If Node is available, run `node <skill-dir>/scripts/sloplint.mjs <output> --render` before handing back. Fix every `FAIL`; fix or waive every `REFLEX`.Above the Floor, a **Reflex** gate is a default a model falls into, which a build with a real reason may waive on the record, and a **Finish** check is craft detail, answered, never blocking. Tiers, grades and waiver syntax: [`references/gates.md`](references/gates.md) § 1 and § 2.@@ -128,7 +128,7 @@ On signal 9, `comp.md` runs here.Emit code that satisfies the theme and the shape. Always:-- **Start from the scaffold.** `node <skill-dir>/scripts/theme.mjs scaffold <slug>` (with the deal's `--dealt`; `--custom` on a derived run) writes `tokens.css` (the theme's tokens and the shared scale) and `base.css` (the rules the Floor already decided), and prints the stamp skeleton and the two imports that open the page's stylesheet. Fill the stamp and write only the page.+- **Start from the scaffold.** `node <skill-dir>/scripts/theme.mjs scaffold <slug>` (with the deal's `--dealt`; `--custom` on a derived run) writes `tokens.css` (the theme's tokens and the shared scale) and `base.css` (the rules the Floor already decided) beside the project's stylesheet, and prints the stamp skeleton and the two imports that open it. Fill the stamp and write only the page.- **Read [`references/patterns.md`](references/patterns.md) once:** controls in all eight states, a slot, a missing fact, a form that posts nowhere yet, one reveal, figures that compare, written to pass the gates. Take their shape, never their copy.- **Hero first.** Write the nav and the hero, run `node <skill-dir>/scripts/sloplint.mjs <file> --render --stage hero`, then the hero review in fresh context (`gates.md` § 6). Build the sections only once the hero ships.- **One idea per screen.** Hero: headline (seven words or fewer, 50 characters or fewer), one sentence (twelve words or fewer), one or two actions. A section: a heading of three to five words, at most one line, then its object (a slot, a figure, a drawn thing, a list of four or fewer, a table of five rows or fewer). Four to eight sections, footer included; 450 visible words at most, fewer when the brief has less to say. Never pad to a count.@@ -140,13 +140,12 @@ Emit code that satisfies the theme and the shape. Always:- **States and motion.** Eight states on every interactive element; `transform` and `opacity` only; at most one orchestrated reveal per page, none where the theme keeps still, 0.4 to 0.8s, visible by default; exits at 60 to 75% of the enter; nothing bounces.- **Browser surfaces.** Keep the scaffold's selection, caret, scrollbar and focus rules; tabular numerals wherever figures compare.- **Stamp.** Line 1 of CSS is the scaffold's stamp skeleton with every field filled, then the critique line (`gates.md` § 3), any `waive` and `answered` lines, and a custom run's direction contract. Everything the linter reads sits in the first 40 lines.-- **`tokens.css`** is the scaffold's, at the project root, imported by the page; on a `design.md` project, refresh its `## Exports` ([`references/export-formats.md`](references/export-formats.md)).-- **Existing stylesheets are append-only:** keep the Tailwind directives where they are, import `tokens.css` and `base.css` below them, reuse the project's own token names; rewrite only on request.+- **Existing stylesheets are append-only:** the two imports go right after the file's last `@import`, never below a rule or a `@tailwind` directive, where they are dropped; reuse the project's own token names ([`references/export-formats.md`](references/export-formats.md), which also refreshes a `design.md`'s `## Exports`); rewrite only on request.- **Log.** `node <skill-dir>/scripts/theme.mjs log --entry '<json>'` puts the build atop `.hallmark/log.json`: `shape`, `theme`, `axes`, `hero`, `nav`, `footer`, `enrichment`, `entry` (the section opening), `fingerprint` (`Hanging|Asymmetric spans|Hairline|Outlined|Margin-aligned|None`), `signature`, `waived`, `brief`; it names any field you left out.### 7. Sweep-1. `node <skill-dir>/scripts/sloplint.mjs <files> --genre <genre> --render` (add `--scope component` on a component; in a framework project with a dev server running, add `--url http://localhost:<port>/<route>`). Fix every FAIL, re-run until clean. The render tier writes the screenshots; never run Chrome by hand.+1. `node <skill-dir>/scripts/sloplint.mjs <files> --genre <genre> --render` (`--scope component` or `--scope app` where it applies; in a framework project, `--url http://localhost:<port>/<route>` with the dev server running). Fix every FAIL, re-run until clean. The render tier writes the screenshots; never run Chrome by hand.2. Load [`references/gates.md`](references/gates.md) § 5 and walk the J and R/J gates. Confirm or dismiss every WARN. Fix every open Floor finding; fix or waive every Reflex one; answer every Finish one.3. The finish review in fresh context (`gates.md` § 6): hand the reviewer its brief file and its inputs, act on its first word (`recapture`, `rebuild`, `fix`, `ship`), and score the fixes yourself.4. Close with the material ask: every slot, its size and what belongs there, then the one piece of material that would most improve the page.@@ -156,4 +155,4 @@ Verification is budgeted: one batched inspection, one fix batch, at most one con## Branches-[`references/flow.md`](references/flow.md) holds them; read only the section you are in: component scope, app screens, signal 8 (the archive builds, Hallmark sweeps), comp before build, the Codex and OpenCode levers, the pre-flight edge cases, **fast mode** (`--fast`, or a brief that says quick, rough or prototype) and the edit-time hook. In an existing project, name the files you will touch first, and never delete a route or a component tree without a file-level plan the user approved.+[`references/flow.md`](references/flow.md) holds them; read only the section you are in: component scope, app screens, signal 8, comp before build, the Codex and OpenCode levers, the pre-flight edge cases, **fast mode** (`--fast`, or a brief that says quick, rough or prototype) and the edit-time hook. In an existing project, name the files you will touch first, and never delete a route or a component tree without a file-level plan the user approved.diff --git a/skills/hallmark/references/craft.md b/skills/hallmark/references/craft.mdindex 7b950dd..a929c2a 100644--- a/skills/hallmark/references/craft.md+++ b/skills/hallmark/references/craft.md@@ -80,7 +80,7 @@ Every posture, every hero:- **Only `transform` and `opacity`** (10). Blur, `clip-path`, mask and shadow may join when they stay smooth on the element alone.- **Three easings, tokenised:** `--ease-out: cubic-bezier(0.16, 1, 0.3, 1)` for things arriving, `--ease-in: cubic-bezier(0.7, 0, 0.84, 0)` for things leaving, `--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1)` for toggles. The browser's `ease` and `linear` (outside progress) read as uncrafted; overshoot on UI state is dated (12).- **Three durations:** `--dur-micro` 120ms (press, tick, colour), `--dur-short` 220ms (hover, tooltip, menu), `--dur-long` 420ms (modal, drawer, accordion, page reveal). Exits run 60 to 75% of the enter. Stagger 30 to 50ms between rows, 60 to 100ms between blocks, 500ms of stagger at most, one-shot, never re-fired on scroll.-- **One reveal per page**, staggered by a `--i` custom property, the whole settle 0.4 to 0.8s, and the content is visible without it (62): scope the hidden state to a `.js` class the script adds, or animate from visible with `@starting-style`. Reduced motion collapses spatial motion to a 150ms opacity crossfade and keeps functional loaders running.+- **One reveal per page**, staggered by a `--i` custom property, the whole settle 0.4 to 0.8s, and the content is visible without it (62): scope the hidden state to a `.js` class the script adds, or animate from visible with `@starting-style`. Under reduced motion the scaffold's base ends every transition and animation at once; what should still run (a loader, a 150ms fade) takes `.keep-motion`.- **Scroll:** IntersectionObserver for reveals and for any state that flips at a threshold; a passive scroll listener, throttled to one read per frame, only where direction matters (a bar that hides on the way down); reveal once; scroll-scrubbed motion exists only as the named patterns in `scroll-choreography.md`, one per page (F8).- **State:** hover is one signal (11) and raises contrast against the rest state: a colour step, or a `translateY(-1px)` lift at micro on a control that keeps its colour, active back to 0; menus `--ease-out` open and `--ease-in` close with the Popover API; modals scale 0.96 to 1 with a backdrop fade over `--dur-long` using `<dialog>` and `inert`; accordions animate `grid-template-rows: 0fr` to `1fr`; tooltips delay 800 to 1000ms on hover and 0ms on focus (17); focus rings never animate (15).- **Never:** parallax, custom cursors, cursor followers, a marquee that will not pause on hover and focus (18), `will-change` on a whole class, an image that scales or rotates on hover (11), a pulsing dot (a live dot holds still, or blinks once when its value updates), a caret that blinks past five beats, and infinite loops, except a loader, one E6 loop (4s or less a cycle) and one ambient loop the theme declares as its material (8s or slower); every loop stops under reduced motion and while off-screen, and one that runs past 5 seconds carries a visible pause control (WCAG 2.2.2).@@ -158,7 +158,7 @@ The last 2% that separates set from generated. sloplint's F-checks report most o- **Inputs.** Constant border width across states; the focus ring is an `outline` with an offset (inset on inputs), never a border change; disabled by three channels together, `opacity: 0.55`, `cursor: not-allowed` and the native `disabled` attribute (39a); reserve `min-height: 1lh` under the field for helper text (F14); 16px on mobile; a `name`, `autocomplete`, the matching `type` and `inputmode` on every field, with a `<label>` or `aria-label`; paste never blocked; submit enabled until the request starts, and a failed submit focuses the first invalid field; an explicit `type` on every `<button>`; a custom chevron on selects; native checkbox, radio and toggle styled by state in CSS, never toggled by script.- **Type finish.** Hanging punctuation on pull quotes (`::before` with the opening quote translated -100%). Tabular numerals on anything that columns (F6). Balanced heads, pretty body (F3). A testimonial exists only when the user supplied it (46a); its card bottom-aligns the attribution, and the avatar is the real person or nothing.- **Pricing.** Emphasise a tier with its button and a word, never a different card colour; align buttons across tiers by pushing them to the bottom; a taller featured tier is a grid sibling on explicit rows (`grid-template-rows: <gap> 1fr <gap>`, the featured card spanning all rows), never negative margins.-- **Tables.** Sentence-case heads that never wrap, horizontal rules only, no outer border, no card around a table, full width, a scrolling wrapper on narrow screens.+- **Tables.** Sentence-case heads that never wrap, horizontal rules only, no outer border, no card around a table, full width. On a phone the column that names the row and the one that acts on it stay in view (F25): restack each row as a labelled block, or pin the first column and let the rest scroll. A bare scrolling wrapper hides the amount and the action.- **Responsive finish.** Body-adjacent UI (meta, nav links, controls, checkboxes) renders larger on mobile and steps down at 60rem; display heads are exempt; body never drops below 16px on a phone. Every desktop sidebar or filter column collapses into a menu or disclosure. Container queries for widgets whose layout depends on their box, placed on the closest wrapper.- **Browser surfaces** (F16). The scaffold's `base.css` themes the selection, the caret, the scrollbar, the focus ring and the underline; keep them, and set numerals tabular wherever they compare. The parts you did not draw still carry the design.- **Nav.** One line, 56 to 80px tall; a sticky one taller than the scaffold's `scroll-padding-top` raises it so anchors and focus land clear. Text-only links in the top bar, one weight across default, hover and active (state is a colour or a soft background, never a primary fill); a tab row scrolls sideways rather than wrapping; under 60rem, links that no longer fit go behind a menu, while two or three short ones that fit stay in the bar; the logo is a link home with an `aria-label`.diff --git a/skills/hallmark/references/design-md.md b/skills/hallmark/references/design-md.mdindex 5dde885..b776af5 100644--- a/skills/hallmark/references/design-md.md+++ b/skills/hallmark/references/design-md.md@@ -1,6 +1,6 @@# design.md: the locked system-Loaded when the user asks to lock the current build's system into a portable file, or when a redesign reaches more than one page (`redesign.md`). A single build never writes `design.md` on its own; `tokens.css` already makes every build portable, and the Picks block offers the lock in one line.+Loaded when the user asks to lock the current build's system into a portable file, or when a redesign reaches more than one page (`redesign.md`), after the scaffold has run: the file is written from `tokens.css`, never from the theme file. A single build never writes `design.md` on its own; `tokens.css` already makes every build portable, and the Picks block offers the lock in one line.## Triggers@@ -20,7 +20,7 @@ The locked system. Every Hallmark run reads this first and pages share it. Chang## System- Genre: <editorial | modern-minimal | atmospheric | playful>-- Shape of the first page: <macrostructure>+- Shape of the first page: <macrostructure, or app screen>- Theme: <catalog name, or custom (vibe: "<4 to 8 words>")>- Axes: <paper band>/<display class>/<accent band> · posture: <posture>@@ -35,14 +35,14 @@ The locked system. Every Hallmark run reads this first and pages share it. Chang--radius-card: <px>; --radius-pill: <px>; --rule-hair: <px>; --shadow-card: <value or none>;}```-The spacing scale, the 1.25 type scale, the easings and the durations are the scaffold's and live in `tokens.css`.+The spacing scale, the type scale, the easings and the durations are the scaffold's and live in `tokens.css`.## Controls- Primary: <fill> · <radius> · <height>- Secondary: <outline or text> · same radius and height## Motion-- Character: <still | severe | brisk | calm>; one reveal at most; reduced motion is a 150ms crossfade.+- Character: <still | severe | brisk | calm>; one reveal at most; under reduced motion everything ends at once.## Exports`tokens.css` in this project. Tailwind, DTCG or shadcn blocks are added here on request, per `export-formats.md`.diff --git a/skills/hallmark/references/export-formats.md b/skills/hallmark/references/export-formats.mdindex 14a28c9..0a4ac45 100644--- a/skills/hallmark/references/export-formats.md+++ b/skills/hallmark/references/export-formats.md@@ -7,7 +7,7 @@ Loaded when a `design.md` exists and its `## Exports` need refreshing, or when t| Family | Tokens || --- | --- || Colour | `--color-paper`, `-paper-2`, `-paper-3`, `-ink`, `-ink-2`, `-muted`, `-rule` (and `-rule-2` where a theme sets one), `-accent`, `-accent-ink`, `-focus`, `-error`, `-success`; `-field` under a Committed posture, `-accent-2` where a theme names a second ink |-| Type | `--font-display`, `--font-body`, `--font-outlier`; `--text-xs` to `--text-3xl` on a 1.25 ratio from 16px, `--text-display-s`, `--text-display`; `--tracking-display` |+| Type | `--font-display`, `--font-body`, `--font-outlier`; `--text-xs` to `--text-3xl` on a 1.25 ratio from 16px, `--text-display-s`, `--text-display` (an app screen: a fixed 1.2 ratio, no display steps); `--tracking-display` || Space | `--space-3xs` (2px) to `--space-4xl` (144px), ten steps; `--container`, `--gutter`, `--gap-columns`, `--section-gap-s`, `--section-gap`, `--section-gap-l` || Shape | `--radius-card`, `--radius-pill`, `--rule-hair`, `--shadow-card` || Motion | `--ease-out`, `--ease-in`, `--ease-in-out`; `--dur-micro` 120ms, `--dur-short` 220ms, `--dur-long` 420ms |@@ -17,22 +17,30 @@ A page that needs another token names it by role and declares it in `tokens.css`## `tokens.css` in a project-The page's stylesheet imports it before any rule: `@import "./tokens.css";` (CSS drops an `@import` that follows a rule, and the tokens vanish without an error). In an existing entry stylesheet (`app/globals.css`, `src/index.css`), keep `@import "tailwindcss"` or the `@tailwind` directives exactly where they are, put the tokens import after them, and add Hallmark's base rules below. Where the project already names its tokens (`--background`, a Tailwind `@theme`), map Hallmark's roles onto those names rather than adding a parallel set. Replace the file only when the user asks for a full takeover.+The scaffold writes `tokens.css` and `base.css` beside the project's entry stylesheet (`src/index.css`, `app/globals.css`; `--dir` names another folder) and prints the two imports that fit it. They go right after the file's last `@import`, never below a rule: CSS drops an `@import` that follows one, and the tokens vanish without an error. Where the project already names its tokens (`--background`, a Tailwind `@theme`), map Hallmark's roles onto those names rather than adding a parallel set. Replace the file only when the user asks for a full takeover.## Tailwind v4-Move the declarations into `@theme static` (static, so Tailwind emits every one as a variable on `:root`, used by a utility or not), so the page's `var()` references keep working and the utilities appear (`bg-paper`, `text-ink`, `font-display`, `rounded-card`, `ease-out`). Tailwind reads spacing as `--spacing-*`, so the scale goes in under that name and `tokens.css` keeps `--space-*` as aliases; the tokens Tailwind has no namespace for stay in `:root`.+Where the entry stylesheet imports Tailwind 4, the scaffold writes `tokens.css` in two blocks, and the imports follow `@import "tailwindcss"`:```css@import "tailwindcss";-@theme static {- --color-paper: oklch(96.5% 0.008 50);- --spacing-lg: 24px;-}-:root { --space-lg: var(--spacing-lg); --dur-short: 220ms; --z-modal: 400; --section-gap: 144px; }+@import "./tokens.css";+@import "./base.css" layer(base);```-Every `--color-*`, `--font-*`, `--text-*`, `--tracking-*`, `--radius-*`, `--shadow-*` and `--ease-*` token goes into `@theme static` unchanged. Tailwind v3: the same names under `theme.extend` in `tailwind.config`, each value a `var()` of the token.+```css+@theme static { --color-paper: oklch(96.5% 0.008 50); --font-display: "Fraunces", serif; --text-lg: 1.25rem; --radius-card: 4px; }+:root { --space-lg: 24px; --dur-short: 220ms; --z-modal: 400; --section-gap: 144px; }+```++- **`@theme static`** holds every `--color-*`, `--font-*`, `--text-*`, `--tracking-*`, `--radius-*`, `--shadow-*` and `--ease-*` token, so each is a utility (`bg-paper`, `text-ink`, `font-display`, `rounded-card`) and, being static, still a variable for hand-written CSS. Everything else stays in `:root`.+- **Never `--spacing-<name>`.** Tailwind sizes `w-`, `max-w-`, `p-` and `gap-` from that namespace, so `--spacing-xl: 40px` turns `max-w-xl` into 40px. The space scale needs no mapping: every step but 2px is a multiple of Tailwind's 4px unit (`--space-lg` is `p-6`, `--space-xl` is `p-10`, `--space-2xl` is `p-16`).+- **Nine names are Tailwind's own:** `--text-xs`, `-sm`, `-lg`, `-xl`, `-2xl`, `-3xl` and the three `--ease-*`. The scaffold's values replace Tailwind's, so `text-lg` and `ease-out` change wherever the project uses them. On a new project, a restyle or a full redesign that is the system arriving. On one new page in a project whose other pages must not move, take those nine out of `@theme` and declare them on the page's root element.+- **`base.css` goes in the base layer.** Unlayered, its element rules (`a { color: inherit }`, `h1 { max-width: 20ch }`) outrank every utility, because Tailwind's utilities sit in a layer.+- **The stamp is read from the source.** Tailwind drops comments from what it emits; sloplint reads the stylesheet you wrote.++Tailwind v3 (`@tailwind` directives): `tokens.css` stays one `:root` block, the stamp and both imports go above the directives (below them they are dropped), `base.css` with `layer(base)` so it lands after Preflight and under the utilities. Utilities on request: the same names under `theme.extend` in `tailwind.config`, each value a `var()` of the token.## DTCG `tokens.json`diff --git a/skills/hallmark/references/flow.md b/skills/hallmark/references/flow.mdindex f849c34..0c64903 100644--- a/skills/hallmark/references/flow.md+++ b/skills/hallmark/references/flow.md@@ -50,7 +50,7 @@ A dashboard, an admin, a settings page, a tool: a screen someone works in ratherWhat takes their place:-- **The theme lends its palette, its faces, its radius and one signature move,** never its layout, navigation or ornament. One family is often right, and a familiar sans or a system face is allowed here; the type scale is fixed, at a ratio of 1.125 to 1.2, with no fluid heads and no display face on labels, buttons or data.+- **The theme lends its palette, its faces, its radius and one signature move,** never its layout, navigation or ornament. One family is often right, and a familiar sans or a system face is allowed here; the type scale is fixed, at a ratio of 1.125 to 1.2, with no fluid heads and no display face on labels, buttons or data (`theme.mjs scaffold --scope app` writes that scale and a stamp without the page's fields).- **Colour is restrained.** The accent marks the primary action, the current selection and state, nothing else; a second neutral carries sidebars, toolbars and panels.- **The shell is the project's own.** A new one is a top bar; a sidebar is earned by more than about seven destinations, never reached for by reflex, and it collapses to a menu under 60rem. Standard patterns (tabs, breadcrumbs, a command palette) beat invented ones, and a modal is the last answer, after inline editing and disclosure.- **Density is the design.** Controls 32 to 40px with a 44px hit target, one container recipe, tables before cards (a table may run wider than any prose measure), and `craft.md` § 9 for controls, inputs, tables and stat rows.@@ -60,7 +60,7 @@ What takes their place:- **Figures are the product's own.** A stat is a figure and its label in tabular numerals; no icon tile, no gradient, no trend arrow nobody measured (46a).- **The signature** is still owed: the one object this tool is known by (the ledger, the timeline, the queue), not a greeting above four stat cards.-The Picks block drops Shape, Hero and Sections and names the screen instead: `Screen · transactions table with an inline filter row · states: loading, empty, error`. The stamp says `shape: app screen`, which sloplint and the edit-time hook read as the app scope, and the log entry carries `scope: app`.+The load shrinks with the scope: no shape or archetype file, and of `craft.md` not § 4, § 7 or § 8. The Picks block drops Shape, Hero and Sections and names the screen instead: `Screen · transactions table with an inline filter row · states: loading, empty, error`. The stamp says `shape: app screen`, which sloplint and the edit-time hook read as the app scope, and the log entry carries `scope: app`.## The sweep, for a page Hallmark did not builddiff --git a/skills/hallmark/references/gates.md b/skills/hallmark/references/gates.mdindex 57d6932..2cb591f 100644--- a/skills/hallmark/references/gates.md+++ b/skills/hallmark/references/gates.md@@ -163,7 +163,7 @@ One line each. `a`/`b` clauses share a number and carry their own tier. Genre no### Finish (F-checks, never block)-F1 straight quotes in prose · F2 `...` for an ellipsis · F3 no `text-wrap: balance` on display heads · F4 more than one filled-primary button recipe on a page (dialogs count as their own page), or two filled buttons side by side · F5 an icon in a coloured coin · F6 display-size figures without tabular numerals · F7 one container recipe stamped on six or more selectors · F8 more than one scroll-choreography pattern · F9 fake-human avatar hotlinks (this half is a FAIL) or person-keyword stock URLs · F10 a Lottie where CSS or SVG would do · F11 a highlighter band at the baseline instead of behind the x-height, or an underline thicker than 2px or offset more than 0.25em · F12 a flex row of unequal heights without `align-items: center` · F13 the outlier face carrying more than one role · F14 a helper-text slot with no reserved `min-height: 1lh` · F15 page invariants broken: more than one primary button style, more than one container width, more than one column gap below the hero, more than one radius per nesting level, or more centred heading groups than left-aligned ones · F16 browser surfaces unthemed: no `::selection`, no `caret-color`, no `scrollbar-color` on a page with a committed palette · F17 a text block squeezed into a sliver at 1440 (under about 16 characters wide over four lines or more), usually a grid placement gone wide (render) · F18 a `data-slot` that renders under 40px in either dimension at 1440, collapsed by a percentage width inside a shrink-to-fit parent (render) · F19 more than three font weights in running use, display and body together (render) · F20 a grid or a wrapping row that leaves one item alone on its last row under a fuller row (render) · F21 a heading level skipped (an h2 followed by an h4) · F22 justified text without `hyphens: auto` · F23 a document without `lang`, a `<title>` or a meta description · F24 a hairline border under a wide soft shadow (24px or more of blur left after a negative spread) on one surface · F25 content a phone never gets: about 40 words or more shown at 1440 and hidden at 375, navigation aside (render).+F1 straight quotes in prose · F2 `...` for an ellipsis · F3 no `text-wrap: balance` on display heads · F4 more than one filled-primary button recipe on a page (dialogs count as their own page), or two filled buttons side by side · F5 an icon in a coloured coin · F6 display-size figures without tabular numerals · F7 one container recipe stamped on six or more selectors · F8 more than one scroll-choreography pattern · F9 fake-human avatar hotlinks (this half is a FAIL) or person-keyword stock URLs · F10 a Lottie where CSS or SVG would do · F11 a highlighter band at the baseline instead of behind the x-height, or an underline thicker than 2px or offset more than 0.25em · F12 a flex row of unequal heights without `align-items: center` · F13 the outlier face carrying more than one role · F14 a helper-text slot with no reserved `min-height: 1lh` · F15 page invariants broken: more than one primary button style, more than one container width, more than one column gap below the hero, more than one radius per nesting level, or more centred heading groups than left-aligned ones · F16 browser surfaces unthemed: no `::selection`, no `caret-color`, no `scrollbar-color` on a page with a committed palette · F17 a text block squeezed into a sliver at 1440 (under about 16 characters wide over four lines or more), usually a grid placement gone wide (render) · F18 a `data-slot` that renders under 40px in either dimension at 1440, collapsed by a percentage width inside a shrink-to-fit parent (render) · F19 more than three font weights in running use, display and body together (render) · F20 a grid or a wrapping row that leaves one item alone on its last row under a fuller row (render) · F21 a heading level skipped (an h2 followed by an h4) · F22 justified text without `hyphens: auto` · F23 a document without `lang`, a `<title>` or a meta description · F24 a hairline border under a wide soft shadow (24px or more of blur left after a negative spread) on one surface · F25 content a phone never gets: about 40 words or more shown at 1440 and hidden at 375, navigation aside, or a table that opens with two or more columns off-screen (render).## 5. Judged clauses@@ -213,7 +213,7 @@ 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, 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.+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 or component source, 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. `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`.diff --git a/skills/hallmark/references/redesign.md b/skills/hallmark/references/redesign.mdindex 9347839..9ee7612 100644--- a/skills/hallmark/references/redesign.md+++ b/skills/hallmark/references/redesign.md@@ -4,15 +4,15 @@ 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. 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 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; one a gate doubts (a trend nobody measured, 46a) stays and is named there. 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. A prop the Floor empties (an emoji passed as an icon) may go with it, named in the handoff. A state the screen has no logic for (a failed load, an undo) is listed for the owner, never built.- **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-How far the run goes. The user's words pick it; otherwise the project does, and the Picks block says which. Between two depths, take the lighter: a redesign that kept too much is one message from going further, and one that replaced too much has to be undone. The depths do not blend: a polish that finds the concept wrong says so and recommends the deeper run, it never smuggles one in.+How far the run goes. The user's words pick it, on an app as on a page; where they name no depth the project does, and the Picks block says which. Where the words fit two depths, take the lighter: a redesign that kept too much is one message from going further, and one that replaced too much has to be undone. The depths do not blend: a polish that finds the concept wrong says so and recommends the deeper run, it never smuggles one in.| Depth | Stays | Changes | Picked by || --- | --- | --- | --- |@@ -20,11 +20,13 @@ How far the run goes. The user's words pick it; otherwise the project does, and| **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 |+**Full depth on an app screen** recomposes each screen inside the shell it has: what leads, and how the figures, tables and forms are arranged (`flow.md` § App screens). Routes, destinations and each component's logic stay; there is no hero stage and no hero review.+*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 from the page as Step 1 would from a brief, 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 and record through `--url`; the linter does not render the empty shell `index.html` from disk. 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:```@@ -51,7 +53,7 @@ The Picks block opens with four rows of its own, and nothing is deleted until th- **Redesign** · restyle · 3 pages (/, /pricing, /docs)- **Before** · Floor 14 FAIL · Reflex 9 · a centred template in a stock indigo; the pricing table is clear and stays- **Keeps** · every link, field and handler · the green and the brand face · the pricing table-- **Files** · edit: app/page.tsx, app/pricing/page.tsx, app/globals.css · create: tokens.css, base.css · delete: none+- **Files** · edit: app/page.tsx, app/pricing/page.tsx, app/globals.css · create: app/tokens.css, app/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. 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.@@ -59,9 +61,9 @@ Then the build rows the depth reaches: Theme at restyle and full (dealt, `brand`## 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.-- **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.+- **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. In app scope those gates are skipped, so the handoff's Layout row comes from the read and the review. A theme's own composition rules (its do-nots, the dials that vary between pages) yield to a kept layout: the theme lends its system, and every page takes one dial set.+- **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); add `--scope app` for app screens. It writes `tokens.css` and `base.css` beside the project's stylesheet and prints the imports that fit it (`export-formats.md` has the Tailwind and shadcn names). 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 once the scaffold has run (`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. 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.## Afterdiff --git a/skills/hallmark/references/review-finish.md b/skills/hallmark/references/review-finish.mdindex f44e603..ad2f90e 100644--- a/skills/hallmark/references/review-finish.md+++ b/skills/hallmark/references/review-finish.md@@ -1,6 +1,6 @@# Finish review-You are reviewing a built page against a fixed list. You did not build it and will not be told why anything is the way it is. Read the page, not the intent. Your inputs, and nothing else: the screenshots the render tier wrote (the folds at 1280 x 800, 1440 x 900 and 1920 x 1080, the full page at 1440 and at 375), the page's HTML, the direction contract or theme line from the stamp, on a theme build the theme's picture, the hero review's findings with how each was settled, and `gates.md` § 4. Look at the screenshots first; open the HTML only to quote copy or to locate a finding; the linter has already read the CSS. Batch your reads; stop reading by the tenth turn and write.+You are reviewing a built page against a fixed list. You did not build it and will not be told why anything is the way it is. Read the page, not the intent. Your inputs, and nothing else: the screenshots the render tier wrote (the folds at 1280 x 800, 1440 x 900 and 1920 x 1080, the full page at 1440 and at 375), the page's HTML or component source, the direction contract or theme line from the stamp, on a theme build the theme's picture, the hero review's findings with how each was settled, and `gates.md` § 4. Look at the screenshots first; open the HTML only to quote copy or to locate a finding; the linter has already read the CSS. Batch your reads; stop reading by the tenth turn and write.First line: one of `recapture` (a screenshot is missing, blank or shows the wrong thing; list what to recapture and stop), `rebuild` (the first viewport fails the contract or the theme wholesale), `fix` (findings follow), `ship` (nothing owed).@@ -10,4 +10,6 @@ Then one answer to the question no gate can: does the stamp's contract or themeOn 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.+On an app screen (the stamp says `shape: app screen`) there is no hero, fold or section rhythm to judge, and the gates `flow.md` § App screens skips are not findings. Read the full screens at 1440 and 375 and ask what someone fluent in the category would: is the hierarchy clear, is the density even, does every control and table work on a phone, are the states there.+Close with one line naming what must not be diluted while fixing. Do not fix anything.diff --git a/skills/hallmark/scripts/sloplint-render.mjs b/skills/hallmark/scripts/sloplint-render.mjsindex 0a8d967..9e8c19f 100644--- a/skills/hallmark/scripts/sloplint-render.mjs+++ b/skills/hallmark/scripts/sloplint-render.mjs@@ -125,7 +125,7 @@ export async function renderCheck(htmlFiles, metaIn) {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;- if (nav.r && isUrl(file) && !nav.r.ok()) throw new Error(`HTTP ${nav.r.status()} from ${file}`);+ 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 () => {document.documentElement.classList.add('shot');for (const el of [document.documentElement, document.body]) if (el) el.style.setProperty('scroll-behavior', 'auto', 'important');@@ -212,9 +212,11 @@ export async function renderCheck(htmlFiles, metaIn) {const t = flat(el.textContent);return t.length > 12 && !shown.includes(t);});- return { words: gone.reduce((n, el) => n + flat(el.textContent).split(' ').length, 0), first: gone[0] ? flat(gone[0].textContent).slice(0, 36) : '' };- }).catch(() => ({ words: 0 }));+ const off = [...document.querySelectorAll('table')].flatMap((t) => (t.rows[0] ? [...t.rows[0].cells] : [])).filter((el) => { const r = el.getBoundingClientRect(); return r.width > 1 && r.height > 1 && r.left >= window.innerWidth - 2; });+ return { words: gone.reduce((n, el) => n + flat(el.textContent).split(' ').length, 0), first: gone[0] ? flat(gone[0].textContent).slice(0, 36) : '', off: off.length, col: off[0] ? flat(off[0].textContent).slice(0, 24) : '' };+ }).catch(() => ({ words: 0, off: 0 }));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 (cut.off >= 2) findings.push({ gate: 'F25', grade: 'WARN', file, line: 1, evidence: `[375px] a table opens with ${cut.off} columns off-screen (from "${cut.col}")`, fix: 'Keep the column that names the row and the one that acts on it in view: restack each row, or pin the first column' });}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' });@@ -308,18 +310,30 @@ function inventory(selectors) {const text = (el) => (el.innerText || el.textContent || '').replace(/\s+/g, ' ').trim();const quiet = (el) => !!el.closest('script, style, noscript, template');const links = uniq([...document.querySelectorAll('a[href]')].map((a) => a.getAttribute('href')).filter((h) => h && h.trim() && h.trim() !== '#').map(key));- const fields = uniq([...document.querySelectorAll('input[name], select[name], textarea[name], button[name]')].map((f) => f.getAttribute('name')));+ const fieldsIn = (root) => {+ const n = {};+ return uniq([...root.querySelectorAll('input, select, textarea, button[name]')].filter((f) => f.getAttribute('name') || !(f.tagName === 'INPUT' && /^(submit|button|reset|image|hidden)$/i.test(f.getAttribute('type') || ''))).map((f) => {+ const hook = f.getAttribute('data-testid') || f.getAttribute('data-test') || f.getAttribute('data-cy');+ if (f.getAttribute('name')) return f.getAttribute('name');+ if (f.id && !/^(:|radix-|headlessui-|react-aria)/.test(f.id)) return `#${f.id}`;+ if (hook) return `[${hook}]`;+ const t = f.tagName === 'INPUT' ? (f.getAttribute('type') || 'text').toLowerCase() : f.tagName.toLowerCase();+ n[t] = (n[t] || 0) + 1;+ return `unnamed ${t} ${n[t]}`;+ }));+ };+ const fields = fieldsIn(document);const actions = uniq([...document.querySelectorAll('form[action]')].map((f) => `${(f.getAttribute('method') || 'get').toLowerCase()} ${key(f.getAttribute('action'))}`));const forms = [...document.querySelectorAll('form')].map((f, i) => ({key: f.id ? `#${f.id}` : f.getAttribute('action') ? `${(f.getAttribute('method') || 'get').toLowerCase()} ${key(f.getAttribute('action'))}` : `form ${i + 1}`,attrs: [`method=${(f.getAttribute('method') || 'get').toLowerCase()}`, f.getAttribute('action') ? `action=${key(f.getAttribute('action'))}` : '', f.hasAttribute('novalidate') ? 'novalidate' : ''].filter(Boolean),- fields: uniq([...f.querySelectorAll('input[name], select[name], textarea[name]')].map((c) => c.getAttribute('name'))),+ fields: fieldsIn(f),hidden: uniq([...f.querySelectorAll('input[type="hidden"][name]')].map((c) => `${c.getAttribute('name')}=${c.getAttribute('value') || ''}`)),submits: f.querySelectorAll('button:not([type]), button[type="submit"], input[type="submit"], input[type="image"]').length,controls: uniq([...f.querySelectorAll('button, input, select, textarea')].map((c) => `${c.tagName.toLowerCase()}${c.getAttribute('type') ? `[type=${c.getAttribute('type')}]` : ''}${c.getAttribute('name') ? `[name=${c.getAttribute('name')}]` : ''}`)),}));const hooked = (selectors || []).filter((x) => { try { return !!document.querySelector(x); } catch { return false; } });- const headings = uniq([...document.querySelectorAll('h1, h2, h3, h4')].filter((h) => !quiet(h)).map((h) => text(h).toLowerCase()).filter((t) => t.length > 1));+ const headings = uniq([...document.querySelectorAll('h1, h2, h3, h4')].filter((h) => !quiet(h)).map((h) => text(h).toLowerCase().replace(/[\p{Extended_Pictographic}\uFE0F\u200d]/gu, '').replace(/\s+/g, ' ').trim()).filter((t) => t.length > 1));const body = text(document.body);const figures = uniq((body.match(/[$€£¥]\s?\d[\d,.]*\+?[kKmM]?|\b\d[\d,.]*\s?%|\b\d[\d,.]*[kKmM]?\+(?=\s|$)|\b\d{1,3}(?:,\d{3})+\b|\b\d{1,2}[:.]\d{2}\s?(?:am|pm)?\b|\b(?:19|20)\d{2}\b|\b\d+(?:\.\d+)?\s(?:hours?|minutes?|mins?|days?|weeks?|months?|years?|seconds?|ms|km|kg|g|ml|mm|cm|gb|mb|tb|x)\b|\+?\d[\d\s().-]{7,}\d/gi) || []).map((t) => t.replace(/\s+/g, '').toLowerCase()));const images = uniq([...document.querySelectorAll('img[src]')].map((i) => (i.getAttribute('src') || '').split('?')[0].split('/').pop()));diff --git a/skills/hallmark/scripts/sloplint.mjs b/skills/hallmark/scripts/sloplint.mjsindex 3e59422..b6704c1 100644--- a/skills/hallmark/scripts/sloplint.mjs+++ b/skills/hallmark/scripts/sloplint.mjs@@ -1671,8 +1671,12 @@ function check28(ctx) {}function check30(ctx) {- const EMOJI = /(?![\u00a9\u00ae\u2122\u203c\u2049\u2190-\u21ff])\p{Extended_Pictographic}/u;+ const EMOJI = /(?![©®™‼⁉←-⇿])\p{Extended_Pictographic}/u;+ const GLYPH = /(?![©®™‼⁉←-⇿✓-✖])(?:\p{Emoji_Presentation}|\p{Extended_Pictographic}️)/u;for (const doc of ctx.docs) {+ const lines = new Set();+ let n = 0;+ const flag = (line, what) => { if (lines.has(line) || n >= 8) return; lines.add(line); n++; report('30a', 'FAIL', doc.file, line, what, 'One icon library, a custom SVG, or the word alone'); };for (let i = 0; i < doc.tags.length; i++) {const t = doc.tags[i];if (t.close || t.selfClosing) continue;@@ -1682,9 +1686,23 @@ function check30(ctx) {if (!inner) continue;const content = inner.inner.replace(/<[^>]*>/g, '').trim();if (content && content.length <= 4 && EMOJI.test(content) && (iconish || !/<[a-z]/.test(inner.inner))) {+ lines.add(doc.lineOf(t.end + inner.inner.search(EMOJI)));report('30a', 'FAIL', doc.file, t.line, `emoji icon "${content}" in <${t.name} class="${trunc(cls, 28)}">`, 'One icon library or custom SVG');+ continue;}- }+ if (!/^(h[1-6]|button|a|label|th|summary|option|legend|dt)$/.test(t.name) || /<(p|div|ul|ol|table|section)\b/i.test(inner.inner)) continue;+ const text = plainText(inner.inner);+ const at = inner.inner.search(GLYPH);+ if (!text || at < 0) continue;+ const line = doc.lineOf(t.end + at);+ flag(line, `emoji in <${t.name}> "${trunc(text, 32)}"`);+ }+ const raw = doc.raw || doc.src;+ const body = doc.kind === 'html' ? doc.masked : raw;+ const lineAt = (text, pos) => text.slice(0, pos).split('\n').length;+ for (const m of body.matchAll(/>\s*((?:\p{Emoji_Presentation}|\p{Extended_Pictographic}️)[^<>{}\n]{0,40})/gu)) flag(lineAt(body, m.index + m[0].length - m[1].length), `text opens with an emoji: "${trunc(m[1].trim(), 32)}"`);+ for (const m of raw.matchAll(/placeholder\s*=\s*["']([^"']*)["']/g)) if (GLYPH.test(m[1])) flag(lineAt(raw, m.index), `emoji in a placeholder "${trunc(m[1], 28)}"`);+ if (doc.kind !== 'html') for (const m of raw.matchAll(/(["'`])\s*((?:(?:\p{Emoji_Presentation}|\p{Extended_Pictographic}️?)?){1,3})\s*\1/gu)) flag(lineAt(raw, m.index), `emoji passed as an icon: ${m[2]}`);}const libs = new Map([['material', /material-icons|material-symbols/i],@@ -1749,7 +1767,8 @@ function check34(ctx) {if (it.info.oxHidden) hiddenUtil.push(it);}for (const it of hiddenUtil) report(34, 'FAIL', it.doc.file, it.line, `${it.info.oxHidden} on <${it.name}> (breaks sticky)`, 'overflow-x-clip on both html and body, never hidden');- const pageish = ctx.docs.some((d) => d.kind === 'html' || d.tags.some((t) => !t.close && (t.name === 'html' || t.name === 'body')));+ const shell = (d) => d.kind === 'html' && !d.styles.length && /<script\b[^>]*type\s*=\s*["']module["'][^>]*\bsrc\s*=\s*["'][^"']+\.(?:tsx?|jsx?|mjs|vue|svelte)["']/i.test(d.raw || d.src) && !/<link\b[^>]*rel\s*=\s*["']stylesheet/i.test(d.raw || d.src);+ const pageish = ctx.docs.some((d) => (d.kind === 'html' && !shell(d)) || (d.kind !== 'html' && d.tags.some((t) => !t.close && (t.name === 'html' || t.name === 'body'))));const file = ctx.cssFiles[0]?.file || ctx.docs[0]?.file;const both = clipped.has('html') && clipped.has('body');if (!both && hidden) {@@ -4059,7 +4078,8 @@ for (const [key, ctx] of contexts) {let renderNotRun = null;let domInventories = {};if (opts.render) {- const htmlFiles = files.filter((f) => extname(f).toLowerCase() === '.html');+ const isShell = (f) => { try { const x = readFileSync(f, 'utf8'); return /<script\b[^>]*type\s*=\s*["']module["'][^>]*\bsrc\s*=\s*["'][^"']+\.(?:tsx?|jsx?|mjs|vue|svelte)["']/i.test(x); } catch { return false; } };+ const htmlFiles = files.filter((f) => extname(f).toLowerCase() === '.html' && !(opts.urls.length && isShell(f)));if (!htmlFiles.length && !opts.urls.length) renderNotRun = 'no HTML page to render; pass --url for a running dev server';else try {const mod = await import(new URL('./sloplint-render.mjs', import.meta.url).href);@@ -4093,7 +4113,7 @@ function wiringOf(src) {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 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;+ if (/^(link|base|use|image|script|style)$/.test(tag)) continue;const v = squash(m[1]).replace(/^["']|["']$/g, '').replace(/^\.\//, '');if (v && v !== '#') w.links.push(v);}@@ -4171,6 +4191,12 @@ if (opts.kept) {if (allowed.some((t) => x.toLowerCase() === t || (t.length >= 4 && x.toLowerCase().includes(t)))) { if (cat) (acked[cat] ||= new Set()).add(x); return false; }return true;});+ const fieldsGone = (b, a, where) => {+ const named = (b || []).filter((x) => !x.startsWith('unnamed '));+ const spare = (a || []).length - named.filter((x) => (a || []).includes(x)).length;+ const short = Math.max(0, (b || []).length - named.length - spare);+ return [...gone(named, a, 'fields'), ...(short ? [`${short} field${short > 1 ? 's' : ''} with no name${where}`] : [])];+ };const hard = { links: new Set(), fields: new Set(), forms: new Set(), handlers: new Set(), 'test hooks': new Set(), scripts: new Set() };const soft = { headings: new Set(), figures: new Set(), images: new Set(), ids: new Set() };const total = { links: new Set(was.wiring.links), fields: new Set(was.wiring.fields), handlers: new Set(was.wiring.handlers), 'test hooks': new Set(was.wiring.hooks), headings: new Set(), figures: new Set() };@@ -4190,7 +4216,7 @@ if (opts.kept) {for (const x of b.headings || []) total.headings.add(x);for (const x of b.figures || []) total.figures.add(x);for (const x of gone(b.links, [...a.links, ...now.wiring.links], 'links')) hard.links.add(x);- for (const x of gone(b.fields, a.fields, 'fields')) hard.fields.add(x);+ for (const x of fieldsGone(b.fields, a.fields, ` on ${k}`)) hard.fields.add(x);for (const x of gone(b.actions, a.actions)) hard.forms.add(x);for (const x of gone(b.headings, a.headings, 'headings')) soft.headings.add(x);for (const x of gone(b.figures, a.figures, 'figures')) soft.figures.add(x);@@ -4217,13 +4243,14 @@ if (opts.kept) {for (const bf of b.forms || []) {const af = (a.forms || []).find((x) => x.key === bf.key) || (a.forms || []).find((x) => x.attrs.join() === bf.attrs.join());if (!af) { if (!allowed.includes(bf.key.toLowerCase())) hard.forms.add(`the form ${bf.key} on ${k}`); continue; }- for (const x of bf.fields) if (!af.fields.includes(x) && !allowed.includes(x.toLowerCase())) hard.fields.add(`${x} in ${bf.key} on ${k}`);+ for (const x of fieldsGone(bf.fields, af.fields, '')) hard.fields.add(`${x} in ${bf.key} on ${k}`);for (const x of bf.hidden) if (!af.hidden.includes(x)) hard.fields.add(`hidden ${x} in ${bf.key} on ${k}`);for (const x of bf.attrs) if (!af.attrs.includes(x)) hard.forms.add(`${x} on ${bf.key} (${k})`);if (bf.submits && !af.submits) hard.forms.add(`a submit control in ${bf.key} (${k})`);- for (const x of bf.controls || []) if (!(af.controls || []).includes(x) && !allowed.some((t) => x.toLowerCase().includes(t) && t.length >= 4)) hard.forms.add(`${x} in ${bf.key} (${k})`);+ for (const x of bf.controls || []) if (!(af.controls || []).includes(x) && !(!x.includes('[name=') && (af.controls || []).some((y) => y.startsWith(`${x}[name=`))) && !allowed.some((t) => x.toLowerCase().includes(t) && t.length >= 4)) hard.forms.add(`${x} in ${bf.key} (${k})`);}}+ for (const x of [...hard.fields]) if ([...hard.fields].some((y) => y.startsWith(`${x} in `))) hard.fields.delete(x);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)}`, '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');diff --git a/skills/hallmark/scripts/theme.mjs b/skills/hallmark/scripts/theme.mjsindex 62fc6d8..83c71f8 100644--- a/skills/hallmark/scripts/theme.mjs+++ b/skills/hallmark/scripts/theme.mjs@@ -19,8 +19,8 @@ const GENRES = ['editorial', 'modern-minimal', 'atmospheric', 'playful'];function usage() {console.error(`usage:node theme.mjs deal --genre <g> --brief "<brief>" [--log .hallmark/log.json] [--n 3] [--reroll 0] [--json]- node theme.mjs scaffold <slug> [--dealt "<n>/3, seed <seed>"] [--redesign polish|restyle|full] [--dir .] [--force]- node theme.mjs scaffold --custom | --brand [--redesign polish|restyle|full] [--dir .] [--force]+ node theme.mjs scaffold <slug> [--dealt "<n>/3, seed <seed>"] [--redesign polish|restyle|full] [--scope app] [--dir <beside the stylesheet>] [--force]+ node theme.mjs scaffold --custom | --brand [--redesign polish|restyle|full] [--scope app] [--dir <beside the stylesheet>] [--force]node theme.mjs check [--axes "<paper>/<display>/<accent>"] [--face "<display face>"] [--hue <accent hue>] [--log .hallmark/log.json]node theme.mjs log --entry '<one JSON object>' [--log .hallmark/log.json]node theme.mjs index@@ -147,7 +147,7 @@ function deal() {const lastAxes = recent[0] && recent[0].axes ? String(recent[0].axes) : null;const occupiedAxes = new Set(recent.map((r) => r.axes).filter(Boolean));const bw = new Set(briefWords(brief).map(stem));- const slug = briefWords(brief).slice(0, 4).join('-') || 'brief';+ const slug = `${briefWords(brief).slice(0, 4).join('-') || 'brief'}-${createHash('sha1').update(brief.trim().toLowerCase()).digest('hex').slice(0, 4)}`;const seedBase = `${slug}·${new Date().toISOString().slice(0, 10)}`;const seedKey = `${seedBase}·r${reroll}`;const rand = seededRand(seedBase);@@ -275,7 +275,9 @@ function scaffold() {const tail = depth ? ` · redesign: ${depth}` : '';const slug = custom ? null : positional()[0];if (!custom && !slug) { usage(); process.exit(2); }- const dir = resolve(flag('dir', '.'));+ const app = flag('scope', '') === 'app';+ const sheet = ['src/index.css', 'src/app/globals.css', 'app/globals.css', 'src/styles/globals.css', 'styles/globals.css', 'src/styles/global.css', 'src/main.css', 'src/styles.css', 'src/global.css', 'src/app.css', 'src/App.css', 'app/app.css'].find((f) => existsSync(f));+ const dir = resolve(flag('dir', sheet ? dirname(sheet) : '.'));let name = 'custom world';let tokens = CUSTOM_TOKENS;let header = null;@@ -292,17 +294,34 @@ function scaffold() {for (const f of [out, baseOut]) if (existsSync(f) && !has('force')) { console.error(`${f} exists; pass --force to overwrite it`); process.exit(1); }mkdirSync(dir, { recursive: true });const dark = header && header.paper.band === 'dark';- const scale = dark ? SCALE.replace('--color-error: oklch(52% 0.19 27); --color-success: oklch(50% 0.12 150);', '--color-error: oklch(72% 0.15 27); --color-success: oklch(76% 0.13 150);') : SCALE;- const css = `:root {\n${header ? ` color-scheme: ${dark ? 'dark' : 'light'};\n` : ''}${scale}\n${tokens}\n}\n`;+ const sized = app ? SCALE.replace(/ --text-xs:[^\n]*\n --text-display-s:[^\n]*\n/, ' --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem; --text-2xl: 1.728rem; --text-3xl: 2.074rem;\n') : SCALE;+ const scale = dark ? sized.replace('--color-error: oklch(52% 0.19 27); --color-success: oklch(50% 0.12 150);', '--color-error: oklch(72% 0.15 27); --color-success: oklch(76% 0.13 150);') : sized;+ const sheetSrc = sheet ? readFileSync(sheet, 'utf8') : '';+ const tw = /@import\s+["']tailwindcss/.test(sheetSrc);+ const tw3 = !tw && /@tailwind\s+(?:base|utilities)\b/.test(sheetSrc);+ const scheme = header ? ` color-scheme: ${dark ? 'dark' : 'light'};\n` : '';+ const decls = `${scale}\n${tokens}`.split(/;(?![^()]*\))(?=(?:[^"]*"[^"]*")*[^"]*$)/).map((d) => d.trim()).filter(Boolean);+ const themed = decls.filter((d) => /^--(color|font|text|tracking|radius|shadow|ease)-/.test(d));+ const css = tw+ ? `@theme static {\n${themed.map((d) => ` ${d};`).join('\n')}\n}\n:root {\n${scheme}${decls.filter((d) => !themed.includes(d)).map((d) => ` ${d};`).join('\n')}\n}\n`+ : `:root {\n${scheme}${scale}\n${tokens}\n}\n`;writeFileSync(out, css);const own = !custom && /## Build hint[\s\S]*?(::selection\s*\{[^}]*\})/.exec(readFileSync(join(THEMES, `${slug}.md`), 'utf8'));writeFileSync(baseOut, (own ? BASE.replace(/::selection \{[^}]*\}/, own[1].replace(/\s+/g, ' ')) : BASE) + '\n');- const stamp = brand- ? `/* Hallmark · shape: <shape, or kept> · genre: <genre> · theme: brand${tail}\n * paper: oklch(<>) · accent: oklch(<>) · display: <face> · body: <face> · hero: <posture, or kept> · nav: <shape, or kept> · footer: <shape, or kept> · signature: <the one move, or kept>\n * axes: <paper>/<display>/<accent> · posture: <posture> · contrast: pass · fold: pass · v${VERSION} */`+ const src = custom ? '' : readFileSync(join(THEMES, `${slug}.md`), 'utf8');+ const dial = /stated in the stamp \(`([a-z0-9-]+):/.exec(src);+ const theme = brand ? 'brand' : custom ? 'custom' : `${name} (${flag('dealt', '') ? `deal ${flag('dealt', '')}` : 'by request'})`;+ const made = custom ? `\n * paper: oklch(<>) · accent: oklch(<>) · display: <face> · body: <face>` : '';+ const axes = custom ? '<paper>/<display>/<accent> · posture: <posture>' : `${triple(header)} · posture: ${header.posture}`;+ const kept = depth ? ', or kept' : '';+ const stamp = app+ ? `/* Hallmark · shape: app screen · genre: ${header ? header.genre : '<genre>'} · theme: ${theme}${tail}${made}\n * nav: <the shell${kept}> · signature: <the one object${kept}> · states: <the ones the screens have>${dial ? ` · ${dial[1]}: <the dials>` : ''}\n * axes: ${axes} · contrast: pass · v${VERSION} */`+ : brand+ ? `/* Hallmark · shape: <shape, or kept> · genre: <genre> · theme: brand${tail}${made} · hero: <posture, or kept> · nav: <shape, or kept> · footer: <shape, or kept> · signature: <the one move, or kept>\n * axes: ${axes} · contrast: pass · fold: pass · v${VERSION} */`: custom- ? `/* Hallmark · shape: <shape> · genre: <genre> · theme: custom${tail} · direction: "<drawn, n/7>" · vibe: "<4 to 8 words>"\n * paper: oklch(<>) · accent: oklch(<>) · display: <face> · body: <face> · hero: <posture> · nav: <shape> · footer: <shape> · enrichment: <none or the file> · signature: <the one move>\n * axes: <paper>/<display>/<accent> · posture: <posture> · seed: <key> · challenger: <name> (<verdict or raise>) · contract: <after the finish review> · contrast: pass · fold: pass · v${VERSION} */`- : `/* Hallmark · shape: <shape> · genre: ${header.genre} · theme: ${name} (${flag('dealt', '') ? `deal ${flag('dealt', '')}` : 'by request'})${tail}\n * hero: <posture> · nav: <shape> · footer: <shape> · enrichment: <none or the file> · signature: <the one move>\n * axes: ${triple(header)} · posture: ${header.posture} · contrast: pass · fold: pass · v${VERSION} */`;- console.log(`wrote ${out} (${brand ? 'the shared scale; fill every --color-* and --font-* from the palette and faces the pre-flight found' : custom ? 'the shared scale; fill every --color-* and --font-* from direction.md § B and § C before building' : `${name} tokens plus the shared scale`}) and ${baseOut} (the base rules the Floor already decided)`);+ ? `/* Hallmark · shape: <shape> · genre: <genre> · theme: custom${tail} · direction: "<drawn, n/7>" · vibe: "<4 to 8 words>"${made} · hero: <posture> · nav: <shape> · footer: <shape> · enrichment: <none or the file> · signature: <the one move>\n * axes: ${axes} · seed: <key> · challenger: <name> (<verdict or raise>) · contract: <after the finish review> · contrast: pass · fold: pass · v${VERSION} */`+ : `/* Hallmark · shape: <shape${kept}> · genre: ${header.genre} · theme: ${theme}${tail}\n * hero: <posture${kept}> · nav: <shape${kept}> · footer: <shape${kept}> · enrichment: <none or the file> · signature: <the one move>${dial ? ` · ${dial[1]}: <the dials>` : ''}\n * axes: ${axes} · contrast: pass · fold: pass · v${VERSION} */`;+ console.log(`wrote ${out} (${brand ? 'the shared scale; fill every --color-* and --font-* from the palette and faces the pre-flight found' : custom ? 'the shared scale; fill every --color-* and --font-* from direction.md § B and § C before building' : `${name} tokens plus the shared scale`}) and ${baseOut} (the base rules the Floor already decided)${sheet && !flag('dir', '') ? `, beside ${sheet}` : ''}`);if (!custom && !flag('dealt', '')) {const pic = join(THEMES, `${slug}.jpg`);if (existsSync(pic)) console.log(`look at ${pic}: the material at full size${header.pictured ? `, from a page built as ${header.pictured}` : ''}. Take its scale, density and objects, not its layout or its section order.`);@@ -311,8 +330,11 @@ function scaffold() {console.log('start the page\'s stylesheet with these lines, then write only the page:');console.log(stamp);console.log('/* Hallmark · pre-emit critique: P_ H_ E_ S_ R_ V_ · weakest: _, <what you did about it> */');- console.log('@import url("./tokens.css");');- console.log('@import url("./base.css");');+ console.log(tw || tw3 ? '@import "./tokens.css";' : '@import url("./tokens.css");');+ console.log(tw || tw3 ? '@import "./base.css" layer(base);' : '@import url("./base.css");');+ if (tw3) console.log('Tailwind 3: the stamp and both imports go above the @tailwind directives; an @import below them is dropped without an error.');+ if (tw) console.log('Tailwind 4: both imports go below @import "tailwindcss". tokens.css is written as an @theme block, so every colour, face, size, radius, shadow and ease is a utility (bg-paper, font-display, rounded-card); export-formats.md § Tailwind v4 has the names it shares with Tailwind.');+ if (app) return;console.log('');console.log('and, only if the page has data-slot containers, once before </body>:');console.log(`<script>${SLOTS_JS}</script>`);