@jonandev/longbeard 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/AGENTS.md +5 -5
  2. package/CHANGELOG.md +27 -0
  3. package/README.md +3 -4
  4. package/beard.json +6 -17
  5. package/bin/long-beard.js +2 -2
  6. package/package.json +1 -1
  7. package/skills/design/SKILL.md +4 -6
  8. package/skills/design-brief/SKILL.md +5 -5
  9. package/skills/design-check/SKILL.md +1 -1
  10. package/skills/design-check/references/design-rules.md +26 -4
  11. package/skills/design-check/scripts/rules.mjs +143 -9
  12. package/skills/design-direction/SKILL.md +70 -52
  13. package/skills/design-direction/references/design-floor.md +118 -0
  14. package/skills/design-direction/references/graphic.md +5 -6
  15. package/skills/design-direction/references/library.md +6 -6
  16. package/skills/design-direction/references/screen-template.html +2 -2
  17. package/skills/design-direction/references/subject.md +2 -2
  18. package/skills/design-direction/references/variants.js +43 -0
  19. package/skills/design-direction/scripts/canvas.mjs +12 -9
  20. package/skills/design-direction/scripts/colours.mjs +247 -0
  21. package/skills/design-direction/scripts/moodboard.mjs +1 -1
  22. package/skills/design-direction/scripts/rules.mjs +747 -0
  23. package/skills/design-direction/scripts/sheet.mjs +3 -1
  24. package/skills/design-figma/SKILL.md +1 -1
  25. package/skills/design-identity/SKILL.md +9 -7
  26. package/skills/design-identity/references/design-floor.md +118 -0
  27. package/skills/design-identity/scripts/colours.mjs +35 -1
  28. package/skills/design-identity/scripts/sheet.mjs +3 -1
  29. package/skills/design-moodboard/SKILL.md +6 -2
  30. package/skills/design-moodboard/references/graphic.md +1 -1
  31. package/skills/design-moodboard/scripts/group.mjs +1 -1
  32. package/skills/design-moodboard/scripts/moodboard.mjs +1 -1
  33. package/skills/design-prototype/SKILL.md +51 -48
  34. package/skills/design-prototype/references/design-floor.md +118 -0
  35. package/skills/design-prototype/references/design-md-template.md +3 -1
  36. package/skills/design-prototype/references/graphic.md +6 -5
  37. package/skills/design-prototype/references/variants.js +43 -0
  38. package/skills/design-prototype/scripts/links.mjs +5 -4
  39. package/skills/design-prototype/scripts/rules.mjs +143 -9
  40. package/skills/design-prototype/scripts/sheet.mjs +3 -1
  41. package/skills/design-wordmark/SKILL.md +6 -2
  42. package/skills/design-wordmark/scripts/sheet.mjs +3 -1
  43. package/skills/idea/SKILL.md +3 -3
  44. package/skills/design-direction/references/design-rules.md +0 -204
  45. package/skills/design-direction/references/full-build.md +0 -20
  46. package/skills/design-direction/references/grid.md +0 -97
  47. package/skills/design-direction/scripts/layout-diff.mjs +0 -118
  48. package/skills/design-families/SKILL.md +0 -139
  49. package/skills/design-families/scripts/contact-sheet.mjs +0 -259
  50. package/skills/design-families/scripts/families.mjs +0 -607
  51. package/skills/design-families/scripts/measure.mjs +0 -1728
  52. package/skills/design-families/scripts/moodboard.mjs +0 -609
  53. package/skills/design-families/scripts/tag.mjs +0 -289
  54. package/skills/design-prototype/references/design-rules.md +0 -204
  55. package/skills/design-prototype/references/five-second.md +0 -46
