command-code 1.93.1 → 1.93.2

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 (102) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/bundled/agent-browser/SKILL.md +73 -0
  3. package/dist/bundled/command-code-knowledge/SKILL.md +68 -0
  4. package/dist/bundled/command-code-knowledge/live-models.ts +284 -0
  5. package/dist/bundled/command-code-knowledge/reference/byok.md +389 -0
  6. package/dist/bundled/command-code-knowledge/reference/custom-agents.md +341 -0
  7. package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +423 -0
  8. package/dist/bundled/command-code-knowledge/reference/headless.md +381 -0
  9. package/dist/bundled/command-code-knowledge/reference/hooks.md +1107 -0
  10. package/dist/bundled/command-code-knowledge/reference/mcp.md +648 -0
  11. package/dist/bundled/command-code-knowledge/reference/memory.md +137 -0
  12. package/dist/bundled/command-code-knowledge/reference/models.md +145 -0
  13. package/dist/bundled/command-code-knowledge/reference/permissions.md +486 -0
  14. package/dist/bundled/command-code-knowledge/reference/plan-mode.md +283 -0
  15. package/dist/bundled/command-code-knowledge/reference/plans.md +16 -0
  16. package/dist/bundled/command-code-knowledge/reference/product-help.md +490 -0
  17. package/dist/bundled/command-code-knowledge/reference/sessions.md +377 -0
  18. package/dist/bundled/command-code-knowledge/reference/skills.md +1009 -0
  19. package/dist/bundled/command-code-knowledge/reference/tools.md +522 -0
  20. package/dist/bundled/config/SKILL.md +18 -0
  21. package/dist/bundled/config/references/permissions.md +27 -0
  22. package/dist/bundled/config/references/settings.md +50 -0
  23. package/dist/bundled/design/SKILL.md +448 -0
  24. package/dist/bundled/design/references/accessibility.md +404 -0
  25. package/dist/bundled/design/references/border.md +161 -0
  26. package/dist/bundled/design/references/button.md +192 -0
  27. package/dist/bundled/design/references/checkup.md +164 -0
  28. package/dist/bundled/design/references/color.md +245 -0
  29. package/dist/bundled/design/references/create.md +291 -0
  30. package/dist/bundled/design/references/design-html.md +227 -0
  31. package/dist/bundled/design/references/deslop.md +285 -0
  32. package/dist/bundled/design/references/finish.md +156 -0
  33. package/dist/bundled/design/references/interaction.md +186 -0
  34. package/dist/bundled/design/references/layout.md +216 -0
  35. package/dist/bundled/design/references/media.md +112 -0
  36. package/dist/bundled/design/references/motion.md +237 -0
  37. package/dist/bundled/design/references/redesign.md +197 -0
  38. package/dist/bundled/design/references/refine.md +193 -0
  39. package/dist/bundled/design/references/reflexes.md +132 -0
  40. package/dist/bundled/design/references/relayout.md +207 -0
  41. package/dist/bundled/design/references/report-html.md +235 -0
  42. package/dist/bundled/design/references/responsive.md +233 -0
  43. package/dist/bundled/design/references/review.md +164 -0
  44. package/dist/bundled/design/references/setup.md +119 -0
  45. package/dist/bundled/design/references/severity.md +111 -0
  46. package/dist/bundled/design/references/shadow.md +164 -0
  47. package/dist/bundled/design/references/smell.md +213 -0
  48. package/dist/bundled/design/references/style-3d.md +23 -0
  49. package/dist/bundled/design/references/style-bento.md +21 -0
  50. package/dist/bundled/design/references/style-editorial.md +23 -0
  51. package/dist/bundled/design/references/style-futuristic.md +21 -0
  52. package/dist/bundled/design/references/style-glassmorphism.md +52 -0
  53. package/dist/bundled/design/references/style-maximalism.md +20 -0
  54. package/dist/bundled/design/references/style-minimalism.md +21 -0
  55. package/dist/bundled/design/references/style-neo-brutalism.md +21 -0
  56. package/dist/bundled/design/references/style-retro-futurism.md +21 -0
  57. package/dist/bundled/design/references/style-swiss.md +20 -0
  58. package/dist/bundled/design/references/style.md +77 -0
  59. package/dist/bundled/design/references/surface.md +163 -0
  60. package/dist/bundled/design/references/system.md +73 -0
  61. package/dist/bundled/design/references/typeset.md +210 -0
  62. package/dist/bundled/design/references/variants.md +193 -0
  63. package/dist/bundled/design/references/voice.md +184 -0
  64. package/dist/bundled/design/references/writing.md +174 -0
  65. package/dist/bundled/design/scripts/check/color.mjs +213 -0
  66. package/dist/bundled/design/scripts/check/contrast.mjs +141 -0
  67. package/dist/bundled/design/scripts/check/css.mjs +223 -0
  68. package/dist/bundled/design/scripts/check/named-colors.mjs +152 -0
  69. package/dist/bundled/design/scripts/check/pair.mjs +61 -0
  70. package/dist/bundled/design/scripts/check/preview.mjs +27 -0
  71. package/dist/bundled/design/scripts/check/reflexes.mjs +257 -0
  72. package/dist/bundled/design/scripts/check/sources.mjs +237 -0
  73. package/dist/bundled/design/scripts/check.mjs +165 -0
  74. package/dist/bundled/loop/SKILL.md +16 -0
  75. package/dist/bundled/mod-builder/SKILL.md +135 -0
  76. package/dist/bundled/mod-builder/examples/block-dangerous-commands.ts +41 -0
  77. package/dist/bundled/mod-builder/examples/custom-entry-renderer.ts +32 -0
  78. package/dist/bundled/mod-builder/examples/custom-tool.ts +53 -0
  79. package/dist/bundled/mod-builder/examples/flags-and-options.ts +29 -0
  80. package/dist/bundled/mod-builder/examples/input-shortcuts.ts +41 -0
  81. package/dist/bundled/mod-builder/examples/kitchen-sink.ts +129 -0
  82. package/dist/bundled/mod-builder/examples/lifecycle-hooks.ts +64 -0
  83. package/dist/bundled/mod-builder/examples/model-router.ts +43 -0
  84. package/dist/bundled/mod-builder/examples/observe-events.ts +30 -0
  85. package/dist/bundled/mod-builder/examples/pane-and-buttons.ts +60 -0
  86. package/dist/bundled/mod-builder/examples/pane-form.ts +68 -0
  87. package/dist/bundled/mod-builder/examples/permission-policy.ts +34 -0
  88. package/dist/bundled/mod-builder/examples/redact-secrets.ts +46 -0
  89. package/dist/bundled/mod-builder/examples/slash-command.ts +33 -0
  90. package/dist/bundled/mod-builder/examples/spinner-count.ts +47 -0
  91. package/dist/bundled/mod-builder/examples/stream-filter.ts +70 -0
  92. package/dist/bundled/mod-builder/reference/api.md +140 -0
  93. package/dist/bundled/mod-builder/reference/hooks-and-events.md +347 -0
  94. package/dist/bundled/mod-builder/reference/overview.md +271 -0
  95. package/dist/bundled/mod-builder/reference/packaging.md +187 -0
  96. package/dist/bundled/mod-builder/reference/ui.md +253 -0
  97. package/dist/bundled/mod-builder/reference/verify.md +67 -0
  98. package/dist/bundled/skill-builder/SKILL.md +104 -0
  99. package/dist/cli.mjs +16 -0
  100. package/dist/index.mjs +2 -0
  101. package/package.json +1 -1
  102. package/vsix/commandcode-vscode.vsix +0 -0
