@enki-dev-expert/global-engineering-standards 0.0.0-stage → 0.1.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 (51) hide show
  1. package/AGENTS.md +303 -0
  2. package/CHANGELOG.md +23 -0
  3. package/CITATION.cff +21 -0
  4. package/CODE_OF_CONDUCT.md +13 -0
  5. package/CONTRIBUTING.md +27 -0
  6. package/LICENSE +21 -0
  7. package/README.md +159 -2
  8. package/SECURITY.md +25 -0
  9. package/dist/cli.js +40 -0
  10. package/dist/content.js +71 -0
  11. package/dist/filesystem.js +83 -0
  12. package/dist/installer.js +243 -0
  13. package/dist/layout.js +42 -0
  14. package/dist/transaction.js +143 -0
  15. package/docs/ai-and-llm.md +1312 -0
  16. package/docs/architecture.md +1007 -0
  17. package/docs/cost-engineering.md +1322 -0
  18. package/docs/data.md +993 -0
  19. package/docs/governance.md +1744 -0
  20. package/docs/mobile-and-web.md +1362 -0
  21. package/docs/observability.md +1345 -0
  22. package/docs/platforms-and-applications.md +1581 -0
  23. package/docs/privacy.md +566 -0
  24. package/docs/quality-and-testing.md +1278 -0
  25. package/docs/scalability.md +1012 -0
  26. package/docs/security.md +373 -0
  27. package/handbook/claude-plugin.md +31 -0
  28. package/handbook/compatibility.md +27 -0
  29. package/handbook/recovery.md +29 -0
  30. package/handbook/releasing.md +50 -0
  31. package/handbook/security-review.md +41 -0
  32. package/handbook/signing.md +18 -0
  33. package/handbook/validation.md +50 -0
  34. package/package.json +65 -4
  35. package/scripts/content-baseline.json +25 -0
  36. package/skills/engineering-architecture-review/SKILL.md +1531 -0
  37. package/skills/engineering-cost-estimate/SKILL.md +1599 -0
  38. package/skills/engineering-database-review/SKILL.md +1364 -0
  39. package/skills/engineering-privacy-check/SKILL.md +1295 -0
  40. package/skills/engineering-safe-implementation/SKILL.md +1502 -0
  41. package/skills/engineering-security-standards-check/SKILL.md +1112 -0
  42. package/src/cli.ts +45 -0
  43. package/src/content.ts +82 -0
  44. package/src/filesystem.ts +94 -0
  45. package/src/installer.ts +280 -0
  46. package/src/layout.ts +70 -0
  47. package/src/transaction.ts +167 -0
  48. package/templates/ADR.md +1302 -0
  49. package/templates/AUDIT_REPORT.md +1693 -0
  50. package/templates/EXCEPTIONS.md +647 -0
  51. package/templates/PROJECT_AGENTS.md +868 -0
