@jonandev/longbeard 0.10.0 → 0.11.1

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 CHANGED
@@ -5,15 +5,15 @@ The project's own code, conventions, and DESIGN.md win. Load only what the task
5
5
  | Stage | Starts when | Skills | Writes |
6
6
  |---|---|---|---|
7
7
  | Idea | No docs/brief.md, or the product changes | idea | docs/brief.md |
8
- | Direction | A brief with UI | design-direction | design-exploration/<slug>/direction.md |
8
+ | Direction | A brief with UI, no DESIGN.md | design-direction | design-exploration/<slug>/direction.md |
9
9
  | Design | A direction, no DESIGN.md | design → figma-generate-library → figma-generate-design | DESIGN.md, Ready Figma frames |
10
- | Architecture | No GLOSSARY.md yet | grill-with-docs | GLOSSARY.md, ADRs |
11
- | Plan | A flow or feature to build | setup-matt-pocock-skills → to-spec → to-tickets | specs, tickets |
10
+ | Architecture | No GLOSSARY.md | grill-with-docs | GLOSSARY.md, ADRs |
11
+ | Plan | A flow or feature | setup-matt-pocock-skills → to-spec → to-tickets | specs, tickets |
12
12
  | Build | Tickets | implement-spec → design-check → pr | one PR per spec |
13
13
 
14
- Each stage offers the next; start it on yes. No UI: skip Direction and Design. A feature with a brief: grill-with-docs for new terms, else grilling, then Plan.
14
+ Each stage offers the next; start it on yes. A skill you can't load: they type /<name>. No UI: skip Direction and Design. A feature with a brief: grill-with-docs for new terms, else grilling, then Plan.
15
15
 
16
- UI tickets link their Ready Figma frame. UI work follows DESIGN.md and that frame. A mismatch with the frame is a bug.
16
+ UI tickets link their Ready Figma frame. UI work follows DESIGN.md and that frame; a mismatch is a bug.
17
17
 
18
18
  - A hard bug: diagnosing-bugs
19
19
  - Test-first, when asked: tdd
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.11.1 — 2026-11-17
6
+
7
+ - The brief has a **Position** section: what the product is up against, the one concrete thing it is remembered for, and its personality. `idea` recommends it from what people do today instead, and `design-direction` builds `ownable`, `voice` and `leave` from it, so the look aims at being distinctive rather than guessing.
8
+ - `design-direction` keeps about 100 references by default instead of 12, spread across the whole site (home, navigation, index, case study, article, blog, photography, motion) or an app's key screens, and reaches back to older award winners. The pool and the second round grow to match, and a keep is the page that shows its part, not just the home page.
9
+ - The moodboard is a picker. Tiles are grouped by part, each with Lead (one per part), Like, No and a note, and a copy-out for the chat. `direction.md` lists its references by part. Recorded motion plays on the tile.
10
+ - `design` lays the approved look out as a bento board in Figma before any component: the name in the display face, the type styles, the colour tokens and themes, real pictures from the prototype, a line in the voice, a key screen, the ownable, and a big number if the product has one. Every tile is bound to the tokens, and they say yes to it before the screens are built.
11
+ - `capture.mjs` waits out loaders and intros (no loader covering the screen, not one flat colour, the network quiet; up to 15 s on the web, 2 s locally, `--wait` to change), turns down cookie banners without removing the page around them, and keeps the first screen when a canvas page comes back blank at full length. `--frames N` records timed frames of an intro, a scroll (`--scroll`) or a click (`--click`), and `--click` alone captures the screen after a click, such as an open menu. Local pages are left as they are (no consent clicks), and a local file can be captured up to 30000 px tall, so a moodboard of 100 fits. WebGL and intro-heavy sites came back blank before, and transitions could not be judged from stills.
12
+
13
+ ## 0.11.0 — 2026-11-15
14
+
15
+ - `design-direction` calls itself the inspiration step, and its wording and the README's say so plainly.
16
+ - A project that joins with some stages done no longer gets sent back through them. The router starts Direction only when there is no `DESIGN.md`, and `idea` offers the first stage still to do.
17
+ - The router and our skills say to type a command like `/grill-with-docs` when the agent cannot start that skill itself, instead of promising to start it on yes.
18
+ - `idea` reads any file at the root that describes the product, keeps stack and architecture out of the brief, and asks what happens to a document that now covers the same ground.
19
+ - `design` checks and marks a screen Ready when a feature touches it, for projects whose frames were never marked. `design-check` reports a screen with no Ready frame as "not checked".
20
+ - The README says how to catch up a project you already have.
21
+ - Themes are Figma modes on one colour collection, and each screen is built once. `design` builds them that way, and `design-check` flags separate colour sets or a frame per theme, flags unbound colours as hard, and checks each theme. A screen with a copy per theme becomes one frame when a feature touches it.
22
+ - Frame names take a device when the layout differs: `<screen> · <device> — <state>`.
23
+ - Empty, loading and error are required only when a person can reach them. A state nobody can reach is recorded under Decisions in `DESIGN.md`, with the reason.
24
+ - `design-check` finds states by what a frame shows, so state names can be descriptive.
25
+ - When `init` or `update` cannot list a kit from GitHub, it says why: the network error (like `ENOTFOUND`), the HTTP status, a reply that is not JSON, or a kit with no skills. Before, a failed connection said only "Check the network".
26
+ - `design-direction` keeps Dribbble shots people valued, not just new ones. `dribbble-cards.mjs` sorts by likes, drops shots under 100 likes (`--min-likes` changes that), and prints each shot's designer. The skill ranks by likes rather than page order, compares likes between shots of a similar age, drops dated shots, and keeps at most one shot from a studio that posts near-identical concepts.
27
+
28
+ - `design-direction` lets you steer the look. It searches wide (40 to 80 candidates from every source you chose) and cuts only what is off-topic or below the source's quality floor, not for taste. The new `picker.mjs` shows that pool as one page where you mark each like or no and add why, then copy your picks into the chat. The agent reads back what your likes and noes share, runs one sharper second search from that (same designer, same tag, the same pattern on other sources), and builds the moodboard from your likes. What your noes share goes into `leave`. `dribbble-cards.mjs --picker` prints rows for it, and `sources.md` says where each source's cards keep their title, thumbnail and link. siteinspire is no longer ticked by default: it refuses scripted requests, so it cannot be in the picker.
29
+ - `init` asks which add-ons you want, in the same kind of list as the agents. `--all`, `--skill <name>` and the new `--no-addons` answer for you and skip the list. `update` never asks.
30
+ - New add-on: `modern-web-guidance`, from the Chrome team with Edge, Firefox and MDN. It steers HTML, CSS and client-side JS toward current browser APIs. It is ticked in the `init` list, and a first `init --yes` takes it. It looks each guide up with `npx`, so it needs the network; untick it, or pass `--no-addons`, if that does not suit the project. A project that already ran `init` takes it with `npx longbeard update --skill modern-web-guidance`; the agent does not offer this one.
31
+
5
32
  ## 0.10.0 — 2026-11-04