@@ -1,289 +0,0 @@
1
- #!/usr/bin/env node
2
- // The agent's eye, written down in one fixed vocabulary of two layers, so what
3
- // numbers cannot see (a photograph, a 3D render, chrome lettering) counts when
4
- // families are sorted, and a brief can pick references by what they are for.
5
- // Tags live in profiles.json beside the measurements. No dependencies.
6
- //
7
- // node tag.mjs .longbeard/design/<step>/profiles.json --sheets <scratch>/tag
8
- // Contact sheets of the references not yet tagged, 16 a sheet, 4 across, and
9
- // both layers' words. Open each sheet, write one row per reference into a TSV.
10
- // node tag.mjs .longbeard/design/<step>/profiles.json tags.tsv
11
- // Check every word against its field and merge the rows into the profiles.
12
- //
13
- // Two layers. The look (VOCABULARY: picture, photo, type, weight, layout,
14
- // colour, surface, scale, motion) is how a reference looks, and families.mjs
15
- // sorts on it; it is stored in profile.tags. The about layer (ABOUT: format,
16
- // domain, mood, hue, density, shows) is what a reference is and is for, and
17
- // what the picture shows: it is stored in profile.about and checked like the
18
- // look, but never sorted on.
19
- //
20
- // A row, as before: name<TAB>picture<TAB>photo<TAB>type<TAB>weight<TAB>layout<TAB>colour<TAB>surface<TAB>scale[<TAB>note]
21
- // Or a header row first, naming its columns in any order, so motion and the
22
- // about fields can be given: name<TAB>picture<TAB>…<TAB>scale<TAB>motion<TAB>format<TAB>domain<TAB>note
23
- // The eight look fields above are required; motion, the about fields and the
24
- // note are optional, and an empty cell means not given. A header without a
25
- // note column still takes one extra cell at the end of a row as the note.
26
- // Two values in one field are joined with +, the main one first: photo+lettering.
27
- // The note is a few words of what is seen ("chrome 3D wordmark, pixel fill"):
28
- // it is not sorted on, but it names families and reads into the library.
29
- //
30
- // A tag line: both layers as one flat line of words, the way people keep a
31
- // reference's tags by hand, easy to edit and to search:
32
- // photo serif weight:bold split muted grain large kinetic · web-hero fashion calm red airy portrait
33
- // parseTagLine and formatTagLine read and write it, so every tool reads a line
34
- // the same way. Words split on whitespace and ·. A word belongs to its field
35
- // when it is in exactly one field across both layers; a word in two or more
36
- // (none, ui, collage, mono, duotone, bold, editorial today: AMBIGUOUS) is
37
- // written field:word, as type:mono or mood:editorial, and bare it is refused.
38
- // Two words for one field are both written, the main one first. none is left
39
- // out of a line, and a line without picture, photo or motion reads them as none.
40
- // A header may name one more column, line, holding a tag line for the fields
41
- // the cells leave empty; the eight look fields are then required from the two
42
- // together, and an unknown or ambiguous word in it refuses the merge.
43
- import { spawnSync } from "node:child_process";
44
- import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
45
- import { basename, dirname, join, resolve } from "node:path";
46
- import { fileURLToPath } from "node:url";
47
-
48
- export const VOCABULARY = {
49
- picture: {
50
- photo: "a photograph",
51
- illustration: "drawn or painted scenes, characters, objects",
52
- render: "3D: rendered objects, glass, clay, blobs",
53
- lettering: "the type itself is the picture",
54
- ui: "screens of a product, a device mock-up",
55
- product: "an object cut out on the ground, packshot",
56
- pattern: "a repeat: grid, dots, lines, tiles",
57
- icon: "small symbols: icons, logos, emoji, pictograms",
58
- shape: "solid flat shapes or colour blocks, no drawing in them",
59
- collage: "cut-outs, stickers, layered scraps",
60
- none: "no picture: type and ground only",
61
- },
62
- photo: { colour: "colour photographs", mono: "black and white", duotone: "one or two tints", none: "no photographs" },
63
- type: { serif: "serif", sans: "sans serif", mono: "monospaced", display: "a display face: wide, decorative, rounded", condensed: "narrow display", outline: "outlined letters", script: "handwriting or script", mixed: "two kinds, both prominent" },
64
- weight: { thin: "thin or light", regular: "regular", bold: "bold", black: "black, heaviest" },
65
- layout: {
66
- centred: "one centred stack",
67
- left: "aligned left, ragged right",
68
- split: "two halves or columns",
69
- grid: "cards or tiles in a grid",
70
- "full-bleed": "one picture fills the screen",
71
- collage: "overlapping pieces at angles",
72
- scattered: "items floating apart",
73
- "edge-type": "type runs off the edges",
74
- },
75
- colour: { neutral: "black, white, greys", muted: "soft, dusty, low saturation", "one-accent": "neutral plus one loud colour", bright: "saturated grounds or shapes", multi: "many colours", pastel: "pale, soft tints", dark: "dark-mode grounds", duotone: "two colours only" },
76
- surface: { flat: "flat fills", grain: "grain, noise, paper", glossy: "shine, glass, reflections", "hand-drawn": "lines by hand", glow: "glows, soft gradients", chrome: "metal, chrome" },
77
- // How big the largest type is. A live page measures it; a picture alone (a Figma board, a folder) only has this.
78
- scale: { quiet: "the largest type is near the body size", heading: "a clear headline, well under a third of the width", large: "the headline dominates the screen", huge: "type fills the screen or runs off it" },
79
- // Optional: what moves, for a gif, a video or a live page. Not given on a still is not given, not none.
80
- motion: { none: "nothing moves", kinetic: "type or shapes moving", "blur-grain": "blur, grain, light leaks", ui: "interface transitions", repetition: "looping or repeated elements" },
81
- };
82
- // What a reference is and is for: stored in profile.about and checked, never sorted on.
83
- const words = (list) => Object.fromEntries(list.split(" ").map((w) => [w, w.replace(/-/g, " ")]));
84
- export const ABOUT = {
85
- format: words("web-hero web-page web-section app-screens dashboard poster editorial cover logo-mark packaging social-post brand-system type-specimen palette pattern-icons merch-stickers deck-slides print-collateral"),
86
- domain: words("portfolio fashion art-museum food-drink film tech-saas finance travel-outdoors education music-events beauty-wellness interiors-architecture sport-cycling agency-studio"),
87
- mood: words("cinematic nostalgic calm playful luxe raw editorial minimal tech bold"),
88
- hue: words("red orange lime yellow blue pink purple green teal brown-ochre"),
89
- density: { airy: "much room", balanced: "room and matter even", dense: "packed" },
90
- // What the picture shows.
91
- // What the picture shows. Not "subject": that word is the product's own world, in design-direction.
92
- shows: words("portrait close-crop landscape still-life classical-art cutout type-only"),
93
- };
94
- // Every look field; the first eight are required in every row, and are the old row's columns in order.
95
- export const FIELDS = Object.keys(VOCABULARY);
96
- export const REQUIRED = FIELDS.filter((f) => f !== "motion");
97
- const OPTIONAL = ["motion"];
98
- const ABOUT_FIELDS = Object.keys(ABOUT);
99
- const vocabOf = (field) => VOCABULARY[field] || ABOUT[field];
100
-
101
- // Every word, and the fields across both layers that hold it.
102
- const FIELDS_OF = new Map();
103
- for (const [field, vocab] of [...Object.entries(VOCABULARY), ...Object.entries(ABOUT)])
104
- for (const word of Object.keys(vocab)) FIELDS_OF.set(word, [...(FIELDS_OF.get(word) || []), field]);
105
- // The words a tag line must write as field:word.
106
- export const AMBIGUOUS = [...FIELDS_OF].filter(([, fields]) => fields.length > 1).map(([word]) => word);
107
- // A line that does not name these reads them as none.
108
- const NONE_WHEN_MISSING = ["picture", "photo", "motion"];
109
-
110
- // One flat line of words → { tags, about, unknown, ambiguous }. Nothing is dropped:
111
- // a word that is not assigned is in unknown or ambiguous, as it was written.
112
- export function parseTagLine(line) {
113
- const tags = {};
114
- const about = {};
115
- const unknown = [];
116
- const ambiguous = [];
117
- const add = (field, word) => {
118
- const layer = field in VOCABULARY ? tags : about;
119
- if (!(layer[field] ||= []).includes(word)) layer[field].push(word);
120
- };
121
- for (const token of String(line || "").toLowerCase().split(/[\s·]+/).filter(Boolean)) {
122
- const colon = token.indexOf(":");
123
- if (colon !== -1) {
124
- const [field, word] = [token.slice(0, colon), token.slice(colon + 1)];
125
- if (vocabOf(field) && Object.hasOwn(vocabOf(field), word)) add(field, word);
126
- else if (!unknown.includes(token)) unknown.push(token);
127
- continue;
128
- }
129
- const fields = FIELDS_OF.get(token) || [];
130
- if (fields.length === 1) add(fields[0], token);
131
- else if (fields.length > 1) ambiguous.includes(token) || ambiguous.push(token);
132
- else unknown.includes(token) || unknown.push(token);
133
- }
134
- for (const field of NONE_WHEN_MISSING) if (!tags[field]) tags[field] = ["none"];
135
- // In field order, as formatTagLine writes them.
136
- const ordered = (layer, order) => Object.fromEntries(order.filter((f) => layer[f]).map((f) => [f, layer[f]]));
137
- return { tags: ordered(tags, FIELDS), about: ordered(about, ABOUT_FIELDS), unknown, ambiguous };
138
- }
139
-
140
- // { tags, about } → the line: look fields in VOCABULARY order, " · ", about fields in
141
- // ABOUT order. none is left out; a word in two fields gets its field: prefix.
142
- export function formatTagLine({ tags = {}, about = {} } = {}) {
143
- // A profile stored before the field was renamed keeps its words under subject.
144
- if (about.subject && !about.shows) about = { ...about, shows: about.subject };
145
- const part = (layer, order) =>
146
- order
147
- .flatMap((field) =>
148
- (layer[field] || []).filter((word) => word !== "none").map((word) => {
149
- if (!Object.hasOwn(vocabOf(field), word)) throw new Error(`tag: ${field} "${word}" is not in the vocabulary: use ${Object.keys(vocabOf(field)).join(", ")}`);
150
- return AMBIGUOUS.includes(word) ? `${field}:${word}` : word;
151
- }),
152
- )
153
- .join(" ");
154
- return [part(tags, FIELDS), part(about, ABOUT_FIELDS)].filter(Boolean).join(" · ");
155
- }
156
-
157
- const fail = (text) => {
158
- console.error(`tag: ${text}`);
159
- process.exit(1);
160
- };
161
-
162
- function main() {
163
- const args = process.argv.slice(2);
164
- const at = args.indexOf("--sheets");
165
- const sheetsArg = at === -1 ? "" : (args.splice(at, 2)[1] ?? "");
166
- const [profilesArg, tagsArg] = args;
167
- if (!profilesArg || (!sheetsArg && !tagsArg) || (sheetsArg && tagsArg)) {
168
- console.error("usage: node tag.mjs profiles.json --sheets <dir> | node tag.mjs profiles.json tags.tsv");
169
- process.exit(2);
170
- }
171
- if (!existsSync(profilesArg)) fail(`no profiles at ${profilesArg}: make them with measure.mjs --profiles`);
172
- const store = JSON.parse(readFileSync(profilesArg, "utf8"));
173
- const refs = store.refs || {};
174
-
175
- if (sheetsArg) {
176
- const todo = Object.entries(refs).filter(([, p]) => !p.tags && p.shot && existsSync(p.shot));
177
- if (!todo.length) return console.log("every reference is tagged");
178
- mkdirSync(sheetsArg, { recursive: true });
179
- const lists = [];
180
- for (let i = 0; i < todo.length; i += 16) {
181
- const list = join(sheetsArg, `untagged-${String(i / 16 + 1).padStart(2, "0")}.tsv`);
182
- writeFileSync(list, `${todo.slice(i, i + 16).map(([name, p]) => `${name}\t${resolve(p.shot)}`).join("\n")}\n`);
183
- lists.push(list);
184
- }
185
- const sheet = join(dirname(fileURLToPath(import.meta.url)), "contact-sheet.mjs");
186
- for (const list of lists) {
187
- const r = spawnSync(process.execPath, [sheet, list, "--out", join(sheetsArg, basename(list, ".tsv")), "--per", "16", "--cols", "4", "--contain"], { encoding: "utf8" });
188
- if (r.status !== 0) fail(r.stderr || "contact-sheet.mjs failed");
189
- process.stdout.write(r.stdout);
190
- }
191
- console.log(`\n${todo.length} to tag. A header row, then one row each: name\t${[...FIELDS, ...ABOUT_FIELDS].join("\t")}\tnote`);
192
- console.log(`Required: ${REQUIRED.join(", ")}. Optional, an empty cell when not seen: ${[...OPTIONAL, ...ABOUT_FIELDS].join(", ")}, note.`);
193
- console.log("\nThe look (sorted on):");
194
- for (const field of FIELDS) console.log(`${field}: ${Object.entries(VOCABULARY[field]).map(([w, what]) => `${w} (${what})`).join(", ")}`);
195
- console.log("\nWhat it is and is for (stored, never sorted on):");
196
- for (const field of ABOUT_FIELDS) console.log(`${field}: ${Object.keys(ABOUT[field]).join(", ")}`);
197
- console.log(`\nOr a line column, one tag line for both layers (look · about). Write ${AMBIGUOUS.join(", ")} as field:word; leave none out.`);
198
- return;
199
- }
200
-
201
- if (!existsSync(tagsArg)) fail(`no tags at ${tagsArg}`);
202
- const problems = [];
203
- let merged = 0;
204
- // Columns: the old row's order until a header row names them.
205
- let columns = null;
206
- for (const [n, line] of readFileSync(tagsArg, "utf8").split(/\r?\n/).entries()) {
207
- if (!line.trim()) continue;
208
- const cells = line.split("\t").map((x) => x.trim());
209
- if (cells[0] === "name") {
210
- // "subject" was this column's first name: read it as shows.
211
- columns = cells.slice(1).map((c) => (c === "subject" ? "shows" : c));
212
- const known = new Set([...FIELDS, ...ABOUT_FIELDS, "note", "line"]);
213
- const unknown = columns.filter((c) => !known.has(c));
214
- // With a line column, the look fields the header leaves out come from the line.
215
- const missing = columns.includes("line") ? [] : REQUIRED.filter((f) => !columns.includes(f));
216
- const twice = columns.filter((c, i) => columns.indexOf(c) !== i);
217
- if (unknown.length) problems.push(`line ${n + 1}: header names ${unknown.join(", ")}: use ${[...FIELDS, ...ABOUT_FIELDS].join(", ")}, note, line`);
218
- if (missing.length) problems.push(`line ${n + 1}: header has no ${missing.join(", ")}: every row needs ${REQUIRED.join(", ")}`);
219
- if (twice.length) problems.push(`line ${n + 1}: header names ${[...new Set(twice)].join(", ")} twice`);
220
- continue;
221
- }
222
- const [name, ...values] = cells;
223
- if (!refs[name]) {
224
- problems.push(`line ${n + 1}: no reference called ${name}`);
225
- continue;
226
- }
227
- let row;
228
- if (!columns) {
229
- if (values.length !== REQUIRED.length && values.length !== REQUIRED.length + 1) {
230
- problems.push(`line ${n + 1}: ${name} has ${values.length} fields, not ${REQUIRED.length} (${REQUIRED.join(", ")}) and an optional note; a header row can name motion and the about fields`);
231
- continue;
232
- }
233
- row = Object.fromEntries(REQUIRED.map((f, k) => [f, values[k]]));
234
- row.note = values[REQUIRED.length] || "";
235
- } else {
236
- // A header without a note column takes one extra cell as the note; cells left off the end are empty.
237
- const width = columns.length + (columns.includes("note") ? 0 : 1);
238
- if (values.length > width) {
239
- problems.push(`line ${n + 1}: ${name} has ${values.length} fields, the header names ${columns.length}`);
240
- continue;
241
- }
242
- row = Object.fromEntries(columns.map((c, k) => [c, values[k] || ""]));
243
- if (!columns.includes("note")) row.note = values[columns.length] || "";
244
- }
245
- if (row.line) {
246
- // The line fills the fields its cells leave empty, read as every tool reads one.
247
- const parsed = parseTagLine(row.line);
248
- if (parsed.unknown.length) problems.push(`line ${n + 1}: ${name} line: ${parsed.unknown.map((w) => `"${w}"`).join(", ")} in no field`);
249
- if (parsed.ambiguous.length) problems.push(`line ${n + 1}: ${name} line: ${parsed.ambiguous.map((w) => `"${w}" is in ${FIELDS_OF.get(w).join(", ")}: write ${FIELDS_OF.get(w).map((f) => `${f}:${w}`).join(" or ")}`).join("; ")}`);
250
- const tokens = row.line.toLowerCase().split(/[\s·]+/);
251
- for (const [field, given] of Object.entries({ ...parsed.tags, ...parsed.about })) {
252
- // A none the line only reads for a missing field gives way to a filled cell.
253
- const defaulted = given.join() === "none" && !tokens.includes(`${field}:none`);
254
- if (!row[field]) row[field] = given.join("+");
255
- else if (!defaulted) problems.push(`line ${n + 1}: ${name} ${field} is in its cell and in the line: give it once`);
256
- }
257
- }
258
- const read = (field) => {
259
- const given = (row[field] || "").split("+").map((w) => w.trim()).filter(Boolean);
260
- const bad = given.filter((w) => !(w in vocabOf(field)));
261
- if (bad.length || (!given.length && REQUIRED.includes(field))) problems.push(`line ${n + 1}: ${name} ${field} "${row[field] || ""}": use ${Object.keys(vocabOf(field)).join(", ")}`);
262
- return given;
263
- };
264
- const tags = {};
265
- for (const field of FIELDS) {
266
- const given = read(field);
267
- if (given.length) tags[field] = given;
268
- }
269
- const about = {};
270
- for (const field of ABOUT_FIELDS) {
271
- const given = read(field);
272
- if (given.length) about[field] = given;
273
- }
274
- // Merged over what was there: a field not given keeps its words.
275
- refs[name].tags = { ...(refs[name].tags || {}), ...tags };
276
- if (Object.keys(about).length) {
277
- const { subject: was, ...before } = refs[name].about || {};
278
- refs[name].about = { ...before, ...(was && !before.shows ? { shows: was } : {}), ...about };
279
- }
280
- if (row.note) refs[name].note = row.note;
281
- merged++;
282
- }
283
- if (problems.length) fail(`nothing merged:\n${problems.join("\n")}`);
284
- writeFileSync(profilesArg, `${JSON.stringify(store, null, 1)}\n`);
285
- const left = Object.values(refs).filter((p) => !p.tags).length;
286
- console.log(`tagged ${merged}, ${left} left untagged`);
287
- }
288
-
289
- if (process.argv[1] && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))) main();
@@ -1,204 +0,0 @@
1
- # Design rules
2
-
3
- How a screen is checked. Read by `design-direction` and `design-prototype` before they prototype and by `design-check` on every frame and build.
4
-
5
- These rules decide execution, never the look. The direction and `DESIGN.md` decide the look. A rule that seems to ask for a colour, a typeface or a style is misread. It asks only that whatever was chosen is used with intent.
6
-
7
- ## How to use this
8
-
9
- - Check from a screenshot. Every check below can be passed or failed by looking at a rendered screen at its real size. When a check needs a state you cannot see (focus, error, empty), it needs that state's frame, and a missing frame fails rule 8.
10
- - Go in order: **Idea** first, then every **hard** check, then **soft**.
11
- - **Hard** is the floor: structure, contrast, targets, focus and states. A hard failure blocks the screen. `DESIGN.md` cannot waive it, with one exception: a colour the person liked by name and kept under the contrast level, marked `WARN liked, kept` in `DESIGN.md`, is reported as a warning, not a block.
12
- - **Soft** is a default. `DESIGN.md` may override a soft check on purpose, with a written reason. A soft finding with no reason in `DESIGN.md` is reported, not blocked.
13
- - A finding is four things: the rule (number and check), hard or soft, where on the screen, and the fix.
14
- - The shared core applies to everything, except where the Graphics list says it does not. Then add the site, app or graphics list, whichever the brief's surface says.
15
-
16
- ## 0. Idea
17
-
18
- **Principle:** the screen says one thing about this product that a screen from another product would not.
19
-
20
- - [soft] Cover the logo and the name. Is it still recognisably this product, from its content, imagery, voice or structure? A screen that could belong to any product in the category fails.
21
- - [soft] You can say what the screen is for in one sentence, and the most visible element serves that sentence.
22
- - [soft] The ownable idea in `DESIGN.md` (or the direction, before `DESIGN.md` exists) shows up somewhere you can point to.
23
-
24
- ## 1. Hierarchy
25
-
26
- **Principle:** the eye lands first on what matters most, then moves in the order the task needs.
27
-
28
- - [hard] Exactly one element is the most prominent on the screen. Squint or blur the shot: one thing still stands out.
29
- - [hard] The primary action is easier to find than any secondary action. If two actions look equally important, only one of them should be.
30
- - [soft] Prominence comes from at most two of size, weight, colour and position at once. Using all four on one element is shouting.
31
- - [soft] Secondary text (meta, captions, help) is visibly quieter than body text, by lighter colour or smaller size, not both pushed to the limit.
32
-
33
- ## 2. Grouping
34
-
35
- **Principle:** things that belong together look together, and things that do not are kept apart.
36
-
37
- - [hard] The space between related items is clearly smaller than the space between groups. A label sits closer to its field than to the field above.
38
- - [soft] Each group is separated by one device: space, a tone step, a box, or a line. Two at once (a boxed card with a divider inside a tinted panel) is noise.
39
- - [soft] A reader can count the groups on the screen at a glance, and the count matches the sections the brief describes.
40
-
41
- ## 3. Alignment and grid
42
-
43
- **Principle:** every element sits on a line shared with something else.
44
-
45
- - [hard] Left edges of text blocks in one column line up. No block is nudged a few pixels off its neighbours.
46
- - [soft] The screen has a small number of alignment lines (often a column grid). Draw them on the shot: an element that touches none of them needs a reason.
47
- - [soft] Centred alignment is used for a single moment (an empty state, a hero line), not as the default for whole sections of left-reading content.
48
- - [soft] Numbers in a column align on the right or on the decimal, so they compare.
49
-
50
- ## 4. Spacing rhythm
51
-
52
- **Principle:** space comes from a short scale, and bigger gaps mean bigger separations.
53
-
54
- - [soft] Every gap on the screen comes from the spacing scale in `DESIGN.md`. Measure five gaps at random: all are on the scale.
55
- - [soft] There are at most three or four distinct gap sizes in one view, and each has a job (inside a component, between items, between groups, between sections).
56
- - [soft] Nothing touches the edge of its container. Text inside a box has padding at least as large as the gap between its lines.
57
- - [soft] Dense views stay dense on purpose: a table or list keeps tight rows rather than inheriting marketing-page spacing.
58
-
59
- ## 5. Typography
60
-
61
- **Principle:** a few sizes, far apart, set for reading.
62
-
63
- - [soft] The view uses at most five font sizes, and adjacent sizes are clearly different (roughly a 1.2× step or more), not 15, 16 and 17.
64
- - [soft] Body text runs about 45 to 80 characters per line on desktop. Count one line.
65
- - [soft] Body line height is visibly looser than heading line height. Headings of two lines do not drift apart.
66
- - [soft] Weight does the work before size. A label is not set larger to be noticed when bold would do.
67
- - [hard] No text is clipped, overlapped, or cut mid-word by its container, in any language the product ships.
68
-
69
- ## 6. Colour
70
-
71
- **Principle:** colour carries meaning, and the meaning stays the same everywhere.
72
-
73
- - [hard] Body text has a contrast ratio of at least 4.5:1 against its background. Large text (24px, or 18.66px bold, and up) and the visible parts of controls and icons have at least 3:1. When `DESIGN.md` or the design brief sets the level to AAA: 7:1 for body text and 4.5:1 for large text.
74
- - [hard] Colour is never the only signal. An error, a selected item or a required field also changes shape, weight, an icon or text.
75
- - [soft] Every colour on the screen is a token in `DESIGN.md`. Pick three at random: each maps to a named token.
76
- - [hard] A product with more than one theme has one set of colour tokens, with a value for each theme, and passes every check here in each theme. A colour that stays the same when the theme changes, and should not, fails.
77
- - [soft] The accent colour marks action or state, and is not also used for decoration on the same screen.
78
- - [soft] Status colours (error, warning, success) are used for status only.
79
-
80
- ## 7. Consistency
81
-
82
- **Principle:** the same thing looks and behaves the same everywhere.
83
-
84
- - [hard] One action has one look. Two primary buttons on different screens are the same component, same size and same label case.
85
- - [soft] Components come from the Figma library or the codebase's components. A one-off that looks like a library component, but is slightly different, fails.
86
- - [soft] Icons share a style: one stroke weight or one fill style, one corner treatment, one optical size.
87
- - [soft] The same word means the same thing. "Delete" and "Remove" are not both used for one action.
88
-
89
- ## 8. States
90
-
91
- **Principle:** every screen is shown in every state a person will meet.
92
-
93
- - [hard] The screen has a frame for each of empty, loading and error that a person can reach, next to the default. A state nobody can reach is recorded as not needed, with the reason. A reachable state with no frame is a failure, not a later task.
94
- - [hard] Empty says what goes here and gives the one action that fills it. Error says what went wrong in plain words and how to recover.
95
- - [hard] Interactive components show hover (pointer surfaces), focus, pressed, disabled, and selected where they apply. Each state is visibly different from default.
96
- - [soft] Loading keeps the layout's shape (skeleton or reserved space), so content does not jump when it arrives.
97
- - [soft] Long content is shown: the longest real name, a big number, a two-line title. Short sample text hides overflow.
98
-
99
- ## 9. Affordance and feedback
100
-
101
- **Principle:** what can be acted on looks like it, and every action visibly answers.
102
-
103
- - [hard] Every interactive element looks interactive without hovering. Text links are distinct from body text by more than colour alone, unless their position makes them obvious (a nav bar).
104
- - [hard] Nothing that looks interactive is not. A card that looks clickable is clickable, or loses the look.
105
- - [soft] Each action has a visible result frame: a saved state, a toast, the item appearing in the list, a progress indicator for anything over a second.
106
- - [soft] Destructive actions look different from safe ones and are never the default or most prominent option.
107
-
108
- ## 10. Accessibility
109
-
110
- **Principle:** the screen works for people who see, move and read differently.
111
-
112
- - [hard] The focused state of every interactive element shows a visible indicator with at least 3:1 contrast against what is around it. Check it in the focus frame.
113
- - [hard] Targets are at least 24×24 CSS pixels, or have that much space around them (WCAG 2.2 AA). The app list raises this for touch.
114
- - [hard] Every input has a visible label. A placeholder alone is not a label.
115
- - [hard] Text is real text, not text in an image, except in logos.
116
- - [soft] The screen still reads at 200% text size: nothing important is cut off in the zoomed frame.
117
-
118
- ## 11. Copy
119
-
120
- **Principle:** words do the job of the screen in the product's own voice, made from facts it has.
121
-
122
- **Dated 2026-11-21. Reviewed each release.**
123
-
124
- - [hard] No placeholder copy: no lorem ipsum, no "Title", no "Button", no "User Name".
125
- - [soft] Buttons say what happens: "Send invoice", not "Submit", "OK", "Get started" or "Learn more".
126
- - [soft] Headings are short. A heading that runs over two lines at its size is a sentence that belongs in the body.
127
- - [soft] The voice matches `DESIGN.md`. Read three strings aloud: they sound like one product.
128
- - [soft] No genre filler: unlock, supercharge, seamless, elevate, effortless, all-in-one, and "not just X, it's Y". Sincerity is shown, not claimed ("honest", "simply").
129
- - [soft] A rhetorical device (a heading in two fragments, "X, not Y", a row of three figures) appears once on a screen, where it lands hardest.
130
- - [soft] No detail is invented. Every number, name and quote traces to the brief, or is marked as assumed (see the prototype's stand-in marks). A section with nothing true to say is shorter or gone.
131
- - [soft] Voice test: would this voice suit a product in another trade? If yes, it is not this product's yet.
132
-
133
- ## 12. Imagery
134
-
135
- **Principle:** pictures show the real thing, or there are none.
136
-
137
- - [soft] Images show this product's subject, people or interface. A stock scene that fits any product in the category fails.
138
- - [soft] Where a picture belongs, there is a picture, not a grey box, a gradient or a text block pretending.
139
- - [soft] Images share one treatment: one crop logic, one colour handling, one corner shape.
140
- - [hard] Text over an image meets the contrast floor in rule 6 across the whole text area, not only on the darkest part.
141
-
142
- ## 13. Responsive
143
-
144
- **Principle:** each size is designed, not squeezed.
145
-
146
- - [hard] At mobile width (360–390px) nothing scrolls sideways, nothing is clipped, and nothing overlaps.
147
- - [hard] The primary action is reachable at every size without hunting: visible, or one obvious step away.
148
- - [soft] The layout changes structure between sizes where it should: columns stack, tables become lists or scroll inside their own box, navigation collapses into one control.
149
- - [soft] Type and spacing scale down a step on mobile, not to illegible sizes. Body text stays at least 16px.
150
-
151
- ## 14. Tells
152
-
153
- **Dated 2026-11-25. Reviewed each release.** Add new tells, retire ones that stopped being defaults.
154
-
155
- A tell is a device that makes a screen look produced by default rather than designed for this product. Most began as good ideas. They are tells because they arrive without a reason. Every check here is **soft**: present, and `DESIGN.md` gives no reason for it. This list never says what to use instead. That comes from the direction. A device that came with a look they chose on rendered screens is there on purpose: `DESIGN.md` says under Decisions what it does for this product.
156
-
157
- - [soft] Purple-to-blue gradients on backgrounds, buttons, glows or headline text.
158
- - [soft] Translucent blurred panels used on two or more surfaces.
159
- - [soft] The same soft grey shadow under every card.
160
- - [soft] A row of three identical feature cards, each an icon in a rounded square, a heading and two lines.
161
- - [soft] Emoji used as icons or bullets.
162
- - [soft] A tiny tracked uppercase label above every heading, or a pill badge ("New", "Beta") above the hero line.
163
- - [soft] One word of a headline singled out in another face, colour or underline.
164
- - [soft] A cream ground with a terracotta or rust accent, used as a shortcut to "warm".
165
- - [soft] Decorative monospace labels, index numbering (01 / 02 / 03) as ornament, hairline rules boxing everything, or design-tool marks (crosshairs, crop marks) as decoration.
166
- - [soft] A fake dashboard made of grey bars and donut charts where a real interface fragment should be.
167
- - [soft] Invented social proof: logos, quotes, star rows or user counts the product does not have.
168
- - [soft] Every section in the same layout, or the stock order hero, logos, features, testimonial, pricing, call to action, when the argument needs another.
169
- - [soft] One medium corner radius on everything, chosen by default rather than on purpose.
170
- - [soft] A face that is the platform's or the framework's default (Inter, Roboto, the system UI stack) with no reference behind it.
171
-
172
- Removing tells is not the goal. A screen with none and no idea fails rule 0.
173
-
174
- ## Sites
175
-
176
- Add these when the brief's surface is a site: the page a person lands on to understand or choose.
177
-
178
- - [hard] The first screen at mobile and desktop says what this is and who it is for, without scrolling.
179
- - [soft] Sections follow the order of the argument the brief makes, and each section is composed differently from the one before.
180
- - [soft] There is one primary call to action, repeated at most at the end, with the same label.
181
- - [soft] Proof is real (product shots, named customers the product has, numbers it can stand behind) or absent.
182
-
183
- ## Apps
184
-
185
- Add these when the brief's surface is an app: the tool a person comes back to.
186
-
187
- - [hard] Touch targets on touch platforms are at least 44×44 pt (Apple) or 48×48 dp (Material), whichever platform it ships on. The web floor in rule 10 still applies.
188
- - [hard] The person always knows where they are: the current place in navigation is marked, and the screen title matches the nav item.
189
- - [soft] Density fits repeated use. Lists and tables show enough rows to work, not marketing-sized cards.
190
- - [soft] Navigation keeps the same place and shape on every screen of the flow.
191
- - [soft] Frequent actions are one step away. Rare and destructive ones may be further.
192
-
193
- ## Graphics
194
-
195
- Add these when the brief's surface is a graphic: a poster, a card, a social post, a piece to look at. A piece counts as a screen.
196
-
197
- - **Applies:** rules 0 to 3, 5, 6, 11, 12 and 14. Rule 4 holds for the margin and the gaps between groups. Rule 7 holds across the pieces of a set.
198
- - **Does not apply:** rule 8 (states), rule 9 (affordance), the targets, focus and label checks of rule 10, and rule 13 (responsive). A missing state frame is not a finding.
199
- - [hard] Readable at its distance. Scale the shot to how the piece is seen (a poster read across a street, about 400 px on its long side; a feed post at phone width). The headline and every fact the brief gives still read.
200
- - [hard] Nothing important in the trim. On a print piece, no word, fact or logo sits in the trim or the safe margin. A picture or a crop that runs off the edge on purpose is not a finding.
201
-
202
- ## Sources
203
-
204
- Ideas drawn from, in our own words: Gestalt principles of grouping; WCAG 2.2 (contrast 1.4.3 and 1.4.11, focus visible 2.4.7, target size 2.5.8, labels 3.3.2); Refactoring UI practice (Adam Wathan and Steve Schoger); Apple Human Interface Guidelines and Material Design basics (touch targets, navigation, states); and the tells registry of taste-skill by Leonxlnx (MIT).
@@ -1,46 +0,0 @@
1
- # The five-second check
2
-
3
- Read by `design-prototype`: the first screen and each key screen, before `DESIGN.md`. It runs once in the design work, here, so the same three strangers see every key screen. The design brief's takeaway says what someone should think and do in five seconds. This checks it on eyes that know nothing about the product. Every other check asks whether the screen follows the rules; this one asks whether it works.
4
-
5
- ## With fresh agents
6
-
7
- Three agents that have seen nothing: a new agent or a clean session each, on a small model where you can choose one, given only the capture (`capture.mjs … --clip 0,0,1440,900`, or the device size for an app; for a site most people open on their phone, the 390 capture too). Never the brief, the design brief, the product's name from anywhere but the screen, or this conversation. Each gets exactly:
8
-
9
- > You glance at this screen for five seconds. Answer in one short line each, from what you see, not what you guess:
10
- > 1. What is this?
11
- > 2. Who is it for?
12
- > 3. What would you do first?
13
- > 4. One word for how it feels.
14
-
15
- Several screens (the prototype's key screens): the same three agents see all of them, one at a time, each in its own order, and answer the four questions for each. Never three new agents per screen.
16
-
17
- No agent can be started clean (no subagents, no second session): say "five-second check: not run" and offer the people version. Never answer the questions yourself: you know too much.
18
-
19
- ## Compare, as facts
20
-
21
- One table: the takeaway's think and do, then each agent's answers, then a verdict per row.
22
-
23
- | | Takeaway | 1 | 2 | 3 | |
24
- |---|---|---|---|---|---|
25
- | What it is | a bakery, open now | … | … | … | 3 of 3 |
26
- | What to do | order for pickup | … | … | … | 1 of 3 |
27
- | Feel | warm, plain, exact (never: fussy) | … | … | … | 2 of 3 |
28
-
29
- - **Got it:** two or three of three say it in any words.
30
- - **Missed:** one or none. Say what they read instead ("two read it as a café menu, not an order page").
31
- - **Feel:** compared with the design brief's three words and its never word. A never word in an answer is said, always.
32
-
33
- ## Then
34
-
35
- A miss is a fact for them, not a redesign for you.
36
-
37
- - **What it is, or what to do,** on each key screen ("what to do" is that screen's own job: a basket, check out): fixed only with the touch-up's means, inside the identity and the direction. The headline says the takeaway outright, the primary action is present and findable, rank is put right. Shown before and after, run again once. A miss on the first screen that only a different composition would fix is said in one line, and the choice stays theirs: keep it, or go back to `design-direction`.
38
- - **The feel** is never fixed here. A never word in the answers is said with the screens; changing the look is `design-identity` or the direction again, on their word.
39
-
40
- ## People, offered once
41
-
42
- Agents read a screen like a careful stranger, not like the people the product is for. Offer once, with the result:
43
-
44
- > Want a real check? Show the screen for five seconds to two or three people who might use it, and ask the same four questions. Paste what they say.
45
-
46
- Their answers outrank the agents'. Record them the same way. A no stands.