command-code 1.93.1 → 1.93.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/dist/bundled/agent-browser/SKILL.md +73 -0
- package/dist/bundled/command-code-knowledge/SKILL.md +68 -0
- package/dist/bundled/command-code-knowledge/live-models.ts +284 -0
- package/dist/bundled/command-code-knowledge/reference/byok.md +390 -0
- package/dist/bundled/command-code-knowledge/reference/custom-agents.md +341 -0
- package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +423 -0
- package/dist/bundled/command-code-knowledge/reference/headless.md +381 -0
- package/dist/bundled/command-code-knowledge/reference/hooks.md +1107 -0
- package/dist/bundled/command-code-knowledge/reference/mcp.md +648 -0
- package/dist/bundled/command-code-knowledge/reference/memory.md +137 -0
- package/dist/bundled/command-code-knowledge/reference/models.md +145 -0
- package/dist/bundled/command-code-knowledge/reference/permissions.md +486 -0
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +283 -0
- package/dist/bundled/command-code-knowledge/reference/plans.md +16 -0
- package/dist/bundled/command-code-knowledge/reference/product-help.md +490 -0
- package/dist/bundled/command-code-knowledge/reference/sessions.md +377 -0
- package/dist/bundled/command-code-knowledge/reference/skills.md +1009 -0
- package/dist/bundled/command-code-knowledge/reference/tools.md +522 -0
- package/dist/bundled/config/SKILL.md +18 -0
- package/dist/bundled/config/references/permissions.md +27 -0
- package/dist/bundled/config/references/settings.md +50 -0
- package/dist/bundled/design/SKILL.md +448 -0
- package/dist/bundled/design/references/accessibility.md +404 -0
- package/dist/bundled/design/references/border.md +161 -0
- package/dist/bundled/design/references/button.md +192 -0
- package/dist/bundled/design/references/checkup.md +164 -0
- package/dist/bundled/design/references/color.md +245 -0
- package/dist/bundled/design/references/create.md +291 -0
- package/dist/bundled/design/references/design-html.md +227 -0
- package/dist/bundled/design/references/deslop.md +285 -0
- package/dist/bundled/design/references/finish.md +156 -0
- package/dist/bundled/design/references/interaction.md +186 -0
- package/dist/bundled/design/references/layout.md +216 -0
- package/dist/bundled/design/references/media.md +112 -0
- package/dist/bundled/design/references/motion.md +237 -0
- package/dist/bundled/design/references/redesign.md +197 -0
- package/dist/bundled/design/references/refine.md +193 -0
- package/dist/bundled/design/references/reflexes.md +132 -0
- package/dist/bundled/design/references/relayout.md +207 -0
- package/dist/bundled/design/references/report-html.md +235 -0
- package/dist/bundled/design/references/responsive.md +233 -0
- package/dist/bundled/design/references/review.md +164 -0
- package/dist/bundled/design/references/setup.md +119 -0
- package/dist/bundled/design/references/severity.md +111 -0
- package/dist/bundled/design/references/shadow.md +164 -0
- package/dist/bundled/design/references/smell.md +213 -0
- package/dist/bundled/design/references/style-3d.md +23 -0
- package/dist/bundled/design/references/style-bento.md +21 -0
- package/dist/bundled/design/references/style-editorial.md +23 -0
- package/dist/bundled/design/references/style-futuristic.md +21 -0
- package/dist/bundled/design/references/style-glassmorphism.md +52 -0
- package/dist/bundled/design/references/style-maximalism.md +20 -0
- package/dist/bundled/design/references/style-minimalism.md +21 -0
- package/dist/bundled/design/references/style-neo-brutalism.md +21 -0
- package/dist/bundled/design/references/style-retro-futurism.md +21 -0
- package/dist/bundled/design/references/style-swiss.md +20 -0
- package/dist/bundled/design/references/style.md +77 -0
- package/dist/bundled/design/references/surface.md +163 -0
- package/dist/bundled/design/references/system.md +73 -0
- package/dist/bundled/design/references/typeset.md +210 -0
- package/dist/bundled/design/references/variants.md +193 -0
- package/dist/bundled/design/references/voice.md +184 -0
- package/dist/bundled/design/references/writing.md +174 -0
- package/dist/bundled/design/scripts/check/color.mjs +213 -0
- package/dist/bundled/design/scripts/check/contrast.mjs +141 -0
- package/dist/bundled/design/scripts/check/css.mjs +223 -0
- package/dist/bundled/design/scripts/check/named-colors.mjs +152 -0
- package/dist/bundled/design/scripts/check/pair.mjs +61 -0
- package/dist/bundled/design/scripts/check/preview.mjs +27 -0
- package/dist/bundled/design/scripts/check/reflexes.mjs +257 -0
- package/dist/bundled/design/scripts/check/sources.mjs +237 -0
- package/dist/bundled/design/scripts/check.mjs +165 -0
- package/dist/bundled/loop/SKILL.md +16 -0
- package/dist/bundled/mod-builder/SKILL.md +135 -0
- package/dist/bundled/mod-builder/examples/block-dangerous-commands.ts +41 -0
- package/dist/bundled/mod-builder/examples/custom-entry-renderer.ts +32 -0
- package/dist/bundled/mod-builder/examples/custom-tool.ts +53 -0
- package/dist/bundled/mod-builder/examples/flags-and-options.ts +29 -0
- package/dist/bundled/mod-builder/examples/input-shortcuts.ts +41 -0
- package/dist/bundled/mod-builder/examples/kitchen-sink.ts +129 -0
- package/dist/bundled/mod-builder/examples/lifecycle-hooks.ts +64 -0
- package/dist/bundled/mod-builder/examples/model-router.ts +43 -0
- package/dist/bundled/mod-builder/examples/observe-events.ts +30 -0
- package/dist/bundled/mod-builder/examples/pane-and-buttons.ts +60 -0
- package/dist/bundled/mod-builder/examples/pane-form.ts +68 -0
- package/dist/bundled/mod-builder/examples/permission-policy.ts +34 -0
- package/dist/bundled/mod-builder/examples/redact-secrets.ts +46 -0
- package/dist/bundled/mod-builder/examples/slash-command.ts +33 -0
- package/dist/bundled/mod-builder/examples/spinner-count.ts +47 -0
- package/dist/bundled/mod-builder/examples/stream-filter.ts +70 -0
- package/dist/bundled/mod-builder/reference/api.md +140 -0
- package/dist/bundled/mod-builder/reference/hooks-and-events.md +347 -0
- package/dist/bundled/mod-builder/reference/overview.md +271 -0
- package/dist/bundled/mod-builder/reference/packaging.md +187 -0
- package/dist/bundled/mod-builder/reference/ui.md +253 -0
- package/dist/bundled/mod-builder/reference/verify.md +67 -0
- package/dist/bundled/skill-builder/SKILL.md +104 -0
- package/dist/cli.mjs +16 -0
- package/dist/index.mjs +2 -0
- package/package.json +1 -1
- package/vsix/commandcode-vscode.vsix +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Relayout: `/design relayout`
|
|
2
|
+
|
|
3
|
+
Relayout moves the pieces without changing the identity. The content is mostly right. The arrangement is wrong.
|
|
4
|
+
|
|
5
|
+
I reposition images, text, controls, and sections so the page has a clearer focal point, rhythm, and reading path.
|
|
6
|
+
|
|
7
|
+
Relayout is not a nudge. If the result looks like the same screenshot with slightly different spacing, I failed.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Pre-execution checklist
|
|
12
|
+
|
|
13
|
+
Before proceeding, check for existing reports in the `.commandcode/design/` directory. Look for these files:
|
|
14
|
+
|
|
15
|
+
- `checkup-report.md`
|
|
16
|
+
- `review-report.md`
|
|
17
|
+
- `smell-report.md`
|
|
18
|
+
|
|
19
|
+
If any of these files exist, read the report content and use it as context for your analysis. Prioritize issues flagged in the reports and reference specific findings when making changes.
|
|
20
|
+
|
|
21
|
+
If no reports are found, proceed with the task normally.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Composition Diagnosis
|
|
28
|
+
|
|
29
|
+
I first ask which work pattern the current layout is trying to serve.
|
|
30
|
+
|
|
31
|
+
If the surface monitors, I expose change, urgency, recency, and status.
|
|
32
|
+
|
|
33
|
+
If it operates, I pull tools, targets, and feedback into one working field.
|
|
34
|
+
|
|
35
|
+
If it compares, I protect alignment and make scanning cheaper.
|
|
36
|
+
|
|
37
|
+
If it configures, I group choices by consequence and keep commit visible.
|
|
38
|
+
|
|
39
|
+
If it teaches, I create a reading path with progressive reveal.
|
|
40
|
+
|
|
41
|
+
If it persuades, I reduce the field to claim, proof, risk, and action.
|
|
42
|
+
|
|
43
|
+
If it explores, I make filters, search, and backtracking obvious.
|
|
44
|
+
|
|
45
|
+
The new composition must answer that pattern. Rearranged sameness is not relayout.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## What I Will Change
|
|
50
|
+
|
|
51
|
+
I move things on the canvas.
|
|
52
|
+
|
|
53
|
+
- Image position and scale
|
|
54
|
+
- Text-image relationships
|
|
55
|
+
- Section order
|
|
56
|
+
- Visual weight
|
|
57
|
+
- Grouping and spacing
|
|
58
|
+
- Alignment system
|
|
59
|
+
- Grid structure
|
|
60
|
+
- Reading path
|
|
61
|
+
- Responsive composition
|
|
62
|
+
|
|
63
|
+
I do not change color strategy, font voice, visual identity, or feature scope unless the layout problem exposes a conflict that needs another mode.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Structural Change Bar
|
|
68
|
+
|
|
69
|
+
A relayout must include at least one visible structural change:
|
|
70
|
+
|
|
71
|
+
- A new dominant focal point
|
|
72
|
+
- A changed hero or section composition
|
|
73
|
+
- A reordered section sequence
|
|
74
|
+
- A different relationship between text and proof object
|
|
75
|
+
- A changed navigation, sidebar, toolbar, or action placement
|
|
76
|
+
- A transformed grid, table, split view, stack, or flow
|
|
77
|
+
- A responsive order that changes the user's path
|
|
78
|
+
|
|
79
|
+
Spacing, padding, alignment, width, gap, and margin changes can support relayout. They cannot be the whole relayout.
|
|
80
|
+
|
|
81
|
+
If I cannot justify a structural change, the command should be `finish`, not `relayout`.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Required companion references
|
|
86
|
+
|
|
87
|
+
The skill automatically reads these three references in order. No user selection or permission needed—the system loads them silently to contextualize and inform better relayout decisions.
|
|
88
|
+
|
|
89
|
+
| **[layout.md](layout.md)** | Establish the new spatial system, grid, and composition |
|
|
90
|
+
| **[color.md](color.md)** | Build the new palette, neutrals, semantic roles, and accent strategy |
|
|
91
|
+
| **[typeset.md](typeset.md)** | Pick new fonts, define new scale, set new pairing and hierarchy |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## The Core Judgment
|
|
96
|
+
|
|
97
|
+
The eye needs somewhere to land.
|
|
98
|
+
|
|
99
|
+
I decide the focal point before I move anything. Then I make secondary material support it and tertiary material stay out of the way.
|
|
100
|
+
|
|
101
|
+
If everything is equally important, the layout has no opinion.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Image And Text
|
|
106
|
+
|
|
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
|
+
|
|
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
|
+
|
|
111
|
+
Text can sit beside an image, over it, under it, wrapped around it, or alternate across sections. I choose the relationship based on the content, not the template.
|
|
112
|
+
|
|
113
|
+
When text and image fight, I decide which one leads.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Composition Lanes
|
|
118
|
+
|
|
119
|
+
I pick one lane per section.
|
|
120
|
+
|
|
121
|
+
**Symmetric** for calm authority and singular focus.
|
|
122
|
+
|
|
123
|
+
**Asymmetric** for energy, tension, and art direction.
|
|
124
|
+
|
|
125
|
+
**Strict grid** for rigor, technical confidence, and dense systems.
|
|
126
|
+
|
|
127
|
+
**Editorial flow** for long-form, story, and cultural pacing.
|
|
128
|
+
|
|
129
|
+
**Modular grid** for comparison, galleries, dashboards, and catalogs.
|
|
130
|
+
|
|
131
|
+
**Broken grid** when one or two items deserve clear dominance.
|
|
132
|
+
|
|
133
|
+
Mixing lanes inside one section usually creates noise. Sequencing different lanes across sections can create rhythm.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Section Order
|
|
138
|
+
|
|
139
|
+
I order sections by user need, not by source order.
|
|
140
|
+
|
|
141
|
+
The strongest hook comes early. Context comes before complex proof. Trust appears before the ask when the ask needs confidence. CTAs appear at decision points. The ending answers what now.
|
|
142
|
+
|
|
143
|
+
Mobile order is part of the design. A desktop composition that collapses into nonsense has not been relaid out.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Spatial Rhythm
|
|
148
|
+
|
|
149
|
+
I use spacing to show relationship.
|
|
150
|
+
|
|
151
|
+
Tight gaps mean the pieces belong together. Wide gaps mean a new thought. Repeated gaps create rhythm. One gap everywhere creates monotony.
|
|
152
|
+
|
|
153
|
+
Command Code's 1-4-9 rhythm stays useful here: micro, component, and section breaths.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Balance
|
|
158
|
+
|
|
159
|
+
I balance visual weight, not just geometry.
|
|
160
|
+
|
|
161
|
+
Large images, dark blocks, saturated color, bold headlines, dense text, and isolated controls all carry mass. White space carries counterforce. The visual center often sits slightly above the mathematical center.
|
|
162
|
+
|
|
163
|
+
Diagonal balance can create energy. Random imbalance just feels off.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## What I Refuse
|
|
168
|
+
|
|
169
|
+
- Duplicated "relayout process" instructions
|
|
170
|
+
- Treating relayout as redesign
|
|
171
|
+
- Calling spacing polish a relayout
|
|
172
|
+
- Leaving the same hero/proof composition intact when that composition is the problem
|
|
173
|
+
- Moving sections without deciding priority
|
|
174
|
+
- Alternating image/text blocks by reflex
|
|
175
|
+
- Full-bleed imagery when the image is weak
|
|
176
|
+
- Centering everything because it feels safe
|
|
177
|
+
- Adding cards because spacing feels unresolved
|
|
178
|
+
- Markdown reports or rationale files
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## How I Know Relayout Worked
|
|
183
|
+
|
|
184
|
+
- The before and after read differently as thumbnails
|
|
185
|
+
- At least one structural change is visible without reading the code
|
|
186
|
+
- One focal point leads each section
|
|
187
|
+
- The eye path matches the content priority
|
|
188
|
+
- Images and text support rather than compete
|
|
189
|
+
- Section sequence feels like a journey
|
|
190
|
+
- Spacing shows relationships
|
|
191
|
+
- Desktop and mobile tell the same story
|
|
192
|
+
- The composition still reads as a thumbnail
|
|
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
|
+
|
|
203
|
+
STRICT RULE — NEVER BREAK THIS
|
|
204
|
+
Do not create report.md, any kind of report, summary, analysis file,
|
|
205
|
+
or extra documentation. This applies every time this file is used.
|
|
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.
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# HTML Report Layout
|
|
2
|
+
|
|
3
|
+
<!-- MODEL-ONLY BOUNDARY:
|
|
4
|
+
This file is guidance for the visual layout of generated HTML report
|
|
5
|
+
artifacts for smell, checkup, and review. Do not use this report aesthetic,
|
|
6
|
+
layout, Tailwind classes, borders, score blocks, or metadata treatment as
|
|
7
|
+
inspiration for product UI, landing pages, dashboards, app screens,
|
|
8
|
+
components, or generated interfaces.
|
|
9
|
+
Do not copy this comment into generated output.
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
The HTML report must be a designed report page, not markdown text placed in an
|
|
13
|
+
HTML file.
|
|
14
|
+
|
|
15
|
+
Use Tailwind CSS to create an authored layout that makes the audit easy to
|
|
16
|
+
scan. The report should feel like a Command Code diagnostic artifact: dark,
|
|
17
|
+
sharp, structured, dense, and readable.
|
|
18
|
+
|
|
19
|
+
## Tailwind Runtime
|
|
20
|
+
|
|
21
|
+
Use Tailwind through the CDN script in the generated HTML report:
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The HTML report is expected to be opened with network access. Offline rendering
|
|
28
|
+
is not guaranteed. If the user explicitly asks for an offline or self-contained
|
|
29
|
+
report, do not use the CDN. Instead, embed the small CSS needed for the exact
|
|
30
|
+
classes and helpers used by the report.
|
|
31
|
+
|
|
32
|
+
Do not reference a local Tailwind build, local package, or project stylesheet.
|
|
33
|
+
The report must not depend on the target app's build pipeline.
|
|
34
|
+
|
|
35
|
+
## Core Requirement
|
|
36
|
+
|
|
37
|
+
Do not output the report as paragraphs only.
|
|
38
|
+
|
|
39
|
+
Every generated report must have visible layout structure:
|
|
40
|
+
|
|
41
|
+
- Page container with max width and responsive padding.
|
|
42
|
+
- Header block with report label, project name, mode, and date.
|
|
43
|
+
- Score or verdict block with a large visual score or status.
|
|
44
|
+
- TL;DR block with concise diagnosis and next action.
|
|
45
|
+
- Section containers with borders and clear headings.
|
|
46
|
+
- Tables for score matrices and comparable heuristics.
|
|
47
|
+
- Issue blocks for priority findings.
|
|
48
|
+
- Lists or rows for positive and negative signals.
|
|
49
|
+
- Footer line with generation metadata.
|
|
50
|
+
|
|
51
|
+
If the content is just a sequence of paragraphs under headings, the report is
|
|
52
|
+
wrong. Convert prose into structured blocks, rows, tables, badges, and grouped
|
|
53
|
+
sections.
|
|
54
|
+
|
|
55
|
+
## Tailwind Rules
|
|
56
|
+
|
|
57
|
+
Use Tailwind utility classes for the report layout.
|
|
58
|
+
|
|
59
|
+
Required:
|
|
60
|
+
|
|
61
|
+
- Load Tailwind with `<script src="https://cdn.tailwindcss.com"></script>`
|
|
62
|
+
unless the user explicitly asks for an offline report.
|
|
63
|
+
- Use `bg-black` or near-black canvas.
|
|
64
|
+
- Use bordered section containers.
|
|
65
|
+
- Use responsive padding such as `p-6 md:p-10`.
|
|
66
|
+
- Use a readable max width such as `max-w-5xl` or `max-w-6xl`.
|
|
67
|
+
- Use `overflow-x-auto` around wide tables.
|
|
68
|
+
- Use `grid`, `flex`, and responsive breakpoints for layout.
|
|
69
|
+
- Use monospace labels for report metadata, section tags, and scores.
|
|
70
|
+
|
|
71
|
+
Allowed:
|
|
72
|
+
|
|
73
|
+
- A small `<style>` block for font family and tiny reusable helpers.
|
|
74
|
+
- Tailwind arbitrary values for exact report colors.
|
|
75
|
+
|
|
76
|
+
Avoid:
|
|
77
|
+
|
|
78
|
+
- Large custom CSS systems.
|
|
79
|
+
- Decorative gradients.
|
|
80
|
+
- Rounded marketing cards.
|
|
81
|
+
- Centered hero-page composition.
|
|
82
|
+
- Floating ornamental backgrounds.
|
|
83
|
+
|
|
84
|
+
## Canonical Scaffold
|
|
85
|
+
|
|
86
|
+
Use this structure as the default report scaffold. Replace bracketed values and
|
|
87
|
+
repeat rows or issue blocks as needed. Keep the class system and section shape
|
|
88
|
+
stable unless the report content truly requires an adjustment.
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<!DOCTYPE html>
|
|
92
|
+
<html lang="en">
|
|
93
|
+
<head>
|
|
94
|
+
<meta charset="UTF-8" />
|
|
95
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
96
|
+
<title>[PROJECT] - [MODE] Report</title>
|
|
97
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
98
|
+
<style>
|
|
99
|
+
body { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
|
|
100
|
+
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
101
|
+
.report-section { border: 1px solid #222226; background: #0a0a0b; position: relative; }
|
|
102
|
+
.corner-box { position: absolute; width: 20px; height: 20px; border: 1px solid #222226; background: #000; }
|
|
103
|
+
</style>
|
|
104
|
+
</head>
|
|
105
|
+
<body class="bg-black text-[#fafafa]">
|
|
106
|
+
<main class="mx-auto w-full max-w-6xl px-5 py-8 md:px-10 md:py-12">
|
|
107
|
+
<header class="report-section mb-8 p-6 md:p-8">
|
|
108
|
+
<div class="corner-box left-0 top-0 -translate-x-1/2 -translate-y-1/2"></div>
|
|
109
|
+
<div class="corner-box right-0 top-0 translate-x-1/2 -translate-y-1/2"></div>
|
|
110
|
+
<div class="flex flex-col gap-6 md:flex-row md:items-end md:justify-between">
|
|
111
|
+
<div>
|
|
112
|
+
<div class="mono mb-2 text-xs tracking-widest text-[#666]">// [MODE]</div>
|
|
113
|
+
<h1 class="text-4xl font-bold tracking-tight md:text-6xl">[PROJECT]</h1>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="mono text-left text-xs text-[#666] md:text-right">
|
|
116
|
+
<div>COMMANDCODE REPORT</div>
|
|
117
|
+
<div class="text-[#444]">[DATE]</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</header>
|
|
121
|
+
|
|
122
|
+
<section class="report-section mb-8 p-6 md:p-8">
|
|
123
|
+
<div class="corner-box left-0 top-0 -translate-x-1/2 -translate-y-1/2"></div>
|
|
124
|
+
<div class="corner-box right-0 top-0 translate-x-1/2 -translate-y-1/2"></div>
|
|
125
|
+
<div class="grid gap-8 md:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)]">
|
|
126
|
+
<div>
|
|
127
|
+
<div class="mono mb-2 text-xs tracking-widest text-[#666]">// OVERALL</div>
|
|
128
|
+
<div class="text-6xl font-bold tracking-tight md:text-7xl">[SCORE]</div>
|
|
129
|
+
<div class="mt-1 text-lg text-[#666]">/ [MAX]</div>
|
|
130
|
+
<div class="mt-4 inline-flex border border-[#fbbf24]/30 bg-[#fbbf24]/10 px-3 py-1 text-sm text-[#fbbf24]">[VERDICT]</div>
|
|
131
|
+
</div>
|
|
132
|
+
<div>
|
|
133
|
+
<div class="mono mb-3 text-xs tracking-widest text-[#666]">// TL;DR</div>
|
|
134
|
+
<p class="text-sm leading-6 text-[#a0a0a0]">[SHORT DIAGNOSIS]</p>
|
|
135
|
+
<p class="mt-4 text-sm leading-6 text-[#fbbf24]">[PRIMARY RECOMMENDATION]</p>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</section>
|
|
139
|
+
|
|
140
|
+
<section class="report-section mb-8 p-6 md:p-8">
|
|
141
|
+
<div class="mono mb-6 text-xs tracking-widest text-[#666]">// HEURISTIC SCORES</div>
|
|
142
|
+
<div class="overflow-x-auto">
|
|
143
|
+
<table class="w-full min-w-[720px] border-collapse text-sm">
|
|
144
|
+
<thead>
|
|
145
|
+
<tr class="border-b border-[#222226] text-left mono text-xs text-[#666]">
|
|
146
|
+
<th class="py-3 pr-4 font-normal">#</th>
|
|
147
|
+
<th class="py-3 pr-4 font-normal">HEURISTIC</th>
|
|
148
|
+
<th class="py-3 pr-4 font-normal">SCORE</th>
|
|
149
|
+
<th class="py-3 font-normal">KEY FINDING</th>
|
|
150
|
+
</tr>
|
|
151
|
+
</thead>
|
|
152
|
+
<tbody>
|
|
153
|
+
<tr class="border-b border-[#1a1a1e]">
|
|
154
|
+
<td class="py-4 pr-4 text-[#555]">1</td>
|
|
155
|
+
<td class="py-4 pr-4 text-[#fafafa]">[HEURISTIC]</td>
|
|
156
|
+
<td class="py-4 pr-4 text-[#fbbf24]">[SCORE]</td>
|
|
157
|
+
<td class="py-4 text-[#a0a0a0]">[FINDING]</td>
|
|
158
|
+
</tr>
|
|
159
|
+
</tbody>
|
|
160
|
+
</table>
|
|
161
|
+
</div>
|
|
162
|
+
</section>
|
|
163
|
+
|
|
164
|
+
<section class="report-section mb-8 p-6 md:p-8">
|
|
165
|
+
<div class="mono mb-6 text-xs tracking-widest text-[#666]">// COGNITIVE LOAD / RISK</div>
|
|
166
|
+
<div class="grid gap-6 md:grid-cols-2">
|
|
167
|
+
<div>
|
|
168
|
+
<div class="mb-3 text-xl font-semibold">[LEVEL]</div>
|
|
169
|
+
<ul class="space-y-3 text-sm text-[#a0a0a0]">
|
|
170
|
+
<li><span class="mono mr-2 text-[#34d399]">PASS</span>[POSITIVE SIGNAL]</li>
|
|
171
|
+
<li><span class="mono mr-2 text-[#fbbf24]">WATCH</span>[RISK SIGNAL]</li>
|
|
172
|
+
<li><span class="mono mr-2 text-[#ef4444]">FAIL</span>[NEGATIVE SIGNAL]</li>
|
|
173
|
+
</ul>
|
|
174
|
+
</div>
|
|
175
|
+
<div>
|
|
176
|
+
<div class="mono mb-3 text-xs tracking-widest text-[#666]">// NEXT MODES</div>
|
|
177
|
+
<div class="flex flex-wrap gap-2">
|
|
178
|
+
<span class="border border-[#333] px-3 py-1 text-sm text-[#a0a0a0]">/[MODE]</span>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</section>
|
|
183
|
+
|
|
184
|
+
<section class="report-section mb-8 p-6 md:p-8">
|
|
185
|
+
<div class="mono mb-6 text-xs tracking-widest text-[#666]">// WHAT'S WORKING</div>
|
|
186
|
+
<div class="grid gap-4 md:grid-cols-3">
|
|
187
|
+
<article class="border border-[#1f1f24] p-4">
|
|
188
|
+
<h2 class="mb-2 text-sm font-semibold">[TITLE]</h2>
|
|
189
|
+
<p class="text-sm leading-6 text-[#a0a0a0]">[DESCRIPTION]</p>
|
|
190
|
+
</article>
|
|
191
|
+
</div>
|
|
192
|
+
</section>
|
|
193
|
+
|
|
194
|
+
<section class="report-section mb-8 p-6 md:p-8">
|
|
195
|
+
<div class="mono mb-6 text-xs tracking-widest text-[#666]">// PRIORITY ISSUES</div>
|
|
196
|
+
<div class="space-y-5">
|
|
197
|
+
<article class="border border-[#2a1d22] bg-[#110b0d] p-5">
|
|
198
|
+
<div class="mono mb-2 text-xs text-[#f43f5e]">[P0/P1/P2]</div>
|
|
199
|
+
<h2 class="mb-2 text-lg font-semibold">[ISSUE TITLE]</h2>
|
|
200
|
+
<p class="mb-4 text-sm leading-6 text-[#a0a0a0]">[EVIDENCE]</p>
|
|
201
|
+
<div class="border-l border-[#fbbf24] pl-4 text-sm leading-6 text-[#fbbf24]">FIX: [RECOMMENDATION]</div>
|
|
202
|
+
</article>
|
|
203
|
+
</div>
|
|
204
|
+
</section>
|
|
205
|
+
|
|
206
|
+
<footer class="mono py-8 text-center text-xs tracking-widest text-[#444]">
|
|
207
|
+
Generated with CommandCode - [DATE]
|
|
208
|
+
</footer>
|
|
209
|
+
</main>
|
|
210
|
+
</body>
|
|
211
|
+
</html>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Responsive Requirements
|
|
215
|
+
|
|
216
|
+
The report must work on mobile and desktop:
|
|
217
|
+
|
|
218
|
+
- Stack header and score columns on small screens.
|
|
219
|
+
- Keep tables horizontally scrollable.
|
|
220
|
+
- Use readable text sizes on mobile.
|
|
221
|
+
- Do not rely on hover to reveal essential content.
|
|
222
|
+
- Keep body copy line length readable.
|
|
223
|
+
|
|
224
|
+
## Quality Bar
|
|
225
|
+
|
|
226
|
+
Before finishing the report, check:
|
|
227
|
+
|
|
228
|
+
- Can the user understand the verdict in five seconds?
|
|
229
|
+
- Are the most important issues visually prominent?
|
|
230
|
+
- Are scores presented in a table, not prose?
|
|
231
|
+
- Are fixes attached to the issues they solve?
|
|
232
|
+
- Is the report scannable without reading every paragraph?
|
|
233
|
+
- Does the page still work when opened as a static HTML file?
|
|
234
|
+
|
|
235
|
+
If any answer is no, redesign the report layout before returning it.
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Responsive Design `/design responsive`
|
|
2
|
+
|
|
3
|
+
Responsive design is not making a desktop layout smaller. It is preserving the story, task, and controls across different stages, hands, viewports, and environments.
|
|
4
|
+
|
|
5
|
+
Screen size is only one variable. Input mode often matters more.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Discipline files
|
|
10
|
+
|
|
11
|
+
Responsive drives the recomposition pass — consult these when each dimension comes up during responsive work, not as separate passes to layer on:
|
|
12
|
+
|
|
13
|
+
- [layout.md](layout.md) — for correct grid, spacing rhythm, and composition logic when adapting breakpoints
|
|
14
|
+
- [interaction.md](interaction.md) — for correct touch target sizing and input mode behavior when adapting controls
|
|
15
|
+
- [button.md](button.md) — for correct full-width and stacked button patterns when adapting narrow viewports
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Pre-execution checklist
|
|
20
|
+
|
|
21
|
+
Before proceeding, check for existing reports in the `.commandcode/design/` directory. Look for these files:
|
|
22
|
+
|
|
23
|
+
- `checkup-report.md`
|
|
24
|
+
- `review-report.md`
|
|
25
|
+
- `smell-report.md`
|
|
26
|
+
|
|
27
|
+
If any of these files exist, read the report content and use it as context for your analysis. Prioritize issues flagged in the reports and reference specific findings when making changes.
|
|
28
|
+
|
|
29
|
+
If no reports are found, proceed with the task normally.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Composition Changes Across Context
|
|
36
|
+
|
|
37
|
+
The work pattern stays. The composition can change.
|
|
38
|
+
|
|
39
|
+
Monitor screens may collapse from a wall of status into priority strips, alerts, and drill-down panels.
|
|
40
|
+
|
|
41
|
+
Operate screens may move primary commands near the thumb and hide secondary tools behind stable drawers.
|
|
42
|
+
|
|
43
|
+
Compare screens may switch from wide tables to pinned labels, cards with aligned fields, or focused comparison pairs.
|
|
44
|
+
|
|
45
|
+
Configure screens may become grouped sections with sticky save and clear dependency feedback.
|
|
46
|
+
|
|
47
|
+
Learn screens may lengthen into a readable article path with progress cues.
|
|
48
|
+
|
|
49
|
+
Decide screens may reduce to claim, proof, action, and escape.
|
|
50
|
+
|
|
51
|
+
Explore screens may shift filters into drawers, maps into lists, and galleries into search-led flows.
|
|
52
|
+
|
|
53
|
+
Responsive work preserves the job, not the desktop shape.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Adaptation Bar
|
|
58
|
+
|
|
59
|
+
`/design responsive` recomposes the interface across contexts. It is not a max-width tweak.
|
|
60
|
+
|
|
61
|
+
At minimum, I verify narrow phone, ordinary phone, tablet, small laptop, desktop, and wide desktop behavior when the app can be rendered.
|
|
62
|
+
|
|
63
|
+
I adapt layout, order, density, navigation, actions, tables, media, forms, type, touch targets, hover dependencies, focus path, safe areas, and environmental preferences where they apply.
|
|
64
|
+
|
|
65
|
+
If the same desktop composition merely shrinks, the responsive pass failed.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## My Starting Bias
|
|
70
|
+
|
|
71
|
+
I start from the smallest reasonable canvas and add complexity as space earns it. I do not worship the phrase mobile-first. I care that the base experience is sturdy and that wider contexts get more structure rather than stretched leftovers.
|
|
72
|
+
|
|
73
|
+
Breakpoints come from content pressure. When the content breaks, the layout changes.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Viewports I Respect
|
|
78
|
+
|
|
79
|
+
I test narrow phones, ordinary phones, tablets, small laptops, standard desktop, and ultrawide screens.
|
|
80
|
+
|
|
81
|
+
At small widths, I look for overflow, crushed labels, unreachable actions, tiny targets, and broken reading order.
|
|
82
|
+
|
|
83
|
+
At wide widths, I look for runaway line length, lonely content, stretched controls, and sections that lose composition.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Input Modes
|
|
88
|
+
|
|
89
|
+
I do not equate phone with touch or desktop with mouse.
|
|
90
|
+
|
|
91
|
+
Touch needs larger targets, no hover-only functionality, visible gesture alternatives, and controls placed where hands can reach.
|
|
92
|
+
|
|
93
|
+
Mouse and trackpad can use hover, precision controls, drag, resize, and denser affordances.
|
|
94
|
+
|
|
95
|
+
Keyboard needs logical focus, visible focus, reachable controls, and shortcuts when the product is dense.
|
|
96
|
+
|
|
97
|
+
Stylus and hybrid devices need both touch generosity and pointer precision.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## iOS Safari Input Zoom
|
|
102
|
+
|
|
103
|
+
On iOS Safari, focusing any `input`, `select`, or `textarea` with a font-size below 16px triggers an automatic viewport zoom. The page widens, horizontal scroll appears, and the user must pinch back to normal. This is a silent layout break.
|
|
104
|
+
|
|
105
|
+
I check all form elements at the narrow breakpoint. If font-size is below `1rem` (16px) on screens under 640px, I flag it and correct it.
|
|
106
|
+
|
|
107
|
+
**Specificity warning:** A bare type-selector rule like `input { font-size: 1rem }` loses to any utility class (e.g. Tailwind's `text-sm`). A class selector has higher specificity (0,1,0) than a type selector (0,0,1), so the computed font size remains 14px and iOS Safari still auto-zooms. A rule that does not win the cascade is not a fix.
|
|
108
|
+
|
|
109
|
+
**Fix — replace the utility with a responsive variant:**
|
|
110
|
+
|
|
111
|
+
In Tailwind, swap `text-sm` for `text-base sm:text-sm` on every affected form element. The mobile breakpoint stays at 16px; desktop keeps 14px. No global CSS needed, no specificity fight.
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<!-- before -->
|
|
115
|
+
<input class="text-sm" />
|
|
116
|
+
|
|
117
|
+
<!-- after -->
|
|
118
|
+
<input class="text-base sm:text-sm" />
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
In vanilla CSS projects with no utility classes, a plain media query works because nothing is fighting the type selector:
|
|
122
|
+
|
|
123
|
+
```css
|
|
124
|
+
@media (max-width: 639px) {
|
|
125
|
+
input, select, textarea {
|
|
126
|
+
font-size: 1rem;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
For third-party or generated components where the class cannot be changed, flag it as a component-level issue to address at the source. Do not reach for `!important` — it breaks the cascade and creates a specificity arms race.
|
|
132
|
+
|
|
133
|
+
Never use `maximum-scale=1` in the viewport meta tag — it disables pinch-to-zoom for all users, which is an accessibility failure.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Thumb Reach
|
|
138
|
+
|
|
139
|
+
On phones, the bottom of the screen is easier to reach than the top. Primary actions belong where hands naturally operate. Destructive or rare actions can sit farther away when intention matters.
|
|
140
|
+
|
|
141
|
+
This is not a law for every app shell, but it is a pressure I account for.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Component Adaptation
|
|
146
|
+
|
|
147
|
+
Components should adapt to their container when possible.
|
|
148
|
+
|
|
149
|
+
A card in a sidebar, a card in a main column, and a card in a wide split view should not all use the same composition. Page breakpoints cannot solve every component context cleanly.
|
|
150
|
+
|
|
151
|
+
I prefer components that respond to available space and keep their meaning.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Environmental Preferences
|
|
156
|
+
|
|
157
|
+
Responsive includes the user's environment.
|
|
158
|
+
|
|
159
|
+
Dark mode is a real theme. Reduced motion gets an authored alternative. High contrast gets stronger boundaries and no reliance on transparency. Inverted colors and zoom must not destroy meaning.
|
|
160
|
+
|
|
161
|
+
Safe areas matter. Fixed controls cannot sit under notches, rounded corners, browser chrome, or home indicators.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Text Direction
|
|
166
|
+
|
|
167
|
+
A product that ships Arabic, Hebrew, Farsi, or Urdu is not "the same layout, flipped by the browser." Direction is a layout input, the same as viewport or input mode.
|
|
168
|
+
|
|
169
|
+
I set `dir="rtl"` (or `dir="auto"` per field) at the right scope and build with logical CSS, not physical sides: `margin-inline-start/end`, `padding-inline-start/end`, `border-inline-start/end`, `inset-inline-start/end`, `text-align: start/end`. In Tailwind, that is `ms-/me-`, `ps-/pe-`, `border-s/border-e`, `start-/end-`, `text-start/text-end` instead of `ml-/mr-`, `pl-/pr-`, `border-l/border-r`, `left-/right-`, `text-left/text-right`. Flex and grid order, `justify-start/end`, and `divide-x` (paired with `rtl:divide-x-reverse`) follow direction automatically once the ancestor has `dir` set — I don't hand-mirror markup for these.
|
|
170
|
+
|
|
171
|
+
Not everything flips. Icons that encode reading direction — back/forward chevrons, reply/forward arrows, progress and breadcrumb arrows, drag handles aligned to text flow — mirror in RTL. Icons that encode a universal meaning — play, pause, checkmarks, the brand mark, a clock face, a video timeline scrubber, charts and graphs — stay fixed. Numerals, phone numbers, and embedded LTR content (code, URLs, Latin brand names) stay LTR even inside an RTL paragraph; that's what `dir="auto"` or a `<bdi>` wrapper is for, not a layout hack.
|
|
172
|
+
|
|
173
|
+
I test the actual rendered RTL surface, not just the LTR one with a mental flip. Mixed-direction text (an English product name inside an Arabic sentence), numerals in dates and prices, and long Arabic/Hebrew words at narrow widths are where this breaks first.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Responsive Type
|
|
178
|
+
|
|
179
|
+
Product UI keeps predictable type scales. Brand display can be fluid. Body text remains readable, not theatrical.
|
|
180
|
+
|
|
181
|
+
I do not let a heading scale so aggressively that it breaks zoom, wraps into nonsense, or overwhelms smaller screens.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Tables
|
|
186
|
+
|
|
187
|
+
Tables need a chosen strategy.
|
|
188
|
+
|
|
189
|
+
Data-heavy tables usually keep horizontal scroll because preserving columns matters. Small comparison tables can become cards. Mixed-importance tables can hide lower-priority columns. Very small screens may need stacked cells.
|
|
190
|
+
|
|
191
|
+
I do not mix strategies randomly on the same table.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## What I Refuse
|
|
196
|
+
|
|
197
|
+
- Core features hidden on mobile
|
|
198
|
+
- Calling a width tweak a responsive pass
|
|
199
|
+
- Desktop composition simply squeezed smaller
|
|
200
|
+
- Hover-only controls
|
|
201
|
+
- Touch targets sized for cursors
|
|
202
|
+
- Separate mobile and desktop code paths with different IA
|
|
203
|
+
- Fixed widths that cause horizontal scroll
|
|
204
|
+
- Ultrawide pages with unreadable line length
|
|
205
|
+
- Safe-area ignorance on fixed bars
|
|
206
|
+
- Device detection when feature detection is the real need
|
|
207
|
+
- Fluid type in dense product UI because it seems modern
|
|
208
|
+
- Hardcoded `left`/`right`, `ml-`/`mr-`, `pl-`/`pr-` instead of logical start/end on a product that supports RTL languages
|
|
209
|
+
- Mirroring an icon that carries universal meaning (play, checkmark, brand mark) just because the page is RTL
|
|
210
|
+
- Input, select, or textarea elements with font-size below 16px on narrow screens — iOS Safari zooms the viewport on focus, breaking layout
|
|
211
|
+
- Using `maximum-scale=1` in the viewport meta tag to suppress iOS zoom — it disables pinch-to-zoom for all users
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## How I Know Responsive Works
|
|
216
|
+
|
|
217
|
+
- The rendered UI was checked at multiple viewport classes
|
|
218
|
+
- Composition adapts where the job or content pressure changes
|
|
219
|
+
- The same story survives across viewports
|
|
220
|
+
- Controls fit the input mode
|
|
221
|
+
- Nothing overflows at narrow widths
|
|
222
|
+
- Wide layouts stay composed
|
|
223
|
+
- Keyboard and touch both complete the core task
|
|
224
|
+
- Safe areas protect fixed controls
|
|
225
|
+
- Dark, reduced-motion, high-contrast, and zoom states remain usable
|
|
226
|
+
- Tables keep their data meaning
|
|
227
|
+
- RTL locales render mirrored where direction carries meaning and fixed where it doesn't, with logical CSS doing the work
|
|
228
|
+
- All input, select, and textarea elements use at least 16px font-size on narrow screens — no iOS Safari viewport zoom on focus
|
|
229
|
+
|
|
230
|
+
STRICT RULE — NEVER BREAK THIS
|
|
231
|
+
Do not create report.md, any kind of report, summary, analysis file,
|
|
232
|
+
or extra documentation. This applies every time this file is used.
|
|
233
|
+
Generate no reports unless explicitly asked.
|