@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.
Files changed (127) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/CHANGELOG.md +5 -0
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/CHANGELOG.md +5 -0
  6. package/dist/builtin/subagents/agents/code-simplifier.md +78 -22
  7. package/dist/builtin/subagents/agents/debugger.md +4 -3
  8. package/dist/builtin/subagents/package.json +1 -1
  9. package/dist/builtin/web-access/CHANGELOG.md +5 -0
  10. package/dist/builtin/web-access/package.json +1 -1
  11. package/dist/builtin/workflows/CHANGELOG.md +25 -0
  12. package/dist/builtin/workflows/package.json +1 -1
  13. package/dist/builtin/workflows/skills/create-spec/SKILL.md +169 -125
  14. package/dist/builtin/workflows/skills/impeccable/SKILL.md +89 -80
  15. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_asset_producer.toml +92 -0
  16. package/dist/builtin/workflows/skills/impeccable/agents/impeccable_manual_edit_applier.toml +95 -0
  17. package/dist/builtin/workflows/skills/impeccable/agents/openai.yaml +4 -0
  18. package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +122 -1
  19. package/dist/builtin/workflows/skills/impeccable/reference/animate.md +38 -12
  20. package/dist/builtin/workflows/skills/impeccable/reference/audit.md +5 -5
  21. package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +7 -7
  22. package/dist/builtin/workflows/skills/impeccable/reference/brand.md +4 -14
  23. package/dist/builtin/workflows/skills/impeccable/reference/clarify.md +115 -1
  24. package/dist/builtin/workflows/skills/impeccable/reference/codex.md +3 -3
  25. package/dist/builtin/workflows/skills/impeccable/reference/colorize.md +109 -6
  26. package/dist/builtin/workflows/skills/impeccable/reference/craft.md +7 -7
  27. package/dist/builtin/workflows/skills/impeccable/reference/critique.md +623 -94
  28. package/dist/builtin/workflows/skills/impeccable/reference/delight.md +2 -2
  29. package/dist/builtin/workflows/skills/impeccable/reference/distill.md +2 -2
  30. package/dist/builtin/workflows/skills/impeccable/reference/document.md +16 -14
  31. package/dist/builtin/workflows/skills/impeccable/reference/extract.md +1 -1
  32. package/dist/builtin/workflows/skills/impeccable/reference/harden.md +1 -1
  33. package/dist/builtin/workflows/skills/impeccable/reference/init.md +172 -0
  34. package/dist/builtin/workflows/skills/impeccable/reference/interaction-design.md +0 -6
  35. package/dist/builtin/workflows/skills/impeccable/reference/layout.md +33 -13
  36. package/dist/builtin/workflows/skills/impeccable/reference/live.md +96 -19
  37. package/dist/builtin/workflows/skills/impeccable/reference/onboard.md +1 -1
  38. package/dist/builtin/workflows/skills/impeccable/reference/optimize.md +1 -1
  39. package/dist/builtin/workflows/skills/impeccable/reference/overdrive.md +1 -1
  40. package/dist/builtin/workflows/skills/impeccable/reference/polish.md +3 -4
  41. package/dist/builtin/workflows/skills/impeccable/reference/product.md +1 -3
  42. package/dist/builtin/workflows/skills/impeccable/reference/quieter.md +2 -2
  43. package/dist/builtin/workflows/skills/impeccable/reference/shape.md +5 -5
  44. package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +158 -3
  45. package/dist/builtin/workflows/skills/impeccable/scripts/cleanup-deprecated.mjs +1 -1
  46. package/dist/builtin/workflows/skills/impeccable/scripts/command-metadata.json +2 -2
  47. package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +225 -0
  48. package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +266 -0
  49. package/dist/builtin/workflows/skills/impeccable/scripts/critique-storage.mjs +17 -1
  50. package/dist/builtin/workflows/skills/impeccable/scripts/design-parser.mjs +16 -1
  51. package/dist/builtin/workflows/skills/impeccable/scripts/detect.mjs +21 -0
  52. package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +1725 -0
  53. package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +244 -0
  54. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +4543 -0
  55. package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns.mjs +43 -0
  56. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +252 -0
  57. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +535 -0
  58. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +986 -0
  59. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +208 -0
  60. package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
  61. package/dist/builtin/workflows/skills/impeccable/scripts/detector/findings.mjs +12 -0
  62. package/dist/builtin/workflows/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
  63. package/dist/builtin/workflows/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
  64. package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +419 -0
  65. package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +2316 -0
  66. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
  67. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
  68. package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
  69. package/dist/builtin/workflows/skills/impeccable/scripts/impeccable-paths.mjs +17 -1
  70. package/dist/builtin/workflows/skills/impeccable/scripts/is-generated.mjs +2 -2
  71. package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +139 -96
  72. package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +4491 -526
  73. package/dist/builtin/workflows/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
  74. package/dist/builtin/workflows/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
  75. package/dist/builtin/workflows/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
  76. package/dist/builtin/workflows/skills/impeccable/scripts/live-event-validation.mjs +136 -0
  77. package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +22 -9
  78. package/dist/builtin/workflows/skills/impeccable/scripts/live-insert-ui.mjs +458 -0
  79. package/dist/builtin/workflows/skills/impeccable/scripts/live-insert.mjs +232 -0
  80. package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
  81. package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edits-buffer.mjs +152 -0
  82. package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +288 -110
  83. package/dist/builtin/workflows/skills/impeccable/scripts/live-resume.mjs +47 -1
  84. package/dist/builtin/workflows/skills/impeccable/scripts/live-server.mjs +1443 -100
  85. package/dist/builtin/workflows/skills/impeccable/scripts/live-session-store.mjs +17 -0
  86. package/dist/builtin/workflows/skills/impeccable/scripts/live-status.mjs +17 -3
  87. package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +216 -6
  88. package/dist/builtin/workflows/skills/impeccable/scripts/live.mjs +2 -3
  89. package/dist/builtin/workflows/skills/impeccable/scripts/palette.mjs +633 -0
  90. package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +1 -1
  91. package/dist/builtin/workflows/src/extension/index.ts +67 -3
  92. package/dist/builtin/workflows/src/extension/render-result.ts +26 -1
  93. package/dist/builtin/workflows/src/runs/foreground/executor.ts +227 -3
  94. package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +94 -7
  95. package/dist/builtin/workflows/src/shared/stage-prompt.ts +326 -0
  96. package/dist/builtin/workflows/src/shared/stage-ui-broker.ts +62 -7
  97. package/dist/builtin/workflows/src/shared/store-types.ts +43 -0
  98. package/dist/builtin/workflows/src/shared/store.ts +37 -0
  99. package/dist/builtin/workflows/src/tui/chat-surface-message.ts +22 -4
  100. package/dist/builtin/workflows/src/tui/graph-view.ts +47 -0
  101. package/dist/builtin/workflows/src/tui/overlay-adapter.ts +43 -1
  102. package/dist/builtin/workflows/src/tui/run-detail.ts +10 -4
  103. package/dist/builtin/workflows/src/tui/stage-chat-view.ts +117 -15
  104. package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +9 -0
  105. package/dist/core/skills.d.ts.map +1 -1
  106. package/dist/core/skills.js +2 -5
  107. package/dist/core/skills.js.map +1 -1
  108. package/dist/core/system-prompt.d.ts.map +1 -1
  109. package/dist/core/system-prompt.js +11 -29
  110. package/dist/core/system-prompt.js.map +1 -1
  111. package/dist/index.d.ts +1 -0
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +3 -0
  114. package/dist/index.js.map +1 -1
  115. package/docs/quickstart.md +1 -2
  116. package/package.json +4 -4
  117. package/dist/builtin/workflows/skills/impeccable/reference/cognitive-load.md +0 -106
  118. package/dist/builtin/workflows/skills/impeccable/reference/color-and-contrast.md +0 -105
  119. package/dist/builtin/workflows/skills/impeccable/reference/heuristics-scoring.md +0 -234
  120. package/dist/builtin/workflows/skills/impeccable/reference/motion-design.md +0 -109
  121. package/dist/builtin/workflows/skills/impeccable/reference/personas.md +0 -179
  122. package/dist/builtin/workflows/skills/impeccable/reference/responsive-design.md +0 -114
  123. package/dist/builtin/workflows/skills/impeccable/reference/spatial-design.md +0 -100
  124. package/dist/builtin/workflows/skills/impeccable/reference/teach.md +0 -156
  125. package/dist/builtin/workflows/skills/impeccable/reference/typography.md +0 -159
  126. package/dist/builtin/workflows/skills/impeccable/reference/ux-writing.md +0 -107
  127. package/dist/builtin/workflows/skills/impeccable/scripts/load-context.mjs +0 -141