6
33
 
7
34
  Long Beard is now a pipeline: Idea → Direction → Design → Architecture → Plan → Build. Each stage writes one file the next one reads (`docs/brief.md`, `design-exploration/<slug>/direction.md`, `DESIGN.md` and Ready Figma frames, `GLOSSARY.md`, specs and tickets, one PR per spec), and ends by offering the next. The `AGENTS.md` block is a stage table the agent reads to know where it is, under 200 words.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  <div align="center">
2
2
  <img src="logo.png" alt="Long Beard" width="350">
3
3
  <h1>Long Beard</h1>
4
- <p><strong>Designs like an Art director. Codes like a senior.</strong></p>
4
+ <p><strong>Designs like an Art director. Codes like a Senior Engineer.</strong></p>
5
5
  </div>
6
6
 
7
- You show him a ticket. He has been shipping longer than the ticket has existed.
8
- He keeps a short kit, and he drops a piece the day it stops earning its place.
7
+ A beard like this takes years: moving logos two pixels left, reviewing pull requests at midnight.
8
+ Your agent gets it on day one. It asks before it draws, and it draws before it codes.
9
9
 
10
10
  Long Beard is a pipeline for the agents you already use — Cursor, Claude Code, and the rest.
11
11
  You start with an idea in an empty folder. You end with reviewed pull requests built from a design you approved.
@@ -21,8 +21,8 @@ It is a base. You keep going from here.
21
21
  | Stage | What happens | You get |
22
22
  |---|---|---|
23
23
  | 1. Idea | The agent grills the idea in rounds, each question with its recommendation | `docs/brief.md`: one page, no tech choices |
24
- | 2. Direction | Three questions about what you like, a small search, a moodboard you pick from | `design-exploration/<slug>/direction.md`: ideas and patterns, not colours |
25
- | 3. Design | Questions on colour and type, then two or three prototypes of the key screens; you pick and iterate | `DESIGN.md` on your yes, then the screens in Figma, checked and marked Ready |
24
+ | 2. Direction | Three questions about what you like, a wide search you mark like or no on a picker page, a sharper second search from your picks, then a moodboard of about 100 across the whole site that you mark lead, like or no | `design-exploration/<slug>/direction.md`: ideas and patterns, not colours |
25
+ | 3. Design | Questions on colour and type, then two or three prototypes of the key screens; you pick and iterate | `DESIGN.md` on your yes, a bento board of the look in Figma, then the screens, checked and marked Ready |
26
26
  | 4. Architecture | The stack and the words the product uses | `GLOSSARY.md`, decisions |
27
27
  | 5. Plan | Each flow becomes a spec, each spec vertical-slice tickets | specs and tickets on GitHub Issues or local files |
28
28
  | 6. Build | One agent per ticket, test-first, reviewed, then checked against its Figma frame | one pull request per spec; you merge |
