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,1392 @@
1
+
2
+ # Navigation Architecture, Routing, Deep Linking & State Restoration
3
+
4
+ > Advanced agent module for navigation architecture, routing, stacks, tabs,
5
+ > modals, sheets, deep links, universal links, navigation state, restoration,
6
+ > history, back behavior, and cross-surface navigation across iOS, iPadOS,
7
+ > React Native, and Expo.
8
+
9
+ Version: 1.0
10
+ Platform: iOS / iPadOS / React Native / Expo
11
+ Layer: Advanced navigation intelligence
12
+
13
+ ---
14
+
15
+ # 1. PURPOSE
16
+
17
+ Navigation is the structural system connecting every part of the application.
18
+
19
+ A strong navigation system defines:
20
+
21
+ ```text id="n54a01"
22
+ Where the user is
23
+ Where the user can go
24
+ How they got there
25
+ How they return
26
+ What state is preserved
27
+ How external links enter the app
28
+ ```
29
+
30
+ ---
31
+
32
+ # 2. CORE PRINCIPLE
33
+
34
+ Navigation should answer immediately:
35
+
36
+ ```text id="n54a02"
37
+ Where am I?
38
+
39
+ What can I do here?
40
+
41
+ Where can I go?
42
+
43
+ How do I go back?
44
+
45
+ What happens if I leave?
46
+ ```
47
+
48
+ ---
49
+
50
+ # 3. NAVIGATION MODEL
51
+
52
+ Before implementing navigation, identify the application's conceptual
53
+ hierarchy.
54
+
55
+ Example:
56
+
57
+ ```text id="n54a03"
58
+ Application
59
+ ├── Home
60
+ ├── Library
61
+ │ ├── Collections
62
+ │ └── Detail
63
+ ├── Search
64
+ ├── Settings
65
+ └── Profile
66
+ ```
67
+
68
+ The routing structure should reflect this hierarchy where appropriate.
69
+
70
+ ---
71
+
72
+ # 4. DESTINATIONS
73
+
74
+ A destination is a meaningful place in the application.
75
+
76
+ Examples:
77
+
78
+ ```text id="n54a04"
79
+ Home
80
+ Library
81
+ Document
82
+ Player
83
+ Editor
84
+ Settings
85
+ ```
86
+
87
+ ---
88
+
89
+ # 5. DESTINATION VS ACTION
90
+
91
+ Do not treat every action as a destination.
92
+
93
+ Examples:
94
+
95
+ ```text id="n54a05"
96
+ Settings
97
+ → Destination
98
+
99
+ Delete
100
+ → Action
101
+
102
+ Share
103
+ → Action
104
+
105
+ Edit document
106
+ → Potential destination
107
+ ```
108
+
109
+ ---
110
+
111
+ # 6. NAVIGATION TYPES
112
+
113
+ The agent should distinguish:
114
+
115
+ ```text id="n54a06"
116
+ Stack navigation
117
+ Tab navigation
118
+ Sidebar navigation
119
+ Modal navigation
120
+ Sheet presentation
121
+ Nested navigation
122
+ Split view
123
+ ```
124
+
125
+ Each has a different semantic purpose.
126
+
127
+ ---
128
+
129
+ # 7. STACK NAVIGATION
130
+
131
+ Use stack navigation when the user moves deeper into a hierarchy.
132
+
133
+ Example:
134
+
135
+ ```text id="n54a07"
136
+ Library
137
+ ↓
138
+ Folder
139
+ ↓
140
+ File
141
+ ↓
142
+ File details
143
+ ```
144
+
145
+ ---
146
+
147
+ # 8. PUSH
148
+
149
+ Push means:
150
+
151
+ > I am going deeper into this context.
152
+
153
+ ---
154
+
155
+ # 9. POP
156
+
157
+ Pop means:
158
+
159
+ > I am returning to the previous context.
160
+
161
+ ---
162
+
163
+ # 10. BACK BEHAVIOR
164
+
165
+ Back should generally reverse the most recent meaningful navigation operation.
166
+
167
+ ---
168
+
169
+ # 11. BACK PRIORITY
170
+
171
+ The agent should reason about:
172
+
173
+ ```text id="n54a08"
174
+ Dismiss keyboard
175
+ ↓
176
+ Close temporary UI
177
+ ↓
178
+ Dismiss modal/sheet
179
+ ↓
180
+ Pop navigation
181
+ ↓
182
+ Exit application
183
+ ```
184
+
185
+ The exact behavior depends on platform conventions and current state.
186
+
187
+ ---
188
+
189
+ # 12. TAB NAVIGATION
190
+
191
+ Tabs represent top-level destinations.
192
+
193
+ Example:
194
+
195
+ ```text id="n54a09"
196
+ Home
197
+ Search
198
+ Library
199
+ Settings
200
+ ```
201
+
202
+ ---
203
+
204
+ # 13. TAB PRINCIPLE
205
+
206
+ Switching tabs should generally not behave like pushing a new screen onto a
207
+ single linear stack.
208
+
209
+ ---
210
+
211
+ # 14. TAB STATE
212
+
213
+ Each top-level destination may preserve useful navigation state.
214
+
215
+ Example:
216
+
217
+ ```text id="n54a10"
218
+ Library
219
+ → Folder A
220
+ → File X
221
+
222
+ Switch to Search
223
+
224
+ Return to Library
225
+
226
+ → Still at File X
227
+ ```
228
+
229
+ when this behavior matches the product.
230
+
231
+ ---
232
+
233
+ # 15. TAB RESELECTION
234
+
235
+ A second tap on the active tab may have a useful behavior such as:
236
+
237
+ ```text id="n54a11"
238
+ Scroll to top
239
+ Return to root
240
+ Refresh
241
+ ```
242
+
243
+ but should only be implemented when it has clear utility.
244
+
245
+ ---
246
+
247
+ # 16. SIDEBAR NAVIGATION
248
+
249
+ On larger screens, top-level navigation may become a sidebar.
250
+
251
+ ---
252
+
253
+ # 17. SIDEBAR + CONTENT
254
+
255
+ The layout can become:
256
+
257
+ ```text id="n54a12"
258
+ Sidebar
259
+ +
260
+ Content
261
+ ```
262
+
263
+ without changing the conceptual navigation model.
264
+
265
+ ---
266
+
267
+ # 18. SIDEBAR + DETAIL
268
+
269
+ For complex applications:
270
+
271
+ ```text id="n54a13"
272
+ Sidebar
273
+ +
274
+ Content
275
+ +
276
+ Detail
277
+ ```
278
+
279
+ can expose multiple levels simultaneously.
280
+
281
+ ---
282
+
283
+ # 19. SPLIT NAVIGATION
284
+
285
+ Split views are useful when two related destinations should remain visible
286
+ together.
287
+
288
+ ---
289
+
290
+ # 20. MASTER-DETAIL
291
+
292
+ Typical structure:
293
+
294
+ ```text id="n54a14"
295
+ Master
296
+ → Collection/list
297
+
298
+ Detail
299
+ → Selected item
300
+ ```
301
+
302
+ ---
303
+
304
+ # 21. SELECTION STATE
305
+
306
+ In a split view, selection should remain explicit.
307
+
308
+ ---
309
+
310
+ # 22. EMPTY DETAIL STATE
311
+
312
+ When no item is selected, provide a meaningful detail state rather than an
313
+ empty unexplained region.
314
+
315
+ ---
316
+
317
+ # 23. MODAL NAVIGATION
318
+
319
+ Modals represent temporary tasks or focused workflows.
320
+
321
+ Examples:
322
+
323
+ ```text id="n54a15"
324
+ Create item
325
+ Edit settings
326
+ Authentication
327
+ Confirmation
328
+ ```
329
+
330
+ ---
331
+
332
+ # 24. MODAL PRINCIPLE
333
+
334
+ A modal should answer:
335
+
336
+ > Why must I temporarily stop interacting with the underlying screen?
337
+
338
+ If there is no good answer, consider ordinary navigation instead.
339
+
340
+ ---
341
+
342
+ # 25. SHEETS
343
+
344
+ Sheets are useful for:
345
+
346
+ ```text id="n54a16"
347
+ Actions
348
+ Filters
349
+ Options
350
+ Short workflows
351
+ Contextual information
352
+ ```
353
+
354
+ ---
355
+
356
+ # 26. FULL-SCREEN MODALS
357
+
358
+ Use full-screen presentation for immersive or complex workflows when the
359
+ underlying context is not needed.
360
+
361
+ ---
362
+
363
+ # 27. SHEET VS MODAL
364
+
365
+ The agent should distinguish:
366
+
367
+ ```text id="n54a17"
368
+ Sheet
369
+ → Contextual temporary interaction
370
+
371
+ Modal
372
+ → Focused workflow
373
+
374
+ Full screen
375
+ → Immersive/independent task
376
+ ```
377
+
378
+ ---
379
+
380
+ # 28. NESTED NAVIGATION
381
+
382
+ Nested navigation should exist only where the hierarchy justifies it.
383
+
384
+ Avoid unnecessary stacks inside stacks.
385
+
386
+ ---
387
+
388
+ # 29. ROUTE STRUCTURE
389
+
390
+ Routes should represent semantic destinations.
391
+
392
+ Prefer:
393
+
394
+ ```text id="n54a18"
395
+ library
396
+ library/folder/:id
397
+ library/file/:id
398
+ ```
399
+
400
+ over routes that merely describe implementation details.
401
+
402
+ ---
403
+
404
+ # 30. ROUTE NAMING
405
+
406
+ Route names should be:
407
+
408
+ ```text id="n54a19"
409
+ Stable
410
+ Predictable
411
+ Semantic
412
+ Unique
413
+ ```
414
+
415
+ ---
416
+
417
+ # 31. ROUTE PARAMETERS
418
+
419
+ Use parameters for resource identity.
420
+
421
+ Example:
422
+
423
+ ```text id="n54a20"
424
+ file/:fileId
425
+ ```
426
+
427
+ rather than creating a unique route for every file.
428
+
429
+ ---
430
+
431
+ # 32. QUERY PARAMETERS
432
+
433
+ Use query parameters for optional state such as:
434
+
435
+ ```text id="n54a21"
436
+ Search
437
+ Filter
438
+ Sort
439
+ View mode
440
+ ```
441
+
442
+ when appropriate.
443
+
444
+ ---
445
+
446
+ # 33. ROUTE STATE VS UI STATE
447
+
448
+ Navigation state and transient UI state should not be mixed unnecessarily.
449
+
450
+ Example:
451
+
452
+ ```text id="n54a22"
453
+ Route:
454
+ library/file/123
455
+
456
+ UI state:
457
+ showMetadata=true
458
+ ```
459
+
460
+ ---
461
+
462
+ # 34. NAVIGATION STATE
463
+
464
+ Navigation state may include:
465
+
466
+ ```text id="n54a23"
467
+ Current route
468
+ Stack
469
+ Selected tab
470
+ Presented modal
471
+ Selected item
472
+ Navigation parameters
473
+ ```
474
+
475
+ ---
476
+
477
+ # 35. TRANSIENT STATE
478
+
479
+ Transient state includes:
480
+
481
+ ```text id="n54a24"
482
+ Pressed
483
+ Focused
484
+ Keyboard visible
485
+ Temporary tooltip
486
+ Animation state
487
+ ```
488
+
489
+ Do not persist transient state unless required.
490
+
491
+ ---
492
+
493
+ # 36. STATE RESTORATION
494
+
495
+ When the application is interrupted or relaunched, restore meaningful state
496
+ where appropriate.
497
+
498
+ ---
499
+
500
+ # 37. RESTORATION PRIORITY
501
+
502
+ Potential restoration:
503
+
504
+ ```text id="n54a25"
505
+ Current tab
506
+ Current route
507
+ Selected document
508
+ Scroll position
509
+ Draft
510
+ Search state
511
+ ```
512
+
513
+ Do not restore every piece of temporary UI state.
514
+
515
+ ---
516
+
517
+ # 38. COLD START
518
+
519
+ On a fresh launch:
520
+
521
+ ```text id="n54a26"
522
+ Initialize
523
+ ↓
524
+ Restore required state
525
+ ↓
526
+ Resolve destination
527
+ ↓
528
+ Render
529
+ ```
530
+
531
+ ---
532
+
533
+ # 39. WARM START
534
+
535
+ When returning from the background, preserve the current navigation context
536
+ unless the product requires otherwise.
537
+
538
+ ---
539
+
540
+ # 40. INTERRUPTION
541
+
542
+ Navigation should survive interruptions such as:
543
+
544
+ ```text id="n54a27"
545
+ Incoming call
546
+ System permission
547
+ Backgrounding
548
+ Memory pressure
549
+ External application
550
+ ```
551
+
552
+ where technically possible.
553
+
554
+ ---
555
+
556
+ # 41. DEEP LINKS
557
+
558
+ A deep link allows external content to open a specific destination.
559
+
560
+ Example:
561
+
562
+ ```text id="n54a28"
563
+ myapp://library/file/123
564
+ ```
565
+
566
+ ---
567
+
568
+ # 42. DEEP LINK PRINCIPLE
569
+
570
+ A deep link should open the correct context, not merely launch the application.
571
+
572
+ ---
573
+
574
+ # 43. DEEP LINK VALIDATION
575
+
576
+ When receiving a deep link:
577
+
578
+ ```text id="n54a29"
579
+ Parse
580
+ ↓
581
+ Validate
582
+ ↓
583
+ Resolve resource
584
+ ↓
585
+ Authenticate if required
586
+ ↓
587
+ Navigate
588
+ ```
589
+
590
+ ---
591
+
592
+ # 44. INVALID DEEP LINK
593
+
594
+ If the destination does not exist:
595
+
596
+ ```text id="n54a30"
597
+ Do not crash
598
+ Do not show broken screen
599
+ ```
600
+
601
+ Instead:
602
+
603
+ ```text id="n54a31"
604
+ Fallback
605
+ +
606
+ Explanation
607
+ +
608
+ Useful next action
609
+ ```
610
+
611
+ ---
612
+
613
+ # 45. AUTHENTICATION + DEEP LINK
614
+
615
+ If authentication is required:
616
+
617
+ ```text id="n54a32"
618
+ Deep link
619
+ ↓
620
+ Authentication
621
+ ↓
622
+ Original destination
623
+ ```
624
+
625
+ The intended destination should not be lost.
626
+
627
+ ---
628
+
629
+ # 46. DEEP LINK QUEUING
630
+
631
+ If multiple initialization steps are required, hold the destination until the
632
+ application is ready.
633
+
634
+ ---
635
+
636
+ # 47. UNIVERSAL LINKS
637
+
638
+ Where applicable, support web URLs that can resolve into native destinations.
639
+
640
+ ---
641
+
642
+ # 48. WEB → APP
643
+
644
+ A web destination may map to:
645
+
646
+ ```text id="n54a33"
647
+ https://example.com/file/123
648
+ ↓
649
+ Native file/123
650
+ ```
651
+
652
+ ---
653
+
654
+ # 49. LINK ROUTING TABLE
655
+
656
+ Maintain an explicit mapping:
657
+
658
+ ```text id="n54a34"
659
+ External URL
660
+ →
661
+ Internal destination
662
+ ```
663
+
664
+ ---
665
+
666
+ # 50. LINK SECURITY
667
+
668
+ Never trust external navigation parameters blindly.
669
+
670
+ Validate:
671
+
672
+ ```text id="n54a35"
673
+ Identifiers
674
+ Permissions
675
+ Authentication
676
+ Resource existence
677
+ ```
678
+
679
+ ---
680
+
681
+ # 51. SHARE LINKS
682
+
683
+ Shared content links should resolve to the appropriate resource when possible.
684
+
685
+ ---
686
+
687
+ # 52. NOTIFICATION NAVIGATION
688
+
689
+ Notifications may navigate to a specific destination.
690
+
691
+ Example:
692
+
693
+ ```text id="n54a36"
694
+ Notification
695
+ ↓
696
+ Tap
697
+ ↓
698
+ Message detail
699
+ ```
700
+
701
+ ---
702
+
703
+ # 53. NOTIFICATION ROUTING
704
+
705
+ Notification payloads should contain enough information to resolve the
706
+ destination without embedding fragile UI assumptions.
707
+
708
+ ---
709
+
710
+ # 54. EXTERNAL ACTION ROUTING
711
+
712
+ Other external triggers may include:
713
+
714
+ ```text id="n54a37"
715
+ Widgets
716
+ Shortcuts
717
+ Siri
718
+ Share extensions
719
+ System actions
720
+ ```
721
+
722
+ where supported.
723
+
724
+ ---
725
+
726
+ # 55. UNIVERSAL DESTINATION RESOLVER
727
+
728
+ The agent should centralize destination resolution.
729
+
730
+ Conceptually:
731
+
732
+ ```text id="n54a38"
733
+ External trigger
734
+ ↓
735
+ Destination resolver
736
+ ↓
737
+ Authentication / validation
738
+ ↓
739
+ Navigation state
740
+ ↓
741
+ Screen
742
+ ```
743
+
744
+ ---
745
+
746
+ # 56. SINGLE SOURCE OF TRUTH
747
+
748
+ Avoid implementing independent routing logic inside every screen.
749
+
750
+ ---
751
+
752
+ # 57. ROUTE GUARDS
753
+
754
+ Protected routes may require:
755
+
756
+ ```text id="n54a39"
757
+ Authentication
758
+ Permissions
759
+ Onboarding
760
+ Subscription
761
+ Resource access
762
+ ```
763
+
764
+ ---
765
+
766
+ # 58. AUTH GUARD
767
+
768
+ Example:
769
+
770
+ ```text id="n54a40"
771
+ Private route
772
+ ↓
773
+ Authenticated?
774
+ ├── Yes → Continue
775
+ └── No → Login
776
+ ```
777
+
778
+ ---
779
+
780
+ # 59. ONBOARDING GUARD
781
+
782
+ First-run flows may temporarily intercept normal navigation.
783
+
784
+ After completion, normal routing resumes.
785
+
786
+ ---
787
+
788
+ # 60. PERMISSION GUARD
789
+
790
+ Some destinations may require platform permissions.
791
+
792
+ Do not request permissions unnecessarily before the user reaches the relevant
793
+ feature.
794
+
795
+ ---
796
+
797
+ # 61. ERROR ROUTES
798
+
799
+ Navigation errors should have controlled fallback behavior.
800
+
801
+ ---
802
+
803
+ # 62. NOT-FOUND STATE
804
+
805
+ A resource route may resolve to:
806
+
807
+ ```text id="n54a41"
808
+ Valid resource
809
+ ```
810
+
811
+ or:
812
+
813
+ ```text id="n54a42"
814
+ Resource unavailable
815
+ ```
816
+
817
+ The latter should not crash the navigation stack.
818
+
819
+ ---
820
+
821
+ # 63. ROUTE LIFECYCLE
822
+
823
+ The agent should understand:
824
+
825
+ ```text id="n54a43"
826
+ Create
827
+ Mount
828
+ Focus
829
+ Blur
830
+ Unmount
831
+ Restore
832
+ ```
833
+
834
+ ---
835
+
836
+ # 64. SCREEN FOCUS
837
+
838
+ Expensive operations should generally happen when a screen actually becomes
839
+ relevant rather than blindly on every mount.
840
+
841
+ ---
842
+
843
+ # 65. SCREEN CLEANUP
844
+
845
+ When leaving a screen, clean up:
846
+
847
+ ```text id="n54a44"
848
+ Listeners
849
+ Timers
850
+ Subscriptions
851
+ Observers
852
+ Temporary resources
853
+ ```
854
+
855
+ where appropriate.
856
+
857
+ ---
858
+
859
+ # 66. NAVIGATION + DATA FETCHING
860
+
861
+ Navigation should not create unnecessary duplicate data requests.
862
+
863
+ ---
864
+
865
+ # 67. DATA CACHING
866
+
867
+ When returning to a destination, reuse valid cached state where appropriate.
868
+
869
+ ---
870
+
871
+ # 68. LOADING NAVIGATION
872
+
873
+ Avoid blocking navigation unnecessarily while data loads.
874
+
875
+ Navigate to the destination and represent loading state where appropriate.
876
+
877
+ ---
878
+
879
+ # 69. NAVIGATION + ASYNC STATE
880
+
881
+ If a route depends on asynchronous data:
882
+
883
+ ```text id="n54a45"
884
+ Route
885
+ ↓
886
+ Loading
887
+ ↓
888
+ Success / Error
889
+ ```
890
+
891
+ ---
892
+
893
+ # 70. RACE CONDITIONS
894
+
895
+ The agent must consider:
896
+
897
+ ```text id="n54a46"
898
+ User navigates quickly
899
+ +
900
+ Multiple requests
901
+ ```
902
+
903
+ The result from an outdated request should not overwrite newer navigation state.
904
+
905
+ ---
906
+
907
+ # 71. RAPID NAVIGATION
908
+
909
+ Prevent accidental duplicate navigation caused by:
910
+
911
+ ```text id="n54a47"
912
+ Double tap
913
+ Rapid taps
914
+ Repeated deep links
915
+ Repeated notification actions
916
+ ```
917
+
918
+ ---
919
+
920
+ # 72. NAVIGATION DEBOUNCE
921
+
922
+ Use appropriate protection where repeated actions can create duplicate
923
+ transitions.
924
+
925
+ Do not blindly debounce every navigation action.
926
+
927
+ ---
928
+
929
+ # 73. BACK STACK MANAGEMENT
930
+
931
+ The stack should represent meaningful user history.
932
+
933
+ Avoid adding redundant routes.
934
+
935
+ ---
936
+
937
+ # 74. DUPLICATE ROUTES
938
+
939
+ Consider whether:
940
+
941
+ ```text id="n54a48"
942
+ A
943
+ →
944
+ B
945
+ →
946
+ A
947
+ ```
948
+
949
+ should create a new A or return to the existing A.
950
+
951
+ The answer depends on semantics.
952
+
953
+ ---
954
+
955
+ # 75. REPLACE
956
+
957
+ Replace navigation is useful when the previous destination should no longer
958
+ remain in history.
959
+
960
+ Example:
961
+
962
+ ```text id="n54a49"
963
+ Login
964
+ →
965
+ Home
966
+ ```
967
+
968
+ The user usually should not return to Login using Back.
969
+
970
+ ---
971
+
972
+ # 76. RESET
973
+
974
+ Reset should be reserved for major navigation state changes.
975
+
976
+ Example:
977
+
978
+ ```text id="n54a50"
979
+ Logout
980
+ ```
981
+
982
+ may reset private navigation.
983
+
984
+ ---
985
+
986
+ # 77. LOGOUT
987
+
988
+ On logout:
989
+
990
+ ```text id="n54a51"
991
+ Clear private routes
992
+ Clear sensitive state
993
+ Return to public entry
994
+ ```
995
+
996
+ ---
997
+
998
+ # 78. SESSION EXPIRATION
999
+
1000
+ When a session expires:
1001
+
1002
+ ```text id="n54a52"
1003
+ Preserve intended destination
1004
+ →
1005
+ Authenticate
1006
+ →
1007
+ Return when authorized
1008
+ ```
1009
+
1010
+ when safe and appropriate.
1011
+
1012
+ ---
1013
+
1014
+ # 79. BACK NAVIGATION + UNSAVED CHANGES
1015
+
1016
+ If the user is editing content:
1017
+
1018
+ ```text id="n54a53"
1019
+ Back
1020
+ ↓
1021
+ Unsaved changes?
1022
+ ├── No → Leave
1023
+ └── Yes → Confirm / Save / Discard
1024
+ ```
1025
+
1026
+ ---
1027
+
1028
+ # 80. DRAFT PRESERVATION
1029
+
1030
+ Where appropriate, preserve drafts so navigation does not destroy user work.
1031
+
1032
+ ---
1033
+
1034
+ # 81. NAVIGATION CONFIRMATION
1035
+
1036
+ Do not add confirmation dialogs to ordinary navigation unless there is a real
1037
+ risk of data loss or a similarly important consequence.
1038
+
1039
+ ---
1040
+
1041
+ # 82. NAVIGATION ANIMATION
1042
+
1043
+ Navigation transitions should follow the motion system defined in File 50.
1044
+
1045
+ ---
1046
+
1047
+ # 83. NAVIGATION + SPATIAL CONTINUITY
1048
+
1049
+ When navigating from an object to its detail view, preserve visual continuity
1050
+ where appropriate.
1051
+
1052
+ ---
1053
+
1054
+ # 84. NAVIGATION + ACCESSIBILITY
1055
+
1056
+ Navigation must remain understandable with:
1057
+
1058
+ ```text id="n54a54"
1059
+ VoiceOver
1060
+ Dynamic Type
1061
+ Keyboard
1062
+ Pointer
1063
+ Reduced motion
1064
+ ```
1065
+
1066
+ ---
1067
+
1068
+ # 85. ACCESSIBLE NAVIGATION ORDER
1069
+
1070
+ The accessibility order should follow logical navigation hierarchy.
1071
+
1072
+ ---
1073
+
1074
+ # 86. ACCESSIBILITY ANNOUNCEMENTS
1075
+
1076
+ When navigation produces a major state change, assistive technologies should
1077
+ receive appropriate context where necessary.
1078
+
1079
+ ---
1080
+
1081
+ # 87. REDUCED MOTION
1082
+
1083
+ Navigation must remain understandable when transition animations are reduced
1084
+ or removed.
1085
+
1086
+ ---
1087
+
1088
+ # 88. KEYBOARD NAVIGATION
1089
+
1090
+ On keyboard-enabled devices:
1091
+
1092
+ ```text id="n54a55"
1093
+ Tab
1094
+ Shift+Tab
1095
+ Enter
1096
+ Escape
1097
+ Arrow keys
1098
+ ```
1099
+
1100
+ may need meaningful navigation behavior.
1101
+
1102
+ ---
1103
+
1104
+ # 89. POINTER NAVIGATION
1105
+
1106
+ Pointer interactions should support:
1107
+
1108
+ ```text id="n54a56"
1109
+ Hover
1110
+ Click
1111
+ Context menu
1112
+ Selection
1113
+ ```
1114
+
1115
+ where appropriate.
1116
+
1117
+ ---
1118
+
1119
+ # 90. URL STATE
1120
+
1121
+ When navigation is represented in a URL, the URL should remain a meaningful
1122
+ representation of the current destination.
1123
+
1124
+ ---
1125
+
1126
+ # 91. SHAREABLE ROUTES
1127
+
1128
+ Shareable destinations should avoid exposing sensitive state in URLs.
1129
+
1130
+ ---
1131
+
1132
+ # 92. SENSITIVE PARAMETERS
1133
+
1134
+ Do not put secrets, authentication tokens, or private data into navigational
1135
+ URLs.
1136
+
1137
+ ---
1138
+
1139
+ # 93. ROUTE SERIALIZATION
1140
+
1141
+ Navigation state that must survive persistence should be serializable into a
1142
+ stable representation.
1143
+
1144
+ ---
1145
+
1146
+ # 94. RESTORATION VALIDATION
1147
+
1148
+ Restored routes must be revalidated.
1149
+
1150
+ A previously valid route may become invalid because:
1151
+
1152
+ ```text id="n54a57"
1153
+ Resource deleted
1154
+ Permissions changed
1155
+ Session expired
1156
+ Feature removed
1157
+ ```
1158
+
1159
+ ---
1160
+
1161
+ # 95. STALE RESTORATION
1162
+
1163
+ Never blindly restore invalid navigation state.
1164
+
1165
+ ---
1166
+
1167
+ # 96. RESTORATION FALLBACK
1168
+
1169
+ If restoration fails:
1170
+
1171
+ ```text id="n54a58"
1172
+ Invalid restored route
1173
+ ↓
1174
+ Nearest valid destination
1175
+ ```
1176
+
1177
+ ---
1178
+
1179
+ # 97. NAVIGATION TELEMETRY
1180
+
1181
+ For complex products, navigation events may be tracked for diagnostics.
1182
+
1183
+ Useful events:
1184
+
1185
+ ```text id="n54a59"
1186
+ Screen viewed
1187
+ Navigation failed
1188
+ Deep link opened
1189
+ Route restored
1190
+ Authentication redirect
1191
+ ```
1192
+
1193
+ Do not collect unnecessary personal data.
1194
+
1195
+ ---
1196
+
1197
+ # 98. NAVIGATION PERFORMANCE
1198
+
1199
+ Navigation should feel immediate.
1200
+
1201
+ Avoid doing heavy synchronous work before the transition can begin.
1202
+
1203
+ ---
1204
+
1205
+ # 99. SCREEN PRELOADING
1206
+
1207
+ Preload expensive resources only when there is a demonstrated performance
1208
+ benefit.
1209
+
1210
+ Do not preload the entire application.
1211
+
1212
+ ---
1213
+
1214
+ # 100. NAVIGATION QUALITY GATE
1215
+
1216
+ ```text id="n54a60"
1217
+ [ ] Navigation hierarchy is defined
1218
+ [ ] Destinations are semantic
1219
+ [ ] Actions are separated from destinations
1220
+ [ ] Stack navigation is used appropriately
1221
+ [ ] Tabs represent top-level destinations
1222
+ [ ] Sidebar behavior is defined
1223
+ [ ] Split views are considered
1224
+ [ ] Modal usage is intentional
1225
+ [ ] Sheets have a clear purpose
1226
+ [ ] Back behavior is predictable
1227
+ [ ] Tab state is preserved appropriately
1228
+ [ ] Route naming is semantic
1229
+ [ ] Route parameters are structured
1230
+ [ ] UI state is separated from route state
1231
+ [ ] Deep links are supported where useful
1232
+ [ ] External links are validated
1233
+ [ ] Invalid links have fallbacks
1234
+ [ ] Authentication redirects preserve intent
1235
+ [ ] Notification routing is supported
1236
+ [ ] Route guards are defined
1237
+ [ ] Resource-not-found states exist
1238
+ [ ] Screen lifecycle is understood
1239
+ [ ] Async navigation races are handled
1240
+ [ ] Duplicate navigation is controlled
1241
+ [ ] Back stack remains meaningful
1242
+ [ ] Replace/reset behavior is intentional
1243
+ [ ] Logout clears private navigation
1244
+ [ ] Unsaved changes are protected
1245
+ [ ] Drafts are preserved where appropriate
1246
+ [ ] Navigation respects accessibility
1247
+ [ ] Reduced motion is supported
1248
+ [ ] Keyboard navigation is considered
1249
+ [ ] Pointer navigation is considered
1250
+ [ ] Restored routes are validated
1251
+ [ ] Sensitive URL parameters are avoided
1252
+ [ ] Navigation performance is monitored
1253
+ ```
1254
+
1255
+ ---
1256
+
1257
+ # 101. AGENT NAVIGATION WORKFLOW
1258
+
1259
+ The agent should follow:
1260
+
1261
+ ```text id="n54a61"
1262
+ 1. Map application destinations
1263
+ ↓
1264
+ 2. Define hierarchy
1265
+ ↓
1266
+ 3. Identify top-level navigation
1267
+ ↓
1268
+ 4. Define stack relationships
1269
+ ↓
1270
+ 5. Define modal/sheet relationships
1271
+ ↓
1272
+ 6. Define large-screen navigation
1273
+ ↓
1274
+ 7. Define route naming
1275
+ ↓
1276
+ 8. Define route parameters
1277
+ ↓
1278
+ 9. Define authentication guards
1279
+ ↓
1280
+ 10. Define permission guards
1281
+ ↓
1282
+ 11. Define deep-link mappings
1283
+ ↓
1284
+ 12. Define notification mappings
1285
+ ↓
1286
+ 13. Define back behavior
1287
+ ↓
1288
+ 14. Define restoration
1289
+ ↓
1290
+ 15. Define invalid-route handling
1291
+ ↓
1292
+ 16. Define unsaved-change behavior
1293
+ ↓
1294
+ 17. Define accessibility navigation
1295
+ ↓
1296
+ 18. Test rapid navigation
1297
+ ↓
1298
+ 19. Test interruption
1299
+ ↓
1300
+ 20. Test cold launch
1301
+ ↓
1302
+ 21. Test warm launch
1303
+ ↓
1304
+ 22. Test deep links
1305
+ ↓
1306
+ 23. Test expired sessions
1307
+ ↓
1308
+ 24. Test deleted resources
1309
+ ```
1310
+
1311
+ ---
1312
+
1313
+ # 102. AGENT DECISION RULE
1314
+
1315
+ Before creating a new route, ask:
1316
+
1317
+ ```text id="n54a62"
1318
+ Is this actually a destination?
1319
+
1320
+ Does the user need Back navigation here?
1321
+
1322
+ Should this be a modal instead?
1323
+
1324
+ Should this be a sheet instead?
1325
+
1326
+ Should this be state inside the current screen?
1327
+
1328
+ Does it need a unique URL?
1329
+
1330
+ Does it need restoration?
1331
+
1332
+ Does it belong to the existing hierarchy?
1333
+ ```
1334
+
1335
+ Avoid creating routes merely because a component became large.
1336
+
1337
+ ---
1338
+
1339
+ # 103. NAVIGATION PRINCIPLE
1340
+
1341
+ Navigation should create a mental map:
1342
+
1343
+ ```text id="n54a63"
1344
+ Application
1345
+ ↓
1346
+ Section
1347
+ ↓
1348
+ Collection
1349
+ ↓
1350
+ Item
1351
+ ↓
1352
+ Detail
1353
+ ```
1354
+
1355
+ Users should understand where they are without needing to consciously inspect
1356
+ the routing system.
1357
+
1358
+ ---
1359
+
1360
+ # 104. FINAL PRINCIPLE
1361
+
1362
+ The strongest navigation system is largely invisible.
1363
+
1364
+ It lets the user:
1365
+
1366
+ ```text id="n54a64"
1367
+ Enter
1368
+ ↓
1369
+ Explore
1370
+ ↓
1371
+ Go deeper
1372
+ ↓
1373
+ Perform an action
1374
+ ↓
1375
+ Return
1376
+ ↓
1377
+ Continue where they left off
1378
+ ```
1379
+
1380
+ without losing context.
1381
+
1382
+ The application should feel like **one continuous spatial environment**, not a
1383
+ series of disconnected screens.
1384
+
1385
+ The goal is therefore not simply:
1386
+
1387
+ > "Make routing work."
1388
+
1389
+ The goal is:
1390
+
1391
+ > **Make every destination feel like a natural place within one coherent
1392
+ > application.**