diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e52443..398b5bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 0.9.0 + +Driven by round 6, where skilled pages lost on distinctiveness because they shared one frame. + +- **A base starter** (`scaffold --kind base`): type with tracking by size, controls, colour, motion kit and fonts, and no layout. New landing pages start here; the full landing starter is for a brief that asks for the standard page. +- **A five-line concept:** the layout is taken from the shape of the product's artifact, and one material (`data-device`) runs through the page. +- **A frame check** (`scripts/frame.mjs`): compares a page's skeleton with the landing starter and with sibling pages, and requires the material to run through. +- **Examples replaced.** The skill's text had used all three eval products as examples, and only the skilled arm read it. Corrected in the round 6 write-up too. +- **Round 7, and what it found.** The skilled pages **still did not beat the baseline**: judged more swappable in 6 of 8 judgements and remembered in 2 of 8, tied on ownability, ahead on design quality (4 against 2). All three judges grouped all four skilled pages as one hand: the base's typeface, button arrow and captions. The frame check passed them all, so it does not catch that. Details and limits in `evals/results/2026-11-26-r7.md`. +- **Fixes:** `--accent` on the base writes the colour given and warns when it is too faint; the base's first and last blocks no longer override a page's own layout. + ## 0.8.0 Driven by the verdicts "good but replaceable" and "nothing sets this apart". The craft floor was solid; the weak point was that pages were their own skeleton and nothing else. The skill now makes an agent decide what is ownable before it builds, and gives it grounds and artwork that are not the default. diff --git a/README.md b/README.md index 79c1203..2832070 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Review this screen against our brand guide. | --- | --- | --- | | 1 | **Read** | Finds your design rules, watches the screens run and measures the drift. | | 2 | **Decide the mode** | Persuade, Operate, Read, Experience or Terminal: what the person is doing here. | -| 3 | **Fix the direction** | A three-line concept (what the product makes, what the page shows without its category word, one signature), then five lines on how it should feel and what it must never look like. | +| 3 | **Fix the direction** | A five-line concept (what the product makes, what the page shows without its category word, one signature, a layout taken from that artifact, one material that runs through), then five lines on how it should feel and what it must never look like. | | 4 | **Branch** | Repairs an existing screen layer by layer, or builds a new one around one star. | | 5 | **Build** | One section at a time, from your own components, with every state designed. | | 6 | **Gate** | Runs your lint, types and tests, then measures contrast, target size and tells. | @@ -121,15 +121,17 @@ Review this screen against our brand guide. ## Start from a tested page -A blank file is how a page ends up static and generic. For a new screen the agent starts from one of two complete starters, then makes it the product’s own. Both pass every check in the skill, in dark and light, at all four widths. +A blank file loses the craft, and a finished template loses the identity. So a new landing page starts from a base with tested type, controls and motion and no layout, and the agent builds the layout from the product’s own artifact. There are also two complete starters for when the standard shape is what you want. All of them pass the skill’s craft checks. ```bash -node scripts/scaffold.mjs my-page --theme light --palette ember --shape contour +node scripts/scaffold.mjs my-page --kind base --theme light +node scripts/scaffold.mjs my-standard-page --theme light --palette ember --shape contour node scripts/scaffold.mjs my-app --kind app --theme dark ``` | Starter | What you get | | --- | --- | +| **Base** (`--kind base`) | Type with tracking set by size, buttons and links with hover and press, focus styles, colour, the motion kit and fonts. `page.css` is empty: the frame is yours. | | **Landing page** | A lit grainient ground, a floating nav, a product frame, an uneven bento, steps, one big number, a closing call and a footer. The motion kit is wired in: ordered entrance, scroll reveals, count-up, and a hover and press state on every control. | | **App screen** (`--kind app`) | A sidebar that becomes a menu on a phone, a page header with one primary action, four key numbers, one chart, a table whose status is a word and a dot, and an empty state that says what to do. | @@ -150,11 +152,12 @@ Plain Node scripts with no dependencies. The agent runs them for you, and you ca | `scripts/signs.mjs ` | Finds tells in the rendered page: hue gradients, glows, emoji, hype words, unverified claims, looping animation and more. | `--allow` licenses a device your committed direction uses on purpose | | `scripts/check.mjs ` | Reads WCAG contrast from the rendered pixels, so gradients, images and pseudo-element backgrounds are judged too. Also checks touch targets, small text, missing names, focus styles, layout shift and document basics. | `--widths` | | `scripts/craft.mjs ` | Hovers every control with a real pointer and diffs the result, so a control that ignores the pointer is caught, not missed. Also flags layout-property transitions and motion that ignores the reduced-motion setting. | `--shots` writes a rest and hover crop per control | -| `scripts/scaffold.mjs ` | Starts a landing page or an app screen from a tested starter. | `--kind`, `--theme`, `--palette`, `--shape`, `--ground`, `--hero`, `--art`, `--minimal` | +| `scripts/scaffold.mjs ` | Starts a base with no layout, a landing page or an app screen. | `--kind`, `--theme`, `--palette`, `--shape`, `--ground`, `--hero`, `--art`, `--minimal` | | `scripts/inline.mjs ` | Folds a finished page, with its styles, script and fonts, into one file you can send. | `--out page.html` | | `scripts/lib-add.mjs add ` | Pulls real source from Bencho, BoardUI, Aceternity or any shadcn registry. Files only, with the licence notice. | `--dry-run`, `--out` | | `scripts/dotify.mjs ` | Turns a picture or drawn SVG into dithered, halftone, hex-dot, engraved-line or ASCII art for a hero object. | `--mode`, `--invert`, `--fill`, `--bg` | | `scripts/swap.mjs ` | The swap-the-name test. With the product name removed, does the first screen still use the nouns of the product's own subject, and does its artwork name them? It catches a page where only the skeleton is the product's own. It cannot judge the picture. | `--nouns`, `--name`, `--typographic` | +| `scripts/frame.mjs …` | The frame check. Is the skeleton different from the landing starter and from sibling pages, and does one material run through the page? It compares structure, so a pass does not mean the page is memorable. | `--no-starter`, `--no-device`, `--threshold` | | `scripts/score.mjs ` | Runs every check and prints one score out of 100, with what cost points. | | | `scripts/term-shot.mjs -- ` | Runs a terminal program at a set width in a real pseudo-terminal and captures its text and an image. | | @@ -196,9 +199,9 @@ Each brief was built twice by the same model, once with no skill and once with i Across the first three rounds the skill won 9 of 12 comparisons, with a mean mechanical score of 96 against 62. On a later plain brief that never mentioned how it would be judged, the motion and hover score was 75 with the skill and 31 without. -In round 6 the comparison was blind, with the product name masked and two judge agents, and it went the other way on distinctiveness: the skilled pages scored 89 against 43 on the mechanical checks, but the judges found the baseline pages more ownable and more memorable in all six comparisons, because the three skilled pages shared one frame. The write-up says what that means and what to change. +Rounds 6 and 7 compared pages blind, with the product name masked and judge agents who built neither page, and asked about distinctiveness. The skill did not win. In round 6 the baseline pages were judged more ownable and more memorable in all six comparisons. In round 7, after changes, the skilled pages came out ahead on design quality (4 judgements to 2, with 2 equal) but were still remembered less (2 of 8) and judged more swappable (6 of 8), and every judge saw the four skilled pages as one hand. If you need a page that could only be yours, treat the skill as a craft floor and push the idea yourself. -The limits are real: one reviewer in the early rounds, a round that was not blind, and both sides on the same model. The skill lost two comparisons in the first round, because it made clean pages where the other side drew something memorable. The guide and recipes for that one rich moment came from those losses. [Read all six rounds.](evals/results) +The limits are real: one reviewer in the early rounds, a round that was not blind, and both sides on the same model. The skill lost two comparisons in the first round, because it made clean pages where the other side drew something memorable. The guide and recipes for that one rich moment came from those losses. [Read all seven rounds.](evals/results) ## Questions diff --git a/SKILL.md b/SKILL.md index a188c28..b64b3bf 100644 --- a/SKILL.md +++ b/SKILL.md @@ -26,8 +26,8 @@ One fixed run for every request. Do the steps in order. Each step names the file | --- | --- | --- | --- | | 1 | **Read** | Find the project's design rules, establish what is real, see the screens running, measure the drift | [references/read.md](references/read.md) | | 2 | **Decide the mode** | Persuade, Operate, Read, Experience or Terminal: what the person is doing here | [references/modes.md](references/modes.md) | -| 3 | **Fix the direction** | The concept in three lines (native artifact, the page without its category word, one signature, and why this ground), then five lines: product, character, world, moments, signature. From the project's rules if it has them | [references/direction.md](references/direction.md), [devices.md](references/devices.md) | -| 4 | **Branch** | Existing screen: repair layer by layer. New screen: build around one star. **A new landing page starts from `scripts/scaffold.mjs`**, not from a blank file | [fix.md](references/fix.md) or [build-new.md](references/build-new.md) | +| 3 | **Fix the direction** | The concept in five lines (native artifact, the page without its category word, one signature and why this ground, the layout taken from the artifact, one material that runs through), then five lines: product, character, world, moments, signature. From the project's rules if it has them | [references/direction.md](references/direction.md), [devices.md](references/devices.md) | +| 4 | **Branch** | Existing screen: repair layer by layer. New screen: build around one star. **A new landing page starts from `scripts/scaffold.mjs --kind base`**: tested type and controls, your own layout | [fix.md](references/fix.md) or [build-new.md](references/build-new.md) | | 5 | **Build** | One section at a time, from the project's own parts, with every state | [build.md](references/build.md), [components.md](references/components.md), [motion.md](references/motion.md), [hover.md](references/hover.md), [materials.md](references/materials.md) | | 6 | **Gate** | The project's checks, then measured design checks | [references/gate.md](references/gate.md) | | 7 | **Look** | Render at four widths, hover every control, fix what shows, up to three rounds | [look.md](references/look.md), [feels-cheap.md](references/feels-cheap.md), [hover.md](references/hover.md) | @@ -48,7 +48,7 @@ Also load, as the work needs them: the surface file for the mode ([web-app](refe 8. **Look before you show.** Render the real screen at 320, 390, 1440 and 2560 px (terminal: 60 and 120 columns). Do not claim a width looks fine if you did not render it. 9. **Measure, do not guess.** Run the scripts. The report's numbers come from them. 10. **Be honest.** If a check fails, say so with the output. If a step was skipped, say that. If something is left over, list it. -11. **Own the artwork, not only the skeleton.** A page is replaceable when only its layout is its own. Write the concept (`direction.md`) before the first scaffold, choose one signature, keep the rest calm, and pass the swap-the-name test at the gate. +11. **Own the frame, not only the artwork.** A good picture inside the usual layout is still a template. Write the concept (`direction.md`) before the first scaffold, take the layout from the shape of the artifact, carry one material through the page, keep the rest calm, and pass the swap and frame checks at the gate. 12. **Every control answers.** Each interactive element gets a designed hover and a press state, and a page gets one entrance. Look at the hover state, not only the resting one. ## Tools @@ -61,11 +61,12 @@ Plain Node 22+ scripts in `scripts/`, no installs, using the Chrome on the machi | `scripts/drift.mjs --save before.json` | Counts font sizes, weights, radii, colours, spacing in use; later `--against before.json` | | `scripts/signs.mjs [--allow "Tell"]` | Finds machine-made tells in the rendered page; `--allow` licenses devices a committed direction uses on purpose | | `scripts/check.mjs ` | Contrast, touch-target size, small text, missing names | -| `scripts/scaffold.mjs --theme dark --palette midnight` | Starts a landing page from a complete, tested starter: lit grainient ground, floating nav, product frame, bento, steps, closing call, footer, with the motion kit and open fonts wired in. Replace every `data-todo`; `signs.mjs` reports any left. `--minimal` drops the optional sections for a short brief. The lit gradient is the default of machine-built pages, so choose the ground on purpose: `--ground flat --palette cobalt|mint|sand` or `--ground frame` are first-class; `--hero card` crops the product card at the fold with a traced diagram and annotation chips; `--art column|vase|sphere|drape|strata` puts a duotone print in the split hero (a stand-in for the product's own artifact). `--kind app` starts an app screen instead: sidebar, header, key numbers, chart, table and empty state, tested the same way. `inline.mjs --out page.html` folds the result into one file | +| `scripts/scaffold.mjs --kind base` | Starts a page with the craft and no layout: type with tracking by size, controls, focus, colour, motion kit and open fonts; you write `page.css` from the concept. `--theme`, `--accent`, or `--palette` (a lit palette, or the flat tones `cobalt`, `mint`, `sand`). `--kind landing` (the default of the script) is the whole standard page, for a brief that asks for the standard shape or cannot spare the time; its frame is shared by every page started from it (flags in `landing-craft.md`). `--kind app` starts an app screen: sidebar, header, key numbers, chart, table and empty state. `inline.mjs --out page.html` folds the result into one file | | `scripts/lib-add.mjs add bencho ` | Pulls real source from Bencho, BoardUI, Aceternity or any shadcn registry (files only, with a licence notice and the packages to install). See `libraries.md` | | `scripts/craft.mjs [--shots dir]` | Hovers every control with a real pointer and diffs both the computed style and the pixels, so a control that ignores the pointer, or answers it invisibly, is caught; also flags transitions on layout properties and motion that ignores the reduced-motion setting | | `scripts/dotify.mjs --mode hex` | Turns any picture or drawn SVG into dithered, halftone, hex-dot, engraved-line or ASCII art for a hero object; `--fill` and `--bg` make it a two-colour duotone | -| `scripts/swap.mjs --nouns "clause,redline" --name Marrow` | The swap-the-name test: with the product name removed, does the first screen still use the product's own nouns, and does its artwork name the artifact? Refuses nouns that fit any product. Catches a page where only the skeleton is owned | +| `scripts/swap.mjs --nouns "tide,harbour" --name Neap` | The swap-the-name test: with the product name removed, does the first screen still use the product's own nouns, and does its artwork name the artifact? Refuses nouns that fit any product. Reads the first screen only | +| `scripts/frame.mjs [...]` | Is the skeleton its own? Compares nav, composition, section order and style traits with the landing starter and with sibling pages, and requires a `data-device` material that runs through the page. A pass means "not the same skeleton", never "distinctive" | | `scripts/score.mjs ` | Runs every check and prints one score out of 100 | | `scripts/term-shot.mjs -- ` | Runs a terminal command at a given width and captures text and image (needs Python 3) | diff --git a/assets/recipes/annotate.mjs b/assets/recipes/annotate.mjs index cd6b8bd..0003c91 100644 --- a/assets/recipes/annotate.mjs +++ b/assets/recipes/annotate.mjs @@ -3,7 +3,7 @@ // the chip says what to look at, the arrow says where, the lines say how the card connects to the rest. // // import { chip, heroDiagram, annotationCss } from './annotate.mjs'; -// chip({ label: 'Clause 4.2 deviates', x: 8, y: 30, pointer: 'br' }) // HTML, positioned in % of its parent +// chip({ label: 'High water 14:10', x: 8, y: 30, pointer: 'br' }) // HTML, positioned in % of its parent // heroDiagram({ width: 1200, height: 520, card: { x: 200, y: 250, w: 800 }, seed: 2 }) // an SVG string // // Rules that keep it honest (references/directions.md, "Annotations"): a chip points at something real in the diff --git a/assets/recipes/duotone.mjs b/assets/recipes/duotone.mjs index 19e8bf9..2663e5f 100644 --- a/assets/recipes/duotone.mjs +++ b/assets/recipes/duotone.mjs @@ -89,7 +89,7 @@ export const SUBJECTS = { return tone(0.5 - dx * 0.035 + (n(u * 9, v * 9) - 0.5) * 0.06); }); }, - // A cylinder on its side, cut into wavering layers: a core sample, a rolled length of tape, a stack of pages. + // A cylinder on its side, cut into wavering layers: banded rock, a rolled length of tape, a stack of pages. strata(w, h, { seed = 1 } = {}) { const n = valueNoise(seed, 3); const tones = [0.9, 0.35, 0.65, 0.12, 0.78, 0.5]; diff --git a/assets/starters/base/base.css b/assets/starters/base/base.css new file mode 100644 index 0000000..cf46bcb --- /dev/null +++ b/assets/starters/base/base.css @@ -0,0 +1,48 @@ +/* Base: the craft without the layout. Colours come from theme.css (written by scaffold.mjs); the layout is yours, + in page.css. Every size is in rem, every space on the 4 px grid, every control has a hover and a press. */ +*, *::before, *::after { box-sizing: border-box; } +html { scroll-behavior: smooth; scroll-padding-top: 2rem; -webkit-text-size-adjust: 100%; } +body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } +@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } } +img, svg { display: block; max-width: 100%; } +figure { margin: 0; } +a { color: inherit; } +:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; } +.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } +.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: 0.75rem 1rem; background: var(--ink); color: var(--bg); border-radius: 0.5rem; } +.skip:focus { top: 1rem; } + +/* ---------- Shape: one radius decision for the whole page. 999px, 0.75rem or 0, and mean it. ---------- */ +:root { --shape: 999px; --gutter: clamp(1rem, 4vw, 3rem); } + +/* ---------- Type: roles, with tracking that follows size (evals/tracking.mjs) ---------- */ +.display { margin: 0; font: 400 clamp(2.75rem, 6vw, 6rem)/0.98 var(--sans); letter-spacing: -0.03em; text-wrap: balance; } +@media (min-width: 62rem) { .display { letter-spacing: -0.04em; } } +@media (min-width: 80rem) { .display { letter-spacing: -0.05em; } } +@media (min-width: 96rem) { .display { letter-spacing: -0.055em; } } +.h2 { margin: 0; max-width: 22ch; font: 400 clamp(2rem, 4vw, 3.5rem)/1.08 var(--sans); letter-spacing: -0.02em; text-wrap: balance; } +@media (min-width: 80rem) { .h2 { letter-spacing: -0.03em; } } +.h3 { margin: 0; font: 500 1.25rem/1.25 var(--sans); text-wrap: balance; } +.lede { max-width: 34rem; margin: 0; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; } +.note { margin: 0; font: 400 0.8125rem/1.4 var(--mono); color: var(--ink-3); } +.dim { color: var(--ink-3); } +.num { font-variant-numeric: tabular-nums; } +.dec { color: var(--ink-3); } +p { max-width: 65ch; text-wrap: pretty; } + +/* ---------- Controls ---------- */ +.m-btn { --btn-bg: var(--ink); --btn-ink: var(--bg); --btn-fill: var(--accent); --btn-ink-hover: var(--on-accent); --btn-ring: var(--accent); --btn-radius: var(--shape); font-family: var(--sans); white-space: nowrap; } +.m-btn.ghost { --btn-bg: transparent; --btn-ink: var(--ink); --btn-edge: var(--line-strong); --btn-fill: var(--ink); --btn-ink-hover: var(--bg); } +.m-btn.large { min-height: 3.25rem; padding: 0 1.5rem; font-size: 1rem; } +.m-link { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; } +.m-link:hover, .m-link:focus-visible { color: var(--accent); } +.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; } + +/* ---------- The few blocks every page needs, left plain ---------- */ +.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem var(--gutter); } +.brand { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; font: 500 1.0625rem/1 var(--sans); text-decoration: none; transition: color 180ms var(--m-ease); } +.brand:hover, .brand:focus-visible { color: var(--accent); } +:where(.first, .last) { padding: clamp(3rem, 8vw, 7rem) var(--gutter); } +:where(.first, .last) > * + * { margin-top: 1.5rem; } +.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--gutter); font: 400 0.8125rem/1.4 var(--mono); color: var(--ink-3); border-top: 1px solid var(--line); } +@media (max-width: 40rem) { .actions .m-btn { flex: 1 1 100%; justify-content: center; } } diff --git a/assets/starters/base/index.html b/assets/starters/base/index.html new file mode 100644 index 0000000..4433bec --- /dev/null +++ b/assets/starters/base/index.html @@ -0,0 +1,54 @@ + + + + + +Product name: what it does for whom + + + + + + + + + + + + + +
+ Product + Primary action +
+ +
+
+

