Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
CSS
A Next.js site redesigned in full: the scaffold's phone steps survive Tailwind's layers, one stylesheet names a posture per route
Youssef2beb1de3b699
diff --git a/skills/hallmark/references/redesign.md b/skills/hallmark/references/redesign.mdindex bd75adf..8d45a40 100644--- a/skills/hallmark/references/redesign.md+++ b/skills/hallmark/references/redesign.md@@ -4,7 +4,7 @@ Loaded when the request opens with `redesign` or `audit`, or asks to redesign, r## What a redesign keeps-- **The content.** Every fact, claim, name, price, date and quote the page states. Figures, quotes and logos already there are the user's material: carried over as found and listed in the handoff to verify, one a gate doubts (a trend nobody measured, 46a) included. Nothing is added: no action, section or visual the page did not have, beyond what the user hands over and what a gate requires (a pause on a loop, 18; a focus ring).+- **The content.** Every fact, claim, name, price, date and quote the page states. Figures, quotes and logos already there are the user's material: carried over as found and listed in the handoff to verify, one a gate doubts (a trend nobody measured, 46a) included. Nothing is added: no action, section, claim or picture the page did not have, beyond what the user hands over and what a gate requires (a pause on a loop, 18; a focus ring). A drawing made from the page's own facts (its channels, its steps, a figure) is composition, and full depth may make one.- **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 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.@@ -61,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, the theme file an old stamp names, 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. 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.+- **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. At every depth 58 (the screen budget) is a note too: the words are the owner's, and only a copy gate cuts one. 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.+- **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. One stylesheet for several pages lists a hero posture per route, `hero: Settled (/), Stage (/contact)`. 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/scripts/sloplint-render.mjs b/skills/hallmark/scripts/sloplint-render.mjsindex d2abdde..c69eeac 100644--- a/skills/hallmark/scripts/sloplint-render.mjs+++ b/skills/hallmark/scripts/sloplint-render.mjs@@ -137,7 +137,10 @@ export async function renderCheck(htmlFiles, metaIn) {if (isUrl(file)) {const stamp = await page.evaluate(async () => { let t = [...document.querySelectorAll('style')].map((x) => x.textContent.slice(0, 4000)).join('\n'); for (const l of document.querySelectorAll('link[rel~="stylesheet"]')) { try { t += '\n' + (await (await fetch(l.href)).text()).slice(0, 4000); } catch {} } return t; }).catch(() => '');meta.postureByFile[file] = (/posture:\s*(restrained|committed|full-palette|drenched)/i.exec(stamp)?.[1] || 'restrained').toLowerCase();- meta.heroPostureByFile[file] = (/hero:\s*(settled|banner|poster|ledge|corridor|stage)\b/i.exec(stamp)?.[1] || '').toLowerCase();+ const field = (/hero:\s*([^·*\n]+)/i.exec(stamp) || [])[1] || '';+ let route = ''; try { route = new URL(file).pathname.replace(/\/$/, '') || '/'; } catch {}+ const own = new RegExp(`(settled|banner|poster|ledge|corridor|stage)\\s*\\(${route.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\)`, 'i').exec(field);+ meta.heroPostureByFile[file] = ((own || /(settled|banner|poster|ledge|corridor|stage)\b/i.exec(field) || [])[1] || '').toLowerCase();}const pageMeta = { genre: meta.genre, posture: meta.postureByFile[file] || 'restrained' };const prefix = heroOnly ? 'hero-' : '';diff --git a/skills/hallmark/scripts/sloplint.mjs b/skills/hallmark/scripts/sloplint.mjsindex 3fd1c94..47f93fd 100644--- a/skills/hallmark/scripts/sloplint.mjs+++ b/skills/hallmark/scripts/sloplint.mjs@@ -898,7 +898,8 @@ function report(gate, grade, file, line, evidence, fix) {const b = baseGate(g);const waived = WAIVED.has(b) || WAIVED.has(gateNumber(b));if (VERBATIM && COPY_GATES.has(gateNumber(b)) && (grade === 'FAIL' || grade === 'WARN')) grade = 'NOTE';- if (LAYOUT_KEPT && (STRUCTURAL.has(b) || STRUCTURAL.has(gateNumber(b)) || (LAYOUT_KEPT === 'polish' && SPACING.has(b))) && grade !== 'NOTE') grade = 'NOTE';+ const owned = LAYOUT_KEPT === 'full' ? gateNumber(b) === '58' : STRUCTURAL.has(b) || STRUCTURAL.has(gateNumber(b)) || (LAYOUT_KEPT === 'polish' && SPACING.has(b));+ if (LAYOUT_KEPT && owned && grade !== 'NOTE') grade = 'NOTE';if (grade === 'FAIL') {if (tier === 'ledger') grade = 'NOTE';else if (tier === 'reflex') grade = waived ? 'WAIVED' : 'REFLEX';@@ -913,7 +914,7 @@ function applyWaivers(ctx, dir) {WAIVED = new Set(); ANSWERED = new Set(); DISMISSED = new Set();VERBATIM = /\bcopy:\s*verbatim\b/i.test(ctx.stampText);APPSCREEN = /\bshape:\s*app screen\b/i.test(ctx.stampText);- LAYOUT_KEPT = (/\bredesign:\s*(polish|restyle)\b/i.exec(ctx.stampText) || [])[1]?.toLowerCase() || false;+ LAYOUT_KEPT = (/\bredesign:\s*(polish|restyle|full)\b/i.exec(ctx.stampText) || [])[1]?.toLowerCase() || false;const re = /\/\*\s*Hallmark\s*·\s*waive\s+(\d{1,2}[a-z]{0,3}|F\d+)\s*·\s*([^·*]+?)\s*·\s*([^*]+?)\s*\*\//gi;const claims = [...ctx.stampText.matchAll(re)].map((m) => ({id: m[1], evidence: m[2].trim(), reason: m[3].trim(), raw: m[0],@@ -3976,7 +3977,9 @@ function shareProjects(contexts) {shared.prm = shared.prm || /prefers-reduced-motion/i.test(stripComments(c.allCss)) || tv.has('motion-reduce') || tv.has('motion-safe');}for (const c of list) c.shared = shared;+ const stamped = list.find((c) => !parts.includes(c) && /Hallmark\s*·/.test(c.stampText));for (const c of parts) {+ if (stamped && !/Hallmark\s*·/.test(c.stampText)) c.stampText = `${c.stampText}\n${stamped.stampText}`;c.twTok = { ...tokens, ...c.tokens };c._tw = null;}@@ -4184,6 +4187,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');+ for (const m of stamps.matchAll(/\/\*\s*Hallmark\s*·\s*(dropped|reworded)\s+([^·*]+?)\s*·\s*([^*]+?)\s*\*\//gi)) if (m[2].trim() && m[3].trim().length < 12) report('kept', 'WARN', SNAP, 1, `${m[1]} ${trunc(m[2].trim(), 40)} is not on the record: its reason is under 12 characters`, 'Say why in a clause');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) => {diff --git a/skills/hallmark/scripts/theme.mjs b/skills/hallmark/scripts/theme.mjsindex ea5f1be..f1b61a4 100644--- a/skills/hallmark/scripts/theme.mjs+++ b/skills/hallmark/scripts/theme.mjs@@ -307,7 +307,10 @@ function scaffold() {: `: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 base = own ? BASE.replace(/::selection \{[^}]*\}/, own[1].replace(/\s+/g, ' ')) : BASE;+ const steps = base.split('\n').filter((l) => /^@media[^{]*\{\s*:root/.test(l));+ writeFileSync(baseOut, (tw ? base.split('\n').filter((l) => !steps.includes(l)).join('\n') : base) + '\n');+ if (tw) writeFileSync(out, readFileSync(out, 'utf8') + steps.join('\n') + '\n');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'})`;