@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
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Lay screenshots out as one numbered sheet, so a round of first screens can
|
|
3
3
|
// be seen and picked from together. It writes an HTML page; capture.mjs turns
|
|
4
|
-
// that into the picture to show.
|
|
4
|
+
// that into the picture to show. The page is marked as a sheet, so links.mjs never
|
|
5
|
+
// counts it as a page of the prototype. No dependencies.
|
|
5
6
|
//
|
|
6
7
|
// node sheet.mjs .longbeard/design/direction/grid/sheet.html .longbeard/design/direction/grid/1.png .longbeard/design/direction/grid/2.png …
|
|
7
8
|
// node sheet.mjs .longbeard/design/direction/grid/vary.html --cols 5 .longbeard/design/direction/grid/v*.png
|
|
@@ -49,6 +50,7 @@ writeFileSync(
|
|
|
49
50
|
out,
|
|
50
51
|
`<!doctype html>
|
|
51
52
|
<meta charset="utf-8">
|
|
53
|
+
<meta name="generator" content="longbeard sheet">
|
|
52
54
|
<title>Sheet</title>
|
|
53
55
|
<style>
|
|
54
56
|
body { margin: 0; padding: 24px; background: #6f6f6f; font: 600 22px/1 system-ui, sans-serif; }
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-figma
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
marked Ready on approval. Runs when DESIGN.md exists and its screens have no
|
|
8
|
-
Ready frames, or for a feature's screens. Figma is required for UI projects.
|
|
4
|
+
Builds the approved design in Figma: tokens, the identity board,
|
|
5
|
+
components and every key screen and state, marked Ready on approval. Runs
|
|
6
|
+
when DESIGN.md exists without Ready frames, or for a feature's screens.
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
# Design Figma
|
|
@@ -61,7 +59,7 @@ If a Figma decision changes a rule (a new token, a variant, a spacing step), upd
|
|
|
61
59
|
|
|
62
60
|
Say in two lines what they now have: a Figma file of their own, with its link, built from variables and components, so a change to a token changes every screen. They can keep working in it by hand or by asking; a change to a rule goes into `DESIGN.md` too.
|
|
63
61
|
|
|
64
|
-
Offer to delete `.longbeard/design/` working files: the docs, `DESIGN.md` and Figma carry the result. On no, leave them; they are gitignored. Then the next stage the router lists: architecture, which they start by typing `/grill-with-docs
|
|
62
|
+
Offer to delete `.longbeard/design/` working files: the docs, `DESIGN.md` and Figma carry the result. On no, leave them; they are gitignored. Then the next stage the router lists: architecture, which they start by typing `/grill-with-docs`: the stack, and the words the brief and these screens use, ending with the stack as an ADR in `docs/adr/`. A design-only install has none, and ends here.
|
|
65
63
|
|
|
66
64
|
## Do not
|
|
67
65
|
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-identity
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
steps, their other references, the subject's pictures and anything they own,
|
|
8
|
-
all rendered on that screen, never picked by the agent. Ends in the identity
|
|
9
|
-
board: the faces at size and the colours as swatches with their values and
|
|
10
|
-
roles. Runs after design-direction; or for a rebrand.
|
|
4
|
+
Refines the chosen screen's type and colours from rendered options traced
|
|
5
|
+
to their board, then the identity board. Writes docs/design/design-
|
|
6
|
+
identity.md. Runs after design-direction, or for a rebrand.
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
# Design identity
|
|
14
10
|
|
|
15
11
|
**Needs:** `docs/design/design-brief.md`, `docs/design/design-direction.md`
|
|
16
|
-
**Uses if there:** `docs/design/design-moodboard.md
|
|
12
|
+
**Uses if there:** `docs/design/design-moodboard.md`
|
|
17
13
|
**Writes:** `docs/design/design-identity.md`, `docs/design/design-identity.html`
|
|
18
14
|
|
|
19
|
-
The direction found the look by building screens from their references. This skill makes it the product's own: it starts from what the chosen screen was built with, shows close alternatives on that same screen, and locks one pairing and one palette. Every option comes from somewhere they can point to
|
|
15
|
+
The direction found the look by building screens from their references. This skill makes it the product's own: it starts from what the chosen screen was built with, shows close alternatives on that same screen, and locks one pairing and one palette. Every option comes from somewhere they can point to. The agent never invents a palette or picks a face by taste.
|
|
20
16
|
|
|
21
17
|
Two files come out, both committed:
|
|
22
18
|
|
|
@@ -36,9 +32,9 @@ Three stops, no more: options, one refinement, the board.
|
|
|
36
32
|
|
|
37
33
|
A graphic (the brief's surface): read [graphic.md](references/graphic.md) first.
|
|
38
34
|
|
|
39
|
-
Read the design brief (words, personality, feel, never, what is fixed, accessibility, voice, decides) and the direction's "Look, as built". The chosen screen is `.longbeard/design/direction/prototype/first.html`; if the private folder is gone, rebuild it from `design-direction.md` and say so. **What is fixed is fixed:** a face or colour they own is in every option; a refused one is in none; light, dark or both decides which grounds count.
|
|
35
|
+
Read the design brief (words, personality, feel, never, what is fixed, accessibility, voice, decides) and the direction's principles and "Look, as built". The chosen screen is `.longbeard/design/direction/prototype/first.html`; if the private folder is gone, rebuild it from `design-direction.md` and say so. **What is fixed is fixed:** a face or colour they own is in every option; a refused one is in none; light, dark or both decides which grounds count.
|
|
40
36
|
|
|
41
|
-
**At `pace: quick`** (the design brief): no options and no refinement. The chosen screen's type and colours, as built, are the identity: check every pair with `contrast.mjs` (at the brief's level), fix a failing ink with the nearest step that passes (`colours.mjs`, with `--level AAA` when the brief asks for it); a colour they liked by name is never stepped: it stays, with its warning,
|
|
37
|
+
**At `pace: quick`** (the design brief): no options and no refinement. The chosen screen's type and colours, as built, are the identity: check every pair with `contrast.mjs` (at the brief's level), fix a failing ink with the nearest step that passes (`colours.mjs`, with `--level AAA` when the brief asks for it); a colour they liked by name is never stepped: it stays, with its warning. The accent is still asked (below), then go to **3. The board**. They can ask for options at the board; that is full pace from there.
|
|
42
38
|
|
|
43
39
|
## 1. Options, on the chosen screen, in one message
|
|
44
40
|
|
|
@@ -68,7 +64,9 @@ When the project brought a `DESIGN.md` with tokens (see `design`), its faces and
|
|
|
68
64
|
- **From their other references,** the palettes in the direction's readings (`library.json`), each whole.
|
|
69
65
|
- **From the subject:** the light, dark and signature palettes `subject-colours.mjs .longbeard/design/pictures --level <AA|AAA>` proposes: the pictures' own colours, chosen and tuned to their roles by rule, never sampled raw. Often the most ownable, because they are the product's own world. Say for each the thing in the picture it came from ("the crust, lightened to carry white text"); a colour that cannot be named as part of the subject is not offered.
|
|
70
66
|
- **Theirs,** what the design brief records as owned.
|
|
71
|
-
- Every palette
|
|
67
|
+
- Every palette meets [rule 6](references/design-floor.md#6-colour)'s contrast at the brief's level; the scripts offer only that, so pass `--level` every time. A colour they liked by name is never stepped to pass: fix the pair with its other colour, or move it to a fill, a mark or large text; else keep it with its warning and ratio, and let them choose.
|
|
68
|
+
|
|
69
|
+
**The accent, at every pace.** Picking a screen is not picking its accent: unless they named it or the board leaves no doubt, render the harmony options (`colours.mjs --harmony`), the subject's and the built one on the chosen screen, and ask.
|
|
72
70
|
|
|
73
71
|
**Render them on the chosen screen, never list them.** The screen takes overrides in its URL, so each option is a capture, not a rebuild:
|
|
74
72
|
|
|
@@ -78,7 +76,7 @@ node <skill>/scripts/capture.mjs "file://$PWD/.longbeard/design/direction/protot
|
|
|
78
76
|
node <skill>/scripts/sheet.mjs .longbeard/design/identity/type.html .longbeard/design/identity/type-1.png … --cols 3
|
|
79
77
|
```
|
|
80
78
|
|
|
81
|
-
One sheet of pairings (each on the screen's colours) and one of palettes (each on the screen's type), so each choice is seen alone and in the composition they chose. Number them, never rank them. For each, one line of where it comes from ("as built", "a narrower, darker cousin, less used", "from the bread's crust and flour"), never which is best. Where an option sits plainly against the design brief (a script face for a serious 1, a cold palette for a warm 1, its never word), add that as a fact on the same line; it stays an option.
|
|
79
|
+
One sheet of pairings (each on the screen's colours) and one of palettes (each on the screen's type), so each choice is seen alone and in the composition they chose. Number them, never rank them. For each, one line of where it comes from ("as built", "a narrower, darker cousin, less used", "from the bread's crust and flour"), never which is best. Where an option sits plainly against the design brief (a script face for a serious 1, a cold palette for a warm 1, its never word) or breaks one of the direction's principles, add that as a fact on the same line; it stays an option.
|
|
82
80
|
|
|
83
81
|
> Pick a pairing and a palette (any mix: "type 2, colours 4"), or tell me what you're after: "warmer", "no green", "something like the type in X". "Keep" leaves the screen as built.
|
|
84
82
|
|
|
@@ -135,7 +133,7 @@ Then the next step in one line: `design-prototype`. If the name is only set in t
|
|
|
135
133
|
|
|
136
134
|
## Do not
|
|
137
135
|
|
|
138
|
-
- Pick a face or a colour for them, rank options, or
|
|
136
|
+
- Pick a face or a colour for them, rank options, or hide a failing contrast.
|
|
139
137
|
- List faces from memory, or describe an option instead of rendering it.
|
|
140
138
|
- Run more than one refinement round before the board.
|
|
141
139
|
- Choose spacing, layout or a logo here.
|
|
@@ -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.
|
|
@@ -23,6 +23,13 @@
|
|
|
23
23
|
// checked, never chosen one by one: soft text, a hairline, the button's fill
|
|
24
24
|
// and label, a picture tone, and status (ok, warn, error) on the ground.
|
|
25
25
|
// node colours.mjs --roles --ground "#3b2416" --ink "#d8b98c" --accent "#e8643c"
|
|
26
|
+
//
|
|
27
|
+
// --harmony: when the board shows no accent and they named none, the accents colour theory
|
|
28
|
+
// offers from the board's primary: complementary, split-complementary (two), analogous (two),
|
|
29
|
+
// each at the board's own lightness and chroma (the median of its coloured --family, else the
|
|
30
|
+
// primary's), so a muted board gets a muted accent. Under 3:1 on the ground (4.5:1 at AAA) is
|
|
31
|
+
// left out. Options, never a pick: they choose.
|
|
32
|
+
// node colours.mjs --harmony --primary "#2b4c7e" --ground "#f1ede4" --family "<board colours>"
|
|
26
33
|
|
|
27
34
|
const args = process.argv.slice(2);
|
|
28
35
|
const flag = (name) => {
|
|
@@ -31,6 +38,8 @@ const flag = (name) => {
|
|
|
31
38
|
};
|
|
32
39
|
const json = args.includes("--json");
|
|
33
40
|
const rolesMode = args.includes("--roles");
|
|
41
|
+
const harmonyMode = args.includes("--harmony");
|
|
42
|
+
const primaryArg = flag("primary");
|
|
34
43
|
const groundArg = flag("ground");
|
|
35
44
|
const inkArg = flag("ink");
|
|
36
45
|
const accentArg = flag("accent");
|
|
@@ -54,7 +63,12 @@ const hex6 = (v) => {
|
|
|
54
63
|
const list = (v) => (v ? v.split(",").map(hex6).filter(Boolean) : []);
|
|
55
64
|
const ground = hex6(groundArg);
|
|
56
65
|
const ink = hex6(inkArg);
|
|
57
|
-
|
|
66
|
+
const primary = hex6(primaryArg);
|
|
67
|
+
if (harmonyMode ? !ground || !primary : !ground || !ink) {
|
|
68
|
+
if (harmonyMode) {
|
|
69
|
+
console.error('usage: node colours.mjs --harmony --primary "#rrggbb" --ground "#rrggbb" [--family "#a,#b"] [--level AA|AAA] [--json]');
|
|
70
|
+
process.exit(2);
|
|
71
|
+
}
|
|
58
72
|
console.error('usage: node colours.mjs --ground "#rrggbb" --ink "#rrggbb" [--accent "#rrggbb"] [--family "#a,#b"] [--theirs "#c"] [--level AA|AAA] [--json]');
|
|
59
73
|
process.exit(2);
|
|
60
74
|
}
|
|
@@ -115,6 +129,26 @@ const mix = (a, b, t) => {
|
|
|
115
129
|
const dh = ((H2 - H1 + 540) % 360) - 180;
|
|
116
130
|
return fromOklch([L1 + (L2 - L1) * t, C1 + (C2 - C1) * t, (H1 + dh * t + 360) % 360]);
|
|
117
131
|
};
|
|
132
|
+
if (harmonyMode) {
|
|
133
|
+
// The board's lightness and chroma: the median of its coloured colours, the primary among them.
|
|
134
|
+
const pool = [...new Set([primary, ...list(familyArg)])].map(oklch).filter(([, C]) => C >= 0.02);
|
|
135
|
+
const median = (xs) => { const s = [...xs].sort((a, b) => a - b); return s[Math.floor((s.length - 1) / 2)]; };
|
|
136
|
+
const [pL, pC, pH] = oklch(primary);
|
|
137
|
+
const L = pool.length ? median(pool.map((c) => c[0])) : pL;
|
|
138
|
+
const C = pool.length ? median(pool.map((c) => c[1])) : pC;
|
|
139
|
+
const kinds = [["complementary", 180], ["split-complementary", 150], ["split-complementary", 210], ["analogous", -30], ["analogous", 30]];
|
|
140
|
+
const rows = [], left = [];
|
|
141
|
+
for (const [label, turn] of kinds) {
|
|
142
|
+
const colour = fromOklch([L, C, (pH + turn + 360) % 360]);
|
|
143
|
+
const k = contrast(colour, ground);
|
|
144
|
+
if (k >= accentNeed) rows.push({ row: "accent", label, colour, contrast: cut(k) });
|
|
145
|
+
else left.push(`${label} ${colour} (${cut(k)}:1, under ${accentNeed}:1 on ${ground})`);
|
|
146
|
+
}
|
|
147
|
+
if (json) console.log(JSON.stringify({ rows, left }, null, 1));
|
|
148
|
+
else for (const r of rows) console.log([r.row, r.label, r.colour, r.contrast].join("\t"));
|
|
149
|
+
for (const l of left) console.error(`colours: left out ${l}`);
|
|
150
|
+
process.exit(0);
|
|
151
|
+
}
|
|
118
152
|
if (rolesMode) {
|
|
119
153
|
const r1 = cut;
|
|
120
154
|
const roles = [];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Lay screenshots out as one numbered sheet, so a round of first screens can
|
|
3
3
|
// be seen and picked from together. It writes an HTML page; capture.mjs turns
|
|
4
|
-
// that into the picture to show.
|
|
4
|
+
// that into the picture to show. The page is marked as a sheet, so links.mjs never
|
|
5
|
+
// counts it as a page of the prototype. No dependencies.
|
|
5
6
|
//
|
|
6
7
|
// node sheet.mjs .longbeard/design/direction/grid/sheet.html .longbeard/design/direction/grid/1.png .longbeard/design/direction/grid/2.png …
|
|
7
8
|
// node sheet.mjs .longbeard/design/direction/grid/vary.html --cols 5 .longbeard/design/direction/grid/v*.png
|
|
@@ -49,6 +50,7 @@ writeFileSync(
|
|
|
49
50
|
out,
|
|
50
51
|
`<!doctype html>
|
|
51
52
|
<meta charset="utf-8">
|
|
53
|
+
<meta name="generator" content="longbeard sheet">
|
|
52
54
|
<title>Sheet</title>
|
|
53
55
|
<style>
|
|
54
56
|
body { margin: 0; padding: 24px; background: #6f6f6f; font: 600 22px/1 system-ui, sans-serif; }
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-moodboard
|
|
3
3
|
description: >
|
|
4
|
-
References for the look
|
|
5
|
-
|
|
6
|
-
the
|
|
7
|
-
one sharper second round. The keeps are captured privately; the committed doc
|
|
8
|
-
describes what the board says, move by move, without naming a source. Runs
|
|
9
|
-
after docs/design/design-brief.md exists, or when a key screen has no
|
|
10
|
-
reference ("one piece").
|
|
4
|
+
References for the look: reads their own board, or finds a pool they mark
|
|
5
|
+
like or no, and fills only gaps. Writes docs/design/design-moodboard.md.
|
|
6
|
+
Runs after the design brief, or when a key screen has no reference.
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
# Design moodboard
|
|
@@ -48,19 +44,21 @@ Their board already holds their taste: it is the pool, with no search and no pic
|
|
|
48
44
|
node <skill>/scripts/crops.mjs .longbeard/design/moodboard/cards.json --sheets <scratch>/sheets --out .longbeard/design/moodboard/refs
|
|
49
45
|
```
|
|
50
46
|
|
|
47
|
+
**What earlier projects learned:** a `Learned` frame on their board, a `learned.md` in their folder, or `~/.longbeard/taste.md`. Its likes, whys and leave-outs go on the matching cards (`like:`, `avoid:`), its noes under **Not this**. Their words, never reworded.
|
|
48
|
+
|
|
51
49
|
**Screens of one product** (a section or a group of cards from the same site or app): the one they starred or captioned is the keep, and the others are its `also:` lines.
|
|
52
50
|
|
|
53
51
|
A keep with a live link to a site or app gets its other screens as in **Search**, step 7.
|
|
54
52
|
|
|
55
53
|
**Keep every card that fits;** drop only what plainly fails (off-topic, broken, a duplicate) and say how many in one line. A poster, specimen, packaging or illustration is kept as `screen: no`.
|
|
56
54
|
|
|
57
|
-
**Is it enough?** At least six screens; every key screen in the brief shown by at least one keep;
|
|
55
|
+
**Is it enough?** At least six screens; every key screen in the brief shown by at least one keep; when every keep is a screen, one far reference (print, signage, packaging; Fonts In Use has these, [sources.md](references/sources.md)); and, when the design brief's motion is present or leading, a keep that shows it moving (a card with `frames:`, or the site they pasted for its motion). All met: say so in one line. Otherwise say what it lacks in up to three lines:
|
|
58
56
|
|
|
59
57
|
> Search for these, or go with what your board has?
|
|
60
58
|
|
|
61
|
-
A gap: search only that, 20 to 60 candidates, one picker round. Too thin: the full **Search**, their fits as seeds. "Go": what it lacks goes under `Missing`.
|
|
59
|
+
A gap: search only that, 20 to 60 candidates, one picker round. A motion gap is judged moving, never from a thumbnail: in the picker they open each candidate's link and watch it live, then like it with what moves that they like. Only a like is read, so the prototype can rebuild it: a live page from its code, a GIF or video from its own frames. Too thin: the full **Search**, their fits as seeds. "Go": what it lacks goes under `Missing`.
|
|
62
60
|
|
|
63
|
-
**Big boards.** Over about 60 keeps,
|
|
61
|
+
**Big boards.** Over about 60 keeps (not at `quick`), group them by eye so the board they choose from has headings: look at them on contact sheets (`contact-sheet.mjs`, never picture by picture), and give each card a `topic:` line naming its group for what is seen, in words a person outside design would use ("one huge word is the picture"). As many groups as there are looks; strays stay strays, and none is dropped. Their own board is never changed. Say the groups in one line each with the doc.
|
|
64
62
|
|
|
65
63
|
## Search
|
|
66
64
|
|
|
@@ -100,6 +98,8 @@ An app's Dribbble concept stays only if it survives the brief's longest names, r
|
|
|
100
98
|
- also: <part>: .longbeard/design/moodboard/refs/<file> (one line per other screen of the same product; else leave out)
|
|
101
99
|
- screen: <yes | no>
|
|
102
100
|
- like: <their words from the picker's note, as written; leave out when none>
|
|
101
|
+
- avoid: <what they want left out of it, in their words; leave out when none>
|
|
102
|
+
- topic: <its group on a big board, named for what is seen; leave out when not grouped>
|
|
103
103
|
- move: <what it does, about ten words: "headline fills the width, cropped at the right edge">
|
|
104
104
|
- why: <why it fits the design brief, one line>
|
|
105
105
|
```
|
|
@@ -134,7 +134,7 @@ No names, links or paths. Then the doc in up to five lines, how many likes it ho
|
|
|
134
134
|
|
|
135
135
|
> Anything wrong in how I read your board?
|
|
136
136
|
|
|
137
|
-
Next: `design-direction
|
|
137
|
+
Next: `design-direction`.
|
|
138
138
|
|
|
139
139
|
## One piece
|
|
140
140
|
|
|
@@ -9,7 +9,7 @@ The parts are the pieces of the set. For a single piece there is one part, the p
|
|
|
9
9
|
## What a keep is
|
|
10
10
|
|
|
11
11
|
- **A piece of the same kind is a reference, not the exception.** A poster is a `screen: yes` card for a poster brief, and so are a card for a card and a social post for a post. A page of a site, an app screen or a type specimen is `screen: no`: it lends colour, type or picture treatment, not an arrangement.
|
|
12
|
-
- **Their board:** the cards that are the piece's kind count as the screens in "is it enough". Where a card carries a `format` tag
|
|
12
|
+
- **Their board:** the cards that are the piece's kind count as the screens in "is it enough". Where a card carries a `format` tag, that tag says its kind: a `poster` card for a poster, a `social-post` card for a post. Only a card with no such tag is judged by eye. At least six are enough to compose from. With a set, each piece's format has at least one keep.
|
|
13
13
|
- **Keep the size in `move` when it matters:** "tall, headline across the top third, picture below".
|
|
14
14
|
|
|
15
15
|
## Search
|
|
@@ -40,7 +40,7 @@ A nominee is not a reference. Open it full size and drop anything weak before it
|
|
|
40
40
|
- **Fonts In Use.** Print, signage, packaging, books and identities, each with its typefaces named: the place for the far reference (`screen: no`), and for type when the board has none. Its `web` and `software-apps` formats are screens like any gallery's. Keep a use with one clear idea (a crop, a type pairing, a material); its typefaces go on the card as what was read, never as a pick. Capture the use page's own image, never the shop or studio it shows.
|
|
41
41
|
- **Footer Design, CTA Gallery.** One part each, the footer or the call to action: search them when the board covers that part and has no example of it. Same test as the curated galleries: a live page with one clear idea. Capture the live site at that section (`--clip-selector "footer"` or the section's own selector), not the gallery's screenshot.
|
|
42
42
|
- **Recent's other listings.** `interface`, app screenshots and app icons are screens and marks for an app, judged like a gallery's. `branding`, `posters` and `print` are the far reference (`screen: no`), and a graphic's own references when the brief is a poster or a card; `og-images` when it is a social post. `illustration` is imagery, never a site.
|
|
43
|
-
- **Recent motion, launch videos, Codrops demos.** Only for the motion part, when the design brief's `motion` is not none and they asked for examples. Keep a piece whose motion is one idea you can name in a line (a reveal, a transition, type set moving). A Codrops demo is a demo, not a product: it gives one move, never the look of a site. Record it with `--frames`, never judge it from the thumbnail.
|
|
43
|
+
- **Recent motion, launch videos, Codrops demos.** Only for the motion part, when the design brief's `motion` is not none and their board has none moving, or they asked for examples. Keep a piece whose motion is one idea you can name in a line (a reveal, a transition, type set moving). A Codrops demo is a demo, not a product: it gives one move, never the look of a site. Record it with `--frames`, never judge it from the thumbnail.
|
|
44
44
|
- **Dark Mode Design.** Only when the look is dark.
|
|
45
45
|
- **Muzli.** Only a way to reach the original, which then has to pass its own test.
|
|
46
46
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Group a search's candidates into families before anyone picks, so the person
|
|
3
3
|
// chooses between looks first and a pool of one look shows itself. It reads
|
|
4
4
|
// each candidate's thumbnail from its URL, measures it with measure.mjs and
|
|
5
|
-
// sorts the numbers with families.mjs
|
|
5
|
+
// sorts the numbers with families.mjs.
|
|
6
6
|
//
|
|
7
7
|
// Nothing is kept. A thumbnail is hotlinked, never saved (sources.md, "What
|
|
8
8
|
// is saved"): each is fetched into a scratch folder outside the project, read
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
// --topics .longbeard/design/families/board.md: each card takes its family from
|
|
22
22
|
// that board, matched by name, so the moodboard's own cards (with their like,
|
|
23
|
-
// avoid and move lines) are shown under the families
|
|
23
|
+
// avoid and move lines) are shown under the families that board names.
|
|
24
24
|
// A card in no family keeps its part. Every card stays.
|
|
25
25
|
//
|
|
26
26
|
// --one-lead: one Lead on the whole board, not one per group. The direction's
|