agemon 0.1.0 → 6.0.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 (144) hide show
  1. package/README.md +732 -28
  2. package/assets/skills/architecture/agemon-architecture/LICENSE +21 -0
  3. package/assets/skills/architecture/agemon-architecture/NOTICE.md +9 -0
  4. package/assets/skills/architecture/agemon-architecture/SKILL.md +275 -0
  5. package/assets/skills/code-quality/agemon-clean-code/LICENSE +21 -0
  6. package/assets/skills/code-quality/agemon-clean-code/NOTICE.md +9 -0
  7. package/assets/skills/code-quality/agemon-clean-code/SKILL.md +78 -0
  8. package/assets/skills/code-quality/agemon-house-rules/SKILL.md +103 -0
  9. package/assets/skills/commit/agemon-commit/SKILL.md +87 -0
  10. package/assets/skills/design/agemon-design/LICENSE +21 -0
  11. package/assets/skills/design/agemon-design/NOTICE.md +9 -0
  12. package/assets/skills/design/agemon-design/SKILL.md +391 -0
  13. package/assets/skills/design/agemon-design/references/accessibility.md +182 -0
  14. package/assets/skills/design/agemon-design/references/agents.md +63 -0
  15. package/assets/skills/design/agemon-design/references/ai-chat.md +158 -0
  16. package/assets/skills/design/agemon-design/references/brief.md +186 -0
  17. package/assets/skills/design/agemon-design/references/color.md +216 -0
  18. package/assets/skills/design/agemon-design/references/components.md +91 -0
  19. package/assets/skills/design/agemon-design/references/copy.md +300 -0
  20. package/assets/skills/design/agemon-design/references/craft-intent.md +160 -0
  21. package/assets/skills/design/agemon-design/references/dashboard.md +131 -0
  22. package/assets/skills/design/agemon-design/references/dataviz.md +197 -0
  23. package/assets/skills/design/agemon-design/references/finish-bar.md +243 -0
  24. package/assets/skills/design/agemon-design/references/forms.md +192 -0
  25. package/assets/skills/design/agemon-design/references/heuristics.md +403 -0
  26. package/assets/skills/design/agemon-design/references/inspiration.md +287 -0
  27. package/assets/skills/design/agemon-design/references/layout.md +236 -0
  28. package/assets/skills/design/agemon-design/references/loops.md +155 -0
  29. package/assets/skills/design/agemon-design/references/metadata.md +98 -0
  30. package/assets/skills/design/agemon-design/references/modern-css.md +448 -0
  31. package/assets/skills/design/agemon-design/references/motion.md +434 -0
  32. package/assets/skills/design/agemon-design/references/personas.md +206 -0
  33. package/assets/skills/design/agemon-design/references/principles-catalog.md +299 -0
  34. package/assets/skills/design/agemon-design/references/recipe-auth.md +88 -0
  35. package/assets/skills/design/agemon-design/references/recipe-dashboard.md +130 -0
  36. package/assets/skills/design/agemon-design/references/recipe-landing.md +122 -0
  37. package/assets/skills/design/agemon-design/references/responsive.md +168 -0
  38. package/assets/skills/design/agemon-design/references/review.md +340 -0
  39. package/assets/skills/design/agemon-design/references/sound.md +150 -0
  40. package/assets/skills/design/agemon-design/references/spec.md +123 -0
  41. package/assets/skills/design/agemon-design/references/stack.md +522 -0
  42. package/assets/skills/design/agemon-design/references/state-design.md +188 -0
  43. package/assets/skills/design/agemon-design/references/themes.md +229 -0
  44. package/assets/skills/design/agemon-design/references/tokens.md +350 -0
  45. package/assets/skills/design/agemon-design/references/typography.md +246 -0
  46. package/assets/skills/design/agemon-design-dashboard/LICENSE +21 -0
  47. package/assets/skills/design/agemon-design-dashboard/NOTICE.md +9 -0
  48. package/assets/skills/design/agemon-design-dashboard/SKILL.md +113 -0
  49. package/assets/skills/design/agemon-design-editorial/LICENSE +21 -0
  50. package/assets/skills/design/agemon-design-editorial/NOTICE.md +9 -0
  51. package/assets/skills/design/agemon-design-editorial/SKILL.md +98 -0
  52. package/assets/skills/design/agemon-design-minimal/LICENSE +21 -0
  53. package/assets/skills/design/agemon-design-minimal/NOTICE.md +9 -0
  54. package/assets/skills/design/agemon-design-minimal/SKILL.md +97 -0
  55. package/assets/skills/geo-seo/geo/LICENSE +21 -0
  56. package/assets/skills/geo-seo/geo/NOTICE.md +18 -0
  57. package/assets/skills/geo-seo/geo/SKILL.md +145 -0
  58. package/assets/skills/geo-seo/geo-audit/LICENSE +21 -0
  59. package/assets/skills/geo-seo/geo-audit/NOTICE.md +17 -0
  60. package/assets/skills/geo-seo/geo-audit/SKILL.md +371 -0
  61. package/assets/skills/geo-seo/geo-audit/references/ai-visibility.md +233 -0
  62. package/assets/skills/geo-seo/geo-audit/references/content.md +329 -0
  63. package/assets/skills/geo-seo/geo-audit/references/platform-analysis.md +294 -0
  64. package/assets/skills/geo-seo/geo-audit/references/schema.md +383 -0
  65. package/assets/skills/geo-seo/geo-audit/references/technical.md +368 -0
  66. package/assets/skills/geo-seo/geo-brand-mentions/LICENSE +21 -0
  67. package/assets/skills/geo-seo/geo-brand-mentions/NOTICE.md +15 -0
  68. package/assets/skills/geo-seo/geo-brand-mentions/SKILL.md +459 -0
  69. package/assets/skills/geo-seo/geo-citability/LICENSE +21 -0
  70. package/assets/skills/geo-seo/geo-citability/NOTICE.md +14 -0
  71. package/assets/skills/geo-seo/geo-citability/SKILL.md +320 -0
  72. package/assets/skills/geo-seo/geo-content/LICENSE +21 -0
  73. package/assets/skills/geo-seo/geo-content/NOTICE.md +14 -0
  74. package/assets/skills/geo-seo/geo-content/SKILL.md +352 -0
  75. package/assets/skills/geo-seo/geo-crawlers/LICENSE +21 -0
  76. package/assets/skills/geo-seo/geo-crawlers/NOTICE.md +15 -0
  77. package/assets/skills/geo-seo/geo-crawlers/SKILL.md +388 -0
  78. package/assets/skills/geo-seo/geo-llmstxt/LICENSE +21 -0
  79. package/assets/skills/geo-seo/geo-llmstxt/NOTICE.md +14 -0
  80. package/assets/skills/geo-seo/geo-llmstxt/SKILL.md +433 -0
  81. package/assets/skills/geo-seo/geo-platform-optimizer/LICENSE +21 -0
  82. package/assets/skills/geo-seo/geo-platform-optimizer/NOTICE.md +14 -0
  83. package/assets/skills/geo-seo/geo-platform-optimizer/SKILL.md +282 -0
  84. package/assets/skills/geo-seo/geo-report/LICENSE +21 -0
  85. package/assets/skills/geo-seo/geo-report/NOTICE.md +14 -0
  86. package/assets/skills/geo-seo/geo-report/SKILL.md +406 -0
  87. package/assets/skills/geo-seo/geo-report-pdf/LICENSE +21 -0
  88. package/assets/skills/geo-seo/geo-report-pdf/NOTICE.md +20 -0
  89. package/assets/skills/geo-seo/geo-report-pdf/SKILL.md +153 -0
  90. package/assets/skills/geo-seo/geo-report-pdf/templates/geo-report-template.html +548 -0
  91. package/assets/skills/geo-seo/geo-schema/LICENSE +21 -0
  92. package/assets/skills/geo-seo/geo-schema/NOTICE.md +16 -0
  93. package/assets/skills/geo-seo/geo-schema/SKILL.md +396 -0
  94. package/assets/skills/geo-seo/geo-technical/LICENSE +21 -0
  95. package/assets/skills/geo-seo/geo-technical/NOTICE.md +15 -0
  96. package/assets/skills/geo-seo/geo-technical/SKILL.md +566 -0
  97. package/assets/skills/performance/agemon-performance/NOTICE.md +1 -0
  98. package/assets/skills/performance/agemon-performance/SKILL.md +76 -0
  99. package/assets/skills/security/agemon-security/LICENSE +21 -0
  100. package/assets/skills/security/agemon-security/NOTICE.md +8 -0
  101. package/assets/skills/security/agemon-security/SKILL.md +356 -0
  102. package/assets/skills/self-review/agemon-review-intake/LICENSE +21 -0
  103. package/assets/skills/self-review/agemon-review-intake/NOTICE.md +9 -0
  104. package/assets/skills/self-review/agemon-review-intake/SKILL.md +205 -0
  105. package/assets/skills/self-review/agemon-review-request/LICENSE +21 -0
  106. package/assets/skills/self-review/agemon-review-request/NOTICE.md +9 -0
  107. package/assets/skills/self-review/agemon-review-request/SKILL.md +104 -0
  108. package/assets/skills/self-review/agemon-review-request/code-reviewer.md +188 -0
  109. package/assets/skills/self-review/agemon-root-cause/LICENSE +21 -0
  110. package/assets/skills/self-review/agemon-root-cause/NOTICE.md +10 -0
  111. package/assets/skills/self-review/agemon-root-cause/SKILL.md +283 -0
  112. package/assets/skills/self-review/agemon-root-cause/condition-based-waiting-example.ts +158 -0
  113. package/assets/skills/self-review/agemon-root-cause/condition-based-waiting.md +115 -0
  114. package/assets/skills/self-review/agemon-root-cause/defense-in-depth.md +122 -0
  115. package/assets/skills/self-review/agemon-root-cause/find-polluter.sh +72 -0
  116. package/assets/skills/self-review/agemon-root-cause/root-cause-tracing.md +169 -0
  117. package/assets/skills/self-review/agemon-root-cause/test-academic.md +14 -0
  118. package/assets/skills/self-review/agemon-root-cause/test-pressure-1.md +58 -0
  119. package/assets/skills/self-review/agemon-root-cause/test-pressure-2.md +68 -0
  120. package/assets/skills/self-review/agemon-root-cause/test-pressure-3.md +69 -0
  121. package/assets/skills/self-review/agemon-verify-before-done/LICENSE +21 -0
  122. package/assets/skills/self-review/agemon-verify-before-done/NOTICE.md +9 -0
  123. package/assets/skills/self-review/agemon-verify-before-done/SKILL.md +120 -0
  124. package/assets/skills/team-lead/agemon-plan-rfc/SKILL.md +317 -0
  125. package/assets/skills/team-lead/prd-generator/SKILL.md +437 -0
  126. package/assets/skills/team-lead/skill-headofit-audit/SKILL.md +72 -0
  127. package/assets/skills/team-lead/skill-incident-rca/SKILL.md +66 -0
  128. package/assets/skills/team-lead/skill-meeting-lifecycle/SKILL.md +63 -0
  129. package/assets/skills/team-lead/skill-obsidian-vault-sync/SKILL.md +69 -0
  130. package/assets/skills/team-lead/skill-prd-decomposer/SKILL.md +71 -0
  131. package/assets/skills/team-lead/skill-sec-check/SKILL.md +70 -0
  132. package/assets/skills/team-lead/skill-task-extractor/SKILL.md +79 -0
  133. package/assets/skills/team-lead/skill-tech-spike/SKILL.md +57 -0
  134. package/assets/skills/team-lead/skill-techlead-reviewer/SKILL.md +81 -0
  135. package/assets/tools/code-review-graph-constraints.txt +1418 -0
  136. package/assets/tools/package-lock.json +111 -0
  137. package/assets/tools/package.json +6 -0
  138. package/dist/chunk-5LATHJYU.js +4026 -0
  139. package/dist/chunk-5LATHJYU.js.map +1 -0
  140. package/dist/fake-subprocess-2BETWZVZ.js +666 -0
  141. package/dist/fake-subprocess-2BETWZVZ.js.map +1 -0
  142. package/dist/index.js +21101 -1956
  143. package/dist/index.js.map +1 -1
  144. package/package.json +30 -17
