mobileui-os 1.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 (123) hide show
  1. package/AGENTS.md +47 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +78 -0
  4. package/bin/cli.mjs +375 -0
  5. package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
  6. package/knowledge/android/accessibility.md +333 -0
  7. package/knowledge/android/components-controls.md +270 -0
  8. package/knowledge/android/material-design-3.md +174 -0
  9. package/knowledge/android/navigation-patterns.md +212 -0
  10. package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
  11. package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
  12. package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
  13. package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
  14. package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
  15. package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
  16. package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
  17. package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
  18. package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
  19. package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
  20. package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
  21. package/knowledge/apple/Interaction-behaviour.md +1378 -0
  22. package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
  23. package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
  24. package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
  25. package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
  26. package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
  27. package/knowledge/apple/Patterns-templates-composition.md +647 -0
  28. package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
  29. package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
  30. package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
  31. package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
  32. package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
  33. package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
  34. package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
  35. package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
  36. package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
  37. package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
  38. package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
  39. package/knowledge/apple/accessibility.md +2162 -0
  40. package/knowledge/apple/color.md +1933 -0
  41. package/knowledge/apple/component-architecture.md +2208 -0
  42. package/knowledge/apple/components.md +2172 -0
  43. package/knowledge/apple/design-decision-framework.md +1883 -0
  44. package/knowledge/apple/design-review-engine.md +2108 -0
  45. package/knowledge/apple/design-tokens.md +1943 -0
  46. package/knowledge/apple/designing-for-ios.md +1680 -0
  47. package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
  48. package/knowledge/apple/hig-foundation.md +1806 -0
  49. package/knowledge/apple/iconography.md +1903 -0
  50. package/knowledge/apple/interaction-patterns.md +2513 -0
  51. package/knowledge/apple/interaction.md +2141 -0
  52. package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
  53. package/knowledge/apple/ios-components-and-controls.md +1634 -0
  54. package/knowledge/apple/ios-components-patterns.md +1343 -0
  55. package/knowledge/apple/ios-design-system-architecture.md +1520 -0
  56. package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
  57. package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
  58. package/knowledge/apple/ios-forms-and-input.md +1458 -0
  59. package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
  60. package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
  61. package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
  62. package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
  63. package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
  64. package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
  65. package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
  66. package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
  67. package/knowledge/apple/ios-search-and-discovery.md +1456 -0
  68. package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
  69. package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
  70. package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
  71. package/knowledge/apple/layout.md +2331 -0
  72. package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
  73. package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
  74. package/knowledge/apple/motion-and-animation.md +1698 -0
  75. package/knowledge/apple/motion.md +2087 -0
  76. package/knowledge/apple/navigation.md +2281 -0
  77. package/knowledge/apple/responsive-adaptive.md +2159 -0
  78. package/knowledge/apple/screen-architecture.md +2067 -0
  79. package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
  80. package/knowledge/apple/typography.md +1802 -0
  81. package/knowledge/apple/ui-ux inteligence audit.md +106 -0
  82. package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
  83. package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
  84. package/knowledge/apple/visual-materials.md +2189 -0
  85. package/package.json +53 -0
  86. package/principles/design-principles.md +37 -0
  87. package/principles/platform-principles.md +25 -0
  88. package/principles/ux-principles.md +16 -0
  89. package/references/official-links.md +11 -0
  90. package/skills/accessibility-engineer/SKILL.md +125 -0
  91. package/skills/analytics-engineer/SKILL.md +283 -0
  92. package/skills/animation-engineer/SKILL.md +316 -0
  93. package/skills/component-designer/SKILL.md +75 -0
  94. package/skills/component-library-engineer/SKILL.md +140 -0
  95. package/skills/component-library-ops/SKILL.md +155 -0
  96. package/skills/design-system/SKILL.md +77 -0
  97. package/skills/design-token-engineer/SKILL.md +203 -0
  98. package/skills/design-token-pipeline/SKILL.md +277 -0
  99. package/skills/device-lab-engineer/SKILL.md +387 -0
  100. package/skills/forms-engineer/SKILL.md +79 -0
  101. package/skills/internationalization-engineer/SKILL.md +256 -0
  102. package/skills/motion-designer/SKILL.md +77 -0
  103. package/skills/native-data-fetching/SKILL.md +50 -0
  104. package/skills/navigation-architect/SKILL.md +65 -0
  105. package/skills/performance-engineer/SKILL.md +250 -0
  106. package/skills/platform-specialist/SKILL.md +95 -0
  107. package/skills/pre-release-gate/SKILL.md +75 -0
  108. package/skills/screen-designer/SKILL.md +117 -0
  109. package/skills/security-engineer/SKILL.md +375 -0
  110. package/skills/skills.json +134 -0
  111. package/skills/testing-auditor/SKILL.md +62 -0
  112. package/skills/ui-architect/SKILL.md +86 -0
  113. package/skills/ui-implementer/SKILL.md +188 -0
  114. package/skills/ux-architect/SKILL.md +49 -0
  115. package/skills/ux-auditor/SKILL.md +52 -0
  116. package/skills/visual-auditor/SKILL.md +71 -0
  117. package/templates/audit-report.md +29 -0
  118. package/templates/design-tokens.ts +33 -0
  119. package/templates/screen-spec.md +61 -0
  120. package/workflows/new-screen.md +17 -0
  121. package/workflows/pre-release.md +21 -0
  122. package/workflows/redesign.md +14 -0
  123. package/workflows/ui-audit.md +22 -0
