@bastani/atomic 0.8.20-0 → 0.8.21-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.
- package/CHANGELOG.md +12 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/CHANGELOG.md +5 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +5 -0
- package/dist/builtin/subagents/agents/code-simplifier.md +78 -22
- package/dist/builtin/subagents/agents/debugger.md +4 -3
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +5 -0
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +25 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/create-spec/SKILL.md +169 -125
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +89 -80
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_asset_producer.toml +92 -0
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_manual_edit_applier.toml +95 -0
- package/dist/builtin/workflows/skills/impeccable/agents/openai.yaml +4 -0
- package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +122 -1
- package/dist/builtin/workflows/skills/impeccable/reference/animate.md +38 -12
- package/dist/builtin/workflows/skills/impeccable/reference/audit.md +5 -5
- package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +7 -7
- package/dist/builtin/workflows/skills/impeccable/reference/brand.md +4 -14
- package/dist/builtin/workflows/skills/impeccable/reference/clarify.md +115 -1
- package/dist/builtin/workflows/skills/impeccable/reference/codex.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/reference/colorize.md +109 -6
- package/dist/builtin/workflows/skills/impeccable/reference/craft.md +7 -7
- package/dist/builtin/workflows/skills/impeccable/reference/critique.md +623 -94
- package/dist/builtin/workflows/skills/impeccable/reference/delight.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/distill.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/document.md +16 -14
- package/dist/builtin/workflows/skills/impeccable/reference/extract.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/harden.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/init.md +172 -0
- package/dist/builtin/workflows/skills/impeccable/reference/interaction-design.md +0 -6
- package/dist/builtin/workflows/skills/impeccable/reference/layout.md +33 -13
- package/dist/builtin/workflows/skills/impeccable/reference/live.md +96 -19
- package/dist/builtin/workflows/skills/impeccable/reference/onboard.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/optimize.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/overdrive.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/polish.md +3 -4
- package/dist/builtin/workflows/skills/impeccable/reference/product.md +1 -3
- package/dist/builtin/workflows/skills/impeccable/reference/quieter.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/shape.md +5 -5
- package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +158 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/cleanup-deprecated.mjs +1 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/command-metadata.json +2 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +225 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +266 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/critique-storage.mjs +17 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/design-parser.mjs +16 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/detect.mjs +21 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +1725 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +244 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +4543 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns.mjs +43 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +252 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +535 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +986 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +208 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/findings.mjs +12 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +419 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +2316 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/impeccable-paths.mjs +17 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/is-generated.mjs +2 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +139 -96
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +4491 -526
- package/dist/builtin/workflows/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-event-validation.mjs +136 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +22 -9
- package/dist/builtin/workflows/skills/impeccable/scripts/live-insert-ui.mjs +458 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-insert.mjs +232 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edits-buffer.mjs +152 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +288 -110
- package/dist/builtin/workflows/skills/impeccable/scripts/live-resume.mjs +47 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/live-server.mjs +1443 -100
- package/dist/builtin/workflows/skills/impeccable/scripts/live-session-store.mjs +17 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-status.mjs +17 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +216 -6
- package/dist/builtin/workflows/skills/impeccable/scripts/live.mjs +2 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/palette.mjs +633 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +1 -1
- package/dist/builtin/workflows/src/extension/index.ts +67 -3
- package/dist/builtin/workflows/src/extension/render-result.ts +26 -1
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +227 -3
- package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +94 -7
- package/dist/builtin/workflows/src/shared/stage-prompt.ts +326 -0
- package/dist/builtin/workflows/src/shared/stage-ui-broker.ts +62 -7
- package/dist/builtin/workflows/src/shared/store-types.ts +43 -0
- package/dist/builtin/workflows/src/shared/store.ts +37 -0
- package/dist/builtin/workflows/src/tui/chat-surface-message.ts +22 -4
- package/dist/builtin/workflows/src/tui/graph-view.ts +47 -0
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +43 -1
- package/dist/builtin/workflows/src/tui/run-detail.ts +10 -4
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +117 -15
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +9 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +2 -5
- package/dist/core/skills.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +11 -29
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/docs/quickstart.md +1 -2
- package/package.json +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/cognitive-load.md +0 -106
- package/dist/builtin/workflows/skills/impeccable/reference/color-and-contrast.md +0 -105
- package/dist/builtin/workflows/skills/impeccable/reference/heuristics-scoring.md +0 -234
- package/dist/builtin/workflows/skills/impeccable/reference/motion-design.md +0 -109
- package/dist/builtin/workflows/skills/impeccable/reference/personas.md +0 -179
- package/dist/builtin/workflows/skills/impeccable/reference/responsive-design.md +0 -114
- package/dist/builtin/workflows/skills/impeccable/reference/spatial-design.md +0 -100
- package/dist/builtin/workflows/skills/impeccable/reference/teach.md +0 -156
- package/dist/builtin/workflows/skills/impeccable/reference/typography.md +0 -159
- package/dist/builtin/workflows/skills/impeccable/reference/ux-writing.md +0 -107
- package/dist/builtin/workflows/skills/impeccable/scripts/load-context.mjs +0 -141
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# Persona-Based Design Testing
|
|
2
|
-
|
|
3
|
-
Test the interface through the eyes of 5 distinct user archetypes. Each persona exposes different failure modes that a single "design director" perspective would miss.
|
|
4
|
-
|
|
5
|
-
**How to use**: Select 2–3 personas most relevant to the interface being critiqued. Walk through the primary user action as each persona. Report specific red flags, not generic concerns.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. Impatient Power User: "Alex"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
**Profile**: Expert with similar products. Expects efficiency, hates hand-holding. Will find shortcuts or leave.
|
|
13
|
-
|
|
14
|
-
**Behaviors**:
|
|
15
|
-
- Skips all onboarding and instructions
|
|
16
|
-
- Looks for keyboard shortcuts immediately
|
|
17
|
-
- Tries to bulk-select, batch-edit, and automate
|
|
18
|
-
- Gets frustrated by required steps that feel unnecessary
|
|
19
|
-
- Abandons if anything feels slow or patronizing
|
|
20
|
-
|
|
21
|
-
**Test Questions**:
|
|
22
|
-
- Can Alex complete the core task in under 60 seconds?
|
|
23
|
-
- Are there keyboard shortcuts for common actions?
|
|
24
|
-
- Can onboarding be skipped entirely?
|
|
25
|
-
- Do modals have keyboard dismiss (Esc)?
|
|
26
|
-
- Is there a "power user" path (shortcuts, bulk actions)?
|
|
27
|
-
|
|
28
|
-
**Red Flags** (report these specifically):
|
|
29
|
-
- Forced tutorials or unskippable onboarding
|
|
30
|
-
- No keyboard navigation for primary actions
|
|
31
|
-
- Slow animations that can't be skipped
|
|
32
|
-
- One-item-at-a-time workflows where batch would be natural
|
|
33
|
-
- Redundant confirmation steps for low-risk actions
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 2. Confused First-Timer: "Jordan"
|
|
38
|
-
|
|
39
|
-
**Profile**: Never used this type of product. Needs guidance at every step. Will abandon rather than figure it out.
|
|
40
|
-
|
|
41
|
-
**Behaviors**:
|
|
42
|
-
- Reads all instructions carefully
|
|
43
|
-
- Hesitates before clicking anything unfamiliar
|
|
44
|
-
- Looks for help or support constantly
|
|
45
|
-
- Misunderstands jargon and abbreviations
|
|
46
|
-
- Takes the most literal interpretation of any label
|
|
47
|
-
|
|
48
|
-
**Test Questions**:
|
|
49
|
-
- Is the first action obviously clear within 5 seconds?
|
|
50
|
-
- Are all icons labeled with text?
|
|
51
|
-
- Is there contextual help at decision points?
|
|
52
|
-
- Does terminology assume prior knowledge?
|
|
53
|
-
- Is there a clear "back" or "undo" at every step?
|
|
54
|
-
|
|
55
|
-
**Red Flags** (report these specifically):
|
|
56
|
-
- Icon-only navigation with no labels
|
|
57
|
-
- Technical jargon without explanation
|
|
58
|
-
- No visible help option or guidance
|
|
59
|
-
- Ambiguous next steps after completing an action
|
|
60
|
-
- No confirmation that an action succeeded
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## 3. Accessibility-Dependent User: "Sam"
|
|
65
|
-
|
|
66
|
-
**Profile**: Uses screen reader (VoiceOver/NVDA), keyboard-only navigation. May have low vision, motor impairment, or cognitive differences.
|
|
67
|
-
|
|
68
|
-
**Behaviors**:
|
|
69
|
-
- Tabs through the interface linearly
|
|
70
|
-
- Relies on ARIA labels and heading structure
|
|
71
|
-
- Cannot see hover states or visual-only indicators
|
|
72
|
-
- Needs adequate color contrast (4.5:1 minimum)
|
|
73
|
-
- May use browser zoom up to 200%
|
|
74
|
-
|
|
75
|
-
**Test Questions**:
|
|
76
|
-
- Can the entire primary flow be completed keyboard-only?
|
|
77
|
-
- Are all interactive elements focusable with visible focus indicators?
|
|
78
|
-
- Do images have meaningful alt text?
|
|
79
|
-
- Is color contrast WCAG AA compliant (4.5:1 for text)?
|
|
80
|
-
- Does the screen reader announce state changes (loading, success, errors)?
|
|
81
|
-
|
|
82
|
-
**Red Flags** (report these specifically):
|
|
83
|
-
- Click-only interactions with no keyboard alternative
|
|
84
|
-
- Missing or invisible focus indicators
|
|
85
|
-
- Meaning conveyed by color alone (red = error, green = success)
|
|
86
|
-
- Unlabeled form fields or buttons
|
|
87
|
-
- Time-limited actions without extension option
|
|
88
|
-
- Custom components that break screen reader flow
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## 4. Deliberate Stress Tester: "Riley"
|
|
93
|
-
|
|
94
|
-
**Profile**: Methodical user who pushes interfaces beyond the happy path. Tests edge cases, tries unexpected inputs, and probes for gaps in the experience.
|
|
95
|
-
|
|
96
|
-
**Behaviors**:
|
|
97
|
-
- Tests edge cases intentionally (empty states, long strings, special characters)
|
|
98
|
-
- Submits forms with unexpected data (emoji, RTL text, very long values)
|
|
99
|
-
- Tries to break workflows by navigating backwards, refreshing mid-flow, or opening in multiple tabs
|
|
100
|
-
- Looks for inconsistencies between what the UI promises and what actually happens
|
|
101
|
-
- Documents problems methodically
|
|
102
|
-
|
|
103
|
-
**Test Questions**:
|
|
104
|
-
- What happens at the edges (0 items, 1000 items, very long text)?
|
|
105
|
-
- Do error states recover gracefully or leave the UI in a broken state?
|
|
106
|
-
- What happens on refresh mid-workflow? Is state preserved?
|
|
107
|
-
- Are there features that appear to work but produce broken results?
|
|
108
|
-
- How does the UI handle unexpected input (emoji, special chars, paste from Excel)?
|
|
109
|
-
|
|
110
|
-
**Red Flags** (report these specifically):
|
|
111
|
-
- Features that appear to work but silently fail or produce wrong results
|
|
112
|
-
- Error handling that exposes technical details or leaves UI in a broken state
|
|
113
|
-
- Empty states that show nothing useful ("No results" with no guidance)
|
|
114
|
-
- Workflows that lose user data on refresh or navigation
|
|
115
|
-
- Inconsistent behavior between similar interactions in different parts of the UI
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## 5. Distracted Mobile User: "Casey"
|
|
120
|
-
|
|
121
|
-
**Profile**: Using phone one-handed on the go. Frequently interrupted. Possibly on a slow connection.
|
|
122
|
-
|
|
123
|
-
**Behaviors**:
|
|
124
|
-
- Uses thumb only; prefers bottom-of-screen actions
|
|
125
|
-
- Gets interrupted mid-flow and returns later
|
|
126
|
-
- Switches between apps frequently
|
|
127
|
-
- Has limited attention span and low patience
|
|
128
|
-
- Types as little as possible, prefers taps and selections
|
|
129
|
-
|
|
130
|
-
**Test Questions**:
|
|
131
|
-
- Are primary actions in the thumb zone (bottom half of screen)?
|
|
132
|
-
- Is state preserved if the user leaves and returns?
|
|
133
|
-
- Does it work on slow connections (3G)?
|
|
134
|
-
- Can forms use autocomplete and smart defaults?
|
|
135
|
-
- Are touch targets at least 44×44pt?
|
|
136
|
-
|
|
137
|
-
**Red Flags** (report these specifically):
|
|
138
|
-
- Important actions positioned at the top of the screen (unreachable by thumb)
|
|
139
|
-
- No state persistence; progress lost on tab switch or interruption
|
|
140
|
-
- Large text inputs required where selection would work
|
|
141
|
-
- Heavy assets loading on every page (no lazy loading)
|
|
142
|
-
- Tiny tap targets or targets too close together
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Selecting Personas
|
|
147
|
-
|
|
148
|
-
Choose personas based on the interface type:
|
|
149
|
-
|
|
150
|
-
| Interface Type | Primary Personas | Why |
|
|
151
|
-
|---------------|-----------------|-----|
|
|
152
|
-
| Landing page / marketing | Jordan, Riley, Casey | First impressions, trust, mobile |
|
|
153
|
-
| Dashboard / admin | Alex, Sam | Power users, accessibility |
|
|
154
|
-
| E-commerce / checkout | Casey, Riley, Jordan | Mobile, edge cases, clarity |
|
|
155
|
-
| Onboarding flow | Jordan, Casey | Confusion, interruption |
|
|
156
|
-
| Data-heavy / analytics | Alex, Sam | Efficiency, keyboard nav |
|
|
157
|
-
| Form-heavy / wizard | Jordan, Sam, Casey | Clarity, accessibility, mobile |
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Project-Specific Personas
|
|
162
|
-
|
|
163
|
-
If `CLAUDE.md` contains a `## Design Context` section (generated by `impeccable teach`), derive 1–2 additional personas from the audience and brand information:
|
|
164
|
-
|
|
165
|
-
1. Read the target audience description
|
|
166
|
-
2. Identify the primary user archetype not covered by the 5 predefined personas
|
|
167
|
-
3. Create a persona following this template:
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
### [Role]: "[Name]"
|
|
171
|
-
|
|
172
|
-
**Profile**: [2-3 key characteristics derived from Design Context]
|
|
173
|
-
|
|
174
|
-
**Behaviors**: [3-4 specific behaviors based on the described audience]
|
|
175
|
-
|
|
176
|
-
**Red Flags**: [3-4 things that would alienate this specific user type]
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Only generate project-specific personas when real Design Context data is available. Don't invent audience details; use the 5 predefined personas when no context exists.
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# Responsive Design
|
|
2
|
-
|
|
3
|
-
## Mobile-First: Write It Right
|
|
4
|
-
|
|
5
|
-
Start with base styles for mobile, use `min-width` queries to layer complexity. Desktop-first (`max-width`) means mobile loads unnecessary styles first.
|
|
6
|
-
|
|
7
|
-
## Breakpoints: Content-Driven
|
|
8
|
-
|
|
9
|
-
Don't chase device sizes; let content tell you where to break. Start narrow, stretch until design breaks, add breakpoint there. Three breakpoints usually suffice (640, 768, 1024px). Use `clamp()` for fluid values without breakpoints.
|
|
10
|
-
|
|
11
|
-
## Detect Input Method, Not Just Screen Size
|
|
12
|
-
|
|
13
|
-
**Screen size doesn't tell you input method.** A laptop with touchscreen, a tablet with keyboard. Use pointer and hover queries:
|
|
14
|
-
|
|
15
|
-
```css
|
|
16
|
-
/* Fine pointer (mouse, trackpad) */
|
|
17
|
-
@media (pointer: fine) {
|
|
18
|
-
.button { padding: 8px 16px; }
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Coarse pointer (touch, stylus) */
|
|
22
|
-
@media (pointer: coarse) {
|
|
23
|
-
.button { padding: 12px 20px; } /* Larger touch target */
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Device supports hover */
|
|
27
|
-
@media (hover: hover) {
|
|
28
|
-
.card:hover { transform: translateY(-2px); }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Device doesn't support hover (touch) */
|
|
32
|
-
@media (hover: none) {
|
|
33
|
-
.card { /* No hover state - use active instead */ }
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
**Critical**: Don't rely on hover for functionality. Touch users can't hover.
|
|
38
|
-
|
|
39
|
-
## Safe Areas: Handle the Notch
|
|
40
|
-
|
|
41
|
-
Modern phones have notches, rounded corners, and home indicators. Use `env()`:
|
|
42
|
-
|
|
43
|
-
```css
|
|
44
|
-
body {
|
|
45
|
-
padding-top: env(safe-area-inset-top);
|
|
46
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
47
|
-
padding-left: env(safe-area-inset-left);
|
|
48
|
-
padding-right: env(safe-area-inset-right);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* With fallback */
|
|
52
|
-
.footer {
|
|
53
|
-
padding-bottom: max(1rem, env(safe-area-inset-bottom));
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Enable viewport-fit** in your meta tag:
|
|
58
|
-
```html
|
|
59
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Responsive Images: Get It Right
|
|
63
|
-
|
|
64
|
-
### srcset with Width Descriptors
|
|
65
|
-
|
|
66
|
-
```html
|
|
67
|
-
<img
|
|
68
|
-
src="hero-800.jpg"
|
|
69
|
-
srcset="
|
|
70
|
-
hero-400.jpg 400w,
|
|
71
|
-
hero-800.jpg 800w,
|
|
72
|
-
hero-1200.jpg 1200w
|
|
73
|
-
"
|
|
74
|
-
sizes="(max-width: 768px) 100vw, 50vw"
|
|
75
|
-
alt="Hero image"
|
|
76
|
-
>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**How it works**:
|
|
80
|
-
- `srcset` lists available images with their actual widths (`w` descriptors)
|
|
81
|
-
- `sizes` tells the browser how wide the image will display
|
|
82
|
-
- Browser picks the best file based on viewport width AND device pixel ratio
|
|
83
|
-
|
|
84
|
-
### Picture Element for Art Direction
|
|
85
|
-
|
|
86
|
-
When you need different crops/compositions (not just resolutions):
|
|
87
|
-
|
|
88
|
-
```html
|
|
89
|
-
<picture>
|
|
90
|
-
<source media="(min-width: 768px)" srcset="wide.jpg">
|
|
91
|
-
<source media="(max-width: 767px)" srcset="tall.jpg">
|
|
92
|
-
<img src="fallback.jpg" alt="...">
|
|
93
|
-
</picture>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Layout Adaptation Patterns
|
|
97
|
-
|
|
98
|
-
**Navigation**: Three stages: hamburger + drawer on mobile, horizontal compact on tablet, full with labels on desktop. **Tables**: Transform to cards on mobile using `display: block` and `data-label` attributes. **Progressive disclosure**: Use `<details>/<summary>` for content that can collapse on mobile.
|
|
99
|
-
|
|
100
|
-
## Testing: Don't Trust DevTools Alone
|
|
101
|
-
|
|
102
|
-
DevTools device emulation is useful for layout but misses:
|
|
103
|
-
|
|
104
|
-
- Actual touch interactions
|
|
105
|
-
- Real CPU/memory constraints
|
|
106
|
-
- Network latency patterns
|
|
107
|
-
- Font rendering differences
|
|
108
|
-
- Browser chrome/keyboard appearances
|
|
109
|
-
|
|
110
|
-
**Test on at least**: One real iPhone, one real Android, a tablet if relevant. Cheap Android phones reveal performance issues you'll never see on simulators.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
**Avoid**: Desktop-first design. Device detection instead of feature detection. Separate mobile/desktop codebases. Ignoring tablet and landscape. Assuming all mobile devices are powerful.
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# Spatial Design
|
|
2
|
-
|
|
3
|
-
## Spacing Systems
|
|
4
|
-
|
|
5
|
-
### Use 4pt Base, Not 8pt
|
|
6
|
-
|
|
7
|
-
8pt systems are too coarse; you'll frequently need 12px (between 8 and 16). Use 4pt for granularity: 4, 8, 12, 16, 24, 32, 48, 64, 96px.
|
|
8
|
-
|
|
9
|
-
### Name Tokens Semantically
|
|
10
|
-
|
|
11
|
-
Name by relationship (`--space-sm`, `--space-lg`), not value (`--spacing-8`). Use `gap` instead of margins for sibling spacing; it eliminates margin collapse and cleanup hacks.
|
|
12
|
-
|
|
13
|
-
## Grid Systems
|
|
14
|
-
|
|
15
|
-
### The Self-Adjusting Grid
|
|
16
|
-
|
|
17
|
-
Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints. Columns are at least 280px, as many as fit per row, leftovers stretch. For complex layouts, use named grid areas (`grid-template-areas`) and redefine them at breakpoints.
|
|
18
|
-
|
|
19
|
-
## Visual Hierarchy
|
|
20
|
-
|
|
21
|
-
### The Squint Test
|
|
22
|
-
|
|
23
|
-
Blur your eyes (or screenshot and blur). Can you still identify:
|
|
24
|
-
- The most important element?
|
|
25
|
-
- The second most important?
|
|
26
|
-
- Clear groupings?
|
|
27
|
-
|
|
28
|
-
If everything looks the same weight blurred, you have a hierarchy problem.
|
|
29
|
-
|
|
30
|
-
### Hierarchy Through Multiple Dimensions
|
|
31
|
-
|
|
32
|
-
Don't rely on size alone. Combine:
|
|
33
|
-
|
|
34
|
-
| Tool | Strong Hierarchy | Weak Hierarchy |
|
|
35
|
-
|------|------------------|----------------|
|
|
36
|
-
| **Size** | 3:1 ratio or more | <2:1 ratio |
|
|
37
|
-
| **Weight** | Bold vs Regular | Medium vs Regular |
|
|
38
|
-
| **Color** | High contrast | Similar tones |
|
|
39
|
-
| **Position** | Top/left (primary) | Bottom/right |
|
|
40
|
-
| **Space** | Surrounded by white space | Crowded |
|
|
41
|
-
|
|
42
|
-
**The best hierarchy uses 2-3 dimensions at once**: A heading that's larger, bolder, AND has more space above it.
|
|
43
|
-
|
|
44
|
-
### Cards Are Not Required
|
|
45
|
-
|
|
46
|
-
Cards are overused. Spacing and alignment create visual grouping naturally. Use cards only when content is truly distinct and actionable, items need visual comparison in a grid, or content needs clear interaction boundaries. **Never nest cards inside cards.** Use spacing, typography, and subtle dividers for hierarchy within a card.
|
|
47
|
-
|
|
48
|
-
## Container Queries
|
|
49
|
-
|
|
50
|
-
Viewport queries are for page layouts. **Container queries are for components**:
|
|
51
|
-
|
|
52
|
-
```css
|
|
53
|
-
.card-container {
|
|
54
|
-
container-type: inline-size;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.card {
|
|
58
|
-
display: grid;
|
|
59
|
-
gap: var(--space-md);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Card layout changes based on its container, not viewport */
|
|
63
|
-
@container (min-width: 400px) {
|
|
64
|
-
.card {
|
|
65
|
-
grid-template-columns: 120px 1fr;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Why this matters**: A card in a narrow sidebar stays compact, while the same card in a main content area expands automatically, without viewport hacks.
|
|
71
|
-
|
|
72
|
-
## Optical Adjustments
|
|
73
|
-
|
|
74
|
-
Text at `margin-left: 0` looks indented due to letterform whitespace; use negative margin (`-0.05em`) to optically align. Geometrically centered icons often look off-center; play icons need to shift right, arrows shift toward their direction.
|
|
75
|
-
|
|
76
|
-
### Touch Targets vs Visual Size
|
|
77
|
-
|
|
78
|
-
Buttons can look small but need large touch targets (44px minimum). Use padding or pseudo-elements:
|
|
79
|
-
|
|
80
|
-
```css
|
|
81
|
-
.icon-button {
|
|
82
|
-
width: 24px; /* Visual size */
|
|
83
|
-
height: 24px;
|
|
84
|
-
position: relative;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.icon-button::before {
|
|
88
|
-
content: '';
|
|
89
|
-
position: absolute;
|
|
90
|
-
inset: -10px; /* Expand tap target to 44px */
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Depth & Elevation
|
|
95
|
-
|
|
96
|
-
Create semantic z-index scales (dropdown → sticky → modal-backdrop → modal → toast → tooltip) instead of arbitrary numbers. For shadows, create a consistent elevation scale (sm → md → lg → xl). **Key insight**: Shadows should be subtle. If you can clearly see it, it's probably too strong.
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
**Avoid**: Arbitrary spacing values outside your scale. Making all spacing equal (variety creates hierarchy). Creating hierarchy through size alone - combine size, weight, color, and space.
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
# Teach Flow
|
|
2
|
-
|
|
3
|
-
Gathers design context for a project and writes two complementary files at the project root:
|
|
4
|
-
|
|
5
|
-
- **PRODUCT.md** (strategic): root project file for register, target users, product purpose, brand personality, anti-references, strategic design principles. Answers "who/what/why".
|
|
6
|
-
- **DESIGN.md** (visual): root project file for visual theme, color palette, typography, components, layout. Follows the [Google Stitch DESIGN.md format](https://stitch.withgoogle.com/docs/design-md/format/). Answers "how it looks".
|
|
7
|
-
|
|
8
|
-
Every other impeccable command reads these files before doing any work.
|
|
9
|
-
|
|
10
|
-
## Step 1: Load current state
|
|
11
|
-
|
|
12
|
-
Run the shared loader first so you know what already exists:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
node .claude/skills/impeccable/scripts/load-context.mjs
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
The output tells you whether PRODUCT.md and/or DESIGN.md already exist. If `migrated: true`, legacy `.impeccable.md` was auto-renamed to `PRODUCT.md`. Mention this once to the user.
|
|
19
|
-
|
|
20
|
-
Decision tree:
|
|
21
|
-
- **Neither file exists (empty project or no context yet)**: do Steps 2-4 (write PRODUCT.md), then decide on DESIGN.md based on whether there's code to analyze.
|
|
22
|
-
- **PRODUCT.md exists, DESIGN.md missing**: skip to Step 5 and offer to run `/impeccable document` for DESIGN.md.
|
|
23
|
-
- **PRODUCT.md exists but has no `## Register` section (legacy)**: add it. Infer a hypothesis from the codebase (see Step 2), confirm with the user, write the field.
|
|
24
|
-
- **Both exist**: STOP and call the AskUserQuestion tool to clarify. Ask which file to refresh. Skip the one the user doesn't want changed.
|
|
25
|
-
- **Just DESIGN.md exists (unusual)**: do Steps 2-4 to produce PRODUCT.md.
|
|
26
|
-
|
|
27
|
-
Never silently overwrite an existing file. Always confirm first.
|
|
28
|
-
|
|
29
|
-
If teach was invoked as a setup blocker by another command, such as `/impeccable craft landing page`, pause that command here. Complete teach, re-run the loader, then resume the original command with the freshly loaded context. For craft, resume into shape next; teach creates project context, but it is not a substitute for the task-specific shape interview and confirmed design brief.
|
|
30
|
-
|
|
31
|
-
## Step 2: Explore the codebase
|
|
32
|
-
|
|
33
|
-
Before asking questions, thoroughly scan the project to discover what you can:
|
|
34
|
-
|
|
35
|
-
- **README and docs**: Project purpose, target audience, any stated goals
|
|
36
|
-
- **Package.json / config files**: Tech stack, dependencies, existing design libraries
|
|
37
|
-
- **Existing components**: Current design patterns, spacing, typography in use
|
|
38
|
-
- **Brand assets**: Logos, favicons, color values already defined
|
|
39
|
-
- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales
|
|
40
|
-
- **Any style guides or brand documentation**
|
|
41
|
-
|
|
42
|
-
Also form a **register hypothesis** from what you find:
|
|
43
|
-
|
|
44
|
-
- Brand signals: `/`, `/about`, `/pricing`, `/blog/*`, `/docs/*`, hero sections, big typography, scroll-driven sections, landing-page-shaped content.
|
|
45
|
-
- Product signals: `/app/*`, `/dashboard`, `/settings`, `/(auth)`, forms, data tables, side/top nav, app-shell components.
|
|
46
|
-
|
|
47
|
-
Register is a hypothesis at this point, not a decision; Step 3 confirms it.
|
|
48
|
-
|
|
49
|
-
Note what you've learned and what remains unclear. This exploration feeds both PRODUCT.md and DESIGN.md.
|
|
50
|
-
|
|
51
|
-
## Step 3: Ask strategic questions (for PRODUCT.md)
|
|
52
|
-
|
|
53
|
-
STOP and call the AskUserQuestion tool to clarify. Ask only about what you couldn't infer from the codebase.
|
|
54
|
-
|
|
55
|
-
### Interview mode, not confirmation mode
|
|
56
|
-
|
|
57
|
-
If the repo is empty or the user's brief is sparse, run a short interview before proposing PRODUCT.md. Do **not** turn a one-sentence request into a complete inferred PRODUCT.md and ask for blanket confirmation.
|
|
58
|
-
|
|
59
|
-
- Use the harness's structured question tool when one exists. Otherwise, ask directly in chat and stop.
|
|
60
|
-
- Ask **2-3 questions per round**, then wait for answers.
|
|
61
|
-
- Use inferred answers as hypotheses or options, not as finished facts.
|
|
62
|
-
- Complete at least one real user-answer round before drafting PRODUCT.md, unless every required answer is directly discoverable from repo docs.
|
|
63
|
-
- Round 1 should establish register, users/purpose, and desired outcome.
|
|
64
|
-
- Round 2 should establish brand personality or references, anti-references, and accessibility needs.
|
|
65
|
-
|
|
66
|
-
### Minimum viable interview
|
|
67
|
-
|
|
68
|
-
Ask enough to complete PRODUCT.md. At minimum, cover register confirmation, users and purpose, brand personality, anti-references, and accessibility needs unless each answer is directly discoverable from repo context. After at least one interview round, you may propose inferred answers, but the user must confirm them before you write PRODUCT.md. Never synthesize PRODUCT.md from the original task prompt alone.
|
|
69
|
-
|
|
70
|
-
### Register (ask first; it shapes everything below)
|
|
71
|
-
|
|
72
|
-
Every design task is either **brand** (marketing, landing, campaign, long-form content, portfolio: design IS the product) or **product** (app UI, admin, dashboards, tools: design SERVES the product).
|
|
73
|
-
|
|
74
|
-
If Step 2 produced a clear hypothesis, lead with it: *"From the codebase, this looks like a [brand / product] surface. Does that match your intent, or should we treat it differently?"*
|
|
75
|
-
|
|
76
|
-
If the signal is genuinely split (e.g. a product with a big marketing landing), STOP and call the AskUserQuestion tool to clarify. Ask which register describes the **primary** surface. The register can be overridden per task later, but PRODUCT.md carries one default.
|
|
77
|
-
|
|
78
|
-
### Users & Purpose
|
|
79
|
-
- Who uses this? What's their context when using it?
|
|
80
|
-
- What job are they trying to get done?
|
|
81
|
-
- For brand: what emotions should the interface evoke? (confidence, delight, calm, urgency)
|
|
82
|
-
- For product: what workflow are they in? What's the primary task on any given screen?
|
|
83
|
-
|
|
84
|
-
### Brand & Personality
|
|
85
|
-
- How would you describe the brand personality in 3 words?
|
|
86
|
-
- Reference sites or apps that capture the right feel? What specifically about them?
|
|
87
|
-
- For brand, push for real-world references in the right lane (tech-minimal, editorial-magazine, consumer-warm, brutalist-grid, etc.), not generic "modern" adjectives.
|
|
88
|
-
- For product, push for category best-tool references (Linear, Figma, Notion, Raycast, Stripe).
|
|
89
|
-
- What should this explicitly NOT look like? Any anti-references?
|
|
90
|
-
|
|
91
|
-
### Accessibility & Inclusion
|
|
92
|
-
- Specific accessibility requirements? (WCAG level, known user needs)
|
|
93
|
-
- Considerations for reduced motion, color blindness, or other accommodations?
|
|
94
|
-
|
|
95
|
-
Skip questions where the answer is already clear. **Do NOT ask about colors, fonts, radii, or visual styling here.** Those belong in DESIGN.md, not PRODUCT.md.
|
|
96
|
-
|
|
97
|
-
## Step 4: Write PRODUCT.md
|
|
98
|
-
|
|
99
|
-
Write PRODUCT.md only after the user has confirmed the strategic answers from Step 3. If an inferred answer is uncertain or unconfirmed, ask before writing.
|
|
100
|
-
|
|
101
|
-
Synthesize into a strategic document:
|
|
102
|
-
|
|
103
|
-
```markdown
|
|
104
|
-
# Product
|
|
105
|
-
|
|
106
|
-
## Register
|
|
107
|
-
|
|
108
|
-
product
|
|
109
|
-
|
|
110
|
-
## Users
|
|
111
|
-
[Who they are, their context, the job to be done]
|
|
112
|
-
|
|
113
|
-
## Product Purpose
|
|
114
|
-
[What this product does, why it exists, what success looks like]
|
|
115
|
-
|
|
116
|
-
## Brand Personality
|
|
117
|
-
[Voice, tone, 3-word personality, emotional goals]
|
|
118
|
-
|
|
119
|
-
## Anti-references
|
|
120
|
-
[What this should NOT look like. Specific bad-example sites or patterns to avoid.]
|
|
121
|
-
|
|
122
|
-
## Design Principles
|
|
123
|
-
[3-5 strategic principles derived from the conversation. Principles like "practice what you preach", "show, don't tell", "expert confidence". NOT visual rules like "use OKLCH" or "magenta accent".]
|
|
124
|
-
|
|
125
|
-
## Accessibility & Inclusion
|
|
126
|
-
[WCAG level, known user needs, considerations]
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Register is either `brand` or `product` as a bare value. No prose, no commentary.
|
|
130
|
-
|
|
131
|
-
Write to `PROJECT_ROOT/PRODUCT.md`. If `.impeccable.md` existed, the loader already renamed it; merge into that content rather than starting from scratch.
|
|
132
|
-
|
|
133
|
-
## Step 5: Decide on DESIGN.md
|
|
134
|
-
|
|
135
|
-
Offer `/impeccable document` either way. Two paths:
|
|
136
|
-
|
|
137
|
-
- **Code exists** (CSS tokens, components, a running site): "I can generate a DESIGN.md that captures your visual system (colors, typography, components) so variants stay on-brand. Want to do that now?"
|
|
138
|
-
- **Pre-implementation** (empty project): "I can seed a starter DESIGN.md from five quick questions about color strategy, type direction, motion energy, and references. You can re-run once there's code, to capture the real tokens. Want to do that now?"
|
|
139
|
-
|
|
140
|
-
If the user agrees, delegate to `/impeccable document` (it auto-detects scan vs seed). Load its reference and follow that flow.
|
|
141
|
-
|
|
142
|
-
If the user prefers to skip, mention they can run `/impeccable document` any time later.
|
|
143
|
-
|
|
144
|
-
## Step 6: Confirm and wrap up
|
|
145
|
-
|
|
146
|
-
Summarize:
|
|
147
|
-
- Register captured (brand / product)
|
|
148
|
-
- What was written (PRODUCT.md, DESIGN.md, or both)
|
|
149
|
-
- The 3-5 strategic principles from PRODUCT.md that will guide future work
|
|
150
|
-
- If DESIGN.md is pending, remind the user how to generate it later
|
|
151
|
-
|
|
152
|
-
**Critical: re-run the loader to refresh session context.** After writing PRODUCT.md, run `node .claude/skills/impeccable/scripts/load-context.mjs` one final time and let its full JSON output land in conversation. This ensures subsequent commands in this session use the freshly-written PRODUCT.md, not a stale earlier version.
|
|
153
|
-
|
|
154
|
-
If teach was invoked as a blocker by another impeccable command (e.g. the user ran `/impeccable polish` with no PRODUCT.md), resume that original task now with the fresh context.
|
|
155
|
-
|
|
156
|
-
Optionally STOP and call the AskUserQuestion tool to clarify. Ask whether they'd like a brief summary of PRODUCT.md appended to CLAUDE.md for easier agent reference. If yes, append a short **Design Context** pointer section there.
|