@@ -0,0 +1,287 @@
1
+ # Patterns Observed in Mature SaaS Interfaces
2
+
3
+ Observational pattern analysis from production-grade SaaS landing pages, abstracted from source. All values extracted from real CSS. Section 6 ("What Mature Interfaces Never Do") is the highest-signal section — read it first.
4
+
5
+ ---
6
+
7
+ ## 1. Cross-Surface Patterns
8
+
9
+ Universal rules observed across the full sample. Treat as proven conventions.
10
+
11
+ | Pattern | Detail |
12
+ |---------|--------|
13
+ | **Product screenshots with real data** | Never mockups, illustrations, or abstract graphics. Show the actual product with realistic numbers and content. |
14
+ | **Specific metrics in social proof** | "Build times went from 7m to 40s" beats "Trusted by thousands." Quantify the transformation. |
15
+ | **Tabs or interactive sections for features** | Feature areas use tabs, toggles, or interactive demos — never identical 3-column card grids. |
16
+ | **Dual CTAs in the hero** | Primary action (solid) + secondary action (outline/ghost). "Start for free" + "Get a demo" pattern. |
17
+ | **One positioning statement** | Hero headline is a single sentence that defines what the product is. No paragraphs. |
18
+ | **Logo strips of real companies** | "Trusted by" followed by 5-8 recognizable, specific company logos. |
19
+ | **Minimal decoration** | Content IS the design. No ornamental gradients, blobs, or abstract shapes competing with the product. |
20
+ | **Changelog/velocity proof** | At least one section proves the product ships fast — changelogs, release notes, version timelines. |
21
+ | **Every section has a distinct layout** | No two adjacent sections share the same visual structure. Variety signals intentional design. |
22
+ | **Centered hero alignment** | Center-aligned heroes dominate mature SaaS. Left-aligned is less common. |
23
+
24
+ ---
25
+
26
+ ## 2. Hero Section Archetypes
27
+
28
+ Six recurring hero patterns. Each is named by structure, not by source.
29
+
30
+ ### Archetype A — Minimal text-only
31
+ One large headline + subhead + 1-2 CTAs. No product visual in the viewport. Relies entirely on copy to communicate value. Works when the product name alone carries recognition or when the headline is provocative enough to pull the scroll.
32
+
33
+ - Headlines: 5-10 words, sentence case
34
+ - Subhead: 1-2 lines max, 18-20px, neutral-500
35
+ - CTAs: dual (solid primary + ghost secondary) or single strong action
36
+ - Below hero: immediate product proof (no filler sections)
37
+
38
+ **When it breaks:** products without brand recognition or a strong category-defining statement — the missing visual leaves new users with nothing to anchor on.
39
+
40
+ ### Archetype B — Asymmetric headline + product screenshot
41
+ Left-aligned headline block, right-aligned product UI or screenshot. Gives a document/editorial feel. Communicates "the product is the proof" without centering the hero on pure copy.
42
+
43
+ - Layout: ~50/50 split or 40/60 text/visual
44
+ - Visual: high-fidelity product screenshot, not illustration
45
+ - Alignment: text left, visual right (rarely reversed)
46
+
47
+ **When it breaks:** products with complex UIs that don't read quickly at a glance — the visual confuses instead of proving.
48
+
49
+ ### Archetype C — Product-first (full-width UI)
50
+ Minimal headline above or beside a massive full-width product screenshot or embedded interactive demo. The product IS the hero. Copy is secondary.
51
+
52
+ - Headline: minimal, often a single phrase or word
53
+ - Visual: takes 60-80% of above-the-fold height
54
+ - Can include real interactive elements, not just static images
55
+
56
+ ### Archetype D — Bento grid hero
57
+ Positioning statement centered above a bento grid of product surfaces. Each card shows a different feature or UI. Communicates product breadth.
58
+
59
+ - Grid: mixed card sizes — one large card + 2-3 smaller
60
+ - Each card shows a distinct product surface
61
+ - Typography: headline centered above the grid
62
+
63
+ ### Archetype E — Editorial figure
64
+ Value propositions presented as numbered editorial figures ("FIG 0.2", "FIG 0.3"). Gives a technical publication feel. Strong for developer-focused products where "serious" positioning outweighs "approachable."
65
+
66
+ - Section labels: uppercase monospace or small-caps
67
+ - Layout: each figure gets a distinct visual treatment
68
+ - No uniform card grid
69
+
70
+ ### Archetype F — Scrolling social proof strip
71
+ Hero text centered, immediately followed by a horizontally scrolling logo strip (continuous loop, not static). Makes "trusted by" feel dynamic and high-volume.
72
+
73
+ - Logos: monochrome or muted, not full-color
74
+ - Motion: CSS scroll animation, pauses on hover
75
+ - Placement: immediately below hero CTA block
76
+
77
+ **When it breaks:** early-stage products without recognizable logos — an empty or weak strip signals the opposite of trust.
78
+
79
+ ---
80
+
81
+ ## 3. Feature Presentation Patterns
82
+
83
+ No mature SaaS product uses identical card grids for features.
84
+
85
+ ### Tab-based feature sections
86
+ - Horizontal tabs or pills at the top of a section
87
+ - Each tab reveals completely different content (screenshot, demo, description)
88
+ - Prevents the monotonous 3-column icon+heading+text grid
89
+
90
+ **When it breaks:** more than 5-6 tabs — cognitive load exceeds the benefit of the interactive reveal.
91
+
92
+ ### Bento grid (varied card sizes)
93
+ - Mixed card dimensions: one large card + 2-3 smaller cards
94
+ - Each card shows a different product surface
95
+ - Unequal sizing creates visual hierarchy within the grid
96
+
97
+ ### Editorial figures
98
+ - Value propositions presented as numbered figures
99
+ - Each figure gets a distinct layout treatment
100
+ - Feels like a technical publication, not a marketing template
101
+
102
+ ### Product-first (screenshots as features)
103
+ - Instead of describing features, embed the actual product
104
+ - Interactive demos, live UI, or high-fidelity screenshots
105
+ - The product IS the feature presentation
106
+
107
+ ### Alternating text + visual rows
108
+ - Text on one side, visual (screenshot/demo) on the other
109
+ - Sides alternate per row to create rhythm
110
+ - Each visual is unique — chart, screenshot, code block
111
+
112
+ ### Key principle
113
+ Every feature section should feel designed individually for that feature. If two feature blocks can be swapped without anyone noticing, the design is too uniform.
114
+
115
+ ---
116
+
117
+ ## 4. Social Proof Patterns
118
+
119
+ | Pattern | Implementation |
120
+ |---------|----------------|
121
+ | **Logo strip** | Horizontal row of 5-8 company logos, monochrome or muted. "Trusted by" or "Used by teams at." |
122
+ | **Specific metrics** | Metric + customer name: "7m to 40s build times" next to company logo. |
123
+ | **Testimonial with identity** | Photo + name + title + company logo. Quote is specific, references the product feature. |
124
+ | **Customer count** | "Join 50,000+ teams" or similar, placed near CTA. |
125
+ | **Changelog as proof** | Release dates and features listed to show shipping velocity. |
126
+
127
+ ### What makes social proof work
128
+ - **Specificity over volume** — one concrete metric beats "trusted by thousands"
129
+ - **Recognizable logos** — users infer quality from the companies they recognize
130
+ - **Real quotes with attribution** — name, role, company, photo. Generic praise without identity is worthless
131
+ - **Proximity to CTAs** — social proof placed directly before or after the call to action
132
+
133
+ ---
134
+
135
+ ## 5. Signature Details by Pattern Type
136
+
137
+ Concrete patterns observed in production. Each stands as a reusable technique.
138
+
139
+ ### Card and surface treatment
140
+ - **Grid-line border aesthetic**: horizontal and vertical borders (`border-x`, `border-y` in Tailwind) with a custom grid-border color — creates a technical grid feel without background fills
141
+ - **Inset shadow for sunken surfaces**: `box-shadow: 0 2px 6px 0 rgba(0,0,0,0.2) inset` — signals an embedded or input-like container
142
+ - **Hairline card borders**: 1px `neutral-200` with a bottom-only `rgba(0,0,0,0.04)` shadow — separation without visual weight, common in card-heavy dashboard layouts
143
+ - **Bento card sizing ratio**: ~2:1 dominant card to minor cards; never all cards equal size
144
+
145
+ ### Typography signatures
146
+ - **Display italics**: italicized hero headline as a typographic accent — distinctive without added color
147
+ - **Negative letter-spacing on all headings** (see Section 7 for exact values)
148
+ - **Font weight distribution skewed to medium**: `font-weight: 500` as the dominant weight across UI, `600` for emphasis only, `700` reserved for hero scale
149
+ - **Editorial section labels**: uppercase, tracked-out, small — "FIG 0.2" or "01 / OVERVIEW" style
150
+
151
+ ### Color signatures
152
+ - **One accent, used sparingly**: accent color appears in CTAs and key interactive elements only — not in decorative elements
153
+ - **Nearly colorless base UI**: neutral-first palette; color reserved for status and brand accent
154
+ - **Dark mode via alpha overlays**: `color: rgba(255,255,255,0.9)`, `background: rgba(255,255,255,0.1)` on hover — avoids hardcoded dark-mode color values
155
+ - **Tinted neutral grays**: never pure `#000` or `#fff` as text; always cool-toned (see Section 7)
156
+
157
+ ### Microinteraction signatures
158
+ - **Ring-halo hover**: `box-shadow: 0 0 0 4px var(--neutral-200)` instead of background color change — reads as "glowing" selection
159
+ - **Slide-up-fade entrance**: translate Y offset + opacity fade, 50ms staggered per item, 500ms duration
160
+ - **Hover lift**: `translateY(-2px)` + shadow growth at `150-200ms ease-out`
161
+ - **No `transition: all`**: always target specific properties — `transition: box-shadow, transform, opacity`
162
+
163
+ ### Spacing signatures
164
+ - **Section rhythm**: 80-120px between sections
165
+ - **Card internal padding**: 24-40px
166
+ - **Card gaps**: 24-32px
167
+ - **Nav height**: 64px
168
+ - **Max content width**: 1080-1200px
169
+
170
+ ---
171
+
172
+ ## 6. What Mature Interfaces Never Do
173
+
174
+ Confirmed absent across the full observed sample:
175
+
176
+ | Anti-Pattern | Why It Fails |
177
+ |-------------|-------------|
178
+ | **Emoji icons in feature lists** | Looks unfinished. Production UIs use custom SVG icons or product screenshots. |
179
+ | **Colored gradient text** | None use rainbow or multi-color gradient text. Even dark-themed interfaces avoid it. |
180
+ | **Star ratings in testimonials** | Zero instances. All use quote + name + role + company. |
181
+ | **Identical 3-column feature cards** | No section repeats the same card layout for features. Each section is bespoke. |
182
+ | **Placeholder or generic text** | Every piece of text is specific to the product. No "lorem ipsum" energy. |
183
+ | **Bouncy/elastic animations** | Motion is subtle and functional. No bounce, no wiggle, no playful easing. |
184
+ | **Colored pill badges for metrics** | Metrics are displayed as plain text with clear hierarchy, not decorated badges. |
185
+ | **ALL CAPS headings** | Sentence case or title case throughout. No uppercase headings. |
186
+ | **Glassmorphism** | Not a single frosted-glass panel. Even dark-themed interfaces avoid it. |
187
+ | **Abstract blob/orb decorations** | Intentional branded gradients exist. Generic decorative blobs do not. |
188
+ | **Multiple competing accent colors** | One accent color, used consistently and sparingly. |
189
+ | **"Powered by" or tool attribution** | No marketing page advertises its own stack in the footer. |
190
+ | **Generic CTAs** | No "Learn more" or "Click here." Every CTA is specific: "Start for free", "Download", "Start Deploying". |
191
+ | **Walls of text** | No section has more than 2-3 sentences. Copy is ruthlessly concise. |
192
+ | **Pure black text** | None use `#000000`. Darkest text is cool gray — `#414552` or `#18181b` (zinc-900). |
193
+
194
+ ---
195
+
196
+ ## 7. Reference Token Values
197
+
198
+ Values extracted from production CSS. Use as calibration for "what premium feels like in code." Where two observed systems differ significantly, both are shown with labels.
199
+
200
+ ### Type scale ranges observed
201
+
202
+ ```
203
+ Hero (76-94px): weight 700, line-height 1.05, letter-spacing -0.04em
204
+ Section (48-56px): weight 700, line-height 1.1, letter-spacing -0.03em
205
+ Card (24-32px): weight 600, line-height 1.2, letter-spacing -0.02em
206
+ Body (16-17px): weight 400, line-height 1.5, letter-spacing normal
207
+ ```
208
+
209
+ **Pattern A (medium-dominant)**: `font-weight: 500` as primary UI weight (120+ instances), `600` for emphasis only, `700` avoided entirely.
210
+ **Pattern B (bold-dominant)**: `700` reserved for hero and section headings only; `400` for all body copy.
211
+
212
+ ### Spacing scales observed
213
+
214
+ ```
215
+ Section gaps: 80-120px
216
+ Card gaps: 24-32px
217
+ Card padding: 24-40px
218
+ Nav height: 64px
219
+ Max content width: 1080-1200px
220
+ Base unit: 4px
221
+ ```
222
+
223
+ ### Shadow stack examples
224
+
225
+ **Blue-gray tinted shadows** (never pure black):
226
+ ```css
227
+ /* Resting */ box-shadow: rgb(64 68 82 / 8%) 0px 2px 5px 0px;
228
+ /* Hover */ box-shadow: rgb(64 68 82 / 8%) 0px 2px 5px 0px, rgb(64 68 82 / 8%) 0px 3px 9px 0px;
229
+ /* Focus */ box-shadow: 0 0 0 4px rgb(1 150 237 / 36%);
230
+ ```
231
+
232
+ **Ring-halo hover** (neutral, no blue tint):
233
+ ```css
234
+ box-shadow: 0 0 0 4px var(--neutral-200, #e5e5e5);
235
+ /* Tailwind: hover:ring-4 hover:ring-neutral-200 */
236
+ ```
237
+
238
+ **Inset sunken surface**:
239
+ ```css
240
+ box-shadow: 0 2px 6px 0 rgba(0,0,0,0.2) inset;
241
+ ```
242
+
243
+ ### Border-radius observed
244
+
245
+ **Pattern A** (restrained):
246
+ ```
247
+ Inputs: 4px | Buttons: 8px | Cards: 8-10px | Pills/badges: 999em
248
+ ```
249
+
250
+ **Pattern B** (more generous):
251
+ ```
252
+ Buttons: 8px (rounded-lg) | Cards: 12-16px (rounded-xl / rounded-2xl) | Badges: 9999px (rounded-full)
253
+ ```
254
+
255
+ The difference teaches: card radius scales up proportionally with card size. Small cards (dashboard widgets) at 8px, large cards (feature showcase) at 12-16px.
256
+
257
+ ### Color tinted-neutral examples
258
+
259
+ ```
260
+ Text primary: #414552 (cool gray-700, NOT #000)
261
+ Text secondary: #687385 (cool gray-500)
262
+ Borders: #d5dbe1 (cool gray-150)
263
+ Surface: #f6f8fa (cool gray-50)
264
+ Brand accent: #625afa (purple-500 — one example; substitute project accent)
265
+ ```
266
+
267
+ **Dark mode via alpha** (avoids hardcoded dark-mode palette):
268
+ ```css
269
+ color: rgba(255,255,255,0.9); /* Tailwind: text-white/90 */
270
+ background: rgba(255,255,255,0.1); /* Tailwind: hover:bg-white/10 */
271
+ ```
272
+
273
+ ### Motion timing observed
274
+
275
+ ```
276
+ Hover transitions: 150-200ms ease-out
277
+ Entrance animations: 500ms duration, 50ms staggered delay per item
278
+ Transform: translateY(-2px) on hover lift
279
+ Property targeting: box-shadow, transform, opacity — never transition: all
280
+ ```
281
+
282
+ **Font pairing pattern** (display + system + mono):
283
+ ```
284
+ Display headings: Satoshi or equivalent geometric sans
285
+ Body: Inter or equivalent neutral sans
286
+ Code/technical: Geist Mono or equivalent monospace
287
+ ```
@@ -0,0 +1,236 @@
1
+ # Layout & Composition
2
+
3
+ Spatial reasoning, grouping principles, and hierarchy discipline. Tools (Flex, Grid) come last.
4
+
5
+ ---
6
+
7
+ ## Gestalt Grouping Principles
8
+
9
+ Perception organizes visual fields before conscious thought. Five laws govern how elements are read as groups:
10
+
11
+ **Proximity** — Elements closer together are perceived as related. Spacing is the primary grouping signal. Use it before borders, cards, or background fills.
12
+
13
+ **Similarity** — Elements that share shape, color, or size are perceived as the same kind of thing. Color-coding a column in a table exploits this; inconsistent icon weights break it.
14
+
15
+ **Common Region** — Elements inside a shared boundary (card, background, border) form a group. Use sparingly — every card is a visual tax. Ask: does this content need isolation, or does proximity alone suffice?
16
+
17
+ **Continuity** — The eye follows a line or curve through a layout. Aligning elements along an axis creates an implied path that guides the scan.
18
+
19
+ **Closure** — The eye completes incomplete shapes. Use this to reduce clutter: a partially-visible element (card cropped at viewport edge) signals "more exists" without a label.
20
+
21
+ ### The primary rule: use spacing before structure
22
+
23
+ Before reaching for a card, background swatch, or divider line, try creating the group with spacing alone. If it reads, stop there. Structure adds visual weight and complexity — earn it.
24
+
25
+ ---
26
+
27
+ ## Spacing Rhythm
28
+
29
+ The most violated rule in UI. State it as an invariant:
30
+
31
+ > **Space within a group < space between groups < space between sections.**
32
+
33
+ Concrete: a form label 4px above its input, inputs in the same form 16px apart, the form itself 48px from the next section. If any of these relationships inverts, the grouping breaks.
34
+
35
+ ### Scale
36
+
37
+ Use tokens from a defined set. Values come from the scale — never arbitrary.
38
+
39
+ ```css
40
+ --space-xs: 0.25rem; /* 4px — label-to-input, icon-to-label */
41
+ --space-sm: 0.5rem; /* 8px — items within a group */
42
+ --space-md: 1rem; /* 16px — related components */
43
+ --space-lg: 1.5rem; /* 24px — sibling sections */
44
+ --space-xl: 2rem; /* 32px — component-to-component */
45
+ --space-2xl: 3rem; /* 48px — section separations */
46
+ --space-3xl: 4rem; /* 64px — major page regions */
47
+ --space-4xl: 6rem; /* 96px — hero-to-content, above-fold breathing room */
48
+ ```
49
+
50
+ Use `gap` for sibling spacing — eliminates margin collapse and is the correct mental model.
51
+
52
+ Use `clamp()` for fluid spacing: `clamp(var(--space-lg), 4vw, var(--space-3xl))` scales without breakpoints.
53
+
54
+ **WHEN IT BREAKS:** Very dense data tables and compact UI patterns (command palettes, menus) compress this rhythm deliberately. At 100% zoom the hierarchy still holds — the scale values shrink proportionally. Never collapse two adjacent levels to the same value.
55
+
56
+ ---
57
+
58
+ ## Visual Hierarchy
59
+
60
+ ### The Squint Test
61
+
62
+ Stand back, defocus your eyes, or apply a blur filter to the design. The image resolves to blobs of light and dark, size and contrast — text becomes unreadable. What you see is the page at the perceptual level of a first glance (~200ms).
63
+
64
+ At that level:
65
+
66
+ 1. One thing should dominate — the primary action or headline.
67
+ 2. A secondary cluster should appear next — supporting information.
68
+ 3. The page structure (navigation, footer, sidebar) should be lowest in perceived weight.
69
+
70
+ Why it works: the human visual system applies a low-pass spatial frequency filter before conscious reading. The squint test simulates that filter. If hierarchy fails the squint test, users experience visual noise even if they cannot articulate why.
71
+
72
+ ### Measurable Ratios
73
+
74
+ Four levels is the practical maximum for most UI. Beyond that, distinctions collapse.
75
+
76
+ | Level | Role | Signal |
77
+ |-------|------|--------|
78
+ | Primary | Page-defining element (hero headline, main CTA) | Largest, highest contrast, most visual weight |
79
+ | Secondary | Supporting structure (subheadings, section labels) | Minimum 1.5x smaller or lighter than primary |
80
+ | Tertiary | Body content, field labels, card titles | Readable, not competing |
81
+ | Quaternary | Metadata, timestamps, captions | Muted, clearly subordinate |
82
+
83
+ **Minimum 1.5x difference between adjacent levels** to create a clear distinction. A 1.2x difference reads as an accident, not a decision.
84
+
85
+ **WHEN IT BREAKS:** Typography pairs can carry hierarchy at identical size using weight + tracking — a 400/700 weight pair at 14px is a clear two-level system. In that case the size ratio rule yields to the type system. See `typography.md`.
86
+
87
+ ### Hierarchy Tools (use in this order)
88
+
89
+ 1. **Space** — generous whitespace isolates the primary element before you touch anything else
90
+ 2. **Size** — scale differences above 1.5x register immediately
91
+ 3. **Weight** — font-weight, border-weight, shadow depth
92
+ 4. **Color** — last resort; adds semantic load and accessibility risk
93
+
94
+ Using all four at once creates noise. Mature interfaces use one or two.
95
+
96
+ ---
97
+
98
+ ### Serial Position Effect
99
+
100
+ First and last items in a sequence are remembered best (primacy + recency). Put the critical item first or last in nav lists, onboarding steps, and feature rows — never buried mid-sequence. Mid-list is where options go to be forgotten.
101
+
102
+ ## Composition Strategies
103
+
104
+ ### Symmetry vs. Asymmetry
105
+
106
+ Symmetry signals stability, formality, and confidence. Use it for hero sections, authentication flows, landing page headers.
107
+
108
+ Asymmetry signals energy, modernity, and movement. Use it for editorial layouts, feature showcases, dashboards with a dominant primary panel.
109
+
110
+ Avoid the default of centered-everything — it reads as unsophisticated because it makes no compositional decision. Left-aligned layouts with deliberate asymmetric weight distribution feel more considered.
111
+
112
+ ### Focal Point
113
+
114
+ Every layout needs exactly one focal point — the element the eye arrives at first. If you have two competing elements at the same visual weight, one of them is wrong. Remove hierarchy from one or subordinate it spatially.
115
+
116
+ ### Optical Center vs. Geometric Center
117
+
118
+ The geometric center of a rectangle is at 50% vertical. The optical center is 5–8% above that. Content positioned at the optical center feels balanced; content at true geometric center reads as slightly low.
119
+
120
+ This matters most for:
121
+ - Modal dialogs — vertically centered modals in a viewport look sunken; use `align-items: center` with a slight upward offset or top-biased margins
122
+ - Icon placement within a bounding box — a 24×24 icon with a visually tall glyph needs a −1px vertical nudge
123
+ - Above-the-fold hero sections — weight the primary element in the upper optical zone
124
+
125
+ ### Rule of Thirds (use only with hero imagery)
126
+
127
+ The rule of thirds creates dynamic tension by placing subjects at grid intersections rather than center. In interfaces without strong photographic content it adds complexity without benefit. Reserve it for editorial layouts and landing pages with full-bleed images.
128
+
129
+ ---
130
+
131
+ ## Alignment Discipline
132
+
133
+ - **Max 1-2 alignment types per section.** Every additional alignment axis is another anchor the eye must re-find; mixed left/center/right in one view reads as unplanned.
134
+ - **Mixed text sizes on one line align to the shared baseline**, not to vertical centers — center-aligning a 24px number next to a 13px label makes the label float.
135
+ - **Truncate the middle, not the end**, when items share long prefixes ("Quarterly report — … — Q3 2026"): the differentiating ends are what users scan for.
136
+
137
+ ---
138
+
139
+ ## Choosing Layout Tools
140
+
141
+ **Flexbox — 1D.** Rows of items, nav bars, button groups, component internals. Default choice for the majority of components.
142
+
143
+ **Grid — 2D.** Page structure, dashboards, anything requiring row AND column coordination. Reach for it when flex with `flex-wrap` forces workarounds.
144
+
145
+ ```css
146
+ /* Responsive without breakpoints — flex */
147
+ .group { display: flex; flex-wrap: wrap; gap: var(--space-md); }
148
+
149
+ /* Responsive without breakpoints — grid */
150
+ .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
151
+ ```
152
+
153
+ Don't default to Grid when Flex would be simpler. Don't reach for JS measurement when CSS layout solves it.
154
+
155
+ ---
156
+
157
+ ## Breaking Monotony
158
+
159
+ - Don't default to card grids for everything — spacing creates grouping naturally
160
+ - Cards only when content is truly distinct and actionable — never nest cards inside cards
161
+ - Vary card sizes, span columns, or mix cards with non-card content
162
+ - Asymmetric compositions break the centered-content default when the content supports it
163
+ - Never template the "big metric + small label + stat row + gradient" pattern — it's a design cliché
164
+
165
+ ---
166
+
167
+ ## Depth & Elevation
168
+
169
+ ### Z-Index Scale (Semantic)
170
+ ```css
171
+ --z-dropdown: 10;
172
+ --z-sticky: 20;
173
+ --z-modal-backdrop: 30;
174
+ --z-modal: 40;
175
+ --z-toast: 50;
176
+ --z-tooltip: 60;
177
+ ```
178
+
179
+ Never use arbitrary values (999, 9999). Use elevation to reinforce hierarchy, not as decoration.
180
+
181
+ ### Shadow Scale
182
+ ```css
183
+ --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
184
+ --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
185
+ --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
186
+ --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 8px 10px rgba(0,0,0,0.04);
187
+ ```
188
+
189
+ Always layered (ambient + direct light). Higher elevation = larger spread + lower opacity, not just a bigger number.
190
+
191
+ **Dark mode breaks layered shadows.** A dark shadow cast on a dark surface has nowhere to show up — the layered ambient+direct recipe above effectively disappears. Don't stack darker shadows to compensate; collapse elevation to a single subtle light ring instead — a 1px, low-alpha white inset or outset border (`0 0 0 1px rgba(255,255,255,0.08)`-ish) reads as "raised" against a dark surface the way a shadow does against a light one.
192
+
193
+ ---
194
+
195
+ ## Optical Adjustments
196
+
197
+ - **±1px nudges** when geometric centering looks visually off-center — common with icons inside buttons, badges, avatars
198
+ - **Nested radii:** child ≤ parent. Use `calc(var(--radius-parent) - var(--padding))` to keep concentric curves
199
+ - **Icon/text lockups:** adjust weight, size, spacing, or color — one lever at a time until they feel unified
200
+
201
+ ### Concentric Radius Arithmetic
202
+
203
+ The relationship that keeps nested corners visually parallel: **outer radius = inner radius + the gap between the two edges.** Worked example on the token scale — an inner surface using `--radius-xl` (14px) sitting inside 6px of padding needs an outer radius of `14 + 6 = 20px`, which lands exactly on `--radius-2xl`. Skip the arithmetic and the outer curve either pinches tighter than the inner one (looks accidental) or bows out looser (looks sloppy) — concentric only reads as intentional when the two curves share a center point.
204
+
205
+ **Exception:** past roughly 24px of padding, the two surfaces read far enough apart that concentric math stops mattering — at that distance, treat inner and outer as separate surfaces with independently chosen radii rather than chasing an arithmetic relationship the eye can no longer perceive.
206
+
207
+ ### Optical Alignment Recipes
208
+
209
+ - **Icon-leading buttons need asymmetric padding** — trim roughly 2px off the icon side of the button's padding. An icon's own whitespace (the space inside its bounding box between the glyph and its edge) reads as extra padding the eye already counts, so equal padding on both sides looks lopsided toward the icon.
210
+ - **Triangular and asymmetric glyphs need a nudge toward their visual mass.** Play icons, carets, and similar shapes have most of their ink weight off-center within their bounding box — a 1-2px nudge in the direction the shape "leans" corrects the optical imbalance a perfectly centered bounding box leaves behind.
211
+ - **When an SVG is persistently off-balance across every context it's used in**, fix the path's `viewBox` centering at the source rather than compensating with margin on every instance. Per-instance margin hacks drift out of sync the next time the icon is resized or reused elsewhere; a corrected `viewBox` fixes it everywhere at once.
212
+
213
+ ---
214
+
215
+ ## Style-to-CSS Reference
216
+
217
+ | Property | Minimal Clean | Soft Modern | Sharp Geometric | Rich Editorial | Dark Premium | Playful Bold |
218
+ |----------|---------------|-------------|-----------------|----------------|--------------|--------------|
219
+ | `border-radius` | 2-4px | 8-16px | 0px | 2-4px | 4-8px | 12-20px |
220
+ | Shadows | None or barely-there | Layered (ambient + direct) | None — use borders | Subtle, warm | Subtle glow, inset | Bold, offset |
221
+ | Borders | `rgba(0,0,0,0.06)` 1px | Soft, same hue as shadow | 1px crisp, high-contrast | Thin, warm-tinted | `rgba(255,255,255,0.08)` | Thick, colored |
222
+ | Spacing | Generous whitespace | Comfortable, padded | Tight, precise | Generous, editorial | Moderate | Loose, breathing |
223
+ | Weight range | 400-600 | 400-600 | 400-800 | 300-700 | 400-700 | 500-800 |
224
+
225
+ ---
226
+
227
+ ## Never
228
+
229
+ - Arbitrary spacing outside your defined scale
230
+ - All spacing equal across a section — variety creates hierarchy
231
+ - Wrap everything in cards — not everything needs a container
232
+ - Nest cards inside cards
233
+ - Center everything — left-aligned asymmetry reads as more intentional
234
+ - Default to Grid when Flex would be simpler
235
+ - Arbitrary z-index values (999, 9999)
236
+ - Two adjacent hierarchy levels at the same visual weight — decide which leads