Skip to content

Anti-AI-slop design skill for Claude Code, Cursor, and Codex.

CSS

Variants stops withholding the file that says what to do instead

Youssefdc11d74096eb
diff --git a/skills/hallmark/SKILL.md b/skills/hallmark/SKILL.md
index ef5448f..a3e8f2f 100644
--- a/skills/hallmark/SKILL.md
+++ b/skills/hallmark/SKILL.md
@@ -62,7 +62,7 @@ Hallmark has one default behaviour and four explicit verbs.
| `hallmark audit <target>` | Read the target, score it against the anti-pattern list, return a ranked punch list. **Do not edit.** |
| `hallmark redesign <target> [--mood <name>]` | Take the target's content and intent, then redesign the visual structure **inside the existing implementation boundaries unless the user explicitly confirms a full rebuild.** Preserve routes, component ownership, copy intent, brand, and information architecture; replace only the visual/interaction layer in scope. |
| `hallmark study <screenshot \| URL>` | Extract the **DNA** of a design the user admires (macrostructure, archetypes, type pairing, colour anchor), produce a diagnosis report, then optionally rebuild the user's content with it or emit a portable `design.md`. Never copies pixels; refuses template marketplaces. Load [`references/study.md`](references/study.md) before this verb runs. |
-| `hallmark variants <brief>` | Generate three structurally distinct full directions for one brief, serve a local picker over the user's own preview, continue with the chosen one. Load [`references/verbs/variants.md`](references/verbs/variants.md). |
+| `hallmark variants <brief>` | Generate three structurally distinct directions for one brief at sketch depth (`--full` for finished pages), serve a local picker over the user's own preview, continue with the chosen one. Load [`references/verbs/variants.md`](references/verbs/variants.md). |
If the input does not clearly map to a verb, treat it as default. If the user attaches an image or pastes a URL without a verb, ask: *"Should I `study` this (extract the DNA), or treat it as a reference for a fresh build?"*
@@ -359,7 +359,7 @@ Load [`references/verbs/redesign.md`](references/verbs/redesign.md) and follow i
## `hallmark variants`
-Load [`references/verbs/variants.md`](references/verbs/variants.md) and follow it. Three full directions, one shared ceremony, a local picker, and only the chosen direction ships (and runs the full gate sweep).
+Load [`references/verbs/variants.md`](references/verbs/variants.md) and follow it. Three directions at sketch depth by default (hero, one signature section, footer; `--full` builds finished pages), one shared ceremony, a local picker, and only the chosen direction ships, completed to full depth and run through the full gate sweep.
## `hallmark study`
diff --git a/skills/hallmark/references/verbs/variants-injection.md b/skills/hallmark/references/verbs/variants-injection.md
new file mode 100644
index 0000000..aca2751
--- /dev/null
+++ b/skills/hallmark/references/verbs/variants-injection.md
@@ -0,0 +1,52 @@
+# Scoped preview injection - the three dev-config hooks
+
+Loaded only when the run is in scoped-injection mode and the user has said yes to the config edit. `variants.md` § Scoped preview injection owns when to offer it, the consent rule, and the fallbacks; this file is only the wiring.
+
+Every hook is dev-only, loads one script from the helper origin, and swaps the `1` in `/inject/1.js` for the direction being previewed. Show the exact diff before writing any of them.
+
+**Vite** - a dev-only plugin using `transformIndexHtml`:
+
+```js
+// vite.config.js - dev only
+export default {
+ plugins: [{
+ name: 'hallmark-variants',
+ apply: 'serve',
+ transformIndexHtml: () => [{
+ tag: 'script',
+ attrs: { src: 'http://127.0.0.1:<port>/inject/1.js' },
+ injectTo: 'body',
+ }],
+ }],
+};
+```
+
+**Astro** - `injectScript('page', ...)` from a dev-only integration:
+
+```js
+// astro.config.mjs - dev only
+export default {
+ integrations: [{
+ name: 'hallmark-variants',
+ hooks: {
+ 'astro:config:setup': ({ injectScript, command }) => {
+ if (command !== 'dev') return;
+ injectScript('page', 'import("http://127.0.0.1:<port>/inject/1.js")');
+ },
+ },
+ }],
+};
+```
+
+**SvelteKit** - a `handle` hook rewriting the page chunk in dev:
+
+```js
+// src/hooks.server.js - dev only
+import { dev } from '$app/environment';
+export async function handle({ event, resolve }) {
+ return resolve(event, {
+ transformPageChunk: ({ html }) =>
+ dev ? html.replace('</body>', '<script src="http://127.0.0.1:<port>/inject/1.js"></script></body>') : html,
+ });
+}
+```
diff --git a/skills/hallmark/references/verbs/variants.md b/skills/hallmark/references/verbs/variants.md
index 22f05a9..4765bc8 100644
--- a/skills/hallmark/references/verbs/variants.md
+++ b/skills/hallmark/references/verbs/variants.md
@@ -37,14 +37,15 @@ Second run the same day: increment the letter (`2026-07-23-b`). Respect any exis
"devServer": null,
"directions": [
{ "n": 1, "title": "The broadsheet", "macrostructure": "Long Document",
- "theme": "Newsprint", "nav": "N6", "footer": "Ft2",
+ "theme": "custom", "direction": "the parish notice board", "seed": "4/7",
+ "nav": "N6", "footer": "Ft2",
"axes": "light / roman-serif / warm", "url": "/frame/1/",
"status": "generating", "thumb": false }
],
"picked": null }
```
-`mode` is `"greenfield"`, `"routes"`, or `"inject"`. In routes/inject mode `devServer` holds the user's dev-server origin and each direction's `url` is absolute into it (e.g. `http://localhost:3000/hallmark-v1`). Write `mode`, `brief`, and `devServer` as soon as § 2 resolves. Add each direction row when you plan it at `status:"generating"` with no `url` yet; write its `url` and flip `status` to `"ready"` the instant its files land; `thumbs.mjs` sets `thumb:true` after it screenshots that row. Every write of the manifest is atomic (write temp, rename).
+A derived direction carries `theme: "custom"` plus its `direction` and `seed`, the same fields the build log records; a direction the user pinned to a catalog theme names it there instead and omits both. `mode` is `"greenfield"`, `"routes"`, or `"inject"`. In routes/inject mode `devServer` holds the user's dev-server origin and each direction's `url` is absolute into it (e.g. `http://localhost:3000/hallmark-v1`). Write `mode`, `brief`, and `devServer` as soon as § 2 resolves. Add each direction row when you plan it at `status:"generating"` with no `url` yet; write its `url` and flip `status` to `"ready"` the instant its files land; `thumbs.mjs` sets `thumb:true` after it screenshots that row. Every write of the manifest is atomic (write temp, rename).
---
@@ -82,7 +83,7 @@ Route recipes, direction `n`:
| Nuxt | `pages/hallmark-v<n>.vue` |
| Remix | `app/routes/hallmark-v<n>.tsx` |
-**No file router** (CRA, Vite SPA with react-router, anything unrecognized): do not wire router config; touching a routes array is exactly the shared-file edit § 4 forbids. Fall back to greenfield-style standalone sketches built on the pre-flight tokens (or scoped injection when the stack is Vite/Astro/SvelteKit), and tell the user the winner gets implemented into the real app afterwards.
+**No file router** (CRA, Vite SPA with react-router, anything unrecognized): do not wire router config; touching a routes array is exactly the shared-file edit § 5 forbids. Fall back to greenfield-style standalone sketches built on the pre-flight tokens (or scoped injection when the stack is Vite/Astro/SvelteKit), and tell the user the winner gets implemented into the real app afterwards.
**Root-layout warning.** If the app's root layout ships its own nav or shell, routes-mode directions render inside it, chrome and all. Say so before building, and offer scoped injection (the overlay sits above the shell) or greenfield frames when the shell would drown the comparison. A direction's own nav inside the app's nav is a confusing artifact, not a bug; name it once so the user does not think it is one.
@@ -101,13 +102,15 @@ Then state **the direction plan**: a markdown table, said before any code. It re
**Divergence rules, hard:**
- Three **different macrostructures from different structural families**: grid-led (Bento, Catalogue, Portfolio Grid, Ecosystem Index, Map & Diagram) · document-led (Long Document, Letter, Conversational FAQ, Index-First, Narrative Workflow) · poster-led (Manifesto, Marquee Hero, Quote-Led, Type Specimen, Specimen, Photographic) · product-led (Workbench, Feature Stack, Stat-Led, Component Playground, Split Studio). One family, one direction. Three shapes from one family is a colour swap wearing three hats.
-- Themes **pairwise distinct on ALL THREE Rotation axes** (paper band, display style, accent hue; SKILL.md § Rotation). Three paper bands, three directions: this forces one dark, one mid, one light paper. Non-negotiable; it is what makes the picker grid legible at a glance.
+- Systems **pairwise distinct on ALL THREE Rotation axes** (paper band, display style, accent hue; SKILL.md § Rotation). Three paper bands, three directions: one dark, one mid, one light. Non-negotiable; it is what makes the picker grid legible at a glance. **Derivation is what makes it satisfiable.** The catalog holds exactly two mid-band themes, both cool and both grotesk, so a catalog-only run cannot fill the mid slot twice without colliding, and with the last-3 rotation below it cannot fill it a third time at all. A derived system lands wherever the band needs it.
- Three **distinct nav codes** and three **distinct footer codes** (index in [`component-cookbook.md`](../component-cookbook.md)).
- Every tuple also respects the log's last-3 rotation (SKILL.md § Rotation), because the winner gets logged and must not collide with history.
**Titles** are short evocative names ("The broadsheet", "The control room"), never theme names or "Option A". The title is what the user will say back to you in chat, so make each one unmistakable.
-**Direction roles:** direction 1 is genre-faithful (what the brief most expects, done properly); direction 2 pulls from an adjacent genre; direction 3 is the wildcard. When Step 1's custom signals fired, the custom route ([`direction.md`](../direction.md)) is allowed for direction 3, run at draft depth: slate, draw, and direction contract, no finish review until it wins.
+**All three directions derive**, the same as any other build ([`direction.md`](../direction.md)), run at draft depth: slate, draw and direction contract per direction, no finish review until one wins. One shared reflex check at R.1 covers the run, since the category default is a property of the brief and not of the direction. The catalog fast path is still reachable per direction when the user names a theme for one ("make one of them Terminal"), and a named theme costs that direction its ritual, not the others.
+
+**Direction roles:** direction 1 is genre-faithful (what the brief most expects, done properly); direction 2 pulls from an adjacent genre; direction 3 is the wildcard.
End the plan with the accountability beat, verbatim: *"Redirect now or I build all three."* A beat, not a blocking question; silence means build.
@@ -117,17 +120,63 @@ The user's pain is wall-clock. Every default here trades nothing the user can se
1. **Progressive-first (the default).** Start the picker BEFORE generating. Write the manifest with N directions at `status:"generating"` (no `url` yet), run `start.mjs`, hand over the URL: the picker opens on skeleton "building..." cards. Then generate; the instant a direction's files land, write its `url` and flip its row to `status:"ready"`. The picker's 2s poll reveals it while the others finish, so the user studies direction 1 while 2 and 3 are still drawing. Emit one line in chat as each lands: *"Direction 1 ready."*
-2. **Parallel by default (subagents).** When the harness has subagents, spawn one per direction; each gets the shared analysis + its tuple row + the fragment contract (§ 4). Sequential-in-one-conversation is the fallback: it keeps the prompt prefix cached and leans on progressive reveal to hide the wait. Honest tradeoff: parallel subagents each re-pay the shared prefix cold (no cache reuse across agents), but they win roughly 3x on wall-clock, and wall-clock is the pain, so parallel is the default.
+2. **Parallel by default (subagents).** When the harness has subagents, spawn one per direction; each gets the shared analysis + its tuple row + the fragment contract (§ 5). Sequential-in-one-conversation is the fallback: it keeps the prompt prefix cached and leans on progressive reveal to hide the wait. Honest tradeoff: parallel subagents each re-pay the shared prefix cold (no cache reuse across agents), but they win roughly 3x on wall-clock, and wall-clock is the pain, so parallel is the default.
3. **Sketch-depth drafts (the default).** Each direction ships hero + one signature section + footer, about 40% of a full page: enough to judge structure, theme, and voice, not a line more. Only the WINNER completes to full depth after the pick (§ 7). `--full` overrides to full directions when the user wants finished pages to compare.
-4. **Analysis-once + shared head.** Run the shared analysis once (§ 3): audience, use, tone, genre, family map. Generate the head, reset, and font-load boilerplate once as a shared base each direction references, so three drafts do not each re-derive the same reset and font loading. The token-variable NAMES can be shared; the VALUES must diverge per direction (a shared theme block would homogenize the three systems, § 4). The shared base is a draft-time head start, not the shipped system; the winner still earns its own real `:root` tokenization at promotion.
+4. **Analysis-once + shared head.** Run the shared analysis once (§ 3): audience, use, tone, genre, family map. Generate the head, reset, and font-load boilerplate once as a shared base each direction references, so three drafts do not each re-derive the same reset and font loading. The token-variable NAMES can be shared; the VALUES must diverge per direction (a shared theme block would homogenize the three systems, § 5). The shared base is a draft-time head start, not the shipped system; the winner still earns its own real `:root` tokenization at promotion.
5. **`--fast-drafts` (optional).** Draft subagents run on a faster model (Sonnet); the winner completes on the session model. Never Haiku: Haiku's HTML craft sits below the bar, and a draft too rough to judge defeats the point.
Expected speedup: **time-to-first-direction ~60s -> ~15-20s; full run ~2.3x a build -> ~1.1-1.3x a build.**
-## 4 · Build recipes
+## 4 · Serve and hand over
+
+Start the picker (idempotent; safe to re-run). Do this BEFORE the directions finish, right after you write the `generating` manifest rows (§ Speed, progressive-first):
+
+```
+node <skill-dir>/scripts/variants/start.mjs --run <run-dir>
+```
+
+`start.mjs` ensures the skeleton + manifest exist, reuses a live server whose `/api/state` identity matches this run, otherwise spawns `serve.mjs` detached (stdout/err to `server.log`), and prints exactly:
+
+```
+PICKER http://127.0.0.1:<port>
+AWAIT node <abs-path>/await.mjs --run <run-dir> --timeout 540
+DRAIN node <abs-path>/await.mjs --run <run-dir> --drain
+```
+
+The server starts even when no direction is `ready` yet: an empty or all-`generating` manifest opens the picker on skeleton cards, so the user watches the directions appear. Do not require all directions present at start.
+
+Relay the picker URL to the user in one line: *"Flip with arrows or the number keys; Pick when one clicks; Riff deals a fourth; Graft borrows a section from another."* If the harness has a browser preview pane, open the picker there too.
+
+What the user sees (built by `core.mjs`, dark neutral shell, system-ui, self-contained):
+
+- An overview grid of the directions: a PNG thumbnail per direction once `thumbs.mjs` has run (a scaled live 1280x800 iframe when no thumbnail yet), and a "building..." skeleton card for any direction still at `status:"generating"`.
+- Each card labelled with the direction's title (as `n · title`) and its macro/theme/nav/footer meta.
+- Click or 1/2/3 enters single view: the direction FULL-BLEED in a live iframe, nothing framing it. Every control lives in the **corner dock**, a compact glass bar pinned bottom-right: a grid glyph back to the overview, `‹ 1 2 3 ›` with direct number jump (a still-generating direction shows as a dimmed, pulsing number until it lands), the direction title, **Pick**, and a `⋯` tray carrying the tuple meta, Riff, Graft, and the key hints.
+- Keys: arrows flip (ready directions only), 1-9 jump, P pick, R riff (optional one-line steer), G graft (§ Smoothness), Esc back to the grid; all guarded against focused inputs.
+- The page binds to 127.0.0.1 only and polls `/api/state` every 2 seconds, so manifest updates (a direction flipping to ready, a thumbnail arriving, a riff landing, the pick recorded) appear without a restart.
+
+**No-server variant:** `node <skill-dir>/scripts/variants/start.mjs --run <run-dir> --static` skips the server, writes `compare.html` into the run dir (self-contained, srcdoc-inlined iframes of v1-v3, keyboard 1/2/3 and arrows, a banner telling the user to reply "pick N" in chat), and prints its path. Reach for it when a long-lived process is unwelcome but node exists.
+
+## Scoped preview injection
+
+Vite, Astro, and SvelteKit only. **Preview-only: it shows the variant over your running app, it never edits your app's source.** Next.js is out (no clean dev-only injection hook that stays preview-only); for Next, use routes mode or greenfield sketches. There is no write-back: the winner still ships as a normal Hallmark build after the pick.
+
+When the app runs a Vite/Astro/SvelteKit dev server, preview each direction as a full-viewport overlay inside the real app without adding throwaway routes. serve.mjs serves `GET /inject/<n>.js` (built by `core.mjs buildInjectJs(n,total,port)`); loaded inside the dev app it mounts a fixed, max-z-index, full-viewport overlay iframe pointing at the direction's preview URL, plus the same corner dock (flip / number jump / pick / riff / graft, posting to the helper origin; titles and count refresh from `/api/state`). It guards arrow keys against focused inputs, is dev-only (a no-op unless `location.hostname` is `localhost` or `127.0.0.1`), and is dismissible (x, Esc).
+
+Wire it in dev config only, and get the user's ok first (it loads a script from the helper origin into their dev app). Swap the `1` in `/inject/1.js` for the direction you want on top first; the overlay's own flip controls move between directions once loaded. Use the picker port that `start.mjs` printed for `<port>`.
+
+The three dev-config hooks (Vite `transformIndexHtml`, Astro `injectScript`, SvelteKit `transformPageChunk`) are in [`variants-injection.md`](variants-injection.md). Read it only once the user has agreed to the config edit.
+
+**Caveats.**
+
+- **Consent.** Adding the hook touches a config file. Show the exact diff, get a yes before writing it, and offer to revert it after the pick.
+- **CSP / X-Frame-Options.** If the dev app sets a strict `Content-Security-Policy` (`script-src`, `frame-src`) or `X-Frame-Options`, the injected script or its overlay iframe is blocked. This is a dev-only caveat; do not weaken production CSP for a preview.
+- **Fallback.** When injection is not possible (Next, no dev server, strict CSP, or the user declines), fall back to greenfield standalone sketches built on the pre-flight tokens. The winner still ships as a normal build either way.
+
+## 5 · Build recipes
**Parallel path** (harness supports subagents, the default): after the table, spawn one subagent per direction. Each receives the brief + the inferred audience/use/tone + its tuple row + its output target + the shared base + the **fragment contract**. Briefing template:
@@ -138,11 +187,14 @@ Tuple: "<title>" · <macro> · <theme> · axes <axes> · nav <N#> · footer <Ft#
Depth: SKETCH - hero + one signature section + footer only (unless the run is --full).
Output: <absolute path to v<n>/index.html, or the route file from the recipes table>.
Reference the shared base at <path> for head/reset/font-load; define your OWN distinct theme token values.
-Include this chip tag verbatim: <the § 4 snippet with data-direction="<n>">.
+Include this chip tag verbatim: <the § 5 chip tag snippet, with data-direction="<n>">.
Load ONLY references/macrostructures/<picked file>, the picked component archetype
-files, and the universal set (typography · color · layout-and-space · motion ·
-copy · anti-patterns). Do not read log.json. Do not append memory. Do not run
-the full gate sweep: the Floor tier only (contrast gates 40-41 are in it). Styles fully
+files, references/genres/<g>.md, references/section-entry.md,
+references/enrichment/hero-discipline.md, references/direction.md (or
+references/themes/<theme>.md on the fast path), and the universal set
+(typography · color · layout-and-space · motion · copy · anti-patterns).
+Do not read log.json. Do not append memory. Do not run the full gate sweep:
+the Floor tier only (contrast gates 40-41 are in it). Styles fully
self-contained. Stamp the CSS with `direction: <n> of 3 · run: <run-id>`.
```
@@ -170,7 +222,7 @@ Greenfield frames carry the chip too, with `data-mode="greenfield"` and `data-ba
- Pick / Riff / Graft POST to `/api/pick` on the chip's own origin. On failure the bar swaps to *"picker offline · tell your agent: pick 2"*, so the flow survives the server dying.
- Respects `prefers-reduced-motion`; nothing animates beyond opacity/transform.
-Assume port 4180 when writing the tags; § 9 covers the walk-up case.
+Take the port from what `start.mjs` printed, and write the tags with that. It is 4180 by default and it is reported on every start, so there is never a reason to assume it and then rewrite every file when it turns out to be 4181. § 9 covers the walk-up case, where no start line exists to read.
**Routes-mode discipline:** never touch shared stylesheets, config files, or `package.json` during variant generation. Each direction is additive route files only. Write all of a direction's files in **one batch** so the dev server hot-reloads once per direction, not once per file. (Scoped injection is the one exception that touches a config file, and only with consent, § Scoped preview injection.)
@@ -188,97 +240,6 @@ This also fixes **iframe-blocked dev servers**: a routes-mode app that sends `X-
serve.mjs serves `GET /thumb/<n>.png` from `<run-dir>/thumbs/<n>.png` (200 `image/png`, or 404 when absent).
-## 5 · Serve and hand over
-
-Start the picker (idempotent; safe to re-run). Do this BEFORE the directions finish, right after you write the `generating` manifest rows (§ Speed, progressive-first):
-
-```
-node <skill-dir>/scripts/variants/start.mjs --run <run-dir>
-```
-
-`start.mjs` ensures the skeleton + manifest exist, reuses a live server whose `/api/state` identity matches this run, otherwise spawns `serve.mjs` detached (stdout/err to `server.log`), and prints exactly:
-
-```
-PICKER http://127.0.0.1:<port>
-AWAIT node <abs-path>/await.mjs --run <run-dir> --timeout 540
-DRAIN node <abs-path>/await.mjs --run <run-dir> --drain
-```
-
-The server starts even when no direction is `ready` yet: an empty or all-`generating` manifest opens the picker on skeleton cards, so the user watches the directions appear. Do not require all directions present at start.
-
-Relay the picker URL to the user in one line: *"Flip with arrows or the number keys; Pick when one clicks; Riff deals a fourth; Graft borrows a section from another."* If the harness has a browser preview pane, open the picker there too.
-
-What the user sees (built by `core.mjs`, dark neutral shell, system-ui, self-contained):
-
-- An overview grid of the directions: a PNG thumbnail per direction once `thumbs.mjs` has run (a scaled live 1280x800 iframe when no thumbnail yet), and a "building..." skeleton card for any direction still at `status:"generating"`.
-- Each card labelled with the direction's title (as `n · title`) and its macro/theme/nav/footer meta.
-- Click or 1/2/3 enters single view: the direction FULL-BLEED in a live iframe, nothing framing it. Every control lives in the **corner dock**, a compact glass bar pinned bottom-right: a grid glyph back to the overview, `‹ 1 2 3 ›` with direct number jump (a still-generating direction shows as a dimmed, pulsing number until it lands), the direction title, **Pick**, and a `⋯` tray carrying the tuple meta, Riff, Graft, and the key hints.
-- Keys: arrows flip (ready directions only), 1-9 jump, P pick, R riff (optional one-line steer), G graft (§ Smoothness), Esc back to the grid; all guarded against focused inputs.
-- The page binds to 127.0.0.1 only and polls `/api/state` every 2 seconds, so manifest updates (a direction flipping to ready, a thumbnail arriving, a riff landing, the pick recorded) appear without a restart.
-
-**No-server variant:** `node <skill-dir>/scripts/variants/start.mjs --run <run-dir> --static` skips the server, writes `compare.html` into the run dir (self-contained, srcdoc-inlined iframes of v1-v3, keyboard 1/2/3 and arrows, a banner telling the user to reply "pick N" in chat), and prints its path. Reach for it when a long-lived process is unwelcome but node exists.
-
-## Scoped preview injection
-
-Vite, Astro, and SvelteKit only. **Preview-only: it shows the variant over your running app, it never edits your app's source.** Next.js is out (no clean dev-only injection hook that stays preview-only); for Next, use routes mode or greenfield sketches. There is no write-back: the winner still ships as a normal Hallmark build after the pick.
-
-When the app runs a Vite/Astro/SvelteKit dev server, preview each direction as a full-viewport overlay inside the real app without adding throwaway routes. serve.mjs serves `GET /inject/<n>.js` (built by `core.mjs buildInjectJs(n,total,port)`); loaded inside the dev app it mounts a fixed, max-z-index, full-viewport overlay iframe pointing at the direction's preview URL, plus the same corner dock (flip / number jump / pick / riff / graft, posting to the helper origin; titles and count refresh from `/api/state`). It guards arrow keys against focused inputs, is dev-only (a no-op unless `location.hostname` is `localhost` or `127.0.0.1`), and is dismissible (x, Esc).
-
-Wire it in dev config only, and get the user's ok first (it loads a script from the helper origin into their dev app). Swap the `1` in `/inject/1.js` for the direction you want on top first; the overlay's own flip controls move between directions once loaded. Use the picker port that `start.mjs` printed for `<port>`.
-
-**Vite** - a dev-only plugin using `transformIndexHtml`:
-
-```js
-// vite.config.js - dev only
-export default {
- plugins: [{
- name: 'hallmark-variants',
- apply: 'serve',
- transformIndexHtml: () => [{
- tag: 'script',
- attrs: { src: 'http://127.0.0.1:<port>/inject/1.js' },
- injectTo: 'body',
- }],
- }],
-};
-```
-
-**Astro** - `injectScript('page', ...)` from a dev-only integration:
-
-```js
-// astro.config.mjs - dev only
-export default {
- integrations: [{
- name: 'hallmark-variants',
- hooks: {
- 'astro:config:setup': ({ injectScript, command }) => {
- if (command !== 'dev') return;
- injectScript('page', 'import("http://127.0.0.1:<port>/inject/1.js")');
- },
- },
- }],
-};
-```
-
-**SvelteKit** - a `handle` hook rewriting the page chunk in dev:
-
-```js
-// src/hooks.server.js - dev only
-import { dev } from '$app/environment';
-export async function handle({ event, resolve }) {
- return resolve(event, {
- transformPageChunk: ({ html }) =>
- dev ? html.replace('</body>', '<script src="http://127.0.0.1:<port>/inject/1.js"></script></body>') : html,
- });
-}
-```
-
-**Caveats.**
-
-- **Consent.** Adding the hook touches a config file. Show the exact diff, get a yes before writing it, and offer to revert it after the pick.
-- **CSP / X-Frame-Options.** If the dev app sets a strict `Content-Security-Policy` (`script-src`, `frame-src`) or `X-Frame-Options`, the injected script or its overlay iframe is blocked. This is a dev-only caveat; do not weaken production CSP for a preview.
-- **Fallback.** When injection is not possible (Next, no dev server, strict CSP, or the user declines), fall back to greenfield standalone sketches built on the pre-flight tokens. The winner still ships as a normal build either way.
-
## 6 · The poll ladder
The verdict comes back through `await.mjs`:
@@ -345,7 +306,7 @@ On `{"action": "pick", "choice": n}` or the chat equivalent (and after any graft
1. Copy the winner into place as the normal build output (wherever a default Hallmark build would land for this project).
2. Complete the sketch to full depth first (unless `--full` already built full pages): remaining sections, all states, responsive pass.
-3. Run the FULL 58-gate sweep + sloplint, fix every FAIL or waive it on the record, stamp, emit `tokens.css`, exactly as SKILL.md Steps 6-7 demand. The draft's abbreviated pass counts for nothing here; the winner earns the whole bar.
+3. Run the FULL 58-gate sweep + sloplint, fix every FAIL, fix or waive every REFLEX on the record, stamp, emit `tokens.css`, exactly as SKILL.md Steps 6-7 demand. (FAIL is the Floor and is never waivable; REFLEX is the tier a waiver exists for. `slop-test.md` § Grades is canonical.) The draft's abbreviated pass counts for nothing here; the winner earns the whole bar.
**Routes mode:** state the file plan first: the standard safety rail, promoting into real targets needs the user's ok. For example:
@@ -373,7 +334,7 @@ Each `variants[]` row carries that direction's title, macrostructure, theme, nav
## Smoothness
-The point of variants is a fast, honest decision loop. The picker already carries the ergonomics: the corner dock (title, `‹ 1 2 3 ›` number jump, Pick, tray), input-guarded arrow flip (arrows never fire while a prompt input is focused), and side-by-side thumbnails in the grid (§ Thumbnails). Build on that with three moves.
+The point of variants is a fast, honest decision loop. The picker already carries the ergonomics (§ 4, § Thumbnails). Build on that with three moves.
**Compositional grafts (the key unlock).** The verdict is rarely "2 is perfect." It is usually "2, but the pricing section from 3." Handle it whether it arrives in chat or through the picker's Graft button.
@@ -414,7 +375,7 @@ On `{"action": "riff", "steer": "..."}` (steer optional) or a chat ask ("riff",
## 9 · Risks and edge notes
- **Iframe-refusing dev servers** (`X-Frame-Options` / CSP `frame-ancestors`): the grid iframes render blank. Run `thumbs.mjs` (§ Thumbnails); the PNG grid renders regardless, and single view still opens the route directly where the chip flips and picks. This is the v2 fix for what used to need opening tabs by hand.
-- **File watchers that restart on new files:** batch writes (§ 4). One write per direction, never a file-by-file trickle that restarts the dev server three times.
+- **File watchers that restart on new files:** batch writes (§ 5). One write per direction, never a file-by-file trickle that restarts the dev server three times.
- **Tailwind content globs** pick up new `hallmark-v*` routes automatically. Fine; no config edit, and config edits are forbidden anyway (the scoped-injection dev hook is the one consented exception, § Scoped preview injection).
- **Port conflicts:** `serve.mjs` tries 4180 and walks up to 4189. If the printed PICKER port differs from the 4180 you stamped into chip tags or an inject hook, update `src` and `data-base` in each direction once.
- **Stale server from a previous run:** `start.mjs` checks the live server's `/api/state` identity against this run; a matching run is reused, anything else is replaced and `server.json` rewritten. The server also self-shuts after 30 minutes without picker polls, so a forgotten run does not linger.