@ericrisco/rsc 3.1.3 → 3.3.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.
Files changed (105) hide show
  1. package/README.md +8 -6
  2. package/manifest.json +43 -69
  3. package/package.json +6 -1
  4. package/scripts/design-upstream.js +92 -0
  5. package/scripts/doctor.js +0 -24
  6. package/scripts/lib/default-skill-floor.js +5 -1
  7. package/scripts/lib/domains.js +2 -2
  8. package/scripts/lib/recommend.js +1 -3
  9. package/scripts/lib/retired-skills.js +7 -1
  10. package/skills/ai-media/SKILL.md +2 -2
  11. package/skills/design/IMPECCABLE-LICENSE.txt +191 -0
  12. package/skills/design/SKILL.md +79 -328
  13. package/skills/design/THIRD_PARTY.md +26 -0
  14. package/skills/design/engine/LICENSE +21 -0
  15. package/skills/design/engine/RUN.md +515 -0
  16. package/skills/design/engine/UPSTREAM.json +4 -0
  17. package/skills/design/engine/assets/app.css +216 -0
  18. package/skills/design/engine/assets/base.css +105 -0
  19. package/skills/design/engine/assets/base.js +37 -0
  20. package/skills/design/engine/assets/charts.js +617 -0
  21. package/skills/design/engine/assets/scenes/stage.css +28 -0
  22. package/skills/design/engine/assets/scenes/stage.js +133 -0
  23. package/skills/design/engine/library/app.json +1327 -0
  24. package/skills/design/engine/library/directions.json +1078 -0
  25. package/skills/design/engine/library/heroes.json +1086 -0
  26. package/skills/design/engine/library/motions.json +92 -0
  27. package/skills/design/engine/library/palettes.json +1485 -0
  28. package/skills/design/engine/library/photos.json +7240 -0
  29. package/skills/design/engine/library/sections.json +4429 -0
  30. package/skills/design/engine/library/sites.json +8350 -0
  31. package/skills/design/engine/library/type.json +2024 -0
  32. package/skills/design/engine/references/app-screens.md +1199 -0
  33. package/skills/design/engine/references/colour.md +141 -0
  34. package/skills/design/engine/references/copy.md +177 -0
  35. package/skills/design/engine/references/critique.md +182 -0
  36. package/skills/design/engine/references/imagery.md +791 -0
  37. package/skills/design/engine/references/layout.md +292 -0
  38. package/skills/design/engine/references/motion.md +980 -0
  39. package/skills/design/engine/references/research.md +356 -0
  40. package/skills/design/engine/references/scenes.md +174 -0
  41. package/skills/design/engine/references/tells.md +115 -0
  42. package/skills/design/engine/references/type.md +170 -0
  43. package/skills/design/engine/scripts/assets.mjs +865 -0
  44. package/skills/design/engine/scripts/draw.mjs +584 -0
  45. package/skills/design/engine/scripts/inspect.mjs +303 -0
  46. package/skills/design/engine/scripts/lib/app-draw.mjs +203 -0
  47. package/skills/design/engine/scripts/lib/cdp.mjs +248 -0
  48. package/skills/design/engine/scripts/lib/probe.mjs +909 -0
  49. package/skills/design/engine/scripts/lib/rules.mjs +243 -0
  50. package/skills/design/engine/scripts/lint.mjs +119 -0
  51. package/skills/design/engine/scripts/scenes.mjs +124 -0
  52. package/skills/design/evals/cases.yaml +35 -46
  53. package/skills/design/references/design-md.md +49 -0
  54. package/skills/design/references/finish-review.md +46 -0
  55. package/skills/design/references/modes.md +51 -0
  56. package/skills/expo/SKILL.md +3 -4
  57. package/skills/marketing/references/landing-copy.md +2 -2
  58. package/skills/react/SKILL.md +2 -2
  59. package/skills/react-native/SKILL.md +3 -3
  60. package/skills/scroll-film/SKILL.md +220 -0
  61. package/skills/scroll-film/assets/page-template.html +128 -0
  62. package/skills/scroll-film/assets/scrub-engine.js +352 -0
  63. package/skills/scroll-film/evals/README.md +26 -0
  64. package/skills/scroll-film/evals/cases.yaml +81 -0
  65. package/skills/scroll-film/references/chain.md +218 -0
  66. package/skills/scroll-film/references/engine.md +132 -0
  67. package/skills/scroll-film/scripts/verify.sh +158 -0
  68. package/skills/swift-ios/SKILL.md +1 -1
  69. package/skills/ui-engineering/SKILL.md +3 -4
  70. package/skills/ui-engineering/evals/cases.yaml +2 -2
  71. package/skills/variant-explorer/SKILL.md +4 -4
  72. package/skills/variant-explorer/evals/cases.yaml +1 -1
  73. package/targets/clone-bootstrap.mjs +1 -1
  74. package/scripts/lib/design-identity.js +0 -117
  75. package/scripts/lib/starting-point.js +0 -314
  76. package/skills/design/evals/README.md +0 -53
  77. package/skills/design/references/ai-tells.md +0 -75
  78. package/skills/design/references/brand-grounding.md +0 -197
  79. package/skills/design/references/copywriting-frameworks.md +0 -138
  80. package/skills/design/references/design-systems.md +0 -49
  81. package/skills/design/references/inspiration-sources.md +0 -96
  82. package/skills/design/references/landing-anatomy-and-cro.md +0 -202
  83. package/skills/design/references/motion-and-interaction.md +0 -228
  84. package/skills/design/references/research-method.md +0 -154
  85. package/skills/design/references/signature-and-craft.md +0 -148
  86. package/skills/design/references/starting-point.md +0 -75
  87. package/skills/design/references/trends-2026.md +0 -80
  88. package/skills/design/references/visual-system.md +0 -237
  89. package/skills/design/scripts/verify.sh +0 -357
  90. package/skills/design-dna/PROMPT.md +0 -211
  91. package/skills/design-dna/SKILL.md +0 -162
  92. package/skills/design-dna/design-dna.schema.json +0 -230
  93. package/skills/design-dna/evals/README.md +0 -64
  94. package/skills/design-dna/evals/cases.yaml +0 -68
  95. package/skills/design-dna/references/method.md +0 -436
  96. package/skills/design-dna/scripts/emit.py +0 -164
  97. package/skills/design-dna/templates/PROMPT.md.tmpl +0 -42
  98. package/skills/design-dna/templates/SKILL.md.tmpl +0 -42
  99. package/skills/design-dna/templates/check.py.tmpl +0 -143
  100. package/skills/design-loop/SKILL.md +0 -160
  101. package/skills/design-loop/evals/README.md +0 -56
  102. package/skills/design-loop/evals/cases.yaml +0 -60
  103. package/skills/motion-craft/SKILL.md +0 -125
  104. package/skills/motion-craft/evals/cases.yaml +0 -38
  105. package/skills/motion-craft/scripts/verify.sh +0 -75
