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,1140 @@
1
+ # File 74 — Advanced Interaction Patterns, Gestures, Feedback & State Transitions
2
+
3
+ File 73 established the **visual language and design-system layer**.
4
+
5
+ File 74 completes the main 55–74 system by defining how the interface **behaves during interaction**—including gestures, transitions, feedback, interruptions, state changes, and complex interaction patterns.
6
+
7
+ > **A polished interface isn't just visually consistent. It responds predictably to every meaningful user action.**
8
+
9
+ ---
10
+
11
+ # 1. Interaction architecture
12
+
13
+ The agent should model every important interaction as:
14
+
15
+ ```text
16
+ USER INTENT
17
+ ↓
18
+ TRIGGER
19
+ ↓
20
+ SYSTEM RESPONSE
21
+ ↓
22
+ STATE CHANGE
23
+ ↓
24
+ FEEDBACK
25
+ ↓
26
+ NEXT AVAILABLE ACTION
27
+ ```
28
+
29
+ For complex interactions:
30
+
31
+ ```text
32
+ INPUT
33
+ ↓
34
+ INTERPRETATION
35
+ ↓
36
+ VALIDATION
37
+ ↓
38
+ ACTION
39
+ ↓
40
+ ASYNC PROCESSING
41
+ ↓
42
+ RESULT
43
+ ↓
44
+ RECOVERY
45
+ ```
46
+
47
+ ---
48
+
49
+ # 2. Interaction states
50
+
51
+ Every interactive component should have an appropriate state model.
52
+
53
+ ```text
54
+ Idle
55
+ ↓
56
+ Hovered / Focused
57
+ ↓
58
+ Pressed
59
+ ↓
60
+ Processing
61
+ ↓
62
+ Success / Failure
63
+ ```
64
+
65
+ Depending on the component:
66
+
67
+ ```text
68
+ Selected
69
+ Disabled
70
+ Loading
71
+ Dragging
72
+ Expanded
73
+ Collapsed
74
+ Editing
75
+ Saving
76
+ Syncing
77
+ Offline
78
+ ```
79
+
80
+ The agent should never assume that `default + pressed` is enough.
81
+
82
+ ---
83
+
84
+ # 3. State transitions
85
+
86
+ Transitions should communicate **what changed**.
87
+
88
+ Example:
89
+
90
+ ```text
91
+ Play
92
+ ↓
93
+ Playing
94
+ ```
95
+
96
+ should visually communicate continuity rather than making the interface appear to reload.
97
+
98
+ The agent should preserve:
99
+
100
+ * context
101
+ * spatial relationships
102
+ * user focus
103
+ * important content
104
+ * relevant state
105
+
106
+ ---
107
+
108
+ # 4. State machines
109
+
110
+ For complicated components, explicitly model states.
111
+
112
+ Example:
113
+
114
+ ```text
115
+ IDLE
116
+ │
117
+ ├── tap → LOADING
118
+ │
119
+ └── disabled → DISABLED
120
+
121
+ LOADING
122
+ │
123
+ ├── success → ACTIVE
124
+ │
125
+ └── failure → ERROR
126
+
127
+ ERROR
128
+ │
129
+ └── retry → LOADING
130
+ ```
131
+
132
+ This prevents contradictory UI states.
133
+
134
+ ---
135
+
136
+ # 5. Interaction priority
137
+
138
+ When several interactions are possible, establish:
139
+
140
+ ```text
141
+ Primary
142
+ Secondary
143
+ Contextual
144
+ Advanced
145
+ Destructive
146
+ ```
147
+
148
+ The user should not need to understand every available capability before completing a simple task.
149
+
150
+ ---
151
+
152
+ # 6. Direct manipulation
153
+
154
+ When appropriate, allow users to manipulate objects directly:
155
+
156
+ ```text
157
+ Drag
158
+ Drop
159
+ Resize
160
+ Reorder
161
+ Swipe
162
+ Pinch
163
+ Rotate
164
+ Long press
165
+ Select
166
+ Expand
167
+ Collapse
168
+ ```
169
+
170
+ Direct manipulation should provide clear feedback throughout the interaction.
171
+
172
+ ---
173
+
174
+ # 7. Drag-and-drop
175
+
176
+ A robust drag interaction has:
177
+
178
+ ```text
179
+ Idle
180
+ ↓
181
+ Press
182
+ ↓
183
+ Drag begins
184
+ ↓
185
+ Dragging
186
+ ↓
187
+ Valid target
188
+ ↓
189
+ Drop
190
+ ↓
191
+ Result
192
+ ```
193
+
194
+ Also handle:
195
+
196
+ ```text
197
+ Invalid target
198
+ Cancellation
199
+ Interrupted gesture
200
+ Boundary
201
+ Scroll while dragging
202
+ ```
203
+
204
+ ---
205
+
206
+ # 8. Gesture design
207
+
208
+ Gestures should have:
209
+
210
+ ```text
211
+ Discoverability
212
+ Consistency
213
+ Recoverability
214
+ Feedback
215
+ Alternative interaction
216
+ ```
217
+
218
+ Avoid hiding essential functionality behind gestures users cannot reasonably discover.
219
+
220
+ ---
221
+
222
+ # 9. Swipe interactions
223
+
224
+ Common patterns:
225
+
226
+ ```text
227
+ Swipe → reveal actions
228
+ Swipe → dismiss
229
+ Swipe → navigate
230
+ Swipe → reorder
231
+ ```
232
+
233
+ The agent should distinguish between them.
234
+
235
+ Destructive swipe actions should communicate consequence clearly.
236
+
237
+ ---
238
+
239
+ # 10. Long press
240
+
241
+ Long press is useful for:
242
+
243
+ ```text
244
+ Context menu
245
+ Selection mode
246
+ Reordering
247
+ Additional actions
248
+ Preview
249
+ ```
250
+
251
+ But avoid making primary actions accessible only through long press.
252
+
253
+ ---
254
+
255
+ # 11. Pinch and zoom
256
+
257
+ For content such as:
258
+
259
+ ```text
260
+ Images
261
+ Maps
262
+ Documents
263
+ Charts
264
+ Canvas
265
+ ```
266
+
267
+ the agent should support:
268
+
269
+ ```text
270
+ Zoom in
271
+ Zoom out
272
+ Reset
273
+ Pan
274
+ Boundary handling
275
+ ```
276
+
277
+ Zoom should not make the user lose context.
278
+
279
+ ---
280
+
281
+ # 12. Scroll behavior
282
+
283
+ Scrolling can communicate hierarchy.
284
+
285
+ Consider:
286
+
287
+ ```text
288
+ Vertical scroll
289
+ Horizontal scroll
290
+ Nested scroll
291
+ Sticky headers
292
+ Pull-to-refresh
293
+ Infinite loading
294
+ Scroll-to-top
295
+ ```
296
+
297
+ Avoid nested scrolling unless the interaction is genuinely necessary.
298
+
299
+ ---
300
+
301
+ # 13. Scroll position preservation
302
+
303
+ When navigating away and returning:
304
+
305
+ ```text
306
+ List
307
+ ↓
308
+ Detail
309
+ ↓
310
+ Back
311
+ ```
312
+
313
+ the agent should consider restoring:
314
+
315
+ ```text
316
+ Scroll position
317
+ Filters
318
+ Sort
319
+ Selection
320
+ Expanded sections
321
+ ```
322
+
323
+ Unexpected resets increase cognitive friction.
324
+
325
+ ---
326
+
327
+ # 14. Pull-to-refresh
328
+
329
+ Use when:
330
+
331
+ ```text
332
+ Refreshing current content
333
+ ```
334
+
335
+ The agent should communicate:
336
+
337
+ ```text
338
+ Pull threshold
339
+ Refresh state
340
+ Completion
341
+ Failure
342
+ ```
343
+
344
+ Avoid using pull-to-refresh for actions unrelated to refreshing.
345
+
346
+ ---
347
+
348
+ # 15. Feedback channels
349
+
350
+ Interaction feedback can use:
351
+
352
+ ```text
353
+ Visual
354
+ Text
355
+ Motion
356
+ Haptic
357
+ Audio
358
+ ```
359
+
360
+ The agent should select the smallest effective combination.
361
+
362
+ Not every action requires all five.
363
+
364
+ ---
365
+
366
+ # 16. Immediate feedback
367
+
368
+ Every meaningful action should receive timely acknowledgement.
369
+
370
+ Example:
371
+
372
+ ```text
373
+ Tap
374
+ ↓
375
+ Button state changes
376
+ ↓
377
+ Processing indicator
378
+ ↓
379
+ Result
380
+ ```
381
+
382
+ Avoid:
383
+
384
+ ```text
385
+ Tap
386
+ ↓
387
+ Nothing
388
+ ↓
389
+ Long delay
390
+ ```
391
+
392
+ ---
393
+
394
+ # 17. Haptic feedback
395
+
396
+ Use haptics for meaningful moments:
397
+
398
+ ```text
399
+ Selection
400
+ Confirmation
401
+ Success
402
+ Warning
403
+ Boundary
404
+ Drag activation
405
+ ```
406
+
407
+ Avoid continuous or unnecessary vibration.
408
+
409
+ ---
410
+
411
+ # 18. Audio feedback
412
+
413
+ Where appropriate:
414
+
415
+ ```text
416
+ Media controls
417
+ Games
418
+ Voice interfaces
419
+ Accessibility scenarios
420
+ System-like interactions
421
+ ```
422
+
423
+ Audio should complement—not replace—visual feedback when information is important.
424
+
425
+ ---
426
+
427
+ # 19. Transitions
428
+
429
+ A transition should answer:
430
+
431
+ > **Where did this thing come from, and where did it go?**
432
+
433
+ Useful transitions preserve spatial continuity.
434
+
435
+ Examples:
436
+
437
+ ```text
438
+ List item
439
+ ↓
440
+ Detail screen
441
+
442
+ Panel
443
+ ↓
444
+ Expanded panel
445
+
446
+ Modal
447
+ ↓
448
+ Dismissed modal
449
+ ```
450
+
451
+ ---
452
+
453
+ # 20. Transition timing
454
+
455
+ Timing should reflect interaction importance.
456
+
457
+ ```text
458
+ Small state change
459
+ → short transition
460
+
461
+ Major navigation
462
+ → more noticeable transition
463
+
464
+ Complex processing
465
+ → progress feedback
466
+ ```
467
+
468
+ Avoid slow transitions that make the application feel sluggish.
469
+
470
+ ---
471
+
472
+ # 21. Interruptible transitions
473
+
474
+ Users should not be trapped by animation.
475
+
476
+ Where appropriate:
477
+
478
+ ```text
479
+ Tap again
480
+ Swipe away
481
+ Navigate back
482
+ Cancel
483
+ Reverse
484
+ ```
485
+
486
+ should interrupt or supersede the transition.
487
+
488
+ ---
489
+
490
+ # 22. Optimistic interactions
491
+
492
+ For safe operations:
493
+
494
+ ```text
495
+ User action
496
+ ↓
497
+ Immediate visual change
498
+ ↓
499
+ Background operation
500
+ ↓
501
+ Success
502
+ ```
503
+
504
+ Failure should provide:
505
+
506
+ ```text
507
+ Rollback
508
+ Explanation
509
+ Retry
510
+ ```
511
+
512
+ ---
513
+
514
+ # 23. Undo architecture
515
+
516
+ Undo is particularly useful for:
517
+
518
+ ```text
519
+ Delete
520
+ Archive
521
+ Remove
522
+ Move
523
+ Reorder
524
+ Bulk actions
525
+ ```
526
+
527
+ A useful model:
528
+
529
+ ```text
530
+ ACTION
531
+ ↓
532
+ RESULT
533
+ ↓
534
+ UNDO WINDOW
535
+ ↓
536
+ COMMIT
537
+ ```
538
+
539
+ The agent should avoid using undo when the operation cannot safely be reversed.
540
+
541
+ ---
542
+
543
+ # 24. Confirmation dialogs
544
+
545
+ Use confirmation when:
546
+
547
+ ```text
548
+ Consequences are serious
549
+ Action is difficult to reverse
550
+ User may reasonably make a costly mistake
551
+ ```
552
+
553
+ Don't use confirmation dialogs for every minor action.
554
+
555
+ Excessive confirmation creates dialog fatigue.
556
+
557
+ ---
558
+
559
+ # 25. Modal interaction
560
+
561
+ Modals should:
562
+
563
+ ```text
564
+ Focus attention
565
+ Preserve context
566
+ Provide clear exit
567
+ Handle Escape/back appropriately
568
+ Return focus appropriately
569
+ ```
570
+
571
+ Don't use a modal simply because a different interaction pattern wasn't considered.
572
+
573
+ ---
574
+
575
+ # 26. Bottom sheets
576
+
577
+ Useful for:
578
+
579
+ ```text
580
+ Contextual actions
581
+ Filters
582
+ Selections
583
+ Secondary information
584
+ Mobile menus
585
+ ```
586
+
587
+ The agent should determine whether the sheet is:
588
+
589
+ ```text
590
+ Dismissible
591
+ Persistent
592
+ Scrollable
593
+ Blocking
594
+ Non-blocking
595
+ ```
596
+
597
+ ---
598
+
599
+ # 27. Menus
600
+
601
+ Menus should group actions logically.
602
+
603
+ Example:
604
+
605
+ ```text
606
+ Open
607
+ Edit
608
+ Duplicate
609
+ Move
610
+ ────────
611
+ Share
612
+ Export
613
+ ────────
614
+ Delete
615
+ ```
616
+
617
+ Destructive operations should be visually and structurally separated when appropriate.
618
+
619
+ ---
620
+
621
+ # 28. Context menus
622
+
623
+ Use context menus for:
624
+
625
+ ```text
626
+ Secondary actions
627
+ Advanced operations
628
+ Object-specific commands
629
+ ```
630
+
631
+ They should not become a dumping ground for primary functionality.
632
+
633
+ ---
634
+
635
+ # 29. Selection mode
636
+
637
+ For lists and grids:
638
+
639
+ ```text
640
+ Normal mode
641
+ ↓
642
+ Select item
643
+ ↓
644
+ Selection mode
645
+ ↓
646
+ Bulk actions
647
+ ↓
648
+ Exit selection mode
649
+ ```
650
+
651
+ The interface should clearly communicate that the interaction model has changed.
652
+
653
+ ---
654
+
655
+ # 30. Multi-selection
656
+
657
+ Support:
658
+
659
+ ```text
660
+ One
661
+ Several
662
+ All
663
+ Partial
664
+ None
665
+ ```
666
+
667
+ and communicate exactly what will be affected.
668
+
669
+ For example:
670
+
671
+ > 24 files selected
672
+
673
+ is more useful than merely changing the toolbar.
674
+
675
+ ---
676
+
677
+ # 31. Expand / collapse
678
+
679
+ Use expansion when users benefit from:
680
+
681
+ ```text
682
+ Progressive disclosure
683
+ Details
684
+ Advanced settings
685
+ Nested information
686
+ ```
687
+
688
+ The expanded state should be persistent where appropriate.
689
+
690
+ ---
691
+
692
+ # 32. Disclosure patterns
693
+
694
+ Examples:
695
+
696
+ ```text
697
+ Accordion
698
+ Details panel
699
+ Expandable card
700
+ Inline expansion
701
+ Popover
702
+ Bottom sheet
703
+ ```
704
+
705
+ Choose according to content importance and frequency.
706
+
707
+ ---
708
+
709
+ # 33. Hover interactions
710
+
711
+ Hover can provide:
712
+
713
+ ```text
714
+ Preview
715
+ Additional metadata
716
+ Tooltips
717
+ Secondary actions
718
+ Highlighting
719
+ ```
720
+
721
+ But essential functionality should not depend exclusively on hover.
722
+
723
+ ---
724
+
725
+ # 34. Focus interactions
726
+
727
+ Focus should visibly communicate:
728
+
729
+ ```text
730
+ Where the user is
731
+ What can receive input
732
+ What will activate
733
+ ```
734
+
735
+ This is especially important for keyboard and assistive technology users.
736
+
737
+ ---
738
+
739
+ # 35. Disabled vs unavailable
740
+
741
+ The agent should distinguish:
742
+
743
+ ```text
744
+ Disabled
745
+ → action exists but cannot currently be used
746
+
747
+ Unavailable
748
+ → action may not apply in this context
749
+ ```
750
+
751
+ When useful, explain why an important action is unavailable.
752
+
753
+ ---
754
+
755
+ # 36. Processing states
756
+
757
+ Long-running interactions should communicate:
758
+
759
+ ```text
760
+ Started
761
+ Processing
762
+ Progress
763
+ Completion
764
+ Failure
765
+ Cancellation
766
+ ```
767
+
768
+ For example:
769
+
770
+ ```text
771
+ Uploading
772
+ 42%
773
+ [Cancel]
774
+ ```
775
+
776
+ is much more useful than a permanently spinning icon.
777
+
778
+ ---
779
+
780
+ # 37. Cancellation
781
+
782
+ Long-running operations should support cancellation when technically safe.
783
+
784
+ Examples:
785
+
786
+ ```text
787
+ Upload
788
+ Download
789
+ Export
790
+ Search
791
+ Generation
792
+ Processing
793
+ Synchronization
794
+ ```
795
+
796
+ Cancellation should produce a clean state rather than leaving partially active UI.
797
+
798
+ ---
799
+
800
+ # 38. Retry architecture
801
+
802
+ Retries should distinguish:
803
+
804
+ ```text
805
+ Temporary failure
806
+ Permanent failure
807
+ User error
808
+ Network failure
809
+ Authentication failure
810
+ ```
811
+
812
+ Automatic retries should have limits.
813
+
814
+ Never create an infinite retry loop.
815
+
816
+ ---
817
+
818
+ # 39. Offline interaction
819
+
820
+ When offline:
821
+
822
+ ```text
823
+ Action
824
+ ↓
825
+ Can it work locally?
826
+ ↓
827
+ If yes → execute
828
+ If no → explain
829
+ ```
830
+
831
+ Possible strategies:
832
+
833
+ ```text
834
+ Queue action
835
+ Save draft
836
+ Use cached data
837
+ Retry later
838
+ ```
839
+
840
+ ---
841
+
842
+ # 40. Interaction interruption
843
+
844
+ The user may:
845
+
846
+ ```text
847
+ Navigate away
848
+ Close the app
849
+ Receive a call
850
+ Lose network
851
+ Rotate device
852
+ Lock screen
853
+ Switch apps
854
+ ```
855
+
856
+ The agent should define what happens to active operations and state.
857
+
858
+ ---
859
+
860
+ # 41. Concurrent interactions
861
+
862
+ Avoid conflicting operations.
863
+
864
+ Example:
865
+
866
+ ```text
867
+ User taps Play
868
+ ↓
869
+ Play begins
870
+
871
+ User taps Play again
872
+ ↓
873
+ Do not create another playback instance
874
+ ```
875
+
876
+ Similarly:
877
+
878
+ ```text
879
+ Save
880
+ Save
881
+ Save
882
+ ```
883
+
884
+ should not create uncontrolled duplicate operations.
885
+
886
+ ---
887
+
888
+ # 42. Race conditions
889
+
890
+ For asynchronous interactions:
891
+
892
+ ```text
893
+ Request A
894
+ Request B
895
+ ```
896
+
897
+ If B finishes first, the system must not blindly allow A to overwrite the newer state.
898
+
899
+ The agent should account for:
900
+
901
+ ```text
902
+ Request identity
903
+ Cancellation
904
+ Latest-state-wins
905
+ Versioning
906
+ Stale responses
907
+ ```
908
+
909
+ ---
910
+
911
+ # 43. Interaction consistency
912
+
913
+ Equivalent interactions should behave similarly.
914
+
915
+ If:
916
+
917
+ ```text
918
+ Swipe left → delete
919
+ ```
920
+
921
+ in one part of the application, don't unexpectedly make it mean "archive" elsewhere unless context makes the difference obvious.
922
+
923
+ ---
924
+
925
+ # 44. Microinteraction quality
926
+
927
+ Every microinteraction should justify itself.
928
+
929
+ Ask:
930
+
931
+ ```text id="k7m4p8"
932
+ What does it communicate?
933
+ Does it reduce uncertainty?
934
+ Does it improve orientation?
935
+ Does it reinforce cause and effect?
936
+ Does it introduce unnecessary delay?
937
+ ```
938
+
939
+ If it communicates nothing, remove it.
940
+
941
+ ---
942
+
943
+ # 45. Interaction anti-patterns
944
+
945
+ Detect:
946
+
947
+ ```text
948
+ Hidden essential gestures
949
+ Gesture-only actions
950
+ Unresponsive controls
951
+ Long blocking animations
952
+ Excessive confirmations
953
+ Mystery state changes
954
+ No loading feedback
955
+ No cancellation
956
+ No retry
957
+ Duplicate actions
958
+ Race conditions
959
+ Inconsistent gestures
960
+ Hover-only functionality
961
+ Unclear selection mode
962
+ ```
963
+
964
+ ---
965
+
966
+ # 46. Interaction testing matrix
967
+
968
+ Test:
969
+
970
+ ```text
971
+ Normal interaction
972
+ Rapid interaction
973
+ Repeated interaction
974
+ Interrupted interaction
975
+ Slow network
976
+ Offline
977
+ Failure
978
+ Recovery
979
+ Back navigation
980
+ Orientation change
981
+ Accessibility input
982
+ ```
983
+
984
+ A feature isn't complete simply because the happy path works.
985
+
986
+ ---
987
+
988
+ # 47. Interaction quality checklist
989
+
990
+ ```text
991
+ □ Every important action has feedback
992
+ □ States are explicit
993
+ □ Transitions preserve context
994
+ □ Gestures are discoverable
995
+ □ Primary actions aren't gesture-only
996
+ □ Loading is communicated
997
+ □ Long operations can recover
998
+ □ Cancellation exists where appropriate
999
+ □ Retry behavior is safe
1000
+ □ Undo is used where valuable
1001
+ □ Confirmation is reserved for consequential actions
1002
+ □ Async races are controlled
1003
+ □ Duplicate operations are prevented
1004
+ □ Offline behavior is considered
1005
+ □ Interrupted interactions recover
1006
+ □ Accessibility input remains supported
1007
+ ```
1008
+
1009
+ ---
1010
+
1011
+ # 48. Advanced interaction workflow
1012
+
1013
+ ```text
1014
+ DEFINE USER INTENT
1015
+ ↓
1016
+ DEFINE TRIGGER
1017
+ ↓
1018
+ DEFINE STATES
1019
+ ↓
1020
+ DEFINE TRANSITIONS
1021
+ ↓
1022
+ DEFINE FEEDBACK
1023
+ ↓
1024
+ DEFINE FAILURE
1025
+ ↓
1026
+ DEFINE RECOVERY
1027
+ ↓
1028
+ DEFINE INTERRUPTION
1029
+ ↓
1030
+ IMPLEMENT
1031
+ ↓
1032
+ TEST RAPID + SLOW INPUT
1033
+ ↓
1034
+ TEST FAILURE + OFFLINE
1035
+ ↓
1036
+ VALIDATE ACCESSIBILITY
1037
+ ```
1038
+
1039
+ ---
1040
+
1041
+ # 49. Master interaction model
1042
+
1043
+ The agent should internally model complex interactions as:
1044
+
1045
+ ```text
1046
+ ┌──────────────┐
1047
+ │ USER INTENT │
1048
+ └──────┬───────┘
1049
+ ↓
1050
+ ┌──────────────┐
1051
+ │ TRIGGER │
1052
+ └──────┬───────┘
1053
+ ↓
1054
+ ┌──────────────┐
1055
+ │ VALIDATION │
1056
+ └──────┬───────┘
1057
+ ↓
1058
+ ┌──────────────┐
1059
+ │ STATE CHANGE │
1060
+ └──────┬───────┘
1061
+ ↓
1062
+ ┌──────────────┐
1063
+ │ FEEDBACK │
1064
+ └──────┬───────┘
1065
+ ↓
1066
+ ┌────────┴────────┐
1067
+ ↓ ↓
1068
+ SUCCESS FAILURE
1069
+ ↓ ↓
1070
+ RESULT RECOVERY
1071
+ ↓ ↓
1072
+ └────────┬────────┘
1073
+ ↓
1074
+ NEXT AVAILABLE
1075
+ ACTION
1076
+ ```
1077
+
1078
+ This model should guide implementation of complex interaction flows.
1079
+
1080
+ ---
1081
+
1082
+ ## File 74 operating principle
1083
+
1084
+ > **Every meaningful interaction must have a predictable cause, visible response, coherent state transition, and recoverable outcome.**
1085
+
1086
+ The agent should never stop at:
1087
+
1088
+ ```text
1089
+ "Does the button work?"
1090
+ ```
1091
+
1092
+ It should ask:
1093
+
1094
+ ```text
1095
+ What happens when it is tapped?
1096
+ What happens while it works?
1097
+ What happens if it fails?
1098
+ What happens if the user taps twice?
1099
+ What happens if the user leaves?
1100
+ What happens offline?
1101
+ What happens if the response arrives late?
1102
+ What happens after success?
1103
+ Can the user undo it?
1104
+ Can every supported input method operate it?
1105
+ ```
1106
+
1107
+ That is the difference between **functional UI** and **robust interaction design**.
1108
+
1109
+ ---
1110
+
1111
+ # 55–74 COMPLETE
1112
+
1113
+ We now have the full consolidated architecture:
1114
+
1115
+ | File | Domain |
1116
+ | -----: | --------------------------------------------------- |
1117
+ | **55** | Diagnosis & UI problem analysis |
1118
+ | **56** | Design-system/systemization |
1119
+ | **57** | User-flow architecture |
1120
+ | **58** | Interaction & state engineering |
1121
+ | **59** | Responsive/accessibility/performance foundations |
1122
+ | **60** | Implementation & refactoring |
1123
+ | **61** | QA & validation |
1124
+ | **62** | Autonomous improvement |
1125
+ | **63** | Project lifecycle |
1126
+ | **64** | Decision-making & trade-offs |
1127
+ | **65** | UI patterns & composition |
1128
+ | **66** | Content, microcopy & microinteractions |
1129
+ | **67** | Navigation, IA & wayfinding |
1130
+ | **68** | Forms, input & validation |
1131
+ | **69** | Data-heavy interfaces |
1132
+ | **70** | Responsive/adaptive/cross-platform UI |
1133
+ | **71** | Accessibility & human factors |
1134
+ | **72** | Performance & rendering intelligence |
1135
+ | **73** | Visual design systems, theming & tokens |
1136
+ | **74** | Advanced interactions, gestures & state transitions |
1137
+
1138
+ ### And then **75 stays completely separate**, as planned.
1139
+
1140
+ That gives us a clean **20-file consolidated block (55–74)** instead of creating dozens of overlapping files. The architecture is now much tighter and much easier for an agent to actually consume without repeatedly loading nearly identical instructions.