@@ -6,7 +6,7 @@ Add motion that conveys state, gives feedback, and clarifies hierarchy. Cut moti
6
6
 
7
7
  ## Register
8
8
 
9
- Brand: orchestrated page-load sequences, staggered reveals, scroll-driven animation. Motion is part of the voice; one well-rehearsed entrance beats scattered micro-interactions.
9
+ Brand: motion is part of the voice; one well-rehearsed entrance beats scattered micro-interactions. The saturated AI default is fade-and-rise reveals on every scrolled section; that's a tell, not a choreography. Reserve scroll-triggered motion for moments that earn it.
10
10
 
11
11
  Product: 150–250 ms on most transitions. Motion conveys state: feedback, reveal, loading, transitions between views. No page-load choreography; users are in a task and won't wait for it.
12
12
 
@@ -29,7 +29,7 @@ Analyze where motion would improve the experience:
29
29
  - Who's the audience? (Motion-sensitive users? Power users who want speed?)
30
30
  - What matters most? (One hero animation vs many micro-interactions?)
31
31
 
32
- If any of these are unclear from the codebase, STOP and call the AskUserQuestion tool to clarify.
32
+ If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
33
33
 
34
34
  **CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
35
35
 
@@ -49,10 +49,11 @@ Create a purposeful animation plan:
49
49
  Add motion systematically across these categories:
50
50
 
51
51
  ### Entrance Animations
52
- - **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
53
52
  - **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
54
- - **Content reveals**: Scroll-triggered animations using intersection observer
55
53
  - **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
54
+ - **List rhythm**: Sibling stagger is legitimate for cards-in-a-grid or list-items-appearing. Whole-section fade-on-scroll is not a list and is not legitimate. Cap total stagger time: 10 items at 50ms each = 500ms total. For more items, reduce per-item delay or cap the staggered count.
55
+
56
+ Use CSS custom properties for clean stagger: `animation-delay: calc(var(--i, 0) * 50ms)` with `style="--i: 0"`, `style="--i: 1"`, etc. on each item.
56
57
 