@@ -1,162 +0,0 @@
1
- ---
2
- name: design-dna
3
- description: "Use when a design has won and its look must survive: codify it into a permanent style skill with measured ratios, bans and tests that can fail, then build new pieces in that exact look. Fires on 'turn this into a skill', 'keep the same style', 'my output drifted'. NOT finding the winner (that is `design-loop`), NOT the words (that is `marketing`)."
4
- tags: [design, style, dna, codify, skill-factory, consistency]
5
- recommends: [design-loop, design, nextjs, marketing]
6
- origin: risco
7
- ---
8
-
9
- # Design DNA - one beautiful design into a permanent skill
10
-
11
- *A design loop finds you one beautiful thing. This turns that one thing into a skill you keep forever, so you can make more of it, in any format, without the look drifting.*
12
-
13
- **Not only about "designs".** The subject is anything that got built: a website, a landing page, a poster, a motion graphic, a carousel, a deck. Same system, same file, same tests. The format is an output, not the subject.
14
-
15
- ## The problem this solves
16
-
17
- Nobody wrote down **why** the winner was beautiful. Next time you ask for "the same style" you get something close, then something a bit off, then something generic. Every rule you do not write down, the model has to guess, and it does not guess randomly: it guesses the average of everything it has ever seen. That average is what people call slop. Slop is the sound of an unwritten rule.
18
-
19
- ## Two modes
20
-
21
- | You say | Mode | What happens |
22
- |---|---|---|
23
- | "codify this", "turn this into a skill", here is the winner | **CAPTURE** | Run the seven steps below. Output: a new style skill folder. |
24
- | "build X in <style>", "another one like the last", `/<slug>` | **REUSE** | Load that style's `PROMPT.md` only, build, then run its self-check before returning. |
25
-
26
- If a `dna.json` already exists for the style named, you are in REUSE. Never re-derive a style that has a record.
27
-
28
- To find out which records exist — in either scope, without guessing at paths — run
29
- `npx @ericrisco/rsc doctor --json` and read `designStartingPoint`. A record it reports as `unreadable`
30
- is **not** a record you can reuse: say what is missing, do not use half of one.
31
-
32
- ## Hard rules (these are the skill)
33
-
34
- 1. **A specification that cannot fail is not a specification.** If every rule you wrote is one a bad output could still satisfy, you wrote a mood board.
35
- 2. **Compile, do not paste.** Two files, always. `dna.json` is the record, any size, and it **never** enters a prompt. `PROMPT.md` is the payload, **hard cap 2KB**, and it is the only thing that does.
36
- 3. **Always attach the reference image.** Highest-leverage move available and close to free: image conditioning runs on its own pathway, so it does not eat the attention your words are competing for.
37
- 4. **Ratios, not values.** "The headline is 96px" is nearly worthless. "The headline is 8x the body, never under 6x" is the identity.
38
- 5. **Coverage, not just colour.** The same three hex codes at 60/30/10 and at 90/8/2 are two unrelated designs.
39
- 6. **Percentages, not pixels,** in everything spatial. One spec has to drive a 1080x1350 carousel and a 1920x1080 slide with no rewrite.
40
- 7. **When output looks generic, add a ban, not a rule.** A positive instruction is one weak vote against a landslide; "never centre the hero" deletes the landslide from the options. Bans should outnumber positive style rules.
41
- 8. **One skill per style.** Never merge two identities into one spec. The average of two good designs is a bad design.
42
- 9. **Reproduce the system, never the marks.** Real logos, wordmarks, licensed photographs and proprietary typefaces go in `meta.not_copied` with a named substitute.
43
- 10. **Step 5 is not optional.** A spec that has never been used to rebuild its own source has never been tested.
44
-
45
- ## CAPTURE - the seven steps
46
-
47
- Run `PROMPT.md` as written. It is the operative artefact and it is self-contained; this section is the map, not a second copy of it.
48
-
49
- | Step | Name | Non-negotiable output |
50
- |---|---|---|
51
- | 1 | **Observe** | Flat inventory of literal measurements. Sampled hexes, coverage estimates, type counts, largest-to-smallest ratio, margins as percentages, texture, and **what is absent**. No judgements: interpreting here is how you end up specifying a design that is not the one in front of you. |
52
- | 2 | **Debate** | Loop A argues exhaustive, Loop B argues nine moves and a wall of refusals, then adjudicate each property with one question: *if I changed this value, would it stop looking like the reference?* Yes is load-bearing, no is trivia, and trivia dilutes attention. Resolve it by splitting documents, not by compromising. |
53
- | 3 | **Codify** | `dna.json` against `design-dna.schema.json`. Descriptive colour names ("dusty plum", never "accent-500": image and video models cannot read token names). Every family gets a fallback. |
54
- | 4 | **Tests that can fail** | 8 to 12, binary and measurable, each marked auto or human. |
55
- | 5 | **Reconstruct and diff** | Close the reference. Rebuild it from `dna.json` alone. Put them side by side and list **every** difference: each one is a field the spec forgot. Fold them in, record them in `reconstruction.gaps_found`, go again. Expect two or three passes, and expect the gaps to be things you were sure were obvious. |
56
- | 6 | **Emit the skill** | The folder below. |
57
- | 7 | **Declare uncertainty** | Every value inferred rather than measured, and every rule under 70% confidence, into `meta.confidence_notes`. That is where the style drifts first. |
58
-
59
- ### What gets emitted
60
-
61
- ~/.claude/skills/<slug>/
62
- SKILL.md how to use this style, and when not to
63
- PROMPT.md the 2KB payload. THIS is what enters a context window
64
- dna.json the full record. NEVER pasted into a prompt
65
- design-dna.schema.json -> validated against the parent copy
66
- reference/ the original, kept forever
67
- example/ one worked output, the canonical proof
68
- scripts/check.py the auto tests, exits non-zero on failure
69
-
70
- ### The record is the harness's design identity
71
-
72
- The folder above makes the style **reusable**. Writing the record into the harness is what makes it
73
- **this project's identity** rather than a loose folder in a global directory:
74
-
75
- - Write the record as an article under `02-DOCS/wiki/brand/`, beside the brand study, and link it
76
- from `02-DOCS/wiki/index.md` and the root `CLAUDE.md` `## Brand & voice` section — the same
77
- convention `design` follows, and the same place `marketing`, `presentations`, `brand-voice` and
78
- `content-engine` already read.
79
- - **It does not replace the brand study.** The study is the judgement and the direction — why this
80
- identity, what it refuses. The record is the measurable contract that can fail a test. They share
81
- only a few fields; each carries what the other cannot.
82
- - **One harness, one design identity.** If a second appears, name the conflict. The average of two
83
- good designs is a bad design.
84
- - A style captured before this convention still works from its folder. To bring it into the harness,
85
- write its record as the article above; nothing needs re-deriving.
86
-
87
- `rsc doctor` reports whether this harness has an identity, so the rule is not just prose.
88
-
89
- Scaffold from `templates/` and validate before you claim it works:
90
-
91
- python3 ~/.claude/skills/design-dna/scripts/emit.py <slug> # scaffold + validate
92
- python3 ~/.claude/skills/<slug>/scripts/check.py <output-file> # run the auto tests
93
-
94
- ### PROMPT.md ordering is fixed
95
-
96
- Attention is strongest at the two ends and weakest in the middle, so the order is a mechanism, not a style choice:
97
-
98
- 1. The reference image, attached and named first
99
- 2. `soul.one_line`
100
- 3. The weird move, alone, unmissable
101
- 4. The 3-9 signature moves, as ratios
102
- 5. The bans, as absolutes
103
- 6. Palette and type: roles and coverage only, never a full ramp
104
- 7. Archetype names and when to use each
105
- 8. The self-check, last
106
-
107
- Nothing else. If it does not change what the output looks like from three metres away, it belongs in `dna.json`. To add a tenth signature you must delete one.
108
-
109
- Last line of every `PROMPT.md`, verbatim:
110
-
111
- > Before returning any output, run every test in the self-check. Name each test and its result. If any fails, repair the output and run them again. Never return output with a failing test and a note explaining it away.
112
-
113
- ## REUSE - building with a captured style
114
-
115
- 1. Load **only** that style's `PROMPT.md`. Attach `reference/`. Do not read `dna.json` into context; read it only to answer a specific measured question or to regenerate the payload.
116
- 2. Pick an archetype by name before writing anything. Structure first: unnamed layouts are why piece 8 does not sit beside piece 1 as a set.
117
- 3. Build. For web, hand the build to `../nextjs/SKILL.md` and the words to `../marketing/SKILL.md`; the identity stays here.
118
- 4. Run the self-check, name each test and its result, repair and re-run on any failure.
119
- 5. If output drifts, do not add a rule. Consult the table below.
120
-
121
- ## When it goes wrong
122
-
123
- | What you see | Cause | Fix |
124
- |---|---|---|
125
- | Matches every value, still looks generic | Signature moves missing, or too many | Cut to 3-9, rewrite each as a ratio |
126
- | Drifts back to the stock AI look | Not enough bans | Bans should outnumber positive style rules |
127
- | Piece 1 and piece 8 do not match | No named layouts | Add archetypes |
128
- | The accent reads as a theme, not an accent | No coverage percentages | Add them |
129
- | Works on a slide, breaks on a carousel | Pixel values in the spacing | Convert to percentages |
130
- | Obeys some rules, ignores others, differently each run | Payload over the cap | Cut to 2KB |
131
- | Your best rule keeps getting ignored | It is buried in the middle | Move it to the top or the bottom |
132
- | Fine, but forgettable | No weird move | Find the one break in the system |
133
- | Spec feels complete, output is wrong | You skipped Step 5 | Rebuild the original from the spec. Compare. |
134
-
135
- ## Styles captured so far
136
-
137
- | Style | Reads as | Weird move |
138
- |---|---|---|
139
- | `../cold-press/SKILL.md` | newsprint editorial, serif at 8x, one vermilion | section numeral clipped by the right edge |
140
- | `../night-shift/SKILL.md` | near-black instrument panel, one phosphor green | status ribbon severed mid-word by the right edge |
141
- | `../soft-optics/SKILL.md` | warm paper, lowercase display at 6x, one olive | display line crossing a tinted plate's bottom edge |
142
-
143
- Each is a finished skill: reference, `dna.json`, a capped payload, a worked proof, and tests that exit non-zero. Never merge two of them: the average of two good designs is a bad design.
144
-
145
- ## Hand-offs
146
-
147
- - **No winner yet, no reference to measure** -> `../design-loop/SKILL.md` first: it takes a real reference and converges on a piece that beats it. Come back with the winner. Capturing an average of several candidates produces the average, which is the thing you are trying to escape.
148
- - **The words on the page** -> `../marketing/SKILL.md`. `voice` in `dna.json` constrains them; it does not write them.
149
- - **The build** -> `../nextjs/SKILL.md` (App Router, React 19) or `../react/SKILL.md` (Vite SPA).
150
- - **SDD gate.** Capturing a style writes a skill, not product code, so it needs no spec. The moment its output becomes a new feature or a non-trivial behaviour change in a real app, `../specify/SKILL.md` runs first.
151
-
152
- ## Files
153
-
154
- | File | What it is |
155
- |---|---|
156
- | `PROMPT.md` | The standalone prompt. Paste anywhere, attach the design, done. |
157
- | `design-dna.schema.json` | Every field of `dna.json`, explained. |
158
- | `scripts/emit.py` | Scaffolds and validates an emitted style skill. |
159
- | `templates/` | `SKILL.md`, `PROMPT.md` and `check.py` skeletons for the emitted skill. |
160
- | `references/method.md` | The full method and the research each decision traces to. Read once, not per run. |
161
-
162
- **Why any of this works** is not opinion: lost-in-the-middle recovery, instruction-compliance decay under constraint count, style being formally the correlation between features rather than the features, and decoupled image cross-attention. The citations are in `references/method.md`.
@@ -1,230 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "Design DNA",
4
- "description": "The exhaustive record of one visual identity. Written for you and for build tools, never pasted into a prompt. The prompt payload is compiled from this file into PROMPT.md under a 2KB cap.",
5
- "type": "object",
6
- "required": ["meta", "soul", "palette", "type", "space", "signatures", "weird_move", "bans", "tests", "reconstruction"],
7
- "additionalProperties": false,
8
- "properties": {
9
- "meta": {
10
- "type": "object",
11
- "description": "Provenance. What this is, where it came from, and what must never be reproduced.",
12
- "required": ["name", "slug", "source", "captured", "not_copied", "medium_of_origin"],
13
- "properties": {
14
- "name": { "type": "string", "description": "Human name of the style, e.g. 'Cold Press Editorial'." },
15
- "slug": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "description": "kebab-case. Becomes the emitted skill folder name and its slash command." },
16
- "source": { "type": "array", "items": { "type": "string" }, "description": "Paths or URLs of the reference artefacts this was measured from." },
17
- "captured": { "type": "string", "description": "ISO date the capture was made. Styles age; a dated record tells you when to re-measure." },
18
- "not_copied": { "type": "array", "items": { "type": "string" }, "description": "Real logos, wordmarks, licensed photographs, proprietary typefaces. Reproduce the SYSTEM, never the MARKS. Name the substitute used for each." },
19
- "medium_of_origin": { "type": "string", "description": "What the reference actually was: website, poster, carousel, deck, motion graphic. The format is an output, not the subject." },
20
- "confidence_notes": { "type": "array", "items": { "type": "string" }, "description": "Step 7 output: every value inferred rather than measured, and every rule under 70% confidence. This is where the style drifts first." }
21
- }
22
- },
23
- "soul": {
24
- "type": "object",
25
- "description": "The compression key. Read this alone and you are most of the way there.",
26
- "required": ["one_line", "adjectives", "lineage", "read_distance", "energy"],
27
- "properties": {
28
- "one_line": { "type": "string", "maxLength": 160, "description": "Max 160 chars. Concrete nouns only. No marketing words, no 'premium', no 'clean'." },
29
- "adjectives": { "type": "array", "minItems": 3, "maxItems": 5, "items": { "type": "string" } },
30
- "lineage": { "type": "string", "description": "The family tree: Swiss editorial, 90s rave flyer, brutalist web, Memphis, ECM sleeve." },
31
- "read_distance": { "enum": ["thumb", "arms-length", "desk", "room", "street"], "description": "How far away it is read from. This sets the minimum type size, so it is a functional field, not a poetic one." },
32
- "energy": {
33
- "type": "object",
34
- "description": "Each 1-10. A fingerprint that catches drift no single value does.",
35
- "required": ["density", "variance", "contrast", "warmth"],
36
- "properties": {
37
- "density": { "type": "integer", "minimum": 1, "maximum": 10, "description": "How much of the canvas is occupied." },
38
- "variance": { "type": "integer", "minimum": 1, "maximum": 10, "description": "How much elements differ from each other. Low = systematic, high = collaged." },
39
- "contrast": { "type": "integer", "minimum": 1, "maximum": 10 },
40
- "warmth": { "type": "integer", "minimum": 1, "maximum": 10 }
41
- }
42
- }
43
- }
44
- },
45
- "palette": {
46
- "type": "object",
47
- "description": "Colour AND its proportions. The same three hex codes at 60/30/10 and at 90/8/2 are two unrelated designs.",
48
- "required": ["colors", "coverage", "banned"],
49
- "properties": {
50
- "colors": {
51
- "type": "array",
52
- "minItems": 2,
53
- "items": {
54
- "type": "object",
55
- "required": ["role", "hex", "name"],
56
- "properties": {
57
- "role": { "type": "string", "description": "ground, ink, accent, secondary, hairline." },
58
- "hex": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$", "description": "Sampled, never guessed." },
59
- "name": { "type": "string", "description": "Descriptive, not systematic. 'dusty plum' travels to an image model; 'accent-500' does not." }
60
- }
61
- }
62
- },
63
- "coverage": { "type": "object", "description": "Percentage of canvas per role, summing to roughly 100. The most-skipped and most-decisive field in the whole document.", "additionalProperties": { "type": "number" } },
64
- "mode": { "type": "string", "description": "light, dark, or duotone-on-stock." },
65
- "banned": { "type": "array", "items": { "type": "string" }, "description": "Colour behaviours forbidden: gradients, two accents in one frame, pure #000000." }
66
- }
67
- },
68
- "type": {
69
- "type": "object",
70
- "description": "Families, and above all the ratio between them. 8-to-1 and 2-to-1 are different designs with identical fonts.",
71
- "required": ["families", "scale", "treatment"],
72
- "properties": {
73
- "families": {
74
- "type": "array",
75
- "items": {
76
- "type": "object",
77
- "required": ["role", "family", "fallback"],
78
- "properties": {
79
- "role": { "enum": ["display", "body", "mono", "caption", "ui"] },
80
- "family": { "type": "string" },
81
- "fallback": { "type": "string", "description": "REQUIRED. Silent Arial substitution is the most common way a reproduction dies quietly." },
82
- "weights": { "type": "array", "items": { "type": "integer" } },
83
- "licence_risk": { "type": "string", "description": "free / webfont-ok / proprietary-substitute-needed." }
84
- }
85
- }
86
- },
87
- "scale": {
88
- "type": "object",
89
- "required": ["display_to_body_ratio", "max_sizes_per_frame"],
90
- "properties": {
91
- "display_to_body_ratio": { "type": "number", "description": "The typographic signature. Record it as a floor too ('8x, never under 6x')." },
92
- "ratio_floor": { "type": "number" },
93
- "steps": { "type": "array", "items": { "type": "number" }, "description": "Relative steps, not pixels." },
94
- "max_sizes_per_frame": { "type": "integer", "description": "Usually 2 or 3. A testable ceiling." }
95
- }
96
- },
97
- "treatment": {
98
- "type": "object",
99
- "properties": {
100
- "display_tracking": { "type": "string", "description": "e.g. '-0.03em'." },
101
- "body_leading": { "type": "string", "description": "As a multiple of size." },
102
- "case": { "type": "string" },
103
- "measure": { "type": "string", "description": "Characters per line. Under 65 for body is the usual bound." },
104
- "numerals": { "type": "string", "description": "lining / oldstyle / tabular." }
105
- }
106
- }
107
- }
108
- },
109
- "space": {
110
- "type": "object",
111
- "description": "USE PERCENTAGES. One spec must drive a 1080x1350 carousel and a 1920x1080 slide without a rewrite. Pixel values here are the reason a spec works on a slide and breaks on a carousel.",
112
- "required": ["grid", "margin_pct", "alignment", "negative_space"],
113
- "properties": {
114
- "grid": { "type": "string" },
115
- "margin_pct": { "type": "number" },
116
- "gutter_pct": { "type": "number" },
117
- "alignment": { "type": "string", "description": "Where things line up, and what is deliberately never centred." },
118
- "rhythm": { "type": "string", "description": "The spacing progression, e.g. 'x1.5 geometric off a 8px base'." },
119
- "negative_space": { "type": "string", "description": "Where the emptiness is and how big. Emptiness is a placed element, not leftover." },
120
- "safe_area": { "type": "object", "description": "Per platform, in percentages.", "additionalProperties": { "type": "string" } }
121
- }
122
- },
123
- "surface": {
124
- "type": "object",
125
- "description": "What the thing is physically made of.",
126
- "properties": {
127
- "texture": { "type": "object", "properties": { "kind": { "type": "string" }, "opacity": { "type": "number" }, "scale": { "type": "string" }, "stacking_order": { "type": "string" } } },
128
- "edges": { "type": "string", "description": "Radii, hairline weights, whether anything bleeds off canvas." },
129
- "elevation": { "type": "string", "description": "Often the honest answer is 'none'. Record the absence." },
130
- "imagery": { "type": "string", "description": "Treatment: duotone, grain, crop discipline, subject distance." },
131
- "iconography": { "type": "string", "description": "Or the absence of it." }
132
- }
133
- },
134
- "signatures": {
135
- "type": "array",
136
- "minItems": 3,
137
- "maxItems": 9,
138
- "description": "The payload. Carry these and nothing else and it is still recognisable. To add a tenth you must delete one; the cap forces a decision instead of shipping indecision.",
139
- "items": {
140
- "type": "object",
141
- "required": ["move", "how", "when", "never"],
142
- "properties": {
143
- "move": { "type": "string", "description": "Name it like a technique, so it can be referred to in one word." },
144
- "how": { "type": "string", "description": "AS A RATIO OR RELATIONSHIP. Style is formally the correlation between features, not the features." },
145
- "when": { "type": "string", "description": "Where in a piece or a sequence it appears." },
146
- "never": { "type": "string", "description": "How it gets used wrong. The failure mode, written down." }
147
- }
148
- }
149
- },
150
- "weird_move": {
151
- "type": "object",
152
- "description": "The single deliberate break in the system. Its own key, deliberately, so it can never get buried in the middle of a document. Highest-information element present and the first thing a mechanical extraction loses.",
153
- "required": ["what", "how", "why"],
154
- "properties": {
155
- "what": { "type": "string" },
156
- "how": { "type": "string", "description": "Reproducible instruction, as a relationship." },
157
- "why": { "type": "string" },
158
- "frequency": { "type": "string", "default": "exactly once per piece" }
159
- }
160
- },
161
- "archetypes": {
162
- "type": "array",
163
- "description": "Named layouts. Without these you get consistent styling and inconsistent structure, which reads as sloppiness: output #8 will not sit beside output #1 as a set.",
164
- "items": {
165
- "type": "object",
166
- "required": ["id", "purpose", "anatomy"],
167
- "properties": {
168
- "id": { "type": "string" },
169
- "purpose": { "type": "string", "description": "Its job in a sequence: opener, proof, quote, closer." },
170
- "anatomy": { "type": "string", "description": "Slot-by-slot structure in percentages." },
171
- "content_shape": { "type": "string", "description": "The content budget: max words per slot." }
172
- }
173
- }
174
- },
175
- "motion": {
176
- "type": "object",
177
- "description": "Omit entirely for static work. Restraint is a signature too, which is why never_moves is required when this key exists.",
178
- "required": ["never_moves"],
179
- "properties": {
180
- "easing": { "type": "string" },
181
- "durations": { "type": "object", "additionalProperties": { "type": "string" } },
182
- "entrances": { "type": "string" },
183
- "never_moves": { "type": "array", "items": { "type": "string" } },
184
- "reduced_motion": { "type": "string", "description": "The prefers-reduced-motion fallback. Not optional in shipped work." }
185
- }
186
- },
187
- "voice": {
188
- "type": "object",
189
- "description": "Copy is part of the design. Right layout, wrong sentence, broken look.",
190
- "properties": {
191
- "register": { "type": "string" },
192
- "sentence_length": { "type": "string" },
193
- "headline_shape": { "type": "string" },
194
- "banned_words": { "type": "array", "items": { "type": "string" } }
195
- }
196
- },
197
- "bans": {
198
- "type": "array",
199
- "minItems": 5,
200
- "items": { "type": "string" },
201
- "description": "Written as absolutes, starting with 'Never'. A positive instruction has to out-vote the training average; a ban deletes the landslide from the options. One ban can rule out an entire space in one line. Bans should outnumber positive style rules."
202
- },
203
- "tests": {
204
- "type": "array",
205
- "minItems": 8,
206
- "description": "8 to 12. Binary and measurable. If two people could disagree about the answer, it is not a test. A spec with no failing test is a mood board with better formatting.",
207
- "items": {
208
- "type": "object",
209
- "required": ["id", "check", "fail_looks_like", "auto"],
210
- "properties": {
211
- "id": { "type": "string" },
212
- "check": { "type": "string", "description": "Stated so the answer is yes or no, or a number against a bound." },
213
- "fail_looks_like": { "type": "string" },
214
- "auto": { "type": "boolean", "description": "True if a script could decide it. Those go into tools/check.py." }
215
- }
216
- }
217
- },
218
- "reconstruction": {
219
- "type": "object",
220
- "description": "Step 5. A spec that has never been used to rebuild its own source has never been tested at all.",
221
- "required": ["attempted", "gaps_found", "passes"],
222
- "properties": {
223
- "attempted": { "type": "boolean" },
224
- "passes": { "type": "integer", "description": "Expect 2 or 3." },
225
- "gaps_found": { "type": "array", "items": { "type": "string" }, "description": "Every difference found between rebuild and original, and the field added to close it. Expect these to be things you were sure were obvious." },
226
- "stranger_test": { "type": "string", "description": "Whether a stranger could still pick the copy from the original, and how you checked." }
227
- }
228
- }
229
- }
230
- }
@@ -1,64 +0,0 @@
1
- # Eval harness — `design-dna` skill
2
-
3
- Agent-run eval, not a shell script. The cases in `cases.yaml` are fed to a Claude Code agent and
4
- graded by inspection. Unlike most skills here, part of this one **is** mechanically checkable —
5
- see §C.
6
-
7
- ## What's under test
8
-
9
- 1. **Triggering** — does it fire when a winner exists and its look must survive, and stay quiet when
10
- there is no winner yet (`design`), when the winner is still being found (`design-loop`), or when
11
- the user is exploring variants (`prototype`)?
12
- 2. **Capability** — does it hold the rules that are the method, especially the two it is cheapest to
13
- drop: Step 5, and the separation of record from payload?
14
- 3. **Its own gate** — does the emitted skill's checker actually check?
15
-
16
- ## A. Triggering accuracy
17
-
18
- The boundary that costs the most is `design-loop` ↔ `design-dna`, because both involve a reference
19
- image and both are about a look. The split is whether a winner exists: finding it is upstream,
20
- keeping it is here.
21
-
22
- ## B. Capability
23
-
24
- Three scenarios, chosen because each targets a rule that a plausible-looking run will quietly skip:
25
-
26
- 1. **CAPTURE.** The long list is deliberate — every line is a rule the method names as load-bearing.
27
- The two that a good-looking run drops first are **Step 5** (rebuild the reference from the record
28
- alone and diff) and **coverage percentages**. Step 5 is the only honest completeness test that
29
- exists: a spec that has never been used to rebuild its own source has never been tested.
30
- 2. **REUSE.** The failure is re-deriving a style that already has a record, which produces a second,
31
- slightly different identity under the same name.
32
- 3. **Still generic.** The correct answer is a ban, not a rule. This case exists because the instinct
33
- is always to add a positive instruction, and a positive instruction is one weak vote against the
34
- average of everything the model has seen.
35
-
36
- ## C. The mechanical part — check both directions
37
-
38
- Most of this eval is judgement. The emitted checker is not, and it must be verified the way the
39
- constitution's P2 demands: prove it can fail **and** prove it can pass.
40
-
41
- python3 scripts/emit.py <slug> --validate # the capture is finished, or it is not
42
- python3 <slug>/scripts/check.py <output> # the output obeys the style, or it does not
43
-
44
- Both directions, on a real captured style:
45
-
46
- - **Can pass** — run the checker over the style's own worked example. Zero failures, with the
47
- manual tests reported as manual rather than silently passing.
48
- - **Can fail** — run it over an output that breaks a known ban. It must exit non-zero and name
49
- which test failed and what the failure looks like.
50
- - **Cannot lie either way** — run it over an artefact a probe cannot read (a PNG for a probe that
51
- reads declarations). Every such probe must report SKIP with its reason. This is the regression
52
- that was found and fixed at port time: the declaration-reading probes used to run against empty
53
- text, which produced spurious failures on one probe kind and, worse, **vacuous passes** on
54
- another — five greens on an image-only run without having checked anything.
55
- - **Fails readably when unfinished** — a scaffolded style with no record must exit non-zero with a
56
- message naming the fix, not a traceback.
57
-
58
- ## Known limits of this eval
59
-
60
- - The CAPTURE scenario can check that the agent *runs* Step 5 and reports gaps; it cannot check that
61
- the reconstruction was honest. A rebuild done with the reference still on screen looks identical to
62
- one done from the record alone.
63
- - The 2KB payload cap and the two-ends attention ordering are asserted by the method, not measured
64
- here. They are plausible and cheap to honour; they are not proven by this eval.
@@ -1,68 +0,0 @@
1
- skill: design-dna
2
-
3
- should_trigger:
4
- - prompt: "This landing page came out beautiful. Turn it into a skill so I can reuse the look."
5
- why: "The canonical CAPTURE case: a winner exists and the ask is to make its identity permanent and reusable."
6
- - prompt: "Make five more carousels like this one, same look."
7
- why: "'More like this' with an existing reference is REUSE if a record exists and CAPTURE if it does not; either way this skill owns the decision."
8
- - prompt: "Keep the same style as the deck you built me last week."
9
- why: "Style continuity across pieces is the problem this skill exists for; without a written record the model reproduces the average instead."
10
- - prompt: "Everything I generate now looks like generic AI slop. It didn't at the start."
11
- why: "Named verbatim in the description as a trigger. Drift is the symptom of unwritten rules, and the fix is a record with bans, not another prompt."
12
- - prompt: "Lock this look in so it stops changing on me."
13
- why: "Explicit trigger phrase; the ask is permanence, which is the record plus tests that can fail."
14
- - prompt: "Every carousel I post looks slightly different from the last one. I want them to read as a set."
15
- why: "Non-obvious: no keyword overlap with 'skill' or 'style'. The stated symptom is missing named archetypes — inconsistent structure under consistent styling."
16
- - prompt: "Esto ha salido bien. Quiero que las siguientes cinco se vean igual."
17
- why: "Non-English, no keyword overlap; the semantic shape is a winner plus a demand for reproducible identity."
18
-
19
- should_not_trigger:
20
- - prompt: "Design a landing page for my new analytics SaaS — hero, pricing, the works."
21
- route_to: "design"
22
- why: "No winner and no reference to measure. Capturing an average of candidates produces the average, which is the thing the method exists to escape."
23
- - prompt: "Make our homepage as good as linear.app and don't stop until it wins."
24
- route_to: "design-loop"
25
- why: "Finding the winner is the upstream half of the pipe. There is nothing to codify until a piece has cleared the bar."
26
- - prompt: "Write the hero headline and value prop for this page."
27
- route_to: "marketing"
28
- why: "The words. `voice` in the record constrains copy; it does not write it."
29
- - prompt: "Build these pages with the App Router and server actions."
30
- route_to: "nextjs"
31
- why: "The build. The identity stays in the record; the framework work is the sibling's."
32
- - prompt: "Give me three different directions for this poster and I'll choose."
33
- route_to: "variant-explorer"
34
- why: "Exploration among variants. One skill per style: merging two candidate identities into one spec produces the average of two good designs, which is a bad design."
35
-
36
- capability:
37
- - scenario: "User attaches a screenshot of a landing page they love and says 'codify this'. (CAPTURE mode, nothing captured for this style yet.)"
38
- must_include:
39
- - "Runs the seven steps in order and shows work at each; does not jump straight to writing a style file."
40
- - "Step 1 produces literal measurements with NO judgements — sampled colours, coverage estimates, type counts, largest-to-smallest ratio, margins as percentages, and what is ABSENT."
41
- - "Records ratios and relationships rather than absolute values ('headline is 8x body, never under 6x', not 'headline is 96px')."
42
- - "Records colour COVERAGE percentages, not just the colours — states that the same three colours at 60/30/10 and at 90/8/2 are two unrelated designs."
43
- - "Uses descriptive colour names ('dusty plum'), never systematic ones ('accent-500'), because image and video models cannot read token names."
44
- - "Gives every type family a fallback."
45
- - "Identifies the ONE deliberate break in the system (the weird move) and gives it its own field."
46
- - "Writes 8-12 tests that are binary and measurable, marks which are automatable, and rejects 'feels premium' / 'looks clean' as non-tests."
47
- - "Produces MORE bans than positive style rules, written as absolutes."
48
- - "Does NOT skip Step 5: rebuilds the reference from the record alone, diffs against the original, folds every difference back in as a forgotten field, and records the gaps found."
49
- - "Keeps the record and the payload as two separate artefacts: the payload is capped at 2KB and the record never enters a prompt."
50
- - "Puts any real logo, wordmark, licensed photograph or proprietary typeface into not_copied with a named substitute — reproduces the system, never the marks."
51
- - "Declares every inferred-rather-than-measured value and every rule under 70% confidence."
52
- - "Validates the emitted skill with the emit script rather than asserting it works."
53
- - scenario: "A style called `cold-press` already has a full record. User says: 'build me an about page in cold-press'."
54
- must_include:
55
- - "Recognises this as REUSE and does NOT re-derive the style — a style with a record is never re-measured."
56
- - "Loads that style's payload ONLY and attaches the kept reference; does not read the full record into context."
57
- - "Picks a named archetype BEFORE writing anything, so the new piece sits beside the earlier ones as a set."
58
- - "Hands the build to the nextjs sibling and the words to marketing, keeping the identity here."
59
- - "Runs the style's own auto-check before returning, names each test and its result, and repairs then re-runs on any failure."
60
- - "Does not return output with a failing test plus a note explaining it away."
61
- - scenario: "A style is captured and its record is complete, but the pages built from it still come out looking generic. User asks what to add."
62
- must_include:
63
- - "Adds a BAN, not another positive rule — states that a positive instruction is one weak vote against the average while a prohibition deletes a whole space."
64
- - "Checks whether the signature moves are missing or too numerous and cuts to 3-9, each rewritten as a ratio."
65
- - "Checks whether the payload is over its cap, since an over-cap payload is obeyed unevenly and differently each run."
66
- - "Checks whether the strongest rule is buried in the middle of the payload rather than at either end."
67
- - "Checks whether a weird move exists at all, since a spec with no break in the system reads as forgettable rather than wrong."
68
- - "Does not respond by merging in a second style or by re-capturing from scratch."