command-code 1.91.0 → 1.92.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 (35) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/bundled/command-code-knowledge/reference/custom-agents.md +1 -1
  3. package/dist/bundled/command-code-knowledge/reference/models.md +1 -0
  4. package/dist/bundled/command-code-knowledge/reference/product-help.md +1 -0
  5. package/dist/bundled/config/references/settings.md +1 -0
  6. package/dist/bundled/design/SKILL.md +25 -7
  7. package/dist/bundled/design/references/checkup.md +2 -2
  8. package/dist/bundled/design/references/color.md +10 -0
  9. package/dist/bundled/design/references/create.md +4 -0
  10. package/dist/bundled/design/references/design-html.md +3 -1
  11. package/dist/bundled/design/references/deslop.md +89 -15
  12. package/dist/bundled/design/references/finish.md +1 -1
  13. package/dist/bundled/design/references/media.md +112 -0
  14. package/dist/bundled/design/references/redesign.md +11 -0
  15. package/dist/bundled/design/references/relayout.md +11 -1
  16. package/dist/bundled/design/references/smell.md +5 -1
  17. package/dist/bundled/design/references/style-3d.md +23 -0
  18. package/dist/bundled/design/references/style-bento.md +21 -0
  19. package/dist/bundled/design/references/style-editorial.md +23 -0
  20. package/dist/bundled/design/references/style-futuristic.md +21 -0
  21. package/dist/bundled/design/references/style-glassmorphism.md +52 -0
  22. package/dist/bundled/design/references/style-maximalism.md +20 -0
  23. package/dist/bundled/design/references/style-minimalism.md +21 -0
  24. package/dist/bundled/design/references/style-neo-brutalism.md +21 -0
  25. package/dist/bundled/design/references/style-retro-futurism.md +21 -0
  26. package/dist/bundled/design/references/style-swiss.md +20 -0
  27. package/dist/bundled/design/references/style.md +77 -0
  28. package/dist/bundled/design/references/system.md +73 -0
  29. package/dist/bundled/design/references/typeset.md +10 -0
  30. package/dist/bundled/design/references/variants.md +193 -0
  31. package/dist/bundled/design/references/voice.md +2 -1
  32. package/dist/cli.mjs +5 -5
  33. package/package.json +1 -1
  34. package/vsix/commandcode-vscode.vsix +0 -0
  35. package/dist/bundled/design/references/tokenize.md +0 -124
@@ -17,6 +17,7 @@ This mode drives the full redesign. These files are reference material — consu
17
17
  - [shadow.md](shadow.md) — for correct depth decisions when setting or removing elevation
18
18
  - [motion.md](motion.md) — for correct timing and easing when defining the new motion personality
19
19
  - [button.md](button.md) — for correct control states when replacing the component language
20
+ - [media.md](media.md) — for sourcing, clearing, and verifying any new photo or video in the new treatment
20
21
 
21
22
  ---
22
23
 
@@ -180,7 +181,17 @@ A redesign that only covers the happy screenshot is unfinished.
180
181
  - Accessibility and performance are not worse
181
182
  - The result feels authored, not trend-composed
182
183
 
184
+ ## Design System Update
185
+
186
+ After the full redesign is complete, update the design-system artifacts following [references/system.md](system.md).
187
+
188
+ - If `.commandcode/design/design-system.md` exists — overwrite all sections with the new visual system (redesign replaces everything: palette, type, spacing, component tokens, anti-references).
189
+ - If it does not exist — create both `.commandcode/design/design-system.md` (full token spec) and `.commandcode/design/design-system.html` (visual preview using `references/design-html.md` as template).
190
+
191
+ Do this in the same turn. Never ask the user to run a separate command. Every token written must be backed by a real CSS custom property or Tailwind theme entry that components reference — not a value repeated by coincidence. See `references/system.md` for the strict rule.
192
+
183
193
  STRICT RULE — NEVER BREAK THIS
184
194
  Do not create report.md, any kind of report, summary, analysis file,
185
195
  or extra documentation. This applies every time this file is used.
186
196
  Generate no reports unless explicitly asked.
197
+ Exception: `.commandcode/design/design-system.md` and `.commandcode/design/design-system.html` are required design-system artifacts, not reports or extra documentation. The "Design System Update" section above applies to those two files and supersedes this rule for them only.
@@ -104,7 +104,7 @@ If everything is equally important, the layout has no opinion.
104
104
 
105
105
  ## Image And Text
106
106
 
