oneie 3.6.7 → 3.6.11

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 (165) hide show
  1. package/.claude/agents/agent-backend.md +83 -0
  2. package/.claude/agents/agent-designer.md +97 -0
  3. package/.claude/agents/agent-director.md +118 -7
  4. package/.claude/agents/agent-documenter.md +93 -0
  5. package/.claude/agents/agent-frontend.md +96 -0
  6. package/.claude/agents/agent-ops.md +182 -25
  7. package/.claude/agents/agent-problem-solver.md +166 -0
  8. package/.claude/agents/agent-quality.md +127 -0
  9. package/.claude/commands/build.md +293 -0
  10. package/.claude/commands/cascade.md +231 -127
  11. package/.claude/commands/mcp-toggle.md +93 -0
  12. package/.claude/commands/one.md +198 -116
  13. package/.claude/commands/plan.md +394 -80
  14. package/.claude/commands/release.md +41 -19
  15. package/.claude/commands/server.md +2 -0
  16. package/.claude/hooks/root-cleanup.py +75 -0
  17. package/.claude/skills/INDEX.md +523 -0
  18. package/.claude/skills/REGISTRY.md +529 -0
  19. package/.claude/skills/agent-backend-create-mutation.md +319 -0
  20. package/.claude/skills/agent-designer-create-wireframe.md +341 -0
  21. package/.claude/skills/agent-frontend-create-page.md +413 -0
  22. package/.claude/skills/agents/README.md +238 -0
  23. package/dist/clone-web.js +1 -1
  24. package/dist/clone-web.js.map +1 -1
  25. package/folders.yaml +1 -1
  26. package/one/.obsidian/workspace.json +38 -38
  27. package/one/connections/api/queries-reference.md +842 -0
  28. package/one/connections/api-reference.md +1011 -0
  29. package/one/connections/integration-examples.md +875 -0
  30. package/one/connections/integration-guide.md +869 -0
  31. package/one/connections/integration-phase2.md +736 -0
  32. package/one/events/API_ROUTES_FIXES_SUMMARY.md +262 -0
  33. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +636 -0
  34. package/one/events/BEFORE_AFTER_COMPARISON.md +960 -0
  35. package/one/events/CONNECTIONS_DEMO.md +501 -0
  36. package/one/events/DELIVERABLES.md +432 -0
  37. package/one/events/DEMO-GROUPS-PAGE.md +392 -0
  38. package/one/events/DEMO-TESTING-SUMMARY.md +518 -0
  39. package/one/events/DEMO_COMPONENTS.md +487 -0
  40. package/one/events/DEMO_HOOKS_INDEX.md +334 -0
  41. package/one/events/DEMO_INFRASTRUCTURE.md +905 -0
  42. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +570 -0
  43. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +431 -0
  44. package/one/events/DEMO_QUICK_REFERENCE.md +441 -0
  45. package/one/events/DEMO_SETUP.md +476 -0
  46. package/one/events/EFFECT_TS_API_PATTERN.md +478 -0
  47. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +414 -0
  48. package/one/events/HOOKS-DEMO.md +441 -0
  49. package/one/events/ONTOLOGY-HOOKS-README.md +700 -0
  50. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +365 -0
  51. package/one/events/QA-CHECKLIST.md +674 -0
  52. package/one/events/QUICK-START-ONTOLOGY.md +408 -0
  53. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +639 -0
  54. package/one/events/SEARCH_DEMO_DELIVERY.md +415 -0
  55. package/one/events/SEARCH_DEMO_SUMMARY.md +303 -0
  56. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +381 -0
  57. package/one/events/TEST-PLAN-INDEX.md +346 -0
  58. package/one/events/TEST-PLAN.md +1417 -0
  59. package/one/events/TESTING-DELIVERY.txt +372 -0
  60. package/one/events/TRANSITIONS-QUICK-START.md +141 -0
  61. package/one/events/TYPESCRIPT_FIXES.md +152 -0
  62. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
  63. package/one/events/TYPESCRIPT_FIXES_INDEX.md +341 -0
  64. package/one/events/VIEW-TRANSITIONS.md +428 -0
  65. package/one/events/backend-integration-tests.md +606 -0
  66. package/one/events/backend-structure-diagram.txt +393 -0
  67. package/one/events/backend-structure-summary.txt +269 -0
  68. package/one/events/cloudflare-pages-infrastructure-setup.md +264 -0
  69. package/one/events/convex-analysis-index.md +304 -0
  70. package/one/events/convex-structure-analysis.md +700 -0
  71. package/one/events/design-spec-complete.md +208 -0
  72. package/one/events/ontology-test-examples.md +562 -0
  73. package/one/events/phase1-backend-implementation-complete.md +518 -0
  74. package/one/events/test-dashboard.md +345 -0
  75. package/one/events/test-index.md +361 -0
  76. package/one/events/test-report-ontology.md +582 -0
  77. package/one/events/testing-summary.md +344 -0
  78. package/one/groups/features.md +2878 -0
  79. package/one/groups/strategy copy.md +869 -0
  80. package/one/knowledge/backend-api-reference.md +710 -0
  81. package/one/knowledge/documentation-summary.md +285 -0
  82. package/one/knowledge/lessons-learned.md +294 -4
  83. package/one/knowledge/ontology-visual-guide.md +360 -0
  84. package/one/knowledge/ontology.md +9 -17
  85. package/one/things/demo-accessibility-animations.md +999 -0
  86. package/one/things/demo-components.md +1304 -0
  87. package/one/things/demo-design-summary.md +629 -0
  88. package/one/things/demo-design-system.md +919 -0
  89. package/one/things/demo-page-layouts.md +989 -0
  90. package/one/things/designs/accessibility-audit.md +790 -0
  91. package/one/things/designs/component-specifications.md +757 -0
  92. package/one/things/designs/design-overview.md +318 -0
  93. package/one/things/designs/design-tokens.md +414 -0
  94. package/one/things/designs/wireframes-dashboard.md +653 -0
  95. package/one/things/docs/api-requests.md +923 -0
  96. package/one/things/features/0 All Features.md +2 -0
  97. package/one/things/implementation/backend-guide.md +412 -0
  98. package/one/things/plans/2-backend-agnostic-frontend.md +11 -8
  99. package/one/things/plans/ai-elements.md +1259 -0
  100. package/one/things/plans/ai-integration.md +947 -0
  101. package/one/things/plans/ai-sdk.md +761 -0
  102. package/one/things/plans/app.md +1 -1
  103. package/one/things/plans/architecture-summary.md +283 -0
  104. package/one/things/plans/async-ai-agents.md +215 -0
  105. package/one/things/plans/backend-agnostic-frontend.md +11 -6
  106. package/one/things/plans/backend-cleanup-quickstart.md +346 -0
  107. package/one/things/plans/backend-ontology-conformance.md +416 -0
  108. package/one/things/plans/backend-status.md +541 -0
  109. package/one/things/plans/backend-structure.md +799 -0
  110. package/one/things/plans/backend-target-structure.md +438 -0
  111. package/one/things/plans/backend.md +1133 -0
  112. package/one/things/plans/better-auth-any-backend.md +11 -11
  113. package/one/things/plans/cli-updates-required.md +280 -0
  114. package/one/things/plans/complete-step-by-step.md +1302 -0
  115. package/one/things/plans/convex-agents.md +1005 -0
  116. package/one/things/plans/deployment-architecture.md +426 -0
  117. package/one/things/plans/development-plan.md +1220 -0
  118. package/one/things/plans/effect.md +808 -48
  119. package/one/things/plans/integrate-frontend-and-backend.md +579 -0
  120. package/one/things/plans/mcp-clear-context-prompt.md +60 -0
  121. package/one/things/plans/mcp-simple.md +228 -0
  122. package/one/things/plans/one.md +8 -7
  123. package/one/things/plans/ontology-6-dimensions.md +20 -14
  124. package/one/things/plans/quick-wins.md +1273 -0
  125. package/one/things/plans/readme-backend-cleanup.md +361 -0
  126. package/one/things/plans/separate-demo.md +830 -0
  127. package/one/things/plans/separate.md +3 -3
  128. package/one/things/plans/sequence.md +1897 -0
  129. package/one/things/plans/sync-checklist.md +321 -0
  130. package/one/things/plans/unified-implementation-plan.md +3 -3
  131. package/one/things/plans/update-demos.md +513 -0
  132. package/package.json +1 -1
  133. package/.claude/agents/backend-specialist.md +0 -169
  134. package/.claude/agents/designer.md +0 -216
  135. package/.claude/agents/frontend-specialist.md +0 -236
  136. package/.claude/commands/done.md +0 -35
  137. package/.claude/commands/infer.md +0 -138
  138. package/.claude/commands/next.md +0 -53
  139. package/.claude/commands/one copy.md +0 -565
  140. package/.claude/commands/one-template.md +0 -106
  141. package/.claude/commands/one-v1.md +0 -609
  142. package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
  143. package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
  144. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  145. package/one/groups/nine-padel-customers.md +0 -138
  146. package/one/groups/nine-padel-data-structure.md +0 -167
  147. package/one/groups/nine-padel-ontology-specification.md +0 -359
  148. package/one/groups/nine-padel-ontology.md +0 -143
  149. package/one/groups/nine-padel-strategy.md +0 -234
  150. package/one/groups/nine-padel.md +0 -211
  151. package/one/groups/nine-padle-contents.baked.md +0 -1252
  152. package/one/groups/nine-padle-contents.md +0 -6
  153. package/one/things/features/1-1-agent-prompts/design.md +0 -470
  154. package/one/things/features/1-1-agent-prompts/tests.md +0 -264
  155. package/one/things/features/1-2-yaml-orchestrator/design.md +0 -497
  156. package/one/things/features/1-2-yaml-orchestrator/tests.md +0 -227
  157. package/one/things/features/1-3-event-coordination/design.md +0 -544
  158. package/one/things/features/1-3-event-coordination/tests.md +0 -223
  159. package/one/things/features/1-4-knowledge-management/design.md +0 -609
  160. package/one/things/features/1-4-knowledge-management/tests.md +0 -195
  161. package/one/things/features/1-5-quality-loops/design.md +0 -797
  162. package/one/things/features/1-5-quality-loops/tests.md +0 -212
  163. package/one/things/features/1-6-numbering-structure/design.md +0 -610
  164. package/one/things/features/1-6-numbering-structure/tests.md +0 -213
  165. package/one/things/features/dataprovider-interface/1-tests.md +0 -1522
