command-code 1.92.0 → 1.93.1

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 (92) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +1 -1
  3. package/vsix/commandcode-vscode.vsix +0 -0
  4. package/dist/bundled/agent-browser/SKILL.md +0 -73
  5. package/dist/bundled/command-code-knowledge/SKILL.md +0 -68
  6. package/dist/bundled/command-code-knowledge/live-models.ts +0 -284
  7. package/dist/bundled/command-code-knowledge/reference/byok.md +0 -389
  8. package/dist/bundled/command-code-knowledge/reference/custom-agents.md +0 -341
  9. package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +0 -423
  10. package/dist/bundled/command-code-knowledge/reference/headless.md +0 -381
  11. package/dist/bundled/command-code-knowledge/reference/hooks.md +0 -1107
  12. package/dist/bundled/command-code-knowledge/reference/mcp.md +0 -636
  13. package/dist/bundled/command-code-knowledge/reference/memory.md +0 -137
  14. package/dist/bundled/command-code-knowledge/reference/models.md +0 -145
  15. package/dist/bundled/command-code-knowledge/reference/permissions.md +0 -486
  16. package/dist/bundled/command-code-knowledge/reference/plan-mode.md +0 -283
  17. package/dist/bundled/command-code-knowledge/reference/plans.md +0 -16
  18. package/dist/bundled/command-code-knowledge/reference/product-help.md +0 -490
  19. package/dist/bundled/command-code-knowledge/reference/sessions.md +0 -377
  20. package/dist/bundled/command-code-knowledge/reference/skills.md +0 -1009
  21. package/dist/bundled/command-code-knowledge/reference/tools.md +0 -522
  22. package/dist/bundled/config/SKILL.md +0 -18
  23. package/dist/bundled/config/references/permissions.md +0 -27
  24. package/dist/bundled/config/references/settings.md +0 -49
  25. package/dist/bundled/design/SKILL.md +0 -441
  26. package/dist/bundled/design/references/accessibility.md +0 -404
  27. package/dist/bundled/design/references/border.md +0 -161
  28. package/dist/bundled/design/references/button.md +0 -192
  29. package/dist/bundled/design/references/checkup.md +0 -162
  30. package/dist/bundled/design/references/color.md +0 -245
  31. package/dist/bundled/design/references/create.md +0 -291
  32. package/dist/bundled/design/references/design-html.md +0 -227
  33. package/dist/bundled/design/references/deslop.md +0 -283
  34. package/dist/bundled/design/references/finish.md +0 -156
  35. package/dist/bundled/design/references/interaction.md +0 -186
  36. package/dist/bundled/design/references/layout.md +0 -216
  37. package/dist/bundled/design/references/media.md +0 -112
  38. package/dist/bundled/design/references/motion.md +0 -237
  39. package/dist/bundled/design/references/redesign.md +0 -197
  40. package/dist/bundled/design/references/refine.md +0 -193
  41. package/dist/bundled/design/references/relayout.md +0 -207
  42. package/dist/bundled/design/references/report-html.md +0 -235
  43. package/dist/bundled/design/references/responsive.md +0 -233
  44. package/dist/bundled/design/references/review.md +0 -164
  45. package/dist/bundled/design/references/setup.md +0 -119
  46. package/dist/bundled/design/references/severity.md +0 -111
  47. package/dist/bundled/design/references/shadow.md +0 -164
  48. package/dist/bundled/design/references/smell.md +0 -211
  49. package/dist/bundled/design/references/style-3d.md +0 -23
  50. package/dist/bundled/design/references/style-bento.md +0 -21
  51. package/dist/bundled/design/references/style-editorial.md +0 -23
  52. package/dist/bundled/design/references/style-futuristic.md +0 -21
  53. package/dist/bundled/design/references/style-glassmorphism.md +0 -52
  54. package/dist/bundled/design/references/style-maximalism.md +0 -20
  55. package/dist/bundled/design/references/style-minimalism.md +0 -21
  56. package/dist/bundled/design/references/style-neo-brutalism.md +0 -21
  57. package/dist/bundled/design/references/style-retro-futurism.md +0 -21
  58. package/dist/bundled/design/references/style-swiss.md +0 -20
  59. package/dist/bundled/design/references/style.md +0 -77
  60. package/dist/bundled/design/references/surface.md +0 -163
  61. package/dist/bundled/design/references/system.md +0 -73
  62. package/dist/bundled/design/references/typeset.md +0 -210
  63. package/dist/bundled/design/references/variants.md +0 -193
  64. package/dist/bundled/design/references/voice.md +0 -184
  65. package/dist/bundled/design/references/writing.md +0 -174
  66. package/dist/bundled/loop/SKILL.md +0 -16
  67. package/dist/bundled/mod-builder/SKILL.md +0 -135
  68. package/dist/bundled/mod-builder/examples/block-dangerous-commands.ts +0 -41
  69. package/dist/bundled/mod-builder/examples/custom-entry-renderer.ts +0 -32
  70. package/dist/bundled/mod-builder/examples/custom-tool.ts +0 -53
  71. package/dist/bundled/mod-builder/examples/flags-and-options.ts +0 -29
  72. package/dist/bundled/mod-builder/examples/input-shortcuts.ts +0 -41
  73. package/dist/bundled/mod-builder/examples/kitchen-sink.ts +0 -129
  74. package/dist/bundled/mod-builder/examples/lifecycle-hooks.ts +0 -64
  75. package/dist/bundled/mod-builder/examples/model-router.ts +0 -43
  76. package/dist/bundled/mod-builder/examples/observe-events.ts +0 -30
  77. package/dist/bundled/mod-builder/examples/pane-and-buttons.ts +0 -60
  78. package/dist/bundled/mod-builder/examples/pane-form.ts +0 -68
  79. package/dist/bundled/mod-builder/examples/permission-policy.ts +0 -34
  80. package/dist/bundled/mod-builder/examples/redact-secrets.ts +0 -46
  81. package/dist/bundled/mod-builder/examples/slash-command.ts +0 -33
  82. package/dist/bundled/mod-builder/examples/spinner-count.ts +0 -47
  83. package/dist/bundled/mod-builder/examples/stream-filter.ts +0 -70
  84. package/dist/bundled/mod-builder/reference/api.md +0 -140
  85. package/dist/bundled/mod-builder/reference/hooks-and-events.md +0 -347
  86. package/dist/bundled/mod-builder/reference/overview.md +0 -271
  87. package/dist/bundled/mod-builder/reference/packaging.md +0 -187
  88. package/dist/bundled/mod-builder/reference/ui.md +0 -253
  89. package/dist/bundled/mod-builder/reference/verify.md +0 -67
  90. package/dist/bundled/skill-builder/SKILL.md +0 -104
  91. package/dist/cli.mjs +0 -16
  92. package/dist/index.mjs +0 -2