@@ -0,0 +1,1362 @@
1
+
2
+ # Global Mobile and Web Application Engineering Standards
3
+
4
+ ## 1. Mission
5
+
6
+ Design, develop, test, deploy and maintain secure, accessible, intuitive, performant, scalable and maintainable web and mobile applications.
7
+
8
+ These standards apply to applications created, reviewed or maintained by AI coding agents, including Claude Code, OpenAI Codex and other AI-assisted engineering tools.
9
+
10
+ Supported platforms include:
11
+
12
+ - Web browsers.
13
+ - Progressive Web Apps (PWA).
14
+ - Native iOS applications.
15
+ - Native Android applications.
16
+ - Cross-platform mobile applications.
17
+ - Hybrid applications.
18
+ - Responsive web applications.
19
+ - Mobile web applications.
20
+ - SaaS client applications.
21
+ - AI-powered user interfaces.
22
+ - Realtime and offline-capable applications.
23
+
24
+ These requirements apply to new applications and existing production systems.
25
+
26
+ Never assume the application framework before inspecting the project.
27
+
28
+ ## 2. Fundamental Principles
29
+
30
+ Apply:
31
+
32
+ 1. User-centered design.
33
+ 2. Security by Design.
34
+ 3. Privacy by Design.
35
+ 4. Accessibility.
36
+ 5. Simplicity.
37
+ 6. Consistency.
38
+ 7. Performance.
39
+ 8. Reliability.
40
+ 9. Maintainability.
41
+ 10. Cross-platform compatibility.
42
+ 11. Cost awareness.
43
+ 12. Progressive enhancement.
44
+ 13. Backward compatibility.
45
+ 14. Human approval for significant changes.
46
+
47
+ Prioritize understandable user journeys over decorative complexity.
48
+
49
+ A visually attractive interface is not necessarily intuitive.
50
+
51
+ Validate usability using realistic tasks.
52
+
53
+ ## 3. Technology Independence
54
+
55
+ These standards are language-independent, framework-independent and provider-neutral.
56
+
57
+ Support technologies including:
58
+
59
+ ### Web
60
+
61
+ - HTML.
62
+ - CSS.
63
+ - JavaScript.
64
+ - TypeScript.
65
+ - React.
66
+ - Next.js.
67
+ - Vue.
68
+ - Nuxt.
69
+ - Angular.
70
+ - Svelte.
71
+ - SvelteKit.
72
+ - Astro.
73
+ - ASP.NET.
74
+ - PHP-based frameworks.
75
+ - Server-rendered applications.
76
+ - Static applications.
77
+ - Web Components.
78
+
79
+ ### iOS
80
+
81
+ - Swift.
82
+ - SwiftUI.
83
+ - UIKit.
84
+ - Objective-C.
85
+ - Native Apple frameworks.
86
+
87
+ ### Android
88
+
89
+ - Kotlin.
90
+ - Java.
91
+ - Jetpack Compose.
92
+ - Android Views.
93
+ - Native Android frameworks.
94
+
95
+ ### Cross-Platform
96
+
97
+ - Flutter.
98
+ - Dart.
99
+ - React Native.
100
+ - Expo.
101
+ - Kotlin Multiplatform.
102
+ - Capacitor.
103
+ - Ionic.
104
+ - .NET MAUI.
105
+ - Other maintained cross-platform frameworks.
106
+
107
+ No technology is mandatory by default.
108
+
109
+ Preserve existing project conventions when appropriate.
110
+
111
+ Avoid unnecessary rewrites to adopt newer frameworks.
112
+
113
+ ## 4. Platform Assessment First
114
+
115
+ Before significant implementation:
116
+
117
+ 1. Inspect the existing repository.
118
+ 2. Identify supported platforms.
119
+ 3. Identify languages and frameworks.
120
+ 4. Identify application architecture.
121
+ 5. Review navigation patterns.
122
+ 6. Review existing design systems.
123
+ 7. Identify authentication mechanisms.
124
+ 8. Review data storage.
125
+ 9. Identify API dependencies.
126
+ 10. Review platform permissions.
127
+ 11. Identify performance constraints.
128
+ 12. Review accessibility.
129
+ 13. Review existing tests.
130
+ 14. Identify release and compatibility requirements.
131
+ 15. Present findings and proposed changes.
132
+
133
+ Existing production application assessments must begin read-only.
134
+
135
+ ## 5. User Experience First
136
+
137
+ Design user experiences around actual tasks.
138
+
139
+ Prioritize:
140
+
141
+ - Clear navigation.
142
+ - Predictable interactions.
143
+ - Understandable terminology.
144
+ - Visible system status.
145
+ - Helpful feedback.
146
+ - Error prevention.
147
+ - Easy recovery.
148
+ - Minimal unnecessary steps.
149
+ - Consistent interface behavior.
150
+
151
+ Avoid interfaces that require users to understand the internal technical architecture.
152
+
153
+ Do not assume developers' familiarity reflects end-user usability.
154
+
155
+ ## 6. Information Architecture
156
+
157
+ Organize information according to user needs.
158
+
159
+ Evaluate:
160
+
161
+ - Navigation hierarchy.
162
+ - Content grouping.
163
+ - Feature discoverability.
164
+ - Search.
165
+ - Filtering.
166
+ - Progressive disclosure.
167
+ - Contextual actions.
168
+ - Clear labels.
169
+
170
+ Avoid excessively nested navigation.
171
+
172
+ Do not expose every advanced feature on the primary screen.
173
+
174
+ Prioritize frequently used workflows.
175
+
176
+ ## 7. Task-Oriented Interface Design
177
+
178
+ For significant interfaces:
179
+
180
+ 1. Identify primary users.
181
+ 2. Identify their goals.
182
+ 3. Map critical journeys.
183
+ 4. Identify unnecessary steps.
184
+ 5. Define expected feedback.
185
+ 6. Define error states.
186
+ 7. Define recovery paths.
187
+ 8. Validate navigation.
188
+ 9. Test representative scenarios.
189
+
190
+ Prefer task-oriented screens over interfaces organized only around database entities.
191
+
192
+ ## 8. Visual Hierarchy
193
+
194
+ Use clear visual hierarchy.
195
+
196
+ Evaluate:
197
+
198
+ - Typography.
199
+ - Spacing.
200
+ - Alignment.
201
+ - Contrast.
202
+ - Grouping.
203
+ - Primary actions.
204
+ - Secondary actions.
205
+ - Content density.
206
+ - Responsive behavior.
207
+
208
+ Avoid excessive visual decoration.
209
+
210
+ Do not use color as the only way to communicate meaning.
211
+
212
+ ## 9. Design Systems
213
+
214
+ Use consistent design tokens and reusable components where justified.
215
+
216
+ Consider:
217
+
218
+ - Typography scales.
219
+ - Spacing scales.
220
+ - Color systems.
221
+ - Component states.
222
+ - Border radii.
223
+ - Icon usage.
224
+ - Layout conventions.
225
+ - Responsive breakpoints.
226
+ - Accessibility states.
227
+
228
+ Preserve existing brand identity unless redesign is explicitly approved.
229
+
230
+ Avoid adding competing component libraries without justification.
231
+
232
+ ## 10. Consistency Across Platforms
233
+
234
+ Maintain consistent product concepts across supported platforms.
235
+
236
+ Respect platform-specific interaction conventions.
237
+
238
+ Do not force identical navigation patterns where native platform behavior differs.
239
+
240
+ Ensure that important features remain understandable regardless of platform.
241
+
242
+ Document intentional platform differences.
243
+
244
+ ## 11. Responsive Design
245
+
246
+ Design responsive layouts for relevant screen sizes.
247
+
248
+ Evaluate:
249
+
250
+ - Small mobile screens.
251
+ - Large phones.
252
+ - Tablets.
253
+ - Laptops.
254
+ - Desktop monitors.
255
+ - Orientation changes.
256
+ - Split-screen modes.
257
+ - Dynamic text sizes.
258
+
259
+ Avoid fixed layouts that break under different content sizes.
260
+
261
+ Test realistic viewport configurations.
262
+
263
+ ## 12. Accessibility
264
+
265
+ Apply relevant accessibility requirements.
266
+
267
+ Consider:
268
+
269
+ - Semantic structure.
270
+ - Accessible names.
271
+ - Keyboard navigation.
272
+ - Screen readers.
273
+ - Focus management.
274
+ - Color contrast.
275
+ - Touch target size.
276
+ - Dynamic text.
277
+ - Error identification.
278
+ - Motion sensitivity.
279
+ - Accessible media.
280
+ - Predictable interaction.
281
+
282
+ Use applicable WCAG guidance and platform accessibility standards.
283
+
284
+ Do not claim full accessibility compliance based only on automated tests.
285
+
286
+ ## 13. Internationalization
287
+
288
+ Design for multiple languages when product requirements justify it.
289
+
290
+ Consider:
291
+
292
+ - Translation systems.
293
+ - Text expansion.
294
+ - Date formats.
295
+ - Number formats.
296
+ - Currency formats.
297
+ - Time zones.
298
+ - Right-to-left languages.
299
+ - Locale-specific content.
300
+ - Accessibility.
301
+
302
+ Avoid hardcoded user-facing strings when localization is required.
303
+
304
+ Do not assume all users share the same language or geographic conventions.
305
+
306
+ ## 14. Forms and Input Design
307
+
308
+ Design forms to minimize user errors.
309
+
310
+ Apply:
311
+
312
+ - Clear labels.
313
+ - Appropriate input types.
314
+ - Helpful validation.
315
+ - Explicit required fields.
316
+ - Accessible error messages.
317
+ - Input preservation.
318
+ - Submission feedback.
319
+ - Duplicate submission protection.
320
+
321
+ Validate critical inputs on trusted servers.
322
+
323
+ Never rely exclusively on client-side validation.
324
+
325
+ ## 15. Loading and Feedback States
326
+
327
+ Every significant asynchronous operation should have appropriate feedback.
328
+
329
+ Consider:
330
+
331
+ - Loading.
332
+ - Success.
333
+ - Failure.
334
+ - Empty states.
335
+ - Offline states.
336
+ - Partial completion.
337
+ - Retry availability.
338
+ - Cancellation.
339
+
340
+ Avoid interfaces that appear frozen during operations.
341
+
342
+ Do not show success before the operation is actually confirmed.
343
+
344
+ ## 16. Error Recovery
345
+
346
+ Provide understandable error messages.
347
+
348
+ Explain what happened and what the user can do next when appropriate.
349
+
350
+ Avoid revealing internal secrets or sensitive implementation details.
351
+
352
+ Preserve recoverable user input.
353
+
354
+ Use safe retries.
355
+
356
+ Do not retry financial or destructive operations without appropriate idempotency controls.
357
+
358
+ ## 17. Authentication UX
359
+
360
+ Design secure and understandable authentication flows.
361
+
362
+ Consider:
363
+
364
+ - Registration.
365
+ - Login.
366
+ - Password recovery.
367
+ - Session expiration.
368
+ - MFA.
369
+ - Passkeys where appropriate.
370
+ - Device changes.
371
+ - Account recovery.
372
+ - Logout.
373
+
374
+ Avoid confusing authentication errors.
375
+
376
+ Never weaken security merely to reduce friction.
377
+
378
+ ## 18. Authorization and Frontend Boundaries
379
+
380
+ Frontend access controls improve usability but are not sufficient security boundaries.
381
+
382
+ Enforce authorization through trusted backend systems.
383
+
384
+ Validate:
385
+
386
+ - User identity.
387
+ - Roles.
388
+ - Permissions.
389
+ - Tenant membership.
390
+ - Resource ownership.
391
+
392
+ Never assume hidden buttons prevent unauthorized operations.
393
+
394
+ Consult docs/security.md.
395
+
396
+ ## 19. Session Management
397
+
398
+ Use appropriate session management.
399
+
400
+ Consider:
401
+
402
+ - Token storage.
403
+ - Token rotation.
404
+ - Session expiration.
405
+ - Logout invalidation.
406
+ - Multiple devices.
407
+ - Device loss.
408
+ - Session revocation.
409
+ - Network failure.
410
+
411
+ Avoid exposing authentication tokens to unnecessary application components.
412
+
413
+ Follow platform-appropriate secure storage practices.
414
+
415
+ ## 20. Secure Client Storage
416
+
417
+ Classify client-side information before storage.
418
+
419
+ Evaluate:
420
+
421
+ - Browser storage.
422
+ - Cookies.
423
+ - IndexedDB.
424
+ - iOS Keychain.
425
+ - Android Keystore.
426
+ - Encrypted local databases.
427
+ - Application caches.
428
+
429
+ Use appropriate protections for credentials and sensitive information.
430
+
431
+ Never embed privileged server credentials in distributed client applications.
432
+
433
+ Do not assume local encryption protects against every compromised-device scenario.
434
+
435
+ ## 21. Web Application Security
436
+
437
+ Evaluate:
438
+
439
+ - Cross-site scripting.
440
+ - Cross-site request forgery.
441
+ - Injection.
442
+ - Broken access control.
443
+ - Session fixation.
444
+ - Insecure redirects.
445
+ - Clickjacking.
446
+ - Unsafe dependency loading.
447
+ - Insecure content handling.
448
+ - Sensitive data exposure.
449
+
450
+ Apply suitable controls such as:
451
+
452
+ - Output encoding.
453
+ - Input validation.
454
+ - Secure cookie settings.
455
+ - Content Security Policy.
456
+ - CSRF defenses where applicable.
457
+ - Trusted API authorization.
458
+
459
+ Do not treat frontend validation as a substitute for server-side validation.
460
+
461
+ ## 22. Browser Security Headers
462
+
463
+ Evaluate appropriate browser security headers.
464
+
465
+ Consider:
466
+
467
+ - Content-Security-Policy.
468
+ - Strict-Transport-Security.
469
+ - X-Content-Type-Options.
470
+ - Referrer-Policy.
471
+ - Permissions-Policy.
472
+ - Frame embedding restrictions.
473
+
474
+ Configure headers according to application architecture.
475
+
476
+ Validate compatibility before enforcing restrictive policies in production.
477
+
478
+ ## 23. Cross-Origin Resource Sharing
479
+
480
+ Configure CORS according to actual requirements.
481
+
482
+ Avoid unrestricted origins when credentials or sensitive resources are involved.
483
+
484
+ Do not treat CORS as an authentication or authorization mechanism.
485
+
486
+ Review allowed methods, headers and origins.
487
+
488
+ Test browser behavior.
489
+
490
+ ## 24. Mobile Application Security
491
+
492
+ Evaluate:
493
+
494
+ - Secure local storage.
495
+ - Transport security.
496
+ - Deep links.
497
+ - App permissions.
498
+ - Embedded secrets.
499
+ - WebViews.
500
+ - Third-party SDKs.
501
+ - Sensitive screenshots.
502
+ - Application backups.
503
+ - Device integrity signals where relevant.
504
+
505
+ Use platform-supported security mechanisms.
506
+
507
+ Do not assume mobile applications are trusted clients.
508
+
509
+ Consult docs/security.md.
510
+
511
+ ## 25. iOS Security
512
+
513
+ For native iOS applications, evaluate:
514
+
515
+ - Keychain usage.
516
+ - App Transport Security.
517
+ - Entitlements.
518
+ - App Groups.
519
+ - Universal Links.
520
+ - Secure file handling.
521
+ - Privacy declarations.
522
+ - Background access.
523
+ - App permissions.
524
+
525
+ Use least privilege.
526
+
527
+ Never include unrestricted production API secrets in distributed application binaries.
528
+
529
+ ## 26. Android Security
530
+
531
+ For native Android applications, evaluate:
532
+
533
+ - Android Keystore.
534
+ - Network Security Configuration.
535
+ - Component exports.
536
+ - Intent handling.
537
+ - Deep links.
538
+ - Permission models.
539
+ - Secure storage.
540
+ - Backup behavior.
541
+ - WebView security.
542
+ - Third-party SDKs.
543
+
544
+ Restrict exported components appropriately.
545
+
546
+ Never assume application package contents are secret.
547
+
548
+ ## 27. API Integration
549
+
550
+ Use well-defined client and server contracts.
551
+
552
+ Consider:
553
+
554
+ - Authentication.
555
+ - Authorization.
556
+ - Request validation.
557
+ - Response validation.
558
+ - Versioning.
559
+ - Timeouts.
560
+ - Retries.
561
+ - Idempotency.
562
+ - Pagination.
563
+ - Error handling.
564
+
565
+ Avoid unnecessary duplicate requests.
566
+
567
+ Do not expose privileged server-side operations directly to untrusted clients.
568
+
569
+ ## 28. Network Reliability
570
+
571
+ Design for unreliable connectivity.
572
+
573
+ Consider:
574
+
575
+ - High latency.
576
+ - Packet loss.
577
+ - Connection interruption.
578
+ - Slow networks.
579
+ - Network switching.
580
+ - Offline states.
581
+ - Retry behavior.
582
+ - Duplicate submissions.
583
+
584
+ Use bounded retries and appropriate timeouts.
585
+
586
+ Avoid infinite polling and uncontrolled retries.
587
+
588
+ ## 29. Offline-First and Offline-Capable Design
589
+
590
+ Use offline capabilities when product requirements justify them.
591
+
592
+ Define:
593
+
594
+ - Which features work offline.
595
+ - What data is stored locally.
596
+ - How long data remains available.
597
+ - What operations are queued.
598
+ - What happens on reconnect.
599
+ - How conflicts are resolved.
600
+ - How permissions are revalidated.
601
+
602
+ Do not assume every application needs complete offline functionality.
603
+
604
+ ## 30. Data Synchronization
605
+
606
+ Define reliable synchronization between client and server.
607
+
608
+ Consider:
609
+
610
+ - Version tracking.
611
+ - Conflict detection.
612
+ - Optimistic updates.
613
+ - Idempotency.
614
+ - Network interruptions.
615
+ - Partial synchronization.
616
+ - Data deletion.
617
+ - Authorization changes.
618
+
619
+ Never overwrite newer authoritative data without an appropriate conflict strategy.
620
+
621
+ Do not assume client timestamps are authoritative.
622
+
623
+ ## 31. Realtime User Interfaces
624
+
625
+ For realtime applications, evaluate:
626
+
627
+ - Connection lifecycle.
628
+ - Subscription authorization.
629
+ - Duplicate events.
630
+ - Event ordering.
631
+ - Reconnection.
632
+ - Offline recovery.
633
+ - Background restrictions.
634
+ - UI consistency.
635
+ - Resource consumption.
636
+
637
+ Do not assume realtime transport guarantees correct business state.
638
+
639
+ Validate events before applying important state transitions.
640
+
641
+ ## 32. Web Performance
642
+
643
+ Evaluate:
644
+
645
+ - Core Web Vitals.
646
+ - Largest Contentful Paint.
647
+ - Interaction to Next Paint.
648
+ - Cumulative Layout Shift.
649
+ - Time to First Byte.
650
+ - JavaScript execution.
651
+ - Rendering.
652
+ - Network requests.
653
+ - Asset sizes.
654
+ - Caching.
655
+
656
+ Measure using representative conditions.
657
+
658
+ Avoid introducing large dependencies without performance justification.
659
+
660
+ ## 33. Frontend Bundle Optimization
661
+
662
+ Evaluate:
663
+
664
+ - Code splitting.
665
+ - Lazy loading.
666
+ - Tree shaking.
667
+ - Unused dependencies.
668
+ - JavaScript bundle size.
669
+ - CSS delivery.
670
+ - Asset loading.
671
+ - Third-party scripts.
672
+
673
+ Optimize based on actual measurements.
674
+
675
+ Do not make architectural rewrites solely to improve theoretical bundle size.
676
+
677
+ ## 34. Image Optimization
678
+
679
+ Use appropriate image handling.
680
+
681
+ Consider:
682
+
683
+ - Resolution.
684
+ - Compression.
685
+ - Responsive variants.
686
+ - Modern formats.
687
+ - Lazy loading.
688
+ - Placeholder behavior.
689
+ - Caching.
690
+ - CDN delivery.
691
+ - Accessibility descriptions.
692
+
693
+ Avoid transferring excessively large images to mobile devices.
694
+
695
+ Preserve adequate visual quality.
696
+
697
+ ## 35. Video and Audio Optimization
698
+
699
+ For media-rich applications, evaluate:
700
+
701
+ - Streaming.
702
+ - Adaptive bitrates.
703
+ - Compression.
704
+ - Playback startup time.
705
+ - Buffering.
706
+ - Device capabilities.
707
+ - Network usage.
708
+ - Battery impact.
709
+ - Accessibility captions.
710
+ - Media processing costs.
711
+
712
+ Do not automatically load large media assets when they are not needed.
713
+
714
+ ## 36. iOS Performance
715
+
716
+ Evaluate:
717
+
718
+ - Cold start.
719
+ - Warm start.
720
+ - Main-thread responsiveness.
721
+ - Memory usage.
722
+ - Battery consumption.
723
+ - Network traffic.
724
+ - Background execution.
725
+ - Animation performance.
726
+ - Scrolling performance.
727
+ - Crash rates.
728
+
729
+ Use appropriate Apple profiling tools.
730
+
731
+ Validate performance on representative supported devices.
732
+
733
+ ## 37. Android Performance
734
+
735
+ Evaluate:
736
+
737
+ - Cold start.
738
+ - Warm start.
739
+ - ANR rates.
740
+ - UI thread performance.
741
+ - Memory usage.
742
+ - Battery consumption.
743
+ - Background restrictions.
744
+ - Rendering performance.
745
+ - Network efficiency.
746
+ - Crash rates.
747
+
748
+ Use appropriate Android profiling tools.
749
+
750
+ Test representative device capabilities and supported OS versions.
751
+
752
+ ## 38. Battery and Resource Efficiency
753
+
754
+ For mobile applications:
755
+
756
+ - Avoid unnecessary polling.
757
+ - Limit background work.
758
+ - Reduce redundant network requests.
759
+ - Use appropriate scheduling APIs.
760
+ - Optimize media processing.
761
+ - Manage location updates.
762
+ - Minimize unnecessary wakeups.
763
+
764
+ Do not trade significant battery consumption for negligible interface improvements.
765
+
766
+ ## 39. Memory Management
767
+
768
+ Evaluate:
769
+
770
+ - Memory leaks.
771
+ - Unreleased resources.
772
+ - Image caches.
773
+ - Large object retention.
774
+ - Component lifecycle.
775
+ - Background memory usage.
776
+ - Navigation state.
777
+
778
+ Use profiling tools when appropriate.
779
+
780
+ Do not claim memory efficiency without evidence.
781
+
782
+ ## 40. State Management
783
+
784
+ Use state management appropriate to project complexity.
785
+
786
+ Consider:
787
+
788
+ - Local component state.
789
+ - Shared UI state.
790
+ - Server state.
791
+ - Persistent state.
792
+ - Cache state.
793
+ - Authentication state.
794
+
795
+ Avoid unnecessary state duplication.
796
+
797
+ Do not introduce complex state management libraries without justification.
798
+
799
+ Maintain clear ownership of authoritative data.
800
+
801
+ ## 41. Navigation Architecture
802
+
803
+ Design navigation according to user tasks.
804
+
805
+ Evaluate:
806
+
807
+ - Clear hierarchy.
808
+ - Predictable back navigation.
809
+ - Deep links.
810
+ - Tab navigation.
811
+ - Route protection.
812
+ - Authentication transitions.
813
+ - State restoration.
814
+
815
+ Respect platform-specific navigation conventions.
816
+
817
+ Avoid surprising navigation behavior.
818
+
819
+ ## 42. Deep Linking
820
+
821
+ Validate deep links and universal links.
822
+
823
+ Consider:
824
+
825
+ - Input validation.
826
+ - Authentication state.
827
+ - Authorization.
828
+ - Expired resources.
829
+ - Unsupported routes.
830
+ - External origin handling.
831
+
832
+ Never allow deep links to bypass access controls.
833
+
834
+ ## 43. Notifications
835
+
836
+ For notifications, evaluate:
837
+
838
+ - User preferences.
839
+ - Permission requests.
840
+ - Delivery reliability.
841
+ - Duplicate notifications.
842
+ - Deep-link behavior.
843
+ - Sensitive content exposure.
844
+ - Background handling.
845
+ - Provider costs.
846
+
847
+ Avoid excessive or intrusive notifications.
848
+
849
+ Do not include unnecessary sensitive information in lock-screen notifications.
850
+
851
+ ## 44. Mobile Permissions
852
+
853
+ Request only permissions needed for actual functionality.
854
+
855
+ Examples:
856
+
857
+ - Camera.
858
+ - Microphone.
859
+ - Location.
860
+ - Photos.
861
+ - Notifications.
862
+ - Bluetooth.
863
+ - Contacts.
864
+
865
+ Explain permission purpose clearly.
866
+
867
+ Handle denial gracefully.
868
+
869
+ Do not request broad permissions solely for implementation convenience.
870
+
871
+ ## 45. Privacy and Platform Disclosures
872
+
873
+ Evaluate applicable:
874
+
875
+ - Privacy notices.
876
+ - App Store privacy disclosures.
877
+ - Google Play data safety disclosures.
878
+ - Tracking permissions.
879
+ - Consent requirements.
880
+ - Data retention.
881
+ - Account deletion requirements.
882
+
883
+ Verify current platform policies before release.
884
+
885
+ Do not assume approval by an app store establishes legal compliance.
886
+
887
+ Consult docs/privacy.md.
888
+
889
+ ## 46. Third-Party SDK Governance
890
+
891
+ Before adding client SDKs, evaluate:
892
+
893
+ - Necessity.
894
+ - Data collection.
895
+ - Privacy impact.
896
+ - Security.
897
+ - Maintenance status.
898
+ - Binary size.
899
+ - Performance.
900
+ - Battery usage.
901
+ - Network consumption.
902
+ - Cost.
903
+
904
+ Avoid unnecessary analytics, advertising or tracking SDKs.
905
+
906
+ Review SDK data processing and platform disclosure requirements.
907
+
908
+ ## 47. Web Browser Compatibility
909
+
910
+ Define supported browsers according to product requirements.
911
+
912
+ Test relevant versions of:
913
+
914
+ - Safari.
915
+ - Chrome.
916
+ - Firefox.
917
+ - Edge.
918
+ - Mobile browsers.
919
+
920
+ Use progressive enhancement where appropriate.
921
+
922
+ Avoid relying on experimental browser capabilities without fallback strategies.
923
+
924
+ ## 48. iOS Compatibility
925
+
926
+ Define supported iOS versions and devices.
927
+
928
+ Evaluate:
929
+
930
+ - API availability.
931
+ - Platform deprecations.
932
+ - Device capabilities.
933
+ - Screen sizes.
934
+ - Background execution.
935
+ - Privacy permissions.
936
+ - Accessibility.
937
+
938
+ Do not automatically increase the minimum supported iOS version without approval and impact analysis.
939
+
940
+ ## 49. Android Compatibility
941
+
942
+ Define supported Android versions and device classes.
943
+
944
+ Evaluate:
945
+
946
+ - API levels.
947
+ - Permission changes.
948
+ - Background restrictions.
949
+ - Device diversity.
950
+ - Screen sizes.
951
+ - Manufacturer differences.
952
+ - Platform deprecations.
953
+
954
+ Do not automatically increase the minimum supported Android version without approval.
955
+
956
+ ## 50. Progressive Web Applications
957
+
958
+ For PWAs, evaluate:
959
+
960
+ - Service workers.
961
+ - Cache strategies.
962
+ - Offline behavior.
963
+ - Installability.
964
+ - Manifest configuration.
965
+ - Update mechanisms.
966
+ - Push notifications where supported.
967
+ - Platform differences.
968
+ - Storage limits.
969
+
970
+ Do not assume PWA capabilities are identical across browsers and operating systems.
971
+
972
+ ## 51. Cross-Platform Architecture
973
+
974
+ For multiplatform products, identify:
975
+
976
+ - Shared business logic.
977
+ - Platform-specific capabilities.
978
+ - Shared data contracts.
979
+ - Native integrations.
980
+ - Design consistency.
981
+ - Testing requirements.
982
+ - Release independence.
983
+
984
+ Share code when it improves maintainability.
985
+
986
+ Do not force complete code sharing when platform-specific solutions provide better quality.
987
+
988
+ ## 52. Web and Mobile AI Features
989
+
990
+ For AI-powered interfaces, consider:
991
+
992
+ - Response latency.
993
+ - Streaming behavior.
994
+ - Cancellation.
995
+ - Error handling.
996
+ - Human review.
997
+ - Source presentation.
998
+ - User trust.
999
+ - Privacy.
1000
+ - Cost.
1001
+ - Authorization.
1002
+
1003
+ Clearly distinguish AI-generated recommendations from verified facts where relevant.
1004
+
1005
+ Never expose privileged AI provider credentials in client applications.
1006
+
1007
+ Consult docs/ai-and-llm.md.
1008
+
1009
+ ## 53. Authentication and Backend Integration
1010
+
1011
+ Evaluate secure integration with existing backend and identity providers.
1012
+
1013
+ Possible providers include:
1014
+
1015
+ - Supabase.
1016
+ - Firebase.
1017
+ - Custom authentication systems.
1018
+ - Enterprise identity providers.
1019
+ - Cloud-managed identity systems.
1020
+
1021
+ No authentication provider is mandatory.
1022
+
1023
+ Enforce authorization in trusted systems.
1024
+
1025
+ Do not migrate existing authentication providers without evidence and approval.
1026
+
1027
+ ## 54. Multi-Tenant Client Applications
1028
+
1029
+ For multi-tenant applications:
1030
+
1031
+ - Maintain clear tenant context.
1032
+ - Revalidate tenant access.
1033
+ - Isolate cached data.
1034
+ - Protect local storage.
1035
+ - Handle tenant switching safely.
1036
+ - Prevent stale cross-tenant UI state.
1037
+ - Validate backend authorization.
1038
+
1039
+ Never treat UI-based tenant selection as sufficient access control.
1040
+
1041
+ ## 55. Error and Crash Monitoring
1042
+
1043
+ Monitor relevant:
1044
+
1045
+ - Frontend exceptions.
1046
+ - Mobile crashes.
1047
+ - ANRs.
1048
+ - API failures.
1049
+ - Rendering errors.
1050
+ - Navigation failures.
1051
+ - Authentication errors.
1052
+ - Network failures.
1053
+
1054
+ Use privacy-preserving telemetry.
1055
+
1056
+ Avoid logging sensitive form data or authentication credentials.
1057
+
1058
+ Consult docs/observability.md.
1059
+
1060
+ ## 56. Web Testing
1061
+
1062
+ Use appropriate tests for:
1063
+
1064
+ - UI components.
1065
+ - Navigation.
1066
+ - Forms.
1067
+ - Authentication.
1068
+ - Authorization.
1069
+ - API integration.
1070
+ - Accessibility.
1071
+ - Responsive behavior.
1072
+ - Browser compatibility.
1073
+ - Critical user journeys.
1074
+
1075
+ Use existing project test frameworks where suitable.
1076
+
1077
+ Do not assume screenshot comparison alone proves functional correctness.
1078
+
1079
+ ## 57. iOS Testing
1080
+
1081
+ Evaluate:
1082
+
1083
+ - Unit tests.
1084
+ - UI tests.
1085
+ - Integration tests.
1086
+ - Lifecycle tests.
1087
+ - Accessibility checks.
1088
+ - Offline behavior.
1089
+ - Network interruptions.
1090
+ - Permission handling.
1091
+ - Release builds.
1092
+
1093
+ Use appropriate Apple tooling.
1094
+
1095
+ Do not claim iOS compatibility without testing supported environments.
1096
+
1097
+ ## 58. Android Testing
1098
+
1099
+ Evaluate:
1100
+
1101
+ - Unit tests.
1102
+ - UI tests.
1103
+ - Instrumented tests.
1104
+ - Integration tests.
1105
+ - Lifecycle tests.
1106
+ - Accessibility.
1107
+ - Device compatibility.
1108
+ - Network interruptions.
1109
+ - Permission handling.
1110
+ - Release builds.
1111
+
1112
+ Use appropriate Android tooling.
1113
+
1114
+ Do not claim Android compatibility based only on emulator testing when real-device behavior is material.
1115
+
1116
+ ## 59. Cross-Platform Testing
1117
+
1118
+ For applications targeting multiple platforms:
1119
+
1120
+ - Verify shared functionality.
1121
+ - Test native integrations.
1122
+ - Validate platform-specific UI.
1123
+ - Test navigation.
1124
+ - Test permissions.
1125
+ - Evaluate startup performance.
1126
+ - Test offline behavior.
1127
+ - Verify release builds.
1128
+
1129
+ Do not assume successful tests on one platform prove correctness on another.
1130
+
1131
+ ## 60. Release Engineering
1132
+
1133
+ Define controlled release processes.
1134
+
1135
+ Consider:
1136
+
1137
+ - Versioning.
1138
+ - Build reproducibility.
1139
+ - Signing.
1140
+ - Environment configuration.
1141
+ - Feature flags.
1142
+ - Rollback strategies.
1143
+ - Release notes.
1144
+ - Compatibility.
1145
+ - Crash monitoring.
1146
+ - User impact.
1147
+
1148
+ Never distribute production signing keys through repositories or AI prompts.
1149
+
1150
+ ## 61. App Store Releases
1151
+
1152
+ Before submitting mobile applications:
1153
+
1154
+ 1. Verify release builds.
1155
+ 2. Review permissions.
1156
+ 3. Review privacy disclosures.
1157
+ 4. Validate signing.
1158
+ 5. Review compatibility.
1159
+ 6. Check critical functionality.
1160
+ 7. Review release notes.
1161
+ 8. Verify applicable store requirements.
1162
+ 9. Obtain required approval.
1163
+
1164
+ Do not submit applications automatically without explicit authorization.
1165
+
1166
+ ## 62. Mobile Version Compatibility
1167
+
1168
+ Assume some users will remain on older application versions.
1169
+
1170
+ Preserve compatible APIs where required.
1171
+
1172
+ Plan backend changes accordingly.
1173
+
1174
+ Use staged deprecation.
1175
+
1176
+ Do not assume instant upgrades.
1177
+
1178
+ Test server behavior with supported older clients.
1179
+
1180
+ ## 63. Feature Flags
1181
+
1182
+ Use feature flags where they provide controlled rollout or operational safety.
1183
+
1184
+ Consider:
1185
+
1186
+ - Gradual exposure.
1187
+ - Tenant-specific enablement.
1188
+ - Emergency rollback.
1189
+ - Experimentation.
1190
+ - Compatibility.
1191
+ - Security.
1192
+
1193
+ Do not treat client-side flags as security controls.
1194
+
1195
+ Remove obsolete flags through approved maintenance.
1196
+
1197
+ ## 64. Application Security Review
1198
+
1199
+ Before important releases, review:
1200
+
1201
+ - Authentication.
1202
+ - Authorization.
1203
+ - Secure storage.
1204
+ - Transport security.
1205
+ - External SDKs.
1206
+ - Sensitive data handling.
1207
+ - API exposure.
1208
+ - Platform permissions.
1209
+ - Dependency vulnerabilities.
1210
+ - Error handling.
1211
+
1212
+ Apply controls according to actual application risk.
1213
+
1214
+ Consult docs/security.md.
1215
+
1216
+ ## 65. Cost-Aware Client Engineering
1217
+
1218
+ Evaluate costs caused by client behavior.
1219
+
1220
+ Consider:
1221
+
1222
+ - API requests.
1223
+ - Database reads.
1224
+ - Realtime connections.
1225
+ - Cloud storage.
1226
+ - Media delivery.
1227
+ - AI inference.
1228
+ - Push notifications.
1229
+ - Analytics events.
1230
+ - Background synchronization.
1231
+ - Excessive polling.
1232
+
1233
+ Avoid unnecessary requests and resource consumption.
1234
+
1235
+ Consult docs/cost-engineering.md.
1236
+
1237
+ ## 66. Existing Production Application Audits
1238
+
1239
+ For existing web and mobile applications:
1240
+
1241
+ 1. Inspect the actual repository.
1242
+ 2. Identify platforms and frameworks.
1243
+ 3. Review existing navigation.
1244
+ 4. Evaluate critical user journeys.
1245
+ 5. Identify usability problems.
1246
+ 6. Assess accessibility.
1247
+ 7. Review authentication and authorization.
1248
+ 8. Assess performance.
1249
+ 9. Evaluate API and data integration.
1250
+ 10. Review platform compatibility.
1251
+ 11. Identify relevant security risks.
1252
+ 12. Review tests and release processes.
1253
+ 13. Prioritize findings.
1254
+ 14. Present an evidence-based report.
1255
+ 15. Wait for explicit human approval.
1256
+
1257
+ The initial audit must be read-only.
1258
+
1259
+ Do not redesign existing screens automatically.
1260
+
1261
+ Do not replace frameworks or dependencies merely because alternatives are newer.
1262
+
1263
+ ## 67. UX Redesign Governance
1264
+
1265
+ Before significant interface redesign:
1266
+
1267
+ - Identify user problems.
1268
+ - Analyze current workflows.
1269
+ - Define measurable objectives.
1270
+ - Review existing brand identity.
1271
+ - Preserve business functionality.
1272
+ - Identify affected users.
1273
+ - Evaluate accessibility.
1274
+ - Present proposed layouts.
1275
+ - Explain expected improvements.
1276
+ - Obtain explicit approval.
1277
+
1278
+ Use prototypes or visual comparisons when helpful.
1279
+
1280
+ Never deploy a major redesign without authorization.
1281
+
1282
+ ## 68. Progressive Improvement
1283
+
1284
+ Existing production applications may not meet every standard immediately.
1285
+
1286
+ Prioritize:
1287
+
1288
+ - Security issues.
1289
+ - Broken critical workflows.
1290
+ - Data integrity problems.
1291
+ - Severe accessibility barriers.
1292
+ - Confirmed performance bottlenecks.
1293
+ - Important usability problems.
1294
+ - High-risk compatibility issues.
1295
+
1296
+ Apply incremental improvements.
1297
+
1298
+ Avoid broad rewrites without strong justification.
1299
+
1300
+ Document approved exceptions.
1301
+
1302
+ ## 69. Cross-Document Responsibilities
1303
+
1304
+ Consult:
1305
+
1306
+ - docs/security.md for application security.
1307
+ - docs/privacy.md for privacy and data protection.
1308
+ - docs/architecture.md for architectural decisions.
1309
+ - docs/data.md for data integrity and persistence.
1310
+ - docs/scalability.md for performance and capacity.
1311
+ - docs/cost-engineering.md for financial impact.
1312
+ - docs/ai-and-llm.md for AI integrations.
1313
+ - docs/quality-and-testing.md for test requirements.
1314
+ - docs/observability.md for monitoring.
1315
+
1316
+ For desktop applications, games and other non-web/mobile platforms, also consult docs/platforms-and-applications.md when available.
1317
+
1318
+ Resolve these documentation paths relative to the engineering-standards repository.
1319
+
1320
+ Do not duplicate entire specialized standards unnecessarily.
1321
+
1322
+ ## 70. Mobile and Web Definition of Done
1323
+
1324
+ For significant mobile or web changes:
1325
+
1326
+ - User objective understood.
1327
+ - Existing platform inspected.
1328
+ - Architecture respected.
1329
+ - UX reviewed.
1330
+ - Accessibility considered.
1331
+ - Security verified.
1332
+ - Privacy reviewed.
1333
+ - Data integrity preserved.
1334
+ - Performance evaluated.
1335
+ - Offline behavior considered where relevant.
1336
+ - Platform compatibility assessed.
1337
+ - Critical tests executed.
1338
+ - Costs considered.
1339
+ - Monitoring prepared.
1340
+ - Release implications reviewed.
1341
+ - Remaining risks documented.
1342
+ - Required approvals obtained.
1343
+
1344
+ Do not consider an interface production-ready merely because it looks visually attractive.
1345
+
1346
+ ## 71. Final Mobile and Web Principles
1347
+
1348
+ Design for real users.
1349
+ Prioritize intuitive workflows.
1350
+ Maintain accessible interfaces.
1351
+ Respect platform conventions.
1352
+ Protect authentication and authorization.
1353
+ Never expose privileged client credentials.
1354
+ Handle unreliable networks.
1355
+ Preserve data integrity.
1356
+ Optimize performance and battery usage.
1357
+ Control API and infrastructure costs.
1358
+ Test supported platforms.
1359
+ Preserve production compatibility.
1360
+ Avoid unnecessary framework migrations.
1361
+ Audit existing applications before modifying them.
1362
+ Require approval for significant changes.