+ What it does, + for whom. +

+

One or two plain sentences: what the product is, who it is for, and the result they get.

+

Primary action

+ +
+ +
+

One clear next step.

+

One sentence that makes the next step feel small.

+

Primary action

+
+
+ +
© Year CompanyA true line
+ + + + diff --git a/evals/briefs/15-held-out.md b/evals/briefs/15-held-out.md new file mode 100644 index 0000000..5279a3b --- /dev/null +++ b/evals/briefs/15-held-out.md @@ -0,0 +1,15 @@ +# Landing page: a product the skill has never mentioned + +Build a landing page for **Frame & Brood**, a hive inspection log for small beekeepers. At the hive, the keeper taps through the frames of a box and records what is on each one; the app keeps a history for every colony. + +Facts you may use, and nothing else: + +- One inspection records, frame by frame, how much of the frame is brood, honey, pollen or empty, in quarters. +- It also records whether the queen was seen, whether there are queen cells, and a note. +- It works offline at the apiary and syncs later. +- Each colony has a timeline of its inspections, and the app reminds the keeper when the next one is due, on an interval the keeper sets. +- Records export as CSV. +- Free for up to three hives; then £4 per month. +- Made in Hereford. + +Do not invent customer names, counts, yields, accuracy figures, awards or claims. Any inspection or figure you draw must be marked as example data. One call to action: start your first hive. Output one self-contained HTML file. diff --git a/evals/results/2026-11-25-r6.md b/evals/results/2026-11-25-r6.md index a2b1d23..893dec7 100644 --- a/evals/results/2026-11-25-r6.md +++ b/evals/results/2026-11-25-r6.md @@ -14,7 +14,7 @@ Three briefs, each built once with no skill and once with the skill (same model | 13, Coreline (drill-core logging) | A product with an obvious native artifact: the strip log | | 14, Tern (shift scheduling) | A dull product with a weaker artifact: the rota grid | -Baseline agents were told to use no skills and not to read the skill folder. Skilled agents were told to read `SKILL.md`, follow the nine steps, write the three-line concept, scaffold, and run the gate including `swap.mjs`. Nobody could be asked questions. The pages, the concepts and the data are in `evals/results/r6/` (`pages/`, `data.json`, and masked first screens in `shots/`). +Baseline agents were told to use no skills and not to read the skill folder. Skilled agents were told to read `SKILL.md`, follow the nine steps, write the three-line concept, scaffold, and run the gate including `swap.mjs`. Nobody could be asked questions. The pages, the concepts and the data are in `evals/results/r6/` (`pages/` and `data.json`). *Correction, 26 November: this write-up first said the masked first screens were kept in `shots/`. They were not committed (`shots/` is ignored by git); `evals/mask.mjs` regenerates them from `pages/`.* ## Mechanical and feel numbers @@ -76,6 +76,7 @@ On the finished pages, `swap.mjs` first **failed two of the three baselines** (b ## Limits +- *Found on 26 November:* the skill's own text used all three eval products as examples (a marked-up contract clause, a strip log of drill cores, a rota). Only the skilled arm read it. This may have helped the skilled pages' artwork and anchored their choices, so the product-identification result in particular is not clean. The examples have since been replaced. - Same model on both sides, and the judges are the same model family as the builders, which may share taste. - Three briefs, one build per arm per brief. The spread between two builds by one model is unknown; round 5's baseline (83) against this round's (75) on the same brief suggests it is not small. - Two judges on the visible-text condition and one on the blurred condition. No real users. diff --git a/evals/results/2026-11-26-r7.md b/evals/results/2026-11-26-r7.md new file mode 100644 index 0000000..11deead --- /dev/null +++ b/evals/results/2026-11-26-r7.md @@ -0,0 +1,90 @@ +# Round 7, 26 November 2026 + +The question: with the changes made after round 6 (a base starter with no layout, a layout and a material taken from the product's artifact, a frame check), **does the skilled page now beat a page built with no skill on distinctiveness?** + +**Short answer: no. The bar was that skilled pages beat the baseline, and they did not.** They did better than in round 6 on some measures, they were still remembered less and judged more swappable, and all three judges grouped all four skilled pages as one hand. + +## What was run + +| Brief | Baseline | Skilled | +| --- | --- | --- | +| 12, Marrow (contract review) | the round 6 page, reused | new build | +| 13, Coreline (drill-core logging) | the round 6 page, reused | new build | +| 14, Tern (shift scheduling) | the round 6 page, reused | new build | +| 15, Frame & Brood (hive inspections), **held out** | new build | new build | + +Same model on both sides. Skilled agents got a copy of the skill at commit `3917263` without the `evals/` folder, so they could not read earlier pages or verdicts. Baseline agents were told to use no skills. The first brief 14 skilled agent got a prompt with the brief missing, built nothing, and was rerun with the full brief. Brief 15 was written for this round and its subject appears nowhere in the skill. + +Pages, concepts and data are in `evals/results/r7/`. The masked screenshots are not committed; `evals/mask.mjs` regenerates them. + +## Blind judges + +Two fresh judges each saw four pairs with names masked (three desktop screens and a phone screen per page, combined in one image), with their own random A/B order. + +| | Baseline | Skilled | Round 6 skilled (6 judgements) | +| --- | --- | --- | --- | +| Page that could more easily belong to another product (8 judgements) | 2 | **6** | 6 of 6 | +| Page remembered a day later (8) | **6** | 2 | 0 of 6 | +| Mean ownability, 1 to 5 (8) | 3.62 | 3.62 | 3.0 against 4.5 | +| Better designed (8; 2 equal) | 2 | **4** | 1 against 4 | + +By brief, both judges agreed on almost everything: + +| Brief | Remembered | Ownability, skilled / baseline | Better designed | +| --- | --- | --- | --- | +| 12 contracts | baseline, both | 3, 3 / 4, 4 | equal, both | +| 13 drill core | **skilled, both** | 5, 5 / 3, 3 | skilled, both | +| 14 scheduling | baseline, both | 3, 3 / 3, 3 | skilled, both | +| 15 hives (held out) | baseline, both | 3, 4 / 4, 5 | baseline, both | + +Brief 13 is the idea working: the strip log runs down the whole page and the sample editor is built into it. The judges: "B runs a strip log with depth ticks down the whole page and ties the highlighted layer to the sample editor, so the structure is the product." The held-out brief is the clearest loss. + +A third judge saw the eight first screens with all text blurred: all eight products identified correctly; mean ownability 4.0 skilled against 3.25 baseline. + +## One hand + +All three judges, independently, put all four skilled pages in one group. What they named: the same neutral grotesque, small-radius buttons with a ↗ arrow, an outlined button at top right, headline on the left with copy and button to the right, thin rules, flat pale grounds, tiny mono "Example data" captions. + +Most of that is the base starter and the motion kit: Geist for display and reading, `.m-arrow` on the primary button, the mono `.note`, a pale default ground in light theme. Removing the layout moved the sameness into the type and the controls. + +`frame.mjs` passed all four (highest pair 0.69, below the 0.75 line; highest pair among the baselines 0.72). **It does not see what the judges saw.** It compares structure and a few style traits, not the typeface, the button's furniture or the caption habit. + +## Mechanical and feel numbers + +From the skill's own instruments, which the skilled arm ran, so they favour it by construction. + +| Brief | Mechanical, baseline / skilled | Feel, baseline / skilled | +| --- | --- | --- | +| 12 | 75 / 100 | 33 / 79 | +| 13 | 38 / 98 | 50 / 66 | +| 14 | 17 / 100 | 43 / 61 | +| 15 | 77 / 81 | 35 / 73 | +| Mean | 52 / 95 | 40 / 70 | + +The skilled feel mean fell from 81 in round 6 to 70 on briefs built from the base starter, which wires in less motion than the full landing starter. The brief 15 mechanical score is held down by a tell scan that fired 105 times on small patterned data keys (a suspected false positive, not fixed). + +## What the builders reported + +- `--accent` wrote a derived colour instead of the one given (two builders). **Fixed after the round.** +- The base's `.first` rule overrode their layouts (two builders). **Fixed after the round.** +- `check.mjs` reported false contrast on text in a label with a custom checkbox. Not fixed. +- `signs.mjs` "Gradient logo tile" fires on small patterned data keys, and `score.mjs` cannot allow it. Not fixed. +- `check.mjs` and `craft.mjs` only see the loaded state; `craft.mjs` skips visually hidden radio inputs. Not fixed. +- `shoot.mjs --full` caught a headline mid-entrance in one run. Not fixed. + +## Limits + +- **Judge noise is large.** The three reused baseline pages scored 4.5 mean ownability from round 6's judges and 3.33 from this round's. So the change in ownability between rounds (3.0 to 3.67 on the same three briefs) is smaller than the change between judges, and is not evidence of improvement. Within this round, with the same judges, the arms tie. +- Same model family builds and judges. Two judges, plus one on blurred screens. No real users. +- One build per arm per brief. +- The changes were designed from round 6's verdicts on briefs 12 to 14. Brief 15 was held out, and there the skilled page lost. +- The frame check's weights and threshold were set against the round 6 pages. +- Each page was combined into one image this round; round 6 judges saw separate screenshots. + +## Next steps (proposals, not done) + +1. **Make type and controls part of the concept.** The base should not decide the typeface, the button arrow or the caption style. That needs more than one display face to choose from, which means adding licensed font files (a decision for the owner). +2. **Strip the base further:** no `.m-arrow` and no mono captions by default. +3. **Teach the frame check what the judges saw:** typeface family name, button furniture, ground lightness. Treat it as a smoke alarm, not a verdict. +4. **Study the wins.** The two baselines remembered most and brief 13's skilled page each commit to one physical idea from the product all the way through. "Mark an element `data-device`" is weaker than that. +5. **Next round:** new briefs only, three builds per arm, and a judge from a different model. diff --git a/evals/results/r7/data.json b/evals/results/r7/data.json new file mode 100644 index 0000000..53b2b8a --- /dev/null +++ b/evals/results/r7/data.json @@ -0,0 +1,443 @@ +{ + "scores": { + "12-plain-landing/baseline": { + "score": 75, + "breakdown": { + "tellKinds": 1, + "tellInstances": 1, + "checkProblems": 4, + "driftFlags": 7, + "sideways": false, + "consoleErrors": false + }, + "feel": 33, + "hover": "9/10" + }, + "12-plain-landing/skilled": { + "score": 100, + "breakdown": { + "tellKinds": 0, + "tellInstances": 0, + "checkProblems": 0, + "driftFlags": 0, + "sideways": false, + "consoleErrors": false + }, + "feel": 79, + "hover": "11/11" + }, + "13-native-artifact/baseline": { + "score": 38, + "breakdown": { + "tellKinds": 1, + "tellInstances": 28, + "checkProblems": 13, + "driftFlags": 8, + "sideways": true, + "consoleErrors": false + }, + "feel": 50, + "hover": "8/14" + }, + "13-native-artifact/skilled": { + "score": 98, + "breakdown": { + "tellKinds": 0, + "tellInstances": 0, + "checkProblems": 0, + "driftFlags": 1, + "sideways": false, + "consoleErrors": false + }, + "feel": 66, + "hover": "3/3" + }, + "14-plain-scheduling/baseline": { + "score": 17, + "breakdown": { + "tellKinds": 3, + "tellInstances": 50, + "checkProblems": 19, + "driftFlags": 8, + "sideways": true, + "consoleErrors": false + }, + "feel": 43, + "hover": "30/72" + }, + "14-plain-scheduling/skilled": { + "score": 100, + "breakdown": { + "tellKinds": 0, + "tellInstances": 0, + "checkProblems": 0, + "driftFlags": 0, + "sideways": false, + "consoleErrors": false + }, + "feel": 61, + "hover": "7/7" + }, + "15-held-out/baseline": { + "score": 77, + "breakdown": { + "tellKinds": 1, + "tellInstances": 2, + "checkProblems": 2, + "driftFlags": 8, + "sideways": false, + "consoleErrors": false + }, + "feel": 35, + "hover": "21/28" + }, + "15-held-out/skilled": { + "score": 81, + "breakdown": { + "tellKinds": 1, + "tellInstances": 105, + "checkProblems": 0, + "driftFlags": 3, + "sideways": false, + "consoleErrors": false + }, + "feel": 73, + "hover": "25/25" + } + }, + "frame": { + "skilled": { + "pages": [ + { + "page": "12-plain-landing-skilled", + "traits": { + "nav": "plain", + "composition": "art below", + "align": "left", + "container": "full bleed", + "sequence": [ + "steps", + "text", + "big number" + ], + "button": "rounded", + "headlineFont": "serif", + "ground": "light" + }, + "device": { + "pass": true, + "found": [ + { + "name": "change-bar", + "sections": 3, + "firstScreen": true, + "runsThrough": false, + "pass": true + } + ], + "reason": null + } + }, + { + "page": "13-native-artifact-skilled", + "traits": { + "nav": "bar", + "composition": "art beside", + "align": "left", + "container": "full bleed", + "sequence": [ + "table", + "picture", + "text", + "big number" + ], + "button": "rounded", + "headlineFont": "sans", + "ground": "light" + }, + "device": { + "pass": true, + "found": [ + { + "name": "depth-scale", + "sections": 6, + "firstScreen": true, + "runsThrough": true, + "pass": true + } + ], + "reason": null + } + }, + { + "page": "14-plain-scheduling-skilled", + "traits": { + "nav": "plain", + "composition": "art below", + "align": "left", + "container": "open", + "sequence": [ + "text", + "picture", + "steps", + "big number", + "closing line" + ], + "button": "rounded", + "headlineFont": "sans", + "ground": "light" + }, + "device": { + "pass": true, + "found": [ + { + "name": "cant-work-hatch", + "sections": 3, + "firstScreen": true, + "runsThrough": false, + "pass": true + } + ], + "reason": null + } + }, + { + "page": "15-held-out-skilled", + "traits": { + "nav": "plain", + "composition": "art below", + "align": "left", + "container": "inset panel", + "sequence": [ + "steps", + "picture", + "picture", + "price", + "closing line" + ], + "button": "rounded", + "headlineFont": "sans", + "ground": "light" + }, + "device": { + "pass": true, + "found": [ + { + "name": "quarters", + "sections": 6, + "firstScreen": true, + "runsThrough": false, + "pass": true + } + ], + "reason": null + } + } + ], + "pairs": [ + { + "a": "12-plain-landing-skilled", + "b": "13-native-artifact-skilled", + "score": 0.48 + }, + { + "a": "12-plain-landing-skilled", + "b": "14-plain-scheduling-skilled", + "score": 0.64 + }, + { + "a": "12-plain-landing-skilled", + "b": "15-held-out-skilled", + "score": 0.57 + }, + { + "a": "13-native-artifact-skilled", + "b": "14-plain-scheduling-skilled", + "score": 0.39 + }, + { + "a": "13-native-artifact-skilled", + "b": "15-held-out-skilled", + "score": 0.32 + }, + { + "a": "14-plain-scheduling-skilled", + "b": "15-held-out-skilled", + "score": 0.69 + } + ], + "starter": [ + { + "page": "12-plain-landing-skilled", + "starter": "card", + "score": 0.29 + }, + { + "page": "13-native-artifact-skilled", + "starter": "split", + "score": 0.42 + }, + { + "page": "14-plain-scheduling-skilled", + "starter": "card", + "score": 0.32 + }, + { + "page": "15-held-out-skilled", + "starter": "card", + "score": 0.35 + } + ] + }, + "baseline": { + "pages": [ + { + "page": "12-plain-landing-baseline", + "traits": { + "nav": "plain", + "composition": "art below", + "align": "left", + "container": "open", + "sequence": [ + "big number" + ], + "button": "square", + "headlineFont": "serif", + "ground": "tinted" + }, + "device": { + "pass": false, + "found": [], + "reason": "no element is marked data-device: name the material in the concept and draw it in the page" + } + }, + { + "page": "13-native-artifact-baseline", + "traits": { + "nav": "plain", + "composition": "art below", + "align": "left", + "container": "open", + "sequence": [ + "picture", + "columns", + "text", + "picture", + "big number" + ], + "button": "square", + "headlineFont": "serif", + "ground": "tinted" + }, + "device": { + "pass": false, + "found": [], + "reason": "no element is marked data-device: name the material in the concept and draw it in the page" + } + }, + { + "page": "14-plain-scheduling-baseline", + "traits": { + "nav": "bar", + "composition": "art below", + "align": "left", + "container": "open", + "sequence": [ + "text", + "text", + "cards", + "price" + ], + "button": "pill", + "headlineFont": "sans", + "ground": "tinted" + }, + "device": { + "pass": false, + "found": [], + "reason": "no element is marked data-device: name the material in the concept and draw it in the page" + } + }, + { + "page": "15-held-out-baseline", + "traits": { + "nav": "plain", + "composition": "art below", + "align": "left", + "container": "full bleed", + "sequence": [ + "text", + "text", + "text", + "table", + "price", + "closing line" + ], + "button": "rounded", + "headlineFont": "sans", + "ground": "light" + }, + "device": { + "pass": false, + "found": [], + "reason": "no element is marked data-device: name the material in the concept and draw it in the page" + } + } + ], + "pairs": [ + { + "a": "12-plain-landing-baseline", + "b": "13-native-artifact-baseline", + "score": 0.72 + }, + { + "a": "12-plain-landing-baseline", + "b": "14-plain-scheduling-baseline", + "score": 0.4 + }, + { + "a": "12-plain-landing-baseline", + "b": "15-held-out-baseline", + "score": 0.4 + }, + { + "a": "13-native-artifact-baseline", + "b": "14-plain-scheduling-baseline", + "score": 0.47 + }, + { + "a": "13-native-artifact-baseline", + "b": "15-held-out-baseline", + "score": 0.46 + }, + { + "a": "14-plain-scheduling-baseline", + "b": "15-held-out-baseline", + "score": 0.48 + } + ], + "starter": [ + { + "page": "12-plain-landing-baseline", + "starter": "card", + "score": 0.24 + }, + { + "page": "13-native-artifact-baseline", + "starter": "card", + "score": 0.29 + }, + { + "page": "14-plain-scheduling-baseline", + "starter": "card", + "score": 0.29 + }, + { + "page": "15-held-out-baseline", + "starter": "card", + "score": 0.25 + } + ] + } + } +} diff --git a/evals/results/r7/judge-key.json b/evals/results/r7/judge-key.json new file mode 100644 index 0000000..1f5027d --- /dev/null +++ b/evals/results/r7/judge-key.json @@ -0,0 +1,44 @@ +{ + "key": { + "12-plain-landing/baseline": "P1", + "12-plain-landing/skilled": "P7", + "13-native-artifact/baseline": "P2", + "13-native-artifact/skilled": "P3", + "14-plain-scheduling/baseline": "P8", + "14-plain-scheduling/skilled": "P4", + "15-held-out/baseline": "P5", + "15-held-out/skilled": "P6" + }, + "assign": { + "j1": { + "pair1-A": "12-plain-landing/skilled", + "pair1-B": "12-plain-landing/baseline", + "pair2-A": "13-native-artifact/baseline", + "pair2-B": "13-native-artifact/skilled", + "pair3-A": "14-plain-scheduling/skilled", + "pair3-B": "14-plain-scheduling/baseline", + "pair4-A": "15-held-out/baseline", + "pair4-B": "15-held-out/skilled" + }, + "j2": { + "pair1-A": "12-plain-landing/skilled", + "pair1-B": "12-plain-landing/baseline", + "pair2-A": "13-native-artifact/baseline", + "pair2-B": "13-native-artifact/skilled", + "pair3-A": "14-plain-scheduling/baseline", + "pair3-B": "14-plain-scheduling/skilled", + "pair4-A": "15-held-out/skilled", + "pair4-B": "15-held-out/baseline" + }, + "blur": { + "A": "14-plain-scheduling/skilled", + "B": "15-held-out/baseline", + "C": "13-native-artifact/skilled", + "D": "12-plain-landing/baseline", + "E": "14-plain-scheduling/baseline", + "F": "12-plain-landing/skilled", + "G": "15-held-out/skilled", + "H": "13-native-artifact/baseline" + } + } +} \ No newline at end of file diff --git a/evals/results/r7/judges.md b/evals/results/r7/judges.md new file mode 100644 index 0000000..dc942de --- /dev/null +++ b/evals/results/r7/judges.md @@ -0,0 +1,26 @@ +# Round 7 judges' answers + +Transcribed from each judge's reply; reasons are condensed except where quoted. `judge-key.json` maps each pair side and each blurred letter to a page. + +## Pairs + +| Pair (brief) | Judge | More swappable | Remembered | Ownability A / B | Better designed | +| --- | --- | --- | --- | --- | --- | +| 1 (12) | one | A | B | 3 / 4 | equal | +| 2 (13) | one | A | B | 3 / 5 | B | +| 3 (14) | one | A | B | 3 / 3 | A | +| 4 (15) | one | B | A | 4 / 3 | A | +| 1 (12) | two | A | B | 3 / 4 | equal | +| 2 (13) | two | A | B | 3 / 5 | B | +| 3 (14) | two | B | A | 3 / 3 | B | +| 4 (15) | two | A | B | 4 / 5 | B | + +## Same template or same hand + +- Judge one, "the strongest template match": 2-B, 3-A, 4-B and 1-A (all four skilled pages): "an off-white ground, a similar grotesk with small mono captions, hairline and black section rules, small-radius buttons with a ↗ arrow, 'Example data' notes and flat diagrams." +- Judge two, "strongest match": 1A, 2B, 3B, 4A (all four skilled pages): "a neutral grotesque for body text … small-radius buttons with a ↗ arrow … headline on one side with the subtext and button beside it … thin horizontal rules, flat panels and tiny mono captions." +- Both also found a second group among baseline pages (cream or tinted grounds, → buttons, dashed "Example data" chips). + +## Blurred first screens + +Product identified correctly for 8 of 8. Ownability: A 3, B 5, C 5, D 2, E 3, F 4, G 4, H 3. Groups: D, E, H ("warm cream ground, a very large heavy headline stacked on the left … a solid CTA with a mono price note"); A, F, G with C close behind ("cool or neutral flat ground, outline button in the top right … an up-right arrow … hairlines, restrained corners"), which is all four skilled pages. diff --git a/evals/results/r7/pages/12-plain-landing-baseline.html b/evals/results/r7/pages/12-plain-landing-baseline.html new file mode 100644 index 0000000..89edfe0 --- /dev/null +++ b/evals/results/r7/pages/12-plain-landing-baseline.html @@ -0,0 +1,341 @@ + + + + + +Marrow: contract review for small law firms + + + + +
+ +
+ Marrow. + +
+ +
+
+
+