57
58
  ### Micro-interactions
58
59
  - **Button feedback**:
@@ -97,11 +98,14 @@ Use appropriate techniques for each animation:
97
98
 
98
99
  ### Timing & Easing
99
100
 
100
- **Durations by purpose:**
101
- - **100-150ms**: Instant feedback (button press, toggle)
102
- - **200-300ms**: State changes (hover, menu open)
103
- - **300-500ms**: Layout changes (accordion, modal)
104
- - **500-800ms**: Entrance animations (page load)
101
+ **Duration: the 100/300/500 rule.** Timing matters more than easing for "feels right":
102
+
103
+ | Duration | Use Case | Examples |
104
+ |----------|----------|----------|
105
+ | **100–150ms** | Instant feedback | Button press, toggle, color change |
106
+ | **200–300ms** | State changes | Menu open, tooltip, hover state |
107
+ | **300–500ms** | Layout changes | Accordion, modal, drawer |
108
+ | **500–800ms** | Entrance animations | Page load, hero reveal |
105
109
 
106
110
  **Easing curves (use these, not CSS defaults):**
107
111
  ```css
@@ -134,13 +138,35 @@ Use appropriate techniques for each animation:
134
138
  - GSAP for complex sequences
135
139
  ```
136
140
 
141
+ ### Motion Materials
142
+
143
+ Transform and opacity are reliable defaults, not the whole palette. Premium interfaces often need atmospheric properties. Match material to effect:
144
+
145
+ - **Transform / opacity**: movement, press feedback, simple reveals, list choreography
146
+ - **Blur / filter / backdrop-filter**: focus pulls, depth, glass or lens effects, softened entrances
147
+ - **Clip-path / masks**: wipes, reveals, editorial cropping, product-like transitions
148
+ - **Shadow / glow / color filters**: energy, affordance, focus, warmth, active state
149
+ - **Grid-template-rows or FLIP-style transforms**: expanding and reflowing layout without animating `height` directly
150
+
151
+ The hard rule isn't "transform and opacity only." It's: avoid animating layout-driving properties casually (`width`, `height`, `top`, `left`, margins), keep expensive effects bounded to small or isolated areas, and verify smoothness in-browser on target viewports.
152
+
137
153
  ### Performance
138
- - **Motion materials**: Use transform/opacity for reliable movement, but use blur, filters, masks, shadows, and color shifts when they materially improve the effect
139
154
  - **Layout safety**: Avoid casual animation of layout-driving properties (`width`, `height`, `top`, `left`, margins)
140
- - **will-change**: Add sparingly for known expensive animations
155
+ - **will-change**: Add sparingly for known expensive animations only (e.g. on `:hover` or an `.animating` class), never preemptively across the whole page
156
+ - **Scroll triggers**: Use Intersection Observer instead of scroll event listeners; unobserve after the animation fires once
141
157
  - **Bound expensive effects**: Keep blur/filter/shadow areas small or isolated, use `contain` where appropriate
142
158
  - **Monitor FPS**: Ensure 60fps on target devices
143
159
 
160
+ ### Perceived Performance
161
+
162
+ Nobody cares how fast your site *is*, only how fast it feels. The 80ms threshold: anything under ~80ms feels instant because our brains buffer sensory input for that long to synchronize perception. Target this for micro-interactions.
163
+
164
+ - **Preemptive start**: Begin transitions immediately while loading (iOS app zoom, skeleton UI). Users perceive work happening.
165
+ - **Early completion**: Show content progressively, don't wait for everything (progressive images, streaming HTML, skeleton fade-ins).
166
+ - **Optimistic UI**: Update the interface immediately, handle failures gracefully. Use for low-stakes actions (likes, follows). Avoid for payments or destructive operations.
167
+ - **Easing affects perceived duration**: Ease-in (accelerating toward completion) makes tasks feel shorter because the peak-end effect weights final moments heavily. Ease-out feels satisfying for entrances.
168
+ - **Caution**: Too-fast responses can decrease perceived value for complex operations (search, analysis). Sometimes a brief delay signals "real work" is happening.
169
+
144
170
  ### Accessibility
