sheleg-design-skill 1.62.0 → 1.63.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/CHANGELOG.md CHANGED
@@ -1,3 +1,96 @@
1
+ ## 1.63.0 — the director record is a file with a validator, and a flagship is scored on a rubric that says where it came from
2
+
3
+ The director's output was a prose block at the end of `CREATIVE_DIRECTOR.md`: nothing
4
+ held it, so a brief with no falsifier, a taste of "modern, clean", a fork judged by a
5
+ rubric written afterwards and a `Markers` line nobody ran all passed as a record. The
6
+ plan's pipeline (contracts K3, K6, K7) needs a record the next stage can check, and a
7
+ quality bar for flagship surfaces that is more than the measurable table.
8
+
9
+ - **D3 — `templates/director-record.md` and `npx sheleg-design-skill --check-record
10
+ <file> [--json]`.** A header with `surface_class` (`flagship`, `product`,
11
+ `internal`, `ad`) and sixteen `## <Field>` headings: Brief, Mode, Taste, References,
12
+ Cast, Fork, Rubric, Critique, Markers, Alignment, Quality, Signature, Surfaces,
13
+ Haptics, ADA, Open. A flagship owes all sixteen; a product screen Brief, Mode,
14
+ References, Markers, Open; an internal tool Brief, Mode, Markers, Open; an ad Brief,
15
+ Mode, Taste, References, Markers, Signature, ADA, Open. Each owed field is held to
16
+ its rule: Brief needs Surface, Job, Constraint and Falsifier; Taste needs `Take:` and
17
+ `Ban:` lines with something other than generic words (English and Russian); References
18
+ needs five real-product URLs each with `take:`, or `none found` with `Searched:`;
19
+ `Fork: yes` needs a Rubric section it names, `A:`/`B:` and a `Winner:`; Rubric three
20
+ criteria; Critique region → defect → change triples or `clean render`; Markers a
21
+ `--lint` run with its revision and counts, and no S1; Signature exactly one moment
22
+ with What/Where/Why; ADA the class profile, every G item passing, at most two J FAIL
23
+ on a flagship, no J PASS without a `Labelled set:`, safe zones on an ad. Guidance
24
+ lives in HTML comments, so a copied template fails until it is filled. `Mode:
25
+ declined` with its reason passes on its own. Exit 0 valid, 1 violations as
26
+ `<Field>: <problem>`, 2 usage. `bin/record.js`, Node, no dependencies; its rules
27
+ join `--self-test`. The prose block in `CREATIVE_DIRECTOR.md` is replaced by a
28
+ pointer to both, keeping the doctrine on `Open`.
29
+ - **K6 — `ADA_RUBRIC.md`.** R1–R25, each binary, typed G (a gate no judge outvotes),
30
+ J (a judge on a per-task checklist) or H (the human on the contact sheet), with
31
+ applicability and how to verify (tool → artifact). Profiles: flagship all 25, every
32
+ G PASS and at most two J FAIL with reasons; product the G items R1, R3–R5, R8, R9,
33
+ R12–R17, R19, R20, R22; ad R7, R8, R10, R11, R14, R18, R21, R22 plus safe zones. The
34
+ judge: a checklist per task, pairwise only against an approved reference in both
35
+ orders, three samples, disagreement `uncertain` to the human, J items NOT_ASSESSED
36
+ until a labelled set exists, never above a G-FAIL, and never the agent that
37
+ rendered the surface. Every FAIL is a triple. **The file says plainly that the
38
+ rubric is derived and Apple publishes none**, and cites Apple's award pages with
39
+ the date they were read. Linked from Act 5 and `SKILL.md`.
40
+ - **D4 — the reference sweep is mandatory** for a new design and a redesign of a brand
41
+ or flagship surface (Act 2, `APPLYING.md`, `SKILL.md`), through whichever reference
42
+ servers the session exposes — Refero, Lazyweb, Mobbin where authorized — with an
43
+ empty result recorded as `none found` and where it looked.
44
+ - **First time right**, a new section of `CREATIVE_DIRECTOR.md`: decisions before
45
+ pixels in the record; the forbidden list loaded into context and the linter run;
46
+ one key screen in one state first; feedback only external and specific; a
47
+ re-render budget of one, at most two, then `unresolved` to the person; the
48
+ generator is not the judge.
49
+ - **D5 — `MOTION_DOCTRINE.md` §12, reviewing motion:** a frame strip and a run video,
50
+ timings judged by one `DUR-*` row each, reduced motion turned on and captured again,
51
+ one moment per viewport; `npx hyperframes snapshot` / `compare` as the evidence for a
52
+ rendered file (compare is a review surface, not a gate); `review-animations` by name.
53
+ It feeds the record's Quality and Critique.
54
+ - **D6 — `FIGMA_BRIDGE.md` §3 re-drawn.** "Motion stays in code — Figma has no easing
55
+ variable type" was no longer true: the official Figma plugin (2.2.120) documents
56
+ TIMING and EASING variables, keyframes, animation styles and `get_motion_context`
57
+ snippets. Durations and curves can now be published; motion read back is held to
58
+ the doctrine (Figma's `EASE_IN`, `…_BACK` and `BOUNCY` are banned forms in UI); the
59
+ scroll clock, scrubbed motion and the reduced-motion branch stay in code. Read from
60
+ the plugin's documentation, not confirmed by a call (B-144). New §5: a frame is
61
+ critiqued — `get_screenshot`, the record's rubric, triples, `get_variable_defs` —
62
+ before anyone approves it; and one Figma file per surface (App / Web / ASO). README,
63
+ the Cursor rule and `DESIGN_SYNC_BRIDGE.md` follow.
64
+ - **D10 — the taste profile** is the record's `Taste` field and a guide in the template
65
+ (what we take, what we ban, anti-patterns, the three dials); Act 1 writes it beside
66
+ the brief. A profile of "modern / clean" is empty. A personal profile's content stays
67
+ with its owner.
68
+ - **`MOBILE_SURFACES.md`, the axes matrix:** states × viewport × theme × text size ×
69
+ locale, pairwise coverage plus the mandatory pairs dark × largest text and RTL ×
70
+ narrowest viewport, a capture record per cell, the commands that set each axis; the
71
+ native state matrix is its native case, and a web render still proves no native cell.
72
+ - **D8 — `evals/render/`:** four fixed briefs (landing hero with motion, mobile
73
+ onboarding, product dashboard, paywall) and a runner that counts linter findings by
74
+ severity, validates each director record, and scores the G items source can decide
75
+ (R8, R20, R24), reporting the rest NOT_RUN; `--write` appends a dated row to
76
+ `test/evals/RESULTS.md`, whose new section states the method. The model generation
77
+ step is NOT_RUN in CI; the harness row on the hand-written sample is recorded as
78
+ such (B-142).
79
+ - **B-140 — the kits obey their own floor.** `workbench`'s progress fill slides by a
80
+ translate instead of transitioning `width`, `paperclip`'s lane mark grows by a scale
81
+ instead of `width`/`height`, both rendered before and after with the same geometry;
82
+ `deskmate`'s gradient word carries its waiver and reason. `node bin/cli.js --lint
83
+ kits` runs in `npm test` and in CI: 0 S1.
84
+ - **Provenance:** a new table for sources with no commit to pin — Apple's award pages,
85
+ the judge papers, the Figma plugin's motion skills and the HyperFrames CLI skill,
86
+ each `derived`, dated, with SHA256 where a file was read.
87
+ - **Gates:** `test/record_test.js` (49 cases through the real CLI, every rule watched
88
+ failing on one planted defect before `bin/record.js` existed); `validate_director_record()`
89
+ and `validate_ada_rubric()` with three plants; `test/render_eval_test.js` on the sample.
90
+
91
+ The `SKILL.md` body is 4747/4750 tokens: the new load-on-demand line was paid for by
92
+ tightening the READ FIRST paragraph and the references section.
93
+
1
94
  ## 1.62.0 — a visual floor with reasons and exceptions, and a linter that reads a project against it
2
95
 
3
96
  Generated design kept shipping through reviews that had nothing to point at.
package/README.md CHANGED
@@ -176,6 +176,8 @@ skills.
176
176
  | `SHELEG_DESIGN.md` | The full reference: architecture, layer-by-layer mechanics with code, the exact morph math, the DOM↔WebGL projection bridge, a build-from-scratch recipe, and why each piece works |
177
177
  | `SURFACE_COMPOSITION.md` | Two decisions the pack layer does not make: the six depth layers of a scene, read before writing CSS for a cinematic page; and the handoff to `dataviz`, read before drawing a chart in any pack — token names are not uniform across the thirteen and an undefined custom property fails silently |
178
178
  | `SLOP_MARKERS.md` | The visual floor: 49 markers of generated design (purple gradients, emoji as icons, default faces, the side stripe, the three default looks, banned motion forms…), each with severity, reason, what to do instead and the exception under which it is not slop. Holds with or without a pack; twenty of them are checked by `--lint` |
179
+ | `ADA_RUBRIC.md` | 25 binary checks derived from the Apple Design Awards categories (Apple publishes no rubric; the file says so and cites the pages it read), each typed as a deterministic gate, a judged item or a human one, with profiles for flagship, product and ad surfaces and the rules that keep a model judge honest |
180
+ | `templates/director-record.md` | The director record: one `## <Field>` per decision — brief, taste, references, fork and rubric, critique, markers, signature moment, ADA verdict, what is left open — filled before the first render and checked by `--check-record` |
179
181
  | `MOTION_DOCTRINE.md` | Whether to animate at all, before how: the frequency table that kills motion on high-repetition paths, the easing tree and the `ease-in` ban, the duration ceiling, the forbidden forms, and the reduced-motion contract. `SKILL.md` marks it required before any animation |
180
182
  | `MOTION_PRODUCTION.md` | What changes when motion leaves the page as a file: the four things a rendered asset gives up, the two programmatic-video tools measured side by side with the licence threshold and the pre-1.0 risk stated, which one this library recommends and the three conditions that reverse it, how a pack's token layer crosses the render seam, and where the reduced-motion obligation lands once there is no user to read a media query |
181
183
  | `DESIGN_SYNC_BRIDGE.md` | The Claude Design contract: what a pack sends to claude.ai/design and in what shape, the rule for each of the four reference types, and the border motion does not cross |
@@ -208,6 +210,25 @@ reason is required. `--self-test` plants a defect for every rule. It is a patter
208
210
  reader, not a renderer: the catalogue's `review` rows stay with the render
209
211
  critique.
210
212
 
213
+ ### Check a director record
214
+
215
+ ```bash
216
+ npx sheleg-design-skill --check-record docs/design/pricing/director-record.md
217
+ npx sheleg-design-skill --check-record docs/design/pricing/director-record.md --json
218
+ ```
219
+
220
+ A design's decisions live in a record before the first pixel: a header with
221
+ `surface_class` (`flagship`, `product`, `internal` or `ad`) and one `## <Field>`
222
+ per decision, from the template in the installed skill. The class decides which
223
+ fields are owed — a flagship all sixteen, a product screen Brief, Mode,
224
+ References, Markers and Open — and each owed field is held to its rule, not just
225
+ its presence: a taste profile of "modern, clean" is empty, five references on
226
+ placeholder hosts are none, `Fork: yes` with no rubric compared nothing,
227
+ `Markers` must cite a `--lint` run with its revision and counts, and a flagship's
228
+ ADA verdict fails on any G item. A refusal is a record too: `Mode: declined` with
229
+ its reason passes. Exit 0 valid, 1 with each violation as `<Field>: <problem>`,
230
+ 2 a usage error.
231
+
211
232
  ## What you get out of it
212
233
 
213
234
  - **A motion methodology, not a component dump.** Scroll-linked animation,
@@ -255,9 +276,10 @@ values *onto* the pack's tokens instead of inlining hexes.
255
276
  The bridge is specific because the traps are: `workbench`'s light and dark are
256
277
  two **modes of one collection**, while `editorial-luxury`'s espresso sections
257
278
  are surfaces and not a mode at all; Figma colors are 0..1 floats, not hex; and
258
- motion never crosses — Figma has no easing variable type, so the ease, durations
259
- and stagger stay code-only, and shadows are effect styles whose parts bind to
260
- variables. A value in a file with no matching token is either a gap in the pack
279
+ motion crosses only in part — durations and curves publish as Figma's TIMING and
280
+ EASING variables, but the scroll clock, scrubbed motion and the reduced-motion branch
281
+ stay code-only, and motion read back from a file is held to the doctrine — and
282
+ shadows are effect styles whose parts bind to variables. A value in a file with no matching token is either a gap in the pack
261
283
  or drift in the file — the one thing it is never is a literal in a component.
262
284
 
263
285
  ## Claude Design, in one direction
@@ -283,18 +305,22 @@ stops an agent inventing motion to fill the silence.
283
305
  The kits are not part of the install. `--kit` fetches one on demand, which is how
284
306
  the skill stays documentation while still having real components to hand.
285
307
 
286
- ## Optional: Lazyweb MCP
308
+ ## Reference sweeps (Refero, Lazyweb, Mobbin)
287
309
 
288
310
  A style pack locks *how it looks*. It says nothing about what a good version of
289
- the screen you're about to build actually **contains**. If the
290
- [Lazyweb](https://www.lazyweb.com) MCP server is connected, the skill sweeps
291
- real-world references for the target screen (signup, onboarding, paywall,
292
- pricing, checkout, dashboard, settings) before laying anything out.
311
+ the screen you're about to build actually **contains**. For a new design or a
312
+ redesign of a brand or flagship surface the sweep is not optional: through
313
+ whichever reference servers are connected — Refero, [Lazyweb](https://www.lazyweb.com),
314
+ Mobbin where the account is authorized — the skill looks at five or more shipped
315
+ products for the target screen (signup, onboarding, paywall, pricing, checkout,
316
+ dashboard, settings) before laying anything out, and records what it takes from
317
+ each. An empty sweep is recorded as `none found` with where it looked.
293
318
 
294
319
  The division of labor keeps the result one system: references inform **layout,
295
320
  hierarchy and content order**; palette, type and motion stay the pack's. Setup
296
321
  is a Streamable HTTP MCP server plus a per-user token — keep it out of your
297
- repo. Entirely optional; without it the skill works from the pack alone.
322
+ repo. Without any reference server the sweep runs on the open web, and the
323
+ record says the servers were absent.
298
324
 
299
325
  ## Development
300
326
 
@@ -317,6 +343,9 @@ third of the contract:
317
343
  | `node --check bin/cli.js` | the installer parses |
318
344
  | `node test/installer_test.js` | both installers against throwaway HOMEs, above all the refusal to shadow an installed plugin |
319
345
  | `node test/lint_test.js` | the project linter end to end: every S1 rule blocks on its plant, every quiet case stays quiet, the ratchet and the exit contract; `--self-test` checks the catalogue against the rules |
346
+ | `node test/record_test.js` | the director-record validator end to end: a valid record for every surface class and a declined one pass; one planted defect per rule fails, each on its own field |
347
+ | `node test/render_eval_test.js` | the render eval runner (`evals/render/`) on the committed hand-written sample: every count it must report |
348
+ | `node bin/cli.js --lint kits` | the reference kits obey the floor they ship with: no S1 marker in any kit |
320
349
 
321
350
  Each gate ships a `--self-test` that plants a defect it must catch (`npm run
322
351
  selftest`), rejects an unknown argument instead of silently running the normal
package/bin/cli.js CHANGED
@@ -160,6 +160,7 @@ function parseArgs(argv) {
160
160
  ratchet: null, // --ratchet <budget.json>: per-file budgets that only fall
161
161
  includeTests: false, // --include-tests: lint test files and fixtures too
162
162
  selfTest: false, // --self-test: every lint rule against its planted defect
163
+ checkRecord: null, // --check-record <file>: validate a director record (bin/record.js)
163
164
  error: null, // set → print help and exit non-zero
164
165
  };
165
166
  const seen = [];
@@ -205,6 +206,10 @@ function parseArgs(argv) {
205
206
  const value = a === "--ratchet" ? argv[++i] : a.slice("--ratchet=".length);
206
207
  if (!value || value.startsWith("-")) opts.error = "--ratchet needs a budget file";
207
208
  else opts.ratchet = value;
209
+ } else if (a === "--check-record" || a.startsWith("--check-record=")) {
210
+ const value = a === "--check-record" ? argv[++i] : a.slice("--check-record=".length);
211
+ if (!value || value.startsWith("-")) opts.error = "--check-record needs a director-record file";
212
+ else opts.checkRecord = value;
208
213
  } else if (a === "--json") opts.json = true;
209
214
  else if (a === "--include-tests") opts.includeTests = true;
210
215
  else if (a === "--self-test") opts.selfTest = true;
@@ -221,6 +226,16 @@ function parseArgs(argv) {
221
226
  opts.error = "--self-test runs on its own";
222
227
  return opts;
223
228
  }
229
+ // The record validator reads one file and writes nothing; --json is the only
230
+ // flag it takes, and it does not run beside the linter or an install.
231
+ if (opts.checkRecord) {
232
+ const other = seen.find((x) => x !== "--check-record" && x !== "--json");
233
+ if (other) {
234
+ opts.error = `--check-record reads one record and takes only --json — ${other} does not combine with it`;
235
+ return opts;
236
+ }
237
+ return opts;
238
+ }
224
239
  if (!opts.lint && seen.some((x) => LINT_ONLY.includes(x))) {
225
240
  opts.error = `${seen.find((x) => LINT_ONLY.includes(x))} is only meaningful with --lint <dir>`;
226
241
  return opts;
@@ -328,11 +343,20 @@ ${c("bold", "Project linter")}
328
343
  also counts raw palette classes and hex outside tokens
329
344
  --include-tests Read tests and fixtures too (skipped by default)
330
345
  --self-test Every rule against its planted defect, and the
331
- catalogue against the rules
346
+ catalogue against the rules (the record rules too)
332
347
 
333
348
  Exit: 0 no S1 finding, 1 an S1 finding or a file over budget, 2 usage error.
334
349
  S2 and S3 findings print and do not change the exit code.
335
350
 
351
+ ${c("bold", "Director record")}
352
+ --check-record <file> Validate a director record (templates/director-record.md
353
+ in the installed skill): the fields its surface_class
354
+ owes are present and filled by their rules
355
+ --json The verdict as {valid, surface_class, violations[]}
356
+
357
+ Exit: 0 valid (a declined record with its reason included), 1 violations,
358
+ each listed as <Field>: <problem>, 2 usage error.
359
+
336
360
  ${c("bold", "Default")}
337
361
  Auto-detects: uses .cursor/ if present, else .claude/ if present,
338
362
  otherwise creates .cursor/skills/${SKILL_SLUG}/.
@@ -589,15 +613,28 @@ function main() {
589
613
  return;
590
614
  }
591
615
 
616
+ if (opts.checkRecord) {
617
+ const record = require("./record.js");
618
+ const io = { out: (l) => console.log(l), err: (l) => console.error(l) };
619
+ process.exitCode = record.runCheckRecord({ file: opts.checkRecord, json: opts.json }, io);
620
+ return;
621
+ }
622
+
592
623
  if (opts.selfTest || opts.lint) {
593
624
  const lint = require("./lint.js");
594
625
  const io = { out: (l) => console.log(l), err: (l) => console.error(l) };
595
- process.exitCode = opts.selfTest
596
- ? lint.selfTest(io.out)
597
- : lint.runLint(
598
- { dir: opts.lint, json: opts.json, ratchet: opts.ratchet, includeTests: opts.includeTests },
599
- io,
600
- );
626
+ if (opts.selfTest) {
627
+ // Both validators answer for themselves; either failing fails the run.
628
+ const record = require("./record.js");
629
+ const a = lint.selfTest(io.out);
630
+ const b = record.selfTest(io.out);
631
+ process.exitCode = a || b ? 1 : 0;
632
+ } else {
633
+ process.exitCode = lint.runLint(
634
+ { dir: opts.lint, json: opts.json, ratchet: opts.ratchet, includeTests: opts.includeTests },
635
+ io,
636
+ );
637
+ }
601
638
  return;
602
639
  }
603
640