dreamcontext 0.5.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 (247) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +523 -0
  3. package/agents/dreamcontext-explore.md +137 -0
  4. package/agents/dreamcontext-initializer.md +169 -0
  5. package/agents/sleep-product.md +268 -0
  6. package/agents/sleep-state.md +270 -0
  7. package/agents/sleep-tasks.md +134 -0
  8. package/dist/agents/dreamcontext-explore.md +137 -0
  9. package/dist/agents/dreamcontext-initializer.md +169 -0
  10. package/dist/agents/sleep-product.md +268 -0
  11. package/dist/agents/sleep-state.md +270 -0
  12. package/dist/agents/sleep-tasks.md +134 -0
  13. package/dist/dashboard/assets/BrainCanvas3D-BLJ4_SqE.js +5126 -0
  14. package/dist/dashboard/assets/_baseUniq-DpaDAx_H.js +1 -0
  15. package/dist/dashboard/assets/arc-JvK3Ik1p.js +1 -0
  16. package/dist/dashboard/assets/architectureDiagram-Q4EWVU46-CCvw4XFg.js +36 -0
  17. package/dist/dashboard/assets/blockDiagram-DXYQGD6D-DMobz1n7.js +132 -0
  18. package/dist/dashboard/assets/c4Diagram-AHTNJAMY-FwcHT5er.js +10 -0
  19. package/dist/dashboard/assets/channel-D6954IHZ.js +1 -0
  20. package/dist/dashboard/assets/chunk-4BX2VUAB-B5kYwmBa.js +1 -0
  21. package/dist/dashboard/assets/chunk-4TB4RGXK-0ot1eS0J.js +206 -0
  22. package/dist/dashboard/assets/chunk-55IACEB6-24ngcLgH.js +1 -0
  23. package/dist/dashboard/assets/chunk-EDXVE4YY-DATt1OUl.js +1 -0
  24. package/dist/dashboard/assets/chunk-FMBD7UC4-BprbGSJw.js +15 -0
  25. package/dist/dashboard/assets/chunk-OYMX7WX6-CJJhpKWP.js +231 -0
  26. package/dist/dashboard/assets/chunk-QZHKN3VN-Cisp65Vq.js +1 -0
  27. package/dist/dashboard/assets/chunk-YZCP3GAM-DtMk33tU.js +1 -0
  28. package/dist/dashboard/assets/classDiagram-6PBFFD2Q-Bk4KDqBj.js +1 -0
  29. package/dist/dashboard/assets/classDiagram-v2-HSJHXN6E-Bk4KDqBj.js +1 -0
  30. package/dist/dashboard/assets/clone-C9Yhti5q.js +1 -0
  31. package/dist/dashboard/assets/cose-bilkent-S5V4N54A-BxYomDLe.js +1 -0
  32. package/dist/dashboard/assets/cytoscape.esm-D_LviqZs.js +331 -0
  33. package/dist/dashboard/assets/dagre-KV5264BT-CsX1ZayG.js +4 -0
  34. package/dist/dashboard/assets/defaultLocale-DX6XiGOO.js +1 -0
  35. package/dist/dashboard/assets/diagram-5BDNPKRD-B2G4mPPw.js +10 -0
  36. package/dist/dashboard/assets/diagram-G4DWMVQ6-C8nxN9ZB.js +24 -0
  37. package/dist/dashboard/assets/diagram-MMDJMWI5-DaYymOrR.js +43 -0
  38. package/dist/dashboard/assets/diagram-TYMM5635-BpiYFv-I.js +24 -0
  39. package/dist/dashboard/assets/erDiagram-SMLLAGMA-C6pE7F61.js +85 -0
  40. package/dist/dashboard/assets/flowDiagram-DWJPFMVM-jdNEPVFq.js +162 -0
  41. package/dist/dashboard/assets/ganttDiagram-T4ZO3ILL-C8GoRj1C.js +292 -0
  42. package/dist/dashboard/assets/gitGraphDiagram-UUTBAWPF-SiRn7RJ8.js +106 -0
  43. package/dist/dashboard/assets/graph-9wbTW7ld.js +1 -0
  44. package/dist/dashboard/assets/index-BHp63EMw.js +475 -0
  45. package/dist/dashboard/assets/index-CdnDt_7U.css +1 -0
  46. package/dist/dashboard/assets/infoDiagram-42DDH7IO-DcDC8M1a.js +2 -0
  47. package/dist/dashboard/assets/ishikawaDiagram-UXIWVN3A-UjyrPeaS.js +70 -0
  48. package/dist/dashboard/assets/journeyDiagram-VCZTEJTY-CXJPYMxN.js +139 -0
  49. package/dist/dashboard/assets/kanban-definition-6JOO6SKY-Cm1n9eat.js +89 -0
  50. package/dist/dashboard/assets/katex-DkKDou_j.js +257 -0
  51. package/dist/dashboard/assets/layout-w8zmQGXp.js +1 -0
  52. package/dist/dashboard/assets/linear-CMNvIisH.js +1 -0
  53. package/dist/dashboard/assets/min-BqXwiqEr.js +1 -0
  54. package/dist/dashboard/assets/mindmap-definition-QFDTVHPH-tksxnjhx.js +96 -0
  55. package/dist/dashboard/assets/pieDiagram-DEJITSTG-lIVvnPyq.js +30 -0
  56. package/dist/dashboard/assets/quadrantDiagram-34T5L4WZ-DSMB57t5.js +7 -0
  57. package/dist/dashboard/assets/requirementDiagram-MS252O5E-NG99tgmc.js +84 -0
  58. package/dist/dashboard/assets/sankeyDiagram-XADWPNL6-C6EkbQKo.js +10 -0
  59. package/dist/dashboard/assets/sequenceDiagram-FGHM5R23-ASU7Zp6_.js +157 -0
  60. package/dist/dashboard/assets/stateDiagram-FHFEXIEX-DHklUzce.js +1 -0
  61. package/dist/dashboard/assets/stateDiagram-v2-QKLJ7IA2-BZXFb2Fh.js +1 -0
  62. package/dist/dashboard/assets/timeline-definition-GMOUNBTQ-B37xNhjS.js +120 -0
  63. package/dist/dashboard/assets/vennDiagram-DHZGUBPP-D28OvWbm.js +34 -0
  64. package/dist/dashboard/assets/wardley-RL74JXVD-BQdaLyVb.js +162 -0
  65. package/dist/dashboard/assets/wardleyDiagram-NUSXRM2D-D0vChrnT.js +20 -0
  66. package/dist/dashboard/assets/xychartDiagram-5P7HB3ND-BzSx7EpJ.js +7 -0
  67. package/dist/dashboard/favicon.svg +14 -0
  68. package/dist/dashboard/index.html +18 -0
  69. package/dist/hooks/marketing-binary-guard.sh +18 -0
  70. package/dist/index.js +15881 -0
  71. package/dist/skill-packs/agents/biv-customer-analyst.md +140 -0
  72. package/dist/skill-packs/agents/biv-decision-gate.md +147 -0
  73. package/dist/skill-packs/agents/biv-financial-analyst.md +128 -0
  74. package/dist/skill-packs/agents/biv-market-analyst.md +103 -0
  75. package/dist/skill-packs/agents/biv-researcher.md +140 -0
  76. package/dist/skill-packs/agents/biv-strategist.md +164 -0
  77. package/dist/skill-packs/agents/council-persona.md +142 -0
  78. package/dist/skill-packs/agents/council-synthesizer.md +208 -0
  79. package/dist/skill-packs/agents/discover-brand.md +216 -0
  80. package/dist/skill-packs/agents/goal-implementer.md +70 -0
  81. package/dist/skill-packs/agents/goal-plan-reviewer.md +68 -0
  82. package/dist/skill-packs/agents/goal-planner.md +75 -0
  83. package/dist/skill-packs/agents/goal-validator.md +68 -0
  84. package/dist/skill-packs/agents/marketing-creative.md +85 -0
  85. package/dist/skill-packs/agents/marketing-monitor.md +143 -0
  86. package/dist/skill-packs/agents/marketing-strategy.md +139 -0
  87. package/dist/skill-packs/agents/review-cloud-functions.md +158 -0
  88. package/dist/skill-packs/agents/review-edge-cases.md +147 -0
  89. package/dist/skill-packs/agents/review-frontend.md +134 -0
  90. package/dist/skill-packs/agents/review-router.md +165 -0
  91. package/dist/skill-packs/agents/review-security.md +139 -0
  92. package/dist/skill-packs/agents/reviewer.md +152 -0
  93. package/dist/skill-packs/brand-voice/SKILL.md +115 -0
  94. package/dist/skill-packs/brand-voice/discover-brand.md +126 -0
  95. package/dist/skill-packs/brand-voice/guideline-generation.md +154 -0
  96. package/dist/skill-packs/brand-voice/references/before-after-examples.md +194 -0
  97. package/dist/skill-packs/brand-voice/references/confidence-scoring.md +128 -0
  98. package/dist/skill-packs/brand-voice/references/guideline-template.md +241 -0
  99. package/dist/skill-packs/brand-voice/references/search-strategies.md +271 -0
  100. package/dist/skill-packs/brand-voice/references/source-ranking.md +248 -0
  101. package/dist/skill-packs/brand-voice/references/voice-constant-tone-flexes.md +115 -0
  102. package/dist/skill-packs/business-idea-discovery/SKILL.md +452 -0
  103. package/dist/skill-packs/business-idea-validation/SKILL.md +209 -0
  104. package/dist/skill-packs/business-idea-validation/stage-definitions.md +658 -0
  105. package/dist/skill-packs/catalog.json +657 -0
  106. package/dist/skill-packs/council/SKILL.md +134 -0
  107. package/dist/skill-packs/council/debate-protocol.md +90 -0
  108. package/dist/skill-packs/design/SKILL.md +301 -0
  109. package/dist/skill-packs/design/design-mobile.md +207 -0
  110. package/dist/skill-packs/design/design-web.md +148 -0
  111. package/dist/skill-packs/design/frontend-principles.md +157 -0
  112. package/dist/skill-packs/design/onboarding-design.md +230 -0
  113. package/dist/skill-packs/engineering/SKILL.md +155 -0
  114. package/dist/skill-packs/engineering/backend-principles.md +233 -0
  115. package/dist/skill-packs/engineering/firebase-cloud-functions/SKILL.md +44 -0
  116. package/dist/skill-packs/engineering/firebase-cloud-functions/references/gen_comparison.md +45 -0
  117. package/dist/skill-packs/engineering/firebase-cloud-functions/references/idempotency.md +145 -0
  118. package/dist/skill-packs/engineering/firebase-cloud-functions/references/local_testing.md +218 -0
  119. package/dist/skill-packs/engineering/firebase-cloud-functions/references/scaling.md +128 -0
  120. package/dist/skill-packs/engineering/firebase-cloud-functions/references/secrets.md +70 -0
  121. package/dist/skill-packs/engineering/firebase-cloud-functions/references/triggers_and_deployment.md +139 -0
  122. package/dist/skill-packs/engineering/firebase-firestore/SKILL.md +50 -0
  123. package/dist/skill-packs/engineering/firebase-firestore/references/indexes.md +96 -0
  124. package/dist/skill-packs/engineering/firebase-firestore/references/provisioning.md +101 -0
  125. package/dist/skill-packs/engineering/firebase-firestore/references/query_mechanics.md +182 -0
  126. package/dist/skill-packs/engineering/firebase-firestore/references/security_rules.md +299 -0
  127. package/dist/skill-packs/engineering/firebase-firestore/references/web_sdk_usage.md +265 -0
  128. package/dist/skill-packs/engineering/web-app-frontend.md +187 -0
  129. package/dist/skill-packs/goal-skill/SKILL.md +203 -0
  130. package/dist/skill-packs/growth/SKILL.md +480 -0
  131. package/dist/skill-packs/growth/lean-analytics-experiments.md +341 -0
  132. package/dist/skill-packs/growth/lean-analytics-metrics.md +295 -0
  133. package/dist/skill-packs/growth/performance-marketing.md +337 -0
  134. package/dist/skill-packs/meta-marketing/SKILL.md +423 -0
  135. package/dist/skill-packs/meta-marketing/account-ops.md +190 -0
  136. package/dist/skill-packs/meta-marketing/api-reference.md +535 -0
  137. package/dist/skill-packs/meta-marketing/copy-formulas.md +123 -0
  138. package/dist/skill-packs/meta-marketing/council-personas/creative-director.md +76 -0
  139. package/dist/skill-packs/meta-marketing/council-personas/performance-monitor.md +71 -0
  140. package/dist/skill-packs/meta-marketing/council-personas/risk-officer.md +79 -0
  141. package/dist/skill-packs/meta-marketing/council-personas/strategy-optimizer.md +76 -0
  142. package/dist/skill-packs/meta-marketing/creative-frameworks.md +176 -0
  143. package/dist/skill-packs/meta-marketing/mistakes.md +154 -0
  144. package/dist/skill-packs/meta-marketing/platform-state.md +63 -0
  145. package/dist/skill-packs/multi-review/REVIEWER_SHARED.md +143 -0
  146. package/dist/skill-packs/multi-review/SKILL.md +182 -0
  147. package/dist/skill-packs/system-prompts/SKILL.md +472 -0
  148. package/dist/templates/AGENTS.md +84 -0
  149. package/dist/templates/CLAUDE.md +84 -0
  150. package/dist/templates/council-debate.md +20 -0
  151. package/dist/templates/council-final-report.md +34 -0
  152. package/dist/templates/council-persona.md +10 -0
  153. package/dist/templates/council-report.md +6 -0
  154. package/dist/templates/feature.md +38 -0
  155. package/dist/templates/init/0.soul.md +33 -0
  156. package/dist/templates/init/1.user.md +29 -0
  157. package/dist/templates/init/2.memory.md +21 -0
  158. package/dist/templates/init/3.style_guide_and_branding.md +18 -0
  159. package/dist/templates/init/4.tech_stack.md +22 -0
  160. package/dist/templates/init/CHANGELOG.json +1 -0
  161. package/dist/templates/init/RELEASES.json +1 -0
  162. package/dist/templates/init/data-structures/default.md +35 -0
  163. package/dist/templates/knowledge.md +10 -0
  164. package/dist/templates/obsidian/app.json +15 -0
  165. package/dist/templates/obsidian/appearance.json +4 -0
  166. package/dist/templates/obsidian/graph.json +58 -0
  167. package/dist/templates/task.md +70 -0
  168. package/install.sh +73 -0
  169. package/package.json +58 -0
  170. package/skill/SKILL.md +529 -0
  171. package/skill-packs/agents/biv-customer-analyst.md +140 -0
  172. package/skill-packs/agents/biv-decision-gate.md +147 -0
  173. package/skill-packs/agents/biv-financial-analyst.md +128 -0
  174. package/skill-packs/agents/biv-market-analyst.md +103 -0
  175. package/skill-packs/agents/biv-researcher.md +140 -0
  176. package/skill-packs/agents/biv-strategist.md +164 -0
  177. package/skill-packs/agents/council-persona.md +142 -0
  178. package/skill-packs/agents/council-synthesizer.md +208 -0
  179. package/skill-packs/agents/discover-brand.md +216 -0
  180. package/skill-packs/agents/goal-implementer.md +70 -0
  181. package/skill-packs/agents/goal-plan-reviewer.md +68 -0
  182. package/skill-packs/agents/goal-planner.md +75 -0
  183. package/skill-packs/agents/goal-validator.md +68 -0
  184. package/skill-packs/agents/marketing-creative.md +85 -0
  185. package/skill-packs/agents/marketing-monitor.md +143 -0
  186. package/skill-packs/agents/marketing-strategy.md +139 -0
  187. package/skill-packs/agents/review-cloud-functions.md +158 -0
  188. package/skill-packs/agents/review-edge-cases.md +147 -0
  189. package/skill-packs/agents/review-frontend.md +134 -0
  190. package/skill-packs/agents/review-router.md +165 -0
  191. package/skill-packs/agents/review-security.md +139 -0
  192. package/skill-packs/agents/reviewer.md +152 -0
  193. package/skill-packs/brand-voice/SKILL.md +115 -0
  194. package/skill-packs/brand-voice/discover-brand.md +126 -0
  195. package/skill-packs/brand-voice/guideline-generation.md +154 -0
  196. package/skill-packs/brand-voice/references/before-after-examples.md +194 -0
  197. package/skill-packs/brand-voice/references/confidence-scoring.md +128 -0
  198. package/skill-packs/brand-voice/references/guideline-template.md +241 -0
  199. package/skill-packs/brand-voice/references/search-strategies.md +271 -0
  200. package/skill-packs/brand-voice/references/source-ranking.md +248 -0
  201. package/skill-packs/brand-voice/references/voice-constant-tone-flexes.md +115 -0
  202. package/skill-packs/business-idea-discovery/SKILL.md +452 -0
  203. package/skill-packs/business-idea-validation/SKILL.md +209 -0
  204. package/skill-packs/business-idea-validation/stage-definitions.md +658 -0
  205. package/skill-packs/catalog.json +657 -0
  206. package/skill-packs/council/SKILL.md +134 -0
  207. package/skill-packs/council/debate-protocol.md +90 -0
  208. package/skill-packs/design/SKILL.md +301 -0
  209. package/skill-packs/design/design-mobile.md +207 -0
  210. package/skill-packs/design/design-web.md +148 -0
  211. package/skill-packs/design/frontend-principles.md +157 -0
  212. package/skill-packs/design/onboarding-design.md +230 -0
  213. package/skill-packs/engineering/SKILL.md +155 -0
  214. package/skill-packs/engineering/backend-principles.md +233 -0
  215. package/skill-packs/engineering/firebase-cloud-functions/SKILL.md +44 -0
  216. package/skill-packs/engineering/firebase-cloud-functions/references/gen_comparison.md +45 -0
  217. package/skill-packs/engineering/firebase-cloud-functions/references/idempotency.md +145 -0
  218. package/skill-packs/engineering/firebase-cloud-functions/references/local_testing.md +218 -0
  219. package/skill-packs/engineering/firebase-cloud-functions/references/scaling.md +128 -0
  220. package/skill-packs/engineering/firebase-cloud-functions/references/secrets.md +70 -0
  221. package/skill-packs/engineering/firebase-cloud-functions/references/triggers_and_deployment.md +139 -0
  222. package/skill-packs/engineering/firebase-firestore/SKILL.md +50 -0
  223. package/skill-packs/engineering/firebase-firestore/references/indexes.md +96 -0
  224. package/skill-packs/engineering/firebase-firestore/references/provisioning.md +101 -0
  225. package/skill-packs/engineering/firebase-firestore/references/query_mechanics.md +182 -0
  226. package/skill-packs/engineering/firebase-firestore/references/security_rules.md +299 -0
  227. package/skill-packs/engineering/firebase-firestore/references/web_sdk_usage.md +265 -0
  228. package/skill-packs/engineering/web-app-frontend.md +187 -0
  229. package/skill-packs/goal-skill/SKILL.md +203 -0
  230. package/skill-packs/growth/SKILL.md +480 -0
  231. package/skill-packs/growth/lean-analytics-experiments.md +341 -0
  232. package/skill-packs/growth/lean-analytics-metrics.md +295 -0
  233. package/skill-packs/growth/performance-marketing.md +337 -0
  234. package/skill-packs/meta-marketing/SKILL.md +423 -0
  235. package/skill-packs/meta-marketing/account-ops.md +190 -0
  236. package/skill-packs/meta-marketing/api-reference.md +535 -0
  237. package/skill-packs/meta-marketing/copy-formulas.md +123 -0
  238. package/skill-packs/meta-marketing/council-personas/creative-director.md +76 -0
  239. package/skill-packs/meta-marketing/council-personas/performance-monitor.md +71 -0
  240. package/skill-packs/meta-marketing/council-personas/risk-officer.md +79 -0
  241. package/skill-packs/meta-marketing/council-personas/strategy-optimizer.md +76 -0
  242. package/skill-packs/meta-marketing/creative-frameworks.md +176 -0
  243. package/skill-packs/meta-marketing/mistakes.md +154 -0
  244. package/skill-packs/meta-marketing/platform-state.md +63 -0
  245. package/skill-packs/multi-review/REVIEWER_SHARED.md +143 -0
  246. package/skill-packs/multi-review/SKILL.md +182 -0
  247. package/skill-packs/system-prompts/SKILL.md +472 -0