145
171
  ```css
146
172
  @media (prefers-reduced-motion: reduce) {
@@ -172,4 +198,4 @@ Test animations thoroughly:
172
198
  - **Doesn't block**: Users can interact during/after animations
173
199
  - **Adds value**: Makes interface clearer or more delightful
174
200
 
175
- When the motion clarifies state instead of decorating it, hand off to `/impeccable polish` for the final pass.
201
+ When the motion clarifies state instead of decorating it, hand off to `$impeccable polish` for the final pass.
@@ -95,7 +95,7 @@ For each issue, document:
95
95
  - **Impact**: How it affects users
96
96
  - **WCAG/Standard**: Which standard it violates (if applicable)
97
97
  - **Recommendation**: How to fix it
98
- - **Suggested command**: Which command to use (prefer: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable document, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset)
98
+ - **Suggested command**: Which command to use (prefer: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable document, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset)
99
99
 
100
100
  ### Patterns & Systemic Issues
101
101
 
@@ -111,16 +111,16 @@ Note what's working well: good practices to maintain and replicate.
111
111
 
112
112
  List recommended commands in priority order (P0 first, then P1, then P2):
113
113
 
114
- 1. **[P?] `/command-name`**: Brief description (specific context from audit findings)
115
- 2. **[P?] `/command-name`**: Brief description (specific context)
114
+ 1. **[P?] `$command-name`**: Brief description (specific context from audit findings)
115
+ 2. **[P?] `$command-name`**: Brief description (specific context)
116
116
 
117
- **Rules**: Only recommend commands from: /impeccable adapt, /impeccable animate, /impeccable audit, /impeccable bolder, /impeccable clarify, /impeccable colorize, /impeccable critique, /impeccable delight, /impeccable distill, /impeccable document, /impeccable harden, /impeccable layout, /impeccable onboard, /impeccable optimize, /impeccable overdrive, /impeccable polish, /impeccable quieter, /impeccable shape, /impeccable typeset. Map findings to the most appropriate command. End with `/impeccable polish` as the final step if any fixes were recommended.
117
+ **Rules**: Only recommend commands from: $impeccable adapt, $impeccable animate, $impeccable audit, $impeccable bolder, $impeccable clarify, $impeccable colorize, $impeccable critique, $impeccable delight, $impeccable distill, $impeccable document, $impeccable harden, $impeccable layout, $impeccable onboard, $impeccable optimize, $impeccable overdrive, $impeccable polish, $impeccable quieter, $impeccable shape, $impeccable typeset. Map findings to the most appropriate command. End with `$impeccable polish` as the final step if any fixes were recommended.
118
118
 
119
119
  After presenting the summary, tell the user:
120
120
 
121
121
  > You can ask me to run these one at a time, all at once, or in any order you prefer.
122
122
  >
123
- > Re-run `/impeccable audit` after fixes to see your score improve.
123
+ > Re-run `$impeccable audit` after fixes to see your score improve.
124
124
 
125
125
  **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters.
126
126
 
@@ -28,7 +28,7 @@ Analyze what makes the design feel too safe or boring:
28
28
  - Who's the audience? (What will resonate?)
29
29
  - What are the constraints? (Brand guidelines, accessibility, performance)
30
30
 
31
- If any of these are unclear from the codebase, STOP and call the AskUserQuestion tool to clarify.
31
+ If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
32
32
 
33
33
  **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
34
34
 
@@ -50,7 +50,7 @@ Create a strategy to increase impact while maintaining coherence:
50
50
  Systematically increase impact across these dimensions:
51
51
 
52
52
  ### Typography Amplification
53
- - **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and [typography.md](typography.md) for inspiration)
53
+ - **Replace generic fonts**: Swap system fonts for distinctive choices (see the parent skill's typography guidelines and the [Reference Material section of typeset.md](typeset.md#reference-material) for inspiration)
54
54
  - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x)
55
55
  - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400
56
56
  - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default)
@@ -78,10 +78,10 @@ Systematically increase impact across these dimensions:
78
78
  - **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand
79
79
 
80
80
  ### Motion & Animation
81
- - **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays
82
- - **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences
83
- - **Micro-interactions**: Satisfying hover effects, click feedback, state changes
84
- - **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic, which cheapen the effect)
81
+ - **Hero moment**: One signature entrance, once. Not on every visit and not on every section.
82
+ - **Micro-interactions**: Satisfying hover effects, click feedback, state changes.
83
+ - **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic, which cheapen the effect).
84
+ - **Bolder scroll-fade-rise on every section.** That's the saturated AI default, the opposite of bold.
85
85
 
86
86
  ### Composition Boldness
87
87
  - **Hero moments**: Create clear focal points with dramatic treatment
@@ -110,4 +110,4 @@ Ensure amplification maintains usability and coherence:
110
110
 
111
111
  **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects."
112
112
 
113
- When the result feels right, hand off to `/impeccable polish` for the final pass.
113
+ When the result feels right, hand off to `$impeccable polish` for the final pass.
@@ -43,17 +43,10 @@ The reflex-reject lists apply to **new design choices**. When the existing brand
43
43
 
44
44
  ### Pairing and voice
45
45
 
46
- Distinctive + refined is the goal. The specific shape depends on the brand:
47
-
48
- - **Editorial / long-form / luxury**: display serif + sans body (a magazine shape).
49
- - **Tech / dev tools / fintech**: one committed sans, usually; custom-tight tracking, strong weight contrast inside a single family.
50
- - **Consumer / food / travel**: warmer pairings, often a humanist sans plus a script or display serif.
51
- - **Creative studios / agencies**: rule-breaking welcome. Mono-only, or display-only, or custom-drawn type as voice.
46
+ Distinctive + refined is the goal. The specific shape depends on the brand, not on the brand's category. A category ("restaurant", "dev tool", "magazine", "fintech") is not a recipe; treating it as one is the first-order reflex SKILL.md warns against.
52
47
 
53
48
  Two families minimum is the rule *only* when the voice needs it. A single well-chosen family with committed weight/size contrast is stronger than a timid display+body pair.
54
49
 
55
- Vary across projects. If the last brief was a serif-display landing page, this one isn't.
56
-
57
50
  ### Scale
58
51
 
59
52
  Modular scale, fluid `clamp()` for headings, ≥1.25 ratio between steps. Flat scales (1.1× apart) read as uncommitted.
@@ -74,8 +67,7 @@ Brand surfaces have permission for Committed, Full palette, and Drenched strateg
74
67
 
75
68
  - Asymmetric compositions are one option. Break the grid intentionally for emphasis.
76
69
  - Fluid spacing with `clamp()` that breathes on larger viewports. Vary for rhythm: generous separations, tight groupings.
77
- - Alternative: a strict, visible grid as the voice (brutalist / Swiss / tech-spec aesthetics). Either asymmetric or rigorously-gridded can be "designed"; the failure mode is splitting the difference into a generic centered stack.
78
- - Don't default to centering everything. Left-aligned with asymmetric layouts feels more designed; a strict grid reads as confident structure. A centered-stack hero with icon-title-subtitle cards reads as template.
70
+ - For image-led briefs (hotels, restaurants, magazines, photography), full-bleed hero imagery with overlaid menu and centered headline is a canonical move; let the photograph be the design.
79
71
  - When cards ARE the right affordance, use `grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))` for breakpoint-free responsiveness.
80
72
 
81
73
  ## Imagery
@@ -93,8 +85,7 @@ Brand surfaces lean on imagery. A restaurant, hotel, magazine, or product landin
93
85
 
94
86
  ## Motion
95
87
 
96
- - One well-orchestrated page-load with staggered reveals beats scattered micro-interactions, when the brand invites it. Tech-minimal brands often skip entrance motion entirely; the restraint is the voice.
97
- - For collapsing/expanding sections, transition `grid-template-rows` rather than `height`.
88
+ - One well-orchestrated page-load beats scattered micro-interactions, when the brand invites it. Some brands skip entrance motion entirely; the restraint is the voice.
98
89
 
99
90
  ## Brand bans (on top of the shared absolute bans)
100
91
 
@@ -111,8 +102,7 @@ Brand surfaces lean on imagery. A restaurant, hotel, magazine, or product landin
111
102
 
112
103
  Brand can afford things product can't. Take them.
113
104
 
114
- - Ambitious first-load motion. Reveals, scroll-triggered transitions, typographic choreography.
105
+ - Ambitious first-load motion. Reveals and typographic choreography that earn their place; not fade-on-scroll for every section.
115
106
  - Single-purpose viewports. One dominant idea per fold, long scroll, deliberate pacing.
116
- - Typographic risk. Enormous display type, unexpected italic cuts, mixed cases, hand-drawn headlines, a single oversize word as a hero.
117
107
  - Unexpected color strategies. Palette IS voice; a calm brand and a restless brand should not share palette mechanics.
118
108
  - Art direction per section. Different sections can have different visual worlds if the narrative demands it. Consistency of voice beats consistency of treatment.
@@ -171,4 +171,118 @@ Test that copy improvements work:
171
171
  - **Consistency**: Does it match terminology elsewhere?
172
172
  - **Tone**: Is it appropriate for the situation?
173
173
 
174
- When the copy reads cleanly, hand off to `/impeccable polish` for the final pass.
174
+ When the copy reads cleanly, hand off to `$impeccable polish` for the final pass.
175
+
176
+ ---
177
+
178
+ ## Reference Material
179
+
180
+ The sections below were previously `ux-writing.md` and live inline now so the clarify flow has its deep UX-writing reference in one place.
181
+
182
+ ### UX Writing
183
+
184
+ #### The Button Label Problem
185
+
186
+ **Never use "OK", "Submit", or "Yes/No".** These are lazy and ambiguous. Use specific verb + object patterns:
187
+
188
+ | Bad | Good | Why |
189
+ |-----|------|-----|
190
+ | OK | Save changes | Says what will happen |
191
+ | Submit | Create account | Outcome-focused |
192
+ | Yes | Delete message | Confirms the action |
193
+ | Cancel | Keep editing | Clarifies what "cancel" means |
194
+ | Click here | Download PDF | Describes the destination |
195
+
196
+ **For destructive actions**, name the destruction:
197
+ - "Delete" not "Remove" (delete is permanent, remove implies recoverable)
198
+ - "Delete 5 items" not "Delete selected" (show the count)
199
+
200
+ #### Error Messages: The Formula
201
+
202
+ Every error message should answer: (1) What happened? (2) Why? (3) How to fix it? Example: "Email address isn't valid. Please include an @ symbol." not "Invalid input".
203
+
204
+ ##### Error Message Templates
205
+
206
+ | Situation | Template |
207
+ |-----------|----------|
208
+ | **Format error** | "[Field] needs to be [format]. Example: [example]" |
209
+ | **Missing required** | "Please enter [what's missing]" |
210
+ | **Permission denied** | "You don't have access to [thing]. [What to do instead]" |
211
+ | **Network error** | "We couldn't reach [thing]. Check your connection and [action]." |
212
+ | **Server error** | "Something went wrong on our end. We're looking into it. [Alternative action]" |
213
+
214
+ ##### Don't Blame the User
215
+
216
+ Reframe errors: "Please enter a date in MM/DD/YYYY format" not "You entered an invalid date".
217
+
218
+ #### Empty States Are Opportunities
219
+
220
+ Empty states are onboarding moments: (1) Acknowledge briefly, (2) Explain the value of filling it, (3) Provide a clear action. "No projects yet. Create your first one to get started." not just "No items".
221
+
222
+ #### Voice vs Tone
223
+
224
+ **Voice** is your brand's personality, consistent everywhere.
225
+ **Tone** adapts to the moment.
226
+
227
+ | Moment | Tone Shift |
228
+ |--------|------------|
229
+ | Success | Celebratory, brief: "Done! Your changes are live." |
230
+ | Error | Empathetic, helpful: "That didn't work. Here's what to try..." |
231
+ | Loading | Reassuring: "Saving your work..." |
232
+ | Destructive confirm | Serious, clear: "Delete this project? This can't be undone." |
233
+
234
+ **Never use humor for errors.** Users are already frustrated. Be helpful, not cute.
235
+
236
+ #### Writing for Accessibility
237
+
238
+ **Link text** must have standalone meaning: "View pricing plans" not "Click here". **Alt text** describes information, not the image: "Revenue increased 40% in Q4" not "Chart". Use `alt=""` for decorative images. **Icon buttons** need `aria-label` for screen reader context.
239
+
240
+ #### Writing for Translation
241
+
242
+ ##### Plan for Expansion
243
+
244
+ German text is ~30% longer than English. Allocate space:
245
+
246
+ | Language | Expansion |
247
+ |----------|-----------|
248
+ | German | +30% |
249
+ | French | +20% |
250
+ | Finnish | +30-40% |
251
+ | Chinese | -30% (fewer chars, but same width) |
252
+
253
+ ##### Translation-Friendly Patterns
254
+
255
+ Keep numbers separate ("New messages: 3" not "You have 3 new messages"). Use full sentences as single strings (word order varies by language). Avoid abbreviations ("5 minutes ago" not "5 mins ago"). Give translators context about where strings appear.
256
+
257
+ #### Consistency: The Terminology Problem
258
+
259
+ Pick one term and stick with it:
260
+
261
+ | Inconsistent | Consistent |
262
+ |--------------|------------|
263
+ | Delete / Remove / Trash | Delete |
264
+ | Settings / Preferences / Options | Settings |
265
+ | Sign in / Log in / Enter | Sign in |
266
+ | Create / Add / New | Create |
267
+
268
+ Build a terminology glossary and enforce it. Variety creates confusion.
269
+
270
+ #### Avoid Redundant Copy
271
+
272
+ If the heading explains it, the intro is redundant. If the button is clear, don't explain it again. Say it once, say it well.
273
+
274
+ #### Loading States
275
+
276
+ Be specific: "Saving your draft..." not "Loading...". For long waits, set expectations ("This usually takes 30 seconds") or show progress.
277
+
278
+ #### Confirmation Dialogs: Use Sparingly
279
+
280
+ Most confirmation dialogs are design failures; consider undo instead. When you must confirm: name the action, explain consequences, use specific button labels ("Delete project" / "Keep project", not "Yes" / "No").
281
+
282
+ #### Form Instructions
283
+
284
+ Show format with placeholders, not instructions. For non-obvious fields, explain why you're asking.
285
+
286
+ ---
287
+
288
+ **Avoid**: Jargon without explanation. Blaming users ("You made an error" → "This field is required"). Vague errors ("Something went wrong"). Varying terminology for variety. Humor for errors.
@@ -1,6 +1,6 @@
1
1
  # Codex: Visual Direction & Asset Production
2
2
 
3
- This file is loaded by `/impeccable craft` when the harness has native image generation (currently Codex via `image_gen`). Other harnesses skip it. It covers the two craft steps that depend on real image generation: landing the visual direction, and producing the raster assets the implementation will compose.
3
+ This file is loaded by `$impeccable craft` when the harness has native image generation (currently Codex via `image_gen`). Other harnesses skip it. It covers the two craft steps that depend on real image generation: landing the visual direction, and producing the raster assets the implementation will compose.
4
4
 
5
5
  Read this *before* generating any images. The order matters, and the per-step user pauses are what keep generated imagery from drifting away from the brief.
6
6
 
@@ -23,8 +23,8 @@ Before generating anything, run a brief direction conversation grounded in the s
23
23
 
24
24
  Ask **2-3 targeted questions** about visual lane, color strategy, atmosphere, and named anchor references. Don't enumerate generic menus; tie each question to the shape brief's answers. Example shape-grounded questions:
25
25
 
26
- - "Brief says 'editorial restraint, Klim-adjacent.' Are we closer to a quiet specimen page or a magazine-spread feel with hero imagery?"
27
- - "Palette strategy from shape was 'Committed.' Want it warm-grounded (deep oxblood + cream) or cool-grounded (slate + paper white)?"
26
+ - "Brief says 'specimen-page restraint.' Are we closer to a quiet typographic page or a wider editorial spread with hero imagery?"
27
+ - "Palette strategy from shape was 'Committed.' Which one color carries the surface (a brand-driven pick rather than a default warm-or-cool framing)? (And no, the answer isn't a cream/sand body bg; that's the saturated AI default.)"
28
28
 
29
29
  **STOP and wait for answers.** These pin the palette before any pixel gets generated. Do not proceed to Step B until the user has responded.
30
30
 
@@ -30,7 +30,7 @@ Analyze the current state and identify opportunities:
30
30
  - **Wayfinding**: Helping users navigate and understand structure
31
31
  - **Delight**: Moments of visual interest and personality
32
32
 
33
- If any of these are unclear from the codebase, STOP and call the AskUserQuestion tool to clarify.
33
+ If any of these are unclear from the codebase, STOP and use Codex's structured user-input/question tool when available; if unavailable, ask directly in chat to clarify what you cannot infer.
34
34
 
35
35
  **CRITICAL**: More color ≠ better. Strategic color beats rainbow vomit every time. Every color should have a purpose.
36
36
 
@@ -68,10 +68,10 @@ Add color systematically across these dimensions:
68
68
  - **Hover states**: Introduce color on interaction
69
69
 
70
70
  ### Background & Surfaces
71
- - **Tinted backgrounds**: Replace pure gray (`#f5f5f5`) with warm neutrals (`oklch(97% 0.01 60)`) or cool tints (`oklch(97% 0.01 250)`)
71
+ - **Tinted backgrounds**: If you replace pure gray, tint toward the brand hue, not toward a generic-warm-or-cool pair. The default-warm-tint (`oklch(97% 0.01 60)` and its neighbors) is now the AI cream/sand giveaway. Be specific to the brand or stay neutral.
72
72
  - **Colored sections**: Use subtle background colors to separate areas