@@ -43,13 +43,14 @@ Four skills are written here, in [`skills/`](skills/). `init` copies them from t
43
43
  | [figma-use](https://github.com/figma/mcp-server-guide/tree/main/skills/figma-use), [figma-generate-library](https://github.com/figma/mcp-server-guide/tree/main/skills/figma-generate-library), [figma-generate-design](https://github.com/figma/mcp-server-guide/tree/main/skills/figma-generate-design) | How `design` writes tokens, components and screens in Figma | Figma |
44
44
  | [figma-design-to-code](https://github.com/figma/mcp-server-guide/tree/main/skills/figma-design-to-code) | Builds from a Figma file a designer handed over | Figma |
45
45
 
46
- Add-ons are not installed by default. The agent offers one when it is needed; take it with `npx longbeard update --skill <name>`, or all of them with `--all`.
46
+ Add-ons are your choice. In a terminal, `init` lists them and you tick the ones you want; `modern-web-guidance` starts ticked, the rest start empty. Later the agent offers one when it is needed; take it with `npx longbeard update --skill <name>`, or all of them with `--all`.
47
47
 
48
48
  | Add-on | What it is for | Author |
49
49
  |---|---|---|
50
50
  | [animate](https://github.com/emilkowalski/skills/tree/main/skills/animate) | One control or transition you asked to animate | emilkowalski |
51
51
  | [jury](https://github.com/juliobsz/skills/tree/main/jury) | Scores a live or local build when you ask. Does not redesign | juliobsz |
52
52
  | [web-design-guidelines](https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines) | Reviews UI and accessibility when you ask | Vercel |
53
+ | [modern-web-guidance](https://github.com/GoogleChrome/modern-web-guidance/tree/main/skills/modern-web-guidance) | Current browser APIs instead of legacy patterns when writing HTML, CSS or client-side JS. Ticked at `init`. It looks each guide up with `npx`, so it needs the network | Google Chrome |
53
54
  | [security-audit](https://github.com/cloudflare/security-audit-skill/tree/main/skills/security-audit) | Reviews a trust boundary when you ask | Cloudflare |
54
55
  | [image-to-code](https://github.com/Leonxlnx/imagegen-skills/tree/main/skills/image-to-code) | Builds a page from a picture you have | Leonxlnx |
55
56
 
@@ -57,7 +58,7 @@ A kit is an author's whole flow, taken as they publish it: the skills in their p
57
58
 
58
59
  A skill for one stack belongs in the project that uses that stack. The list `init` installs is [`beard.json`](beard.json). A skill written here stays in this repository. Do not copy `beard.json` into your project. That would fork the kit.
59
60
 
60
- `design-exploration/` holds other people's screenshots, so `design-direction` keeps it out of git. `DESIGN.md` is the file you publish, and it names ideas, not the references.
61
+ `design-exploration/` is your working folder for inspiration, moodboards and prototypes. It stays on your machine, out of git. `DESIGN.md` is the result you keep.
61
62
 
62
63
  ## You need
63
64
 
@@ -73,7 +74,7 @@ npm install --save-dev @jonandev/longbeard
73
74
  npx longbeard init
74
75
  ```
75
76
 
76
- `init` installs the list, writes the `AGENTS.md` block, and records it in `beard-lock.json`. In a terminal it asks which agents. When it cannot ask, it installs for Cursor and Claude Code. `--yes` skips the question. `--agent cursor` sets them (repeat it to add another). `--global` installs for every project on this machine. `--all` includes every add-on; `--skill <name>` takes one.
77
+ `init` installs the list, writes the `AGENTS.md` block, and records it in `beard-lock.json`. In a terminal it asks which agents. When it cannot ask, it installs for Cursor and Claude Code. `--yes` skips the question. `--agent cursor` sets them (repeat it to add another). `--global` installs for every project on this machine. It then asks which add-ons. When it cannot ask, or with `--yes`, a first `init` takes the ticked ones. `--all` includes every add-on, `--skill <name>` takes one, and `--no-addons` takes none; each skips the list. An add-on you turn down at `init` is not offered again; take it later with `npx longbeard update --skill <name>`.
77
78
 
78
79
  ## Start
79
80
 
@@ -81,7 +82,17 @@ Open your agent in the project and say what you want to make:
81
82
 
82
83
  > I want to build a shared shopping list for flatmates.
83
84
 
84
- It reads `AGENTS.md`, sees there is no brief, and starts at Idea. Each stage ends by offering the next, and nothing moves on without your yes. In a project that already has code, ask for a brief: the agent drafts it from the repo and asks only about the gaps.
85
+ It reads `AGENTS.md`, sees there is no brief, and starts at Idea. Each stage ends by offering the next, and nothing moves on without your yes. A few steps start only when you type them, such as `/grill-with-docs` and `/to-spec`. The agent tells you when.
86
+
87
+ ### A project you already have
88
+
89
+ Ask for a brief:
90
+
91
+ > Catch this project up to the pipeline. Draft the brief from what is here and skip the stages it already has.
92
+
93
+ The agent drafts `docs/brief.md` from your documents and code, asks only about the gaps, and asks what happens to any document that now says the same thing. A stage whose file exists is done: with a `DESIGN.md`, it goes past Direction and Design.
94
+
95
+ Then type `/grill-with-docs`, and say what already names things in your project and where your decisions live, if that is not `docs/adr/`. Screens you already have in Figma are marked Ready one at a time, when a feature touches them.
85
96
 
86
97
  ## Update
87
98
 
package/beard.json CHANGED
@@ -14,7 +14,7 @@
14
14
  },
15
15
  {
16
16
  "name": "Direction",
17
- "when": "A brief with UI",
17
+ "when": "A brief with UI, no DESIGN.md",
18
18
  "skills": [
19
19
  "design-direction"
20
20
  ],
@@ -32,7 +32,7 @@
32
32
  },
33
33
  {
34
34
  "name": "Architecture",
35
- "when": "No GLOSSARY.md yet",
35
+ "when": "No GLOSSARY.md",
36
36
  "skills": [
37
37
  "grill-with-docs"
38
38
  ],
@@ -40,7 +40,7 @@
40
40
  },
41
41
  {
42
42
  "name": "Plan",
43
- "when": "A flow or feature to build",
43
+ "when": "A flow or feature",
44
44
  "skills": [
45
45
  "setup-matt-pocock-skills",
46
46
  "to-spec",
@@ -171,6 +171,17 @@
171
171
  "why": "Accessibility and interface rules.",
172
172
  "optional": true
173
173
  },
174
+ {
175
+ "name": "modern-web-guidance",
176
+ "author": "Google Chrome",
177
+ "license": "Apache-2.0",
178
+ "source": "https://github.com/GoogleChrome/modern-web-guidance/tree/main/skills/modern-web-guidance",
179
+ "when": "Writing HTML, CSS, or client-side JS",
180
+ "why": "Current browser APIs; DESIGN.md decides the look.",
181
+ "optional": true,
182
+ "preselected": true,
183
+ "hint": "current browser APIs, needs the network"
184
+ },
174
185
  {
175
186
  "name": "security-audit",
176
187
  "author": "Cloudflare",
package/bin/long-beard.js CHANGED
@@ -37,7 +37,7 @@ The catalog is beard.json. The command is longbeard, via npx in the project.
37
37
  npx longbeard list
38
38
  npx longbeard --version
39
39
 
40
- npx longbeard init [--global] [--all] [--skill add-on] [--yes] [--agent cursor]
40
+ npx longbeard init [--global] [--all] [--skill add-on] [--no-addons] [--yes] [--agent cursor]
41
41
  npx longbeard update [--global] [--all] [--skill add-on] [--force] [--yes]
42
42
  npx longbeard add <source> --skill <name> --author <name> --why <text> [--when text]
43
43
  npx longbeard remove <name>
@@ -48,10 +48,11 @@ A skill written here is copied from the installed package when its version moved
48
48
  A kit (Matt Pocock's) is every skill its author publishes. update adds new ones, and removes any skill the catalog or its kit no longer lists, unless you edited it.
49
49
  Install the package first (npm install -D @jonandev/longbeard@latest); update does not fetch it.
50
50
  add in a project writes beard.local.json (an extra, not a second kit). remove omits a kit skill here.
51
- --all takes every add-on; --skill takes one. An add-on you took stays and refreshes on update.
51
+ init lists the add-ons in a terminal, some already ticked. --all takes every add-on; --skill takes one; --no-addons takes none.
52
+ Each of those skips the list. An add-on you took stays and refreshes on update.
52
53
  --agent skips the agent list and installs for that tool. Repeat it.
53
54
  --force replaces local edits of skills this command installed, and removes edited ones the catalog dropped.
54
- --yes skips prompts and uses the catalog agents (cursor, claude-code).
55
+ --yes skips prompts and uses the catalog agents (cursor, claude-code) and, on a first init, the ticked add-ons.
55
56
  This does not install marketplace plugins or replace Cursor or Claude commands.
56
57
  `;
57
58
 
@@ -143,6 +144,7 @@ function parseArgs(argv) {
143
144
  force: false,
144
145
  yes: false,
145
146
  optional: false,
147
+ noAddons: false,
146
148
  agents: [],
147
149
  skill: [],
148
150
  why: "",
@@ -158,6 +160,7 @@ function parseArgs(argv) {
158
160
  else if (arg === "--force") flags.force = true;
159
161
  else if (arg === "--yes" || arg === "-y") flags.yes = true;
160
162
  else if (arg === "--optional") flags.optional = true;
163
+ else if (arg === "--no-addons") flags.noAddons = true;
161
164
  else if (arg === "--help" || arg === "-h") flags.help = true;
162
165
  else if (arg === "--version" || arg === "-V") flags.version = true;
163
166
  else if (arg === "--agent" || arg === "-a") flags.agents.push(take(argv, ++i, arg));
@@ -245,15 +248,22 @@ async function fetchKit(item) {
245
248
  if (!repo) fail(`${item.name}: a kit needs a GitHub source.`);
246
249
  // update retires what this list leaves out, so a failed fetch must stop here,
247
250
  // never fall through to a guess. Only a missing manifest (404) falls back.
248
- const cannot = `Could not list the ${item.name} kit from GitHub. Check the network and try again.`;
251
+ // Every stop names its reason, so a failure is never just "check the network".
252
+ const cannot = `Could not list the ${item.name} kit from GitHub`;
249
253
  const get = async (url) => {
254
+ let res;
255
+ try {
256
+ res = await fetch(url);
257
+ } catch (error) {
258
+ const reason = error.cause?.code ?? error.cause?.message ?? error.message;
259
+ fail(`${cannot}: ${reason} reaching ${url}. Check the network and try again.`);
260
+ }
261
+ if (res.status === 404) return null;
262
+ if (!res.ok) fail(`${cannot}: ${res.status} ${res.statusText} from ${url}.`);
250
263
  try {
251
- const res = await fetch(url);
252
- if (res.status === 404) return null;
253
- if (!res.ok) fail(`${cannot} (${res.status} from ${url})`);
254
264
  return await res.json();
255
265
  } catch {
256
- fail(cannot);
266
+ fail(`${cannot}: ${url} did not return JSON.`);
257
267
  }
258
268
  };
259
269
  const manifest = await get(`https://raw.githubusercontent.com/${repo}/HEAD/.claude-plugin/plugin.json`);
@@ -262,7 +272,7 @@ async function fetchKit(item) {
262
272
  : ((await get(`https://api.github.com/repos/${repo}/git/trees/HEAD?recursive=1`))?.tree ?? [])
263
273
  .map((entry) => entry.path.match(/^skills\/([^/]+)\/SKILL\.md$/)?.[1])
264
274
  .filter(Boolean);
265
- if (names.length === 0) fail(cannot);
275
+ if (names.length === 0) fail(`${cannot}: ${repo} lists no skills.`);
266
276
  return names;
267
277
  }
268
278
 
@@ -354,25 +364,22 @@ function readKey() {
354
364
  return "";
355
365
  }
356
366
 
357
- function pickAgents(options, selected) {
367
+ // One checkbox list for both questions init asks. An option is { name, label, detail }.
368
+ function pickList(title, options, selected, { min = 0 } = {}) {
358
369
  const on = new Set(selected);
359
370
  let index = 0;
360
371
  const height = options.length + 1;
372
+ const width = Math.max(16, ...options.map((option) => option.label.length));
361
373
  const paintList = (first) => {
362
374
  if (!first) process.stdout.write(`\x1b[${height}A`);
363
- process.stdout.write(` Which agents? ${dim("space toggle · enter continue")}\x1b[K\n`);
375
+ process.stdout.write(` ${title} ${dim("space toggle · enter continue")}\x1b[K\n`);
364
376
  for (let i = 0; i < options.length; i += 1) {
365
- const name = options[i];
377
+ const option = options[i];
366
378
  const arrow = i === index ? "❯" : " ";
367
- const mark = on.has(name) ? "x" : " ";
368
- const label = (agentNames[name] ?? name).padEnd(16);
369
- const path = flagsPath(name);
370
- process.stdout.write(` ${arrow} [${mark}] ${label} ${dim(path)}\x1b[K\n`);
379
+ const mark = on.has(option.name) ? "x" : " ";
380
+ process.stdout.write(` ${arrow} [${mark}] ${option.label.padEnd(width)} ${dim(option.detail ?? "")}\x1b[K\n`);
371
381
  }
372
382
  };
373
- function flagsPath(name) {
374
- return agentDirs[name].project;
375
- }
376
383
  process.stdin.setRawMode(true);
377
384
  paintList(true);
378
385
  try {
@@ -380,11 +387,11 @@ function pickAgents(options, selected) {
380
387
  const key = readKey();
381
388
  if (key === "ctrl-c") fail("Aborted.");
382
389
  if (key === "enter") {
383
- if (on.size === 0) continue;
384
- return options.filter((name) => on.has(name));
390
+ if (on.size < min) continue;
391
+ return options.filter((option) => on.has(option.name)).map((option) => option.name);
385
392
  }
386
393
  if (key === "space") {
387
- const name = options[index];
394
+ const { name } = options[index];
388
395
  if (on.has(name)) on.delete(name);
389
396
  else on.add(name);
390
397
  } else if (key === "up") index = (index + options.length - 1) % options.length;
@@ -397,6 +404,27 @@ function pickAgents(options, selected) {
397
404
  }
398
405
  }
399
406
 
407
+ function pickAgents(options, selected) {
408
+ const rows = options.map((name) => ({ name, label: agentNames[name] ?? name, detail: agentDirs[name].project }));
409
+ return pickList("Which agents?", rows, selected, { min: 1 });
410
+ }
411
+
412
+ // init asks which add-ons, with the catalog's `preselected` ones ticked. Naming
413
+ // add-ons with a flag is the answer, so it skips the list. Ticks are for a
414
+ // first init only: after that, what you took stays and nothing comes back.
415
+ function chooseAddons(flags) {
416
+ if (flags.all || flags.noAddons || flags.skill.length) return [];
417
+ const taken = readLock(flags).skills;
418
+ const omitted = new Set(extraState(flags).omit);
419
+ const open = catalog(curated()).filter((item) => item.optional && !taken[item.name] && !omitted.has(item.name));
420
+ if (open.length === 0) return [];
421
+ const first = !existsSync(lockFile(flags));
422
+ const ticked = first ? open.filter((item) => item.preselected).map((item) => item.name) : [];
423
+ if (flags.yes || !process.stdin.isTTY) return ticked;
424
+ const rows = open.map((item) => ({ name: item.name, label: item.name, detail: item.hint ?? item.when ?? "" }));
425
+ return pickList("Which add-ons?", rows, ticked);
426
+ }
427
+
400
428
  function chooseAgents(manifest, flags, { pick, lock } = {}) {
401
429
  const known = knownAgents();
402
430
  if (flags.agents.length) {
@@ -586,7 +614,8 @@ function generateRouter(items, manifest = curated()) {
586
614
  return [line(item.when?.trim() || item.name, item.name, item.why)];
587
615
  });
588
616
  const have = new Set(items.map((item) => item.name));
589
- const addons = catalog(manifest).filter((item) => item.optional && !have.has(item.name));
617
+ // A preselected add-on was decided at init, so it is never offered again.
618
+ const addons = catalog(manifest).filter((item) => item.optional && !item.preselected && !have.has(item.name));
590
619
  const rows = stages.map((stage) => `| ${stage.name} | ${stage.when} | ${stage.skills.join(" → ")} | ${stage.writes} |`);
591
620
  const offer = addons.length
592
621
  ? `\nAdd-ons, offered once when needed (\`npx longbeard update --skill <name>\`): ${addons.map((item) => (item.hint ? `${item.name} (${item.hint})` : item.name)).join(", ")}. At Architecture, a framework skill.\n`
@@ -599,9 +628,9 @@ The project's own code, conventions, and DESIGN.md win. Load only what the task
599
628
  |---|---|---|---|
600
629
  ${rows.join("\n")}
601
630
 
602
- Each stage offers the next; start it on yes. No UI: skip Direction and Design. A feature with a brief: grill-with-docs for new terms, else grilling, then Plan.
631
+ Each stage offers the next; start it on yes. A skill you can't load: they type /<name>. No UI: skip Direction and Design. A feature with a brief: grill-with-docs for new terms, else grilling, then Plan.
603
632
 
604
- UI tickets link their Ready Figma frame. UI work follows DESIGN.md and that frame. A mismatch with the frame is a bug.
633
+ UI tickets link their Ready Figma frame. UI work follows DESIGN.md and that frame; a mismatch is a bug.
605
634
 
606
635
  ${helpers.join("\n")}
607
636
  ${offer}
@@ -741,8 +770,9 @@ function remember(lock, flags, skills, agents) {
741
770
  async function init(flags) {
742
771
  requireProject(flags);
743
772
  knownAddons(flags);
744
- const { manifest, extra, items, later, ...picked } = chosen(flags);
745
- const agents = chooseAgents(manifest, flags, { pick: true, lock: readLock(flags) });
773
+ const agents = chooseAgents(curated(), flags, { pick: true, lock: readLock(flags) });
774
+ flags.skill.push(...chooseAddons(flags));
775
+ const { extra, items, later, ...picked } = chosen(flags);
746
776
  const skills = await expandKits(picked.skills, extra.omit);
747
777
  const classified = classify(skills, agents, flags);
748
778
  classified.later = later;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonandev/longbeard",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Designs like an Art director. Codes like a senior.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -3,7 +3,8 @@ name: design
3
3
  description: >
4
4
  Turn a direction into the product's look: prototype the brief's key screens
5
5
  in plain HTML, let them pick and iterate, then on approval write DESIGN.md
6
- in one go and build the screens in Figma from it. Colour, type, spacing and
6
+ in one go, lay the look out as a bento board in Figma, and build the
7
+ screens from it. Colour, type, spacing and
7
8
  copy are chosen here, on rendered screens. Runs when
8
9
  design-exploration/<slug>/direction.md exists and there is no approved
9
10
  DESIGN.md, or for a feature that needs screens. Figma is required.
@@ -11,7 +12,7 @@ description: >
11
12
 
12
13
  # Design
13
14
 
14
- Three things come out, in order: a prototype they approved, `DESIGN.md` (the official look, committed), and the screens in Figma marked **Ready**. Figma is the truth for screens. `DESIGN.md` is the written summary of the rules behind them.
15
+ Four things come out, in order: a prototype they approved, `DESIGN.md` (the official look, committed), a bento board of that look in Figma, and the screens in Figma marked **Ready**. Figma is the truth for screens. `DESIGN.md` is the written summary of the rules behind them.
15
16
 
16
17
  Read [design-rules.md](references/design-rules.md) before the first prototype. It is the checklist for every screen here and in `design-check`.
17
18
 
@@ -58,7 +59,7 @@ Load Matt's `prototype`, UI branch, and tell it:
58
59
  - **Real content, not polish skipped.** Real copy in the voice from `direction.md`, real or properly chosen imagery (local files in `prototype/img/`), the longest real names. No lorem, no grey boxes.
59
60
  - **No throwaway branch.** The folder is gitignored. The winner goes into `DESIGN.md`, not into git.
60
61
 
61
- The default state is not enough. Each key screen also gets empty, loading and error, as frames in the same file (`?variant=B&state=empty`).
62
+ The default state is not enough. Each key screen also gets the empty, loading and error states a person can reach, as frames in the same file (`?variant=B&state=empty`). A product with more than one theme shows each one, so they approve every theme, not only the first.
62
63
 
63
64
  ### 3. Self-check, then show
64
65
 
@@ -69,7 +70,7 @@ node <skill>/scripts/capture.mjs "file://$PWD/design-exploration/<slug>/prototyp
69
70
  node <skill>/scripts/capture.mjs "file://$PWD/design-exploration/<slug>/prototype/today.html?variant=B&capture" --out <scratch>/today-b-mobile.png --width 390
70
71
  ```
71
72
 
72
- Shoot every state of every variant, not only the default. Check them against the rules: Idea first, then hard, then soft. That includes the hard rules about controls: every input has a visible label, focus and pressed exist, and what looks tappable has a stated result. A hard finding after approval reopens an approved screen. Fix what fails before they see it. Then give the paths and the `?variant=` keys, name the colours and faces each variant uses, and ask which leads, what to take from the others, and whether the colour and type are right. Expect "the header from B with the list from C": that is the design. Iterate on the prototype until they say it is right.
73
+ Shoot every state of every variant, in every theme, not only the default. Check them against the rules: Idea first, then hard, then soft. That includes the hard rules about controls: every input has a visible label, focus and pressed exist, and what looks tappable has a stated result. A hard finding after approval reopens an approved screen. Fix what fails before they see it. Then give the paths and the `?variant=` keys, name the colours and faces each variant uses, and ask which leads, what to take from the others, and whether the colour and type are right. Expect "the header from B with the list from C": that is the design. Iterate on the prototype until they say it is right.
73
74
 
74
75
  A pattern can bring a feature the brief does not have. Name it when you show it. If they keep it, that is a product change: `idea`, Change, before `DESIGN.md`.
75
76
 
@@ -85,6 +86,7 @@ Only on their yes to a rendered prototype. Write the whole file from [design-md-
85
86
  ```
86
87
  node <skill>/scripts/contrast.mjs "#1b1b1f on #fafaf7" "#c2410c on #fafaf7:mark"
87
88
  ```
89
+ - **Themes.** A product with more than one theme lists each colour token once, with a value per theme, and every pair passes the contrast check in each theme.
88
90
  - **Ideas, not sources.** `DESIGN.md` is committed and often public. It never names a product, site, studio or designer from the exploration, and never cites a `design-exploration/` path. Turn each into the idea: "a quiet reading page", not whose.
89
91
  - **Write down what makes it this design.** Whatever someone would need to rebuild it without the prototype open goes under Components, with values, not adjectives.
90
92
  - **Tokens are code names.** Name each colour, type and spacing token as it will be named in code (`color/ink`, `space/md`). Figma variables use the same names, with code syntax `var(--color-ink)`.
@@ -97,15 +99,26 @@ Load `figma-use`, `figma-generate-library` and `figma-generate-design`, and foll
97
99
  - **One file per product.** A new one if the project has none (`figma-create-new-file`). Put its URL in `DESIGN.md`.
98
100
  - **Our tokens, not a kit.** Variables and styles come from `DESIGN.md`. New files may come with community kits attached (Material, Apple, Simple Design System). Their discovery steps tell you to reuse them. Do not: search the file only (no `includeLibraryKeys`), and build what is missing from `DESIGN.md`.
99
101
  - **Build, do not capture.** Compose screens from the tokens and components. Do not run `generate_figma_design` on the prototype. It is a throwaway with a switcher. For pictures, create the image frames, then `upload_assets` the prototype's own files with those `nodeIds`.
100
- - **Pages:** Cover, Foundations, Components; one `Screens — <flow>` page per flow from the brief; `Explorations` for anything kept for later, by date.
101
- - **Order:** tokens and styles from `DESIGN.md` → only the components the key screens need → the key screens → their states. The library grows with features. It is not built ahead.
102
- - **States:** every screen has empty, loading and error frames next to the default, named `<screen> — <state>`.
102
+ - **Themes are modes.** One colour collection with a mode per theme. Each screen is built once and switches with the mode, never a colour set or a frame per theme. If Figma refuses the modes, stop and ask. Never fall back to separate sets.
103
+ - **Pages:** Cover (the board), Foundations, Components; one `Screens — <flow>` page per flow from the brief; `Explorations` for anything kept for later, by date.
104
+ - **Order:** tokens and styles from `DESIGN.md` → the board → only the components the key screens need → the key screens → their states. The library grows with features. It is not built ahead.
105
+ - **States:** every 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 gets no frame: add the screen, the state and the reason under Decisions in `DESIGN.md`.
106
+ - **Names:** `<screen> — <state>`. When a screen's layout differs by device, `<screen> · <device> — <state>`. The state can describe itself. Theme is never in the name.
103
107
  - **Components have their states too:** focus and pressed for every control, before a screen uses it.
104
108
  - **One text style per weight used.** Changing a font on styled text detaches it. A weight `DESIGN.md` does not list is a new style, and a new row there.
105
109
  - **Trust the file, not the picture.** Take a screenshot only after the edit has returned, and read text back from the nodes. A cloned variant loses its text property links: wire them again. Swapping an instance can keep old overrides: replace it with a fresh one.
106
110
  - **Be faithful to the approved prototype.** It is what they said yes to, and Figma is that design, not a new reading of it. Tokens carry the values, not the whole design, so work with the approved variant open and match it. If something cannot be built the same way, say so and ask. Never simplify it silently.
107
111
  - **Check each screen** with `design-check` frame mode before showing it, passing the prototype shot. Fix its hard findings.
108
- - **Ready:** when they approve a frame, rename it `<screen> — <state> — Ready`. Tickets link Ready frames, and build is checked against them.
112
+ - **Ready:** when they approve a frame, add `— Ready` to its name. Tickets link Ready frames, and build is checked against them.
113
+
114
+ ### The board
115
+
116
+ Before any component, lay the whole look out on one frame, `Board`, on the Cover page: a bento of tiles in different sizes that shows the identity at a glance, the way a studio presents a brand. It is where they see colour, type, imagery and voice working together, and where a weak look shows before a screen is built on it.
117
+
118
+ - **What it holds**, each its own tile: the product's name set in the display face; the type, each text style named and shown in use; the colours, each token as a swatch with its name, and every theme; two or three of the prototype's real pictures, cropped hard; one line in the voice, set large; a crop of an approved key screen in a device frame; the `ownable`; and, if the brief has one, a number or fact about the product set very large. Add a tile for anything else that makes this look this look (a mark, a shape, an illustration). Leave out a tile that would be empty.
119
+ - **Composed, not listed.** One tile leads and is the largest; the rest vary in size and in which colour they sit on. Tiles share one gap and one radius from `DESIGN.md`. Text sits on its tile's colour at the contrast `DESIGN.md` checked.
120
+ - **Real, and bound.** Every fill, text and radius is bound to a variable or style: the board is the tokens in use, and changes when they change. Copy comes from the brief and the prototype, pictures from `prototype/img/`. No placeholder, no reference's name or picture.
121
+ - **Their yes.** Screenshot it, read the text back from the nodes, and show it. Ask whether this is the product. A no is a change to `DESIGN.md` and the prototype first, then the board again. It is not marked Ready: it is not a screen, and nothing is built from it but the feeling.
109
122
 
110
123
  If a Figma decision changes a rule (a new token, a component variant, a spacing step), update `DESIGN.md` in the same turn and say what changed.
111
124
 
@@ -113,7 +126,7 @@ If a Figma decision changes a rule (a new token, a component variant, a spacing
113
126
 
114
127
  Offer to delete `design-exploration/<slug>/`. `DESIGN.md` and Figma now carry the result. On no, leave it. It is gitignored either way.
115
128
 
116
- Then offer the next stage: architecture (`grill-with-docs`). Tell it to seed `GLOSSARY.md` from the brief and the copy in the Figma screens, and to ask before renaming a term the screens show.
129
+ Then offer the next stage: architecture. They start it by typing `/grill-with-docs`. When it runs, seed `GLOSSARY.md` from the brief and the copy in the Figma screens, and ask before renaming a term the screens show.
117
130
 
118
131
  ## Feature loop
119
132
 
@@ -123,8 +136,9 @@ A feature with screens, once `DESIGN.md` exists.
123
136
  - **New parts?** Prototype only the new parts, on the real screens around them, in `design-exploration/<feature>/prototype/`, then as above.
124
137
  - New page `Screens — <feature>`. Reuse components. New ones are added to Components.
125
138
  - `DESIGN.md` gets entries (a token, a component, a decision with date and reason). It is never rewritten in a feature.
126
- - **Identity changes need their own yes.** A new colour role, a typeface, a change to the idea or the voice: ask for each one separately, after showing it rendered. Two such changes are approved one at a time, never bundled.
139
+ - **Identity changes need their own yes.** A new colour role, a typeface, a change to the idea or the voice: ask for each one separately, after showing it rendered. Two such changes are approved one at a time, never bundled. An approved one goes on the board too.
127
140
  - A rebrand is not a feature: that is `design-direction` again, then a first pass.
141
+ - **A screen with no Ready frame.** A project that joined with its screens already in Figma has frames nobody marked. When a feature touches one, run `design-check` frame mode on it, add what it lacks, and mark it Ready on their yes. A screen with a copy per theme becomes one frame on modes. Only the screens the feature touches, never the whole file.
128
142
 
129
143
  ## Do not
130
144
 
@@ -132,4 +146,4 @@ A feature with screens, once `DESIGN.md` exists.
132
146
  - Name a reference or a `design-exploration/` path in `DESIGN.md`.
133
147
  - Use a community kit's components or variables in Figma.
134
148
  - Build the whole component library before the screens need it.
135
- - Mark a frame Ready that has no empty, loading and error states, or that has open hard findings.
149
+ - Mark a frame Ready that lacks a state a person can reach, or that has open hard findings.
@@ -54,4 +54,5 @@ Contrast (scripts/contrast.mjs):
54
54
 
55
55
  - Every token name is its code name, and the same name in Figma.
56
56
  - Every colour pair in the table has been through `scripts/contrast.mjs`. No FAIL is written.
57
+ - More than one theme: one row per token, with a value column per theme. Every pair is checked in each theme.
57
58
  - A section with nothing to say is left out, not filled with a guess.
@@ -73,6 +73,7 @@ These rules decide execution, never the look. The direction and `DESIGN.md` deci
73
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.
74
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
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.
76
77
  - [soft] The accent colour marks action or state, and is not also used for decoration on the same screen.
77
78
  - [soft] Status colours (error, warning, success) are used for status only.
78
79
 
@@ -89,7 +90,7 @@ These rules decide execution, never the look. The direction and `DESIGN.md` deci
89
90
 
90
91
  **Principle:** every screen is shown in every state a person will meet.
91
92
 
92
- - [hard] The screen has frames for empty, loading and error, next to the default. A missing state is a failure, not a later task.
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.
93
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.
94
95
  - [hard] Interactive components show hover (pointer surfaces), focus, pressed, disabled, and selected where they apply. Each state is visibly different from default.
95
96
  - [soft] Loading keeps the layout's shape (skeleton or reserved space), so content does not jump when it arrives.