107
- Images carry different jobs.
107
+ Images carry different jobs. Repositioning an image is only worth doing once it's a real, verified image — see [media.md](media.md) before wiring a new `src` into a relayout.
108
108
 
109
109
  A hero image can be the message. A feature image can explain a claim. A background image can set atmosphere. An inline image can support reading. A decorative image can be removed.
110
110
 
@@ -191,7 +191,17 @@ Diagonal balance can create energy. Random imbalance just feels off.
191
191
  - Desktop and mobile tell the same story
192
192
  - The composition still reads as a thumbnail
193
193
 
194
+ ## Design System Update
195
+
196
+ After all layout changes are complete, update the design-system artifacts following [references/system.md](system.md).
197
+
198
+ - If `.commandcode/design/design-system.md` exists — update the spacing scale and component tokens sections with the new layout decisions (grid, density, rhythm). Leave color, typography, and other sections untouched.
199
+ - If it does not exist — create both `.commandcode/design/design-system.md` (full token spec) and `.commandcode/design/design-system.html` (visual preview using `references/design-html.md` as template).
200
+
201
+ Do this in the same turn. Never ask the user to run a separate command. Every spacing or component token written must be backed by a real CSS custom property or Tailwind theme entry that components reference — not a value repeated by coincidence. See `references/system.md` for the strict rule.
202
+
194
203
  STRICT RULE — NEVER BREAK THIS
195
204
  Do not create report.md, any kind of report, summary, analysis file,
196
205
  or extra documentation. This applies every time this file is used.
197
206
  Generate no reports unless explicitly asked.
207
+ Exception: `.commandcode/design/design-system.md` and `.commandcode/design/design-system.html` are required design-system artifacts, not reports or extra documentation. The "Design System Update" section above applies to those two files and supersedes this rule for them only.
@@ -76,10 +76,14 @@ I look for the moment where the design stopped making project-specific decisions
76
76
 
77
77
  **Bounce everywhere**: motion that turns every interaction into a toy. Elastic easing applied because it was available.
78
78
 
79
- **Default type**: a common family used with no voice, no scale, no reason. The font that appeared because no choice was made.
79
+ **Default type**: a common family used with no voice, no scale, no reason. The font that appeared because no choice was made. A deliberate pairing with a tuned scale and weight contrast is not this odor, even when the family is popular. If the type fits its category too well, that is the Domain Default Trap, not a tell — it does not count toward the score.
80
80
 
81
81
  **Center stack**: everything aligned to the safe middle because no composition decision was made.
82
82
 
83
+ **Untokenized values**: the same color, spacing, radius, or font size repeated as raw literals across files instead of one shared token. No `design-system.md`, no CSS custom properties, no Tailwind theme entries — every component reinvents its own numbers. The clearest sign a system was never designed, only assembled one component at a time. When this is severe or widespread, prescribe replacing the repeated values with shared tokens and updating the design-system files.
84
+
85
+ **Broken or fabricated media**: a guessed image or video URL that 404s, or a stock placeholder standing in for a subject that was supposed to be specific. Never fetched, never verified, shipped anyway. See [media.md](media.md).
86
+
83
87
  ---
84
88
 
85
89
  ## The Domain Default Trap