73
73
  - **Gradient backgrounds**: Add depth with subtle, intentional gradients (not generic purple-blue)
74
- - **Cards & surfaces**: Tint cards or surfaces slightly for warmth
74
+ - **Cards & surfaces**: Tint cards or surfaces toward the brand, not "for warmth" by reflex
75
75
 
76
76
  **Use OKLCH for color**: It's perceptually uniform, meaning equal steps in lightness *look* equal. Great for generating harmonious scales.
77
77
 
@@ -124,8 +124,6 @@ Ensure color addition improves rather than overwhelms:
124
124
  - Use every color in the rainbow (choose 2-4 colors beyond neutrals)
125
125
  - Apply color randomly without semantic meaning
126
126
  - Put gray text on colored backgrounds. It looks washed out; use a darker shade of the background color or transparency instead
127
- - Use pure gray for neutrals. Add subtle color tint (warm or cool) for depth
128
- - Use pure black (`#000`) or pure white (`#fff`) for large areas
129
127
  - Violate WCAG contrast requirements
130
128
  - Use color as the only indicator (accessibility issue)
131
129
  - Make everything colorful (defeats the purpose)
@@ -141,7 +139,7 @@ Test that colorization improves the experience:
141
139
  - **Still accessible**: Do all color combinations meet WCAG standards?
