@jonandev/longbeard 0.5.2 → 0.6.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 +2 -2
- package/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/beard.json +1 -1
- package/bin/long-beard.js +68 -7
- package/package.json +1 -1
- package/skills/design-md/SKILL.md +7 -3
- package/skills/design-reference-hunt/SKILL.md +178 -66
- package/skills/design-reference-hunt/references/quality.md +18 -2
- package/skills/design-reference-hunt/references/shots.md +12 -2
- package/skills/design-reference-hunt/scripts/capture.mjs +46 -7
- package/skills/design-reference-hunt/scripts/dribbble-cards.mjs +115 -8
- package/skills/design-reference-hunt/scripts/moodboard.mjs +209 -136
- package/skills/design-reference-hunt/scripts/proof.mjs +301 -0
package/AGENTS.md
CHANGED
|
@@ -4,7 +4,7 @@ The project's own code, conventions, and DESIGN.md win.
|
|
|
4
4
|
|
|
5
5
|
Load only what the task needs. Leave the rest unread.
|
|
6
6
|
|
|
7
|
-
A marketing site is the page a person lands on to understand or choose. An application is the tool they come back to. Official look wins: DESIGN.md, then Figma, then the board. Hunt finds references and proposes an adaptation; it does not code the page.
|
|
7
|
+
A marketing site is the page a person lands on to understand or choose. An application is the tool they come back to. Official look wins: DESIGN.md, then Figma, then the board. Hunt finds references and proposes an adaptation; it does not code the page. Open the moodboard before they pick, mark the lead after, say what we take, change, and leave, then ask to write or update DESIGN.md as its own message — once more, first, if they move on without answering — only on yes. Code the page only when they asked to build. Direction-only stops after persist. A site hunts live pages; an application hunts screen shots. With a direction already, hunt only the piece.
|
|
8
8
|
|
|
9
9
|
- Building or fixing: ponytail. The smallest change that finishes the job. Leave validation, error handling, security, and accessibility in place.
|
|
10
10
|
- A diff: ponytail-review. Read it like someone who gets paged.
|
|
@@ -14,7 +14,7 @@ A marketing site is the page a person lands on to understand or choose. An appli
|
|
|
14
14
|
- A change that touches data, money, jobs, or what a person sees: premortem. Name where it can break before you write. A small change gets a short answer.
|
|
15
15
|
- They asked to grill a plan or design, or the ask is underspecified: grill-me. Interview until every branch of the design tree is resolved. Uses grilling.
|
|
16
16
|
- Stress-testing a plan, decision, or idea: grilling. The interview primitive behind grill-me. Relentless questions until branches are closed.
|
|
17
|
-
- No official look, or they asked to hunt / define direction / find references: design-reference-hunt. Does not code the page.
|
|
17
|
+
- No official look, or they asked to hunt / define direction / find references: design-reference-hunt. Does not code the page. Talk first, one round, then search small. Whole look writes `.design/board.md` and `.design/moodboard.html` of those references, open before they pick and marked again after. A later pass writes `.design/hunts/<slug>/` and does not replace the moodboard. Narrow on the moodboard, show the proof, say the adaptation (take, change, leave, ownable, gaps, adapted colour and type), then ask to write or update `DESIGN.md` via design-md as its own message — once more, first, if they move on without answering — only on yes. Direction-only stops there. Build only if they also asked to build.
|
|
18
18
|
- They asked to build or code a page or screen: design-taste-frontend. Do not deal this skill’s references, and do not run draw. Prefer `DESIGN.md` when it exists; else wait for `.design/board.md` and build from those cards. Direction-only or hunt-only is not this skill. The control a card describes is the control. Do not add a filled button the card does not show. Inspect still.
|
|
19
19
|
- They asked to animate a control or a transition: animate. A page design-taste-frontend is building keeps that skill’s motion. Decide this one move, then build it.
|
|
20
20
|
- A Figma file or link: figma-design-to-code. A designer handed it over. Needs the Figma connection. Reuse this project's components.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.6.0 — 2026-10-23
|
|
6
|
+
|
|
7
|
+
- `update` refreshes a kit skill from the installed package. It used to hand every refresh to the skills CLI, which cannot fetch a skill that ships inside this package, so it printed "up to date" over files from an older release. Each line now says which versions moved (`design-reference-hunt 0.5.1 → 0.6.0`), `--force` always replaces, and the last line names the version you are running. Install the package first; `update` still does not fetch it.
|
|
8
|
+
- `design-reference-hunt` opens the moodboard **before** the pick, with eight to twelve screens rather than two, every picture linked to its source, captions under the shot, and whole references instead of a 320 px crop. New card fields carry it: `tagline:` (about six words, the only text on a tile), `faces:` (names only, so the type tile sets them for real), and `slot:` (a product page stays off the moodboard). After the pick it runs again with `--leads` and `--why`, so the lead's caption is the reason they gave, not a line written before they chose. `--imagery` is opt-in: a look with no pictures in it shows no imagery tiles, and an imagery count of 0 is a complete board.
|
|
9
|
+
- `design-reference-hunt` adapts a colour for a reason — contrast, the twist, our own pictures, our own brand — and keeps a generic sampled cream or ink as it is. Nudging a hex so it differs is a change nobody can see.
|
|
10
|
+
- `scripts/dribbble-cards.mjs` reads likes and views from the card's own stat elements and prints both columns. It used to take the first number in the card text, which could be the likes count, a digit from the title, or a full stop. A count it cannot read stays empty.
|
|
11
|
+
- `scripts/capture.mjs` takes a `file://` URL, so the moodboard can be checked before anyone is shown it, and `--clip-selector "<css>"` clips to an element's box instead of guessing coordinates for a type specimen.
|
|
12
|
+
- `design-reference-hunt` starts a whole look with a conversation, not a search. One round, every question skippable with "go": what they are into, pictures they already like (kept as `source: user` seeds that steer and rank the search), the subject and surface with the identity nouns from the name, whether it needs pictures at all, a checklist of sources with defaults for the surface, and how many references to see. It never asks a second round before searching.
|
|
13
|
+
- The search is smaller and cleaner. It queries for the form, not the word, and `dribbble-cards.mjs` drops a shared negative list (tees, CVs, worksheets, posters, logos) by slug and title before any thumbnail is fetched, then prints the noise rate. An app stops when two more queries add nothing, keeps the number they chose, and opens every shortlisted shot at full size. App hunts go to shipped screens first and mark each card `shipped: yes | concept`. Cards are short; only the lead and the `also` cards get the full fields.
|
|
14
|
+
- The moodboard is the narrowing step. It is built from what was found, before they answer, and the question is "which leads, which do you also like, which feel wrong, and why?". `--also` takes several cards, `--count` sets how many references show.
|
|
15
|
+
- **Read this** gains `ownable` (one concrete element from the project's own identity that the lead does not have), `gaps` (key screens with no strong reference, each offered as a later hunt after the persist answer) and `not shown` (what a concept lead never faced). `design-md` carries `ownable` and `gaps` into `DESIGN.md` and sends a board without `ownable` back.
|
|
16
|
+
- New `scripts/proof.mjs` writes `.design/proof.html` from **Read this**: paper and night side by side, a list row and a phone column, the faces at body size, contrast ratios, and text from the project's own README or product file. It is not the product. It runs before the persist ask and asks whether fewer font families would do.
|
|
17
|
+
- A redo of the whole look uses at least one source the last board did not, and one deliberately opposite query, to test whether the lead still wins.
|
|
18
|
+
- People who already ran `init` get all of this by installing this release, then running `npx longbeard update`.
|
|
19
|
+
|
|
5
20
|
## 0.5.2 — 2026-10-23
|
|
6
21
|
|
|
7
22
|
- `design-reference-hunt` opens `.design/moodboard.html` after a leading reference is chosen. That file is the references: pictures, type we saw, colour we saw. The direction is the adaptation said after it — what we take, what we change, what we leave — and `DESIGN.md` is written from that, not from the reference’s exact colours or faces. A later hunt does not replace the moodboard. People who already ran `init` get it by installing the release that contains it, then running `npx longbeard update`.
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ It is a base. You keep going from here.
|
|
|
18
18
|
|
|
19
19
|
## The kit
|
|
20
20
|
|
|
21
|
-
Two of these are written here, in [`skills/`](skills/). `init` copies them from this package. The others are installed from the
|
|
21
|
+
Two of these are written here, in [`skills/`](skills/). `init` copies them from this package. The others are installed from the originals their authors publish, and `update` pulls a fresh copy of those.
|
|
22
22
|
|
|
23
23
|
Writing stays small. A risky change is named before it is built. Design direction is hunted and written down before code, unless a `DESIGN.md` or Figma file already wins.
|
|
24
24
|
|
package/beard.json
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"license": "MIT",
|
|
72
72
|
"source": "local",
|
|
73
73
|
"when": "No official look, or they asked to hunt / define direction / find references",
|
|
74
|
-
"why": "Does not code the page.
|
|
74
|
+
"why": "Does not code the page. Talk first, one round, then search small. Whole look writes `.design/board.md` and `.design/moodboard.html` of those references, open before they pick and marked again after. A later pass writes `.design/hunts/<slug>/` and does not replace the moodboard. Narrow on the moodboard, show the proof, say the adaptation (take, change, leave, ownable, gaps, adapted colour and type), then ask to write or update `DESIGN.md` via design-md as its own message — once more, first, if they move on without answering — only on yes. Direction-only stops there. Build only if they also asked to build."
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"name": "design-taste-frontend",
|
package/bin/long-beard.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
cpSync,
|
|
6
|
+
existsSync,
|
|
7
|
+
lstatSync,
|
|
8
|
+
mkdirSync,
|
|
9
|
+
readdirSync,
|
|
10
|
+
readFileSync,
|
|
11
|
+
readSync,
|
|
12
|
+
rmSync,
|
|
13
|
+
statSync,
|
|
14
|
+
writeFileSync,
|
|
15
|
+
} from "node:fs";
|
|
5
16
|
import { homedir } from "node:os";
|
|
6
17
|
import { dirname, join, resolve } from "node:path";
|
|
7
18
|
import { fileURLToPath } from "node:url";
|
|
@@ -32,6 +43,8 @@ The catalog is beard.json. The command is longbeard, via npx in the project.
|
|
|
32
43
|
|
|
33
44
|
init installs missing skills from beard.json. A skill already present for an agent is left there.
|
|
34
45
|
update installs anything new, refreshes only items in beard-lock.json, and rewrites the AGENTS.md block.
|
|
46
|
+
A kit skill is copied from the installed package when its version moved, and the line says which versions.
|
|
47
|
+
Install the package first (npm install -D @jonandev/longbeard@latest); update does not fetch it.
|
|
35
48
|
add in a project writes beard.local.json (an extra, not a second kit). remove omits a kit skill here.
|
|
36
49
|
--agent skips the agent list and installs for that tool. Repeat it.
|
|
37
50
|
--force replaces local edits of skills this command installed.
|
|
@@ -412,6 +425,14 @@ function writeLock(flags, lock) {
|
|
|
412
425
|
writeJson(lockFile(flags, true), { version: 1, skills: lock.skills });
|
|
413
426
|
}
|
|
414
427
|
|
|
428
|
+
function packageVersion() {
|
|
429
|
+
try {
|
|
430
|
+
return readJson(join(root, "package.json")).version ?? "";
|
|
431
|
+
} catch {
|
|
432
|
+
return "";
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
415
436
|
function recordInstall(lock, skill, agents) {
|
|
416
437
|
const prev = lock.skills[skill.name] ?? { agents: [] };
|
|
417
438
|
lock.skills[skill.name] = {
|
|
@@ -419,9 +440,31 @@ function recordInstall(lock, skill, agents) {
|
|
|
419
440
|
author: skill.author,
|
|
420
441
|
agents: [...new Set([...prev.agents, ...agents])],
|
|
421
442
|
installedAt: new Date().toISOString(),
|
|
443
|
+
...(skill.source === "local" ? { version: packageVersion() } : {}),
|
|
422
444
|
};
|
|
423
445
|
}
|
|
424
446
|
|
|
447
|
+
// The skills CLI can only update what it can fetch. A kit skill lives in this
|
|
448
|
+
// package, so update copies it here instead of reporting "up to date" over a
|
|
449
|
+
// stale file.
|
|
450
|
+
function copyLocalSkill(name, agents, global) {
|
|
451
|
+
const from = join(root, "skills", name);
|
|
452
|
+
if (!existsSync(join(from, "SKILL.md"))) return false;
|
|
453
|
+
let copied = false;
|
|
454
|
+
for (const dir of new Set(agents.map((agent) => agentDir(agent, global)))) {
|
|
455
|
+
const to = join(dir, name);
|
|
456
|
+
if (existsSync(to)) {
|
|
457
|
+
// A link already points at this package. Replacing it would pin a copy.
|
|
458
|
+
if (lstatSync(to).isSymbolicLink()) continue;
|
|
459
|
+
rmSync(to, { recursive: true, force: true });
|
|
460
|
+
}
|
|
461
|
+
mkdirSync(dirname(to), { recursive: true });
|
|
462
|
+
cpSync(from, to, { recursive: true });
|
|
463
|
+
copied = true;
|
|
464
|
+
}
|
|
465
|
+
return copied;
|
|
466
|
+
}
|
|
467
|
+
|
|
425
468
|
function skillMarkdown(name, agents, global) {
|
|
426
469
|
const files = [];
|
|
427
470
|
const seen = new Set();
|
|
@@ -452,7 +495,7 @@ The project's own code, conventions, and DESIGN.md win.
|
|
|
452
495
|
|
|
453
496
|
Load only what the task needs. Leave the rest unread.
|
|
454
497
|
|
|
455
|
-
A marketing site is the page a person lands on to understand or choose. An application is the tool they come back to. Official look wins: DESIGN.md, then Figma, then the board. Hunt finds references and proposes an adaptation; it does not code the page.
|
|
498
|
+
A marketing site is the page a person lands on to understand or choose. An application is the tool they come back to. Official look wins: DESIGN.md, then Figma, then the board. Hunt finds references and proposes an adaptation; it does not code the page. Open the moodboard before they pick, mark the lead after, say what we take, change, and leave, then ask once to write or update DESIGN.md — only on yes. Code the page only when they asked to build. Direction-only stops after persist. A site hunts live pages; an application hunts screen shots. With a direction already, hunt only the piece.
|
|
456
499
|
|
|
457
500
|
${lines.join("\n")}
|
|
458
501
|
|
|
@@ -616,19 +659,37 @@ function update(flags) {
|
|
|
616
659
|
if (classified.missing.length > 0) say(dim("Installing…"));
|
|
617
660
|
installSkills(classified.missing, { global: flags.global, agents });
|
|
618
661
|
remember(classified.lock, flags, classified.missing, agents);
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
662
|
+
const here = packageVersion();
|
|
663
|
+
const local = refresh.filter((skill) => skill.source === "local");
|
|
664
|
+
const theirs = refresh.filter((skill) => skill.source !== "local");
|
|
665
|
+
const stale = flags.force
|
|
666
|
+
? local
|
|
667
|
+
: local.filter((skill) => (classified.lock.skills[skill.name]?.version ?? "") !== here);
|
|
668
|
+
let copied = 0;
|
|
669
|
+
if (stale.length > 0 || theirs.length > 0) say(dim("Refreshing…"));
|
|
670
|
+
for (const skill of stale) {
|
|
671
|
+
const was = classified.lock.skills[skill.name]?.version || "unknown";
|
|
672
|
+
if (!copyLocalSkill(skill.name, skill.agentsNeed ?? agents, flags.global)) continue;
|
|
673
|
+
copied += 1;
|
|
674
|
+
say(was === here ? ` ${skill.name} ${here}, replaced` : ` ${skill.name} ${was} → ${here}`);
|
|
675
|
+
}
|
|
676
|
+
for (const skill of local) {
|
|
677
|
+
if (stale.includes(skill)) continue;
|
|
678
|
+
say(dim(` ${skill.name} ${here}, already there`));
|
|
679
|
+
}
|
|
680
|
+
if (theirs.length > 0) {
|
|
681
|
+
const args = ["update", ...theirs.map((skill) => skill.name), "-y"];
|
|
622
682
|
if (flags.global) args.push("--global");
|
|
623
683
|
else args.push("--project");
|
|
624
684
|
runSkills(args);
|
|
625
|
-
remember(readLock(flags), flags, refresh, agents);
|
|
626
685
|
}
|
|
686
|
+
if (refresh.length > 0) remember(readLock(flags), flags, refresh, agents);
|
|
627
687
|
writePointers(flags, items);
|
|
628
688
|
const held = flags.force ? classified.theirs.length : classified.theirs.length + classified.edited.length;
|
|
629
689
|
finish([
|
|
630
690
|
green("Done."),
|
|
631
|
-
`${classified.missing.length} installed, ${
|
|
691
|
+
`${classified.missing.length} installed, ${copied + theirs.length} refreshed, ${held} left as they are.`,
|
|
692
|
+
`This is Long Beard ${here}. Run npm install -D @jonandev/longbeard@latest first if a newer one is out.`,
|
|
632
693
|
flags.global ? "Rewrote ~/.longbeard/AGENTS.md." : "Rewrote the AGENTS.md block.",
|
|
633
694
|
]);
|
|
634
695
|
}
|
package/package.json
CHANGED
|
@@ -24,12 +24,12 @@ They asked to **hunt**, **define direction**, or find references → load `desig
|
|
|
24
24
|
|
|
25
25
|
Write or change `DESIGN.md` only when they said yes to persisting the adaptation (after a whole-look leading pick, or after accepting a later hunt). Do not invent hexes, faces, or controls. Do not copy the leading card’s `colour` or `type` into the brand. Take the adaptation from:
|
|
26
26
|
|
|
27
|
-
- `.design/board.md` **Read this** (`take`, `change`, `colour`, `type`, `control`, `leave`), or
|
|
27
|
+
- `.design/board.md` **Read this** (`take`, `change`, `ownable`, `colour`, `type`, `control`, `leave`, `gaps`), or
|
|
28
28
|
- `.design/hunts/<slug>/note.md` when the change is a later pass they accepted
|
|
29
29
|
|
|
30
|
-
`.design/moodboard.html` is the references. Do not read
|
|
30
|
+
`.design/moodboard.html` is the references, and `.design/proof.html` is the adaptation shown with the project’s own words. Do not read either as the brand: the brand is **Read this**.
|
|
31
31
|
|
|
32
|
-
If **Read this** has no `take`, `change`, `colour`, or `type`, stop and send it back to the hunt. Do not fill those in here.
|
|
32
|
+
If **Read this** has no `take`, `change`, `colour`, or `type`, or has no `ownable`, stop and send it back to the hunt. Do not fill those in here.
|
|
33
33
|
|
|
34
34
|
If neither file exists, ask which reference to follow. Do not guess.
|
|
35
35
|
|
|
@@ -46,6 +46,7 @@ Expand the adaptation into a short brand file a builder can follow without the s
|
|
|
46
46
|
- from: .design/board.md | .design/hunts/<slug>/note.md
|
|
47
47
|
- take: <from Read this>
|
|
48
48
|
- change: <the twist>
|
|
49
|
+
- ownable: <the one concrete element from the project’s own identity, from Read this>
|
|
49
50
|
- leave: <their name, their exact colours, their exact faces, and the rest>
|
|
50
51
|
|
|
51
52
|
## Colour
|
|
@@ -63,6 +64,9 @@ Expand the adaptation into a short brand file a builder can follow without the s
|
|
|
63
64
|
## Imagery
|
|
64
65
|
- <what the pictures are, if any>
|
|
65
66
|
|
|
67
|
+
## Gaps
|
|
68
|
+
- <screens with no strong reference, from Read this. A builder treats these as open, not as solved by a borrowed pattern>
|
|
69
|
+
|
|
66
70
|
## Do not
|
|
67
71
|
- <the leave line>
|
|
68
72
|
```
|