Every contract, read against a generic standard yours.

+

Marrow reads a contract, marks the clauses that deviate from your firm's own standard positions, and drafts a suggested redline. A lawyer accepts or rejects every change.

+ Start a free trial +

Free for one matter. Works on Word and PDF files.

+
+ +
+
+
+ Services agreement (example) + 3 changes waiting for a lawyer +
+
+ +
+
+

Liability

+

The Supplier's liability under this Agreement is unlimited limited to the fees paid under this Agreement.

+
+
+ Differs from your standard + Your firm caps supplier liability at the fees paid. +
+
+
+
+ +
+
+

Confidentiality

+

Each party shall keep the other's Confidential Information secret and use it only to perform this Agreement.

+
+
+ Matches your standard + Left alone. Marrow marks only what departs. +
+
+ +
+
+

Renewal

+

This Agreement renews automatically for successive terms only if both parties agree in writing.

+
+
+ Differs from your standard + Your firm does not accept automatic renewal. +
+
+
+
+ +
+
+

Governing law

+

This Agreement is governed by the law of New York England and Wales.

+
+
+ Differs from your standard + Your firm's position is English law. +
+
+
+
+ +
+

Nothing is sent by Marrow. Every change waits for a lawyer.0 of 3 decided

+
+

Try it. An illustrative contract, not a real one.

+
+
+ +
+

Terms of use

+ +
+
1.
+
+

It reads. It marks. It drafts.

+

Give Marrow a contract. It marks each clause that deviates from the firm's standard positions and drafts a suggested redline beside it. Clauses that match are left alone.

+
WordPDF
+
+
+ +
+
2.
+
+

The standard is yours.

+

Standard positions are set by the firm, not by Marrow. It measures a contract against what your partners decided, and says so beside every mark.

+
+
+ +
+
3.
+
+

A lawyer approves every change.

+

Marrow suggests. A lawyer accepts or rejects. Marrow never sends anything on its own.

+
+
+ +
+
4.
+
+

Documents stay in your region.

+

Documents stay in the firm's own region, EU or UK.

+
EU
UK
+
+
+ +
+
5.
+
+

Consideration.

+
+
FreeFor one matter.
+
£39Per lawyer, per month, after that.
+
+
+
+ +
+
+
+

Review your next contract with Marrow.

+ +

Free for one matter, then £39 per lawyer per month.

+
+
+
+
+ +
+ Marrow. Made in London. + Word and PDF. EU or UK. +
+
+ + + + diff --git a/evals/results/r7/pages/12-plain-landing-skilled-concept.txt b/evals/results/r7/pages/12-plain-landing-skilled-concept.txt new file mode 100644 index 0000000..4f736b1 --- /dev/null +++ b/evals/results/r7/pages/12-plain-landing-skilled-concept.txt @@ -0,0 +1,12 @@ +Artifact: one contract clause that departs from the firm's position: their words struck through, the suggested words underlined, the position noted in the margin, and a lawyer's Accept or Reject. +Without the category word: a sheet of contract clauses with red marks, the firm's own rule beside each mark, and two buttons that only a person can press. +Signature: the redline answers the reader. Accept settles the new wording into ink, Reject keeps the original, undecided stays red. Ground: flat paper, because the artifact is a sheet and red must mean only "a change". +Layout: a sheet. Three shared columns run down the whole page (lead for clause numbers, text, margin for notes and decisions); the headline and every section hang on them. +Material: the change bar drafters rule beside an altered line. Red where a decision is waiting, ink once taken; it recurs beside the lawyer's part and beside the trial. + +Product: Marrow reads contracts for small law firms, marks departures from the firm's standard positions and drafts a redline for a lawyer to decide. +Character: exact, quiet, accountable. +World: paper, ink, the red pen, the margin. +Moments: the example clauses on the first screen. +Signature detail: the change bar. +Must not look like: a software dashboard or a chat window with a gradient behind it. diff --git a/evals/results/r7/pages/12-plain-landing-skilled.html b/evals/results/r7/pages/12-plain-landing-skilled.html new file mode 100644 index 0000000..9a8d18b --- /dev/null +++ b/evals/results/r7/pages/12-plain-landing-skilled.html @@ -0,0 +1,692 @@ + + + + + +Marrow: contract review against your firm’s positions + + + + + + + + + + + +
+ Marrow + +
+ +
+
+

Marrow marks where a contract leaves your firm’s positions

+

An AI assistant for small law firms. It reads Word and PDF contracts and drafts a suggested redline for a lawyer to accept or reject.

+
+ Start a free trial +

Free for one matter.
Then £39 per lawyer per month

+
+ +
+
+

Example clauses and positions, written for this page

+

3 changes waiting for a lawyer

+
+ +
+ + 8.1 +

Each party’s total liability under this agreement is Struck out: unlimited Suggested: limited to the fees paid under it.

+
+

Your position Liability is capped at the fees paid.

+
+ + +
+
+
+
+ +
+ 8.2 +

Nothing in this agreement limits liability that cannot be limited by law.

+

No departure here, so no mark

+
+ +
+ + 9.1 +

The supplier may end this agreement Struck out: at any time without notice Suggested: only by giving reasonable written notice.

+
+

Your position An agreement ends only on written notice.

+
+ + +
+
+
+
+ +
+ + 12.1 +

This agreement is governed by the law of Struck out: the supplier’s home country Suggested: England and Wales.

+
+

Your position Our contracts follow the law of England and Wales.

+
+ + +
+
+
+
+
+
+ +
+

Every change waits for a lawyer

+
    +
  1. +

    Your firm sets the positions

    +

    The standard positions are yours. Marrow does not set them.

    +
  2. +
  3. +

    Marrow marks and drafts

    +

    It reads the contract, marks the clauses that deviate from those positions and drafts a suggested redline.

    +
  4. +
  5. + +

    Your lawyer decides

    +

    Each suggestion is theirs to accept or reject. A lawyer always approves every change.

    +
  6. +
+

Marrow never sends anything on its own.

+
+ +
+
+

Your documents stay in your region

+
+
A firm in the EU
Documents stay in the EU
+
A firm in the UK
Documents stay in the UK
+
File types
Word and PDF
+
+
+
+ +
+
+ +

Try Marrow on one matter

+

The free trial covers one matter. A lawyer approves every change, in the trial and after it.

+
+ +

+
+
+

£39per lawyer per month, after the free trial

+
+
+ +
MarrowMade in London
+ + + + + diff --git a/evals/results/r7/pages/13-native-artifact-baseline.html b/evals/results/r7/pages/13-native-artifact-baseline.html new file mode 100644 index 0000000..5519508 --- /dev/null +++ b/evals/results/r7/pages/13-native-artifact-baseline.html @@ -0,0 +1,681 @@ + + + + + +Coreline: log the core, the strip log draws itself + + + + + + + + + + +
+ +
+ +
+
+
+

Field logging for drill coreMade in Aberdeen

+

Log the core. The strip log
draws itself.

+

Coreline is a field-logging app for geologists who log drill core. Record each sample of a run on your phone, offline. The strip log for the report is drawn from them.

+
+ Start a free project + + +

Free for one project. Then £19 per geologist per month.

+
+
+ +
+ Try it. The phone and the log are live + + All logs and depths on this page are example data +
+ +
+ +
+
+
+

Log a sample

+ Example +
+
+ Offline + +
+
+
+ New sample +
+ Depth, metres +
+ + +
+
+
+ Rock type (example list) +
+
+
+ Colour +
+ +
+
+ Photo + +
+ +
+
+

+ +
+
+ + +
+
+
+ Strip log +

Hole EX-01, run 1

