@jonandev/longbeard 0.13.0 → 0.15.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.
- package/AGENTS.md +5 -5
- package/CHANGELOG.md +35 -0
- package/README.md +3 -4
- package/beard.json +6 -17
- package/bin/long-beard.js +2 -2
- package/package.json +1 -1
- package/skills/design/SKILL.md +7 -11
- package/skills/design-brief/SKILL.md +5 -35
- package/skills/design-check/SKILL.md +5 -7
- package/skills/design-check/references/design-rules.md +26 -4
- package/skills/design-check/scripts/rules.mjs +143 -9
- package/skills/design-content/SKILL.md +3 -8
- package/skills/design-direction/SKILL.md +58 -53
- package/skills/design-direction/references/design-floor.md +118 -0
- package/skills/design-direction/references/graphic.md +5 -6
- package/skills/design-direction/references/library.md +7 -7
- package/skills/design-direction/references/screen-template.html +7 -164
- package/skills/design-direction/references/screen.js +163 -0
- package/skills/design-direction/references/subject.md +3 -3
- package/skills/design-direction/references/variants.js +43 -0
- package/skills/design-direction/scripts/canvas.mjs +12 -9
- package/skills/design-direction/scripts/colours.mjs +247 -0
- package/skills/design-direction/scripts/moodboard.mjs +1 -1
- package/skills/design-direction/scripts/rules.mjs +747 -0
- package/skills/design-direction/scripts/sheet.mjs +3 -1
- package/skills/design-figma/SKILL.md +4 -6
- package/skills/design-identity/SKILL.md +12 -14
- package/skills/design-identity/references/design-floor.md +118 -0
- package/skills/design-identity/scripts/colours.mjs +35 -1
- package/skills/design-identity/scripts/sheet.mjs +3 -1
- package/skills/design-moodboard/SKILL.md +11 -11
- package/skills/design-moodboard/references/graphic.md +1 -1
- package/skills/design-moodboard/references/sources.md +1 -1
- package/skills/design-moodboard/scripts/group.mjs +1 -1
- package/skills/design-moodboard/scripts/moodboard.mjs +1 -1
- package/skills/design-prototype/SKILL.md +51 -49
- package/skills/design-prototype/references/design-floor.md +118 -0
- package/skills/design-prototype/references/design-md-template.md +4 -2
- package/skills/design-prototype/references/graphic.md +6 -5
- package/skills/design-prototype/references/variants.js +43 -0
- package/skills/design-prototype/scripts/links.mjs +5 -4
- package/skills/design-prototype/scripts/rules.mjs +143 -9
- package/skills/design-prototype/scripts/sheet.mjs +3 -1
- package/skills/design-wordmark/SKILL.md +9 -8
- package/skills/design-wordmark/scripts/sheet.mjs +3 -1
- package/skills/framework-skills/SKILL.md +3 -5
- package/skills/idea/SKILL.md +7 -9
- package/skills/design-direction/references/design-rules.md +0 -204
- package/skills/design-direction/references/full-build.md +0 -20
- package/skills/design-direction/references/grid.md +0 -97
- package/skills/design-direction/scripts/layout-diff.mjs +0 -118
- package/skills/design-families/SKILL.md +0 -139
- package/skills/design-families/scripts/contact-sheet.mjs +0 -259
- package/skills/design-families/scripts/families.mjs +0 -607
- package/skills/design-families/scripts/measure.mjs +0 -1728
- package/skills/design-families/scripts/moodboard.mjs +0 -609
- package/skills/design-families/scripts/tag.mjs +0 -289
- package/skills/design-prototype/references/design-rules.md +0 -204
- package/skills/design-prototype/references/five-second.md +0 -46
|
@@ -18,6 +18,15 @@
|
|
|
18
18
|
// 11 Copy no lorem ipsum, and no text that is only "Title", "Button", "User Name"...
|
|
19
19
|
// 5 Typography text cut by its container, including an ellipsis. Text cut on purpose
|
|
20
20
|
// carries data-crop on the element (or one above it) and is skipped
|
|
21
|
+
// 5 Typography text size: nothing under 12px; text a person acts on (links, buttons,
|
|
22
|
+
// labels, fields, navigation) at least 14px; body (running text of 60
|
|
23
|
+
// characters or more) at least 16px. Text marked data-board-size (on it or
|
|
24
|
+
// above it: the board shows it that small and the person kept it) is a
|
|
25
|
+
// warning with its measure, not a block
|
|
26
|
+
// Soft (reported, never blocking):
|
|
27
|
+
// 6 Colour proportion on the first screen, text and pictures left out: the ground
|
|
28
|
+
// (the largest colour) under 50%, or the accent over 20% (--accent "#hex"
|
|
29
|
+
// names it; else the most saturated colour). A board that does otherwise wins
|
|
21
30
|
// Not checked, on purpose: overlap, collision, alignment, empty space, section height. They are
|
|
22
31
|
// the look's own moves. Not checked either: contrast (screen-contrast.mjs), states, hierarchy.
|
|
23
32
|
//
|
|
@@ -37,7 +46,8 @@
|
|
|
37
46
|
// run. A check that could not run is "not checked", never passed. The first failure on a screen
|
|
38
47
|
// says what to do; the second says to report it as not checked and go on.
|
|
39
48
|
// --widths 1440,390, --screen name, --app, --cookie "a=b; c=d", --wait 300 (ms), --timeout 120000
|
|
40
|
-
// (ms for the whole run; every browser call also has its own 15 s limit), --rounds 2, --dir,
|
|
49
|
+
// (ms for the whole run; every browser call also has its own 15 s limit), --rounds 2, --dir,
|
|
50
|
+
// --accent "#hex" (the accent from DESIGN.md, for the proportion), --json
|
|
41
51
|
import { spawn } from "node:child_process";
|
|
42
52
|
import { createHash } from "node:crypto";
|
|
43
53
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -65,11 +75,12 @@ const reason = flag("reason");
|
|
|
65
75
|
const shipWords = flag("ship");
|
|
66
76
|
const app = has("app");
|
|
67
77
|
const json = has("json");
|
|
78
|
+
const accentArg = flag("accent");
|
|
68
79
|
const [url] = args;
|
|
69
|
-
const usage = 'usage: node rules.mjs "<file:// or http(s):// url>" [--screen name] [--widths 1440,390] [--app] [--cookie "a=b"] [--wait 300] [--timeout 120000] [--rounds 2] [--dir .longbeard/design] [--json]\n node rules.mjs --screen name --waive <id> --reason "why this finding is false"\n node rules.mjs --screen name --ship "the person\'s words"';
|
|
80
|
+
const usage = 'usage: node rules.mjs "<file:// or http(s):// url>" [--screen name] [--widths 1440,390] [--app] [--cookie "a=b"] [--wait 300] [--timeout 120000] [--rounds 2] [--dir .longbeard/design] [--accent "#hex"] [--json]\n node rules.mjs --screen name --waive <id> --reason "why this finding is false"\n node rules.mjs --screen name --ship "the person\'s words"';
|
|
70
81
|
const recording = Boolean(waiveId || shipWords);
|
|
71
82
|
const usageOk = recording ? Boolean(screenArg || url) && args.length <= 1 : url && args.length === 1 && /^(https?|file):/.test(url);
|
|
72
|
-
if (!usageOk || widths.some((w) => !(w >= 200 && w <= 3840)) || !(wait >= 0 && wait <= 10000) || !(totalMs >= 5000) || !(limit >= 1) || (waiveId && shipWords) || (reason && !waiveId)) {
|
|
83
|
+
if (!usageOk || widths.some((w) => !(w >= 200 && w <= 3840)) || !(wait >= 0 && wait <= 10000) || !(totalMs >= 5000) || !(limit >= 1) || (waiveId && shipWords) || (reason && !waiveId) || (accentArg && !/^#?[0-9a-f]{6}$/i.test(accentArg))) {
|
|
73
84
|
console.error(usage);
|
|
74
85
|
process.exit(2);
|
|
75
86
|
}
|
|
@@ -125,7 +136,7 @@ if (shipWords) {
|
|
|
125
136
|
console.error(`rules: ${screen} has not been checked yet. Run it once, so the open findings are on record.`);
|
|
126
137
|
process.exit(2);
|
|
127
138
|
}
|
|
128
|
-
record.closed = { words: shipWords.trim(), at: today(), open: record.found.filter((f) => !waivers.some((w) => w.screen === screen && w.id === f.id)) };
|
|
139
|
+
record.closed = { words: shipWords.trim(), at: today(), open: record.found.filter((f) => (f.level || "hard") === "hard" && !waivers.some((w) => w.screen === screen && w.id === f.id)) };
|
|
129
140
|
rounds[screen] = record;
|
|
130
141
|
writeJson(roundsFile, rounds);
|
|
131
142
|
console.log(`${screen} closed by the person: "${record.closed.words}". Open findings, to report as open:`);
|
|
@@ -430,9 +441,102 @@ function staticChecks(opt) {
|
|
|
430
441
|
}
|
|
431
442
|
});
|
|
432
443
|
|
|
444
|
+
// 5: text size. Nothing under 12px; what a person acts on 14px; body 16px.
|
|
445
|
+
run("5 size", () => {
|
|
446
|
+
const act = 'a, button, label, input, select, textarea, summary, legend, nav, [role=button], [role=link], [role=tab], [role=menuitem], [role=option]';
|
|
447
|
+
const done = new Set();
|
|
448
|
+
const size = (el) => parseFloat(getComputedStyle(el).fontSize);
|
|
449
|
+
const judge = (el, text) => {
|
|
450
|
+
if (done.has(el)) return;
|
|
451
|
+
done.add(el);
|
|
452
|
+
const px = size(el);
|
|
453
|
+
const acts = !!el.closest(act);
|
|
454
|
+
const block = el.closest("p, li, dd, blockquote");
|
|
455
|
+
const body = !acts && block && !el.closest("figcaption, small, footer, aside, sup, sub") && (block.innerText || "").trim().length >= 60;
|
|
456
|
+
const [floor, role] = acts ? [14, "text a person acts on"] : body ? [16, "body text"] : [12, "text"];
|
|
457
|
+
if (px >= floor - 0.05) return;
|
|
458
|
+
const board = !!el.closest("[data-board-size]");
|
|
459
|
+
found.push({ rule: "5 Typography", check: "size", level: board ? "warn" : "hard", path: path(el), desc: desc(el), detail: `${Math.round(px * 10) / 10}px ${role}, floor ${floor}px${board ? " (data-board-size: the board's size, kept)" : ""}` });
|
|
460
|
+
};
|
|
461
|
+
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
|
|
462
|
+
for (let n = walker.nextNode(); n; n = walker.nextNode()) {
|
|
463
|
+
const el = n.parentElement;
|
|
464
|
+
if (!el || !n.textContent.trim() || el instanceof SVGElement || /^(SCRIPT|STYLE|NOSCRIPT|TEMPLATE|OPTION)$/.test(el.tagName) || !visible(el)) continue;
|
|
465
|
+
const box = el.getBoundingClientRect();
|
|
466
|
+
if (box.width <= 2 || box.height <= 2) continue; // visually hidden text, read by screen readers
|
|
467
|
+
judge(el);
|
|
468
|
+
}
|
|
469
|
+
for (const el of document.body.querySelectorAll("input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea")) if (visible(el)) judge(el);
|
|
470
|
+
});
|
|
471
|
+
|
|
433
472
|
return { found, notChecked };
|
|
434
473
|
}
|
|
435
474
|
|
|
475
|
+
// Colour proportion of the first screen, from a shot with the text hidden. Pictures are left out.
|
|
476
|
+
// Returns { shares: [{ hex, share, chroma }], ground, accent } in shares of the pixels counted.
|
|
477
|
+
async function colourProportion(opt) {
|
|
478
|
+
const out = [];
|
|
479
|
+
for (const el of document.body.querySelectorAll("*")) {
|
|
480
|
+
const s = getComputedStyle(el);
|
|
481
|
+
if (el.matches("img, video, canvas, picture, iframe, svg image, object, embed") || /url\(/.test(s.backgroundImage)) {
|
|
482
|
+
const r = el.getBoundingClientRect();
|
|
483
|
+
if (r.width >= 1 && r.height >= 1) out.push(r);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const img = new Image();
|
|
487
|
+
img.src = `data:image/png;base64,${opt.png}`;
|
|
488
|
+
await img.decode();
|
|
489
|
+
const c = document.createElement("canvas");
|
|
490
|
+
c.width = img.naturalWidth;
|
|
491
|
+
c.height = img.naturalHeight;
|
|
492
|
+
const g = c.getContext("2d", { willReadFrequently: true });
|
|
493
|
+
g.drawImage(img, 0, 0);
|
|
494
|
+
const px = g.getImageData(0, 0, c.width, c.height).data;
|
|
495
|
+
const lin = (v) => ((v /= 255) <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4);
|
|
496
|
+
const lab = (r, gr, b) => {
|
|
497
|
+
const [R, G, B] = [lin(r), lin(gr), lin(b)];
|
|
498
|
+
const l = Math.cbrt(0.4122214708 * R + 0.5363325363 * G + 0.0514459929 * B), m = Math.cbrt(0.2119034982 * R + 0.6806995451 * G + 0.1073969566 * B), s2 = Math.cbrt(0.0883024619 * R + 0.2817188376 * G + 0.6299787005 * B);
|
|
499
|
+
return [0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s2, 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s2, 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s2];
|
|
500
|
+
};
|
|
501
|
+
const buckets = new Map();
|
|
502
|
+
let total = 0;
|
|
503
|
+
const step = 2;
|
|
504
|
+
for (let y = 0; y < c.height; y += step)
|
|
505
|
+
for (let x = 0; x < c.width; x += step) {
|
|
506
|
+
if (out.some((r) => x >= r.left && x < r.right && y >= r.top && y < r.bottom)) continue;
|
|
507
|
+
const i = (y * c.width + x) * 4;
|
|
508
|
+
const key = ((px[i] >> 3) << 10) | ((px[i + 1] >> 3) << 5) | (px[i + 2] >> 3);
|
|
509
|
+
const b = buckets.get(key) || { n: 0, r: px[i], g: px[i + 1], b: px[i + 2] };
|
|
510
|
+
b.n++;
|
|
511
|
+
buckets.set(key, b);
|
|
512
|
+
total++;
|
|
513
|
+
}
|
|
514
|
+
if (!total) return { shares: [], ground: null, accent: null };
|
|
515
|
+
// Near colours are one colour: a bucket joins the biggest cluster within a small distance.
|
|
516
|
+
const clusters = [];
|
|
517
|
+
for (const b of [...buckets.values()].sort((a, z) => z.n - a.n)) {
|
|
518
|
+
const L = lab(b.r, b.g, b.b);
|
|
519
|
+
const near = clusters.find((k) => Math.hypot(k.lab[0] - L[0], k.lab[1] - L[1], k.lab[2] - L[2]) < 0.06);
|
|
520
|
+
if (near) near.n += b.n;
|
|
521
|
+
else clusters.push({ n: b.n, lab: L, rgb: [b.r, b.g, b.b] });
|
|
522
|
+
}
|
|
523
|
+
const hex = (rgb) => `#${rgb.map((v) => v.toString(16).padStart(2, "0")).join("")}`;
|
|
524
|
+
const shares = clusters.sort((a, z) => z.n - a.n).map((k) => ({ hex: hex(k.rgb), share: k.n / total, chroma: Math.hypot(k.lab[1], k.lab[2]), lab: k.lab }));
|
|
525
|
+
const ground = shares[0];
|
|
526
|
+
let accent = null;
|
|
527
|
+
if (opt.accent) {
|
|
528
|
+
const h = opt.accent.replace("#", "");
|
|
529
|
+
const A = lab(parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16));
|
|
530
|
+
const near = shares.filter((k) => Math.hypot(k.lab[0] - A[0], k.lab[1] - A[1], k.lab[2] - A[2]) < 0.06);
|
|
531
|
+
accent = { hex: `#${h.toLowerCase()}`, share: near.reduce((a, k) => a + k.share, 0), named: true };
|
|
532
|
+
} else {
|
|
533
|
+
// Unnamed, the accent is the most saturated colour other than the ground.
|
|
534
|
+
const pick = shares.slice(1).filter((k) => k.chroma >= 0.1 && k.share >= 0.005).sort((a, z) => z.chroma - a.chroma)[0];
|
|
535
|
+
if (pick) accent = { hex: pick.hex, share: pick.share, named: false };
|
|
536
|
+
}
|
|
537
|
+
return { shares: shares.slice(0, 4).map(({ hex: h, share }) => ({ hex: h, share })), ground: { hex: ground.hex, share: ground.share }, accent };
|
|
538
|
+
}
|
|
539
|
+
|
|
436
540
|
// The focus check. Called once to take the baseline, then after each Tab.
|
|
437
541
|
function focusBaseline() {
|
|
438
542
|
const sig = (el) => {
|
|
@@ -494,10 +598,13 @@ const FIX = {
|
|
|
494
598
|
focus: "Give it a visible :focus-visible style with 3:1 contrast against what is around it (an outline or ring). Never outline: none alone.",
|
|
495
599
|
placeholder: "Write the real copy, in the product's voice.",
|
|
496
600
|
clipped: "Let the box grow or the text wrap, so no word is cut. If the cut is the look, mark that element data-crop.",
|
|
601
|
+
size: "Scale the step up, keeping the reference's proportions between sizes. If the board shows it this small and the person kept it, mark it data-board-size.",
|
|
602
|
+
proportion: "Let the ground dominate, the primary support and the accent stay small (about 60/30/10). If the board clearly does otherwise, keep it and say so in a note.",
|
|
497
603
|
};
|
|
498
604
|
const RULE_OF = { focus: "10 Accessibility" };
|
|
499
605
|
const found = new Map();
|
|
500
606
|
const notChecked = [];
|
|
607
|
+
const proportions = [];
|
|
501
608
|
const checkedAt = new Map();
|
|
502
609
|
const evaluate = async (expression, call) => {
|
|
503
610
|
const r = await call("Runtime.evaluate", { expression, returnByValue: true, awaitPromise: true });
|
|
@@ -521,7 +628,7 @@ try {
|
|
|
521
628
|
}
|
|
522
629
|
const record1 = (item, w, check) => {
|
|
523
630
|
const key = `${item.rule || RULE_OF[check] || ""}|${check}|${item.path}`;
|
|
524
|
-
if (!found.has(key)) found.set(key, { rule: item.rule || RULE_OF[check], check, path: item.path, desc: item.desc, detail: item.detail || "", widths: [] });
|
|
631
|
+
if (!found.has(key)) found.set(key, { rule: item.rule || RULE_OF[check], check, level: item.level || "hard", path: item.path, desc: item.desc, detail: item.detail || "", widths: [] });
|
|
525
632
|
const f = found.get(key);
|
|
526
633
|
if (!f.widths.includes(w)) f.widths.push(w);
|
|
527
634
|
};
|
|
@@ -554,6 +661,25 @@ try {
|
|
|
554
661
|
} catch (e) {
|
|
555
662
|
notChecked.push({ check: "10 focus", width: w, why: String(e.message).slice(0, 80) });
|
|
556
663
|
}
|
|
664
|
+
// Colour proportion, last: it hides the text. The first screen only, as a person meets it.
|
|
665
|
+
try {
|
|
666
|
+
await evaluate(`(() => {
|
|
667
|
+
window.scrollTo(0, 0);
|
|
668
|
+
if (document.activeElement) document.activeElement.blur();
|
|
669
|
+
const s = document.createElement("style");
|
|
670
|
+
s.textContent = "* { color: transparent !important; text-shadow: none !important; -webkit-text-fill-color: transparent !important; text-decoration-color: transparent !important; caret-color: transparent !important; outline: none !important; }";
|
|
671
|
+
document.head.appendChild(s);
|
|
672
|
+
return new Promise((done) => requestAnimationFrame(() => requestAnimationFrame(() => done(true))));
|
|
673
|
+
})()`, call);
|
|
674
|
+
const shot = await call("Page.captureScreenshot", { format: "png" });
|
|
675
|
+
const p = await evaluate(`(${colourProportion})(${JSON.stringify({ png: shot.result.data, accent: accentArg })})`, call);
|
|
676
|
+
proportions.push({ width: w, ...p });
|
|
677
|
+
const pct = (x) => `${Math.round(x * 100)}%`;
|
|
678
|
+
if (p.ground && p.ground.share < 0.5) record1({ rule: "6 Colour", level: "soft", path: "ground", desc: "first screen", detail: `the ground (${p.ground.hex}) covers ${pct(p.ground.share)}; it should dominate (about 60%)` }, w, "proportion");
|
|
679
|
+
if (p.accent && p.accent.share > 0.2) record1({ rule: "6 Colour", level: "soft", path: "accent", desc: "first screen", detail: `the accent (${p.accent.hex}${p.accent.named ? "" : ", read as the most saturated colour"}) covers ${pct(p.accent.share)}; it should stay small (about 10%)` }, w, "proportion");
|
|
680
|
+
} catch (e) {
|
|
681
|
+
notChecked.push({ check: "6 proportion", width: w, why: String(e.message).slice(0, 80) });
|
|
682
|
+
}
|
|
557
683
|
checkedAt.set(w, true);
|
|
558
684
|
}
|
|
559
685
|
ws.close();
|
|
@@ -567,7 +693,9 @@ finished = true;
|
|
|
567
693
|
const id = (f) => createHash("sha1").update(`${f.rule}|${f.check}|${f.path}`).digest("hex").slice(0, 6);
|
|
568
694
|
const rows = [...found.values()].map((f) => ({ ...f, id: id(f), where: `${f.desc}: ${f.detail} (at ${f.widths.sort((a, b) => b - a).join(", ")})` }));
|
|
569
695
|
const waived = rows.filter((f) => waivers.some((w) => w.screen === screen && w.id === f.id));
|
|
570
|
-
|
|
696
|
+
// Hard findings block. Warnings (the board's own small text) and soft ones are reported only.
|
|
697
|
+
const open = rows.filter((f) => !waived.includes(f) && f.level === "hard");
|
|
698
|
+
const reported = rows.filter((f) => !waived.includes(f) && f.level !== "hard");
|
|
571
699
|
|
|
572
700
|
// A run on a changed page is a round; the same page again is the same round. Each url of a screen
|
|
573
701
|
// (a state: ?menu=open) keeps its own fingerprint, so the first look at another state is part of
|
|
@@ -580,15 +708,15 @@ const changed = seen && fps[key] !== fingerprint;
|
|
|
580
708
|
const round = !used ? 1 : changed && used < limit ? used + 1 : used;
|
|
581
709
|
const beyond = changed && used >= limit;
|
|
582
710
|
const closed = changed ? null : record.closed || null;
|
|
583
|
-
rounds[screen] = { round, fps: { ...fps, [key]: fingerprint }, at: today(), failed: 0, found: rows.map((f) => ({ id: f.id, rule: f.rule, where: f.where })), ...(closed ? { closed } : {}) };
|
|
711
|
+
rounds[screen] = { round, fps: { ...fps, [key]: fingerprint }, at: today(), failed: 0, found: rows.map((f) => ({ id: f.id, rule: f.rule, level: f.level, where: f.where })), ...(closed ? { closed } : {}) };
|
|
584
712
|
writeJson(roundsFile, rounds);
|
|
585
713
|
|
|
586
714
|
const widthNote = widths.join(" and ");
|
|
587
|
-
const checks = [["13 sideways", "13 sideways scroll (phone width)"], ["10 targets", `10 targets (${app ? "44 on phone, 24 otherwise" : "24"})`], ["10 labels", "10 visible labels"], ["10 focus", "10 focus shown (not its contrast)"], ["11 copy", "11 placeholder copy"], ["5 clipped", "5 clipped text (data-crop skipped)"]];
|
|
715
|
+
const checks = [["13 sideways", "13 sideways scroll (phone width)"], ["10 targets", `10 targets (${app ? "44 on phone, 24 otherwise" : "24"})`], ["10 labels", "10 visible labels"], ["10 focus", "10 focus shown (not its contrast)"], ["11 copy", "11 placeholder copy"], ["5 clipped", "5 clipped text (data-crop skipped)"], ["5 size", "5 text size (12 / 14 / 16)"], ["6 proportion", "6 colour proportion (soft)"]];
|
|
588
716
|
if (!widths.some((w) => w <= 480)) notChecked.push({ check: "13 sideways", width: widths.join(","), why: "no phone width (480 or less) in --widths" });
|
|
589
717
|
const done = checks.filter(([key]) => !notChecked.some((n) => n.check === key)).map(([, label]) => label);
|
|
590
718
|
if (json) {
|
|
591
|
-
console.log(JSON.stringify({ screen, round, limit, roundsUsedUp: round >= limit && open.length > 0, closed, open, waived, notChecked, checked: done }, null, 1));
|
|
719
|
+
console.log(JSON.stringify({ screen, round, limit, roundsUsedUp: round >= limit && open.length > 0, closed, open, reported, waived, proportions, notChecked, checked: done }, null, 1));
|
|
592
720
|
} else {
|
|
593
721
|
console.log(`rules: ${screen} at ${widthNote}, round ${round} of ${limit}${beyond ? " (this page changed after the last round: not counted)" : changed || !used ? "" : seen ? " (the page has not changed since the last run)" : " (another state of this screen: same round)"}`);
|
|
594
722
|
if (closed) console.log(`closed by the person on ${closed.at}: "${closed.words}". Do not fix more. Report what is open.`);
|
|
@@ -602,6 +730,12 @@ if (json) {
|
|
|
602
730
|
}
|
|
603
731
|
for (const [check, n] of Object.entries(shown)) if (n > 10) console.log(`(${n - 10} more ${check} findings with the same fix, not listed: fix these, run again, or use --json for all)`);
|
|
604
732
|
} else console.log(`passes: ${done.join("; ")}`);
|
|
733
|
+
if (reported.length) {
|
|
734
|
+
console.log("reported, not blocking:\n| Rule | Hard/soft | Where | Fix |\n|---|---|---|---|");
|
|
735
|
+
for (const f of reported.slice(0, 20)) console.log(`| ${f.rule} | ${f.level} | ${f.where.replace(/\|/g, "/")} [${f.id}] | ${FIX[f.check]} |`);
|
|
736
|
+
if (reported.length > 20) console.log(`(${reported.length - 20} more, not listed: --json has all)`);
|
|
737
|
+
}
|
|
738
|
+
for (const p of proportions) if (p.ground) console.log(`colour proportion at ${p.width}: ground ${p.ground.hex} ${Math.round(p.ground.share * 100)}%${p.shares.slice(1).map((k) => `, ${k.hex} ${Math.round(k.share * 100)}%`).join("")}${p.accent ? `; accent ${p.accent.hex} ${Math.round(p.accent.share * 100)}%` : ""}`);
|
|
605
739
|
if (waived.length) {
|
|
606
740
|
console.log(`waived (${waived.length}), listed so the person sees them:`);
|
|
607
741
|
for (const f of waived) console.log(`- ${f.rule}: ${f.where} [${f.id}]: ${waivers.find((w) => w.screen === screen && w.id === f.id).reason}`);
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-content
|
|
3
3
|
description: >
|
|
4
|
-
Optional
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
product's own subject where they have none. (The first three or four
|
|
8
|
-
pictures are found by design-direction.) Never asks them to write final copy.
|
|
9
|
-
Writes docs/design/design-content.md. Runs after the design brief, when
|
|
10
|
-
they ask about copy or imagery, or when design offers it because they have
|
|
11
|
-
no pictures.
|
|
4
|
+
Optional. What each key screen says and shows: sections, real copy in the
|
|
5
|
+
voice, and the pictures it needs, with licensed stand-ins. Writes
|
|
6
|
+
docs/design/design-content.md. Runs when they ask about copy or pictures.
|
|
12
7
|
---
|
|
13
8
|
|
|
14
9
|
# Design content
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-direction
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Nothing on a screen that is not on their board. They pick on a rendered
|
|
8
|
-
canvas, ask for more of one or a mix; the one they settle on is built in
|
|
9
|
-
full, then a light touch-up fixes contrast, anything missing and anything
|
|
10
|
-
plainly broken, never the composition. Writes
|
|
11
|
-
docs/design/design-direction.md. Runs after design-brief and
|
|
12
|
-
design-moodboard; design-identity then refines its type and colour.
|
|
4
|
+
Eight first screens, each one liked reference's concept redrawn for this
|
|
5
|
+
product, nothing off their board; they pick. Writes docs/design/design-
|
|
6
|
+
direction.md. Runs after design-brief and design-moodboard.
|
|
13
7
|
---
|
|
14
8
|
|
|
15
9
|
# Design direction
|
|
16
10
|
|
|
17
11
|
**Needs:** `docs/design/design-brief.md`, `docs/design/design-moodboard.md`
|
|
18
|
-
**Uses if there:** `docs/design/design-
|
|
12
|
+
**Uses if there:** `docs/design/design-content.md`
|
|
19
13
|
**Writes:** `docs/design/design-direction.md`
|
|
20
14
|
|
|
21
|
-
**
|
|
15
|
+
**They are the designer; you do the craft.** Everything on a screen comes from their board. Understand what they like in each reference and why, and carry that concept onto this product. Make the craft decisions it leaves open, and add no taste of your own.
|
|
16
|
+
|
|
17
|
+
**Style is theirs; structure can be yours.** Faces, colours, finishes, devices and how pictures are treated come only from their board. How this product's content is arranged (composition, hierarchy, pacing) may be your design, as long as it carries a concept they liked: what you know about design serves their taste, never replaces it.
|
|
22
18
|
|
|
23
19
|
Writes `docs/design/design-direction.md` (committed) and works in `.longbeard/design/direction/` (gitignored): `library.json`, `screens/<n>.html`, `screens.json`, `prototype/first.html`, captures and the canvas.
|
|
24
20
|
|
|
@@ -31,22 +27,20 @@ Writes `docs/design/design-direction.md` (committed) and works in `.longbeard/de
|
|
|
31
27
|
|
|
32
28
|
A graphic (the brief's surface): read [graphic.md](references/graphic.md) first.
|
|
33
29
|
|
|
34
|
-
**At `pace: quick`:** one round of eight; more only when they ask.
|
|
35
|
-
|
|
36
30
|
## 0. Pictures of the subject
|
|
37
31
|
|
|
38
32
|
Three or four pictures of what the product is about, not other designs: theirs, or a few licensed stand-ins from `pictures.mjs`, one query per picture. Every screen uses them, and their colours are one more palette. How: [subject.md](references/subject.md). Show them on a contact sheet with step 1's message; do not stop to ask.
|
|
39
33
|
|
|
40
34
|
## 1. The content and the references, in one message
|
|
41
35
|
|
|
42
|
-
**What a screen carries.**
|
|
36
|
+
**What a screen carries.** Only as much text as its base carries (its reading's `slots`), filled in this order until they run out: the headline (the takeaway), the primary action, the status (open now, in stock), the thing the product shows. What does not fit waits for `design-prototype`, never squeezed in as one more line.
|
|
43
37
|
|
|
44
38
|
**Headlines and the ownable.** Three or four headlines that say the takeaway outright, in the voice, and the ownable: one thing only this product would show (a stamp, a live count, a mark).
|
|
45
39
|
|
|
46
|
-
**Their board, every reference on it.** Copy the moodboard's `board.md` to `.longbeard/design/direction/board.md`, every card, plus the subject as a card (its contact sheet as the shot, `part: subject`, `screen: no`).
|
|
40
|
+
**Their board, every reference on it.** Copy the moodboard's `board.md` to `.longbeard/design/direction/board.md`, every card, plus the subject as a card (its contact sheet as the shot, `part: subject`, `screen: no`). Cards with a `topic:` line show under their group: a heading, never a filter.
|
|
47
41
|
|
|
48
42
|
```
|
|
49
|
-
node <skill>/scripts/moodboard.mjs .longbeard/design/direction/board.md --one-lead
|
|
43
|
+
node <skill>/scripts/moodboard.mjs .longbeard/design/direction/board.md --one-lead --out .longbeard/design/direction/board.html
|
|
50
44
|
```
|
|
51
45
|
|
|
52
46
|
It says how many cards it left out for a missing shot: capture those again first. **Likes are asked once:** a card with a `like:` line starts liked, with their words.
|
|
@@ -55,60 +49,75 @@ It says how many cards it left out for a missing shot: capture those again first
|
|
|
55
49
|
> Then open the board (your likes are marked): **Lead** the one whose composition sets the tone, Like any more, and for each new like say what you like and why ("the orange dot: the only contrast on a quiet page"). Anything you don't want from a reference goes in its **Leave out** box. Paste the copy-out.
|
|
56
50
|
|
|
57
51
|
- **What they like** is what is borrowed; **why** is where it may go. A like without a why: ask once.
|
|
58
|
-
- **What they leave out is never on a screen:** dropped, or its role filled from another of their references
|
|
59
|
-
-
|
|
60
|
-
- **A like the design brief rules out
|
|
52
|
+
- **What they leave out is never on a screen:** dropped, or its role filled from another of their references.
|
|
53
|
+
- With fewer than 6 references, say once that the eight will look alike.
|
|
54
|
+
- **A like the design brief rules out:** the brief wins, and the like is carried by its role. Say it once before building; a change goes under **Changes** in the design brief.
|
|
61
55
|
|
|
62
56
|
## 2. Read the references
|
|
63
57
|
|
|
64
|
-
|
|
58
|
+
Read the lead and every like closely: its grid, the share of the screen each block takes, type sizes against the width, spacing, colours, faces (the closest Google Font), and what they like in it and why. A live page is measured (`measure.mjs <link>`): its numbers are the page's own. A picture is read by eye at full size; `measure.mjs <picture> --lines` only for a number you cannot read, and the face through `fonts.mjs --shape`. Write it to `library.json`, with the subject and its palette from `subject-colours.mjs`: [library.md](references/library.md).
|
|
59
|
+
|
|
60
|
+
**Never invent a key part.** Once the readings show what each reference has: if none shows a hero or a header and menu, or their picks leave one unclear, ask once, in one message: the cards that show it, to pick from, or a search for that one part (`design-moodboard`'s one piece). **Never block on it:** build on with that part from the closest system on the board, marked `data-standin`, and put their answer in when it comes, in the next round or the prototype.
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
**The accent** ([rule 6](references/design-floor.md#6-colour)): unless the board clearly shows one or they named it, add the options as swatches to that message, or send them alone, never waiting: `colours.mjs --harmony --primary <#> --ground <#> --family "<board's colours>" --level <AA|AAA>`, plus the subject's accent. Never pick or rank.
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
## 3. Eight first screens
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
Read [Before you build](references/design-floor.md#before-you-build) first, and apply it to each screen while you draw it. Build them yourself, one after another, each `screens/<n>.html` from [screen-template.html](references/screen-template.html) at 1440 by 900 (an app, or `first seen on: phone`: 390 by 844). Copy [screen.js](references/screen.js) to `screens/` once: every screen loads it, and none repeats it.
|
|
71
67
|
|
|
72
|
-
**
|
|
68
|
+
- **Every screen does the job of this product's first view** (a site's opening screen, an app's first screen, the piece itself for a graphic): what this is, for whom, the one action. Any liked reference can lead one, whatever it was made as: a reference made for another role (a section from mid-page, an inner page, a poster for a site) keeps its idea and its system, redrawn for this role; what only works in its own role is left out.
|
|
69
|
+
- **Every screen is a concept: one liked reference, developed as a designer would, never copied.** First write its `concept` in the reading as a designer would defend it: what it is, and why it works (the tension, the hierarchy, what does the work). Keep that essence and its scene, redrawn for this screen's role (above). Then redraw the arrangement for this product's content so the idea still does the work, with that reference's devices, type, colour and picture treatment, and adapt the specifics to this client: their content and pictures, only the text its `slots` allow, and where the brief or the subject asks, a colour or face of the same character (another vibrant for a vibrant, a near cousin of the face from `fonts.mjs`). Sizes are scaled to this screen, at [rule 5](references/design-floor.md#5-typography)'s size floor. Two questions for every screen: would a designer call it the same concept (it must be yes), and would they call it a copy (it must be no)? Either answer wrong: redraw. A screen with no concept behind it is generic, and goes.
|
|
70
|
+
- **At most two moves** borrowed from their other liked references, only where they help the idea, never a collage. A move is what they said they like, placed where their why says it belongs, and it changes only what it names. A why that would not be true on this screen sends the move to another. The lead's devices are moves like any other's: on its own screens and at most two others, so the eight stay eight different screens.
|
|
71
|
+
- **Spread: eight concepts.** The lead develops two, each a different take on its idea; six develop one liked reference each, a different one for every screen. With fewer than six likes, the lead and then the likes take a second. Accent options still unanswered: about two screens each. Only the lead and their likes are used, never a card they did not pick. No main picture on more than two screens.
|
|
72
|
+
- **What they like is taken whole.** A liked reference's scene, and any device borrowed from it, keeps the form, the job and the space around it that it has there: never taken apart, restyled or given another job. A move changes where things sit, never what they are.
|
|
73
|
+
- **Nothing off their board's character:** no face, colour, gradient, shadow, radius, button style or effect their references do not show in kind. An adapted colour or face keeps the role and energy of the one it replaces and comes from the board, the subject or the accent options. `PROVENANCE` names the reference for each, and what was adapted; before the checks, go through the screen's CSS, and anything it cannot name goes.
|
|
74
|
+
- **Where the board shows nothing for a part** (a field, a price, a badge), take it from the base's own system; if the base has none, from another of their references. The name is set in the base's type; a mark is `design-wordmark`'s.
|
|
75
|
+
- **Marked, not hidden:** anything the product does not really have yet carries `data-standin="picture"` or `"fact"`, with `data-standin-note`.
|
|
76
|
+
|
|
77
|
+
Record each in `.longbeard/design/direction/screens.json`:
|
|
73
78
|
|
|
74
79
|
```
|
|
75
|
-
|
|
80
|
+
[{ "n": 1, "kind": "concept", "base": "<card name>", "idea": "<the concept it keeps, in one line>", "moves": [{ "what": "<the move>", "from": "<card name>", "like": "<their words, or null>" }], "accent": "<#hex from the options, or null>", "state": "built" }]
|
|
76
81
|
```
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
`base` is the reference it develops; `moves` may be empty.
|
|
79
84
|
|
|
80
|
-
|
|
85
|
+
`state` is `built`, or `failed` with `"failure": "<why>"`. Optional: `round` (1 when left out), `fault` (one line), `shot`.
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
**Check each screen by script:**
|
|
83
88
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
89
|
+
```
|
|
90
|
+
node <skill>/scripts/capture.mjs "file://$PWD/.longbeard/design/direction/screens/1.html" --out .longbeard/design/direction/grid/1.png --clip 0,0,1440,900
|
|
91
|
+
node <skill>/scripts/screen-contrast.mjs "file://$PWD/.longbeard/design/direction/screens/1.html" --wait-title ready
|
|
92
|
+
node <skill>/scripts/rules.mjs "file://$PWD/.longbeard/design/direction/screens/1.html" --screen direction-1 --widths 1440
|
|
93
|
+
```
|
|
87
94
|
|
|
88
|
-
|
|
95
|
+
Act here on `rules.mjs`'s clipped text, text size and placeholder copy; targets, focus and labels are the prototype's. Fix clipped text by setting it smaller within its role or cutting words. Look at each capture yourself, beside the pictures of what it is made from (its base, each move's reference): as a designer would, check that every borrowed scene and device still reads as it does there, whole, with its job and its spacing. Fix what broke before you show it.
|
|
89
96
|
|
|
90
|
-
**
|
|
97
|
+
**The floor, inside the concept** ([how they split](references/design-floor.md#how-to-use-this)). Text a person acts on must pass contrast and size, fixed with the screen's own colours or another crop, never by moving it off the picture. Display type over a picture, overlaps, crops and wide empty space are the look when a reference does them: never tidied away. A liked colour or size stays, its measure in `fault`. A finding left is theirs to decide: `fault` says it as a choice (what it costs, and what would fix it: keep, or change?), and that line goes in your message with the canvas.
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
- **The hardest screen.** One more screen in the favourite's look: the brief's key screen that is hardest for it (the densest list, a form, a table), its layout from the base's `also` shot of that kind if it has one, else from a reference that shows that kind, built in full, in `screens.json` as `"of": <n>, "test": true`. It tests the look; it is not designed here. Show it beside the favourite on the canvas, and if the look breaks on it, say where in one line: they keep it, go back to another pick, or mix. A graphic skips it.
|
|
99
|
+
**Show the canvas:**
|
|
94
100
|
|
|
95
|
-
|
|
101
|
+
```
|
|
102
|
+
node <skill>/scripts/canvas.mjs .longbeard/design/direction/screens.json --board .longbeard/design/direction/board.md --shots .longbeard/design/direction/grid --out .longbeard/design/direction/canvas.html
|
|
103
|
+
```
|
|
96
104
|
|
|
97
|
-
|
|
105
|
+
It shows every screen in a strip and, for the one they open, what it is made from: its base and each move, with the reference and their words. Give its path, and one line per screen only for a fault or for what sits against the brief (its never, its words, its personality, or could be mistaken for what it must stand apart from). Then one recommendation, as a studio would give it: the screen that best does what the design brief asks, and why, naming the line it serves (the takeaway, the never, what it must stand apart from). Never a preference of your own: the brief's case, theirs to overrule.
|
|
98
106
|
|
|
99
|
-
|
|
107
|
+
> Which is closest? Or "more", "more of 3", "3 with 6's accent".
|
|
100
108
|
|
|
101
|
-
|
|
102
|
-
- **Contrast where text sits** (`screen-contrast.mjs`; at AAA `--min 7 --large 4.5`), never by moving text off the picture.
|
|
103
|
-
- **Something missing:** a slot's item or the primary action, inside its zone.
|
|
104
|
-
- **Something plainly off:** a clipped word, unreadable text, a dead control, a line twice.
|
|
105
|
-
- **Rank, only when inverted:** bring the smaller text down.
|
|
109
|
+
## 4. More, mix, choose
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
- **More of 3:** three more on 3's base with other moves, in round 2.
|
|
112
|
+
- **A mix** ("4 with 7's colours"): one screen.
|
|
113
|
+
- **More:** a fresh round of eight, new pairings. After two rounds with nothing taken, ask once what is missing (`design-moodboard`).
|
|
114
|
+
- **A part,** only when they ask ("other menus for 3"): three or four versions of that part on the real screen, everything else kept, each from a reference that shows that part. They live on the page, flipped with [variants.js](references/variants.js) (how, in its header); record each in `screens.json` as `"of": <n>, "part": "<name>"`.
|
|
115
|
+
|
|
116
|
+
Every version stays theirs. A pick that breaks a why they gave: ask once whether the why still holds; never block it.
|
|
108
117
|
|
|
109
|
-
|
|
118
|
+
On their yes, read it back in one line, with three to five **principles**: what this design does on every screen, drawn from their whys and the chosen screen, in their words where they gave some ("one loud thing per screen", "pictures always run to the edge", "type does the decorating"). Each is specific enough that a page could break it. A correction rewrites a principle. Then read its base's motion unless the brief's is none ([library.md](references/library.md)), copy it and `screen.js` to `prototype/` (as `first.html`), and set `"chosen": n` in `screens.json`. When the brief's `decides` names someone else, they confirm it first.
|
|
110
119
|
|
|
111
|
-
|
|
120
|
+
**In context, before the identity.** A studio shows a chosen concept where it will live before it is signed off. Build two more pages from the chosen screen: its phone view (390 wide), and the brief's key screen that is hardest for this look (the densest list, a form), in the chosen screen's frame and principles, each page opening with its own job. Check them like the eight, and show them beside the chosen screen with the direction. If the look breaks on real content, say where in one line: going back to another pick is still cheap. The prototype starts from these pages.
|
|
112
121
|
|
|
113
122
|
## Write `docs/design/design-direction.md`
|
|
114
123
|
|
|
@@ -131,6 +140,9 @@ Record it in `first.html` itself (`LOOK` and CSS), never a query string. The fiv
|
|
|
131
140
|
- motion: <what moves, trigger, ms, easing, within the brief's pick; or "none">
|
|
132
141
|
- finish: <a pasteable recipe; or "none">
|
|
133
142
|
|
|
143
|
+
## Principles
|
|
144
|
+
- <three to five, as confirmed: what every screen of this design does>
|
|
145
|
+
|
|
134
146
|
## Hierarchy
|
|
135
147
|
1. <first read> 2. <second> 3. <the rest>. Primary action: <what, where>.
|
|
136
148
|
|
|
@@ -149,11 +161,4 @@ No reference names, links or paths. Then the direction in up to five lines:
|
|
|
149
161
|
|
|
150
162
|
## Do not
|
|
151
163
|
|
|
152
|
-
- Rank the screens, or say which you prefer.
|
|
153
|
-
- Add anything their board does not have, or anything they wrote to leave out.
|
|
154
|
-
- Hide a reference because of its family.
|
|
155
|
-
- Fit more content than the base carries, or polish beyond its references.
|
|
156
|
-
- Build in full anything but their favourite and its hardest screen, or show the canvas before every screen has a state.
|
|
157
|
-
- Open a part they did not ask to open.
|
|
158
|
-
- In the touch-up: move a zone, change the layout, add a section, or tidy what the references do on purpose.
|
|
159
164
|
- Take a reference's content, pictures or words.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Design floor
|
|
2
|
+
|
|
3
|
+
Generated from `rules/design-rules.md` by `npm run share`: its opening sections and every hard check. The soft checks and the tells are `design-check`'s.
|
|
4
|
+
|
|
5
|
+
How a screen is checked. `design-check` reads all of it on every frame and build. The skills that build read only the floor (`design-floor.md`: these opening sections and every hard check), so a better model's craft is never held to a textbook while drawing.
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
## Before you build
|
|
10
|
+
|
|
11
|
+
A studio applies these while drawing each screen, not as a check after. Each is the numbered rule's, said there.
|
|
12
|
+
|
|
13
|
+
- One most prominent element and one primary action (rule 1).
|
|
14
|
+
- Contrast where the text sits, over pictures too (rules 6 and 12).
|
|
15
|
+
- One picture leads; pictures that share the screen never compete (rule 12).
|
|
16
|
+
- Text size at its floor (rule 5).
|
|
17
|
+
- One grouping device per group (rule 2).
|
|
18
|
+
- Every screen follows the direction's principles (before the pick, their whys), and reads as the same product as the first.
|
|
19
|
+
|
|
20
|
+
## How to use this
|
|
21
|
+
|
|
22
|
+
- 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.
|
|
23
|
+
- Go in order: **Idea** first, then every **hard** check, then **soft**.
|
|
24
|
+
- **Hard** is the floor: structure, contrast, text size, targets, focus and states. A hard failure blocks the screen. `DESIGN.md` cannot waive it, except for what the person liked or asked for (below).
|
|
25
|
+
- **When the floor meets a liked concept:**
|
|
26
|
+
- Text a person acts on (body, labels, prices, fields, navigation, buttons): the floor wins. The fix comes from inside the concept: its own ink, another crop, a device the board already has. Never by moving the text off the concept or dropping the concept.
|
|
27
|
+
- Display and composition (giant type over a picture, overlaps, crops): the concept wins, and the fault is written down.
|
|
28
|
+
- A colour or a small size the person liked or asked for: kept, reported as a warning with its measure, not a block. Marked `WARN liked, kept` in `DESIGN.md`; on a page, small text is marked `data-board-size`.
|
|
29
|
+
- **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.
|
|
30
|
+
- A finding is four things: the rule (number and check), hard or soft, where on the screen, and the fix.
|
|
31
|
+
- 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.
|
|
32
|
+
|
|
33
|
+
## 1. Hierarchy
|
|
34
|
+
|
|
35
|
+
**Principle:** the eye lands first on what matters most, then moves in the order the task needs.
|
|
36
|
+
- [hard] Exactly one element is the most prominent on the screen. Squint or blur the shot: one thing still stands out.
|
|
37
|
+
- [hard] The primary action is easier to find than any secondary action. If two actions look equally important, only one of them should be.
|
|
38
|
+
|
|
39
|
+
## 2. Grouping
|
|
40
|
+
|
|
41
|
+
**Principle:** things that belong together look together, and things that do not are kept apart.
|
|
42
|
+
- [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.
|
|
43
|
+
|
|
44
|
+
## 3. Alignment and grid
|
|
45
|
+
|
|
46
|
+
**Principle:** every element sits on a line shared with something else.
|
|
47
|
+
- [hard] Left edges of text blocks in one column line up. No block is nudged a few pixels off its neighbours.
|
|
48
|
+
|
|
49
|
+
## 5. Typography
|
|
50
|
+
|
|
51
|
+
**Principle:** a few sizes, far apart, set for reading.
|
|
52
|
+
- [hard] At the screen's real size, nothing is under 12px, text a person acts on (links, buttons, labels, fields, prices, navigation) is at least 14px, and body is 16px at every width. Where a reference sets smaller, keep its proportions and scale the step up.
|
|
53
|
+
- [hard] No text is clipped, overlapped, or cut mid-word by its container, in any language the product ships.
|
|
54
|
+
|
|
55
|
+
## 6. Colour
|
|
56
|
+
|
|
57
|
+
**Principle:** colour carries meaning, and the meaning stays the same everywhere.
|
|
58
|
+
- [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.
|
|
59
|
+
- [hard] Colour is never the only signal. An error, a selected item or a required field also changes shape, weight, an icon or text.
|
|
60
|
+
- [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.
|
|
61
|
+
|
|
62
|
+
## 7. Consistency
|
|
63
|
+
|
|
64
|
+
**Principle:** the same thing looks and behaves the same everywhere.
|
|
65
|
+
- [hard] One action has one look. Two primary buttons on different screens are the same component, same size and same label case.
|
|
66
|
+
|
|
67
|
+
## 8. States
|
|
68
|
+
|
|
69
|
+
**Principle:** every screen is shown in every state a person will meet.
|
|
70
|
+
- [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.
|
|
71
|
+
- [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.
|
|
72
|
+
- [hard] Interactive components show hover (pointer surfaces), focus, pressed, disabled, and selected where they apply. Each state is visibly different from default.
|
|
73
|
+
|
|
74
|
+
## 9. Affordance and feedback
|
|
75
|
+
|
|
76
|
+
**Principle:** what can be acted on looks like it, and every action visibly answers.
|
|
77
|
+
- [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).
|
|
78
|
+
- [hard] Nothing that looks interactive is not. A card that looks clickable is clickable, or loses the look.
|
|
79
|
+
|
|
80
|
+
## 10. Accessibility
|
|
81
|
+
|
|
82
|
+
**Principle:** the screen works for people who see, move and read differently.
|
|
83
|
+
- [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.
|
|
84
|
+
- [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.
|
|
85
|
+
- [hard] Every input has a visible label. A placeholder alone is not a label.
|
|
86
|
+
- [hard] Text is real text, not text in an image, except in logos.
|
|
87
|
+
|
|
88
|
+
## 11. Copy
|
|
89
|
+
|
|
90
|
+
**Principle:** words do the job of the screen in the product's own voice, made from facts it has.
|
|
91
|
+
- [hard] No placeholder copy: no lorem ipsum, no "Title", no "Button", no "User Name".
|
|
92
|
+
|
|
93
|
+
## 12. Imagery
|
|
94
|
+
|
|
95
|
+
**Principle:** pictures show the real thing, or there are none.
|
|
96
|
+
- [hard] Text over an image meets the contrast floor in rule 6 across the whole text area, not only on the darkest part.
|
|
97
|
+
|
|
98
|
+
## 13. Responsive
|
|
99
|
+
|
|
100
|
+
**Principle:** each size is designed, not squeezed.
|
|
101
|
+
- [hard] At mobile width (360–390px) nothing scrolls sideways, nothing is clipped, and nothing overlaps.
|
|
102
|
+
- [hard] The primary action is reachable at every size without hunting: visible, or one obvious step away.
|
|
103
|
+
|
|
104
|
+
## Sites
|
|
105
|
+
|
|
106
|
+
- [hard] The first screen at mobile and desktop says what this is and who it is for, without scrolling.
|
|
107
|
+
|
|
108
|
+
## Apps
|
|
109
|
+
|
|
110
|
+
- [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.
|
|
111
|
+
- [hard] The person always knows where they are: the current place in navigation is marked, and the screen title matches the nav item.
|
|
112
|
+
|
|
113
|
+
## Graphics
|
|
114
|
+
|
|
115
|
+
- **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.
|
|
116
|
+
- **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.
|
|
117
|
+
- [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.
|
|
118
|
+
- [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.
|