@@ -0,0 +1,23 @@
1
+ # 3D: `/design style 3d`
2
+
3
+ I build one scene with real depth, light and material, so objects feel placed in space. Depth supports the content and the task. It never replaces them.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I put one 3D scene in the hero or a single focal area. The rest of the page stays flat, readable and fast.
16
+ - I choose the lightest tool that works. CSS 3D transforms cover tilt and stacked cards. Spline or Three.js (React Three Fiber) cover real models. I reuse what the project already ships.
17
+ - I often use a dark base for the scene. Live 3D product sites I checked pair it with 1px low-contrast line borders and a soft, colored glow under the scene rather than a hard shadow.
18
+ - I limit the scene to one key light, one fill light and a soft contact shadow, with two or three materials plus neutrals.
19
+ - I always provide a static poster of the scene, compressed as WebP or AVIF, for missing WebGL, low-power devices and reduced motion.
20
+ - Pointer or scroll may tilt or rotate the scene by a small amount. Reading and every control work without that motion.
21
+ - I keep the budget small: one canvas per page, a capped device pixel ratio (about 2), lazy-loaded models (a few MB at most) and no rendering while the scene is offscreen.
22
+ - The canvas is `aria-hidden` when decorative, or labelled with `role="img"` when it carries information. Text and controls never live only inside the 3D layer. Text over the scene keeps 4.5:1 contrast.
23
+ - I test 320px width, 200% zoom and keyboard order. The scene crops or scales without horizontal scrolling. Reduced motion stops all rotation.
@@ -0,0 +1,21 @@
1
+ # Bento: `/design style bento`
2
+
3
+ I make a small set of unequal tiles tell one clear story. Each tile has one job.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I lay the tiles on one grid with a 12 to 16px gap. A tile spans two to four columns and one or two rows.
16
+ - The grid is the page's composition, not a row of cards. At desktop width I use at least four tiles in at least two sizes, and at least one tile spans two rows. Two or three equal cards side by side are not bento. If the content is too thin for four tiles, I split existing content into tiles (a plan tile, a renewal tile, an invoices tile) and never invent new content to fill the grid.
17
+ - I give every tile the same corner radius, around 12px, and a 1px low-contrast border. I avoid heavy shadows.
18
+ - Each tile holds one headline, one proof element (a number, a screenshot or one short line) and at most one action.
19
+ - I put the largest tile where the main message starts, usually top left. Smaller tiles support it rather than compete.
20
+ - On mobile the tiles stack in DOM order, and each keeps its own internal layout.
21
+ - I test 320px width, 200% zoom and keyboard focus moving tile by tile. Hover effects never hide the content.
@@ -0,0 +1,23 @@
1
+ # Editorial: `/design style editorial`
2
+
3
+ I set the page like a printed article. Strong type hierarchy, a comfortable reading measure and images that carry the story. Controls stay quiet and rectangular.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I pair a serif for headlines and body text with a sans for navigation, labels and form controls. Print-led sites use a serif text face, a serif display face and a sans for UI, so the sans never carries long reading.
16
+ - I keep the system to two or three families. A heading face can be different from the text face, but the set stays small.
17
+ - I set body text in one column at a 60 to 75 character measure, with a line height near 1.6.
18
+ - I give the headline, deck, byline and date a clear order. The first screen says what the piece is about.
19
+ - I keep corners at 0 to 4px on images, cards and buttons. Pill-shaped buttons read as product UI, not editorial, so I avoid them.
20
+ - I separate sections with 1px rules and whitespace, not floating cards or heavy shadows.
21
+ - I use one accent for links and pull quotes. Buttons are a rectangle with a 1px border or a solid ink fill, never a gradient.
22
+ - I place images at deliberate sizes. Captions add information rather than repeat the headline.
23
+ - I test long headlines, 320px width and 200% zoom. Pull quotes and captions must follow the reading order.
@@ -0,0 +1,21 @@
1
+ # Futuristic: `/design style futuristic`
2
+
3
+ I design a present-day interface that looks built for what comes next. Precise geometry, fine lines and motion that explains state.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I use a geometric or neutral sans for interface text and a mono face for data, labels and timestamps. Production product sites I checked pair these two in the same way.
16
+ - I draw every boundary as a 1px hairline at low opacity. Controls use about 8px radii, large surfaces about 16px, and tags use full pills.
17
+ - I use one cool accent and one warm signal color for alerts. Both must pass contrast on the dark and light bases.
18
+ - I animate state changes only: a panel opens, a value updates, a step completes. Motion always means something.
19
+ - I label every control and status in plain words. Decorative charts must not imply live data unless they show real values.
20
+ - I test contrast on the accent and signal colors, and reduced motion, which turns off all non-essential animation.
21
+ - When the user asks for a cyberpunk or neon look, I push this style darker. I use a near-black base, two neon accents such as magenta and cyan, and a condensed technical display face for titles. Glow is only for focus rings, active states and key metrics. Scanlines, grid texture and glitch flashes stay on headers and section edges. Body text is never small neon on black, and reduced motion turns off all glitch and flicker.
@@ -0,0 +1,52 @@
1
+ # Glassmorphism: `/design style glassmorphism`
2
+
3
+ I build glass the way Apple's Liquid Glass does. It is a lens, not a frosted sticker. It picks up color from the scene behind it, intensifies that color, bends light at its edges and catches a highlight on its rim. The material stays on the control and navigation layer, and the content stays readable.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## What glass is, and what it is not
14
+
15
+ - Glass needs something behind it to work with: a photo, video, a map, artwork, or a colorful mesh field built from the brand or the hero image. Over a flat color, glass is just a gray box. In that case, I make the scene first.
16
+ - The color comes from the scene, not from a fill. A glass header over a sunset photo turns warm pink and orange. Over a sky it turns blue and yellow. I sample the colors behind the glass. I never paint a generic white tint at 10% everywhere.
17
+ - Glass is a layer that floats above the content. Navigation bars, tab bars, toolbars, segmented controls, pill buttons, sheets, popovers, and one hero header or stat panel can be glass. Lists, tables, articles, forms and dense charts sit on a solid surface below it.
18
+ - I never stack glass on glass. A control inside a glass panel is a solid fill, or a tinted capsule that is clearly darker or lighter than the panel.
19
+ - Clichés I avoid: purple-blue blob backgrounds with identical white cards, a glass card behind every section, a thick white border, and glass with no backdrop.
20
+
21
+ ---
22
+
23
+ ## The material, layer by layer
24
+
25
+ I build each glass element as a stack of absolutely positioned layers under the content, all sharing one `border-radius`:
26
+
27
+ 1. **Lens.** `backdrop-filter: blur(12px–24px) saturate(160%–190%)`, plus a little `brightness` to match the mode. Saturation makes the glass look like it is gathering light, not muddying it. For refraction on the hero or primary control, I add an SVG filter: `feTurbulence` (fractal noise, very low `baseFrequency` such as `0.003 0.007`, one octave) feeding `feDisplacementMap` (R/G channels). The displacement should be strongest at the edges, where the glass bends the scene, and quiet in the center.
28
+ 2. **Tint.** A thin wash that follows the scene: `rgb(255 255 255 / 0.08–0.2)` on dark scenes, `rgb(0 0 0 / 0.15–0.3)` behind light text on bright scenes. Capsule controls on a glass header get a darker tint than the header, so they read as separate pieces of glass.
29
+ 3. **Specular edge.** Inset highlights instead of a solid border: a bright top-left rim and a fainter bottom-right rim, for example `inset 1px 1px 0 rgb(255 255 255 / 0.5), inset -1px -1px 0 rgb(255 255 255 / 0.15)`, plus a soft linear sheen across the top third. On pointer devices, the sheen can follow the cursor slightly.
30
+ 4. **Depth.** A soft, wide outer shadow (`0 8px 32px rgb(0 0 0 / 0.12)`) and an optional faint white outer glow. No hard drop shadows.
31
+ 5. **Grain.** A 3–6% noise or fine dot texture over the tinted area stops banding and makes the material feel physical.
32
+ 6. **Content.** Text and icons sit on top, at full opacity.
33
+
34
+ For a large material field, like a hero or stats header over a photo, the glass dissolves into the content: the field fades from the blurred, saturated scene into a solid sheet where the lists and details live. Big numbers and titles go on the field. Fine print goes on the sheet.
35
+
36
+ ---
37
+
38
+ ## Shape and motion
39
+
40
+ - Shapes are concentric. An inner radius equals the outer radius minus the padding, so nested pills and cards share one center. Controls are capsules.
41
+ - Glass responds to touch and pointer with a small scale (1.01 on hover, 0.98 on press) and an elastic, springy return. Selected states can glide between positions, like a tab indicator sliding between tabs, rather than cross-fading.
42
+ - Content scrolling under a glass bar fades or blurs at the edge, so text never collides with the bar.
43
+ - Reduced motion turns off morphing, cursor-tracked sheen and displacement animation. The static material stays.
44
+
45
+ ---
46
+
47
+ ## Legibility and fallbacks
48
+
49
+ - Text on glass keeps 4.5:1 contrast against both the brightest and the darkest point of the scene behind it. I check both. If a scene is too busy, I darken the tint, add a dimming gradient under the text, or move the text onto the solid sheet.
50
+ - I use large, bold type on glass. I keep thin weights and small captions off it.
51
+ - SVG displacement inside `backdrop-filter` only works in Chromium. Elsewhere I keep the blur, saturation, tint and specular layers, which still read as glass. Without `backdrop-filter` (`@supports not`), or under `prefers-reduced-transparency: reduce`, the element falls back to an opaque surface sampled from the scene color.
52
+ - I test over a busy photo, over a bright area, over a dark area and over the plain fallback. The glass must stay readable on all of them, at 320px and at 200% zoom.
@@ -0,0 +1,20 @@
1
+ # Maximalism: `/design style maximalism`
2
+
3
+ I fill the interface with color, pattern, type and imagery. A clear hierarchy keeps the density readable and makes it look intentional.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I choose a bold palette of four to six colors and a strong pattern or texture. Each color has one job: surface, accent or text.
16
+ - I mix two or three type styles with clear size steps. The headline wins the eye before anything else.
17
+ - I group related content into blocks with thick borders or color fields so the density has structure.
18
+ - I keep the primary action and the main content area calm, with fewer competing patterns.
19
+ - I check that every piece of text sits on a surface with enough contrast, including patterned backgrounds.
20
+ - I test 320px width and 200% zoom. Dense blocks must reflow into one column without overlap or horizontal scrolling.
@@ -0,0 +1,21 @@
1
+ # Minimalism: `/design style minimalism`
2
+
3
+ I remove everything the task does not need. Space, one type family and one accent carry the interface.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I use a neutral canvas, one text color and one accent reserved for actions and the current state.
16
+ - I use one type family with two or three sizes per screen. Hierarchy comes from size and space. Clean product sites I checked each use a single sans, and some add a mono face for labels.
17
+ - I pick one corner radius for the whole product. The sites I checked range from 6px for tools to 12px for cards to full pills for friendly brands. I do not mix them.
18
+ - I separate sections with 1px rules at very low contrast, or with space alone. I avoid cards and shadows that add nothing.
19
+ - For buttons, a 2px bottom edge with no blur gives a tactile press without decoration.
20
+ - I keep icons at one size and stroke weight. I remove any element that does not help the task.
21
+ - I test long text, 320px width and 200% zoom. Empty space must not hide content or push controls off screen.
@@ -0,0 +1,21 @@
1
+ # Neo-brutalism: `/design style neo-brutalism`
2
+
3
+ I build a legible, deliberately blunt interface with solid color and hard edges. The structure stays disciplined.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I use a neutral canvas, dark ink and one or two assertive accents. Large headings carry the composition.
16
+ - I give emphasized elements a 3 to 6px solid ink border. Controls keep 2 to 3px. Radii stay between 0 and 4px.
17
+ - Hard offset shadows are a choice, not a default. I use an unblurred offset in ink or an accent on a few primary elements. Large production sites mostly use thin inset borders instead, so I do not put a shadow on every card.
18
+ - Buttons press into their shadow on hover and active. Focus gets a separate, visible outline.
19
+ - I use flat fills and visible alignment. I avoid frosted panels, glossy gradients and broken reading order.
20
+ - Errors, selected and disabled states use text or an icon as well as color.
21
+ - I test long labels and mobile wrapping. Headings cannot overlap controls or force horizontal scrolling.
@@ -0,0 +1,21 @@
1
+ # Retro-futurism: `/design style retro-futurism`
2
+
3
+ I choose one past vision of tomorrow and use it consistently. The style needs an era, not a random pile of science-fiction effects.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I state the direction in one sentence: for example, a 1960s space-age travel desk or a 1980s orbital computer. I pick one before choosing tokens.
16
+ - I pick one era of vision. Googie and Atomic Age (1950s–60s) bring upswept roofs, boomerangs, starbursts and chrome. Cassette futurism (1970s–80s) brings analog screens, beige hardware and amber phosphor.
17
+ - I derive the palette and shapes from that direction. Space-age can use cream, orange and capsule forms; an electronic direction can use dark ink, phosphor accents and instrument rules.
18
+ - I use display lettering for short titles and a readable companion for body text. Labels describe real actions rather than invented cockpit jargon.
19
+ - I limit chrome, glow, orbital diagrams or scanlines to supporting decoration. Text and controls stay crisp with solid backing.
20
+ - I keep native navigation and familiar forms. Decorative radar or gauges must not imply live data unless they display real values.
21
+ - I disable flicker and remove nonessential movement for reduced motion. I verify contrast, focus and mobile reading order with every decorative layer enabled.
@@ -0,0 +1,20 @@
1
+ # Swiss: `/design style swiss`
2
+
3
+ I make the typographic grid do the work. Alignment, scale and spacing set the hierarchy with little ornament.
4
+
5
+ ---
6
+
7
+ ## Required companion reference
8
+
9
+ I follow the [style workflow](style.md) for report context, scope, implementation and verification. The command loads it alongside this guide.
10
+
11
+ ---
12
+
13
+ ## The design pass
14
+
15
+ - I use one neutral grotesk or Helvetica-family sans with two or three weights. Headline scale, not extra fonts, creates the contrast.
16
+ - I align headings, metadata, images and body text to shared edges on a modular grid. Asymmetry is deliberate and the reading order stays clear.
17
+ - I structure the page with 1px hairline rules at low contrast. I avoid shadows, gradients and decorative card wrappers.
18
+ - I use one accent color, and only for actions and the current state.
19
+ - I start body text at 16 to 18px with a 55 to 75 character measure, aligned left.
20
+ - I collapse columns in DOM order on mobile and test 200% zoom. Visible focus, labels and empty states still apply.
@@ -0,0 +1,77 @@
1
+ # Style: `/design style`
2
+
3
+ I apply one named visual direction to real files. I preserve the requested content, behavior and scope.
4
+
5
+ ---
6
+
7
+ ## Pre-execution checklist
8
+
9
+ I check `.commandcode/design/` for `checkup-report.md`, `review-report.md` and `smell-report.md`. I read any existing reports and apply relevant findings during this pass. If none exist, I proceed normally.
10
+
11
+ ---
12
+
13
+ ## The direction
14
+
15
+ `/design style <name> [target]` loads the selected guide directly. If no name was supplied, I show these choices and ask for one before changing files. An unknown name gets the same list, never a silently substituted style.
16
+
17
+ - `bento`: [Bento](style-bento.md). I make a small set of unequal tiles tell one clear story.
18
+ - `neo-brutalism`: [Neo-brutalism](style-neo-brutalism.md). I build a legible, deliberately blunt interface with solid color and hard edges.
19
+ - `glassmorphism`: [Glassmorphism](style-glassmorphism.md). I build Liquid Glass-style lenses that pick up, bend and tint the scene behind floating controls.
20
+ - `retro-futurism`: [Retro-futurism](style-retro-futurism.md). I choose one past vision of tomorrow and use it consistently.
21
+ - `swiss`: [Swiss](style-swiss.md). I make the typographic grid do the work.
22
+ - `3d`: [3D](style-3d.md). I build one scene with real depth, light and material, with a static fallback.
23
+ - `minimalism`: [Minimalism](style-minimalism.md). I remove everything the task does not need.
24
+ - `editorial`: [Editorial](style-editorial.md). I set the page like a printed article.
25
+ - `futuristic`: [Futuristic](style-futuristic.md). I design a present-day interface built for what comes next.
26
+ - `maximalism`: [Maximalism](style-maximalism.md). I fill the interface with color, pattern and type, held together by hierarchy.
27
+
28
+ ---
29
+
30
+ ## Foundations
31
+
32
+ A style guide decides how things look. It does not teach me how to lay out a page, build a button or set type. Before I change files, I read the foundation guides for every part the target touches:
33
+
34
+ | The target has | I read |
35
+ |---|---|
36
+ | Any page, screen or section | [layout.md](layout.md) |
37
+ | Buttons, links that act as buttons, toggles | [button.md](button.md) |
38
+ | Headings, body copy, labels, numbers | [typeset.md](typeset.md) |
39
+ | A palette, accents, states, dark mode | [color.md](color.md) |
40
+ | Depth: shadows, elevation, overlays | [shadow.md](shadow.md) |
41
+ | Edges: borders, dividers, outlines | [border.md](border.md) |
42
+ | Hover, focus, press, loading, errors, forms | [interaction.md](interaction.md) |
43
+ | Transitions or animation | [motion.md](motion.md) |
44
+ | More than one viewport | [responsive.md](responsive.md) |
45
+ | Any control, form, overlay or motion | [accessibility.md](accessibility.md) |
46
+ | An app, dashboard or tool | [surface.md](surface.md) |
47
+ | A landing, marketing or portfolio page | [voice.md](voice.md) |
48
+
49
+ ---
50
+
51
+ ## The implementation pass
52
+
53
+ 1. I read the selected guide and the foundation guides above, inspect the existing UI and project taste, and consume relevant existing design reports. I identify the target and its primary task. If there is no existing UI, I build it from scratch with [create.md](create.md), in the selected style.
54
+ 2. I pick a small token set for type, spacing, color, edges and depth. I state the direction in one sentence and implement it across the requested target, including loading, empty, error and selected states where applicable.
55
+ 3. I treat explicit style selection as permission to use its defining techniques, including bento tiles, hard shadows or glass, even when generic anti-slop advice discourages them. Accessibility and functionality still apply.
56
+ 4. I check 320px reflow, desktop, long content, 200% zoom, keyboard order and visible focus. Normal text needs 4.5:1 contrast, large text and necessary control boundaries need 3:1. I honor reduced motion and provide solid material fallbacks.
57
+ 5. I inspect the rendered result when tools allow, fix mismatches and report the files changed and checks actually run. I never claim a visual check I could not perform.
58
+
59
+ ## Scope and states
60
+
61
+ - A style changes how the target looks, not what it contains. I keep the original's sections, fields, data and copy. I do not add new settings, toggles, badges, environment labels, sample records or sections that were not there. If the style seems to need more content, I say so in the reply instead of inventing it.
62
+ - The page loads in its default state. Error, empty and loading states exist and can be reached, but they stay hidden at rest. A form never shows a validation error under a valid value on load.
63
+ - When I hide state with the `hidden` attribute, I add `[hidden] { display: none !important; }`. Any `display: flex` or `display: grid` rule on the same element otherwise overrides `hidden` and shows every error and empty state at once.
64
+ - Every icon gets an explicit size, `width` and `height` attributes on the `<svg>` or a CSS size on its class. An unsized inline SVG grows to fill its container.
65
+ - Table headers line up with their columns and keep a gap between them. Status markers and badges never overlap the value beside them.
66
+
67
+ ## Verification limits
68
+
69
+ - Screenshots, probe pages, contrast scripts and other check files go in the system temp directory, never in the project. I delete any I created before I reply, and `git status` shows only the files the style changed.
70
+ - I verify once: one render at desktop and one at 320px, one contrast check of the final tokens, then one round of fixes. I do not loop on re-tuning colors or re-rendering. If a check needs a tool I don't have or a command the user has not approved, I skip it and say so.
71
+
72
+ ## Assets
73
+
74
+ - Icons come from one established set. If the project already uses one, I keep it. Otherwise I use Lucide or Hugeicons: installed as a package and imported by name when the project has a package manager, or copied as that set's SVG files when it is plain HTML with no build step. I do not hand-draw icons or mix sets.
75
+ - Photos and video come from Unsplash, Pexels or Pixabay when I can search them, chosen for what the content needs. I check each license and keep the attribution it requires. If I cannot reach them, I keep the project's existing imagery and say so instead of inventing image URLs.
76
+
77
+ I keep the implementation small enough for one person to maintain. I reuse the existing stack and assets; a style does not justify a new animation library or a rewrite.
@@ -0,0 +1,73 @@
1
+ # Design System: `design-system.md` and `design-system.html`
2
+
3
+ I own two artifacts: `.commandcode/design/design-system.md` (the token spec) and `.commandcode/design/design-system.html` (the visual preview). Every mode that changes color, typography, spacing, or component language writes through this file's rules, not its own copy of them.
4
+
5
+ Extraction, not invention. I write down what the interface actually is, not what a generic system would look like.
6
+
7
+ ---
8
+
9
+ ## What `design-system.md` contains
10
+
11
+ - **Register:** brand or product
12
+ - **Color system:** full palette in OKLCH + hex, semantic roles (background, surface, text, accent, error, success, warning, border), dark/light strategy
13
+ - **Typography:** font families (display, body, mono), scale with rem values (xs → 6xl), weights, line-heights, letter-spacing
14
+ - **Spacing scale:** base unit and named steps
15
+ - **Component tokens:** border radius strategy, shadow levels, focus ring style
16
+ - **Button system:** primary, secondary, ghost, danger variant specs
17
+ - **Motion:** duration scale, easing functions
18
+ - **Anti-references:** what this design must not look or feel like
19
+
20
+ ## What `design-system.html` contains
21
+
22
+ A visual preview — color swatches, type specimens, button variants, component examples — generated using the structure in [references/design-html.md](design-html.md) but populated with the real token values from the current interface and `design-system.md`. Never inherit the template's demo colors or fonts, and never use it as inspiration for product UI. Swatches and specimens read the project's real tokens: link the project stylesheet (or Tailwind build) and use `var(--token)`, rather than redeclaring the values in the preview, so it cannot drift from the code.
23
+
24
+ ---
25
+
26
+ ## STRICT — Tokens must be real, not just documented
27
+
28
+ Writing a color or size into `design-system.md` is not the deliverable. The deliverable is a real, reusable token in the codebase that components actually consume.
29
+
30
+ - Every color, spacing, radius, or type value in `design-system.md` must exist as a real CSS custom property (`:root { --color-primary: oklch(...); }`) or a Tailwind theme entry (`theme.extend.colors`, `theme.extend.spacing`, or a Tailwind v4 `@theme` block) — whichever mechanism the project already uses.
31
+ - Components must reference the token (`var(--color-primary)`, `bg-primary`, `text-[length:--step-2]`), not repeat the literal value. Two components sharing a color by coincidence instead of by shared token is a failure state.
32
+ - I document only tokens real UI consumes. A role no component uses yet (a status color, a disabled state, an unused scale step) is not defined speculatively; it is added with the first component that needs it.
33
+ - In the sections I touched, no raw literals remain in component CSS — gradients, shadows, and overlays included. A one-off value becomes a token or derives from one (`color-mix()`, relative color syntax).
34
+ - If I document a value in `design-system.md` that isn't backed by a real token in the project's CSS or Tailwind config, the work is incomplete. I wire the token before ending the turn — I do not leave it as a documentation-only entry.
35
+ - This rule is not optional and is not satisfied by good intentions in the markdown file. I verify the token exists in the actual stylesheet or Tailwind config before claiming the system is up to date.
36
+ - Scope: the wiring duty covers the sections the calling mode touched. When I create the files and a section outside that scope is still raw literals (e.g. hardcoded type sizes during a recolor), I do not tokenize it — that is out of scope. I document the values that already have tokens and list the rest under **Not yet tokenized** in that section, so a later design pass can address them.
37
+
38
+ ---
39
+
40
+ ## How I update the files
41
+
42
+ I check whether `.commandcode/design/design-system.md` exists.
43
+
44
+ **If it exists** — I overwrite only the section(s) the calling mode touched (color/recolor → color system section only, typeset → typography only, relayout → spacing/component tokens, redesign → every section). I leave the rest untouched.
45
+
46
+ **If it does not exist** — I create both files in the same turn: `design-system.md` (full token spec) and `design-system.html` (visual preview, using `references/design-html.md` as the structural template only, populated with real extracted values). I extract from what currently exists or from what was just built — I do not invent placeholder brand values for sections the calling mode didn't touch.
47
+
48
+ I never ask the user to run a separate command to get these files. They are written as part of the mode that triggered the change.
49
+
50
+ ---
51
+
52
+ ## What I refuse
53
+
54
+ - Inventing token values that aren't grounded in the real interface or the work just done
55
+ - Leaving a documented value without a matching real CSS/Tailwind token
56
+ - Overwriting sections the calling mode didn't touch
57
+ - Creating report.md, a summary, or any documentation file beyond these two artifacts
58
+ - Treating `design-system.html`'s CMD/industrial template aesthetic as inspiration for product UI
59
+
60
+ ## How I know it worked
61
+
62
+ - `design-system.md` reflects the real, current interface — not generic defaults
63
+ - `design-system.html` renders from the project's own stylesheet, not template placeholders or a redeclared copy of the tokens
64
+ - Every documented token has a matching CSS custom property or Tailwind theme entry, and at least one real component references it; out-of-scope raw values are listed under **Not yet tokenized**, not presented as tokens
65
+ - Sections untouched by the calling mode are unchanged
66
+ - No extra report or documentation files were created
67
+
68
+ ---
69
+
70
+ STRICT RULE — NEVER BREAK THIS
71
+ Do not create report.md, any kind of report, summary, analysis file,
72
+ or extra documentation beyond `design-system.md` and `design-system.html`.
73
+ This applies every time this file is used.
@@ -194,7 +194,17 @@ The taste above decides what to do. This decides how to write it. I write every
194
194
  - The system works with long strings and short labels