+
Depth in metres
+
+
+ Example data + 6 samples +
+
+
+
+
+
+ + + +
+
+
+
+
+
+ +
+
+
+ One run, start to finish +

From the first sample to the signed log

+
+
+
+
01Field
+ +

Log on your phone, offline

+

Log a core run in the field with no signal. It syncs when there is signal.

+
+
+
02Sample
+ +

Five things per sample

+

Depth from and to in metres, a rock type from your firm's own list, a colour and a photo.

+
+
+
03Log
+ +

The strip log draws itself

+

It is drawn automatically from the samples and exports as PDF or CSV.

+
+
+
04Sign
+ +

A geologist signs each run

+

Nothing is final until it is signed.

+
+
+
+
+ +
+
+
+ Rock types +

Your firm's list, drawn your way

+

Each sample takes its rock type from the firm's own list. Below is an example list with the hatching the strip log uses to draw each one.

+
+
+

Example list. Yours is your firm's.

+
+
+ +
+
+
+ Sign-off +

Nothing is final until it is signed

+

A geologist signs off each run. Until then, a run is a draft. Once it is signed, it is a log.

+

Two states of the same example run

+
+
+
+
+ +
+
+
+ Price +

Free for your first project

+
+
+
+ To start +
£0
+

Free for one project.

+
+
then
+
+ After that +
£19 per geologist per month
+

Each geologist on your team.

+
+
+
+

Open a project, log your first run, and see the strip log drawn.

+ Start a free project + + +
+
+
+ +
+
+ Coreline + Made in Aberdeen. +

All logs, depths and figures on this page are example data.

+
+
+ + + + diff --git a/evals/results/r7/pages/13-native-artifact-skilled-concept.txt b/evals/results/r7/pages/13-native-artifact-skilled-concept.txt new file mode 100644 index 0000000..a565168 --- /dev/null +++ b/evals/results/r7/pages/13-native-artifact-skilled-concept.txt @@ -0,0 +1,12 @@ +Artifact: the strip log of one example hole: a depth scale and a column of rock layers, each drawn from a sample record (depth from and to, rock type, colour, photo). +Without the category word: a column of hatched rock layers on a metre scale runs down the whole page; beside layer 3 sits its sample record; change the rock type or colour and that layer redraws. +Signature: the sample record redraws its own layer in the column, and the same row in the table, CSV and PDF sheet. Ground: flat cool log-sheet white, because the rock colours must be the only colour on a page that is a printed sheet. +Layout: down. The page is the log sheet: depth track, lithology column the full height, description track holding every section, section rules landing on layer contacts. +Material: the depth scale (ticks and metres computed from the drawing, with lithology hatching), from the first screen to the 1 m scale bar in the title block. + +Product: Coreline lets geologists log drill core on a phone, offline, and draws the strip log for the report. +Character: exact, field-plain, readable. +World: log sheets, core trays, hatching conventions. +Moments: the lithology column; the sample record that drives it. +Signature detail: an orange bracket marking the one layer you can edit. +Not: a dashboard template or an outdoor-adventure brand in earth gradients. diff --git a/evals/results/r7/pages/13-native-artifact-skilled.html b/evals/results/r7/pages/13-native-artifact-skilled.html new file mode 100644 index 0000000..1848a92 --- /dev/null +++ b/evals/results/r7/pages/13-native-artifact-skilled.html @@ -0,0 +1,997 @@ + + + + + +Coreline: drill core logging for geologists, with the strip log drawn for you + + + + + + + + + + + + + +
+
+ Coreline +

Drill core logging for geologists

+ Start a free project +
+ +
+ + +
+
+ + +
+ +
+

+ Log the core on site. + The strip log draws itself. +

+
+

For geologists: record each sample on your phone, even offline. Coreline draws the column that goes into your report.

+
+

Start a free project

+

Free for one project, then £19 per geologist per month

+
+
+ +
+
+

Sample 3

+

Example record. No signal: saved on this phone.

+
+
+

Depth, m

+
+
From
1.84
+
To
2.96
+
+
+
+ Rock type, from your firm’s list +
+ + + + +
+
+
+ Colour +
+ + + + +
+
+
+

Photo

+ +
Example photo, drawn
+
+

Pick a rock type or colour. Layer 3 in the strip log redraws.

+

+
+
+ +
+
+

Log it where the core is

+

Coreline works offline. Each sample keeps its depth from and to in metres, a rock type from your firm’s own list, a colour and a photo. It syncs when there is signal.

+
+
+ + + + + + + + + + +
Example: two samples synced, three waiting for signal
SampleDepth, mDescriptionWhere it is
10.00 to 0.90Light grey sandstoneSynced
20.90 to 1.84Dark grey mudstoneSynced
31.84 to 2.96Buff sandstoneOn this phone
42.96 to 3.36Greenish grey siltstoneOn this phone
53.36 to 4.80Red-brown mudstoneOn this phone
+
+
+ +
+
+

From samples to the report

+

The strip log is drawn automatically from your samples. Export it as a PDF or as a CSV.

+
+
+
+ +
PDF, example sheet
+
+
+
from_m,to_m,rock_type,colour
+0.00,0.90,Sandstone,Light grey
+0.90,1.84,Mudstone,Dark grey
+1.84,2.96,Sandstone,Buff
+2.96,3.36,Siltstone,Greenish grey
+3.36,4.80,Mudstone,Red-brown
+
CSV, example file with illustrative column names
+
+
+
+ +
+
+

Nothing is final until it is signed

+

A geologist signs off each run.

+
+
    +
  1. + +
    +

    Not signed

    +

    The run is not final.

    +
    +

    Geologist’s signature

    +
    +
  2. +
  3. + +
    +

    Signed

    +

    The run is final.

    +
    +

    Geologist’s signature, example

    +
    +
  4. +
+
+ +
+
+

Start with one project, free

+
+
+
Your first project
Free
+
After that, per geologist per month
£19
+
+

Start a free project

+
+
+
+ +
+

Coreline

+

Made in Aberdeen

+
1 m at this page’s scale
+

Every depth, rock type, colour and photo on this page is example data.

+
+
+ + + + + diff --git a/evals/results/r7/pages/14-plain-scheduling-baseline.html b/evals/results/r7/pages/14-plain-scheduling-baseline.html new file mode 100644 index 0000000..fdbd4bd --- /dev/null +++ b/evals/results/r7/pages/14-plain-scheduling-baseline.html @@ -0,0 +1,656 @@ + + + + + +Tern: shift scheduling for small cafes and shops + + + + + + + +
+ +
+
Mon Shift scheduling for small cafes and shops
+

Build the week.Tern checks it.

+

Drag shifts onto a weekly grid. Tern warns you when someone is double-booked, or would go over the hours agreed in their contract.

+
+ Try it free + Free for up to 10 staff +
+ +
+
+

The week Example data

+
+
+
+

Drag a shift onto the grid

+
+

Scroll the grid sideways

+
+
+
+ Example rota. Names, shifts and agreed hours are made up. Tap a shift above, then tap a cell, if dragging is awkward. Drag a shift back to the tray to remove it. + +
+
+
+
+ +
+
+
+
Tue Availability
+

Staff say when they can't.

+

Everyone enters the days they can and cannot work. You build the week with that in front of you.

+

Try it. Pick a person, tap a day, and look at the grid above. The day is marked.

+
+
+
+
+
Example dataTap a day to switch between can work and can't work.
+
+
+
+ +
+
+
Wed Two rules, checked as you go
+

It speaks up when the rota breaks a rule.

+
+
+

Double-booked

+

The same person, two shifts, overlapping hours on one day. Tern flags both shifts.

+
+
+
07
+
10
+
13
+
16
+
Open 07:00–13:00
+
Mid 10:00–16:00
+
+
+
Example data3 hours overlap
+
+
+
+

Over contract hours

+

Add up a person's shifts for the week. If it goes past the hours agreed in their contract, Tern says so.

+
+
+
0 h12 h agreed18 h scheduled
+
Example data6 h over
+
+
+
+
+
+ +
+
+
Thu Phones and swaps
+

Staff see their shifts. You approve every swap.

+

Each person sees their own shifts on their phone and can ask to swap one. Nothing moves until you say yes. Try it: ask for a swap on the phone, then approve it as the manager.

+
+
+
+

Manager: swap requestsExample data