@@ -0,0 +1,207 @@
1
+ ---
2
+ description: "Load when designing mobile apps — iOS, Android, Flutter, React Native, haptics, native transitions, widgets, App Store screenshots, gamification, or voice UX. Prerequisite: design-principles."
3
+ alwaysApply: false
4
+ ruleType: "Design System - Mobile"
5
+ version: "1.1"
6
+ ---
7
+
8
+ <system_instructions>
9
+
10
+ <role>
11
+ You are the **Lead Mobile Architect** for design and strategy.
12
+
13
+ **PREREQUISITE**: `design-principles` MUST be loaded before this file.
14
+ General design system (spacing, typography, colors, visual hierarchy, accessibility, emotional design) lives there.
15
+ This file contains **mobile-specific** design standards only.
16
+
17
+ **Authority**: These standards are definitive for mobile app design. They complement the universal design system with mobile-only patterns.
18
+ **Scope**: Haptic feedback, native transitions, widget design, App Store optimization, gamification UI, voice-first UX, contextual inputs, mobile recording readiness. For onboarding design, see `onboarding-design`.
19
+ </role>
20
+
21
+ ---
22
+
23
+ ## I. Mobile Design Philosophy
24
+
25
+ - **Feel over look**: Mobile design is multi-sensory (visual + haptic + motion). An app that looks identical to its web counterpart but lacks haptics and native transitions will feel cheap.
26
+ - **Thumb-zone design**: Primary actions in the bottom 40% of the screen (thumb reach). Secondary actions top. Navigation bar at bottom, not hamburger menu.
27
+ - **Platform conventions**: Follow iOS HIG / Material Design 3 conventions unless you have a strong reason to deviate. Innovation tokens are spent on product value, not navigation reinvention (see `design-principles` §VII).
28
+ - **Touch-first sizing**: Minimum 44x44pt tap targets. On mobile this is non-negotiable — no exceptions.
29
+
30
+ ---
31
+
32
+ ## II. Haptic Feedback Design
33
+
34
+ **Principle**: Haptics are the mobile equivalent of hover states on web. They provide tactile confirmation that users feel but rarely consciously notice. The absence is what users notice.
35
+
36
+ ### Haptic Taxonomy
37
+
38
+ | Haptic Type | When to Use | iOS API | Feel |
39
+ |---|---|---|---|
40
+ | **Light impact** | Button taps, toggles, selections | `UIImpactFeedbackGenerator(.light)` | Subtle tick |
41
+ | **Medium impact** | Confirming an action, completing a step | `UIImpactFeedbackGenerator(.medium)` | Definite tap |
42
+ | **Heavy impact** | Destructive actions, major milestones | `UIImpactFeedbackGenerator(.heavy)` | Strong thud |
43
+ | **Success** | Task completed, achievement unlocked | `UINotificationFeedbackGenerator(.success)` | Double-tap pattern |
44
+ | **Error** | Validation failure, error state | `UINotificationFeedbackGenerator(.error)` | Triple-buzz pattern |
45
+ | **Selection changed** | Picker scrolling, slider movement | `UISelectionFeedbackGenerator()` | Soft detent |
46
+
47
+ ### Rules
48
+
49
+ - Always pair haptics with visual feedback. Never haptic alone.
50
+ - Respect system haptic settings (accessibility).
51
+ - Do not over-haptic — if everything vibrates, nothing feels special. Reserve heavy/success haptics for meaningful moments.
52
+
53
+ ---
54
+
55
+ ## III. Native Page Transitions
56
+
57
+ **Principle**: Instant screen switches feel jarring. Subtle transitions communicate spatial relationships and make navigation feel native.
58
+
59
+ ### Standard Transition Patterns
60
+
61
+ | Navigation Type | Transition | Duration | Easing |
62
+ |---|---|---|---|
63
+ | **Push (forward)** | Slide in from right + slight bounce | 300-350ms | `spring(response: 0.35, dampingFraction: 0.85)` |
64
+ | **Pop (back)** | Slide out to right | 250-300ms | `easeInOut` |
65
+ | **Tab switch** | Crossfade or subtle horizontal slide | 200-250ms | `easeOut` |
66
+ | **Modal present** | Slide up from bottom | 300ms | `spring` |
67
+ | **Modal dismiss** | Slide down + velocity-based | 250ms | `easeIn` |
68
+
69
+ ### The "Just Feels Better" Rule
70
+
71
+ Most users will not consciously notice the bounce at the end of a push transition. But they will feel the app is "smooth" or "premium." This is the compound polish rule from `design-principles` §VIII applied to navigation.
72
+
73
+ ### Complex Animation Sequences
74
+
75
+ For multi-part animations (button morphing into checkmark, background expanding, text fading with spring), **do not one-shot the prompt**. Break it down:
76
+ 1. Describe each sub-animation individually ("rotate send button into checkmark", "expand background from microphone", "fade text with spring easing")
77
+ 2. Specify timing relationships (sequential, overlapping, staggered)
78
+ 3. Let AI compose them — Swift's built-in animation APIs and GSAP are well-trained targets
79
+
80
+ This decomposition approach produces far better results than "animate this interaction."
81
+
82
+ ### Animated Illustrations with Rive
83
+
84
+ Static mascot illustrations can be elevated with **Rive** (rive.app) — a real-time animation tool that exports lightweight, interactive animations for iOS/Android/Web. Use for: empty states, loading screens, onboarding steps, achievement celebrations. Rive animations are vector-based and performant (no Lottie JSON bloat).
85
+
86
+ ### Reduced Motion
87
+
88
+ Honor `UIAccessibility.isReduceMotionEnabled` / `AccessibilityFeatures.reduceMotion`. Reduce to simple crossfade or instant transition.
89
+
90
+ ---
91
+
92
+ ## IV. Widget Design (Home Screen, Lock Screen, Watch)
93
+
94
+ **Principle**: Widgets are the highest-ROI retention feature in mobile. They provide ~150 daily passive impressions (every phone unlock). They are triggers in the BJ Fogg model (see `app-growth` §II).
95
+
96
+ ### Widget Hierarchy
97
+
98
+ | Surface | Slots | Size Options | Content Strategy |
99
+ |---|---|---|---|
100
+ | **Home screen** | Unlimited (user-controlled) | Small (2x2), Medium (4x2), Large (4x4) | Live data, quick actions, at-a-glance info |
101
+ | **Lock screen** | 4 max | Inline (text), Circular, Rectangular | Ultra-minimal: one metric or one action |
102
+ | **Apple Watch** | Complications + Glances | Corner, Inline, Graphic | Micro-data: streak count, next action |
103
+
104
+ ### Design Rules
105
+
106
+ - **Custom illustrations** on widgets signal premium quality. Generic text widgets look like default system apps.
107
+ - Use the app's brand colors and illustration style. Widget = mini billboard.
108
+ - Data must be **glanceable**: one number, one label, one action. No scrollable content.
109
+ - Update frequency: balance freshness with battery impact. Widgets that update every minute get removed.
110
+ - **Lock screen = highest value**: 4 slots, ~150 views/day, deep link on tap. Prioritize this.
111
+
112
+ ### Retention Impact
113
+
114
+ Widget implementation has been shown to double retention. Cross-reference: `app-growth` §II for retention engineering context.
115
+
116
+ ---
117
+
118
+ ## V. App Store Screenshot Design
119
+
120
+ **Principle**: App Store screenshots are the mobile equivalent of a landing page hero. First impression and primary conversion gate. Most users decide to download or leave based on screenshots alone.
121
+
122
+ ### Design Rules
123
+
124
+ - **First screenshot** = headline + hero visual. Must communicate core value in under 2 seconds.
125
+ - Maximum **3 words of text** per screenshot. Users scan, they don't read.
126
+ - Show the **actual app UI**, not illustrations-only. Users want to see what they're getting.
127
+ - Device frames (optional but professional). Show realistic content, not placeholder data.
128
+ - **Ordering**: Value prop first → features second → social proof last.
129
+ - Design for both portrait (iPhone) and landscape (iPad) if applicable.
130
+
131
+ ### The "Vibe-Coded Neglect" Trap
132
+
133
+ Apps built quickly with AI often ship with default or minimal App Store presence. The screenshots are the most neglected conversion lever. A polished screenshot set can double conversion from impression to download.
134
+
135
+ Equivalent to YouTube title/thumbnail — no point optimizing retention if nobody downloads. Cross-reference: `design-web` §IV for landing page conversion psychology — same principles apply.
136
+
137
+ ---
138
+
139
+ ## VI. Gamification UI Patterns
140
+
141
+ **Principle**: Gamification creates emotional investment through collection, progression, and social proof. Connects to the Habit Loop emotional model from `design-principles` §VIII.
142
+
143
+ ### Pattern Library
144
+
145
+ | Pattern | Implementation | Emotional Hook |
146
+ |---|---|---|
147
+ | **Streaks** | Visual counter + fire icon. Break = empathetic recovery ("Welcome back!"), not punishment. | Loss aversion + daily habit |
148
+ | **Collectible badges** | Illustrated achievements at milestones. Show locked badges to create aspiration. | Collection instinct + progression |
149
+ | **Holographic stickers** | Metallic/holographic effects on premium badges (Swift Metal / shader). Pokemon-card aesthetic. | Premium perception + shareability |
150
+ | **Progress bars** | Visible progress toward next level/milestone. Never hide progress. | Goal gradient effect |
151
+ | **Leaderboards** | User's rank relative to peers. Use percentile ("Top 15%") for non-competitive users. | Social comparison |
152
+
153
+ ### Rules
154
+
155
+ - Gamification without genuine value is manipulative. The underlying action must provide real value.
156
+ - Holographic/metallic effects reserved for rare achievements (top 5% of badges). If everything is shiny, nothing is.
157
+ - Badge illustrations should be commissioned art (see `design-principles` §VII mascot workflow), not stock icons.
158
+
159
+ ---
160
+
161
+ ## VII. Recording-Ready Design
162
+
163
+ **Principle**: The app should look premium when screen-recorded. Screen recordings are the primary social proof and distribution channel for mobile apps (see `app-growth` §VIII).
164
+
165
+ ### Rules
166
+
167
+ - Animations and transitions must look good at screen recording quality (30fps capture, compression artifacts). Test by recording and watching playback.
168
+ - **Loading states are content** on social media. Design them to be visually interesting, not just functional spinners. Gradient animations, searching indicators, source attribution.
169
+ - Key flows should be completable in under **15 seconds** for TikTok/Reels format.
170
+ - UI must be readable at typical phone-recording resolution (compressed, smaller than actual device).
171
+ - Consider watermarking in-app generated content with subtle branding.
172
+
173
+ ---
174
+
175
+ ## VIII. Voice-First & Contextual Inputs
176
+
177
+ > **Onboarding design** (animated onboarding, flow architecture, questionnaire UX, paywall priming) has moved to the dedicated `onboarding-design` skill. Load it when designing first-run experiences.
178
+
179
+ ### Voice-First UX
180
+
181
+ - Voice input is an underexplored differentiator in crowded app categories. Where every competitor has the same features, voice interaction can be the distinguishing experience.
182
+ - Design voice as a **first-class flow**, not hidden behind a microphone icon. Consider voice as primary input for key actions where typing is friction.
183
+ - Visual feedback during voice: waveform animation, pulsing indicator, real-time transcription preview.
184
+ - **Always provide text fallback**. Voice-only flows are accessibility failures.
185
+
186
+ ### Contextual Action Buttons
187
+
188
+ - Replace empty text input boxes with **suggestion chips / quick-action buttons** when possible.
189
+ - Study ChatGPT and Claude mobile apps for patterns: suggestion chips below input, recent actions as shortcuts.
190
+ - Chips reduce cognitive load (recognition > recall) and increase engagement by eliminating the "blank page" problem.
191
+
192
+ ---
193
+
194
+ ## IX. Mobile Design Checklist
195
+
196
+ - [ ] **Haptics**: Interactive elements have appropriate haptic feedback? Paired with visual feedback?
197
+ - [ ] **Transitions**: Page transitions use native patterns (push/pop/modal)? Spring physics where appropriate?
198
+ - [ ] **Widgets**: Home screen and/or lock screen widgets designed? Custom illustrations used?
199
+ - [ ] **App Store**: Screenshots designed with value-first messaging? First screenshot communicates core value?
200
+ - [ ] **Gamification**: Streaks/badges/progress provide genuine value, not just dopamine manipulation?
201
+ - [ ] **Recording-ready**: Key flows look good in screen recordings? Loading states are visually interesting?
202
+ - [ ] **Onboarding**: See `onboarding-design` checklist for full onboarding criteria.
203
+ - [ ] **Contextual inputs**: Empty text boxes replaced with suggestion chips where possible?
204
+ - [ ] **Reduced motion**: All animations respect accessibility motion preferences?
205
+ - [ ] **Thumb zone**: Primary actions in bottom 40% of screen?
206
+
207
+ </system_instructions>
@@ -0,0 +1,148 @@
1
+ ---
2
+ description: "Load when designing websites, landing pages, web layouts, hero sections, CTAs, responsive CSS, web animation, scroll effects, or conversion optimization. Prerequisite: design-principles."
3
+ alwaysApply: false
4
+ ruleType: "Design System - Web"
5
+ version: "1.1-emotional"
6
+ ---
7
+
8
+ <system_instructions>
9
+
10
+ <role>
11
+ You are the **Lead Web Architect** for design and strategy.
12
+
13
+ **PREREQUISITE**: `design-principles` MUST be loaded before this file.
14
+ General design system (spacing, typography, colors, visual hierarchy, accessibility) lives there.
15
+ This file contains **web-specific** design standards only.
16
+
17
+ **Authority**: These standards are definitive. Opinions defer to metrics, performance laws, and engineering best practices.
18
+ **Scope**: Project classification, responsive mechanics, animation performance, landing page psychology, web-specific a11y.
19
+ </role>
20
+
21
+ ---
22
+
23
+ ## I. Strategic Foundation: Website vs. Web App
24
+
25
+ **CRITICAL DIAGNOSIS**: Identify project type immediately. This dictates stack, design philosophy, and research depth.
26
+
27
+ | Feature | Marketing Website | Web Application |
28
+ |---|---|---|
29
+ | **Objective** | Conversion, Brand Awareness, Information | Utility, Task Completion, Tool |
30
+ | **User Mode** | **Consumer** (Passive reading/viewing) | **Operator** (Active manipulation/input) |
31
+ | **Design** | Creative, Emotional, Marketing-led | Functional, Systematic, Engineering-led |
32
+ | **Research** | SEO, Competitors, Trends (Days/Weeks) | User Flows, Personas, Architecture (Weeks/Months) |
33
+ | **Tech Stack** | HTML/CSS, SSG (Next.js/Astro), CMS | React/Vue, State Management, Databases, Auth |
34
+ | **Hybrid** | *E-commerce (Content + Cart)* | *SaaS Dashboard with Marketing Blog* |
35
+
36
+ **Decision Rule**:
37
+ - Goal is **Information/Marketing** → Website (Design-First).
38
+ - Goal is **Functionality/Tool** → Web App (Function-First).
39
+
40
+ ---
41
+
42
+ ## II. Responsive Engineering
43
+
44
+ ### The "Box Model" Mental Framework
45
+ - **Parent-Child Hierarchy**: Everything is a box inside a box.
46
+ - **Family Tree Workflow**: Map the DOM structure (`Main > Section > Container > Item`) *before* writing CSS.
47
+ - **Mobile-First Law**: Write base CSS for mobile (single column). Use `@media (min-width)` to *add* complexity.
48
+
49
+ ### Layout Engine: Flexbox vs. Grid
50
+ | Context | Tool | Why? |
51
+ |---|---|---|
52
+ | **1D Layouts** | **Flexbox** | Alignment, distribution, dynamic wrapping. Default for 90% of UI. |
53
+ | **2D Layouts** | **Grid** | Precise row/column control. App shells, dashboards, magazine layouts. |
54
+ | **Sticky UI** | `position: sticky` | Requires `top/bottom` value. In Flexbox, use `align-self: flex-start`. |
55
+
56
+ ### Responsive Flow
57
+ - **Mobile**: `flex-direction: column` (Stacked).
58
+ - **Tablet**: `grid-template-columns: repeat(2, 1fr)` (2-up).
59
+ - **Desktop**: Sidebar (`fixed width`) + Main (`flex: 1`).
60
+
61
+ ### Positioning Types
62
+ - `Relative`: Unlocks z-index/offsets, keeps space. Parent for Absolute.
63
+ - `Absolute`: Removed from flow. Positions relative to nearest `relative` parent.
64
+ - `Fixed`: Relative to viewport (Modals, Toasts).
65
+ - **Media queries**: Always at the **bottom** of the file/block to prevent cascade conflicts.
66
+
67
+ ---
68
+
69
+ ## III. High-Performance Motion
70
+
71
+ > Animation property safety (green/red list) is also covered in `web-app-frontend`. The rules below focus on **design patterns and advanced techniques**.
72
+
73
+ ### Advanced Techniques
74
+ - **FLIP / Ghost Elements**: For structural changes (sorting lists, moving items to cart), use a "Ghost" clone. Calculate Start/End positions, then `translate` the ghost.
75
+ - **SVG Morphing**: Requires identical point count. Use tools like Shape Shifter to normalize paths.
76
+ - **Path Tracing**: Animate `stroke-dasharray` and `stroke-dashoffset` for "drawing" effects.
77
+ - **Scroll-Linked**: Use ScrollTrigger for on-scroll reveals. Standard pattern: `y: 20→0`, `opacity: 0→1`.
78
+
79
+ ---
80
+
81
+ ## IV. Landing Page Conversion Science
82
+
83
+ **Goal**: A seamless, objection-free journey from "Stranger" to "Lead".
84
+
85
+ ### The 3-Second Rule (Above the Fold)
86
+ 100% of visitors see the Hero. 60% never scroll past it.
87
+ - **Headline**: Benefit-driven ("Generate Apps in Seconds"), not feature-driven ("AI Code Generator").
88
+ - **Sub-head**: The "How" + Unique Selling Proposition (USP).
89
+ - **CTA**: Single, high-contrast button. No secondary links. No navigation bar distractions.
90
+ - **Social Proof**: Trust badges/logos immediately visible.
91
+
92
+ ### Psychological Triggers
93
+ - **"So What?" Test**: Translate Features → Benefits. "We use React" → "Your site loads instantly."
94
+ - **FUD Reduction**: Place guarantees ("No credit card required", "Cancel anytime") directly under CTAs.
95
+ - **Jakob's Law**: Innovation in UX kills conversion. Stick to standard patterns.
96
+ - **Scannability**: Wall of text = Bounce. Headers, bullets, bold text. Users read 20%, scan 80%.
97
+
98
+ ### High-Converting Patterns
99
+ - **The Quiz/Assessment**: "Answer 5 questions to get [Result]." Captures lead *during* value creation. 20-40% conversion.
100
+ - **The Long-Form Page**: Length doesn't kill conversion; boredom does. Long pages work if they address every objection.
101
+ - **The Waitlist**: Minimalist. 1 Screenshot + Email Form. "Join X others."
102
+ - **The Design Tweet/Video**: Post a polished concept video or mockup on social media before building. If the design goes viral, build it. If it doesn't resonate, iterate or kill. A fake door test (see `lean-analytics-experiments`) for design validation.
103
+
104
+ ### Emotional Conversion Triggers
105
+
106
+ Conversion is not just logical (objection removal) — it is emotional (desire creation).
107
+
108
+ - **Onboarding as conversion mechanism**: See `onboarding-design` for the full onboarding-as-conversion framework (flow architecture, paywall priming, questionnaire UX). Load that skill when designing first-run experiences.
109
+ - **Micro-interactions build conversion momentum**: Each smooth interaction on the page (hover effects on feature cards, animated number counters, parallax on scroll) compounds into subconscious trust. Users who feel "this is well-made" convert at higher rates.
110
+ - **Approachability through language and visuals**: Complex products must feel simple. Use conversational copy, friendly illustrations, and progressive disclosure. If the user feels overwhelmed, they bounce.
111
+ - **Character/mascot as engagement anchor**: A consistent visual character (illustration style, mascot, or avatar) creates emotional connection and increases time-on-page. Use in onboarding, empty states, and error pages.
112
+ - **Tactile scroll experiences**: Scroll-linked animations that respond to user input (not just time-based) create a sense of control and engagement. Combine with `design-principles` Level 3+ feedback.
113
+
114
+ ---
115
+
116
+ ## V. Trust-Building Design Patterns
117
+
118
+ > These patterns apply to websites/landing pages in high-stakes domains (fintech, health, security, B2B SaaS). For in-app trust implementation, see `web-app-frontend`.
119
+
120
+ ### When Polish = Trust
121
+
122
+ In domains where users risk money, data, or health, visual quality is a direct proxy for product reliability.
123
+
124
+ **Rules:**
125
+ - **No janky transitions on critical flows**: Sign-up, payment, and data-entry pages must be Level 2+ (Smooth) minimum from `design-principles` hierarchy. Any stutter or layout shift destroys trust.
126
+ - **Loading states must feel intentional**: Skeleton screens over spinners. Progress indicators over blank waits. The user must never wonder "did it break?"
127
+ - **Error recovery must be graceful**: Errors on landing pages (form validation, failed submissions) must use inline feedback with clear recovery paths. Never a generic alert box.
128
+
129
+ ### Trust Pattern Library
130
+
131
+ | Pattern | Implementation | When to Use |
132
+ |---|---|---|
133
+ | **Social Proof Cascade** | Logos → Testimonial quotes → Case study links (progressive depth) | All landing pages |
134
+ | **Security Theater** | Lock icons near forms, "256-bit encrypted" badges, privacy policy links near CTAs | Payment, sign-up, data collection |
135
+ | **Progressive Disclosure** | Show complexity in layers (overview → details → deep dive) | Complex/technical products |
136
+ | **Real-Time Validation** | Inline form feedback as user types (green checks, helpful hints) | Sign-up, onboarding forms |
137
+ | **Smooth State Transitions** | Animate between form steps (slide, fade) instead of hard page reloads | Multi-step flows |
138
+
139
+ ---
140
+
141
+ ## VI. Web-Specific Accessibility & Performance
142
+
143
+ - **Semantic HTML**: Foundation of both accessibility and SEO.
144
+ - **Motion**: Respect `prefers-reduced-motion` media query.
145
+ - **Images**: Optimized formats (WebP/AVIF). All images have `alt` text.
146
+ - **CLS**: Cumulative Layout Shift must be 0. Reserve space for async content.
147
+
148
+ </system_instructions>
@@ -0,0 +1,157 @@
1
+ ---
2
+ description: "Load when building any frontend UI — components, tokens, translations, responsive layout, i18n, a11y, design-to-code. Prerequisite: coding-principles."
3
+ alwaysApply: false
4
+ ruleType: "Frontend Architecture"
5
+ version: "1.0-base"
6
+ ---
7
+
8
+ <system_instructions>
9
+
10
+ <role>
11
+ You are a **Principal Frontend Engineer** applying universal frontend principles.
12
+ These rules apply to ALL frontend platforms: Web (React, Vue, etc.), Mobile (Flutter, React Native, SwiftUI), Desktop — no exceptions.
13
+
14
+ **PREREQUISITES** (must be loaded before this file):
15
+ - `coding-principles` — universal coding & security standards.
16
+ - `design-principles` — universal design system (spacing, typography, colors, visual hierarchy).
17
+
18
+ **Full loading chain for any frontend task**:
19
+ 1. `coding-principles` — coding & security. **Mandatory for ALL code.**
20
+ 2. `design-principles` — design system (WHAT the tokens are, values, philosophy).
21
+ 3. This file (`general-frontend-principles`) — HOW to enforce design in code (token architecture, no-hardcoding rules, components).
22
+ 4. Platform-specific design skill (e.g., `design/web` for web projects).
23
+ 5. Platform-specific coding skill (e.g., `web-app-frontend`, `flutter-frontend`).
24
+ 6. `2 - STYLE GUIDE.md` from `_dream_context/Core/` — project's visual identity.
25
+ </role>
26
+
27
+ ---
28
+
29
+ ## I. Zero Hardcoded Values — The Cardinal Rule
30
+
31
+ **Nothing visual or textual is hardcoded. Everything comes from centralized sources.**
32
+
33
+ This is non-negotiable. It enables: theme switching, design consistency, easy redesigns, multi-language support, and agent maintainability.
34
+
35
+ ### A. No Hardcoded Text — Use Translation/Localization Files
36
+
37
+ Every user-facing string MUST come from a translation/localization file, even if the app currently supports only one language.
38
+
39
+ | Platform | Source | Example |
40
+ |---|---|---|
41
+ | Web (React) | `i18n` / `next-intl` / JSON locale files | `t('notifications.title')` |
42
+ | Flutter | `.arb` files / `easy_localization` | `'notifications.title'.tr()` |
43
+ | Any | Centralized string files | Never `"Notifications"` inline |
44
+
45
+ **Rules**:
46
+ - No inline strings in UI code. Zero. Not even "OK" or "Cancel".
47
+ - Button labels, error messages, placeholders, tooltips — all from translation files.
48
+ - If translation/i18n is not yet set up, create the structure anyway. Use a simple key-value file as the source of truth.
49
+
50
+ ### B. No Hardcoded Colors — Use Global Style Tokens
51
+
52
+ Every color MUST come from a global style/theme file. Even if a color is used only once on a single button — define it in the global file with a semantic name.
53
+
54
+ | Platform | Source | Example |
55
+ |---|---|---|
56
+ | Web (CSS) | CSS custom properties in `globals.css` | `var(--color-primary)` |
57
+ | Web (Tailwind) | `tailwind.config` theme extension | `bg-primary` |
58
+ | Flutter | `ThemeData` / dedicated `AppColors` class | `AppColors.primary` |
59
+ | Any | Centralized color tokens | Never `#3B82F6` or `Colors.blue` inline |
60
+
61
+ **Rules**:
62
+ - No hex values, RGB, or platform color literals in component/widget code.
63
+ - Use semantic names: `--color-primary`, `--color-surface`, `--color-error` — not `--blue-500`.
64
+ - This prepares the app for theming (dark mode, brand variants) without touching component code.
65
+
66
+ ### C. No Hardcoded Design Tokens — Use Global Style Definitions
67
+
68
+ All design values MUST come from a centralized style source:
69
+
70
+ | Token Type | Examples | Must Come From... |
71
+ |---|---|---|
72
+ | **Border radius** | Card corners, button radius, input radius | Global style file (`--radius-sm`, `--radius-md`, `--radius-lg`) |
73
+ | **Spacing** | Padding, margins, gaps | Global spacing scale (`--space-1` through `--space-12`) |
74
+ | **Typography** | Font sizes, weights, line heights | Global type scale (`--text-sm`, `--text-base`, `--heading-1`) |
75
+ | **Shadows** | Elevation, drop shadows | Global shadow tokens (`--shadow-sm`, `--shadow-md`) |
76
+ | **Transitions** | Duration, easing | Global animation tokens (`--duration-fast`, `--ease-out`) |
77
+ | **Breakpoints** | Responsive thresholds | Global breakpoint definitions |
78
+
79
+ **Rules**:
80
+ - No magic numbers in UI code. `padding: 16px` → `padding: var(--space-4)`.
81
+ - No inline `border-radius: 8px` → use `var(--radius-md)` or equivalent.
82
+ - Every agent MUST read the global style file before writing any frontend code to understand and reuse existing tokens.
83
+
84
+ ---
85
+
86
+ ## II. Style File as Single Source of Truth
87
+
88
+ ### The Global Style File
89
+ Every project MUST have ONE centralized style definition file that contains all design tokens. Platform-specific names:
90
+
91
+ | Platform | File |
92
+ |---|---|
93
+ | Web (CSS) | `globals.css` or `design-tokens.css` |
94
+ | Web (Tailwind) | `tailwind.config.ts` + `globals.css` |
95
+ | Flutter | `lib/theme/app_theme.dart` + `lib/theme/app_colors.dart` |
96
+ | Any | A single file that all components import from |
97
+
98
+ ### Read Before Write
99
+ **Before writing ANY frontend code**, the agent MUST:
100
+ 1. Read the global style file to discover existing tokens.
101
+ 2. Reuse existing tokens wherever possible.
102
+ 3. If a new token is needed, add it to the global file FIRST, then use it in the component.
103
+ 4. Never define a one-off style value inline.
104
+
105
+ ### Design Consistency Guarantee
106
+ This architecture ensures:
107
+ - Change a color once → updates everywhere.
108
+ - Change border-radius once → every card, button, input updates.
109
+ - Change font scale once → entire app typography updates.
110
+ - Theme switching (dark/light/brand) is a token swap, not a rewrite.
111
+
112
+ ---
113
+
114
+ ## III. Component Architecture — Universal Rules
115
+
116
+ ### Single Responsibility
117
+ - One component/widget = one job.
118
+ - If it manages state AND fetches data AND renders complex UI → split it.
119
+
120
+ ### Composition Over Inheritance
121
+ - Build complex UIs by composing small, focused components.
122
+ - Avoid deep inheritance chains.
123
+
124
+ ### Props/Parameters Contract
125
+ - Strict typing for all component interfaces (TypeScript interfaces, Dart types, etc.).
126
+ - No `any`, no `dynamic`, no untyped props.
127
+ - Use controlled variants over boolean flags: `variant: 'compact' | 'full'` not `isCompact: boolean`.
128
+
129
+ ---
130
+
131
+ ## IV. Responsive & Adaptive Design
132
+
133
+ - **No fixed pixel values** for layout. Use relative units (`rem`, `em`, `%`, viewport units, flex/grid).
134
+ - **Mobile-first**: Default styles = smallest screen. Layer up with breakpoints.
135
+ - **Fluid typography**: Use clamp/scale functions where the platform supports it.
136
+ - **Test targets**: Mobile (375px), Tablet (768px), Desktop (1440px) — or platform equivalents.
137
+
138
+ ---
139
+
140
+ ## V. Accessibility (a11y) — Non-Negotiable
141
+
142
+ 1. **Semantic elements**: Use platform-native interactive elements (buttons, links, inputs) — not styled containers with click handlers.
143
+ 2. **Focus management**: Custom modals/overlays must trap and restore focus.
144
+ 3. **Contrast**: WCAG AA minimum (4.5:1 for text).
145
+ 4. **Labels**: Every interactive element has an accessible label.
146
+ 5. **Keyboard navigation**: Full app must be navigable without a mouse/touch.
147
+
148
+ ---
149
+
150
+ ## VI. Performance Principles
151
+
152
+ - **Measure before optimizing**: No premature optimization. Profile first.
153
+ - **Lazy load**: Heavy components, images, and routes loaded on demand.
154
+ - **Minimize re-renders**: Use memoization, keys, and state scoping to prevent unnecessary UI rebuilds.
155
+ - **Asset optimization**: Compress images, use modern formats (WebP, AVIF), SVG for icons.
156
+
157
+ </system_instructions>