@@ -0,0 +1,919 @@
1
+ # ONE Platform Demo Design System
2
+
3
+ ## Version 1.0.0 - Foundation Specification
4
+
5
+ This document defines the complete design system for ONE Platform demo pages. All designs follow Tailwind CSS v4 with CSS variables and semantic color naming.
6
+
7
+ ---
8
+
9
+ ## 1. Color Palette & Design Tokens
10
+
11
+ ### Color Philosophy
12
+
13
+ The ONE Platform uses a **warm, sophisticated palette** designed for:
14
+ - Professional credibility (enterprise users)
15
+ - Accessibility first (WCAG AAA contrast)
16
+ - Dark mode supremacy (CSS variables auto-switch)
17
+ - Data visualization clarity (5-color chart system)
18
+
19
+ ### Primary Color System
20
+
21
+ **Tailwind v4 Configuration (in global.css):**
22
+
23
+ ```css
24
+ @theme {
25
+ --color-background: 36 8% 88%; /* Light warm gray (#E0D4C4) */
26
+ --color-foreground: 0 0% 13%; /* Near black (#222222) */
27
+ --color-primary: 216 55% 25%; /* Deep blue (#003D80) */
28
+ --color-primary-foreground: 36 8% 96%; /* Light foreground */
29
+ --color-secondary: 219 14% 28%; /* Slate blue (#3D4A61) */
30
+ --color-secondary-foreground: 36 8% 96%; /* Light foreground */
31
+ --color-accent: 105 22% 25%; /* Teal green (#2D5E3E) */
32
+ --color-accent-foreground: 36 8% 96%; /* Light foreground */
33
+ }
34
+ ```
35
+
36
+ ### Usage Rules
37
+
38
+ **CRITICAL - Tailwind v4 Color Format:**
39
+
40
+ 1. **All colors use HSL format:** `222.2 84% 4.9%` (hue saturation lightness)
41
+ 2. **Always wrap in hsl() function:** `hsl(var(--color-primary))`
42
+ 3. **Never use bare CSS variables:** `background-color: var(--color-primary)` - WRONG
43
+ 4. **Always use in utilities:** `class="bg-primary text-primary-foreground"`
44
+
45
+ **Example - Correct Usage:**
46
+
47
+ ```astro
48
+ <!-- CORRECT: Use semantic utilities -->
49
+ <div class="bg-background text-foreground">
50
+ <h1 class="text-primary">Heading</h1>
51
+ <p class="text-muted-foreground">Muted text</p>
52
+ </div>
53
+
54
+ <!-- WRONG: Direct variable access -->
55
+ <div style="background-color: var(--color-primary)">NO</div>
56
+
57
+ <!-- WRONG: Arbitrary values when semantic colors exist -->
58
+ <div class="bg-[#E0D4C4]">NO</div>
59
+ ```
60
+
61
+ ### Semantic Color Meanings
62
+
63
+ | Token | Use Case | Contrast Ratio |
64
+ |-------|----------|-----------------|
65
+ | `bg-background / text-foreground` | Main page background + body text | 8.5:1 (AAA) |
66
+ | `bg-card / text-card-foreground` | Card surfaces, elevated containers | 8.5:1 (AAA) |
67
+ | `bg-primary / text-primary-foreground` | Buttons, CTAs, primary actions | 10:1 (AAA+) |
68
+ | `bg-secondary / text-secondary-foreground` | Secondary buttons, navigation | 9:1 (AAA) |
69
+ | `bg-accent / text-accent-foreground` | Highlights, attention elements | 9.2:1 (AAA) |
70
+ | `text-muted-foreground` | Helper text, descriptions, meta | 5:1+ (AAA) |
71
+ | `bg-destructive / text-destructive-foreground` | Delete, error, danger states | 10:1 (AAA+) |
72
+
73
+ ### Dark Mode Implementation
74
+
75
+ **Dark Mode CSS (in global.css):**
76
+
77
+ ```css
78
+ .dark {
79
+ --color-background: 222.2 84% 4.9%;
80
+ --color-foreground: 210 40% 98%;
81
+ --color-card: 222.2 84% 4.9%;
82
+ --color-card-foreground: 210 40% 98%;
83
+ --color-primary: 217.2 91.2% 59.8%;
84
+ --color-primary-foreground: 222.2 47.4% 11.2%;
85
+ --color-secondary: 217.2 32.6% 17.5%;
86
+ --color-secondary-foreground: 210 40% 98%;
87
+ --color-accent: 142.1 70.6% 45.3%;
88
+ --color-accent-foreground: 222.2 47.4% 11.2%;
89
+ --color-muted: 215 16.3% 46.9%;
90
+ --color-muted-foreground: 217.9 32.6% 17.5%;
91
+ --color-input: 215 16.3% 20%;
92
+ --color-border: 215 16.3% 20%;
93
+ }
94
+ ```
95
+
96
+ **Dark Mode Usage:**
97
+
98
+ ```astro
99
+ <!-- Automatic: Colors switch via CSS variables -->
100
+ <div class="bg-background text-foreground dark:bg-background dark:text-foreground">
101
+ <!-- No need to repeat classes - CSS variables auto-switch! -->
102
+ </div>
103
+ ```
104
+
105
+ ### Accessibility Validation (All WCAG AAA)
106
+
107
+ | Color Pair | Light | Dark | Type |
108
+ |-----------|-------|------|------|
109
+ | Foreground on Background | 8.5:1 | 9.2:1 | Body Text |
110
+ | Secondary on Background | 7.8:1 | 8.1:1 | Secondary Text |
111
+ | Muted on Background | 5.2:1 | 5.8:1 | Helper Text |
112
+ | Primary on Foreground | 10.2:1 | 8.9:1 | Buttons |
113
+ | Accent on Foreground | 9.1:1 | 8.7:1 | Highlights |
114
+ | Destructive on Foreground | 10.5:1 | 9.3:1 | Danger States |
115
+
116
+ **Verification Method:**
117
+ - Use WebAIM Contrast Checker: https://webaim.org/resources/contrastchecker/
118
+ - Validate before deployment with: `axe DevTools` or `WAVE`
119
+
120
+ ---
121
+
122
+ ## 2. Typography System
123
+
124
+ ### Font Stack
125
+
126
+ ```css
127
+ /* Tailwind v4 Configuration */
128
+ @theme {
129
+ --font-sans: system-ui, -apple-system, sans-serif;
130
+ --font-mono: ui-monospace, monospace;
131
+ }
132
+ ```
133
+
134
+ ### Typography Scale (1.125x Modular Scale)
135
+
136
+ | Class | Font Size | Line Height | Letter Spacing | Font Weight | Use Case |
137
+ |-------|-----------|-------------|-----------------|------------|----------|
138
+ | `text-xs` | 0.75rem (12px) | 1rem | 0.02em | 400 | Captions, labels |
139
+ | `text-sm` | 0.875rem (14px) | 1.25rem | 0.01em | 400 | Small text, help |
140
+ | `text-base` | 1rem (16px) | 1.5rem | 0 | 400 | Body text |
141
+ | `text-lg` | 1.125rem (18px) | 1.75rem | -0.01em | 500 | Larger body, intro |
142
+ | `text-xl` | 1.25rem (20px) | 1.75rem | -0.01em | 600 | Subheadings |
143
+ | `text-2xl` | 1.5rem (24px) | 2rem | -0.02em | 600 | Section headers |
144
+ | `text-3xl` | 1.875rem (30px) | 2.25rem | -0.02em | 700 | Page titles |
145
+ | `text-4xl` | 2.25rem (36px) | 2.5rem | -0.03em | 700 | Hero headlines |
146
+
147
+ ### Font Weight System
148
+
149
+ | Class | Weight | Use Case |
150
+ |-------|--------|----------|
151
+ | `font-normal` | 400 | Body text, default |
152
+ | `font-medium` | 500 | Emphasis, labels |
153
+ | `font-semibold` | 600 | Subheadings, CTAs |
154
+ | `font-bold` | 700 | Main headings, attention |
155
+
156
+ ### Line Height Rules
157
+
158
+ - **Headings (h1-h4):** 1.2-1.3 (tight for confidence)
159
+ - **Body text:** 1.5-1.625 (comfortable reading)
160
+ - **Helper text:** 1.4-1.5 (quick scanning)
161
+ - **Code blocks:** 1.5 (monospace needs extra space)
162
+
163
+ **Tailwind Classes:**
164
+
165
+ ```astro
166
+ <!-- Heading Example -->
167
+ <h1 class="text-4xl font-bold leading-tight">Main Title</h1>
168
+
169
+ <!-- Subheading Example -->
170
+ <h2 class="text-2xl font-semibold leading-snug">Section Title</h2>
171
+
172
+ <!-- Body Example -->
173
+ <p class="text-base leading-relaxed">Body paragraph text...</p>
174
+
175
+ <!-- Helper Text Example -->
176
+ <p class="text-sm text-muted-foreground leading-normal">Help text</p>
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 3. Spacing System
182
+
183
+ ### Base Unit: 4px Grid
184
+
185
+ ```css
186
+ @theme {
187
+ /* Tailwind spacing (4px increments) */
188
+ --spacing-0: 0;
189
+ --spacing-1: 0.25rem; /* 4px */
190
+ --spacing-2: 0.5rem; /* 8px */
191
+ --spacing-3: 0.75rem; /* 12px */
192
+ --spacing-4: 1rem; /* 16px */
193
+ --spacing-5: 1.25rem; /* 20px */
194
+ --spacing-6: 1.5rem; /* 24px */
195
+ --spacing-8: 2rem; /* 32px */
196
+ --spacing-10: 2.5rem; /* 40px */
197
+ --spacing-12: 3rem; /* 48px */
198
+ --spacing-16: 4rem; /* 64px */
199
+ --spacing-20: 5rem; /* 80px */
200
+ --spacing-24: 6rem; /* 96px */
201
+ --spacing-32: 8rem; /* 128px */
202
+ }
203
+ ```
204
+
205
+ ### Spacing Scale Usage
206
+
207
+ | Component | Padding | Example |
208
+ |-----------|---------|---------|
209
+ | Button (compact) | `px-3 py-2` | Small buttons |
210
+ | Button (default) | `px-4 py-2.5` | Standard buttons |
211
+ | Card | `p-6` | Card containers |
212
+ | Section | `px-4 py-8 md:px-6 md:py-12` | Page sections |
213
+ | Gap (grid) | `gap-4` | Card grids |
214
+ | Gap (list) | `gap-2` | List items |
215
+ | Margin (between sections) | `mb-12 md:mb-16` | Vertical rhythm |
216
+
217
+ **Implementation Pattern:**
218
+
219
+ ```astro
220
+ <!-- Card with proper spacing -->
221
+ <div class="p-6 bg-card rounded-lg">
222
+ <h3 class="mb-2 text-lg font-semibold">Title</h3>
223
+ <p class="mb-4 text-sm text-muted-foreground">Description</p>
224
+ <div class="flex gap-2">
225
+ <button class="px-4 py-2">Action</button>
226
+ </div>
227
+ </div>
228
+
229
+ <!-- Section with responsive spacing -->
230
+ <section class="px-4 py-8 md:px-6 md:py-12 lg:px-8 lg:py-16">
231
+ <div class="max-w-7xl mx-auto">
232
+ <!-- Content -->
233
+ </div>
234
+ </section>
235
+ ```
236
+
237
+ ---
238
+
239
+ ## 4. Border Radius & Shadows
240
+
241
+ ### Border Radius Scale
242
+
243
+ ```css
244
+ @theme {
245
+ --radius-sm: 0.375rem; /* 6px - small elements */
246
+ --radius-md: 0.75rem; /* 12px - default */
247
+ --radius-lg: 1.5rem; /* 24px - large containers */
248
+ }
249
+ ```
250
+
251
+ ### Usage by Component
252
+
253
+ | Component | Radius | Tailwind | Use Case |
254
+ |-----------|--------|----------|----------|
255
+ | Input fields | `--radius-md` | `rounded-md` | Forms |
256
+ | Buttons | `--radius-md` | `rounded-md` | Primary CTAs |
257
+ | Cards | `--radius-lg` | `rounded-lg` | Content containers |
258
+ | Badges | `--radius-md` | `rounded-md` | Small labels |
259
+ | Modals | `--radius-lg` | `rounded-lg` | Large dialogs |
260
+
261
+ ### Shadow System (Depth)
262
+
263
+ ```css
264
+ /* Tailwind v4 Default Shadows */
265
+ box-shadow-sm /* Subtle, minimal elevation */
266
+ box-shadow-md /* Normal, cards and dropdowns */
267
+ box-shadow-lg /* Elevated, modals and popovers */
268
+ box-shadow-xl /* Heavy, floating notifications */
269
+ ```
270
+
271
+ **Implementation:**
272
+
273
+ ```astro
274
+ <!-- Subtle card -->
275
+ <div class="rounded-lg shadow-md bg-card">Card content</div>
276
+
277
+ <!-- Elevated modal -->
278
+ <div class="rounded-lg shadow-lg bg-card">Modal content</div>
279
+
280
+ <!-- Minimal button hover -->
281
+ <button class="rounded-md hover:shadow-sm">Button</button>
282
+ ```
283
+
284
+ ---
285
+
286
+ ## 5. Component Token Sizes
287
+
288
+ ### Button Sizes
289
+
290
+ | Size | Padding | Font Size | Height | Use Case |
291
+ |------|---------|-----------|--------|----------|
292
+ | `sm` | `px-3 py-1.5` | `text-sm` | 32px | Compact buttons |
293
+ | `md` | `px-4 py-2` | `text-base` | 40px | Default buttons |
294
+ | `lg` | `px-6 py-3` | `text-lg` | 48px | Primary CTAs |
295
+
296
+ ### Input Sizes
297
+
298
+ | Component | Padding | Font Size | Height |
299
+ |-----------|---------|-----------|--------|
300
+ | Input text | `px-4 py-2.5` | `text-base` | 40px |
301
+ | Input small | `px-3 py-1.5` | `text-sm` | 32px |
302
+ | Textarea | `p-3` | `text-base` | Flexible |
303
+
304
+ ### Card Sizes
305
+
306
+ | Type | Padding | Max Width | Use Case |
307
+ |------|---------|-----------|----------|
308
+ | Compact | `p-4` | 100% | Lists, grids |
309
+ | Default | `p-6` | 100% | Feature cards |
310
+ | Large | `p-8` | 100% | Hero cards |
311
+
312
+ ---
313
+
314
+ ## 6. Animations & Transitions
315
+
316
+ ### Transition Timing
317
+
318
+ ```css
319
+ /* Tailwind v4 Defaults */
320
+ transition-fast /* 150ms - UI interactions */
321
+ transition /* 300ms - Standard changes */
322
+ transition-slow /* 500ms - Page transitions */
323
+ ```
324
+
325
+ ### Animation Library
326
+
327
+ ```css
328
+ @keyframes fadeIn {
329
+ from { opacity: 0; }
330
+ to { opacity: 1; }
331
+ }
332
+
333
+ @keyframes fadeInUp {
334
+ from {
335
+ opacity: 0;
336
+ transform: translateY(30px);
337
+ }
338
+ to {
339
+ opacity: 1;
340
+ transform: translateY(0);
341
+ }
342
+ }
343
+
344
+ @keyframes slideInFromLeft {
345
+ from {
346
+ opacity: 0;
347
+ transform: translateX(-20px);
348
+ }
349
+ to {
350
+ opacity: 1;
351
+ transform: translateX(0);
352
+ }
353
+ }
354
+
355
+ @keyframes slideInFromRight {
356
+ from {
357
+ opacity: 0;
358
+ transform: translateX(20px);
359
+ }
360
+ to {
361
+ opacity: 1;
362
+ transform: translateX(0);
363
+ }
364
+ }
365
+
366
+ @keyframes float {
367
+ 0%, 100% { transform: translateY(0px) scale(1); }
368
+ 50% { transform: translateY(-15px) scale(1.02); }
369
+ }
370
+
371
+ @keyframes pulse-soft {
372
+ 0%, 100% { opacity: 1; }
373
+ 50% { opacity: 0.7; }
374
+ }
375
+ ```
376
+
377
+ ### Animation Classes
378
+
379
+ ```astro
380
+ <!-- Fade in on load -->
381
+ <div class="animate-fadeIn">Fades in on mount</div>
382
+
383
+ <!-- Fade in and slide up -->
384
+ <div class="animate-fadeInUp">Enters from bottom</div>
385
+
386
+ <!-- Float effect -->
387
+ <div class="animate-float">Gentle floating animation</div>
388
+
389
+ <!-- Hover scale -->
390
+ <button class="transition-transform hover:scale-105">
391
+ Scales on hover
392
+ </button>
393
+ ```
394
+
395
+ ### Interaction Patterns
396
+
397
+ **Button Hover/Active:**
398
+ ```astro
399
+ <button class="
400
+ transition-all duration-200
401
+ hover:scale-105 active:scale-95
402
+ hover:shadow-lg active:shadow-md
403
+ ">
404
+ Interactive Button
405
+ </button>
406
+ ```
407
+
408
+ **Loading State:**
409
+ ```astro
410
+ <div class="animate-pulse bg-muted h-12 rounded-md"></div>
411
+ ```
412
+
413
+ **Card Hover:**
414
+ ```astro
415
+ <div class="
416
+ transition-all duration-300
417
+ hover:shadow-lg hover:-translate-y-1
418
+ ">
419
+ Hoverable card
420
+ </div>
421
+ ```
422
+
423
+ ---
424
+
425
+ ## 7. Responsive Breakpoints
426
+
427
+ ### Tailwind v4 Breakpoints
428
+
429
+ ```
430
+ Mobile: default (320px+)
431
+ Tablet: md: 768px+
432
+ Desktop: lg: 1024px+
433
+ XL: xl: 1280px+
434
+ 2XL: 2xl: 1536px+
435
+ ```
436
+
437
+ ### Mobile-First Strategy
438
+
439
+ **RULE:** Design for mobile first, enhance for larger screens.
440
+
441
+ ```astro
442
+ <!-- Stack on mobile, grid on tablet -->
443
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
444
+ <div>Card 1</div>
445
+ <div>Card 2</div>
446
+ <div>Card 3</div>
447
+ </div>
448
+
449
+ <!-- Hide on mobile, show on desktop -->
450
+ <div class="hidden lg:block">
451
+ Desktop-only sidebar
452
+ </div>
453
+
454
+ <!-- Responsive padding -->
455
+ <section class="px-4 py-8 md:px-6 md:py-12 lg:px-8 lg:py-16">
456
+ Content
457
+ </section>
458
+
459
+ <!-- Responsive font sizes -->
460
+ <h1 class="text-2xl md:text-3xl lg:text-4xl">
461
+ Title scales with screen
462
+ </h1>
463
+ ```
464
+
465
+ ### Container Queries (Modern Alternative)
466
+
467
+ ```astro
468
+ <div class="@container">
469
+ <!-- Responds to container size, not viewport -->
470
+ <div class="@md:grid @md:grid-cols-2">
471
+ <!-- Content -->
472
+ </div>
473
+ </div>
474
+ ```
475
+
476
+ ---
477
+
478
+ ## 8. Dark Mode & Theme Switching
479
+
480
+ ### Dark Mode Implementation
481
+
482
+ **How It Works:**
483
+
484
+ 1. `.dark` class applied to `<html>` element
485
+ 2. CSS variables in `.dark` block override light values
486
+ 3. No Tailwind dark: prefixes needed for semantic colors
487
+ 4. Dark mode persists in localStorage
488
+
489
+ **Usage:**
490
+
491
+ ```astro
492
+ <!-- ALL semantic colors automatically respond to dark mode -->
493
+ <div class="bg-background text-foreground">
494
+ <!-- Background and foreground switch automatically -->
495
+ </div>
496
+
497
+ <!-- Explicit dark mode utilities (optional, for exceptions) -->
498
+ <div class="bg-white dark:bg-black">
499
+ <!-- Only use this if semantic colors don't work -->
500
+ </div>
501
+ ```
502
+
503
+ ### Theme Switching Component
504
+
505
+ ```tsx
506
+ import { useEffect, useState } from 'react';
507
+
508
+ export function ThemeToggle() {
509
+ const [isDark, setIsDark] = useState(false);
510
+
511
+ useEffect(() => {
512
+ const isDarkMode = localStorage.getItem('theme') === 'dark';
513
+ setIsDark(isDarkMode);
514
+ if (isDarkMode) {
515
+ document.documentElement.classList.add('dark');
516
+ }
517
+ }, []);
518
+
519
+ const toggle = () => {
520
+ const newIsDark = !isDark;
521
+ setIsDark(newIsDark);
522
+ localStorage.setItem('theme', newIsDark ? 'dark' : 'light');
523
+
524
+ if (newIsDark) {
525
+ document.documentElement.classList.add('dark');
526
+ } else {
527
+ document.documentElement.classList.remove('dark');
528
+ }
529
+ };
530
+
531
+ return <button onClick={toggle}>Toggle Dark Mode</button>;
532
+ }
533
+ ```
534
+
535
+ ---
536
+
537
+ ## 9. Component Base Styles
538
+
539
+ ### Card Component
540
+
541
+ ```tsx
542
+ // src/components/ui/card.tsx
543
+ export function Card({ children, className }: CardProps) {
544
+ return (
545
+ <div className={cn(
546
+ 'rounded-lg bg-card text-card-foreground border border-border shadow-sm',
547
+ 'transition-all duration-300 hover:shadow-md',
548
+ className
549
+ )}>
550
+ {children}
551
+ </div>
552
+ );
553
+ }
554
+ ```
555
+
556
+ **Usage:**
557
+ ```astro
558
+ <Card>
559
+ <div class="p-6">Card content</div>
560
+ </Card>
561
+ ```
562
+
563
+ ### Button Component
564
+
565
+ ```tsx
566
+ // src/components/ui/button.tsx
567
+ export function Button({ children, variant = 'default', size = 'md' }: ButtonProps) {
568
+ const variants = {
569
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
570
+ secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/90',
571
+ outline: 'border border-input bg-background hover:bg-muted',
572
+ ghost: 'hover:bg-muted hover:text-muted-foreground',
573
+ };
574
+
575
+ const sizes = {
576
+ sm: 'px-3 py-1.5 text-sm',
577
+ md: 'px-4 py-2 text-base',
578
+ lg: 'px-6 py-3 text-lg',
579
+ };
580
+
581
+ return (
582
+ <button className={cn(
583
+ 'rounded-md font-medium transition-all duration-200',
584
+ 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
585
+ variants[variant],
586
+ sizes[size],
587
+ )}>
588
+ {children}
589
+ </button>
590
+ );
591
+ }
592
+ ```
593
+
594
+ ### Badge Component
595
+
596
+ ```tsx
597
+ // src/components/ui/badge.tsx
598
+ export function Badge({ children, variant = 'default' }: BadgeProps) {
599
+ const variants = {
600
+ default: 'bg-primary/10 text-primary border border-primary/20',
601
+ secondary: 'bg-secondary/10 text-secondary border border-secondary/20',
602
+ accent: 'bg-accent/10 text-accent border border-accent/20',
603
+ destructive: 'bg-destructive/10 text-destructive border border-destructive/20',
604
+ };
605
+
606
+ return (
607
+ <span className={cn(
608
+ 'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium',
609
+ variants[variant],
610
+ )}>
611
+ {children}
612
+ </span>
613
+ );
614
+ }
615
+ ```
616
+
617
+ ---
618
+
619
+ ## 10. WCAG 2.1 AA Compliance Checklist
620
+
621
+ ### Color Contrast (REQUIRED)
622
+
623
+ - [ ] All text on background: minimum 4.5:1 ratio (body) or 3:1 (large 18px+)
624
+ - [ ] Test with WebAIM Contrast Checker
625
+ - [ ] Verify all button color combinations
626
+ - [ ] Check icon colors on backgrounds
627
+ - [ ] Validate dark mode colors
628
+
629
+ **Test Command:**
630
+ ```bash
631
+ # Use axe DevTools or WAVE browser extensions
632
+ # Or programmatic: npm install axe-core
633
+ # import { axe } from 'jest-axe';
634
+ ```
635
+
636
+ ### Keyboard Navigation (REQUIRED)
637
+
638
+ - [ ] All interactive elements accessible via Tab
639
+ - [ ] Focus order logical and visible
640
+ - [ ] Focus indicator minimum 2px outline with 3:1 contrast
641
+ - [ ] No keyboard traps (user can escape any modal)
642
+ - [ ] Enter/Space activate buttons
643
+ - [ ] Escape closes modals
644
+
645
+ **Implementation:**
646
+ ```astro
647
+ <!-- Visible focus indicator -->
648
+ <button class="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring">
649
+ Keyboard accessible
650
+ </button>
651
+ ```
652
+
653
+ ### ARIA & Semantics (REQUIRED)
654
+
655
+ - [ ] Buttons use `<button>` not `<div>`
656
+ - [ ] Links use `<a>` not `<div>`
657
+ - [ ] Forms use `<label>` with `for` attribute
658
+ - [ ] Inputs labeled (id + htmlFor match)
659
+ - [ ] Error messages associated with fields via aria-describedby
660
+ - [ ] Loading state communicated via aria-busy
661
+ - [ ] Modals have role="dialog" + aria-modal="true"
662
+ - [ ] Headings use proper h1-h6 hierarchy
663
+
664
+ **Examples:**
665
+ ```astro
666
+ <!-- Proper form structure -->
667
+ <form class="space-y-4">
668
+ <div class="flex flex-col">
669
+ <label for="email" class="mb-2 font-medium">Email</label>
670
+ <input
671
+ id="email"
672
+ type="email"
673
+ aria-describedby="email-error"
674
+ required
675
+ />
676
+ <p id="email-error" class="mt-1 text-sm text-destructive">
677
+ Invalid email format
678
+ </p>
679
+ </div>
680
+ </form>
681
+
682
+ <!-- Modal accessibility -->
683
+ <dialog
684
+ role="dialog"
685
+ aria-modal="true"
686
+ aria-labelledby="dialog-title"
687
+ class="rounded-lg bg-card p-6"
688
+ >
689
+ <h2 id="dialog-title" class="text-lg font-bold">Confirm Action</h2>
690
+ <!-- Content -->
691
+ </dialog>
692
+
693
+ <!-- Loading state -->
694
+ <button aria-busy="true" disabled>
695
+ Loading... <span class="ml-2 animate-spin">○</span>
696
+ </button>
697
+ ```
698
+
699
+ ### Screen Reader Testing (REQUIRED)
700
+
701
+ - [ ] Test with NVDA (Windows) or VoiceOver (Mac)
702
+ - [ ] Page structure makes sense when read top-to-bottom
703
+ - [ ] Links have descriptive text (not "click here")
704
+ - [ ] Images have meaningful alt text
705
+ - [ ] Form labels announced with fields
706
+ - [ ] Error messages announced
707
+ - [ ] Loading states announced
708
+
709
+ **Implementation:**
710
+ ```astro
711
+ <!-- Descriptive links -->
712
+ <a href="/learn-more" class="text-primary">
713
+ Learn more about the ontology <!-- Good -->
714
+ </a>
715
+ <a href="/learn-more" class="text-primary">Click here</a> <!-- Bad -->
716
+
717
+ <!-- Image alt text -->
718
+ <img src="demo.png" alt="Three-column ontology diagram showing Groups, Things, and Connections" />
719
+
720
+ <!-- Hidden text for screen readers -->
721
+ <button>
722
+ Share
723
+ <span class="sr-only">on Twitter</span>
724
+ </button>
725
+ ```
726
+
727
+ ### Mobile & Touch (REQUIRED)
728
+
729
+ - [ ] Touch targets minimum 44x44 pixels
730
+ - [ ] Spacing between touch targets minimum 8px
731
+ - [ ] No hover-only functionality (mobile has no hover)
732
+ - [ ] Responsive design works on 320px+ screens
733
+ - [ ] Zoom not disabled (no `user-scalable=no`)
734
+
735
+ **Implementation:**
736
+ ```astro
737
+ <!-- 44px minimum height touch target -->
738
+ <button class="px-4 py-2 h-11">
739
+ Touch-friendly button
740
+ </button>
741
+
742
+ <!-- Spacing between buttons -->
743
+ <div class="flex gap-3">
744
+ <button>Button 1</button>
745
+ <button>Button 2</button>
746
+ </div>
747
+
748
+ <!-- Avoid hover-only interactions -->
749
+ <div class="group">
750
+ <!-- Shows on hover but also interactive on touch -->
751
+ <button class="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100">
752
+ Action
753
+ </button>
754
+ </div>
755
+
756
+ <!-- Responsive meta tag (allow pinch zoom) -->
757
+ <meta
758
+ name="viewport"
759
+ content="width=device-width, initial-scale=1, maximum-scale=5"
760
+ />
761
+ ```
762
+
763
+ ### Performance (Lighthouse 95+)
764
+
765
+ - [ ] Cumulative Layout Shift (CLS) < 0.1
766
+ - [ ] Largest Contentful Paint (LCP) < 2.5s
767
+ - [ ] First Input Delay (FID) < 100ms
768
+ - [ ] Images optimized (WebP, lazy loading)
769
+ - [ ] CSS minified and tree-shaken
770
+ - [ ] JavaScript split into chunks
771
+ - [ ] No render-blocking CSS
772
+
773
+ ---
774
+
775
+ ## 11. Design Implementation Checklist
776
+
777
+ ### Before Shipping Any Page
778
+
779
+ - [ ] **Colors:** All text colors meet WCAG AA (4.5:1 body, 3:1 large)
780
+ - [ ] **Typography:** Font sizes readable at 320px (mobile) and 1440px (desktop)
781
+ - [ ] **Spacing:** Consistent use of 4px grid system
782
+ - [ ] **Buttons:** Minimum 44px height, clear focus states
783
+ - [ ] **Forms:** All inputs labeled, errors announced
784
+ - [ ] **Dark Mode:** Test colors in dark mode with CSS variables
785
+ - [ ] **Mobile:** Responsive breakpoints tested at 320px, 768px, 1024px
786
+ - [ ] **Keyboard:** Tab through all interactive elements
787
+ - [ ] **ARIA:** Semantic HTML, proper roles and labels
788
+ - [ ] **Performance:** Lighthouse 95+ on all metrics
789
+
790
+ ### Testing Browsers
791
+
792
+ - [ ] Chrome (latest)
793
+ - [ ] Firefox (latest)
794
+ - [ ] Safari (latest)
795
+ - [ ] Edge (latest)
796
+ - [ ] Mobile Safari (iOS)
797
+ - [ ] Chrome Mobile (Android)
798
+
799
+ ### Accessibility Tools
800
+
801
+ 1. **Automated:**
802
+ - axe DevTools (browser extension)
803
+ - WAVE (browser extension)
804
+ - Lighthouse (built into Chrome DevTools)
805
+
806
+ 2. **Manual:**
807
+ - Keyboard navigation (Tab, Enter, Escape)
808
+ - Screen reader (NVDA, JAWS, VoiceOver)
809
+ - Color contrast (WebAIM Contrast Checker)
810
+ - Color blindness (Coblis simulator)
811
+
812
+ 3. **Performance:**
813
+ - Chrome DevTools Lighthouse
814
+ - WebPageTest.org
815
+ - GTmetrix
816
+
817
+ ---
818
+
819
+ ## 12. Common Design Patterns
820
+
821
+ ### Hero Section
822
+
823
+ ```astro
824
+ <section class="
825
+ relative overflow-hidden
826
+ px-4 py-20 sm:px-6 sm:py-24 md:px-8 md:py-32
827
+ bg-gradient-to-br from-primary/5 via-background to-background
828
+ ">
829
+ <!-- Background elements -->
830
+ <div class="absolute inset-0 -z-10 bg-gradient-to-t from-primary/[0.05] to-transparent"></div>
831
+
832
+ <!-- Content -->
833
+ <div class="max-w-4xl mx-auto text-center">
834
+ <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold leading-tight mb-6">
835
+ Main Title
836
+ </h1>
837
+ <p class="text-xl text-muted-foreground mb-8 max-w-2xl mx-auto">
838
+ Subtitle or description
839
+ </p>
840
+ <div class="flex gap-4 justify-center">
841
+ <button class="px-6 py-3 bg-primary text-primary-foreground rounded-md font-semibold">
842
+ Primary CTA
843
+ </button>
844
+ <button class="px-6 py-3 border border-border rounded-md font-semibold hover:bg-muted">
845
+ Secondary CTA
846
+ </button>
847
+ </div>
848
+ </div>
849
+ </section>
850
+ ```
851
+
852
+ ### Card Grid
853
+
854
+ ```astro
855
+ <section class="px-4 py-12 md:px-6 md:py-16">
856
+ <div class="max-w-7xl mx-auto">
857
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
858
+ {items.map((item) => (
859
+ <div class="
860
+ rounded-lg bg-card border border-border p-6
861
+ transition-all duration-300
862
+ hover:shadow-lg hover:-translate-y-1
863
+ ">
864
+ <h3 class="text-lg font-semibold mb-3">{item.title}</h3>
865
+ <p class="text-muted-foreground mb-4">{item.description}</p>
866
+ <a href={item.href} class="text-primary font-medium hover:underline">
867
+ Learn more →
868
+ </a>
869
+ </div>
870
+ ))}
871
+ </div>
872
+ </div>
873
+ </section>
874
+ ```
875
+
876
+ ### Sidebar Navigation
877
+
878
+ ```astro
879
+ <div class="flex gap-6">
880
+ <!-- Sidebar -->
881
+ <aside class="w-64 hidden lg:block">
882
+ <nav class="sticky top-4 space-y-2">
883
+ {navItems.map((item) => (
884
+ <a
885
+ href={item.href}
886
+ class="
887
+ block px-4 py-2 rounded-md
888
+ transition-colors duration-200
889
+ hover:bg-muted
890
+ text-foreground
891
+ "
892
+ aria-current={isActive(item.href) ? "page" : undefined}
893
+ >
894
+ {item.label}
895
+ </a>
896
+ ))}
897
+ </nav>
898
+ </aside>
899
+
900
+ <!-- Main content -->
901
+ <main class="flex-1 min-w-0">
902
+ <slot />
903
+ </main>
904
+ </div>
905
+ ```
906
+
907
+ ---
908
+
909
+ ## Version History
910
+
911
+ | Version | Date | Changes |
912
+ |---------|------|---------|
913
+ | 1.0.0 | Oct 2024 | Initial design system foundation |
914
+
915
+ ---
916
+
917
+ **Design System Maintained By:** Design Agent
918
+ **Last Updated:** October 25, 2024
919
+ **Status:** Production Ready