+
    +
    Every swap waits for the manager. The shift moves only on approval.
    +
    +

    An approved swap moves the shift on the grid at the top of the page. Watch the hours.

    +
    +
    +
    +
    AlexExample
    +
    +
    Your shifts this week
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    Fri Price
    +
    +
    Freefor up to 10 staff.
    Then £2 per person per month.
    +
    + +
    + + +
    Free£2 per person per month
    +
    +
    +
    +
    + +
    + +
    +
    Sun Done for the week
    +

    Next week,
    on a grid.

    +

    Free for up to 10 staff. Then £2 per person per month.

    + Try it free +
    Tern · shift scheduling for small cafes and shopsMade in Manchester.
    +
    +
    + + + + diff --git a/evals/results/r7/pages/14-plain-scheduling-skilled-concept.txt b/evals/results/r7/pages/14-plain-scheduling-skilled-concept.txt new file mode 100644 index 0000000..75e2905 --- /dev/null +++ b/evals/results/r7/pages/14-plain-scheduling-skilled-concept.txt @@ -0,0 +1,12 @@ +Artifact: next week's rota for a small cafe or shop, names down the side and Monday to Sunday across, at the moment a shift is moved and a row turns out double-booked or over contract hours. +Without the category word: a week of names and shift times across the whole screen; one Saturday cell holds two overlapping shifts, one person's hours total is marked over, and a yellow shift can be moved to someone else. +Signature: move the yellow Saturday shift (drag, tap or keyboard) and the double-booked and over-hours warnings answer. Ground: flat sheet white, because the rota grid is the picture and a lit ground would say nothing about it. +Layout: the grid. A name column, seven day columns and an hours column are the page's own columns; every section sits on them. +Material: the diagonal hatch that marks "can't work", on the hero rota, the availability row and the staff phone. + +Product: Tern lets a cafe or shop manager build the week's shifts and warns about double-bookings and contract hours. +Character: plain, exact, quick. +World: the printed rota pinned in the back room, marked with a highlighter. +Moments: the hero rota; the seven-column drawings of the two warnings. +Signature detail: highlighter yellow marks the thing you can act on (the movable shift and "Try it free"); red appears only on a broken rule. +Must not look like: a software dashboard in a card, or three feature tiles under a headline. diff --git a/evals/results/r7/pages/14-plain-scheduling-skilled.html b/evals/results/r7/pages/14-plain-scheduling-skilled.html new file mode 100644 index 0000000..6dcbdd9 --- /dev/null +++ b/evals/results/r7/pages/14-plain-scheduling-skilled.html @@ -0,0 +1,667 @@ + + + + + +Tern: shift rotas for small cafés and shops + + + + + + + + + + + + +
    + Tern + Try it free +
    + +
    +
    +
    +

    + A staff rota that warns you + when it breaks a rule +

    +
    +

    For small cafés and shops. Staff say when they can work, you drag shifts onto the week, and they see them on their phones.

    +

    Try it free Free for up to 10 staff

    +
    +
    + +
    +
    + Example rota. Names, shifts and hours are made up. + Move the yellow Saturday shift: drag it, or choose another Saturday box. +
    +
    +
    Staff
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    Hours
    +
    +
    Amira30 h contract
    +
    07:00 to 15:00
    +
    07:00 to 15:00
    +
    No shift
    +
    Can’t work
    +
    07:00 to 15:00
    +
    + + + +
    +
    No shift
    +
    24 / 30 hWithin
    +
    +
    +
    Ben16 h contract
    +
    Can’t work
    +
    Can’t work
    +
    09:00 to 15:00
    +
    12:00 to 18:00
    +
    No shift
    +
    + + + +
    +
    No shift
    +
    12 / 16 hWithin
    +
    +
    +
    Chloe24 h contract
    +
    12:00 to 18:00
    +
    No shift
    +
    Can’t work
    +
    07:00 to 13:00
    +
    No shift
    +
    + + Saturday: 12:00 to 18:00. + Double-booked +
    +
    Can’t work
    +
    24 / 24 hWithin
    +
    +
    +
    Dev20 h contract
    +
    No shift
    +
    12:00 to 18:00
    +
    07:00 to 15:00
    +
    No shift
    +
    Can’t work
    +
    + + + +
    +
    09:00 to 17:00
    +
    22 / 20 h2 h over
    +
    +
    +
    +

    Can’t work

    +
      +
    • Double-booked: Chloe, Saturday 12:00 to 15:00.
    • +
    • Over contract: Dev, 22 h against 20 h.
    • +
    +
    +
    +
    + +
    +
    +

    Staff say when they can work

    +

    Everyone enters when they can and cannot work. You build the week by dragging shifts onto the grid.

    +
    +
    +

    ChloeExample availability

    +
      +
    • MonCan work
    • +
    • TueCan work
    • +
    • WedCan’t work
    • +
    • ThuCan work
    • +
    • FriCan work
    • +
    • SatCan work
    • +
    • SunCan’t work
    • +
    +
    +
    + +
    +

    What sets off a warning

    + +
    +

    Double-booked

    Two shifts for one person cross over.

    Each day runs from 07:00 at the top to 19:00.

    + +

    Example, Chloe3 hoverlap

    +
    + +
    +

    Over contract hours

    A week would pass the hours agreed in someone’s contract.

    Hours add up day by day. Dashed line: 20 h.

    + +

    Example, Dev2 hover 20 h

    +
    +
    + +
    +
    +
    +

    Swaps wait for your yes

    +

    Staff see their shifts on their phone and can ask to swap. You approve every swap.

    +
    +
    +
    +

    Your shiftsDev

    +
      +
    1. Tue12:00 to 18:00
    2. +
    3. Wed07:00 to 15:00
    4. +
    5. FriCan’t work
    6. +
    7. Sun09:00 to 17:00Swap asked
    8. +
    +
    +
    Example, staff phone
    +
    +
    +
    +

    Dev asks to swap

    +

    Sunday
    09:00 to 17:00

    +

    Waiting for your approval

    +
    +
    Example, manager’s side
    +
    +
    +
    + +
    +
    +

    Price

    +

    Up to 10 staffFree

    + +
    +
    + +
    +
    +

    Put next week on the grid

    +

    Try it free Free for up to 10 staff

    +
    +
    +
    + +
    TernMade in Manchester
    + + + + diff --git a/evals/results/r7/pages/15-held-out-baseline.html b/evals/results/r7/pages/15-held-out-baseline.html new file mode 100644 index 0000000..82a7c57 --- /dev/null +++ b/evals/results/r7/pages/15-held-out-baseline.html @@ -0,0 +1,730 @@ + + + + + +Frame & Brood · A hive inspection log for small beekeepers + + + + + + + + +
    +
    + + Frame & Brood +
    + Start your first hive +
    + +
    +
    +
    +

    The box is open. Tap what you see.

    +
    +

    Frame & Brood is a hive inspection log for small beekeepers. At the hive, go through the box frame by frame and record what is on each one. Every colony keeps its own history.

    +
    + Start your first hive + Free for up to three hives,
    then £4 per month.
    +
    +
    +
    + + + +
    +
    +
    + Example data +

    Orchard hive, 18 May

    +
    + + +
    + +
    +
    +
    The boxChoose a frame
    +
    + +
    +
    +
    +
    +
    +
    +
    + +

    + +
    +
    +
    + +
    +

    Try it. Each band is a quarter of the frame. Tap one to switch between honey, pollen, brood and empty.

    +
      +
      + + +
      +
      + + +
      +
      + Your taps also change the history and CSV below. + +
      +
      +
      +
      +
      + +
      +
      +

      See what changed since last time.

      +

      Each colony has a timeline of its inspections. Read back through it to see which frames held brood, where the honey was and whether the queen was seen.

      +
      +
      +
      +

      Orchard hive

      + Example data +
      +
        +
        +
          +
        • Honey
        • +
        • Pollen
        • +
        • Brood
        • +
        • Empty
        • +
        +
        + +
        +
        +
        +

        You set the interval. It reminds you.

        +

        Choose how often you want to inspect. Frame & Brood reminds you when the next inspection is due.

        +
        +
        +
        + Example data +
        + Every + + + +
        +
        + +

        +
        +
        +
        + +
        +
        +

        No signal at the apiary? Carry on.

        +

        Frame & Brood works offline. Record the inspection at the hive, and it syncs later.

        +
        +
        + +
        +
        +
        +

        Take your records with you.

        +

        Export them as CSV and open them in a spreadsheet. The file below follows the example inspection at the top of the page. Column names are illustrative.

        +
        +
        +
        +
        Example dataorchard-hive.csv
        + +
        +
        + + + +
        dateframehoney_quarterspollen_quartersbrood_quartersempty_quartersqueen_seenqueen_cellsnote
        +
        +
        +
        +
        + +
        +

        What it costs.

        +
        +
        + +
        +
        Free
        +

        For up to three hives.

        +
        +
        +
        + +
        +
        £4per month
        +

        When you keep more than three.

        +
        +
        +
        +
        + +
        +

        Begin with one hive.

        +

        Record its first inspection frame by frame, and its history starts there.

        + + Start your first hive +
        +
        + +
        +
        +
        Frame & Brood
        +

        Made in Hereford.

        +
        +
        + + + + diff --git a/evals/results/r7/pages/15-held-out-skilled-concept.txt b/evals/results/r7/pages/15-held-out-skilled-concept.txt new file mode 100644 index 0000000..3906794 --- /dev/null +++ b/evals/results/r7/pages/15-held-out-skilled-concept.txt @@ -0,0 +1,15 @@ +Frame & Brood: concept + +Artifact: one box as inspected, a row of frames each cut into quarters of brood, honey, pollen or empty, with queen seen, queen cells and a note. +Without the category word: a row of upright frames hanging from their top bars across the whole screen, each filled in four parts; tap one and its quarters open to be changed. +Signature: the keeper's own control. Tap a frame, tap a quarter; the same record appears in the colony timeline and the CSV file further down. Ground: flat pale daylight green-grey, because the page is read like a record sheet outdoors and the comb colours must be the only colour in it. +Layout: across. The box spans the page; each timeline entry is the same box drawn across; the CSV runs across; the price is hives side by side. +Material: the quarter (four stacked parts under a top bar), in the brand mark, the hero box, the timeline, the offline section, the price and the footer. + +Product: a hive inspection log for small beekeepers. +Character: practical, exact, outdoors. +World: an apiary in daylight: top bars, comb, painted hive wood. +Moments: the hero box; the timeline of boxes. +Signature detail: the four-part fill, each kind with its own colour and texture. + +Mode: Persuade. Not a honey-yellow hexagon food brand and not a software dashboard page. diff --git a/evals/results/r7/pages/15-held-out-skilled.html b/evals/results/r7/pages/15-held-out-skilled.html new file mode 100644 index 0000000..550feb9 --- /dev/null +++ b/evals/results/r7/pages/15-held-out-skilled.html @@ -0,0 +1,842 @@ + + + + + +Frame & Brood: a hive inspection log for small beekeepers + + + + + + + + + + + + +
        + + + Frame & Brood + + +
        + +
        +
        +
        +

        + Log every frame + while the hive is open +

        +
        +

        A hive inspection log for small beekeepers. Tap through the box and mark brood, honey, pollen and empty in quarters.

        +
        + Start your first hive +

        Free for up to three hives

        +
        +
        +
        + +
        +
        +

        Colony A, 15 May Example data. Tap a frame to try it.

        +
          +
        • Brood
        • +
        • Honey
        • +
        • Pollen
        • +
        • Empty
        • +
        +
        + +
        +
        +
        + Frame 5: tap a quarter to change it +
        +
        + + +
        +
        +
        +
        + This inspection + + +
        +
        + + +
        +
        +
        +
        +
        + +
        +
        +

        Every colony keeps its own timeline

        +
        +

        You set the interval, and the app reminds you when the next inspection is due.

        +
        + + 9 days + +
        +
        +
        +
          +

          Example data. The top inspection follows what you tap above.

          +
          + +
          +
          +
          +

          No signal at the apiary? Record anyway

          +

          Frame & Brood works offline while you are at the hives, and syncs your records later.

          +
          + +
          +
          + +
          +
          +

          Your records export as CSV

          +

          Open them in a spreadsheet, or keep a copy of your own.

          +
          +
          +
          Colony A, 15 May, one line per frameExample data. Column layout is illustrative.
          +
          +
          +

          Each kind is counted in quarters of a frame.

          +
          + +
          +
          +

          Free for three hives, then £4 per month

          +

          Start with one hive. You pay only when you keep more than three.

          +
          +
            +
          • + + FreeFor up to three hives +
          • +
          • £4 per monthFor more than three hives
          • +
          +
          + +
          +

          Take it to your next inspection

          +

          Start your first hive

          +

          +
          +
          + +
          + + +
          + + + + + diff --git a/package.json b/package.json index 768384a..1ea1f55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "inimitable", - "version": "0.8.0", + "version": "0.9.0", "description": "A design skill for coding agents: builds and fixes interfaces until they look made on purpose.", "type": "module", "license": "Apache-2.0", diff --git a/references/build-new.md b/references/build-new.md index 7f197a5..f7896b0 100644 --- a/references/build-new.md +++ b/references/build-new.md @@ -16,9 +16,9 @@ The brand decides. It does not have to be a colour. A brand that is black and gr ## Steps -Before step 1, check that the concept exists (`direction.md`: native artifact, the page without its category word, one signature, and why this ground). The star below is usually the signature. If the concept is missing, write it now; a scaffold without it produces the genre page every product in the category already has. +Before step 1, check that the concept exists (`direction.md`: native artifact, the page without its category word, one signature and why this ground, layout, material). The star below is usually the signature. If the concept is missing, write it now; a scaffold without it produces the genre page every product in the category already has. -For a working app screen (dashboard, list, settings), run `node scripts/scaffold.mjs --kind app` instead (`surfaces/web-app.md`). For a landing page, run `node scripts/scaffold.mjs ` first (`landing-craft.md`), then follow the steps below to replace and push it. The starter already carries the structure, the motion and the hover states; your job is the star, the words, the facts and the one thing only this product has. +For a working app screen (dashboard, list, settings), run `node scripts/scaffold.mjs --kind app` instead (`surfaces/web-app.md`). For a landing page, run `node scripts/scaffold.mjs --kind base` first. It carries the type, controls, motion and hover states and **no layout**: write `page.css` from concept lines 4 and 5, and use the motion kit and recipes as parts (`landing-craft.md`). Use the full landing starter (`--kind landing`) only when the brief asks for the standard page or there is no time to compose one, and say so in the report, because its frame is shared. 1. **Name the star** in one sentence, and say why it belongs to this product (use the subject inventory from Read). 2. **Write the screen's argument**, one line: who arrives, what they need to leave with, what they do next. diff --git a/references/direction.md b/references/direction.md index 3cef72c..8cdb289 100644 --- a/references/direction.md +++ b/references/direction.md @@ -1,33 +1,48 @@ # Step 3: Fix the direction -The direction is a three-line concept and five short lines, written before anything is edited or scaffolded. It is what keeps forty small decisions pointing the same way. Write it from the product in front of you, never from what is fashionable. +The direction is a five-line concept and five short lines, written before anything is edited or scaffolded. It is what keeps forty small decisions pointing the same way. Write it from the product in front of you, never from what is fashionable. -## First: the concept (three lines) +## First: the concept (five lines) -A page is replaceable when only its skeleton is its own. For a landing page the skeleton is now a genre: a thin nav with one dark button, a small trust line, a centred two-line headline, a muted subhead, two buttons, a product card cropped at the fold, a logo strip. Nearly every product in a category has it, which is why it is safe to keep. What a visitor remembers is what sits behind and beside it: the artwork, the ground, one thing that moves. Decide that first, from the subject inventory, before the scaffold and before any colour. +A page is replaceable when only its words and its picture are its own. A strong picture inside the usual frame (a thin nav with one dark button, a headline beside a card, three steps, a closing panel) still reads as one more template: in round 6 of the evals, judges called every skilled page interchangeable for exactly that reason, while pages that carried the product's own material from top to bottom were the ones they remembered. Decide what the page shows, **how it is laid out and what it is made of**, from the subject inventory, before the scaffold and before any colour. -Answer in one line each: +Answer in order: -1. **Native artifact.** What does this product actually produce or handle? A marked-up contract, a strip log of drill cores, a tide table, a receipt, a rota, a message that dissolves. Not "a dashboard", not "insights", not "your data". -2. **Moment of value.** The one instant the person gets what they came for, as it would look on a screen: the clause that deviates, the layer boundary at 14 m, the shift that has no cover. -3. **Without the category word.** Describe the first screen without "AI", "platform", "CRM", "workflow", "dashboard", "all-in-one" or the product's category. What is on it? If the answer is "a headline and a product card", you have only the skeleton. -4. **Signature.** Choose **one**: an artwork (the artifact drawn large, a ground made from it, a duotone of its subject) or an interaction (one thing that answers the pointer in a way only this product would). Everything else stays calm: the skeleton, the type, the scale. +1. **Native artifact.** What does this product actually produce or handle? A tide table, a firing schedule, a sewing pattern, a receipt, a message that dissolves. Not "a dashboard", not "insights", not "your data". Name the moment the person gets what they came for, as it would look on a screen. +2. **Without the category word.** Describe the first screen without "AI", "platform", "CRM", "workflow", "dashboard", "all-in-one" or the product's category. What is on it? If the answer is "a headline and a product card", you have nothing yet. +3. **Signature.** Choose **one**: an artwork (the artifact drawn large, a ground made from it, a duotone of its subject) or an interaction (one thing that answers the pointer in a way only this product would). +4. **Layout.** Take it from the shape of the artifact. Which way does it run, what repeats, where does the eye land? -Then pick the **ground on purpose**: lit (the soft grainy gradient), flat colour, a dark framed panel, a duotone, or the artifact itself. The lit gradient is the default of machine-built pages now, so it needs a reason of its own (`landing-craft.md` decision 1, `directions.md`). One clause is enough: *lit, because the product is about light on water*. + | The artifact | The page can | + | --- | --- | + | runs down (a record that grows) | run it down the page, with the sections hanging off it | + | runs across (a span of time or distance) | run it across the full width, with the copy above and below | + | is a grid | use that grid as the page's own columns and rows | + | is a sheet | be the sheet, with notes in the margin | + | is one object | stand it in the middle and set the words around it | + | is only words | set them large and let type be the layout | -Write the concept as three lines and keep it where the run can see it (the top of the report, and the project's notes in the Log step): +5. **Material.** One thing the artifact is made of: its scale, rule, unit, mark or texture. Draw it in the page itself, on the first screen and in at least two more places, or as one line that runs down the page. Mark each with `data-device="name"`. It has to mean something (a scale that reads real or example values, a rule that separates real parts). A texture sprinkled for decoration is not a material. + +Then pick the **ground on purpose**: lit (the soft grainy gradient), flat colour, a dark framed panel, a duotone, or the artifact itself. The lit gradient is the default of machine-built pages now, so it needs a reason of its own (`landing-craft.md` decision 1, `directions.md`). + +Write it as five lines and keep it where the run can see it (the top of the report, and the project's notes in the Log step). An example, for a harbour tide app: ```text -Artifact: a core-sample strip log, at the moment a layer boundary is marked. -Without the category word: a strip log drawn large, depth ticks down the side, the headline set beside it. -Signature: the strip log, drawn in code and set in one colour. Ground: flat, because the log is the picture. Everything else calm. +Artifact: a tide curve for one day, at the moment the water is high enough to launch. +Without the category word: one curve across the whole screen, the launch window shaded on it, the headline riding above. +Signature: the curve answers the pointer with the depth at that hour. Ground: flat deep water blue, because the curve is the picture. +Layout: across. Every section sits on the same hour axis; there is no card and no panel. +Material: the hour ticks, on the curve, under each section heading and along the footer. ``` -The three lines above are an example, not a template. In round 6 of the evals all three agents copied the example's ground (flat sand) for three different products, which makes the three pages look alike. Take the tone and the ground from this product's own world, and if your reason is the example's reason, check that it is also true here. +The example is not a template. Agents have copied an example's ground before and made unrelated products look alike. If your reason is the example's reason, check that it is also true here. + +**Keep what people need, change the frame.** Visitors still have to learn what the product is, see how to act and find their way, on the first screen and at every width. Those conventions stay. The nav's shape, where the headline sits, the order of the sections and how the page closes are yours to decide. -How much of this applies depends on the mode (`modes.md`). Persuade and Experience need all of it. Operate needs the first two lines in miniature: the artifact decides the key figure and the empty state. Read and Terminal need only line one. When the project has design rules they set the colours, type and ground; the concept still decides what the page shows and where. +How much of this applies depends on the mode (`modes.md`). Persuade and Experience need all of it. Operate needs the artifact and the material in miniature: they decide the key figure, the chart's scale and the empty state, and the layout follows the work. Read and Terminal need only line one. When the project has design rules they set the colours, type and ground; the concept still decides what the page shows and where. -**The swap-the-name test comes at the gate** (`gate.md`): remove the product name and check that the first screen still says something only this product could say. If you cannot name the artifact in one line, the page will fail it, so do not scaffold yet. +**The test comes at the gate** (`gate.md`): remove the product name and check that the first screen still says something only this product could say, then check that the frame is not the starter's or a sibling page's and that the material runs through. If you cannot name the artifact in one line, the page will fail, so do not scaffold yet. ## When the project has design rules @@ -45,7 +60,7 @@ Draft a direction and a few rules from the subject inventory (`read.md`), **show ## The five lines -The concept said what the page shows. These five say how it should feel. +The concept said what the page shows and how it is built. These five say how it should feel. - **Product.** What it does and for whom, in one plain sentence. - **Character.** Two or three concrete words (*calm, exact, a little warm*; *fast, technical, playful*). Not allowed: clean, modern, sleek, minimal, premium. They describe every template. diff --git a/references/directions.md b/references/directions.md index fd95d4f..1a57a6b 100644 --- a/references/directions.md +++ b/references/directions.md @@ -28,7 +28,7 @@ The ground is the largest thing on the first screen, so it is the first thing a | **Flat colour** | a decision: one colour carries the nav, the ground and the buttons | the product has a colour it owns, or the type and the product card have to carry the page | `scaffold --ground flat --palette cobalt\|mint\|sand`; `flat.mjs` | | **Frame** (a dark panel set into a light page) | a stage: the product is shown inside a room of its own | the product card is the point and needs contrast against a quiet page | `scaffold --ground frame --palette sand --hero card`; `flat.mjs` | | **Duotone print** | craft: a picture made in one ink, tied to the interface by its texture | there is a subject worth drawing, a real artifact, drawn from the product | `duotone.mjs`, `dotify.mjs --mode lines`; `scaffold --art strata` | -| **The artifact itself** | the page is made of what the product makes | the artifact is visual (a strip log, a score, a map, a receipt, a waveform) | draw it in code, large, as the hero object (`visual-craft.md`) | +| **The artifact itself** | the page is made of what the product makes | the artifact is visual (a tide curve, a score, a map, a receipt, a waveform) | draw it in code, large, as the hero object (`visual-craft.md`) | A flat or framed ground hides nothing, so use it only when the layout and the type are good; the checks read contrast from the pixels, so it is also the easiest ground to get right. These grounds are first-class: the lit gradient is not the safe choice, it is one choice. @@ -139,7 +139,7 @@ Use the system stacks in `house-rules.md`. By direction: **Instrument** pairs th **Feel:** printed. One subject, one ink, one paper, with a halftone, a line screen or a dither that ties the picture to the interface. **Devices:** the subject at large scale, cropped by its frame; the same ink as the page's ground colour (the scaffold uses `var(--bg)` for ink and `var(--ink)` for paper, so it follows the theme); the grain of the ground over the top. **Build with:** `duotone.mjs` (`duotoneSvg({ subject, mode: 'halftone' | 'lines' | 'dither' })`), `dotify.mjs --mode lines` for the product's own artifact rendered to HTML, `scaffold --art column|vase|sphere|drape|strata`. -**The stand-ins are stand-ins.** A column or a vase is the technique, not the idea: unless the product is about columns, replace it with the product's own artifact (a clause, a core, a tide chart) before the swap test (`gate.md`). The built-in subjects are drawn by computation, so there is no photograph, no licence and no stock image. +**The stand-ins are stand-ins.** A column or a vase is the technique, not the idea: unless the product is about columns, replace it with the product's own artifact (a tide chart, a firing curve, a cutting pattern) before the swap test (`gate.md`). The built-in subjects are drawn by computation, so there is no photograph, no licence and no stock image. ## Annotations (a technique, not a direction) diff --git a/references/gate.md b/references/gate.md index 454c2d0..a8a2ea4 100644 --- a/references/gate.md +++ b/references/gate.md @@ -20,16 +20,27 @@ Find them (`package.json` scripts, `Makefile`, CI config, `CLAUDE.md`): usually | Hover, press and motion | `node scripts/craft.mjs ` | every control answers the pointer with a visible change; loops stop under reduced motion; no layout transitions | | Overflow and errors | `node scripts/shoot.mjs ` | no sideways scroll at any width, no console errors | | Swap the name (new Persuade or Experience screens) | `node scripts/swap.mjs --nouns "" --name ""` | with the name removed, the first screen still uses at least two of the product's own nouns and its artwork names the artifact | +| Frame (new Persuade or Experience screens) | `node scripts/frame.mjs []` | the skeleton is neither the landing starter's nor a sibling page's, and a `data-device` material is on the first screen and in two more sections (or runs down the page) | ### The swap-the-name test Take the product name off the first screen and ask: does it still say something only this product could say? Two parts, and both are required for a new Persuade or Experience screen. -1. **The script.** `swap.mjs` takes the nouns you wrote in the concept (the native artifact and its parts: *clause*, *redline*, *core sample*, *depth*) and checks the first screen at 1440 px. It strips the name, counts how many of your nouns remain, and requires that the artwork (text in a drawing or product frame, its `aria-label`, `alt` or caption) uses at least one. It refuses nouns that fit any product (*platform*, *team*, *data*, *AI*). If the headline is the signature, pass `--typographic`. It reports a headline that leans on category words, without failing it. +1. **The script.** `swap.mjs` takes the nouns you wrote in the concept (the native artifact and its parts: *tide*, *launch window*, *harbour*, *depth*) and checks the first screen at 1440 px. It strips the name, counts how many of your nouns remain, and requires that the artwork (text in a drawing or product frame, its `aria-label`, `alt` or caption) uses at least one. It refuses nouns that fit any product (*platform*, *team*, *data*, *AI*). If the headline is the signature, pass `--typographic`. It reports a headline that leans on category words, without failing it. 2. **The sentence.** The script cannot see a picture. Write one line in the report: *what does this first screen say that only this product could say?* If the honest answer is "nothing, but it is clean", the gate has failed: go back to the concept and push the signature, then render again. A pass from the script means the first screen names the product's own things. It does not mean the page is distinctive, and a weak list of nouns can pass it. The sentence is the real test. +### The frame check + +`frame.mjs` reads each page at 1440 px and records its skeleton: the nav's shape, how the headline sits against the artwork, what holds the first screen, the section kinds in order, the button shape, the headline family and the ground. It fails a page whose skeleton matches the landing starter or another page you passed it, and a page with no material running through it. + +- **It fails as the starter's frame:** change the layout, not the colour. A recolour scores almost the same. Go back to concept line 4. +- **The brief asked for the standard page:** pass `--no-starter` and say so in the report. +- **Operate, Read and Terminal screens:** the frame follows the work. Skip it, or pass `--no-starter --no-device`. + +Its weights and threshold were set against a handful of pages, so treat a score near the line as a question, not a verdict. A pass does not mean the page is memorable. Look at it. + For a terminal UI, the gate runs `scripts/term-shot.mjs` at 60 and 120 columns instead (no line over the width, no lost colour meaning when colour is off). ## After the gate diff --git a/references/landing-craft.md b/references/landing-craft.md index ba1ef8a..6d8e221 100644 --- a/references/landing-craft.md +++ b/references/landing-craft.md @@ -2,11 +2,13 @@ A good landing page is not a layout with a nice colour. It is a handful of decisions made together: **where the light comes from, where the type sits in it, what is big, what moves and in what order, and how everything answers the pointer.** This file explains each decision, why it works on a person, how to build it with the kits in this skill, and which script catches it when it is wrong. -Start every landing page with `node scripts/scaffold.mjs [--theme dark|light] [--palette name] [--shape rays|bowl|blob|...] [--hero stack|split|card] [--ground lit|flat|frame] [--art column|vase|sphere|drape|strata] [--motes]`. `--hero split` puts the headline beside the one object only this product has (a drawing, the real screen, a diagram; `--art` fills it with a duotone print as a stand-in). `--hero card` centres the headline and crops the product card at the fold, with a traced diagram behind it and annotation chips on it. `--ground flat` or `frame` swaps the lit gradient for a colour (`--palette cobalt|mint|sand`); the theme follows the colour. (An app screen is a different starter: `--kind app`, see `surfaces/web-app.md`.) For a short brief with few facts, add `--minimal`: it keeps the hero, the steps, the closing call and the footer, and removes the ticker, product, features and proof sections together with their links, so nothing is left to delete. To deliver a single file, run `node scripts/inline.mjs --out page.html`. It gives you a page that already makes these decisions and already passes every check. Your job is then to replace the placeholder content with the product's own and to push the direction until it could only be this product. +Start a landing page with `node scripts/scaffold.mjs --kind base [--theme dark|light] [--palette name] [--accent '#hex']`: tested type, controls, motion and fonts, and a `page.css` that is yours. The decisions below are the parts to build it from. Grounds come from `assets/recipes/mesh.mjs` and `flat.mjs`, prints from `duotone.mjs`, chips and diagrams from `annotate.mjs`. + +The full landing starter, `node scripts/scaffold.mjs [--theme dark|light] [--palette name] [--shape rays|bowl|blob|...] [--hero stack|split|card] [--ground lit|flat|frame] [--art column|vase|sphere|drape|strata] [--motes]`, builds the standard page in one go. `--hero split` puts the headline beside one object (`--art` fills it with a duotone print as a stand-in); `--hero card` centres the headline and crops a product card at the fold; `--ground flat` or `frame` swaps the lit gradient for a colour (`--palette cobalt|mint|sand`); `--minimal` keeps the hero, the steps, the closing call and the footer. Every page it makes shares one frame, so use it when the brief asks for the standard page or there is no time to compose one. (An app screen is a different starter: `--kind app`, see `surfaces/web-app.md`.) To deliver a single file, run `node scripts/inline.mjs --out page.html`. ## Before the scaffold: the concept -The starter gives a page that already works. It does not give a page that is already yours: the skeleton here (floating nav, big headline, two buttons, a product frame) is the same genre skeleton every product in a category uses. Write the concept first (`direction.md`): the product's native artifact, the first screen without the category word, and **one** signature, an artwork or an interaction, with everything else calm. Choose the ground on purpose (decision 1) and let the signature be built from the product's own subject: the artifact drawn in code, a duotone of its subject (`assets/recipes/duotone.mjs`), a diagram that is the product's real structure. Then scaffold. +A starter gives type and controls that already work. It does not give a page that is yours. Write the concept first (`direction.md`): the product's native artifact, the first screen without the category word, **one** signature, the layout taken from the artifact's shape, and one material that runs through the page. Choose the ground on purpose (decision 1) and let the signature be built from the product's own subject: the artifact drawn in code, a duotone of its subject (`assets/recipes/duotone.mjs`), a diagram that is the product's real structure. Then scaffold, and check the result with `frame.mjs`. A note from using the starter: its mobile rules use specific selectors (`.hero-in.split` and others). A later rule of your own with the same selector overrides them, and the layout stacks wrongly at 390 px until you repeat the mobile rule in your own stylesheet. `--minimal` removes sections but leaves the CSS they used: delete what is unused before you finish. diff --git a/references/lessons.md b/references/lessons.md index 13e62aa..d89fdfd 100644 --- a/references/lessons.md +++ b/references/lessons.md @@ -12,7 +12,7 @@ General lessons (a tell the list missed, a rule that backfired, a check that wou ## What is worth recording -- The concept (the three lines from `direction.md`) and which ground was chosen and why, so a later run extends the idea instead of replacing it. +- The concept (the five lines from `direction.md`) and which ground was chosen and why, so a later run extends the idea instead of replacing it. - A decision a future run would otherwise reverse (accent colour reserved for live states). - A surprise (a font that renders wrong on Windows; a component that cannot take a prop). - A correction from the person, with the reason. diff --git a/references/look.md b/references/look.md index 76d1b7b..f8a5f46 100644 --- a/references/look.md +++ b/references/look.md @@ -22,7 +22,7 @@ Go through the images in this order and write down every problem: 6. **Small screens.** Wrapping, overlaps, cut-off text, unreachable controls, text under 12 px. 7. **Big screens.** Lines of text too long, content floating in a sea of space, blown-up UI. 8. **The tells.** Read `anti-slop.md` against the picture one more time. -9. **The template check.** Would this screen still fit a competitor if the name were swapped? +9. **The template check.** Would this screen still fit a competitor if the name were swapped? With the words blurred, would you still know whose it is, below the first screen too? ## Feels cheap diff --git a/references/report.md b/references/report.md index 424ffb7..a79a406 100644 --- a/references/report.md +++ b/references/report.md @@ -5,7 +5,7 @@ Short. Written for the person who asked, in plain words, with whatever *they* wo ## Always include - **The mode** used (one word) and the direction (one sentence). -- **The concept** for a new Persuade or Experience screen: the three lines from `direction.md`. +- **The concept** for a new Persuade or Experience screen: the five lines from `direction.md`. - **The swap test**, one line: what the first screen says that only this product could say, or what it still lacks (`gate.md`). - **What changed**, a few lines, grouped by what the person will notice, not by file. - **Anything left over**, honestly: what you could not fix and why, what you did not touch on purpose. diff --git a/references/surfaces/landing.md b/references/surfaces/landing.md index b7880f5..acecfb0 100644 --- a/references/surfaces/landing.md +++ b/references/surfaces/landing.md @@ -1,6 +1,6 @@ # Surface: landing and marketing pages (Persuade) -**Start with `node scripts/scaffold.mjs `** (see `landing-craft.md`). It writes a complete page that already has a lit ground, type anchored in the calm corner, a product frame, an unequal bento, an ordered entrance, scroll reveals, counters and a hover on every control, and passes every check. Then make it the product's own. Starting from a blank file is how a page ends up static and generic. +**Start with `node scripts/scaffold.mjs --kind base`** (see `landing-craft.md`). It writes the craft with no layout: type with tracking by size, controls with hover and press, focus styles, colour and the motion kit. Build the layout in `page.css` from the concept (`direction.md`): the shape of the product's artifact, and one material that runs through. The full starter (no `--kind`) writes the standard page, for a brief that asks for exactly that or has no time for more. Starting from a blank file loses the craft; stopping at the starter loses the identity. A landing page is not a brochure. It is an **argument** made in a fixed order, to someone who is deciding whether to keep reading. Design is the product here: the page has to earn attention, then belief, then action, and it has about five seconds to earn the first one. diff --git a/scripts/frame.mjs b/scripts/frame.mjs new file mode 100644 index 0000000..1d794cf --- /dev/null +++ b/scripts/frame.mjs @@ -0,0 +1,217 @@ +#!/usr/bin/env node +// The frame check: is this page's skeleton its own, and does its material run through it? +// (references/direction.md, references/gate.md) +// +// node scripts/frame.mjs [ ...] [--no-starter] [--no-device] [--threshold 0.75] [--json] +// +// --no-starter do not compare with the landing starter (when the brief asked for the standard page) +// --no-device do not require a material (Operate, Read and Terminal screens) +// --threshold how alike two skeletons may be before they count as one frame (0 to 1) +// +// It reads each page at 1440 px and records its skeleton: the nav's shape, how the headline sits against the artwork, +// what holds the first screen, the order of the section kinds, the button shape, the headline family and the ground. +// It fails when two of the given pages share a frame, when a page is the landing starter's frame, or when no element +// marked data-device is on the first screen and in two more sections. +// +// What it cannot do: see whether a page is good, memorable or ownable. Two pages can differ in every trait it reads +// and still feel alike, and the section kinds are guessed from structure. A pass means "not the same skeleton". + +import { mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { basename, join } from 'node:path'; +import { isMain, parseArgs } from './lib/args.mjs'; +import { launch, openPage, toUrl } from './lib/chrome.mjs'; +import { SAME_FRAME, judgeDevice, judgeFrames } from './lib/frame.mjs'; +import { scaffold } from './scaffold.mjs'; + +const COLLECT = `(() => { + const W = innerWidth, H = innerHeight; + const style = (el) => getComputedStyle(el); + const rect = (el) => { const r = el.getBoundingClientRect(); return { x: r.left, y: r.top + scrollY, w: r.width, h: r.height }; }; + const shown = (el) => { const r = el.getBoundingClientRect(); const s = style(el); return r.width > 2 && r.height > 2 && s.display !== 'none' && s.visibility !== 'hidden'; }; + const alpha = (v) => { const m = v.match(/[\\d.]+/g) || []; return v === 'transparent' ? 0 : m.length > 3 ? Number(m[3]) : 1; }; + const painted = (el) => { const s = style(el); return alpha(s.backgroundColor) > 0.04 || s.backgroundImage !== 'none' || (parseFloat(s.borderTopWidth) > 0 && alpha(s.borderTopColor) > 0.04) || s.boxShadow !== 'none'; }; + + const h1 = document.querySelector('h1'); + const hr = h1 ? rect(h1) : { x: 0, y: 0, w: W, h: 100 }; + + // Nav: the first header or nav near the top. + const navEl = [...document.querySelectorAll('header, nav, [data-nav]')].find((el) => shown(el) && rect(el).y < 200 && !el.closest('footer')); + let nav = 'none'; + if (navEl) { + const boxes = [navEl, ...navEl.querySelectorAll('*')].filter((el) => shown(el) && rect(el).w > 280 && painted(el)); + const box = boxes[0]; + const outer = rect(navEl); + if (outer.h > H * 0.6 && outer.w < W * 0.35) nav = 'side'; + else if (box && rect(box).w < W * 0.92 && parseFloat(style(box).borderTopLeftRadius) >= 8) nav = parseFloat(style(box).borderTopLeftRadius) >= rect(box).h / 2 - 1 ? 'floating-pill' : 'floating-box'; + else if (box) nav = 'bar'; + else nav = 'plain'; + } + + // Artwork: the largest drawing, picture or framed block on the first screen that is not the headline's wrapper. + const arts = [...document.querySelectorAll('figure, svg, canvas, img, picture, video, [role="img"], [data-artwork], body *')].filter((el) => { + if (!shown(el) || el.contains(h1) || (h1 && h1.contains(el)) || el.closest('nav, footer, [data-nav]')) return false; + const r = rect(el); + if (r.y > H - 60 || r.w < 240 || r.h < 160) return false; + if (/^(FIGURE|SVG|CANVAS|IMG|PICTURE|VIDEO)$/i.test(el.tagName) || el.matches('[role="img"], [data-artwork]')) return !(el.getAttribute('aria-hidden') === 'true' && r.w > W * 0.9); + return painted(el) && r.w < W * 0.9; + }); + const art = arts.sort((a, b) => rect(b).w * rect(b).h - rect(a).w * rect(a).h)[0]; + let composition = 'type only'; + if (art) { + const r = rect(art); + const sideBySide = (r.x >= hr.x + hr.w * 0.6 || r.x + r.w <= hr.x + hr.w * 0.4) && r.y < hr.y + hr.h + 200; + composition = sideBySide ? 'art beside' : r.y >= hr.y + hr.h - 8 ? 'art below' : r.y + r.h <= hr.y + 8 ? 'art above' : 'art behind'; + } + + // Alignment of the headline text. + const centred = h1 && (style(h1).textAlign === 'center' || (Math.abs(hr.x + hr.w / 2 - W / 2) < 24 && hr.w < W * 0.8)); + const align = centred ? 'centred' : hr.x + hr.w / 2 > W * 0.6 ? 'right' : 'left'; + + // What holds the first screen: a painted panel set in from the edges, a full-bleed field, or nothing. + let container = 'open'; + for (let el = h1?.parentElement; el && el !== document.body; el = el.parentElement) { + const r = rect(el); + const layers = [el, ...el.children]; + const field = layers.find((n) => painted(n) && rect(n).w >= W * 0.9 && rect(n).h >= H * 0.5); + if (!field) continue; + const radius = Math.max(parseFloat(style(el).borderTopLeftRadius), parseFloat(style(field).borderTopLeftRadius)); + container = r.x >= 4 && radius >= 12 ? 'inset panel' : 'full bleed'; + break; + } + + const button = [...document.querySelectorAll('a, button')].find((el) => shown(el) && !el.closest('nav, header, footer') && painted(el) && rect(el).h >= 32 && rect(el).h < 90 && rect(el).w >= 80); + const radius = button ? parseFloat(style(button).borderTopLeftRadius) : 0; + const buttonShape = !button ? 'none' : radius >= rect(button).h / 2 - 1 ? 'pill' : radius >= 4 ? 'rounded' : 'square'; + + const family = h1 ? style(h1.querySelector('span') || h1).fontFamily.toLowerCase() : ''; + const headlineFont = /mono|courier|menlo|consol/.test(family) ? 'mono' : /sans|grotesk|inter|geist|helvetica|arial|system-ui/.test(family) ? 'sans' : /serif|georgia|times|garamond/.test(family) ? 'serif' : 'sans'; + + const bg = (style(document.body).backgroundColor.match(/[\\d.]+/g) || [255, 255, 255]).map(Number); + const clear = alpha(style(document.body).backgroundColor) === 0; + const [r0, g0, b0] = clear ? [255, 255, 255] : bg; + const light = (0.2126 * r0 + 0.7152 * g0 + 0.0722 * b0) / 255; + const chroma = Math.max(r0, g0, b0) - Math.min(r0, g0, b0); + const ground = chroma > 60 ? 'colour' : light < 0.35 ? 'dark' : chroma > 12 ? 'tinted' : 'light'; + + // Sections: walk down from main until a level has several tall blocks. + const tall = (el) => shown(el) && rect(el).h >= 80 && rect(el).w >= W * 0.4 && !['fixed', 'absolute'].includes(style(el).position) && !/^(SCRIPT|STYLE|HEADER|NAV|FOOTER)$/.test(el.tagName); + let level = document.querySelector('main') || document.body; + let blocks = [...level.children].filter(tall); + while (blocks.length === 1 && blocks[0].children.length) { level = blocks[0]; blocks = [...level.children].filter(tall); } + if (level !== document.body && document.querySelector('main')) { + const outside = [...document.body.children].filter((el) => tall(el) && el.tagName !== 'MAIN' && !el.contains(level)); + blocks = [...blocks, ...outside].sort((a, b) => rect(a).y - rect(b).y); + } + + const kind = (block) => { + const all = [...block.querySelectorAll('*')].filter(shown); + if (block.querySelector('table')) return 'table'; + const groups = [block, ...all].map((p) => [...p.children].filter((c) => shown(c) && c.querySelector('h3, h4, strong, b') && rect(c).w >= 140)).filter((g) => g.length >= 3); + const group = groups.sort((a, b) => b.length - a.length)[0]; + if (group) { + const numbered = group.filter((c) => c.closest('ol') || /^\\s*0?[1-9]\\b/.test(c.textContent)).length >= 3; + if (numbered) return 'steps'; + return group.filter(painted).length >= 3 ? 'cards' : 'columns'; + } + const text = (block.innerText || '').trim(); + if (all.some((el) => parseFloat(style(el).fontSize) >= 72 && /^[£$€]?[\\d.,]+[%KkMm+]?$/.test((el.textContent || '').trim()))) return 'big number'; + const action = block.querySelector('h2') && block.querySelector('a, button') && text.length < 320; + if (action) return [block, ...all].some((el) => painted(el) && rect(el).w >= W * 0.6 && rect(el).w < W - 4 && parseFloat(style(el).borderTopLeftRadius) >= 12) ? 'closing panel' : 'closing line'; + if (rect(block).h < 200) return 'band'; + if (all.some((el) => rect(el).w >= 240 && rect(el).h >= 160 && (/^(svg|canvas|img|figure)$/i.test(el.tagName) || el.matches('[role="img"]')))) return 'picture'; + return /[£$€]\\s?\\d/.test(text) ? 'price' : 'text'; + }; + const rest = blocks.filter((b) => !(h1 && b.contains(h1))); + const sequence = rest.map(kind); + + // The material: where each data-device name is visible. + const devices = {}; + const pageH = document.documentElement.scrollHeight; + for (const el of document.querySelectorAll('[data-device]')) { + if (!shown(el)) continue; + const name = el.getAttribute('data-device') || 'device'; + const r = rect(el); + const fixed = style(el).position === 'fixed' && r.h >= H * 0.6; + const entry = (devices[name] ||= { sections: new Set(), coverage: 0 }); + entry.coverage = Math.max(entry.coverage, fixed ? 1 : Math.min(1, r.h / pageH)); + if (r.y < H) entry.sections.add(0); + blocks.forEach((b, i) => { const br = rect(b); if (!(h1 && b.contains(h1)) && r.y < br.y + br.h - 8 && r.y + r.h > br.y + 8) entry.sections.add(i + 1); }); + const foot = document.querySelector('footer'); + if (foot && r.y + r.h > rect(foot).y + 8) entry.sections.add(blocks.length + 1); + } + + return { + traits: { nav, composition, align, container, sequence, button: buttonShape, headlineFont, ground }, + devices: Object.fromEntries(Object.entries(devices).map(([k, v]) => [k, { sections: [...v.sections], coverage: Math.round(v.coverage * 100) / 100 }])), + }; +})()`; + +async function read(browser, target) { + const page = await openPage(browser, { width: 1440, height: 900, reducedMotion: true }); + try { + await page.goto(toUrl(target), 900); + return await page.evaluate(COLLECT); + } finally { + await page.close(); + } +} + +const STARTERS = [['stack', {}], ['split', { hero: 'split' }], ['card', { ground: 'flat', palette: 'cobalt', hero: 'card' }], ['minimal split', { ground: 'flat', palette: 'sand', hero: 'split', minimal: true }]]; + +export async function frame(targets, { starter = true, device = true, threshold = SAME_FRAME } = {}) { + const chrome = await launch(); + const temp = mkdtempSync(join(tmpdir(), 'frame-')); + try { + const pages = []; + for (const target of targets) { + const found = await read(chrome.browser, target); + pages.push({ label: target, traits: found.traits, device: judgeDevice(found.devices) }); + } + const starters = []; + if (starter) for (const [label, options] of STARTERS) { + const dir = join(temp, label.replace(' ', '-')); + scaffold(dir, options); + starters.push({ label, traits: (await read(chrome.browser, join(dir, 'index.html'))).traits }); + } + const frames = judgeFrames(pages, starters, threshold); + const pass = !frames.same.length && !frames.unchanged.length && (!device || pages.every((p) => p.device.pass)); + return { pass, pages, device, ...frames }; + } finally { + await chrome.close(); + rmSync(temp, { recursive: true, force: true }); + } +} + +export function format(r) { + const short = (label) => basename(label); + const lines = [`frame ${r.pass ? 'pass' : 'FAIL'} (same frame at ${r.threshold} or more)`]; + for (const page of r.pages) { + const t = page.traits; + lines.push(`\n${short(page.label)}`); + lines.push(` nav ${t.nav} | ${t.align} headline, ${t.composition} | ${t.container} | ${t.button} buttons | ${t.headlineFont} | ${t.ground} ground`); + lines.push(` sections: ${t.sequence.join(' > ') || 'none after the first screen'}`); + const s = r.starter.find((x) => x.page === page.label); + if (s) lines.push(` closest starter frame: ${s.starter} ${s.score}${s.score >= r.threshold ? ` SHARED FRAME (${s.shared.join('; ')})` : ''}`); + if (r.device) lines.push(page.device.pass ? ` material: ${page.device.found.filter((d) => d.pass).map((d) => `${d.name} (${d.runsThrough ? 'runs down the page' : `${d.sections} sections`})`).join(', ')}` : ` material FAIL: ${page.device.reason}`); + } + for (const p of r.pairs) lines.push(`\n${short(p.a)} and ${short(p.b)}: ${p.score}${p.score >= r.threshold ? ` SAME FRAME (${p.shared.join('; ')})` : ''}`); + if (!r.pass) lines.push('\nChange the skeleton, not only the artwork: take the layout from the shape of the artifact (references/direction.md).'); + return lines.join('\n'); +} + +if (isMain(import.meta.url)) { + const { positional, flags } = parseArgs(process.argv.slice(2), { booleans: ['no-starter', 'no-device', 'json'] }); + if (!positional.length) { + console.error('Usage: node scripts/frame.mjs [ ...] [--no-starter] [--no-device] [--threshold 0.75] [--json]'); + process.exit(2); + } + try { + const result = await frame(positional, { starter: !flags['no-starter'], device: !flags['no-device'], threshold: flags.threshold ? Number(flags.threshold) : SAME_FRAME }); + console.log(flags.json ? JSON.stringify(result, null, 2) : format(result)); + process.exit(result.pass ? 0 : 1); + } catch (error) { + console.error(error.message); + process.exit(2); + } +} diff --git a/scripts/lib/frame.mjs b/scripts/lib/frame.mjs new file mode 100644 index 0000000..55d4a89 --- /dev/null +++ b/scripts/lib/frame.mjs @@ -0,0 +1,65 @@ +// The pure half of the frame check: how alike are two page skeletons, and does a page carry its material through? +// A skeleton is what stays when the words, pictures and exact colours are taken away. + +// Trait weights add to 1. Layout traits count most: two pages with the same nav, composition and section order read +// as one template however different their colours are. +export const WEIGHTS = { nav: 0.15, composition: 0.15, align: 0.1, container: 0.1, sequence: 0.35, button: 0.05, headlineFont: 0.05, ground: 0.05 }; +export const SAME_FRAME = 0.75; +export const MIN_DEVICE_SECTIONS = 3; + +// Length of the longest common subsequence: how much of the section order two pages share. +export function lcs(a, b) { + const row = new Array(b.length + 1).fill(0); + for (const x of a) { + let diagonal = 0; + for (let j = 1; j <= b.length; j++) { + const above = row[j]; + row[j] = x === b[j - 1] ? diagonal + 1 : Math.max(row[j], row[j - 1]); + diagonal = above; + } + } + return row[b.length]; +} + +export function similarity(a, b) { + let score = 0; + const shared = []; + for (const [trait, weight] of Object.entries(WEIGHTS)) { + if (trait === 'sequence') { + const longest = Math.max(a.sequence.length, b.sequence.length); + const part = longest ? lcs(a.sequence, b.sequence) / longest : 1; + score += weight * part; + if (part >= 0.6) shared.push(`sections in the same order (${Math.round(part * 100)}%)`); + } else if (a[trait] === b[trait]) { + score += weight; + shared.push(`${trait}: ${a[trait]}`); + } + } + return { score: Math.round(score * 100) / 100, shared }; +} + +// A material passes when one name is visible on the first screen and in at least two more sections, or when a single +// marked element runs down most of the page (a ruler on the edge, a margin rule). +export function judgeDevice(devices) { + const found = Object.entries(devices || {}).map(([name, d]) => { + const spans = d.coverage >= 0.6; + const spread = d.sections.length >= MIN_DEVICE_SECTIONS && d.sections.includes(0); + return { name, sections: d.sections.length, firstScreen: d.sections.includes(0), runsThrough: spans, pass: spans ? d.sections.includes(0) : spread }; + }); + const pass = found.some((d) => d.pass); + let reason = null; + if (!found.length) reason = 'no element is marked data-device: name the material in the concept and draw it in the page'; + else if (!pass) reason = `a material has to be on the first screen and in ${MIN_DEVICE_SECTIONS - 1} more sections (or run down most of the page)`; + return { pass, found, reason }; +} + +// pages: [{ label, traits }]. starters: [{ label, traits }]. Returns every pair that shares a frame. +export function judgeFrames(pages, starters = [], threshold = SAME_FRAME) { + const pairs = []; + for (let i = 0; i < pages.length; i++) for (let j = i + 1; j < pages.length; j++) pairs.push({ a: pages[i].label, b: pages[j].label, ...similarity(pages[i].traits, pages[j].traits) }); + const starter = pages.map((page) => { + const scored = starters.map((s) => ({ page: page.label, starter: s.label, ...similarity(page.traits, s.traits) })); + return scored.sort((x, y) => y.score - x.score)[0]; + }).filter(Boolean); + return { threshold, pairs, starter, same: pairs.filter((p) => p.score >= threshold), unchanged: starter.filter((s) => s.score >= threshold) }; +} diff --git a/scripts/lib/swap.mjs b/scripts/lib/swap.mjs index 8089011..bee5f16 100644 --- a/scripts/lib/swap.mjs +++ b/scripts/lib/swap.mjs @@ -2,7 +2,7 @@ // // The question: take the product name off the first screen. Does it still say something only this product could // say? A script cannot judge taste, so it checks one narrow thing. The agent declares the nouns of the product's -// own subject (the native artifact from the concept: "clause", "redline", "core", "depth"), and this checks that +// own subject (the native artifact from the concept: "tide", "harbour", "launch", "depth"), and this checks that // the first screen uses them, and that the artwork (not only the headline) is about them. // // It cannot tell a good picture from a bad one, and an agent can declare weak nouns. The generic list below diff --git a/scripts/scaffold.mjs b/scripts/scaffold.mjs index 3d4d23d..9074e80 100644 --- a/scripts/scaffold.mjs +++ b/scripts/scaffold.mjs @@ -2,10 +2,12 @@ // Start a page from the landing starter: a complete, tested layout with a lit grainient ground, a floating nav, // a product frame, a bento, steps, a big number, a closing call and a footer, with the motion kit wired in. // -// node scripts/scaffold.mjs [--kind landing|app] [--theme dark|light] [--palette ember] [--shape bowl] [--accent '#e8742c'] +// node scripts/scaffold.mjs [--kind base|landing|app] [--theme dark|light] [--palette ember] [--shape bowl] [--accent '#e8742c'] // [--seed 1] [--grain 0.45] [--hero stack|split|card] [--ground lit|flat|frame] [--art column] // -// kind landing (default) or app: a working surface with a sidebar, key numbers, a chart, a table and an empty state +// kind base: type, buttons, colour, motion and fonts with no layout, for a page that composes its own frame from +// its concept; landing (default): the whole standard page; app: a working surface with a sidebar, key numbers, +// a chart, a table and an empty state // theme dark or light (default dark) // palette one of the built-in grounds (see assets/recipes/mesh.mjs), or use --accent to derive one // minimal keep only the hero, the steps, the closing call and the footer (for a short brief with few facts) @@ -23,7 +25,7 @@ // Everything marked data-todo is placeholder. Replace it with the product's real words and numbers. // signs.mjs reports every data-todo left on a page, so unfinished copy cannot ship. -import { copyFileSync, cpSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { copyFileSync, cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { chip, annotationCss, heroDiagram } from '../assets/recipes/annotate.mjs'; @@ -174,15 +176,61 @@ export function scaffoldApp(dest, { theme = 'dark', accent } = {}) { return { dest, todo, problems: [], shape: 'app' }; } +// ---------- base starter: the craft without the layout ---------- +// For a page whose frame comes from its own concept. No hero, no sections beyond the first and the last: the agent +// composes the layout in page.css from the shape of the product's artifact (references/direction.md). +export function scaffoldBase(dest, { theme = 'dark', palette, accent } = {}) { + if (accent && !/^#[0-9a-f]{6}$/i.test(accent)) throw new Error(`--accent is a six-digit hex colour (got "${accent}").`); + const problems = []; + let css; + if (palette && FLATS[palette]) { + theme = FLATS[palette].dark ? 'dark' : 'light'; + css = flatThemeCss({ tone: palette }); + } else { + const dark = theme === 'dark'; + let pal; + if (accent) pal = fromAccent(accent, { dark }); + else { + pal = PALETTES[palette || (dark ? 'midnight' : 'ember')]; + if (!pal) throw new Error(`Unknown palette "${palette}". Use one of ${[...Object.keys(PALETTES), ...FLAT_NAMES].join(', ')} or --accent '#hex'.`); + if (Boolean(pal.dark) !== dark) throw new Error(`The ${palette} palette is ${pal.dark ? 'dark' : 'light'}: use --theme ${pal.dark ? 'dark' : 'light'}, or pick another palette.`); + } + css = themeCss({ dark, palette: pal }); + // In the base the colour asked for is the accent itself, not the seed of a derived palette. + if (accent) { + const onAccent = ratio(accent, '#0b0b0c') >= ratio(accent, '#ffffff') ? '#0b0b0c' : '#ffffff'; + css = css.replace(/--accent: [^;]+;/, `--accent: ${accent};`).replace(/--on-accent: [^;]+;/, `--on-accent: ${onAccent};`); + // The accent also draws focus rings and link hover, so it has to read on the page. + const seen = ratio(accent, pal.base); + if (seen < 4.5) problems.push(`the accent ${accent} is ${seen.toFixed(1)}:1 on the page colour: too faint for link hover and focus. Darken or lighten it, or use it only as a fill.`); + } + } + const starter = join(root, 'assets', 'starters', 'base'); + mkdirSync(dest, { recursive: true }); + writeFileSync(join(dest, 'index.html'), readFileSync(join(starter, 'index.html'), 'utf8').replace('data-theme="dark"', `data-theme="${theme}"`)); + copyFileSync(join(starter, 'base.css'), join(dest, 'base.css')); + writeFileSync(join(dest, 'theme.css'), css); + // Never overwrite the layout someone has already written. + if (!existsSync(join(dest, 'page.css'))) writeFileSync(join(dest, 'page.css'), '/* Your layout. Take it from the shape of the product\'s own artifact. */\n'); + copyFileSync(join(root, 'assets', 'motion', 'motion.css'), join(dest, 'motion.css')); + copyFileSync(join(root, 'assets', 'motion', 'motion.js'), join(dest, 'motion.js')); + cpSync(join(root, 'assets', 'fonts'), join(dest, 'fonts'), { recursive: true }); + const todo = (readFileSync(join(dest, 'index.html'), 'utf8').match(/data-todo/g) || []).length; + return { dest, todo, problems, shape: 'base', theme }; +} + if (isMain(import.meta.url)) { const { positional, flags } = parseArgs(process.argv.slice(2), { booleans: ['motes', 'minimal'] }); if (!positional[0]) { - console.error("Usage: node scripts/scaffold.mjs [--theme dark|light] [--palette ember] [--shape bowl] [--accent '#e8742c'] [--seed 1] [--grain 0.45] [--hero stack|split|card] [--ground lit|flat|frame] [--art column] [--motes] [--minimal] [--kind app]"); + console.error("Usage: node scripts/scaffold.mjs [--theme dark|light] [--palette ember] [--shape bowl] [--accent '#e8742c'] [--seed 1] [--grain 0.45] [--hero stack|split|card] [--ground lit|flat|frame] [--art column] [--motes] [--minimal] [--kind base|app]"); process.exit(2); } try { - const kind = flags.kind === 'app' ? 'app' : 'landing'; - const result = kind === 'app' ? scaffoldApp(positional[0], { theme: flags.theme === 'light' ? 'light' : 'dark', accent: typeof flags.accent === 'string' ? flags.accent : undefined }) : scaffold(positional[0], { + const kind = flags.kind === undefined ? 'landing' : flags.kind; + if (!['landing', 'app', 'base'].includes(kind)) throw new Error(`--kind is base, landing or app (got "${kind}").`); + const text = (name) => (typeof flags[name] === 'string' ? flags[name] : undefined); + const mode = flags.theme === 'light' ? 'light' : 'dark'; + const result = kind === 'app' ? scaffoldApp(positional[0], { theme: mode, accent: text('accent') }) : kind === 'base' ? scaffoldBase(positional[0], { theme: mode, accent: text('accent'), palette: text('palette') }) : scaffold(positional[0], { theme: flags.theme === 'light' ? 'light' : 'dark', palette: typeof flags.palette === 'string' ? flags.palette : undefined, accent: typeof flags.accent === 'string' ? flags.accent : undefined, @@ -195,11 +243,13 @@ if (isMain(import.meta.url)) { motes: Boolean(flags.motes), minimal: Boolean(flags.minimal), }); - console.log(`Started ${result.dest} (${kind === 'app' ? `${flags.theme === 'light' ? 'light' : 'dark'}, app shell` : `${result.theme}, ${result.shape}`})`); - if (kind !== 'app' && result.ground === 'lit') console.log('Ground: lit, the soft grainy gradient. It is the default of machine-built pages: keep it only if the concept says why this product wants light (flat and frame are the alternatives).'); + console.log(`Started ${result.dest} (${kind === 'app' ? `${mode}, app shell` : kind === 'base' ? `${result.theme}, no layout` : `${result.theme}, ${result.shape}`})`); + if (kind === 'base') console.log('The layout is yours: write it in page.css, from the shape of the artifact in your concept, and carry one material through the page (data-device).'); + if (kind === 'landing') console.log('This is the shared frame: every page started here has the same nav, hero and closing block. For a page that has to be recognisably this product, use --kind base.'); + if (kind === 'landing' && result.ground === 'lit') console.log('Ground: lit, the soft grainy gradient. It is the default of machine-built pages: keep it only if the concept says why this product wants light (flat and frame are the alternatives).'); console.log(`${result.todo} placeholders to replace (every data-todo). signs.mjs lists any left.`); for (const p of result.problems) console.log(`warning: ${p}`); - console.log('\nNext: replace the placeholders with the real content, then run shoot, signs, check and craft on index.html.'); + console.log(`\nNext: replace the placeholders with the real content, then run shoot, signs, check, craft${kind === 'app' ? '' : ' and frame'} on index.html.`); } catch (error) { console.error(error.message); process.exit(1); diff --git a/scripts/swap.mjs b/scripts/swap.mjs index bcffe72..107fe93 100644 --- a/scripts/swap.mjs +++ b/scripts/swap.mjs @@ -2,7 +2,7 @@ // The swap-the-name test: take the product name off the first screen. Does it still say something only this // product could say? (references/gate.md, references/direction.md) // -// node scripts/swap.mjs --nouns "clause,redline,contract" [--name Marrow] [--typographic] [--json] +// node scripts/swap.mjs --nouns "tide,harbour,launch" [--name Neap] [--typographic] [--json] // // --nouns the nouns of the product's own subject, from the concept's native artifact. Two or more. Words that // fit any product ("platform", "team", "data", "AI") are refused. @@ -34,7 +34,7 @@ const COLLECT = `(() => { const h1 = document.querySelector('h1'); const headline = h1 ? h1.textContent : ''; const big = (el) => { const r = el.getBoundingClientRect(); return r.width >= 120 && r.height >= 80; }; - // A product picture built from HTML (a rota, a contract, a log) has no figure or svg to find. A framed box, at least + // A product picture built from HTML (a table, a sheet, a schedule) has no figure or svg to find. A framed box, at least // 280 x 180 px, with a border, a fill or a shadow, that is not the hero's own wrapper (it does not hold the headline // and does not span the screen) counts as artwork too. const framed = (el) => { @@ -77,7 +77,7 @@ export function format(r, name) { if (isMain(import.meta.url)) { const { positional, flags } = parseArgs(process.argv.slice(2), { booleans: ['json', 'typographic'] }); if (!positional[0] || typeof flags.nouns !== 'string') { - console.error('Usage: node scripts/swap.mjs --nouns "clause,redline,contract" [--name Marrow] [--typographic] [--json]'); + console.error('Usage: node scripts/swap.mjs --nouns "tide,harbour,launch" [--name Neap] [--typographic] [--json]'); process.exit(2); } const name = typeof flags.name === 'string' ? flags.name : undefined; diff --git a/site/index.html b/site/index.html index 5970f84..b75fba4 100644 --- a/site/index.html +++ b/site/index.html @@ -70,7 +70,7 @@

          9
          steps in one fixed run
          -
          11
          scripts that measure
          +
          13
          scripts that measure
          0
          packages to install
          @@ -201,7 +201,7 @@

          Motion and hover, round 5

          Out of 100, on a plain brief that never mentioned how it would be judged.

          -

          The limits are real. One reviewer judged them, round 3 was not blind, and round 4’s brief named its own judging criteria, so its motion score says nothing. The skill lost two comparisons in round 1, because it made clean pages where the other side drew something memorable. The guide and recipes for that one rich moment came from those losses. Read the round 5 write-up or browse all five rounds.

          +

          The limits are real. One reviewer judged them, round 3 was not blind, and round 4’s brief named its own judging criteria, so its motion score says nothing. The skill lost two comparisons in round 1, because it made clean pages where the other side drew something memorable. The guide and recipes for that one rich moment came from those losses. Later blind rounds asked whether the pages were distinctive, and the skill did not win: judges still found its pages more alike than the ones built without it. Read the round 7 write-up or browse all seven rounds.

          diff --git a/test/base.test.mjs b/test/base.test.mjs new file mode 100644 index 0000000..c734af7 --- /dev/null +++ b/test/base.test.mjs @@ -0,0 +1,90 @@ +// The base starter: craft without layout. Scaffolded in three colourways and driven in a real browser. +import assert from 'node:assert/strict'; +import { mkdtempSync, readFileSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { test } from 'node:test'; +import { measureTracking, tightestAt } from '../evals/tracking.mjs'; +import { check } from '../scripts/check.mjs'; +import { craft } from '../scripts/craft.mjs'; +import { scaffoldBase } from '../scripts/scaffold.mjs'; +import { scan } from '../scripts/signs.mjs'; +import { findChrome, launch, openPage, toUrl } from '../scripts/lib/chrome.mjs'; + +const skip = findChrome() ? false : 'no Chrome installed'; +const folder = (name) => mkdtempSync(join(tmpdir(), `base-${name}-`)); +const variants = [ + { name: 'dark', options: {} }, + { name: 'light', options: { theme: 'light' } }, + { name: 'cobalt', options: { palette: 'cobalt' } }, +]; + +test('the base starter ships no layout: no hero, no frame, an empty page.css that is never overwritten', () => { + const dir = folder('files'); + scaffoldBase(dir); + const html = readFileSync(join(dir, 'index.html'), 'utf8'); + for (const frame of ['class="hero', 'class="nav', 'class="window', 'class="bento', 'class="steps', 'class="closer']) assert.ok(!html.includes(frame), `${frame} is part of the shared frame`); + writeFileSync(join(dir, 'page.css'), '.mine {}\n'); + scaffoldBase(dir); + assert.equal(readFileSync(join(dir, 'page.css'), 'utf8'), '.mine {}\n'); +}); + +test('a flat tone sets the theme, and an unknown palette is refused', () => { + assert.equal(scaffoldBase(folder('sand'), { palette: 'sand' }).theme, 'light'); + assert.throws(() => scaffoldBase(folder('bad'), { palette: 'nope' }), /Unknown palette/); +}); + +test('the accent asked for is the accent written, with readable text on it, and a faint one is reported', () => { + const dir = folder('accent'); + const strong = scaffoldBase(dir, { theme: 'light', accent: '#b0271c' }); + const css = readFileSync(join(dir, 'theme.css'), 'utf8'); + assert.match(css, /--accent: #b0271c;/); + assert.match(css, /--on-accent: #ffffff;/); + assert.deepEqual(strong.problems, []); + assert.match(scaffoldBase(folder('faint'), { theme: 'light', accent: '#ffd43b' }).problems[0], /too faint/); + assert.throws(() => scaffoldBase(folder('short'), { accent: 'red' }), /hex/); +}); + +test('the base sets no layout a page has to fight: its two blocks carry no specificity', () => { + const css = readFileSync(new URL('../assets/starters/base/base.css', import.meta.url), 'utf8'); + assert.match(css, /:where\(\.first, \.last\)/); + assert.ok(!/justify-items/.test(css)); +}); + +for (const { name, options } of variants) { + const dir = folder(name); + scaffoldBase(dir, options); + const file = join(dir, 'index.html'); + + test(`${name}: the only tell is the unfinished placeholder marker`, { skip }, async () => { + assert.deepEqual([...new Set((await scan(file)).map((f) => f.tell))], ['Unfinished placeholder']); + }); + + test(`${name}: contrast, targets, names and focus pass at 320, 390, 1440 and 2560`, { skip }, async () => { + for (const r of await check(file, [320, 390, 1440, 2560])) assert.deepEqual(r.problems, [], `${r.width}px: ${JSON.stringify(r.problems)}`); + }); + + test(`${name}: every control answers the pointer, with a visible change`, { skip }, async () => { + for (const r of await craft(file, { widths: [390, 1440] })) assert.deepEqual(r.problems, [], `${r.width}px: ${JSON.stringify(r.problems)}`); + }); +} + +test('the base type never sets tighter than the measured evidence allows, and nothing overflows', { skip }, async () => { + const rows = await measureTracking({ font: 'Geist' }); + const dir = folder('type'); + scaffoldBase(dir); + const chrome = await launch(); + try { + for (const width of [320, 390, 768, 1024, 1440, 2560]) { + const page = await openPage(chrome.browser, { width, height: 900, mobile: width < 700 }); + await page.goto(toUrl(join(dir, 'index.html')), 600); + assert.equal(await page.evaluate('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1'), true, `${width}px scrolls sideways`); + for (const [sel, size, em] of await page.evaluate(`['.display', '.h2'].map((sel) => { const s = getComputedStyle(document.querySelector(sel)); const size = parseFloat(s.fontSize); return [sel, size, s.letterSpacing === 'normal' ? 0 : parseFloat(s.letterSpacing) / size]; })`)) { + const limit = tightestAt(rows, size); + assert.ok(em >= limit - 0.0051, `${width}px: ${sel} is ${size}px at ${em.toFixed(3)}em; the evidence allows ${limit}em`); + } + assert.deepEqual(page.logs, [], `${width}px console errors`); + await page.close(); + } + } finally { await chrome.close(); } +}); diff --git a/test/fixtures/lone-device.html b/test/fixtures/lone-device.html new file mode 100644 index 0000000..55569ec --- /dev/null +++ b/test/fixtures/lone-device.html @@ -0,0 +1,26 @@ + + + + +Example: a page with its own frame and one material running down it + + + + +
          Example
          +
          +

          Depth, layer by layer

          +

          How a sample is read

          Example text about a sample.

          +

          What is signed

          Example text about signing.

          Start
          +
          +
          Example
          + + diff --git a/test/fixtures/own-frame.html b/test/fixtures/own-frame.html new file mode 100644 index 0000000..77584c3 --- /dev/null +++ b/test/fixtures/own-frame.html @@ -0,0 +1,26 @@ + + + + +Example: a page with its own frame and one material running down it + + + + +
          Example
          +
          +

          Depth, layer by layer

          +

          How a sample is read

          Example text about a sample.

          +

          What is signed

          Example text about signing.

          Start
          +
          + + + diff --git a/test/frame.test.mjs b/test/frame.test.mjs new file mode 100644 index 0000000..9aeb333 --- /dev/null +++ b/test/frame.test.mjs @@ -0,0 +1,71 @@ +// The frame check: pure scoring, then real pages in a browser. +import assert from 'node:assert/strict'; +import { mkdtempSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { test } from 'node:test'; +import { fileURLToPath } from 'node:url'; +import { format, frame } from '../scripts/frame.mjs'; +import { findChrome } from '../scripts/lib/chrome.mjs'; +import { SAME_FRAME, WEIGHTS, judgeDevice, judgeFrames, lcs, similarity } from '../scripts/lib/frame.mjs'; +import { scaffold } from '../scripts/scaffold.mjs'; + +const skip = findChrome() ? false : 'no Chrome installed'; +const fixture = (name) => fileURLToPath(new URL(`./fixtures/${name}`, import.meta.url)); +const base = { nav: 'floating-pill', composition: 'art beside', align: 'left', container: 'inset panel', sequence: ['columns', 'text', 'closing panel'], button: 'pill', headlineFont: 'sans', ground: 'tinted' }; + +test('the weights add to one, so a score is a share of the skeleton', () => { + assert.ok(Math.abs(Object.values(WEIGHTS).reduce((a, b) => a + b, 0) - 1) < 1e-9); +}); + +test('section order is compared by what two pages share in sequence', () => { + assert.equal(lcs(['a', 'b', 'c'], ['a', 'c']), 2); + assert.equal(lcs(['a'], ['b']), 0); + assert.equal(lcs([], ['b']), 0); +}); + +test('the same skeleton scores one, and a recolour does not make it a new one', () => { + assert.equal(similarity(base, base).score, 1); + assert.ok(similarity(base, { ...base, ground: 'colour' }).score >= SAME_FRAME); + assert.ok(similarity(base, { ...base, nav: 'bar', composition: 'art behind', container: 'open', sequence: ['table', 'price'] }).score < SAME_FRAME); +}); + +test('pairs and starter frames at or over the threshold are reported', () => { + const other = { ...base, nav: 'none', composition: 'type only', align: 'centred', container: 'open', sequence: ['table'] }; + const r = judgeFrames([{ label: 'a', traits: base }, { label: 'b', traits: base }, { label: 'c', traits: other }], [{ label: 'split', traits: base }]); + assert.deepEqual(r.same.map((p) => [p.a, p.b]), [['a', 'b']]); + assert.deepEqual(r.unchanged.map((s) => s.page), ['a', 'b']); +}); + +test('a material passes across three sections or down the page, and fails alone or absent', () => { + assert.equal(judgeDevice({ rule: { sections: [0, 1, 3], coverage: 0.1 } }).pass, true); + assert.equal(judgeDevice({ ruler: { sections: [0], coverage: 1 } }).pass, true); + assert.equal(judgeDevice({ tick: { sections: [0, 1], coverage: 0.01 } }).pass, false); + assert.equal(judgeDevice({ late: { sections: [1, 2, 3], coverage: 0.1 } }).pass, false); + assert.match(judgeDevice({}).reason, /data-device/); +}); + +test('two pages from the landing starter share a frame, and are the starter frame', { skip }, async () => { + const pages = ['one', 'two'].map((name, i) => { + const dir = mkdtempSync(join(tmpdir(), `frame-${name}-`)); + scaffold(dir, { ground: 'flat', palette: i ? 'mint' : 'sand', hero: 'split', minimal: true }); + return join(dir, 'index.html'); + }); + const r = await frame(pages); + assert.equal(r.pass, false); + assert.equal(r.same.length, 1); + assert.equal(r.unchanged.length, 2); + assert.match(format(r), /SAME FRAME/); +}); + +test('a page with its own frame and a material down the edge passes', { skip }, async () => { + const r = await frame([fixture('own-frame.html')]); + assert.equal(r.pages[0].device.pass, true, JSON.stringify(r.pages[0])); + assert.deepEqual(r.unchanged, []); + assert.equal(r.pass, true, format(r)); +}); + +test('one small marked element on the first screen is not a material, unless the check is turned off', { skip }, async () => { + assert.equal((await frame([fixture('lone-device.html')], { starter: false })).pass, false); + assert.equal((await frame([fixture('lone-device.html')], { starter: false, device: false })).pass, true); +});