@@ -0,0 +1,216 @@
1
+ # Layout
2
+
3
+ I use layout to direct attention. Before color, type, shadow, or motion, I decide where the eye lands, what it understands, and where it goes next.
4
+
5
+ Layout is not filling containers. It is pressure, rhythm, grouping, and sequence.
6
+
7
+ ---
8
+
9
+ ## Composition Comes From Work
10
+
11
+ I name the dominant work pattern before I arrange anything.
12
+
13
+ Monitor layouts expose priority and change: status bands, live feeds, alert columns, metric clusters.
14
+
15
+ Operate layouts keep tools near action: command bars, canvases, inspectors, side panels, direct controls.
16
+
17
+ Compare layouts hold alignment steady: tables, matrices, split views, ranked lists, dense rows.
18
+
19
+ Configure layouts group choices and consequences: forms, settings clusters, summaries, previews, commit areas.
20
+
21
+ Learn layouts carry attention through time: article flow, walkthrough rhythm, progressive sections.
22
+
23
+ Decide layouts remove alternatives: proof, objection handling, risk reduction, one dominant action.
24
+
25
+ Explore layouts make movement cheap: search, filters, maps, galleries, clusters, reversible paths.
26
+
27
+ A layout that ignores its work pattern is decoration pretending to be structure.
28
+
29
+ ---
30
+
31
+ ## Applied Layout Bar
32
+
33
+ Layout work must visibly change how the eye moves.
34
+
35
+ At minimum, I verify focal point, reading path, grouping, section rhythm, responsive order, and the relationship between content and actions.
36
+
37
+ Changing margins, max-widths, or gap values is not enough if the screen still reads the same.
38
+
39
+ ---
40
+
41
+ ## What I See First
42
+
43
+ I look for the dominant mass. If everything has equal weight, nothing has meaning.
44
+
45
+ I ask:
46
+
47
+ - Where does the eye land first?
48
+ - What is the second read?
49
+ - What can wait?
50
+ - Which groups belong together?
51
+ - Which section needs more air?
52
+ - Which thing is visually heavy but conceptually minor?
53
+
54
+ Then I move the surface until the answer is obvious.
55
+
56
+ ---
57
+
58
+ ## Rhythm
59
+
60
+ Command Code has a strong spatial taste: the 1-4-9 rhythm.
61
+
62
+ One unit handles micro-breaths. Four units handle ordinary component relationships. Nine units handle section breaks and major shifts. The exact values can translate to the system in front of me, but the rhythm stays intentional.
63
+
64
+ I avoid random gaps. A strange gap is a bug unless it is doing deliberate optical work.
65
+
66
+ ---
67
+
68
+ ## The Three Planes
69
+
70
+ I think in planes.
71
+
72
+ **Background plane** holds canvas, atmosphere, decorative imagery, and anything the user cannot directly operate.
73
+
74
+ **Content plane** holds text, forms, controls, cards, tables, and the core work.
75
+
76
+ **Attention plane** holds popovers, drawers, modals, command surfaces, tooltips, and urgent feedback.
77
+
78
+ When the planes fight, users feel it as confusion. I separate them with position, lightness, depth, and motion.
79
+
80
+ ---
81
+
82
+ ## Composition Mass
83
+
84
+ Large things are heavy. Saturated things are heavy. High-contrast things are heavy. Isolated things are heavy. Bottom-right weight often needs a top-left counterweight.
85
+
86
+ I balance mass rather than centering boxes. Sometimes the right layout is stable. Sometimes it needs tension. The key is that the tension is chosen.
87
+
88
+ ---
89
+
90
+ ## Patterns I Use On Purpose
91
+
92
+ **Centered symmetry** is useful for singular, formal, high-confidence moments. It becomes dull when every section repeats it.
93
+
94
+ **Asymmetry** creates energy when the counterweight is deliberate. Timid asymmetry looks broken.
95
+
96
+ **Strict grids** create authority. They work well for technical, editorial, financial, and operational surfaces.
97
+
98
+ **Z-flow** can guide marketing pages toward a decision, but it becomes formula when every landing page copies it.
99
+
100
+ **F-flow** belongs to dense reading and scanning surfaces: articles, search results, docs, dashboards.
101
+
102
+ **Layered sections** work for storytelling, but each layer needs a different role or it becomes stacked wallpaper.
103
+
104
+ **Modular grids** scale well for catalogs and dashboards. They need featured mass or variation when hierarchy matters.
105
+
106
+ ---
107
+
108
+ ## Cards Are Not The Default
109
+
110
+ Cards are for distinct, comparable, or clickable objects. They are not a universal layout fluid.
111
+
112
+ I group with spacing, alignment, type, and dividers before I add another box. I never nest cards to solve a hierarchy problem. Nested cards mean I have not decided what belongs together.
113
+
114
+ ---
115
+
116
+ ## The Cliffhanger
117
+
118
+ I avoid dead-perfect section endings on long pages. A hint of the next section keeps the page alive. The user should feel there is more to discover without being trapped by scroll tricks.
119
+
120
+ ---
121
+
122
+ ## Layout Mechanics
123
+
124
+ **Group with space, not lines.** Three tools, in order of preference: negative space, then a background shape when a group must read as one unit, then a separator line — last, and only where space would cost too much (dense tables, long settings lists). The structural rule: **the gap between groups is at least 2× the gap within a group.** 8px inside, 16px+ between. Below that ratio the grouping reads as noise, and adding a line to compensate is treating the symptom.
125
+
126
+ A line that has genuinely earned its place still keeps its voice down — thin, dim, and never sitting inside a wide gap. If the space is already doing the separating, the line is just repeating it louder.
127
+
128
+ **Controls must not look like content.** An interactive element needs a background, a border, an underline, or a consistent control zone. A link styled exactly like the sentence around it is invisible. The inverse holds too: a static badge shaped like the buttons beside it collects dead clicks.
129
+
130
+ **Shared edges.** I pick a small set of alignment edges and put everything on them. Every stray edge — an icon 2px off the text edge, a card padded differently from its neighbor — reads as noise even when nobody can name it. One spacing step expresses each level of subordination, and deeper nesting repeats the same step rather than inventing a new one.
131
+
132
+ **Logical properties, not physical.** Direction-dependent position is written as leading/trailing so the layout mirrors under `dir="rtl"`:
133
+
134
+ | Physical (avoid) | Logical (use) |
135
+ |---|---|
136
+ | `margin-left` | `margin-inline-start` |
137
+ | `padding-right` | `padding-inline-end` |
138
+ | `left: 0` | `inset-inline-start: 0` |
139
+ | `text-align: left` | `text-align: start` |
140
+ | `border-right` | `border-inline-end` |
141
+
142
+ Physical properties are reserved for genuinely physical geometry: a device notch, a gesture direction. When an arrangement encodes progression — star ratings, step indicators, progress bars — the sequence mirrors too; flexbox and grid with logical properties do it automatically, hand-positioned elements do not.
143
+
144
+ **Breathing room between targets.** Without an established density scale: `12px` between adjacent bordered or filled controls, `24px` around borderless text and icon buttons, `24px`+ between unrelated groups. Borderless controls need more because nothing marks where one target ends and the next begins — the space *is* the boundary. Compact professional tools may use less, as long as hit areas stay distinct and never overlap ([accessibility.md](accessibility.md#hit-areas)). I preserve an established, usable density rather than inflating controls to match a number.
145
+
146
+ **Progressive disclosure needs an affordance.** Hiding complexity is good; hiding it with no cue is a trap. In a horizontal scroller, items are sized so the next one peeks `16–32px` past the edge — a row that ends exactly at the container edge looks complete, and nobody scrolls it. Collapsed sections get a control whose label states what is hidden ("Show 12 more results", not "More"). Clamped text shows an ellipsis *and* a way to expand.
147
+
148
+ **Content bleeds, controls float.** Backgrounds, hero media, and scrollable lists extend to the viewport edges. Text and controls stay inside the layout margins and safe areas. Sticky chrome floats above the content layer; it does not dam it.
149
+
150
+ ```css
151
+ /* Full-bleed media inside a constrained article */
152
+ .article { display: grid; grid-template-columns: 1fr min(65ch, calc(100% - 48px)) 1fr; }
153
+ .article > * { grid-column: 2; }
154
+ .article > .full-bleed { grid-column: 1 / -1; }
155
+
156
+ /* Floating chrome respects the notch */
157
+ .fab {
158
+ position: fixed;
159
+ inset-inline-end: calc(16px + env(safe-area-inset-right));
160
+ bottom: calc(16px + env(safe-area-inset-bottom));
161
+ }
162
+ ```
163
+
164
+ **Breakpoints come from content.** I break where the layout actually stops fitting — where the sidebar squeezes content below its minimum measure, where the card grid drops below a usable column width — not at 768px because a preset says so. I collapse late: a layout that holds its expanded structure as long as it genuinely fits stays stable and familiar, and premature collapsing throws away space the user paid for. I test the smallest and largest supported sizes first, because those break first.
165
+
166
+ **Plan for growth and clipping.** String expansion varies by language and by source-string length, so no universal percentage saves me. No fixed widths sized to English labels — `max-width` plus wrapping. No fixed heights on text containers — `min-height` if a floor is needed. Buttons size from their label via `padding-inline`, never a hardcoded width. And I never park a critical action where resizing, scrolling, or an expanding keyboard can clip it: primary actions live in the normal flow or in stable chrome with safe-area padding. If a modal's content scrolls, its action row does not.
167
+
168
+ ---
169
+
170
+ ## Container Sense
171
+
172
+ Components should know the space they live in. A card in a sidebar should not behave like the same card in a wide main column. Container-aware layout is usually cleaner than page-wide breakpoints for reusable components.
173
+
174
+ ```css
175
+ /* The component adapts to its column */
176
+ .card-list { container-type: inline-size; }
177
+ @container (max-width: 400px) { .card { grid-template-columns: 1fr; } }
178
+
179
+ /* A viewport query breaks the same card inside a narrow sidebar */
180
+ @media (max-width: 768px) { .card { grid-template-columns: 1fr; } }
181
+ ```
182
+
183
+ Viewport rules still matter for page shell decisions. Component composition belongs closer to the component.
184
+
185
+ ---
186
+
187
+ ## What I Refuse
188
+
189
+ - A centered hero followed by three identical icon cards by reflex
190
+ - Treating layout as spacing tweaks only
191
+ - Equal spacing everywhere
192
+ - Arbitrary stacking order values
193
+ - Decorative wrappers around every group
194
+ - A layout that only works at the designer's viewport
195
+ - Important content placed where the eye only finds it by accident
196
+ - Testimonials, proof, or calls to action dropped in by formula
197
+ - Horizontal overflow treated as a mobile detail
198
+ - Composition built only for left-to-right reading when the product needs to support RTL languages — see [responsive.md](responsive.md#text-direction)
199
+
200
+ ---
201
+
202
+ ## How I Know Layout Is Working
203
+
204
+ - The rendered page reads differently where layout was changed
205
+ - The first three reads survive a squint
206
+ - Every group has the right amount of air
207
+ - The reading path matches the content priority
208
+ - Heavy elements are balanced or intentionally tense
209
+ - Sections feel related without feeling repetitive
210
+ - Mobile order tells the same story as desktop
211
+ - The interface still has structure when imagery is blocked out
212
+
213
+ STRICT RULE — NEVER BREAK THIS
214
+ Do not create report.md, any kind of report, summary, analysis file,
215
+ or extra documentation. This applies every time this file is used.
216
+ Generate no reports unless explicitly asked.
@@ -0,0 +1,112 @@
1
+ # Media
2
+
3
+ I pick imagery and video that lifts the page the moment it loads, belongs to this project and no other, and never ships broken or rights-unclear.
4
+
5
+ ---
6
+
7
+ ## I Lock Direction First
8
+
9
+ ```
10
+ ERA · LIGHT · PALETTE (3 hexes) · SUBJECT · DISTANCE · FORBIDDEN
11
+ ```
12
+
13
+ Filled from the brand, not the category. No vibe signal in the brief? I ask for two reference images.
14
+
15
+ ---
16
+
17
+ ## Own Photos Beat Stock
18
+
19
+ Before searching, I look for the project's real photos: the brief (attachments, links, live site), the repo (`find . -path ./node_modules -prune -o -type f \( -iname '*.jpg' -o -iname '*.png' -o -iname '*.webp' -o -iname '*.mp4' \) -print`), and existing `src`/`url()` values or CMS hosts in config. Logos, icons, screenshots, and placeholders don't count. If I find nothing and the subject is physical, I ask once: "Do you have photos of the real <subject>?"
20
+
21
+ ---
22
+
23
+ ## I Match It To The Project
24
+
25
+ | Project | What lifts it | Look first |
26
+ |---|---|---|
27
+ | Food, café, restaurant | Close, hard-lit plates, steam, hands | Pexels, Unsplash, Kaboompics |
28
+ | Hotel, travel, place | Wide shot at golden or blue hour, one person for scale | Unsplash, Pexels, Wikimedia |
29
+ | Fashion, beauty, craft | Editorial crop, one strong light, texture | Pexels, Unsplash, Burst |
30
+ | SaaS, dev, AI | Material macro, light on glass, slow ambient loop | Pexels Videos, Coverr, Poly Haven |
31
+ | Finance, legal | Architecture, stone, shadow geometry | Unsplash, Openverse |
32
+ | Science, space | Real instrument or observation imagery | NASA, Wikimedia |
33
+ | Culture, editorial, luxury | Public-domain paintings, engravings, maps | The Met, Openverse |
34
+ | Event, music, fitness | Motion, stage light, grain | Pexels Videos, Pixabay, Mixkit |
35
+
36
+ ---
37
+
38
+ ## It Earns The Slot
39
+
40
+ "Aesthetic" is the bar, never a query word. Every asset needs: **one subject** the eye lands on in under a second, **real directional light**, **depth**, **calm space for the headline**, **palette fit**, **one detail worth zooming into**, and **2× display resolution**. Gut test: would someone screenshot the page for this image? If not, it's filler.
41
+
42
+ **Video:** a 6–15s seamless loop with one slow move and no cuts. `autoplay muted loop playsinline` + `poster`, still image under `prefers-reduced-motion`, ≤ ~4 MB (re-encode with `ffmpeg -an -crf 28` if available), and a scrim so text passes contrast on every frame.
43
+
44
+ ---
45
+
46
+ ## I Search The Photograph, Not The Subject
47
+
48
+ Query = **[film or camera] + [light] + [subject] + [distance]**, 4–7 words. `healthy food` → `overhead ceramic plate hard shadow film`. Banned: *beautiful, modern, professional, stunning, creative, aesthetic.* Up to five queries per slot across at least two hosts, then the fallback ladder.
49
+
50
+ ---
51
+
52
+ ## Hosts
53
+
54
+ - **Photo:** Unsplash, Pexels, Pixabay, Burst, Kaboompics, StockSnap
55
+ - **Video:** Pexels, Pixabay, Coverr, Mixkit
56
+ - **Public domain / open:** Openverse, Wikimedia Commons, The Met, NASA. The least overused, and often the most striking.
57
+ - **Texture:** Poly Haven, ambientCG (CC0)
58
+ - **Never:** flat vector packs (unDraw, Storyset). They read as template.
59
+
60
+ Stock sites show curl a bot wall or an empty JavaScript shell, so I search through hosts with a keyless JSON API (Openverse, Wikimedia Commons, The Met keeping only `isPublicDomain` objects, NASA) and take the file URL and licence from the response. Pexels, Pixabay, and Unsplash only if `PEXELS_API_KEY`, `PIXABAY_API_KEY`, or `UNSPLASH_ACCESS_KEY` is already set; I never hardcode a key. I send curl's default User-Agent, never a fake browser one. A 4xx, a retirement notice, or a "Just a moment…" bot wall is a failed fetch, so I move to the next source.
61
+
62
+ ---
63
+
64
+ ## Reject Test
65
+
66
+ Any one fails it: a stock caption writable in five words · no detail worth a second look · won't sit in PALETTE even duotoned · could appear unchanged on a competitor's site.
67
+
68
+ Hard bans: people at laptops, handshakes, sticky notes, product on white, blue-purple mesh gradients, glowing circuitry, lens flare, watermarks, baked-in text, flat vector people.
69
+
70
+ ---
71
+
72
+ ## I Verify Before It Ships
73
+
74
+ - I never write a media URL from memory or build one from a host's usual URL shape. `source.unsplash.com` is dead, and guessed `images.unsplash.com/photo-<id>` or `images.pexels.com/photos/<id>` URLs are banned. The host's own size parameters (`w=`, `q=`, `fit=`) on a URL I read are fine.
75
+ - `curl -sL -o /dev/null -w '%{http_code} %{content_type}' "<final url>"` must return `200` with `image/*` or `video/*`. Nothing is downloaded yet.
76
+
77
+ ---
78
+
79
+ ## I Clear The Rights
80
+
81
+ I read the licence on the source page or in the API response before anything is downloaded.
82
+ - **Clear:** CC0 and public domain (Met public-domain objects, Poly Haven, ambientCG); Unsplash, Pexels, Pixabay, Burst, Kaboompics, StockSnap, Coverr, and Mixkit under their own licences. Unsplash+ shows up in normal Unsplash results and is paid: rejected.
83
+ - **Per file:** Openverse and Wikimedia (`license` / `extmetadata.LicenseShortName`). NASA: reject anything credited to a third party, and never imply endorsement.
84
+ - **CC-BY:** only with credit in the footer or `ATTRIBUTION.md`. **CC-BY-SA:** only if the project can share-alike. **NC, ND, unclear, or all rights reserved:** rejected.
85
+ - One verdict line per asset before download: `<source> · <licence as stated> · clear | credit | rejected`.
86
+
87
+ ---
88
+
89
+ ## I Bring It Into The Project
90
+
91
+ - **Temp first:** scratch pages, candidates, and logs stay in `tmp=$(mktemp -d)`, never the project. `curl -sL "<url>" -o "$tmp/<name>.<ext>"`.
92
+ - **Size:** ~2× the largest display width, as WebP: `cwebp -q 80 -resize <w> 0 in.jpg -o out.webp` or `magick in.jpg -resize <w>x -quality 80 out.webp`. Neither installed: a resized JPEG via `sips -Z <w> in.jpg --out out.jpg`, never the full-size original. `sips` cannot write WebP.
93
+ - **Check:** `file` confirms a real image, not an error page with an image extension.
94
+ - **Place:** in the project's existing asset directory (`public/`, `assets/`, `static/`, or beside a standalone `index.html`). I never hotlink.
95
+ - **Src:** the path the site serves, not the disk path. Vite or Next `public/images/x.webp` is `src="/images/x.webp"`.
96
+ - **Markup:** hero gets `srcset` (two widths) + `sizes`; the rest get `width`, `height`, `loading="lazy"`. Alt text describes what I actually fetched.
97
+
98
+ ---
99
+
100
+ ## Fewer, Larger, One Set
101
+
102
+ Landing budget: hero, mid-page break, close. One treatment across all of them: either a duotone into the palette (`grayscale(1)` + accent background + `mix-blend-mode: luminosity`) or ~12% SVG grain. One crop ratio, one radius. Assets from different hosts must look like one shoot.
103
+
104
+ ---
105
+
106
+ ## Fallback Ladder
107
+
108
+ Nothing passed, fetched, or cleared? I never ship a weak asset or a broken `<img>`.
109
+ - **Physical subject:** ask who can supply a real photo → SVG/CSS illustration → a labeled stand-in sized for the real photo.
110
+ - **Non-physical subject:** oversized type (12–20vw) → generated texture → macro of one material → flat color.
111
+
112
+ I say which rung I landed on and why.
@@ -0,0 +1,237 @@
1
+ # Motion: `/design motion`
2
+
3
+ Motion explains behavior. It is the body language of the interface. If motion does not clarify state, direction, causality, or attention, I cut it.
4
+
5
+ `motion` and `animate` point to the same discipline here. Animation is one sentence. Motion is the grammar.
6
+
7
+ This mode is additive by default. I do not merely adjust existing easing unless the user explicitly asks for tuning.
8
+
9
+ ---
10
+
11
+ ## Motion Follows Composition
12
+
13
+ The work pattern decides what movement is useful.
14
+
15
+ Monitor screens move only to reveal change, urgency, freshness, or new data.
16
+
17
+ Operate screens respond immediately to touch, drag, command, selection, and undo.
18
+
19
+ Compare screens preserve orientation. Motion should keep rows, columns, and selections understandable.
20
+
21
+ Configure screens show dependencies, validation, preview changes, and save progress.
22
+
23
+ Learn screens use motion for pacing, reveal, progress, and transition between concepts.
24
+
25
+ Decide screens use motion sparingly to focus attention and reduce doubt.
26
+
27
+ Explore screens use motion to preserve location while filtering, opening, closing, and backtracking.
28
+
29
+ I do not animate a centered grid because it feels empty. Movement must explain the work.
30
+
31
+ ---
32
+
33
+ ## Creation Bar
34
+
35
+ When the user asks for `/design motion`, I create a motion system across the surface.
36
+
37
+ At minimum, I add or verify motion for:
38
+
39
+ - Page or section arrival
40
+ - Primary action feedback
41
+ - Interactive hover and press feedback where interaction exists
42
+ - Focus-visible behavior that feels intentional
43
+ - Opening and closing of menus, drawers, dialogs, accordions, tabs, or expandable regions
44
+ - Loading, progress, or waiting states when the product can wait
45
+ - Success, error, selection, or state-change feedback where those states exist
46
+ - Reduced-motion behavior
47
+
48
+ Existing animations are inputs, not the whole job. I refine them after the missing motion states are added.
49
+
50
+ If the page has no meaningful animation after the pass, `/design motion` has failed.
51
+
52
+ ---
53
+
54
+ ## Existing Motion Is Not Enough
55
+
56
+ Tuning easing, duration, delay, or curve values is only a motion pass when the interface already has a complete motion system.
57
+
58
+ If most of the page is static, I add motion first: reveal, response, transition, feedback, and reduced-motion alternatives. Then I adjust timing.
59
+
60
+ I do not report "motion improved" because I changed a duration from one value to another. The user must be able to see new or clearly better behavior.
61
+
62
+ ---
63
+
64
+ ## My Default Timing
65
+
66
+ I keep a small budget in my head.
67
+
68
+ - Tactile feedback is fast, usually around the instant-to-brief range
69
+ - Menus, popovers, and small state changes are short and clear
70
+ - Drawers, accordions, and layout reflows get more time because the eye has to track space
71
+ - Brand entrances can breathe when the page earns choreography
72
+
73
+ Leaving is faster than arriving. The user already understands the object by then.
74
+
75
+ ---
76
+
77
+ ## What Motion Is Allowed To Say
78
+
79
+ Motion can say:
80
+
81
+ - This changed
82
+ - This came from there
83
+ - This belongs to that trigger
84
+ - This is processing
85
+ - This is now selected
86
+ - This failed
87
+ - This is safe to touch
88
+ - This is important right now
89
+
90
+ Motion cannot say "look at me" with no reason.
91
+
92
+ ---
93
+
94
+ ## Material
95
+
96
+ I mostly move transform and opacity because they stay smooth. I also use blur, masks, clipping, shadow bloom, filters, and variable type when the effect genuinely needs that material and stays performant.
97
+
98
+ The rule is not austerity. The rule is responsibility. Expensive effects stay bounded, purposeful, and verified in the browser.
99
+
100
+ ---
101
+
102
+ ## Physics
103
+
104
+ I avoid default easing. Real motion has weight.
105
+
106
+ Heavy surfaces enter with more gravity. Tooltips and small menus move lightly. Press feedback should feel immediate. Confirmation can have a tiny lift. Error motion must be brief and useful, never theatrical.
107
+
108
+ Bounce and elastic effects are not banned because motion cannot be playful. They are refused because they usually make software feel cheap. One playful brand moment can earn them. Repetition cannot.
109
+
110
+ ---
111
+
112
+ ## Choreography
113
+
114
+ I stagger sequences when the user needs to understand order. I keep the total delay short. Mechanical delay patterns feel generated, so I vary with restraint.
115
+
116
+ Brand pages can open with a composed reveal. Product pages should arrive ready to use. A dashboard does not need to perform before the operator can work.
117
+
118
+ ---
119
+
120
+ ## Reduced Motion
121
+
122
+ Reduced motion is part of the design, not a patch.
123
+
124
+ I replace spatial movement with fades, instant state changes, or low-motion alternatives.
125
+
126
+ Functional signals remain alive: focus, progress, loading, and confirmation still communicate.
127
+
128
+ If the reduced version loses meaning, the original motion was carrying too much of the interface.
129
+
130
+ **Example:**
131
+ - Full motion: Element slides in over 400ms
132
+ - Reduced motion: Element fades in over 150ms (no translation)
133
+
134
+ I write motion as **opt-in**, so the static version is the default and I am not chasing every animation with an override:
135
+
136
+ ```css
137
+ .card { /* static styles */ }
138
+ @media (prefers-reduced-motion: no-preference) {
139
+ .card { transition: transform 200ms ease-out; }
140
+ }
141
+ ```
142
+
143
+ In an existing codebase where opt-in is not feasible, the global kill switch uses `0.01ms` rather than `none`, so `transitionend` and `animationend` still fire and any JS waiting on them does not hang.
144
+
145
+ The preference asks for less motion, not none. What it protects against is vestibular upset, not the interface answering the user:
146
+
147
+ | Cut it | Swap it | Leave it alone |
148
+ |---|---|---|
149
+ | Parallax | Anything that slides, scales, or zooms → a plain opacity crossfade | Spinners and progress indicators |
150
+ | Video, GIFs, and looping decoration that start themselves | Smooth scrolling → jump straight there | State that changes instantly: hover color, the focus ring |
151
+ | Spinning, and anything travelling a long way across the screen | Carousels that rotate on their own → hand them over paused | The short confirmation that a press registered |
152
+
153
+ Independent of the preference: anything moving, blinking, or updating on its own for more than 5 seconds needs a visible pause control. Every animation stays interruptible and driven by user input.
154
+
155
+ ---
156
+
157
+ ## Enter And Exit Mechanics
158
+
159
+ For an infrequent staged entrance — a page hero, a success state, an empty state — I split the container into semantic chunks (title, description, action) and stagger them by ~100ms, combining `opacity`, a small `translateY`, and `blur`. Titles can go a level finer, word by word at ~80ms. I do not stagger routine, high-frequency interactions; the attention cost repeats on every trigger.
160
+
161
+ Exits are softer than enters and run shorter — roughly 150ms against a 300ms entrance. A small fixed `translateY` (about `-12px`) indicates direction without drama; the full container height is theatre. When motion adds no information, or the interaction repeats often, removing the element immediately is the correct exit.
162
+
163
+ I use CSS transitions for interactive state changes, because they can be interrupted mid-flight, and reserve keyframes for staged sequences that run once. I transition exact properties (`transition-property: opacity, scale`), never `all`. `will-change` is for `transform`, `opacity`, and `filter` only, added when I actually see first-frame stutter — never `will-change: all`.
164
+
165
+ **Icon swaps** animate with `opacity`, `scale`, and `blur` rather than toggling visibility: scale `0.25` → `1`, opacity `0` → `1`, blur `4px` → `0`. With a motion library, `{ type: "spring", duration: 0.3, bounce: 0 }` — bounce stays `0`. Without one, both icons stay in the DOM (one absolutely positioned) and cross-fade with `cubic-bezier(0.2, 0, 0, 1)`, which gives enter and exit with no dependency.
166
+
167
+ Nothing is communicated by movement alone. Anything I animate to mark a change also has to read as changed once it stops moving — through color, a glyph, or words.
168
+
169
+ ---
170
+
171
+ ## Timing Reference
172
+
173
+ Keep these consistent across your entire site.
174
+
175
+ | Action | Duration | Use When |
176
+ |---|---|---|
177
+ | 100ms | Tactile feedback, quick dismissals | Button press alternative, small feedback |
178
+ | 150ms | Press feedback, focus rings, hover | All interactive elements, standard responsive feel |
179
+ | 200ms | Success flash, small reveals | Confirmation states, brief celebrations |
180
+ | 250ms | Menu transitions, small modals | Menus, popovers, small UI changes |
181
+ | 300ms | Drawer open, accordion expand | Larger spatial movements, layout changes |
182
+ | 400ms | Full-screen transitions | Page changes, major layout shifts |
183
+ | 800ms | Loading spinners | Continuous waiting states (steady, not panicked) |
184
+
185
+ **Rule:** 150ms is your baseline for responsiveness. Faster = twitchy. Slower = laggy.
186
+
187
+
188
+ ---
189
+
190
+ ## Waiting
191
+
192
+ Perceived speed matters. Skeletons, optimistic updates, progressive reveal, and honest progress beat a lonely spinner.
193
+
194
+ I never use motion to hide a slow system. I use it to show that the system is still accountable.
195
+
196
+ ---
197
+
198
+ ## What I Refuse
199
+
200
+ - Motion on every element because it feels "premium"
201
+ - Only changing easing or duration when the page lacks animation
202
+ - Calling unused keyframes a motion system
203
+ - Adding animation that cannot be triggered or seen
204
+ - Page-load theater on product surfaces
205
+ - Hover-only meaning (motion that disappears on touch devices)
206
+ - Scroll-jacking
207
+ - Infinite animations near reading content
208
+ - Layout-property animation that visibly janks (`width`, `height`, `margin` animation)
209
+ - Motion without reduced-motion behavior
210
+ - Generic fade-up on every card
211
+ - Confetti or celebration for routine actions
212
+ - Animating from `scale(0)` — always use intermediate scale with opacity fade
213
+ - Overusing `rotateY()` and `rotateX()` without clear purpose (3D is not inherently better)
214
+ - Transform animations longer than necessary (every animation should have a reason for its duration)
215
+
216
+ ---
217
+
218
+ ## How I Know Motion Works
219
+
220
+ - Motion exists in the rendered interface, not only in CSS or classes
221
+ - The pass added missing motion states before tuning existing ones
222
+ - The user can infer where something came from
223
+ - State changes are impossible to miss but easy to ignore afterward
224
+ - Nothing delays task flow
225
+ - The motion system feels consistent across controls
226
+ - Reduced motion preserves meaning
227
+ - The page stays smooth on target devices (no layout jank, no dropped frames)
228
+ - All motion uses `transform` and `opacity` as the primary tools
229
+ - Press and hover feedback use `scale()` and scale smoothly at 0.97–0.98
230
+ - Movement uses `translate()` with percentage values for responsive behavior
231
+ - Loading spinners rotate smoothly at 800ms without interruption
232
+ - The interface feels calmer after motion, not busier
233
+
234
+ STRICT RULE — NEVER BREAK THIS
235
+ Do not create report.md, any kind of report, summary, analysis file,
236
+ or extra documentation. This applies every time this file is used.
237
+ Generate no reports unless explicitly asked.