195
195
  - The page would still feel designed if color disappeared
196
196
 
197
+ ## Design System Update
198
+
199
+ After all typography changes are complete, update the design-system artifacts following [references/system.md](system.md).
200
+
201
+ - If `.commandcode/design/design-system.md` exists — update only the typography section (font families, scale, weights, line-heights, letter-spacing). Leave color, spacing, and component sections untouched.
202
+ - If it does not exist — create both `.commandcode/design/design-system.md` (full token spec) and `.commandcode/design/design-system.html` (visual preview using `references/design-html.md` as template) by extracting non-typography sections from the current interface — list any of their values that are still raw literals under **Not yet tokenized** rather than wiring them (do not invent new color/spacing/component decisions in a typeset pass).
203
+
204
+ Do this in the same turn. Never ask the user to run a separate command. Every type-scale value written must be backed by a real CSS custom property or Tailwind theme entry that components reference — not a value repeated by coincidence. See `references/system.md` for the strict rule.
205
+
197
206
  STRICT RULE — NEVER BREAK THIS
198
207
  Do not create report.md, any kind of report, summary, analysis file,
199
208
  or extra documentation. This applies every time this file is used.
200
209
  Generate no reports unless explicitly asked.
210
+ Exception: `.commandcode/design/design-system.md` and `.commandcode/design/design-system.html` are required design-system artifacts, not reports or extra documentation. The "Design System Update" section above applies to those two files and supersedes this rule for them only.