@@ -1,210 +0,0 @@
1
- # Typography: `/design typeset`
2
-
3
- I use type to make thought visible. Fonts are only one part of it. The real work is rhythm, hierarchy, measure, voice, loading behavior, and the tiny details that make reading feel effortless.
4
-
5
- Most generic design starts with a default font and a timid scale. I start with the content and the distance from the reader.
6
-
7
- ---
8
-
9
- ## Type Follows Composition
10
-
11
- The work pattern decides how type behaves.
12
-
13
- Monitor screens need labels, deltas, timestamps, thresholds, and compact hierarchy.
14
-
15
- Operate screens need tool names, object names, status text, shortcuts, and fast confirmation.
16
-
17
- Compare screens need aligned numbers, durable headers, scannable row text, and steady labels.
18
-
19
- Configure screens need field labels, helper text, validation, section titles, and summary language.
20
-
21
- Learn screens need long-form rhythm, generous measure, clear headings, and progress markers.
22
-
23
- Decide screens need a strong claim, proof hierarchy, objections, and one action label.
24
-
25
- Explore screens need search language, filters, tags, result titles, and metadata that can be skimmed.
26
-
27
- I do not force a marketing type scale onto product work or a product type scale onto brand memory.
28
-
29
- ---
30
-
31
- ## System Bar
32
-
33
- `/design typeset` creates or repairs a type system. It is not a font-size tweak.
34
-
35
- At minimum, I apply readable body text, a clear heading scale, durable labels, button text, form text, metadata, empty/error/loading copy, line-height, measure, weight contrast, and responsive behavior.
36
-
37
- If I change fonts, I verify the font is actually loaded or available. A font name in a style value does not count if the browser falls back silently.
38
-
39
- Changing only the hero headline or one paragraph is not enough unless the user explicitly asked for that one element.
40
-
41
- ---
42
-
43
- ## What Type Must Do
44
-
45
- Type has three jobs.
46
-
47
- - Make the page understandable at a glance
48
- - Make the content comfortable to read
49
- - Give the surface a voice that matches its register
50
-
51
- If a type choice does not help one of those jobs, I replace it.
52
-
53
- ---
54
-
55
- ## Reading Distance
56
-
57
- I do not assume body text is fine because it is a common size. Phone, laptop, monitor, and TV are different reading situations.
58
-
59
- Short, close interfaces can run tighter. Large displays and long reading contexts need more size, more line-height, and more controlled measure. Product UI can be dense. Brand display can be loud. Body copy still needs mercy.
60
-
61
- ---
62
-
63
- ## Content Length Rules The Measure
64
-
65
- I match line-height and width to the text itself.
66
-
67
- Microcopy wants tight leading and fast recognition. Short-form text wants two clean lines at most. Paragraphs want a comfortable measure, usually around the classic readable band. Long-form wants more air, not more decoration.
68
-
69
- If a paragraph sprawls across the viewport, the layout is asking the reader to do the designer's work.
70
-
71
- ---
72
-
73
- ## Font Choice
74
-
75
- For brand work, I use the physical-object method. I name the brand as a thing I can hold or see: a museum caption, a club flyer, a diner receipt, a technical manual, a ceramic stamp, a field notebook. Then I pick type that belongs to that object.
76
-
77
- I ask whether the font choice carries any project-specific reason. A font that appears in every second launched product signals nothing — it just means the decision was not made. The brand already owns it, or it was the path of least resistance.
78
-
79
- That test applies to whatever family is currently over-used. The answer changes over time; the question does not.
80
-
81
- For product work, a strong system stack or one well-tuned sans is often the best choice. Product type should help operators move fast. It does not need a costume.
82
-
83
- ---
84
-
85
- ## Pairing & Font System
86
-
87
- Add a second family only when it creates real contrast in structure, proportion, texture, or voice.
88
-
89
- **The non-obvious truth:** One well-chosen font in multiple weights (Regular, Medium, Semibold, Bold + Italics) creates cleaner hierarchy than two competing faces. Only add a second font when you need genuine contrast.
90
-
91
- **Bad pairing patterns:**
92
- - Two similar geometric sans (tension without hierarchy)
93
- - Fonts that compete for the same visual space
94
- - A third font with no distinct job
95
- **The pairing check:**
96
- - Does the display font differ from body in x-height, stroke contrast, or width?
97
- - Does each family serve a distinct job (headline vs body vs UI)?
98
- - Would removing one font break the visual system?
99
- If any answer is no, use one family with stronger weights instead.
100
-
101
- **Three-font system (when justified):**
102
- - **Display/Heading:** Bold personality, high contrast (serif, geometric, custom)
103
- - **Body/Paragraph:** High readability, moderate x-height, comfortable at small sizes (humanist sans, system stack, text serif)
104
- - **UI/Badge:** Compact, clear at small sizes, tabular numerals (condensed sans, mono, or body with tighter tracking)
105
- Use three fonts only when each serves a visibly distinct purpose. Most work is better served by two fonts or one strong family.
106
-
107
- ---
108
-
109
- ## Hierarchy
110
-
111
- Each text block needs a clear chain: hook, bridge, detail. More levels create fog. Fewer levels flatten the message.
112
-
113
- Hierarchy can come from size, weight, color, position, spacing, and casing. Size alone is crude. The best systems combine two or three dimensions and keep the rest quiet.
114
-
115
- Brand pages can use dramatic jumps. Product surfaces use compressed steps with weight and color doing more of the work.
116
-
117
- ---
118
-
119
- ## Dark Surfaces
120
-
121
- Light type on dark backgrounds needs compensation. It reads thinner in some ways and brighter in others. I give it more line-height, a touch more spacing when needed, and a weight that feels optically correct.
122
-
123
- I test it with real content, not a perfect headline.
124
-
125
- ---
126
-
127
- ## Details I Do Not Skip
128
-
129
- - Tabular numbers for data, metrics, prices, and aligned values
130
- - Balanced heading wraps where support exists
131
- - Better paragraph wraps where support exists
132
- - Small caps only when the font actually supports them
133
- - Extra tracking for short all-caps labels
134
- - No decorative faces for body text
135
- - No widows, orphaned single words, or ugly rivers in important prose
136
- - Font loading that avoids obvious layout shift
137
-
138
- ---
139
-
140
- ## Type Mechanics
141
-
142
- The taste above decides what to do. This decides how to write it. I write every fix in the project's own styling system, never a second one alongside it.
143
-
144
- **Wrapping.** `text-wrap: balance` on headings, `text-wrap: pretty` on descriptions. Both, together, on a heading-plus-subtitle pair. Neither in long-form: browsers ignore `balance` past a few lines, and evening out a whole article wastes space and slows reading. `overflow-wrap: break-word` wherever a long word, URL, or ID could escape its container. `white-space: nowrap` on labels and badges where a break looks broken.
145
-
146
- **Measure.** 60–75 characters. `65ch` measures it directly, but a rem or pixel cap is equally valid — at a 16px body size the range lands roughly between 560px and 680px, so Tailwind's `max-w-xl` or `max-w-2xl` fit. What matters is that a cap exists and the rendered line length sits in range; I recheck it if the body size changes.
147
-
148
- **Line-height by role.** Headings near `1.1`, body `1.5`–`1.6`, always unitless so it scales with the font size — `line-height: 24px` does not. Tight leading is for short text: anything that wraps to three or more lines needs at least `1.4`, even in a height-constrained card.
149
-
150
- **Weight floors.** Below `18px`, stay at weight `400` or heavier. Weights under `300` are display-only at `28px`+; they disappear at text sizes. Long-form body starts near `16px`; UI text can go to `14px` for inputs and menus, `13px` for captions, rarely below `12px`.
151
-
152
- **Properties over raw tags.** `font-weight: 650`, not `font-variation-settings: "wght" 650`. `font-optical-sizing: auto`, not `"opsz"`. `font-variant-numeric: tabular-nums`, not `font-feature-settings: "tnum" 1`. Properties keep working when a non-variable fallback renders; raw settings silently do nothing. Raw tags are for custom axes (`"GRAD" 80`) and numbered slots (`"ss01"`) that have no property of their own.
153
-
154
- **Synthesis.** Browsers may fake a weight or style the family does not ship. I load the faces the design actually uses. `font-synthesis: none` goes on only after I have verified that every required bold, italic, small-cap, superscript, and subscript form stays visually distinct across the whole fallback stack — it is not a diagnostic, and it must never erase emphasis. If only one mode is unwanted, I use the longhand.
155
-
156
- **Truncation.** Single line is `text-overflow: ellipsis` with `overflow: hidden` and `white-space: nowrap`. Multiple lines is `line-clamp`. Truncation hides content, so if the missing text matters, the full value stays reachable in a tooltip or an expanded view.
157
-
158
- **Underlines.** Pull position and thickness from the font with `text-underline-position: from-font` and `text-decoration-thickness: from-font`, or tune with `text-underline-offset` and `text-decoration-skip-ink`. A dotted underline is the conventional hint that a word carries extra information. Color is the only part of a real underline that animates reliably — anything else, I build the underline as a separate element.
159
-
160
- **Punctuation.** Copy is stored in natural case and presented with `text-transform`, so a redesign never means rewriting strings. Curly quotes in prose and straight quotes in code. En dash for ranges (`2010–2020`). The single `…` character, not three periods. ` ` to keep `16 px` together, `­` to control where a long word may break. Em dashes stay out of generated UI copy for this project — see [writing.md](writing.md).
161
-
162
- **Rendering and language.** `-webkit-font-smoothing: antialiased` plus `-moz-osx-font-smoothing: grayscale` once at the root, never per component. `lang` set so the browser picks the right quotes, hyphenation, and pronunciation; `dir` set at the boundary where direction changes. Digit order never reverses in RTL — I wrap mixed-direction values in `<bdi>` rather than fighting the bidi algorithm. A paragraph of three or more lines aligns to its own script's direction; `text-align: start` with correct `lang`/`dir` handles it.
163
-
164
- **Selection stays on.** `user-select: none` belongs only on a specific draggable or gesture surface where accidental selection demonstrably breaks the interaction — never across application chrome because a button label can be highlighted.
165
-
166
- **Mobile inputs.** iOS Safari zooms the page when an input's text is under `16px`. Two fixes hold the size differently, so I ask which the design wants rather than choosing silently: size the input up on small screens (`text-base sm:text-sm`), which changes how it looks, or keep `font-size: 16px` and render the intended size with `transform: scale()`, compensating width and line-height so the design is identical everywhere. Details: [responsive.md](responsive.md#ios-safari-input-zoom).
167
-
168
- ---
169
-
170
- ## What I Refuse
171
-
172
- - Choosing the first trendy family that fits the category
173
- - Calling one headline resize a typography pass
174
- - Naming a font that is not actually loaded or available
175
- - A flat scale where everything is almost the same size
176
- - Body text wider than comfortable reading allows
177
- - All-caps paragraphs
178
- - Display fonts in product labels
179
- - A third font with no distinct job
180
- - Tiny mobile text to preserve a desktop layout
181
- - Broken fallback metrics that make text jump
182
-
183
- ---
184
-
185
- ## How I Know The Type Is Working
186
-
187
- - Type changes appear across real content, not only the hero
188
- - The loaded or available font matches the claimed type choice
189
- - The primary message reads before the decoration
190
- - Body text can be read without effort
191
- - The type voice matches the surface register
192
- - Numbers align cleanly
193
- - Headings break with intention
194
- - The system works with long strings and short labels
195
- - The page would still feel designed if color disappeared
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
-
206
- STRICT RULE — NEVER BREAK THIS
207
- Do not create report.md, any kind of report, summary, analysis file,
208
- or extra documentation. This applies every time this file is used.
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.
@@ -1,193 +0,0 @@
1
- # `/design variants`
2
-
3
- I make alternative directions of one design, so the user can compare them and pick one. Then I apply the picked variant to the actual design. Every variant solves the same job with the same content, flows, and states. Only the design direction changes.
4
-
5
- This mode writes files on purpose. The viewer at `.commandcode/variants/index.html` is the deliverable the user asked for, not a mockup or a report. I create no markdown reports.
6
-
7
- ---
8
-
9
- ## Step 1: Always ask how many
10
-
11
- Before I read the project or change any file, I call `ask_user_question` with one question:
12
-
13
- - Question: "How many variants should I make?"
14
- - Header: "Variants"
15
- - Options:
16
- - "3 variants (Recommended)": three distinct directions, all visible on one screen.
17
- - "4 variants": four directions, shown two at a time.
18
-
19
- The user can type another number through Other. I accept 2 to 6. For anything else I ask once more and name the range. I ask every time, even when the prompt already contains a number. I wait for the answer before I continue.
20
-
21
- ---
22
-
23
- ## Step 2: Find the design
24
-
25
- I check whether the project has interface code. I look for `.html`, `.css`, `.js`, `.ts`, `.jsx`, `.tsx`, `.vue`, or `.svelte` files, using the same test as the bare `/design` routing. Files under `.commandcode/` do not count.
26
-
27
- - **Interface exists:** the target is the design the user named. If no target was given, I pick the main screen from the prompt and the project, and I name it in my reply.
28
- - **Project is empty:** I build the base design first. I follow [create.md](create.md) to scaffold `index.html` with the design system wired in, then build the interface. That base is the design I make variants of.
29
-
30
- ---
31
-
32
- ## Step 3: Pick the directions
33
-
34
- Each variant gets a different direction from the same brief. I choose them before I write any markup, and I write each one down as a short line: name, premise, and what it changes.
35
-
36
- Every variant must look totally different from every other variant. Each pair differs on all five of these axes, not just some:
37
-
38
- - **Composition:** the work pattern and spatial premise. Monitor, operate, compare, configure, learn, decide, or explore. See the composition section in [SKILL.md](../SKILL.md).
39
- - **Palette:** color mood and the role each color plays. See [color.md](color.md).
40
- - **Type voice:** typeface pairing, scale, and hierarchy. See [typeset.md](typeset.md).
41
- - **Edges and depth:** radius, borders, and shadow language. See [border.md](border.md) and [shadow.md](shadow.md).
42
- - **Controls:** button and control family. See [button.md](button.md).
43
-
44
- A color swap alone is not a variant. Neither is the same layout with new fonts and radius. If someone could mistake two variants for the same design at a glance, I rework one of them before I ship. I also write down the five choices for each variant, one per axis, and check that no two variants share a choice on any axis.
45
-
46
- The variants are product designs. They never borrow the look of the `index.html` viewer or of [design-html.md](design-html.md).
47
-
48
- ---
49
-
50
- ## Step 4: Build the variant files
51
-
52
- I do not edit the original design files until the user picks a variant in Step 7. Everything this mode creates lives in `.commandcode/variants/` at the project root. I never write a viewer or variant file to the project root or anywhere else:
53
-
54
- ```
55
- .commandcode/variants/
56
- index.html the comparison viewer
57
- original.html snapshot of the original, when it is a standalone page
58
- variant-1.html
59
- variant-2.html
60
- ...
61
- ```
62
-
63
- If `.commandcode/variants/` already holds files from an earlier run, I move them into `.commandcode/variants/previous/<YYYY-MM-DD-HHMM>/` before I write anything. A run with fewer variants must not leave an old `variant-5.html` beside the new ones, where the viewer or a later "apply variant 5" would pick up a direction from the wrong run.
64
-
65
- Rules for every variant:
66
-
67
- - It is a standalone HTML page with its own `<!doctype html>`, viewport meta, styles, and any scripts. It must render with no build step and no dev server.
68
- - Asset paths are correct from `.commandcode/variants/`. If the variant uses the project's images or fonts, I point at them with relative paths such as `../../assets/logo.svg`, or inline them.
69
- - If the original is a framework app, I rebuild the screen as a standalone page with the same copy, data, flows, and states. I say in my reply that these are static previews and are not wired into the app.
70
- - It keeps every state the original has: default, empty, loading, error, and the rest that apply. A variant that drops states is not a valid variant.
71
- - It uses real content from the original, including the hardest strings and the longest lists. No placeholder copy.
72
- - It adds no content the original lacks: no new fields, sections, timestamps such as "Last changed", badges or sample records. Only the direction changes, so the applied design in Step 8 carries no invented content either.
73
- - Its default render shows the default state. Error, empty and loading states stay hidden at rest. Where `hidden` hides them, the variant sets `[hidden] { display: none !important; }`, so a `display` rule cannot reveal them.
74
- - It works at phone width and at desktop width.
75
-
76
- If the original is a standalone HTML page, I copy it to `.commandcode/variants/original.html`, so the viewer can link to the original as it was when the variants were made.
77
-
78
- ---
79
-
80
- ## Step 5: Build the viewer, index.html
81
-
82
- `.commandcode/variants/index.html` is a comparison viewer. The whole viewer fits in one screen: the page is exactly `100vh` tall, and the page itself never scrolls. The user sees the variants side by side without scrolling down.
83
-
84
- ### Look
85
-
86
- The viewer follows [design-html.md](design-html.md): black `#000` background, `#0a0a0b` panels, `#222226` borders, sharp `0px` corners, corner boxes on each panel, Inter for text, monospace uppercase labels in `#666` such as `// VARIANT 01`. I use that file's header pattern, section container, corner boxes, and secondary button style. That aesthetic belongs to the viewer only, never to the variants inside it.
87
-
88
- ### Layout
89
-
90
- The viewport splits into three rows, with no page scroll:
91
-
92
- 1. **Header**, a compact single row: `// VARIANTS` label, the design name, the variant count, the date, and an "Original" link that opens the original in a new tab.
93
- 2. **Stage**, filling all remaining height: the variant panels side by side.
94
- 3. **Footer bar**, a compact single row: the Prev and Next buttons and a page indicator such as `01-02 / 05`.
95
-
96
- How many panels the stage shows at once:
97
-
98
- | Variants | On screen at once | Prev / Next |
99
- |---|---|---|
100
- | 2 | 2 | Hidden |
101
- | 3 | 3 | Hidden |
102
- | 4, 5, 6 | 2 | Shown |
103
-
104
- When paging shows 2 at a time and the count is odd, the last page shows the final variant in the left slot at the same width. The right slot shows an empty panel labeled `// END`, so panel widths never jump between pages.
105
-
106
- Below 768px wide, the stage shows one panel at a time and Prev and Next are always shown.
107
-
108
- ### Each panel
109
-
110
- - A label row: `// VARIANT 01`, the direction name, and an "Open" link that opens that variant's file in a new tab.
111
- - One line with the premise: the composition, palette, and type choice.
112
- - The variant in an `<iframe>` filling the rest of the panel. Iframes keep each variant's CSS isolated.
113
- - The iframe renders the variant at a 1440px desktop viewport and is scaled down with `transform: scale()` to fit the panel width. Its height is the panel height divided by the scale, so it fills the panel exactly. I measure the iframe's own box with `getBoundingClientRect()` after the label row and premise line lay out, not the whole panel, so no empty band is left under the scaled frame. The variant scrolls inside its iframe. I recompute the scale on window resize. Below 768px I drop the scaling and render the iframe at the panel's real width.
114
-
115
- ### Navigation
116
-
117
- - Prev and Next are real `<button>` elements with visible focus, disabled at the first and last page.
118
- - Left and Right arrow keys also page.
119
- - Paging swaps which variants are in the panels. The page itself still does not scroll.
120
-
121
- ### Verify the layout
122
-
123
- At 1440x900 and at 1280x720, the page has no vertical or horizontal scrollbar, the header and footer are fully visible, and every panel shows its variant.
124
-
125
- ---
126
-
127
- ## Step 6: Verify, then open it for the user
128
-
129
- I check the result before I report:
130
-
131
- - Every iframe renders content, not a blank frame, at every page of the viewer.
132
- - Every variant looks totally different from every other one: a different composition, palette, type voice, edges and depth, and control family. If two share any of these, I change one and check again.
133
- - Each variant still has the original's states and works at phone width when opened on its own.
134
- - The original design files are unchanged. I check this with `git status` or a file comparison.
135
-
136
- Then I open the viewer in the user's default browser automatically, without asking. First I resolve the absolute path of `.commandcode/variants/index.html` and build its live link, a `file://` URL such as `file:///Users/ana/shop/.commandcode/variants/index.html`. On WSL the link is the Windows path from `wslpath -w`, as `file:///C:/...`.
137
-
138
- I open that link with the platform's command, through the shell tool, in the background so it does not block:
139
-
140
- - macOS: `open "<link>"`
141
- - Linux: `xdg-open "<link>"`
142
- - WSL, where `/proc/version` mentions Microsoft: `wslview "<link>"`, or `explorer.exe "<link>"` if `wslview` is missing
143
- - Windows PowerShell: `Start-Process "<link>"`. In `cmd.exe`: `start "" "<link>"`. The `start ""` form fails in PowerShell, where `start` is `Start-Process` and rejects the empty title.
144
-
145
- If the open command fails, I say so. The reply still gives the link, so the user can open it themselves.
146
-
147
- Only claims I checked go in the reply. If I could not verify something, I say so.
148
-
149
- ---
150
-
151
- ## Step 7: Ask which variant to apply
152
-
153
- After the viewer is open, I first send a short message: how many variants I made, the viewer path and its `file://` link, and each variant's name and premise in one line. Then I call `ask_user_question` with one question, so the user can compare in the browser and answer:
154
-
155
- - Question: "Which variant should I apply to the actual design?"
156
- - Header: "Pick"
157
- - Options: one per variant, labeled with its number and direction name, such as "Variant 1: Ledger". The description is its premise in one line.
158
- - When there are 2 or 3 variants, I add a last option: "Not yet": keep the original and leave the variants to compare.
159
-
160
- The question takes at most 4 options. With 4 variants, the user types "not yet" through Other. With 5 or 6, the options are variants 1 to 4, and the user types 5, 6, or "not yet" through Other. I wait for the answer before I continue.
161
-
162
- If the user picks "Not yet" or does not pick a variant, I leave the original design untouched and skip to Step 9. The user can tell me later which one to apply, even in a new session. Then I read the top level of `.commandcode/variants/`, never `previous/`, to find the variant files and their names, and follow Step 8.
163
-
164
- ---
165
-
166
- ## Step 8: Apply the picked variant
167
-
168
- I update the actual design, the files the variants were made from, so it matches the picked variant. The variant file is the reference. I do not copy it over the original blindly:
169
-
170
- - **Standalone HTML page:** I bring the variant's markup structure, styles, and scripts into the original file. If the original links external CSS or JS files, I update those files instead of inlining everything. I keep the original's file names, IDs, data hooks, form actions, and links that other code or pages depend on.
171
- - **Framework app:** I rebuild the real components in the picked direction. I keep their data, logic, props, routes, handlers, and state. Only the markup structure and styling change. Design tokens and theme files change where the direction needs it.
172
- - **Built from scratch in Step 2:** the base design is the original. I apply the variant to it the same way.
173
-
174
- The applied design keeps every state the original has and works at phone width and desktop width. I leave `.commandcode/variants/` in place, so the user can still compare against the other directions.
175
-
176
- Then I verify:
177
-
178
- - The actual design now matches the picked variant in composition, palette, type, edges, and controls.
179
- - Every state of the original still renders, and nothing that other code depends on was renamed or removed.
180
- - If the project has a typecheck, lint, or build script, I run it and it passes.
181
- - I list the changed files with `git status` or a file comparison.
182
-
183
- ---
184
-
185
- ## Step 9: Reply
186
-
187
- The reply is short and checked:
188
-
189
- - Which variant I applied, or that the user chose not to apply one yet.
190
- - The files I changed in the actual design.
191
- - Whether the variants were static previews, if the original is a framework app.
192
- - What I verified, and anything that did not meet the bar.
193
- - The next step: `/design finish` polishes the applied design, or `/design review` checks it.
@@ -1,184 +0,0 @@
1
- # Voice `/design voice`
2
-
3
- Brand surfaces are judged before they are understood. A visitor arrives half-ready to leave. The page has to earn the next second.
4
-
5
- Here, design is not serving a task. The design is the product.
6
-
7
- ---
8
-
9
- ## Discipline files
10
-
11
- Voice drives the brand identity pass — consult these when each dimension comes up, not as additional work to run on top:
12
-
13
- - [color.md](color.md) — for correct palette construction when committing to a brand hue
14
- - [typeset.md](typeset.md) — for correct type hierarchy when building the brand voice and display scale
15
- - [motion.md](motion.md) — for correct timing and personality when adding expressive animation
16
- - [border.md](border.md) — for correct edge language when choosing frame and art-direction treatments
17
- - [shadow.md](shadow.md) — for correct depth model when adding atmospheric lighting or elevation
18
- - [media.md](media.md) — for art-directing, sourcing, and verifying real photos and video when the subject is physical
19
-
20
- ---
21
-
22
- ## Composition Starts With The Visitor's Job
23
-
24
- A brand surface still has work to do.
25
-
26
- If the visitor must decide, I narrow the page around claim, proof, trust, and action.
27
-
28
- If the visitor must learn, I build editorial flow with strong pacing and readable depth.
29
-
30
- If the visitor must explore, I make product paths, examples, filters, or galleries feel open and reversible.
31
-
32
- If the visitor must compare, I make differences visible with matrices, side-by-side proof, or ranked value.
33
-
34
- If the visitor must believe, I lead with evidence, artifact, image, and specificity before ornament.
35
-
36
- The brand voice changes the skin. The visitor's job chooses the composition.
37
-
38
- ---
39
-
40
- ## Prompt Invariants Are Sacred
41
-
42
- If the prompt supplies a name, that name is the brand. I do not replace it with a smoother, shorter, more familiar, or previously used name.
43
-
44
- The first viewport must prove this is the named thing. Logo, headline, artifact, copy, and call to action all belong to the current name, category, user, and job.
45
-
46
- I do not let old examples, earlier outputs, familiar startup tropes, or category clichés rename the product or choose the artifact.
47
-
48
- ---
49
-
50
- ## Landing Pages Need A Specific Proof Object
51
-
52
- A landing page is not complete because it has a headline and an abstract product panel.
53
-
54
- I choose one proof object the visitor can inspect. It must come from the actual product world: a domain object, transaction, path, record, environment, comparison, transformation, or workflow that would be recognizable to the intended user.
55
-
56
- That proof object drives the composition. It is not decoration beside the headline.
57
-
58
- ---
59
-
60
- ## Application Bar
61
-
62
- `/design voice` applies brand character across the visible surface. It is not a small garnish pass.
63
-
64
- At minimum, I verify the first viewport, proof object, headline voice, type choice, color behavior, CTA language, imagery or artifact treatment, and one memorable brand-specific detail.
65
-
66
- Adding a tiny logo mark, accent square, decorative pattern, or one hover flourish is not enough.
67
-
68
- ---
69
-
70
- ## The Register
71
-
72
- I use this file for marketing pages, landing pages, campaign pages, portfolios, about pages, product stories, and long-form surfaces where impression is the work.
73
-
74
- Brand does not mean one aesthetic. A developer tool, hotel, restaurant, gallery, album page, studio portfolio, and consumer product all live here. They need different lanes.
75
-
76
- I name the lane before I design.
77
-
78
- - Editorial, cultural, luxury
79
- - Technical, developer, systems-minded
80
- - Consumer, lifestyle, tactile
81
- - Studio, portfolio, experimental
82
- - Campaign, launch, moment-driven
83
-
84
- If I cannot name the lane in one sentence, the surface is not ready.
85
-
86
- ---
87
-
88
- ## The First 1.5 Seconds
89
-
90
- The first viewport must commit.
91
-
92
- The user should quickly know the category, feel the voice, and see a reason to continue. Average is not neutral anymore. Average reads generated.
93
-
94
- Restraint is allowed only when it is visibly chosen. Timid restraint is absence.
95
-
96
- ---
97
-
98
- ## Type Carries Voice
99
-
100
- I start with physical words, not generic adjectives. Cold, precise, slightly strange. Warm, tactile, hand-stamped. Expensive, slow, cinematic.
101
-
102
- Then I pick type that feels like an object from that world. A field guide. A receipt. A gallery label. A club poster. A terminal manual. A bottle label. A children's science kit.
103
-
104
- I reject the obvious first pass when it smells like the current AI design pile. A serif is not automatically elegant. Mono is not automatically technical. A rounded sans is not automatically friendly.
105
-
106
- ---
107
-
108
- ## Color Must Commit
109
-
110
- Brand pages can use more color than product surfaces. Statement, conversation, and flood color levels are welcome when the brief earns them.
111
-
112
- I name a real reference before choosing a hue. Unnamed ambition turns beige.
113
-
114
- If the brand needs voice, I do not hide behind a neutral page with one safe accent. If the brand needs quiet, I make the quiet exact.
115
-
116
- ---
117
-
118
- ## Composition Has To Make A Choice
119
-
120
- The centered stack with three feature cards is the default nobody remembers.
121
-
122
- I choose a composition with a point of view:
123
-
124
- - Asymmetric when the brand needs energy
125
- - Strict grid when the brand needs rigor
126
- - Editorial pacing when the story needs breath
127
- - Full-bleed image when the subject is physical
128
- - Type-led minimalism when the words are strong enough
129
- - Section-by-section art direction when the narrative changes register
130
-
131
- I do not split the difference. Half-asymmetric looks broken. Half-editorial looks like a costume.
132
-
133
- ---
134
-
135
- ## Imagery
136
-
137
- If the subject is physical, I ship imagery. Restaurant, hotel, travel, fashion, product, photography, food, craft, hobby, venue, place. No colored rectangle can stand in for the thing itself. A broken image icon stands in for it even worse — see [media.md](media.md) for how I source and verify a real photo or video instead of guessing a URL.
138
-
139
- One decisive image beats five filler images. I search for the specific object and situation, not the category. Alt text is part of the brand voice.
140
-
141
- Tech and developer brands can be type-led, code-led, or diagram-led. That is a lane, not an excuse to leave the page visually empty.
142
-
143
- ---
144
-
145
- ## Motion Permission
146
-
147
- Brand can choreograph when choreography deepens the mood.
148
-
149
- Slow editorial scroll, a single strong reveal, type that arrives with intention, section transitions that feel like pacing. These can work. Scattered motion on every card does not.
150
-
151
- Sometimes the most confident brand motion is none.
152
-
153
- ---
154
-
155
- ## What I Refuse
156
-
157
- - Mono everywhere because the brief says engineer
158
- - Calling tiny decorative touches a brand pass
159
- - Brand moments that cannot be seen in the rendered page
160
- - Editorial magazine styling on a brand that is not editorial
161
- - Rounded-square icons above every heading
162
- - Hero plus three identical cards as the whole concept
163
- - A palette that is guessable from the category
164
- - Zero imagery for a physical subject
165
- - A font chosen because it appeared in the last generated landing page
166
- - Motion that exists only to make the page feel less empty
167
-
168
- ---
169
-
170
- ## How I Know The Brand Surface Works
171
-
172
- - Brand character is visible before I explain it
173
- - The proof object belongs to this product and drives the page
174
- - The first viewport has a recognizable point of view
175
- - The lane fits the subject
176
- - Type, color, image, and layout sound like the same brand
177
- - The page would be remembered after two seconds
178
- - It does not look like the median generated landing page
179
- - The visitor has a reason to scroll
180
-
181
- STRICT RULE — NEVER BREAK THIS
182
- Do not create report.md, any kind of report, summary, analysis file,
183
- or extra documentation. This applies every time this file is used.
184
- Generate no reports unless explicitly asked.