@@ -0,0 +1,1943 @@
1
+
2
+
3
+ ````md
4
+ # Apple Design Token Intelligence
5
+
6
+ > Agent knowledge module for building coherent, scalable, adaptive, native-feeling
7
+ > design systems across iOS, iPadOS, React Native, Expo, and custom UI systems.
8
+
9
+ Version: 1.0
10
+ Platform: iOS / iPadOS / React Native
11
+ Role: Design-system intelligence
12
+ Parent: knowledge/apple/responsive-adaptive.md
13
+ Use with: MobileUI-OS
14
+
15
+
16
+ # 1. PURPOSE
17
+
18
+ Design tokens are the controlled vocabulary of a design system.
19
+
20
+ Instead of allowing the agent to invent values independently:
21
+
22
+ ```text
23
+ padding: 17
24
+ radius: 13
25
+ fontSize: 19
26
+ gray: #838383
27
+ ````
28
+
29
+ the system should reason through semantic tokens:
30
+
31
+ ```text
32
+ spacing.md
33
+ radius.md
34
+ typography.body
35
+ color.text.secondary
36
+ ```
37
+
38
+ This creates consistency across the entire application.
39
+
40
+ # 2. CORE PRINCIPLE
41
+
42
+ The agent should not design every screen independently.
43
+
44
+ It should generate:
45
+
46
+ ```text
47
+ DESIGN SYSTEM
48
+ ↓
49
+ TOKENS
50
+ ↓
51
+ COMPONENTS
52
+ ↓
53
+ PATTERNS
54
+ ↓
55
+ SCREENS
56
+ ```
57
+
58
+ The system comes first.
59
+
60
+ Screens are compositions of the system.
61
+
62
+ # 3. TOKEN HIERARCHY
63
+
64
+ Use three conceptual levels:
65
+
66
+ ```text
67
+ primitive tokens
68
+ ↓
69
+ semantic tokens
70
+ ↓
71
+ component tokens
72
+ ```
73
+
74
+ Example:
75
+
76
+ ```text
77
+ primitive:
78
+ gray500
79
+
80
+ semantic:
81
+ text.secondary
82
+
83
+ component:
84
+ button.secondary.text
85
+ ```
86
+
87
+ # 4. PRIMITIVE TOKENS
88
+
89
+ Primitive tokens describe raw values.
90
+
91
+ Examples:
92
+
93
+ ```text
94
+ colors
95
+ spacing
96
+ radii
97
+ font sizes
98
+ font weights
99
+ durations
100
+ opacities
101
+ ```
102
+
103
+ Primitive tokens should generally not be referenced directly by application
104
+ screens.
105
+
106
+ # 5. SEMANTIC TOKENS
107
+
108
+ Semantic tokens describe meaning.
109
+
110
+ Examples:
111
+
112
+ ```text
113
+ text.primary
114
+ text.secondary
115
+ surface.primary
116
+ surface.secondary
117
+ border.subtle
118
+ accent.primary
119
+ status.error
120
+ ```
121
+
122
+ This allows the visual implementation to change without rewriting the entire
123
+ application.
124
+
125
+ # 6. COMPONENT TOKENS
126
+
127
+ Component tokens describe specific UI behavior.
128
+
129
+ Examples:
130
+
131
+ ```text
132
+ button.height
133
+ button.radius
134
+ button.padding
135
+ button.primary.background
136
+ button.primary.foreground
137
+ ```
138
+
139
+ Components should consume semantic tokens where possible.
140
+
141
+ # 7. TOKEN FLOW
142
+
143
+ ```text
144
+ primitive
145
+ ↓
146
+ semantic
147
+ ↓
148
+ component
149
+ ↓
150
+ screen
151
+ ```
152
+
153
+ Avoid:
154
+
155
+ ```text
156
+ primitive
157
+ ↓
158
+ screen
159
+ ```
160
+
161
+ because it creates visual inconsistency.
162
+
163
+ # 8. SPACING SYSTEM
164
+
165
+ Use a controlled spacing scale.
166
+
167
+ Conceptual example:
168
+
169
+ ```text
170
+ spacing.xs
171
+ spacing.sm
172
+ spacing.md
173
+ spacing.lg
174
+ spacing.xl
175
+ spacing.2xl
176
+ spacing.3xl
177
+ ```
178
+
179
+ The exact numeric values should belong to the project design system.
180
+
181
+ # 9. SPACING MEANING
182
+
183
+ Spacing should communicate relationships.
184
+
185
+ Smaller spacing:
186
+
187
+ ```text
188
+ closely related elements
189
+ ```
190
+
191
+ Medium spacing:
192
+
193
+ ```text
194
+ related groups
195
+ ```
196
+
197
+ Large spacing:
198
+
199
+ ```text
200
+ separate sections
201
+ ```
202
+
203
+ Do not select spacing purely because it "looks nice."
204
+
205
+ # 10. SPACING RELATIONSHIP MODEL
206
+
207
+ ```text
208
+ element
209
+ ↓ small gap
210
+ subgroup
211
+ ↓ medium gap
212
+ group
213
+ ↓ large gap
214
+ section
215
+ ```
216
+
217
+ The hierarchy should be visually detectable.
218
+
219
+ # 11. SPACING CONSISTENCY
220
+
221
+ If two relationships have equivalent semantic importance, they should normally
222
+ use equivalent spacing.
223
+
224
+ Avoid:
225
+
226
+ ```text
227
+ Title → Subtitle = 11
228
+ Title → Subtitle = 13
229
+ Title → Subtitle = 14
230
+ ```
231
+
232
+ across different screens without a reason.
233
+
234
+ # 12. PAGE PADDING
235
+
236
+ Define semantic page padding.
237
+
238
+ Example:
239
+
240
+ ```text
241
+ layout.pagePadding
242
+ ```
243
+
244
+ instead of repeating arbitrary values.
245
+
246
+ # 13. CONTENT GUTTERS
247
+
248
+ Content gutters should adapt to available space.
249
+
250
+ Conceptually:
251
+
252
+ ```text
253
+ compact:
254
+ small horizontal gutter
255
+
256
+ regular:
257
+ medium gutter
258
+
259
+ expanded:
260
+ larger gutter + max content width
261
+ ```
262
+
263
+ Do not endlessly increase padding on large screens.
264
+
265
+ # 14. SECTION SPACING
266
+
267
+ Use a semantic token:
268
+
269
+ ```text
270
+ spacing.section
271
+ ```
272
+
273
+ for major content separation.
274
+
275
+ This creates rhythm across screens.
276
+
277
+ # 15. COMPONENT INTERNAL SPACING
278
+
279
+ Components should have their own internal rhythm.
280
+
281
+ Example:
282
+
283
+ ```text
284
+ card
285
+ ├── image
286
+ ├── title
287
+ ├── metadata
288
+ └── action
289
+ ```
290
+
291
+ Each relationship can use appropriate semantic spacing.
292
+
293
+ # 16. TYPOGRAPHY TOKENS
294
+
295
+ Typography should be defined semantically.
296
+
297
+ Example:
298
+
299
+ ```text
300
+ typography.display
301
+ typography.title
302
+ typography.heading
303
+ typography.body
304
+ typography.bodySmall
305
+ typography.caption
306
+ typography.label
307
+ ```
308
+
309
+ Avoid screen-specific font sizes wherever possible.
310
+
311
+ # 17. TYPOGRAPHY IS A SYSTEM
312
+
313
+ A typography system defines:
314
+
315
+ ```text
316
+ family
317
+ size
318
+ weight
319
+ line height
320
+ tracking
321
+ ```
322
+
323
+ as a coordinated unit.
324
+
325
+ # 18. FONT FAMILY
326
+
327
+ Prefer a controlled font stack.
328
+
329
+ For Apple-native experiences, system typography should generally be considered
330
+ before introducing custom fonts.
331
+
332
+ Custom fonts should have a clear product/design reason.
333
+
334
+ # 19. FONT WEIGHT
335
+
336
+ Avoid arbitrary weight values.
337
+
338
+ Use semantic roles such as:
339
+
340
+ ```text
341
+ regular
342
+ medium
343
+ semibold
344
+ bold
345
+ ```
346
+
347
+ when appropriate.
348
+
349
+ # 20. TYPOGRAPHY HIERARCHY
350
+
351
+ A typical hierarchy:
352
+
353
+ ```text
354
+ display
355
+ ↓
356
+ large title
357
+ ↓
358
+ title
359
+ ↓
360
+ heading
361
+ ↓
362
+ body
363
+ ↓
364
+ secondary
365
+ ↓
366
+ caption
367
+ ```
368
+
369
+ The exact hierarchy depends on the product.
370
+
371
+ # 21. DO NOT USE FONT SIZE ALONE
372
+
373
+ Hierarchy can also use:
374
+
375
+ ```text
376
+ weight
377
+ color
378
+ spacing
379
+ position
380
+ case
381
+ ```
382
+
383
+ A good system combines multiple signals.
384
+
385
+ # 22. LINE HEIGHT
386
+
387
+ Line height should be paired with the typography role.
388
+
389
+ Avoid arbitrary line heights on every component.
390
+
391
+ # 23. TRACKING
392
+
393
+ Tracking should be used intentionally.
394
+
395
+ Do not globally add letter spacing because it "looks modern."
396
+
397
+ # 24. TEXT COLOR TOKENS
398
+
399
+ Use semantic roles:
400
+
401
+ ```text
402
+ text.primary
403
+ text.secondary
404
+ text.tertiary
405
+ text.disabled
406
+ text.inverse
407
+ text.accent
408
+ ```
409
+
410
+ rather than arbitrary gray values.
411
+
412
+ # 25. SURFACE TOKENS
413
+
414
+ Define surfaces semantically:
415
+
416
+ ```text
417
+ surface.background
418
+ surface.primary
419
+ surface.secondary
420
+ surface.tertiary
421
+ surface.elevated
422
+ surface.overlay
423
+ ```
424
+
425
+ This allows the visual system to evolve consistently.
426
+
427
+ # 26. BACKGROUND HIERARCHY
428
+
429
+ A strong interface may contain:
430
+
431
+ ```text
432
+ background
433
+ ↓
434
+ surface
435
+ ↓
436
+ elevated surface
437
+ ↓
438
+ overlay
439
+ ```
440
+
441
+ Each layer should have a meaningful relationship.
442
+
443
+ # 27. BORDER TOKENS
444
+
445
+ Use semantic border roles:
446
+
447
+ ```text
448
+ border.subtle
449
+ border.default
450
+ border.strong
451
+ border.focus
452
+ border.error
453
+ ```
454
+
455
+ Avoid manually choosing gray values per component.
456
+
457
+ # 28. DIVIDER TOKENS
458
+
459
+ Dividers should generally be less visually dominant than primary content.
460
+
461
+ Example:
462
+
463
+ ```text
464
+ divider.subtle
465
+ ```
466
+
467
+ should communicate separation without becoming a visual wall.
468
+
469
+ # 29. COLOR SYSTEM
470
+
471
+ Colors should be organized by meaning.
472
+
473
+ Example:
474
+
475
+ ```text
476
+ accent
477
+ neutral
478
+ success
479
+ warning
480
+ error
481
+ info
482
+ ```
483
+
484
+ Each category can have multiple roles.
485
+
486
+ # 30. SEMANTIC COLORS
487
+
488
+ Prefer:
489
+
490
+ ```text
491
+ status.success
492
+ ```
493
+
494
+ over:
495
+
496
+ ```text
497
+ green500
498
+ ```
499
+
500
+ because the meaning survives theme changes.
501
+
502
+ # 31. DARK MODE
503
+
504
+ Dark mode should not simply invert colors.
505
+
506
+ Instead define separate semantic mappings.
507
+
508
+ Example:
509
+
510
+ ```text
511
+ surface.background
512
+ ↓
513
+ light: light surface
514
+ dark: dark surface
515
+ ```
516
+
517
+ while preserving semantic hierarchy.
518
+
519
+ # 32. LIGHT/DARK TOKEN MAPPING
520
+
521
+ Conceptually:
522
+
523
+ ```text
524
+ semantic token
525
+ │
526
+ ┌───┴────┐
527
+ ↓ ↓
528
+ light dark
529
+ value value
530
+ ```
531
+
532
+ Components should consume the semantic token.
533
+
534
+ # 33. ACCENT COLORS
535
+
536
+ Accent colors should communicate:
537
+
538
+ ```text
539
+ interaction
540
+ selection
541
+ brand identity
542
+ focus
543
+ ```
544
+
545
+ where appropriate.
546
+
547
+ Do not use accent color on every element.
548
+
549
+ # 34. ACCENT RESTRAINT
550
+
551
+ If everything is accented:
552
+
553
+ ```text
554
+ nothing feels primary
555
+ ```
556
+
557
+ Reserve strong accents for meaningful actions and states.
558
+
559
+ # 35. DESTRUCTIVE COLORS
560
+
561
+ Destructive actions should have semantic tokens:
562
+
563
+ ```text
564
+ action.destructive
565
+ status.error
566
+ ```
567
+
568
+ Do not use arbitrary red values across the application.
569
+
570
+ # 36. OPACITY TOKENS
571
+
572
+ Use opacity intentionally.
573
+
574
+ Possible semantic roles:
575
+
576
+ ```text
577
+ overlay.light
578
+ overlay.medium
579
+ disabled.content
580
+ scrim
581
+ ```
582
+
583
+ Avoid random opacity values such as:
584
+
585
+ ```text
586
+ 0.13
587
+ 0.27
588
+ 0.43
589
+ ```
590
+
591
+ unless justified.
592
+
593
+ # 37. OPACITY IS NOT HIERARCHY BY DEFAULT
594
+
595
+ Do not make important content unreadable simply to create hierarchy.
596
+
597
+ Prefer:
598
+
599
+ ```text
600
+ typography
601
+ spacing
602
+ position
603
+ surface
604
+ ```
605
+
606
+ before excessive opacity.
607
+
608
+ # 38. CORNER RADIUS SYSTEM
609
+
610
+ Define semantic radii:
611
+
612
+ ```text
613
+ radius.xs
614
+ radius.sm
615
+ radius.md
616
+ radius.lg
617
+ radius.xl
618
+ radius.full
619
+ ```
620
+
621
+ The exact values belong to the design system.
622
+
623
+ # 39. RADIUS MEANING
624
+
625
+ Small radius:
626
+
627
+ ```text
628
+ dense controls
629
+ small surfaces
630
+ ```
631
+
632
+ Medium radius:
633
+
634
+ ```text
635
+ cards
636
+ buttons
637
+ fields
638
+ ```
639
+
640
+ Large radius:
641
+
642
+ ```text
643
+ sheets
644
+ large surfaces
645
+ hero elements
646
+ ```
647
+
648
+ Full radius:
649
+
650
+ ```text
651
+ pills
652
+ avatars
653
+ circular controls
654
+ ```
655
+
656
+ Do not assign radius randomly.
657
+
658
+ # 40. RADIUS CONSISTENCY
659
+
660
+ Related components should generally share related curvature.
661
+
662
+ Avoid:
663
+
664
+ ```text
665
+ button = 9
666
+ card = 11
667
+ input = 12
668
+ sheet = 13
669
+ ```
670
+
671
+ simply because each was tuned independently.
672
+
673
+ # 41. PILL COMPONENTS
674
+
675
+ Pill shapes are appropriate for certain semantic roles:
676
+
677
+ ```text
678
+ tags
679
+ filters
680
+ compact statuses
681
+ segmented controls
682
+ ```
683
+
684
+ Do not turn every component into a pill.
685
+
686
+ # 42. ICON TOKENS
687
+
688
+ Define icon sizes semantically:
689
+
690
+ ```text
691
+ icon.xs
692
+ icon.sm
693
+ icon.md
694
+ icon.lg
695
+ icon.xl
696
+ ```
697
+
698
+ rather than screen-specific sizes.
699
+
700
+ # 43. ICON + TEXT ALIGNMENT
701
+
702
+ Icon size should be selected relative to the associated typography.
703
+
704
+ The icon should feel visually balanced with the text.
705
+
706
+ # 44. ICON STROKE
707
+
708
+ When using outline icons, maintain consistent stroke characteristics.
709
+
710
+ Avoid mixing radically different icon families.
711
+
712
+ # 45. ICON FAMILY
713
+
714
+ A project should generally establish:
715
+
716
+ ```text
717
+ primary icon family
718
+ ```
719
+
720
+ and use alternatives only when necessary.
721
+
722
+ # 46. BUTTON TOKENS
723
+
724
+ Define:
725
+
726
+ ```text
727
+ button.height
728
+ button.padding
729
+ button.radius
730
+ button.iconGap
731
+ button.labelStyle
732
+ ```
733
+
734
+ plus state tokens.
735
+
736
+ # 47. BUTTON STATES
737
+
738
+ At minimum consider:
739
+
740
+ ```text
741
+ default
742
+ pressed
743
+ selected
744
+ disabled
745
+ loading
746
+ focused
747
+ ```
748
+
749
+ when applicable.
750
+
751
+ # 48. BUTTON SEMANTIC TYPES
752
+
753
+ Common roles:
754
+
755
+ ```text
756
+ primary
757
+ secondary
758
+ tertiary
759
+ destructive
760
+ plain
761
+ ```
762
+
763
+ Each should have a predictable visual hierarchy.
764
+
765
+ # 49. PRIMARY BUTTON
766
+
767
+ Primary buttons should visually dominate competing actions.
768
+
769
+ Do not create five "primary" buttons on one screen unless the task genuinely
770
+ requires it.
771
+
772
+ # 50. SECONDARY BUTTON
773
+
774
+ Secondary actions should remain visible without competing with the primary
775
+ action.
776
+
777
+ # 51. TERTIARY ACTION
778
+
779
+ Tertiary actions can be quieter.
780
+
781
+ Examples:
782
+
783
+ ```text
784
+ Cancel
785
+ Learn More
786
+ View Details
787
+ ```
788
+
789
+ depending on context.
790
+
791
+ # 52. DESTRUCTIVE BUTTON
792
+
793
+ Destructive actions should be visually recognizable and semantically clear.
794
+
795
+ # 53. BUTTON LOADING
796
+
797
+ Loading state should preserve the button's semantic identity.
798
+
799
+ Example:
800
+
801
+ ```text
802
+ Save
803
+ ↓
804
+ Saving...
805
+ ```
806
+
807
+ or equivalent accessible state.
808
+
809
+ Avoid replacing the entire button with an unrelated spinner.
810
+
811
+ # 54. INPUT TOKENS
812
+
813
+ Define:
814
+
815
+ ```text
816
+ input.height
817
+ input.padding
818
+ input.radius
819
+ input.border
820
+ input.background
821
+ input.text
822
+ input.placeholder
823
+ ```
824
+
825
+ plus state variants.
826
+
827
+ # 55. INPUT STATES
828
+
829
+ Consider:
830
+
831
+ ```text
832
+ default
833
+ focused
834
+ filled
835
+ disabled
836
+ error
837
+ success
838
+ ```
839
+
840
+ where applicable.
841
+
842
+ # 56. FOCUS TOKENS
843
+
844
+ Define focus separately:
845
+
846
+ ```text
847
+ focus.color
848
+ focus.width
849
+ focus.opacity
850
+ focus.offset
851
+ ```
852
+
853
+ The focus state must remain visible across themes.
854
+
855
+ # 57. CARD TOKENS
856
+
857
+ Cards may define:
858
+
859
+ ```text
860
+ card.padding
861
+ card.radius
862
+ card.background
863
+ card.border
864
+ card.shadow
865
+ card.gap
866
+ ```
867
+
868
+ But do not use cards for everything.
869
+
870
+ # 58. ELEVATION
871
+
872
+ Elevation should communicate hierarchy.
873
+
874
+ Conceptually:
875
+
876
+ ```text
877
+ flat
878
+ raised
879
+ floating
880
+ modal
881
+ ```
882
+
883
+ Do not give every surface a shadow.
884
+
885
+ # 59. SHADOW TOKENS
886
+
887
+ Use semantic roles:
888
+
889
+ ```text
890
+ shadow.card
891
+ shadow.floating
892
+ shadow.modal
893
+ ```
894
+
895
+ rather than arbitrary shadow definitions everywhere.
896
+
897
+ # 60. SHADOW RESTRAINT
898
+
899
+ A modern interface often benefits from subtle depth.
900
+
901
+ Avoid:
902
+
903
+ ```text
904
+ large blur
905
+ heavy opacity
906
+ strong offset
907
+ ```
908
+
909
+ on every component.
910
+
911
+ # 61. BLUR TOKENS
912
+
913
+ For systems using material/translucent surfaces:
914
+
915
+ ```text
916
+ blur.subtle
917
+ blur.medium
918
+ blur.strong
919
+ ```
920
+
921
+ can be defined semantically.
922
+
923
+ Use only where appropriate.
924
+
925
+ # 62. MATERIAL TOKENS
926
+
927
+ Material should communicate:
928
+
929
+ ```text
930
+ hierarchy
931
+ context
932
+ layering
933
+ ```
934
+
935
+ not merely decoration.
936
+
937
+ # 63. TRANSPARENCY FALLBACK
938
+
939
+ Every translucent surface should have a valid opaque fallback.
940
+
941
+ This is especially important for accessibility settings.
942
+
943
+ # 64. MOTION TOKENS
944
+
945
+ Motion should be tokenized.
946
+
947
+ Example:
948
+
949
+ ```text
950
+ motion.instant
951
+ motion.fast
952
+ motion.standard
953
+ motion.slow
954
+ ```
955
+
956
+ plus semantic animation curves.
957
+
958
+ # 65. MOTION CURVES
959
+
960
+ Define semantic curves:
961
+
962
+ ```text
963
+ easeIn
964
+ easeOut
965
+ easeInOut
966
+ spring
967
+ ```
968
+
969
+ or framework-equivalent motion models.
970
+
971
+ # 66. MOTION SHOULD HAVE PURPOSE
972
+
973
+ Use motion to communicate:
974
+
975
+ ```text
976
+ navigation
977
+ state
978
+ continuity
979
+ hierarchy
980
+ feedback
981
+ ```
982
+
983
+ Do not animate because a component "needs animation."
984
+
985
+ # 67. REDUCED MOTION TOKENS
986
+
987
+ Define alternative motion behavior.
988
+
989
+ Example:
990
+
991
+ ```text
992
+ motion.standard
993
+ motion.reduced
994
+ ```
995
+
996
+ The reduced version may:
997
+
998
+ ```text
999
+ shorten
1000
+ fade
1001
+ remove
1002
+ simplify
1003
+ ```
1004
+
1005
+ depending on the interaction.
1006
+
1007
+ # 68. Z-INDEX / LAYER TOKENS
1008
+
1009
+ Avoid arbitrary layering values.
1010
+
1011
+ Define semantic layers:
1012
+
1013
+ ```text
1014
+ layer.base
1015
+ layer.content
1016
+ layer.sticky
1017
+ layer.dropdown
1018
+ layer.sheet
1019
+ layer.modal
1020
+ layer.alert
1021
+ ```
1022
+
1023
+ The exact numbers should be implementation details.
1024
+
1025
+ # 69. LAYER HIERARCHY
1026
+
1027
+ Conceptually:
1028
+
1029
+ ```text
1030
+ base
1031
+ ↓
1032
+ content
1033
+ ↓
1034
+ floating
1035
+ ↓
1036
+ popover
1037
+ ↓
1038
+ sheet
1039
+ ↓
1040
+ modal
1041
+ ↓
1042
+ system-critical
1043
+ ```
1044
+
1045
+ Only use the minimum required layer.
1046
+
1047
+ # 70. SAFE AREA TOKENS
1048
+
1049
+ Do not hard-code device-specific safe-area values.
1050
+
1051
+ Use environment-aware inset values.
1052
+
1053
+ # 71. TOUCH TARGET TOKENS
1054
+
1055
+ Define interaction dimensions separately from visual dimensions.
1056
+
1057
+ Example:
1058
+
1059
+ ```text
1060
+ interaction.minTarget
1061
+ ```
1062
+
1063
+ A visual icon may be small while its hit area remains appropriately large.
1064
+
1065
+ # 72. CONTENT WIDTH TOKENS
1066
+
1067
+ Useful semantic values:
1068
+
1069
+ ```text
1070
+ content.readable
1071
+ content.standard
1072
+ content.wide
1073
+ content.full
1074
+ ```
1075
+
1076
+ This prevents large displays from producing unreadably wide text.
1077
+
1078
+ # 73. GRID TOKENS
1079
+
1080
+ Define:
1081
+
1082
+ ```text
1083
+ grid.gap
1084
+ grid.minItemWidth
1085
+ grid.maxItemWidth
1086
+ ```
1087
+
1088
+ rather than fixed column counts.
1089
+
1090
+ # 74. BREAKPOINT TOKENS
1091
+
1092
+ Breakpoints should represent meaningful compositions.
1093
+
1094
+ Example:
1095
+
1096
+ ```text
1097
+ breakpoint.compact
1098
+ breakpoint.regular
1099
+ breakpoint.expanded
1100
+ ```
1101
+
1102
+ Avoid device-specific names.
1103
+
1104
+ # 75. ADAPTIVE TOKENS
1105
+
1106
+ A design system may expose:
1107
+
1108
+ ```text
1109
+ layout.pagePadding
1110
+ layout.contentMaxWidth
1111
+ layout.sidebarWidth
1112
+ layout.sectionGap
1113
+ layout.gridGap
1114
+ ```
1115
+
1116
+ These values can change according to available space.
1117
+
1118
+ # 76. TOKEN COMPOSITION
1119
+
1120
+ Tokens can reference other tokens.
1121
+
1122
+ Example:
1123
+
1124
+ ```text
1125
+ button.radius
1126
+ ↓
1127
+ radius.md
1128
+ ```
1129
+
1130
+ rather than:
1131
+
1132
+ ```text
1133
+ button.radius = 12
1134
+ ```
1135
+
1136
+ everywhere.
1137
+
1138
+ # 77. TOKEN ALIASING
1139
+
1140
+ Semantic aliases allow themes.
1141
+
1142
+ Example:
1143
+
1144
+ ```text
1145
+ color.action.primary
1146
+ ↓
1147
+ color.blue500
1148
+ ```
1149
+
1150
+ in one theme.
1151
+
1152
+ Another theme could map it differently.
1153
+
1154
+ # 78. THEME ARCHITECTURE
1155
+
1156
+ Conceptually:
1157
+
1158
+ ```text
1159
+ Theme
1160
+ │
1161
+ ├── color
1162
+ ├── typography
1163
+ ├── spacing
1164
+ ├── radius
1165
+ ├── elevation
1166
+ ├── motion
1167
+ └── component
1168
+ ```
1169
+
1170
+ The application consumes the theme rather than raw values.
1171
+
1172
+ # 79. MULTI-THEME SUPPORT
1173
+
1174
+ Themes should change semantic mappings rather than requiring separate screen
1175
+ implementations.
1176
+
1177
+ # 80. THEME INVARIANTS
1178
+
1179
+ Even when themes change, preserve:
1180
+
1181
+ ```text
1182
+ hierarchy
1183
+ meaning
1184
+ interaction
1185
+ readability
1186
+ accessibility
1187
+ ```
1188
+
1189
+ A theme is not permission to destroy the UX.
1190
+
1191
+ # 81. DESIGN TOKEN NAMING
1192
+
1193
+ Names should describe meaning.
1194
+
1195
+ Good:
1196
+
1197
+ ```text
1198
+ text.primary
1199
+ surface.elevated
1200
+ action.primary
1201
+ spacing.section
1202
+ ```
1203
+
1204
+ Poor:
1205
+
1206
+ ```text
1207
+ gray7
1208
+ blueThing
1209
+ bigPadding2
1210
+ specialRadius
1211
+ ```
1212
+
1213
+ Semantic names scale better.
1214
+
1215
+ # 82. TOKEN NAMES SHOULD BE PREDICTABLE
1216
+
1217
+ Use consistent structures.
1218
+
1219
+ Example:
1220
+
1221
+ ```text
1222
+ color.text.primary
1223
+ color.text.secondary
1224
+
1225
+ color.surface.primary
1226
+ color.surface.secondary
1227
+
1228
+ color.action.primary
1229
+ color.action.secondary
1230
+ ```
1231
+
1232
+ Avoid mixing naming conventions.
1233
+
1234
+ # 83. TOKEN NAMES SHOULD NOT DESCRIBE IMPLEMENTATION
1235
+
1236
+ Avoid:
1237
+
1238
+ ```text
1239
+ shadow.black20
1240
+ grayBackground
1241
+ blueButton
1242
+ ```
1243
+
1244
+ Prefer:
1245
+
1246
+ ```text
1247
+ shadow.card
1248
+ surface.primary
1249
+ action.primary
1250
+ ```
1251
+
1252
+ .
1253
+
1254
+ # 84. COMPONENT TOKEN INHERITANCE
1255
+
1256
+ Components should inherit from the system.
1257
+
1258
+ Example:
1259
+
1260
+ ```text
1261
+ Button
1262
+ ↓
1263
+ action.primary
1264
+ ↓
1265
+ surface.accent
1266
+ ↓
1267
+ primitive accent color
1268
+ ```
1269
+
1270
+ This creates predictable relationships.
1271
+
1272
+ # 85. OVERRIDES
1273
+
1274
+ Allow local overrides only when the design intentionally requires them.
1275
+
1276
+ An override should have a reason.
1277
+
1278
+ Do not allow every screen to redefine the design system.
1279
+
1280
+ # 86. TOKEN DRIFT
1281
+
1282
+ Token drift occurs when developers gradually introduce:
1283
+
1284
+ ```text
1285
+ new gray
1286
+ new radius
1287
+ new spacing
1288
+ new font size
1289
+ ```
1290
+
1291
+ for small exceptions.
1292
+
1293
+ The agent should identify and consolidate such values.
1294
+
1295
+ # 87. TOKEN AUDIT
1296
+
1297
+ The agent should periodically search for:
1298
+
1299
+ ```text
1300
+ hard-coded colors
1301
+ hard-coded spacing
1302
+ hard-coded radii
1303
+ hard-coded font sizes
1304
+ arbitrary opacity
1305
+ arbitrary shadows
1306
+ arbitrary animation durations
1307
+ ```
1308
+
1309
+ and determine whether they should become tokens.
1310
+
1311
+ # 88. NOT EVERYTHING NEEDS A TOKEN
1312
+
1313
+ Do not create tokens for every conceivable value.
1314
+
1315
+ Tokenize repeated or semantically meaningful values.
1316
+
1317
+ Avoid:
1318
+
1319
+ ```text
1320
+ token-for-one-pixel-decoration
1321
+ ```
1322
+
1323
+ unless it has system-level significance.
1324
+
1325
+ # 89. TOKEN ECONOMY
1326
+
1327
+ A good system has:
1328
+
1329
+ ```text
1330
+ enough tokens
1331
+ ```
1332
+
1333
+ to maintain consistency,
1334
+
1335
+ but not:
1336
+
1337
+ ```text
1338
+ hundreds of meaningless tokens
1339
+ ```
1340
+
1341
+ that make the system harder to understand.
1342
+
1343
+ # 90. DESIGN TOKEN DECISION TREE
1344
+
1345
+ ```text
1346
+ Is this value repeated?
1347
+ │
1348
+ YES
1349
+ ↓
1350
+ Does it have semantic meaning?
1351
+ / \
1352
+ YES NO
1353
+ ↓ ↓
1354
+ semantic primitive
1355
+ token token
1356
+
1357
+ NO
1358
+ ↓
1359
+ Does it represent a
1360
+ meaningful component state?
1361
+ │
1362
+ YES
1363
+ ↓
1364
+ component token
1365
+ ```
1366
+
1367
+ Otherwise a local value may be acceptable.
1368
+
1369
+ # 91. AGENT TOKEN GENERATION
1370
+
1371
+ When generating a new UI, the agent should:
1372
+
1373
+ ```text
1374
+ 1. Inspect existing tokens
1375
+ 2. Reuse existing tokens
1376
+ 3. Check semantic meaning
1377
+ 4. Create a token only if justified
1378
+ 5. Add it to the correct token layer
1379
+ 6. Use the token consistently
1380
+ ```
1381
+
1382
+ Never invent a new value casually.
1383
+
1384
+ # 92. AGENT SCREEN GENERATION
1385
+
1386
+ The agent should reason:
1387
+
1388
+ ```text
1389
+ What component?
1390
+ ↓
1391
+ What semantic role?
1392
+ ↓
1393
+ Which tokens?
1394
+ ↓
1395
+ Which component variant?
1396
+ ↓
1397
+ Which adaptive state?
1398
+ ↓
1399
+ Which accessibility state?
1400
+ ```
1401
+
1402
+ before writing UI code.
1403
+
1404
+ # 93. AGENT DESIGN PRIORITY
1405
+
1406
+ When visual requirements conflict:
1407
+
1408
+ ```text
1409
+ 1. usability
1410
+ 2. accessibility
1411
+ 3. information hierarchy
1412
+ 4. interaction consistency
1413
+ 5. platform conventions
1414
+ 6. visual polish
1415
+ ```
1416
+
1417
+ Visual beauty should not override usability.
1418
+
1419
+ # 94. DESIGN TOKEN PRIORITY
1420
+
1421
+ When deciding between values:
1422
+
1423
+ ```text
1424
+ existing semantic token
1425
+ ↓
1426
+ existing primitive token
1427
+ ↓
1428
+ new semantic token
1429
+ ↓
1430
+ new primitive token
1431
+ ↓
1432
+ local value
1433
+ ```
1434
+
1435
+ Prefer reuse.
1436
+
1437
+ # 95. TOKEN + RESPONSIVENESS
1438
+
1439
+ Tokens should work with adaptive layouts.
1440
+
1441
+ Example:
1442
+
1443
+ ```text
1444
+ compact:
1445
+ layout.pagePadding.compact
1446
+
1447
+ regular:
1448
+ layout.pagePadding.regular
1449
+
1450
+ expanded:
1451
+ layout.pagePadding.expanded
1452
+ ```
1453
+
1454
+ Do not create completely separate design systems for each device class.
1455
+
1456
+ # 96. TOKEN + ACCESSIBILITY
1457
+
1458
+ Tokens should account for accessibility.
1459
+
1460
+ Examples:
1461
+
1462
+ ```text
1463
+ interaction.minTarget
1464
+ focus.visible
1465
+ motion.reduced
1466
+ text.scalable
1467
+ surface.opaqueFallback
1468
+ ```
1469
+
1470
+ Accessibility belongs inside the design system.
1471
+
1472
+ # 97. TOKEN + DARK MODE
1473
+
1474
+ Semantic colors should have theme mappings.
1475
+
1476
+ Never force components to manually determine:
1477
+
1478
+ ```text
1479
+ if dark:
1480
+ use #...
1481
+ else:
1482
+ use #...
1483
+ ```
1484
+
1485
+ Prefer:
1486
+
1487
+ ```text
1488
+ color.surface.primary
1489
+ ```
1490
+
1491
+ with theme-aware resolution.
1492
+
1493
+ # 98. TOKEN + MOTION
1494
+
1495
+ Components should consume semantic motion values.
1496
+
1497
+ Example:
1498
+
1499
+ ```text
1500
+ transition.standard
1501
+ ```
1502
+
1503
+ rather than:
1504
+
1505
+ ```text
1506
+ duration = 237ms
1507
+ ```
1508
+
1509
+ unless there is a deliberate reason.
1510
+
1511
+ # 99. TOKEN + PLATFORM
1512
+
1513
+ The token system should preserve platform character.
1514
+
1515
+ Do not blindly import:
1516
+
1517
+ ```text
1518
+ Material Design tokens
1519
+ ```
1520
+
1521
+ into an Apple-native interface.
1522
+
1523
+ The token architecture may be shared, but platform-specific values and behaviors
1524
+ should remain possible.
1525
+
1526
+ # 100. APPLE-NATIVE PRINCIPLE
1527
+
1528
+ The goal is not to imitate Apple's exact source values.
1529
+
1530
+ The goal is to reproduce the underlying design intelligence:
1531
+
1532
+ ```text
1533
+ hierarchy
1534
+ restraint
1535
+ clarity
1536
+ adaptability
1537
+ semantic meaning
1538
+ system integration
1539
+ ```
1540
+
1541
+ .
1542
+
1543
+ # 101. REACT NATIVE / EXPO IMPLEMENTATION
1544
+
1545
+ A token system can map into:
1546
+
1547
+ ```ts
1548
+ export const tokens = {
1549
+ color: {},
1550
+ spacing: {},
1551
+ typography: {},
1552
+ radius: {},
1553
+ icon: {},
1554
+ motion: {},
1555
+ layout: {},
1556
+ elevation: {},
1557
+ };
1558
+ ```
1559
+
1560
+ The exact implementation depends on the application's architecture.
1561
+
1562
+ # 102. NATIVEWIND / TAILWIND
1563
+
1564
+ If using NativeWind or Tailwind-style systems, tokens should still represent
1565
+ semantic design decisions.
1566
+
1567
+ Do not allow utility classes to become an uncontrolled collection of arbitrary
1568
+ values.
1569
+
1570
+ # 103. STYLE OBJECTS
1571
+
1572
+ Avoid:
1573
+
1574
+ ```tsx
1575
+ style={{
1576
+ padding: 17,
1577
+ borderRadius: 13,
1578
+ color: '#858585',
1579
+ }}
1580
+ ```
1581
+
1582
+ when equivalent design tokens already exist.
1583
+
1584
+ # 104. PREFER SEMANTIC STYLE
1585
+
1586
+ Prefer conceptual usage:
1587
+
1588
+ ```tsx
1589
+ style={[
1590
+ styles.card,
1591
+ tokens.surface.primary,
1592
+ ]}
1593
+ ```
1594
+
1595
+ or the equivalent design-system API.
1596
+
1597
+ # 105. TOKENIZED COMPONENT SYSTEM
1598
+
1599
+ A mature application should look conceptually like:
1600
+
1601
+ ```text
1602
+ Tokens
1603
+ ↓
1604
+ Primitives
1605
+ ↓
1606
+ Components
1607
+ ↓
1608
+ Patterns
1609
+ ↓
1610
+ Screens
1611
+ ↓
1612
+ Flows
1613
+ ```
1614
+
1615
+ not:
1616
+
1617
+ ```text
1618
+ Screens
1619
+ ↓
1620
+ random styles
1621
+ ↓
1622
+ random values
1623
+ ```
1624
+
1625
+ .
1626
+
1627
+ # 106. DESIGN SYSTEM SOURCE OF TRUTH
1628
+
1629
+ There should be one authoritative token definition.
1630
+
1631
+ Possible sources:
1632
+
1633
+ ```text
1634
+ tokens.ts
1635
+ theme.ts
1636
+ design-tokens.json
1637
+ ```
1638
+
1639
+ depending on architecture.
1640
+
1641
+ # 107. TOKEN VERSIONING
1642
+
1643
+ When tokens change significantly, treat the change as a design-system change,
1644
+ not a random style change.
1645
+
1646
+ This helps prevent visual regressions.
1647
+
1648
+ # 108. TOKEN DOCUMENTATION
1649
+
1650
+ Each important semantic token should explain:
1651
+
1652
+ ```text
1653
+ name
1654
+ purpose
1655
+ usage
1656
+ do not use for
1657
+ theme behavior
1658
+ accessibility considerations
1659
+ ```
1660
+
1661
+ .
1662
+
1663
+ # 109. TOKEN VALIDATION
1664
+
1665
+ The agent should detect:
1666
+
1667
+ ```text
1668
+ missing token
1669
+ invalid token
1670
+ duplicate token
1671
+ unused token
1672
+ hard-coded replacement
1673
+ semantic mismatch
1674
+ ```
1675
+
1676
+ during design-system audits.
1677
+
1678
+ # 110. DESIGN TOKEN LINTING
1679
+
1680
+ A future design agent can enforce rules such as:
1681
+
1682
+ ```text
1683
+ No raw colors in screens
1684
+ No arbitrary spacing values
1685
+ No arbitrary radii
1686
+ No arbitrary typography
1687
+ No device-specific breakpoints
1688
+ No component-specific colors without justification
1689
+ ```
1690
+
1691
+ .
1692
+
1693
+ # 111. DESIGN TOKEN REFACTORING
1694
+
1695
+ If the agent encounters:
1696
+
1697
+ ```text
1698
+ #8A8A8A
1699
+ ```
1700
+
1701
+ in multiple places, it should ask:
1702
+
1703
+ > "Does this represent a semantic role?"
1704
+
1705
+ If yes:
1706
+
1707
+ ```text
1708
+ color.text.secondary
1709
+ ```
1710
+
1711
+ may be appropriate.
1712
+
1713
+ # 112. TOKEN COLLISION
1714
+
1715
+ If two tokens represent effectively the same meaning:
1716
+
1717
+ ```text
1718
+ text.secondary
1719
+ text.muted
1720
+ ```
1721
+
1722
+ the agent should determine whether both are genuinely needed.
1723
+
1724
+ Avoid unnecessary semantic duplication.
1725
+
1726
+ # 113. TOKEN CONSOLIDATION
1727
+
1728
+ Periodically identify:
1729
+
1730
+ ```text
1731
+ near-identical colors
1732
+ near-identical spacing
1733
+ near-identical radii
1734
+ near-identical typography
1735
+ ```
1736
+
1737
+ and determine whether they should converge.
1738
+
1739
+ # 114. VISUAL CONSISTENCY
1740
+
1741
+ The ultimate purpose of tokens is not code cleanliness.
1742
+
1743
+ It is visual and behavioral consistency.
1744
+
1745
+ Users should feel:
1746
+
1747
+ ```text
1748
+ "This application has one design language."
1749
+ ```
1750
+
1751
+ .
1752
+
1753
+ # 115. DESIGN SYSTEM PERSONALITY
1754
+
1755
+ Tokens can express product personality.
1756
+
1757
+ Examples:
1758
+
1759
+ ```text
1760
+ minimal
1761
+ technical
1762
+ playful
1763
+ luxurious
1764
+ futuristic
1765
+ editorial
1766
+ ```
1767
+
1768
+ But personality should modify the system rather than destroy its hierarchy.
1769
+
1770
+ # 116. PERSONALITY WITHOUT CHAOS
1771
+
1772
+ A futuristic UI can still have:
1773
+
1774
+ ```text
1775
+ clear hierarchy
1776
+ consistent spacing
1777
+ predictable interaction
1778
+ accessible controls
1779
+ ```
1780
+
1781
+ Do not confuse visual novelty with good design.
1782
+
1783
+ # 117. TOKEN-DRIVEN THEMING
1784
+
1785
+ A theme can change:
1786
+
1787
+ ```text
1788
+ color
1789
+ surface
1790
+ radius
1791
+ motion
1792
+ density
1793
+ ```
1794
+
1795
+ while preserving:
1796
+
1797
+ ```text
1798
+ information architecture
1799
+ interaction semantics
1800
+ component behavior
1801
+ ```
1802
+
1803
+ .
1804
+
1805
+ # 118. DESIGN TOKEN QUALITY TEST
1806
+
1807
+ Ask:
1808
+
1809
+ ```text
1810
+ Can a new screen use the system
1811
+ without inventing new values?
1812
+
1813
+ Can dark mode be changed centrally?
1814
+
1815
+ Can accessibility settings be handled
1816
+ without rewriting every component?
1817
+
1818
+ Can the same components work on
1819
+ compact and expanded layouts?
1820
+
1821
+ Can the visual identity evolve
1822
+ without rewriting the app?
1823
+ ```
1824
+
1825
+ If yes, the token system is doing its job.
1826
+
1827
+ # 119. AGENT FINAL TOKEN WORKFLOW
1828
+
1829
+ ```text
1830
+ REQUEST
1831
+ ↓
1832
+ UNDERSTAND USER TASK
1833
+ ↓
1834
+ IDENTIFY UI COMPONENTS
1835
+ ↓
1836
+ IDENTIFY SEMANTIC ROLES
1837
+ ↓
1838
+ SELECT EXISTING TOKENS
1839
+ ↓
1840
+ SELECT COMPONENT VARIANTS
1841
+ ↓
1842
+ APPLY ADAPTIVE RULES
1843
+ ↓
1844
+ APPLY ACCESSIBILITY RULES
1845
+ ↓
1846
+ GENERATE UI
1847
+ ↓
1848
+ AUDIT FOR RAW VALUES
1849
+ ↓
1850
+ AUDIT FOR CONSISTENCY
1851
+ ↓
1852
+ FINALIZE
1853
+ ```
1854
+
1855
+ # 120. FINAL RULE
1856
+
1857
+ The agent should never ask:
1858
+
1859
+ > "What color should I use here?"
1860
+
1861
+ It should ask:
1862
+
1863
+ > "What semantic role does this element have?"
1864
+
1865
+ Then:
1866
+
1867
+ ```text
1868
+ semantic role
1869
+ ↓
1870
+ semantic token
1871
+ ↓
1872
+ theme mapping
1873
+ ↓
1874
+ platform-appropriate value
1875
+ ```
1876
+
1877
+ That is the difference between styling and a design system.
1878
+
1879
+ # 121. MASTER TOKEN MODEL
1880
+
1881
+ ```text
1882
+ DESIGN SYSTEM
1883
+ │
1884
+ ┌──────────────┼──────────────┐
1885
+ ↓ ↓ ↓
1886
+ PRIMITIVES SEMANTICS COMPONENTS
1887
+ │ │ │
1888
+ ↓ ↓ ↓
1889
+ raw values meaning behavior
1890
+ │ │ │
1891
+ └──────────────┼──────────────┘
1892
+ ↓
1893
+ PATTERNS
1894
+ ↓
1895
+ SCREENS
1896
+ ↓
1897
+ FLOWS
1898
+ ```
1899
+
1900
+ # 122. QUALITY BAR
1901
+
1902
+ A mature token system should produce interfaces that feel:
1903
+
1904
+ ```text
1905
+ consistent
1906
+ intentional
1907
+ native
1908
+ adaptive
1909
+ accessible
1910
+ scalable
1911
+ maintainable
1912
+ ```
1913
+
1914
+ without making every screen visually identical.
1915
+
1916
+ # 123. FINAL AGENT DIRECTIVE
1917
+
1918
+ Before creating a new visual value, the agent must determine:
1919
+
1920
+ ```text
1921
+ Does an existing token already represent this?
1922
+ ↓
1923
+ YES → reuse it.
1924
+
1925
+ NO
1926
+ ↓
1927
+ Does this value represent a reusable semantic concept?
1928
+ ↓
1929
+ YES → create a semantic token.
1930
+
1931
+ NO
1932
+ ↓
1933
+ Is it genuinely local?
1934
+ ↓
1935
+ YES → local value may be acceptable.
1936
+ ```
1937
+
1938
+ Consistency should be the default.
1939
+
1940
+ Exceptions should be intentional.
1941
+
1942
+ ````
1943
+