142
140
  - **Not overwhelming**: Is color balanced and purposeful?
143
141
 
144
- When the palette earns its place, hand off to `/impeccable polish` for the final pass.
142
+ When the palette earns its place, hand off to `$impeccable polish` for the final pass.
145
143
 
146
144
  ## Live-mode signature params
147
145
 
@@ -152,3 +150,108 @@ When invoked from live mode, each variant MUST declare a `color-amount` param so
152
150
  ```
153
151
 
154
152
  Layer 1-2 variant-specific params on top: palette selection (`steps` with named options), temperature warmth, or tint vs. true color. See `reference/live.md` for the full params contract.
153
+
154
+ ---
155
+
156
+ ## Reference Material
157
+
158
+ The sections below were previously `color-and-contrast.md` and live inline now so the colorize flow has its deep color reference in one place.
159
+
160
+ ### Color & Contrast
161
+
162
+ #### Color Spaces: Use OKLCH
163
+
164
+ **Stop using HSL.** Use OKLCH (or LCH) instead. It's perceptually uniform, meaning equal steps in lightness *look* equal, unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark.
165
+
166
+ The OKLCH function takes three components: `oklch(lightness chroma hue)` where lightness is 0-100%, chroma is roughly 0-0.4, and hue is 0-360. To build a primary color and its lighter / darker variants, hold the chroma+hue roughly constant and vary the lightness, but **reduce chroma as you approach white or black**, because high chroma at extreme lightness looks garish.
167
+
168
+ The hue you pick is a brand decision and should not come from a default. Do not reach for blue (hue 250) or warm orange (hue 60) by reflex; those are the dominant AI-design defaults, not the right answer for any specific brand.
169
+
170
+ #### Building Functional Palettes
171
+
172
+ ##### Tinted Neutrals
173
+
174
+ **Pure gray is dead.** A neutral with zero chroma feels lifeless next to a colored brand. Add a tiny chroma value (0.005-0.015) to all your neutrals, hued toward whatever your brand color is. The chroma is small enough not to read as "tinted" consciously, but it creates subconscious cohesion between brand color and UI surfaces.
175
+
176
+ The hue you tint toward should come from THIS project's brand, not from a "warm = friendly, cool = tech" formula. If your brand color is teal, your neutrals lean toward teal. If your brand color is amber, they lean toward amber. The point is cohesion with the SPECIFIC brand, not a stock palette.
177
+
178
+ **Avoid** the trap of always tinting toward warm orange or always tinting toward cool blue. Those are the two laziest defaults and they create their own monoculture across projects.
179
+
180
+ ##### Palette Structure
181
+
182
+ A complete system needs:
183
+
184
+ | Role | Purpose | Example |
185
+ |------|---------|---------|
186
+ | **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades |
187
+ | **Neutral** | Text, backgrounds, borders | 9-11 shade scale |
188
+ | **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each |
189
+ | **Surface** | Cards, modals, overlays | 2-3 elevation levels |
190
+
191
+ **Skip secondary/tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise.
192
+
193
+ ##### The 60-30-10 Rule (Applied Correctly)
194
+
195
+ This rule is about **visual weight**, not pixel count:
196
+
197
+ - **60%**: Neutral backgrounds, white space, base surfaces
198
+ - **30%**: Secondary colors: text, borders, inactive states
199
+ - **10%**: Accent: CTAs, highlights, focus states
200
+
201
+ The common mistake: using the accent color everywhere because it's "the brand color." Accent colors work *because* they're rare. Overuse kills their power.
202
+
203
+ #### Contrast & Accessibility
204
+
205
+ ##### WCAG Requirements
206
+
207
+ | Content Type | AA Minimum | AAA Target |
208
+ |--------------|------------|------------|
209
+ | Body text | 4.5:1 | 7:1 |
210
+ | Large text (18px+ or 14px bold) | 3:1 | 4.5:1 |
211
+ | UI components, icons | 3:1 | 4.5:1 |
212
+ | Non-essential decorations | None | None |
213
+
214
+ ##### Dangerous Color Combinations
215
+
216
+ These commonly fail contrast or cause readability issues:
217
+
218
+ - Light gray text on white (the #1 accessibility fail)
219
+ - Red text on green background (or vice versa): 8% of men can't distinguish these
220
+ - Blue text on red background (vibrates visually)
221
+ - Yellow text on white (almost always fails)
222
+ - Thin light text on images (unpredictable contrast)
223
+
224
+ ##### Testing
225
+
226
+ Don't trust your eyes. Use tools:
227
+
228
+ - [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
229
+ - Browser DevTools → Rendering → Emulate vision deficiencies
230
+ - [Polypane](https://polypane.app/) for real-time testing
231
+
232
+ #### Theming: Light & Dark Mode
233
+
234
+ ##### Dark Mode Is Not Inverted Light Mode
235
+
236
+ You can't just swap colors. Dark mode requires different design decisions:
237
+
238
+ | Light Mode | Dark Mode |
239
+ |------------|-----------|
240
+ | Shadows for depth | Lighter surfaces for depth (no shadows) |
241
+ | Dark text on light | Light text on dark (reduce font weight) |
242
+ | Vibrant accents | Desaturate accents slightly |
243
+ | White backgrounds | Either pure black or a deep surface that fits the brand (a brand-tinted near-black at oklch 12-18% works too) |
244
+
245
+ In dark mode, depth comes from surface lightness, not shadow. Build a 3-step surface scale where higher elevations are lighter (e.g. 15% / 20% / 25% lightness). Use the SAME hue and chroma as your brand color (whatever it is for THIS project; do not reach for blue) and only vary the lightness. Reduce body text weight slightly (e.g. 350 instead of 400) because light text on dark reads as heavier than dark text on light.
246
+
247
+ ##### Token Hierarchy
248
+
249
+ Use two layers: primitive tokens (`--blue-500`) and semantic tokens (`--color-primary: var(--blue-500)`). For dark mode, only redefine the semantic layer; primitives stay the same.
250
+
251
+ #### Alpha Is A Design Smell
252
+
253
+ Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed.
254
+
255
+ ---
256
+
257
+ **Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Skipping color blindness testing (8% of men affected).
@@ -42,7 +42,7 @@ Default: Astro for brand briefs, the project's existing framework for product br
42
42
 
43
43
  ## Step 1: Shape the Design
44
44
 
45
- Run /impeccable shape, passing along whatever feature description the user provided. Shape is **required** for craft; it is what produces a confirmed direction.
45
+ Run $impeccable shape, passing along whatever feature description the user provided. Shape is **required** for craft; it is what produces a confirmed direction.
46
46
 
47
47
  Present the shape output and stop. Wait for the user to confirm, override, or course-correct before writing code.
48
48
 
@@ -56,15 +56,15 @@ If the harness has native image generation (Codex), a compact shape's "confirm o
56
56
 
57
57
  Based on the design brief's "Recommended References" section, consult the relevant impeccable reference files. At minimum, always consult:
58
58
 
59
- - [spatial-design.md](spatial-design.md) for layout and spacing
60
- - [typography.md](typography.md) for type hierarchy
59
+ - [layout.md](layout.md) for layout, spacing, grid, container queries, optical adjustments
60
+ - [typeset.md](typeset.md) for type hierarchy, font selection, web font loading, OpenType features (Reference Material section)
61
61
 
62
62
  Then add references based on the brief's needs:
63
63
  - Complex interactions or forms? Consult [interaction-design.md](interaction-design.md)
64
- - Animation or transitions? Consult [motion-design.md](motion-design.md)
65
- - Color-heavy or themed? Consult [color-and-contrast.md](color-and-contrast.md)
66
- - Responsive requirements? Consult [responsive-design.md](responsive-design.md)
67
- - Heavy on copy, labels, or errors? Consult [ux-writing.md](ux-writing.md)
64
+ - Animation or transitions? Consult [animate.md](animate.md) (Reference Material covers motion materials, durations, easing, perceived performance)
65
+ - Color-heavy or themed? Consult [colorize.md](colorize.md) (Reference Material covers OKLCH, palette structure, dark mode, contrast)
66
+ - Responsive requirements? Consult [adapt.md](adapt.md) (Reference Material covers breakpoints, input methods, safe areas, responsive images)
67
+ - Heavy on copy, labels, or errors? Consult [clarify.md](clarify.md) (Reference Material covers button labels, error formula, voice/tone, translation)
68
68
 
69
69
  ## Step 3: Visual Direction & Assets (Harness-Gated)
70
70