@tidyfactor/design 1.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 (136) hide show
  1. package/.tidyfactor +52 -0
  2. package/AGENTS.md +75 -0
  3. package/CHANGELOG.md +210 -0
  4. package/LICENSE +17 -0
  5. package/README.ar.md +398 -0
  6. package/README.de.md +44 -0
  7. package/README.es.md +44 -0
  8. package/README.fa.md +44 -0
  9. package/README.fr.md +44 -0
  10. package/README.md +418 -0
  11. package/README.pt.md +44 -0
  12. package/README.zh.md +44 -0
  13. package/SKILL-REGISTRY.md +69 -0
  14. package/SKILL.md +46 -0
  15. package/VISION.md +43 -0
  16. package/assets/blog.png +0 -0
  17. package/assets/content_layout.png +0 -0
  18. package/assets/content_output.png +0 -0
  19. package/assets/dark.png +0 -0
  20. package/assets/dashboard_layout.png +0 -0
  21. package/assets/dashboard_output.png +0 -0
  22. package/assets/ecommerce_layout.png +0 -0
  23. package/assets/ecommerce_output.png +0 -0
  24. package/assets/github-social-preview-2.png +0 -0
  25. package/assets/github-social-preview.png +0 -0
  26. package/assets/hero-banner.png +0 -0
  27. package/assets/light.png +0 -0
  28. package/assets/media_layout.png +0 -0
  29. package/assets/media_output.png +0 -0
  30. package/assets/og-default.png +0 -0
  31. package/assets/video.png +0 -0
  32. package/bin/add-skill.js +31 -0
  33. package/bin/create-kit.js +372 -0
  34. package/bin/remove-skill.js +137 -0
  35. package/brand.json +279 -0
  36. package/memory/01-design-schools.md +85 -0
  37. package/memory/02-design-tokens.md +41 -0
  38. package/memory/03-narrative-conversion.md +47 -0
  39. package/memory/04-motion-principles.md +44 -0
  40. package/memory/05-component-anatomy.md +34 -0
  41. package/memory/06-quality-bar.md +83 -0
  42. package/memory/07-consistency-contract.md +33 -0
  43. package/memory/08-arabic-bilingual.md +54 -0
  44. package/memory/09-prototype-flow.md +36 -0
  45. package/memory/10-python-tooling.md +64 -0
  46. package/memory/11-brand-json-v2.md +86 -0
  47. package/memory/12-typography-matrix.md +31 -0
  48. package/memory/13-layout-archetypes.md +30 -0
  49. package/memory/14-nav-footer-catalog.md +26 -0
  50. package/memory/15-performance-budget.md +18 -0
  51. package/memory/16-design-movements-guide.md +1084 -0
  52. package/memory/17-storytelling-industries-ux.md +143 -0
  53. package/memory/18-design-decision-engine.md +81 -0
  54. package/package.json +64 -0
  55. package/references/commands/_template.md +27 -0
  56. package/references/commands/assets.md +35 -0
  57. package/references/commands/audit.md +15 -0
  58. package/references/commands/brand.md +85 -0
  59. package/references/commands/brief.md +107 -0
  60. package/references/commands/clone.md +26 -0
  61. package/references/commands/components.md +46 -0
  62. package/references/commands/dashboard.md +45 -0
  63. package/references/commands/deploy.md +45 -0
  64. package/references/commands/flow.md +44 -0
  65. package/references/commands/handoff.md +53 -0
  66. package/references/commands/i18n.md +64 -0
  67. package/references/commands/init.md +30 -0
  68. package/references/commands/layout.md +81 -0
  69. package/references/commands/motion.md +62 -0
  70. package/references/commands/nav-footer.md +54 -0
  71. package/references/commands/page.md +45 -0
  72. package/references/commands/palette.md +35 -0
  73. package/references/commands/perf.md +57 -0
  74. package/references/commands/retrofit.md +15 -0
  75. package/references/commands/school.md +41 -0
  76. package/references/commands/states.md +48 -0
  77. package/references/commands/study.md +98 -0
  78. package/references/commands/tokens.md +45 -0
  79. package/references/commands/typography.md +87 -0
  80. package/references/foundations/daisyui.md +44 -0
  81. package/references/foundations/hybrid.md +32 -0
  82. package/references/foundations/native.md +31 -0
  83. package/references/foundations/tailwind-utility.md +43 -0
  84. package/references/memory/01-design-schools.md +85 -0
  85. package/references/memory/02-design-tokens.md +41 -0
  86. package/references/memory/03-narrative-conversion.md +47 -0
  87. package/references/memory/04-motion-principles.md +44 -0
  88. package/references/memory/05-component-anatomy.md +34 -0
  89. package/references/memory/06-quality-bar.md +83 -0
  90. package/references/memory/07-consistency-contract.md +33 -0
  91. package/references/memory/08-arabic-bilingual.md +54 -0
  92. package/references/memory/09-prototype-flow.md +36 -0
  93. package/references/memory/10-python-tooling.md +64 -0
  94. package/references/memory/11-brand-json-v2.md +86 -0
  95. package/references/memory/12-typography-matrix.md +31 -0
  96. package/references/memory/13-layout-archetypes.md +30 -0
  97. package/references/memory/14-nav-footer-catalog.md +26 -0
  98. package/references/memory/15-performance-budget.md +18 -0
  99. package/references/memory/16-design-movements-guide.md +1084 -0
  100. package/references/memory/17-storytelling-industries-ux.md +143 -0
  101. package/references/memory/18-design-decision-engine.md +81 -0
  102. package/references/memory/architecture.md +39 -0
  103. package/references/memory/decision-points.md +50 -0
  104. package/references/memory/foundations.md +15 -0
  105. package/references/memory/quality-bar.md +20 -0
  106. package/references/tidyfactor-vision.md +66 -0
  107. package/references/workflow.md +49 -0
  108. package/references/workflows/audit-prototype.md +26 -0
  109. package/references/workflows/brief.md +30 -0
  110. package/references/workflows/clone-prototype.md +27 -0
  111. package/references/workflows/init-prototype.md +28 -0
  112. package/references/workflows/retrofit-prototype.md +25 -0
  113. package/scripts/__pycache__/_utils.cpython-312.pyc +0 -0
  114. package/scripts/_utils.py +60 -0
  115. package/scripts/build.py +194 -0
  116. package/scripts/check_alpha.py +52 -0
  117. package/scripts/extract_palette.py +139 -0
  118. package/scripts/generate_transitions.py +105 -0
  119. package/scripts/inspect_images.py +48 -0
  120. package/scripts/minify_assets.py +140 -0
  121. package/scripts/optimize_assets.py +91 -0
  122. package/scripts/optimize_images.py +176 -0
  123. package/scripts/prepare_images.py +67 -0
  124. package/scripts/remove_backgrounds.py +61 -0
  125. package/scripts/test_build.py +228 -0
  126. package/templates/design-system/base.css +75 -0
  127. package/templates/design-system/components.css +229 -0
  128. package/templates/design-system/interactions.js +31 -0
  129. package/templates/design-system/motion.js +42 -0
  130. package/templates/design-system/tokens.css +81 -0
  131. package/templates/design-system/utilities.css +47 -0
  132. package/templates/index.html +84 -0
  133. package/templates/proto-nav.js +56 -0
  134. package/tools/build-skill.js +126 -0
  135. package/tools/validate-skill.js +144 -0
  136. package/tools/validate_skill.py +121 -0
@@ -0,0 +1,143 @@
1
+ # 17 · Storytelling Archetypes, Industry Registers & UX Philosophies
2
+
3
+ Operational guide for `tidyfactor-design` establishing visual rules, layout structures, typography pairings, color systems, and execution constraints across **4 Storytelling Archetypes**, **8 Industry Registers**, and **8 UX Design Philosophies**.
4
+
5
+ ---
6
+
7
+ ## 🎬 4 Storytelling Archetypes
8
+
9
+ ### 1. Cinematic Storytelling
10
+ * **Core Philosophy**: The user experiences a luxury TV ad in continuous motion. Scroll drives product transformation, stage reveals, and lighting shifts.
11
+ * **Layout Structure**: Full-bleed hero stage with 3D product float & pointer tilt → Canvas frame-sequence scroll film (600vh stage) → Spec reveal → Lifestyle moments → Pinned video CTA with smoothstep wash overlay.
12
+ * **Typography**: Clean display serif (`El Messiri`, `Cormorant Garamond`) for headlines paired with high-contrast body sans (`Tajawal`, `Inter`). Small off-center captions over video/film.
13
+ * **Visual Tokens**: Deep dark ground (`#0F172A`), gold radial background aura, drifting particle motes, fixed z-stack layers (`#ambient`, `#glow`, `#vignette`, `#grain`, `#progress`).
14
+ * **Best For**: Physical luxury goods, flagship product launches, brand positioning, automotive, high-ticket offers.
15
+
16
+ ---
17
+
18
+ ### 2. Editorial Storytelling
19
+ * **Core Philosophy**: Literary journalism and broadsheet publishing. Focuses on narrative depth, authoritativeness, and structured typography hierarchy.
20
+ * **Layout Structure**: Magazine header masthead → Split-screen hero (image + narrative copy) → Multi-column article grid → Hairline rule dividers → Pull quote blocks → Author colophon footer.
21
+ * **Typography**: Expressive editorial serifs (`Markazi Text`, `Fraunces`, `El Messiri`) for display paired with legible sans or serif body (`IBM Plex Sans Arabic`, `Tajawal`).
22
+ * **Visual Tokens**: Warm cream/ivory grounds (`#FBF8F2`), ink black text (`#14171C`), fine hairline dividers (`1px solid #E2E5E9`), generous line-height (`1.75`).
23
+ * **Best For**: Media publications, founder origin stories, investigative reports, thought leadership, luxury brand manifests.
24
+
25
+ ---
26
+
27
+ ### 3. Documentary Storytelling
28
+ * **Core Philosophy**: Raw, unpolished, evidence-first presentation. Uses timestamped logs, concrete data points, real photography, and objective split-screen progression.
29
+ * **Layout Structure**: Metadata header bar (date, coordinates, telemetry) → Timeline sequence blocks → High-contrast photo evidence cards → Concrete metric grids → Fact verification footer.
30
+ * **Typography**: Monospaced technical typography (`JetBrains Mono`, `Oswald`) paired with neutral body sans (`Inter`, `Tajawal`).
31
+ * **Visual Tokens**: Titanium grays (`#0F172A`, `#1E293B`), signal amber accent (`#F59E0B`), telemetry badge dots (`● VERIFIED`), hairline grid borders (`1px solid #334155`).
32
+ * **Best For**: Sustainability reports, engineering case studies, NGO causes, supply-chain transparency, technical post-mortems.
33
+
34
+ ---
35
+
36
+ ### 4. Interactive Storytelling
37
+ * **Core Philosophy**: Choice-driven exploration where user interaction (clicks, toggles, hover paths) directly reveals content and alters page state.
38
+ * **Layout Structure**: Interactive hero preview → Tabbed exploration stage → Live calculator / filter widget → Before-and-after comparison slider → Interactive FAQ accordion → Action trigger CTA.
39
+ * **Typography**: Friendly modern sans-serifs (`Outfit`, `Tajawal`).
40
+ * **Visual Tokens**: Interactive hover lift (`transform: translateY(-2px)`), active press feedback (`scale-[0.98]`), focus ring glow (`color-mix()`), smooth tab transitions.
41
+ * **Best For**: SaaS product walk-throughs, pricing calculators, interactive product configurators, digital learning modules.
42
+
43
+ ---
44
+
45
+ ## 💼 8 Industry Registers
46
+
47
+ ### 1. Corporate
48
+ * **Visual Register**: Trust, stability, security, institutional authority.
49
+ * **Color Palette**: Trust Navy (`#0F172A`), Deep Sapphire (`#1E40AF`), Neutral Gray (`#F8FAFC`), Slate (`#475569`).
50
+ * **Typography**: Professional sans-serifs (`Outfit`, `Inter`, `Tajawal`).
51
+ * **Layout Rules**: 12-column grid, clean executive stat callouts, structured table matrices, WCAG AA compliance.
52
+ * **Avoid**: Neo-brutalist offset shadows, neon colors, playful illustrations.
53
+
54
+ ---
55
+
56
+ ### 2. SaaS (Software-as-a-Service)
57
+ * **Visual Register**: High efficiency, modern tech, data clarity, conversion-driven.
58
+ * **Color Palette**: Dark Slate (`#0F172A`) or Clean Light (`#FFFFFF`), Electric Indigo (`#4F46E5`), Cyan (`#06B6D4`).
59
+ * **Typography**: Modern geometric sans (`Outfit`, `Tajawal`, `Inter`).
60
+ * **Layout Rules**: Bento box feature grids, interactive app preview mockups, pricing tier comparison cards, integration logo grids.
61
+ * **Avoid**: Heavy skeuomorphic textures, illegible display fonts.
62
+
63
+ ---
64
+
65
+ ### 3. FinTech
66
+ * **Visual Register**: Precision, high security, transparency, wealth growth.
67
+ * **Color Palette**: Deep Emerald (`#065F46`), Mint (`#10B981`), Dark Indigo (`#1E1B4B`), Slate (`#F8FAFC`).
68
+ * **Typography**: Tabular numeric typography (`tabular-nums`), clean sans (`Outfit`, `Tajawal`).
69
+ * **Layout Rules**: Tabular data displays, security badge trust bars, live balance widgets, crisp financial chart surfaces.
70
+ * **Avoid**: Low-contrast text, informal casual microcopy, playful pastel colors.
71
+
72
+ ---
73
+
74
+ ### 4. AI & Emerging Tech
75
+ * **Visual Register**: Innovation, intelligence, futuristic capabilities, fluid power.
76
+ * **Color Palette**: Pitch Black (`#090A0F`), Luminescent Cyan (`#06B6D4`), Neon Purple (`#7C3AED`), Mesh Gradients.
77
+ * **Typography**: Ultra-clean sans (`Outfit`, `Inter`) paired with monospaced prompt accents (`JetBrains Mono`).
78
+ * **Layout Rules**: Aurora mesh gradient backgrounds, interactive prompt bars, glowing input borders, clean dark theme.
79
+ * **Avoid**: Traditional corporate clip-art, heavy paper textures.
80
+
81
+ ---
82
+
83
+ ### 5. Healthcare & Wellness
84
+ * **Visual Register**: Calm, empathy, hygiene, human warmth, accessible clarity.
85
+ * **Color Palette**: Soft Teal (`#0D9488`), Sage Green (`#047857`), Warm Ivory (`#FDFBF7`), Soft Blue (`#0284C7`).
86
+ * **Typography**: Highly legible rounded sans-serifs (`Tajawal`, `Outfit`, `Almarai`).
87
+ * **Layout Rules**: Generous padding, large accessible touch targets (≥44px), calm color transitions, clear patient steps.
88
+ * **Avoid**: Harsh neon contrast, aggressive countdown timers, jarring animation bounces.
89
+
90
+ ---
91
+
92
+ ### 6. Education & EdTech
93
+ * **Visual Register**: Playful engagement, encouragement, progressive growth, clarity.
94
+ * **Color Palette**: Vibrant Primary Triad (Soft Violet `#7C3AED`, Amber `#F59E0B`, Emerald `#10B981`, Sky `#0284C7`).
95
+ * **Typography**: Friendly approachble fonts (`Outfit`, `Tajawal`).
96
+ * **Layout Rules**: Gamified progress meters, rounded cards (`rounded-2xl`), badge rewards, interactive step cards.
97
+ * **Avoid**: Overly dense corporate tables, dark dystopian cyber-themes.
98
+
99
+ ---
100
+
101
+ ### 7. Luxury & Haute Couture
102
+ * **Visual Register**: Exclusivity, craftsmanship, prestige, timeless elegance.
103
+ * **Color Palette**: Espresso Black (`#0B0D10`), Warm Cream (`#FBF8F2`), Muted Gold (`#A97B33`), Ink (`#241812`).
104
+ * **Typography**: Display serifs (`El Messiri`, `Cormorant Garamond`) with delicate light-weight Latin accents.
105
+ * **Layout Rules**: Massive negative space, centered product cutouts, minimal navigation, dark/light theme commitment.
106
+ * **Avoid**: Cheap gradient badges, busy multi-column grids, aggressive sales banners.
107
+
108
+ ---
109
+
110
+ ### 8. E-Commerce & Retail
111
+ * **Visual Register**: Immediate desire, friction-free purchase flow, trust proof.
112
+ * **Color Palette**: High-contrast Primary CTA (`#4F46E5` or `#000000`), Neutral Surface (`#FFFFFF`), Soft Tint (`#F8FAFC`).
113
+ * **Typography**: Clear sans-serifs (`Outfit`, `Tajawal`).
114
+ * **Layout Rules**: Hero product image, price tag display, sticky buy bar on scroll, customer star review badges, variant selectors.
115
+ * **Avoid**: Hiding pricing or buy buttons below multiple screens of filler text.
116
+
117
+ ---
118
+
119
+ ## 🧠 8 UX Design Philosophies
120
+
121
+ ### 1. Minimalism & Flat Design
122
+ Strips away all non-essential visual fluff. Focuses on negative space, crisp typography, and clear focal hierarchy.
123
+
124
+ ### 2. Emotional Design
125
+ Incorporate purposeful micro-interactions and microcopy across 4 whimsy tiers (subtle feedback, task celebrations, discovery Easter eggs, contextual microcopy) to make interfaces delightful.
126
+
127
+ ### 3. Human-Centered Experience (HCD)
128
+ Design for human cognitive limits: progressive disclosure of complex features, clear visual hierarchy, max 3 words on primary CTAs, predictable interaction models.
129
+
130
+ ### 4. Accessibility-First (WCAG 2.1 AA)
131
+ Minimum 4.5:1 contrast for body text, 3:1 for large display text/UI controls. Touch targets minimum 44px on touch viewports. Never suppress focus outlines without a `color-mix()` replacement ring.
132
+
133
+ ### 5. Mobile-First & Responsive Physics
134
+ Design layout containers to collapse fluidly from desktop (`2xl` 1536px) to mobile (`sm` 640px). Place primary actions within natural thumb-reach zones.
135
+
136
+ ### 6. Arabic RTL First (Bidi-Native)
137
+ Design natively for Right-to-Left languages (`dir="rtl"`). Use CSS logical properties (`margin-inline-start`, `padding-inline`, `border-inline-end`). Pair **El Messiri** (headings) + **Tajawal** (body); never Amiri above 24px.
138
+
139
+ ### 7. Dark Mode Native
140
+ Treat dark mode as a first-class citizen using `brand.json` v2 dual-mode tokens (`colors.light` & `colors.dark`). Use tinted dark neutrals (`#0F172A`, `#1E293B`) instead of flat pure black `#000000`.
141
+
142
+ ### 8. Mixed Media Maximalism
143
+ Embrace high visual density, kinetic typography, multi-layered collage imagery, and bold color contrast for youth-focused, creative, or entertainment brands.
@@ -0,0 +1,81 @@
1
+ # 18 · Design Decision Engine Rules & Protocols
2
+
3
+ System operational rules for `tidyfactor-design` that transform visual references into deterministic, repeatable, and non-contradictory design decisions.
4
+
5
+ ---
6
+
7
+ ## 🌳 1. The 9-Step Design Decision Tree Protocol
8
+
9
+ Before selecting visual schools, tokens, or components, every AI agent execution MUST evaluate choices sequentially through this 9-step decision tree:
10
+
11
+ ```
12
+ Step 1: Project Scope → Determine surface type (marketing, dashboard, e-commerce, docs, spatial)
13
+ Step 2: Industry Register → Map domain (Corporate, SaaS, FinTech, AI, Healthcare, Education, Luxury, E-Commerce)
14
+ Step 3: Audience Mode → Classify user state (Inspire, Evaluate, Act, Learn)
15
+ Step 4: Brand Personality → Lock 3-5 tone adjectives (e.g. Precise, Confident, Technical, Calm)
16
+ Step 5: Storytelling → Choose archetype (Cinematic, Editorial, Documentary, Interactive)
17
+ Step 6: UX Philosophy → Lock core principles (Accessibility-first, Mobile-first, RTL-first, Dark Native)
18
+ Step 7: Visual School → Select Primary School & max 1 Secondary Influence from confidence/compatibility matrix
19
+ Step 8: Token Generation → Derive tokens.css & brand.json v2 based on Visual DNA & Color Palettes
20
+ Step 9: Component Behavior → Apply exact component shape, form, and motion language specifications
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 🍲 2. Anti-"Design Soup" Constraint Rule (Mandatory)
26
+
27
+ > [!CAUTION]
28
+ > **AI Anti-Pattern Failure**: AI generators frequently create "Design Soup" by mixing 4-5 clashing design movements on a single page (e.g., Glassmorphism frosted panels + Neo-Brutalist 4px hard black offset shadows + Neumorphic extruded buttons + Cyberpunk glitch effects).
29
+
30
+ ### Strict Mixing Limits
31
+ Unless explicitly requested by the user, an AI Agent MUST NEVER exceed:
32
+ - **1 Primary Visual School** (e.g., Swiss)
33
+ - **1 Secondary Influence** (e.g., Minimalism — MUST be listed as `Compatible` in the school's matrix)
34
+ - **1 Motion Language** (e.g., Subtle / 150ms / ease-out)
35
+ - **1 Storytelling Style** (e.g., Editorial)
36
+ - **1 UX Philosophy Accent** (e.g., RTL-first + Dark Native)
37
+
38
+ Any output violating this cap fails audit and triggers an automatic revision pass.
39
+
40
+ ---
41
+
42
+ ## ⚡ 3. Executable Signature Element Rule
43
+
44
+ Every visual school defines a **Concrete Executable Signature Element**. The AI Agent MUST render this signature element at least 1-2 times on every project page to ensure the interface has distinct visual identity:
45
+
46
+ | Visual School | Executable Signature Element | Mechanical Implementation |
47
+ |---|---|---|
48
+ | **Swiss** | Asymmetric Grid Lines & Huge Type | Hairline 1px grid borders (`#E2E8F0`), display type `clamp(3rem,8vw,6rem)`, zero shadow |
49
+ | **Flat** | Saturated 2D Color Blocks | Solid 2D fills, `border-radius: 8px`, 0px shadow, high-contrast flat icon badges |
50
+ | **Material** | Floating Elevation Sheet & FAB | Floating action button, `box-shadow: 0 4px 12px rgba(0,0,0,0.15)`, touch ripple feedback |
51
+ | **Minimalism** | Massive Negative Space & Single Focal Point | Section padding `96px`+, max 1 accent color, zero clutter |
52
+ | **Neo-Brutalism** | Hard Offset Box Shadow & Black Border | `box-shadow: 4px 4px 0px #000000`, `border: 2px solid #000000`, sharp/rounded corners |
53
+ | **Bauhaus** | Primary Color Block Geometry | Red/Blue/Yellow color blocking, circular accent containers mixed with sharp grids |
54
+ | **Skeuomorphism** | Dual Inner/Outer Bevel & Tactile Surface | `box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 4px 12px rgba(0,0,0,0.2)` |
55
+ | **Glassmorphism** | Frosted Glass Pill / Card | `backdrop-filter: blur(12px) saturate(180%)`, `background: rgba(255,255,255,0.12)`, `border: 1px solid rgba(255,255,255,0.2)` |
56
+ | **Maximalism** | Layered Collage & Kinetic Marquee | Overlapping sticker badges, infinite text marquee ticker, dense typography contrast |
57
+ | **Industrial** | Monospaced Blueprint Telemetry | Monospace font, crosshair markers, `● LIVE` status indicator dots, titanium grounds |
58
+ | **Bento Box** | Modular Masonry Tiles | `border-radius: 20px`–`24px` compartmentalized cards, 1px subtle border |
59
+ | **Aurora UI** | Luminescent Mesh Gradient Spotlight | Radial glowing mesh gradient (`blur(60px)`) behind hero cutout or primary card |
60
+ | **Neumorphism** | Dual Soft Extrusion Shadow | Light/Dark dual shadow (`box-shadow: 6px 6px 12px #b8b9be, -6px -6px 12px #ffffff`) |
61
+ | **Corporate Memphis** | Soft Pastel Pill Containers | `border-radius: 9999px` soft pill buttons, warm pastel background panels |
62
+ | **Cyberpunk** | Neon Glow Border & Monospace HUD | `box-shadow: 0 0 12px rgba(0,240,255,0.5)`, monospaced telemetry headers, pitch black ground |
63
+ | **Claymorphism** | Soft Clay 3D Extrusion | `border-radius: 24px`+, deep inner light reflection + warm outer shadow |
64
+ | **Isometric** | 30° Parallel Perspective SVG | SVG 30° parallel projection vector diagram or feature illustration |
65
+ | **Kinetic Type** | Interactive Scaling Display Headline | `font-size: clamp(4rem, 12vw, 9rem)` headline, hover stretch effect |
66
+ | **Organic UI** | Asymmetrical Morphing Blob | Fluid asymmetrical blob border (`border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%`) |
67
+ | **Frutiger Aero** | Glossy Glass Overlay & Aero Pill | Linear glossy highlight (`background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 50%)`) |
68
+
69
+ ---
70
+
71
+ ## 📊 4. School Evaluation Dimensions Schema
72
+
73
+ Every movement entry in `memory/16-design-movements-guide.md` is structured using 7 standardized evaluation dimensions:
74
+
75
+ 1. **Confidence Matrix**: Rated `★` to `★★★★★` across 6 surface targets (`production`, `marketing`, `dashboard`, `landing`, `mobile`, `accessibility`).
76
+ 2. **Compatibility Matrix**: Explicit lists of `Compatible` secondary schools and `Avoid / Not Recommended` clashing schools.
77
+ 3. **Brand Personality**: 4-6 tone keywords governing copy tone, media choices, and hover states.
78
+ 4. **Visual DNA Vector**: Rated `★` to `★★★★★` across 8 design dimensions (`Grid`, `Typography`, `Geometry`, `Illustration`, `Motion`, `Texture`, `Photography`, `Depth`).
79
+ 5. **Component Behaviour**: Concrete styling for `Buttons`, `Cards`, `Forms`, `Navigation`, and `Search`.
80
+ 6. **Motion Language**: Specified `Duration`, `Curve`, `Energy`, `Scroll`, and `Hover` behavior.
81
+ 7. **Executable Signature Element**: Exact CSS/HTML code snippet for the school's signature tell.
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@tidyfactor/design",
3
+ "version": "1.5.0",
4
+ "description": "TidyFactor Design track — code-native UI design lifecycle engine (Figma alternative) with Contextual Decision Layer (CDL)",
5
+ "main": "SKILL.md",
6
+ "bin": {
7
+ "tidyfactor-design": "bin/add-skill.js",
8
+ "add-skill": "bin/add-skill.js",
9
+ "add-design-skill": "bin/add-skill.js"
10
+ },
11
+ "keywords": [
12
+ "tidyfactor",
13
+ "design-system",
14
+ "ui-design",
15
+ "figma-alternative",
16
+ "code-native",
17
+ "prototyping",
18
+ "arabic-ui",
19
+ "rtl",
20
+ "ai-agents",
21
+ "antigravity",
22
+ "claude-code",
23
+ "cursor"
24
+ ],
25
+ "author": "TidyFactor <hello@tidyfactor.com> (https://tidyfactor.com)",
26
+ "license": "Apache-2.0",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/TidyFactor/Design.git"
30
+ },
31
+ "scripts": {
32
+ "validate": "python tools/validate_skill.py",
33
+ "build": "node tools/build-skill.js",
34
+ "release": "python ../tools/release_skill.py ."
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "files": [
40
+ ".tidyfactor",
41
+ "AGENTS.md",
42
+ "CHANGELOG.md",
43
+ "LICENSE",
44
+ "README.ar.md",
45
+ "README.de.md",
46
+ "README.es.md",
47
+ "README.fa.md",
48
+ "README.fr.md",
49
+ "README.md",
50
+ "README.pt.md",
51
+ "README.zh.md",
52
+ "SKILL-REGISTRY.md",
53
+ "SKILL.md",
54
+ "VISION.md",
55
+ "assets",
56
+ "bin",
57
+ "brand.json",
58
+ "memory",
59
+ "references",
60
+ "scripts",
61
+ "templates",
62
+ "tools"
63
+ ]
64
+ }
@@ -0,0 +1,27 @@
1
+ # Command: `<name>` — <Short Title>
2
+
3
+ ## Purpose
4
+ One or two sentences: what this command extracts/organizes, and why it's
5
+ its own command rather than folded into another one.
6
+
7
+ ## When to run it
8
+ - Signal from the audit that suggests this command applies.
9
+ - User phrasing that should trigger it (besides the bare command word).
10
+
11
+ ## What it does
12
+ Numbered steps — concrete actions, not vague principles.
13
+
14
+ ## Output convention
15
+ ```
16
+ Example file tree fragment showing where output lands.
17
+ ```
18
+
19
+ ## Checklist
20
+ - [ ] Concrete, checkable outcomes for this command specifically.
21
+
22
+ ---
23
+ To register a new command:
24
+ 1. Copy this file to `references/commands/<name>.md` and fill it in.
25
+ 2. Add a row to the Command Index table in `SKILL.md`.
26
+ 3. If it interacts with an existing command (consumes/produces the same
27
+ files), cross-reference it in both files' "What it does" sections.
@@ -0,0 +1,35 @@
1
+ # Command: `assets` — Asset Processing & Media Optimization Engine
2
+
3
+ Runtime entry point for generating AI media, removing image backgrounds, and optimizing image payloads.
4
+
5
+ ## 5-Layer AI Photography Prompt Construction Matrix
6
+
7
+ When generating visual assets with `generate_image` or external AI image engines, construct prompts across 5 technical photography layers:
8
+
9
+ 1. **Subject Layer**: Primary subject, micro-textures, pose, surface materials (e.g. brushed aluminum, matte leather).
10
+ 2. **Environment Layer**: Setting, time of day, atmospheric conditions (fog, volumetric haze, studio backdrop).
11
+ 3. **Lighting Layer**: Source (softbox, natural light), direction (Rembrandt, split, backlit), color temperature.
12
+ 4. **Technical Photography Layer**: Perspective, focal length (85mm f/1.4), depth of field / bokeh (`f/1.8` shallow focus).
13
+ 5. **Post-Processing & Film Stock Layer**: Color grading, subtle film grain, Kodak Portra 400 aesthetic.
14
+
15
+ ## Python Asset Tooling
16
+
17
+ 1. **Background Removal**: `python scripts/remove_backgrounds.py <input_path>` (rembg + Pillow transparent PNG cutouts).
18
+ 2. **Batch Optimization**: `python scripts/optimize_images.py <assets_dir>` (compress WebP variants).
19
+ 3. **Asset Inspection**: `python scripts/inspect_images.py <assets_dir>` (dimension & size budget check).
20
+
21
+ ## Output Convention
22
+
23
+ ```
24
+ my-prototype/
25
+ └── assets/
26
+ ├── hero-cutout.png ← BG-removed cutout
27
+ ├── banner.webp ← WebP compressed asset
28
+ └── photo-01.webp ← 5-Layer AI prompt generated asset
29
+ ```
30
+
31
+ ## Checklist
32
+
33
+ - [ ] AI image prompts structured across all 5 technical photography layers
34
+ - [ ] Product cutouts have clean transparent backgrounds (`rembg`)
35
+ - [ ] Prototype assets optimized to WebP format (< 500KB payload per image)
@@ -0,0 +1,15 @@
1
+ # Command: `audit` — Structural Consistency & Health Report
2
+
3
+ Runtime entry point for auditing prototype compliance and structural integrity (read-only by default).
4
+
5
+ ## Dispatch steps
6
+
7
+ 1. Load `references/memory/architecture.md` — locked file tree layout and consistency rules.
8
+ 2. Load `memory/06-quality-bar.md` — quality bar criteria.
9
+ 3. Load `references/workflows/audit-prototype.md` — check sequence and report format.
10
+ 4. Execute audit steps per `audit-prototype.md` and produce a read-only health report.
11
+
12
+ ## Checklist
13
+
14
+ - [ ] Audit is read-only unless explicit fix requested
15
+ - [ ] `references/workflows/audit-prototype.md` validation checklist fully satisfied
@@ -0,0 +1,85 @@
1
+ # Command: `brand` — Brand Identity Scaffolding & Extraction
2
+
3
+ Runtime entry point for creating, extracting, or evolving `brand.json` v2. Part of the **Foundation** lifecycle phase.
4
+
5
+ ## When to use
6
+
7
+ - **New project** → scaffold `brand.json` from scratch with user interview
8
+ - **Existing identity** → extract `brand.json` from a live site, PDF guidelines, or logo + reference photos (the `clone-brand` path)
9
+ - **Schema upgrade** → migrate `brand.json` v1 to v2
10
+
11
+ ## Dispatch Steps
12
+
13
+ 1. Load `memory/11-brand-json-v2.md` — full schema reference.
14
+ 2. Load `memory/02-design-tokens.md` — token derivation rules.
15
+ 3. Determine path: **scaffold** (no existing identity) or **extract** (existing site/PDF/assets).
16
+ 4. Execute the appropriate protocol below.
17
+
18
+ ## Path A: Scaffold (new identity)
19
+
20
+ ### Interview (ask these in order)
21
+ 1. **Product name + tagline** → `meta.product`, `meta.tagline`
22
+ 2. **Logo files** → `identity.logo.*` (SVG preferred; if unavailable, flag as missing — do NOT fabricate)
23
+ 3. **Primary color + accent** → seed `colors.light.primary`, `colors.light.accent`
24
+ 4. **Light or dark default?** → determines which mode's `background`/`surface`/`text` values are set first
25
+ 5. **Voice/tone** → `voice.tone`, `voice.personality` (3 adjectives)
26
+ 6. **Foundation** → `foundation` (one of 8 supported options)
27
+ 7. **Design school** → `school` (one of the movements in `memory/01-design-schools.md`)
28
+ 8. **Locales** → `localization.supportedLocales`, `localization.rtl`
29
+
30
+ ### Auto-derived tokens
31
+ From the primary color + mode choice, auto-generate:
32
+ - `primaryForeground` (contrast-safe white or dark)
33
+ - `secondary` (complementary hue shift)
34
+ - `surface`, `surface2`, `border` (tinted neutrals — NEVER pure black/white)
35
+ - Dark mode mirror tokens (shift lightness, preserve hue)
36
+ - `shadows.focusRing` using `color-mix()` from the primary
37
+
38
+ ## Path B: Extract (existing identity → `brand.json`)
39
+
40
+ ### What to extract, and from where
41
+
42
+ | Token | Primary source | Fallback |
43
+ |---|---|---|
44
+ | `colors.*` | **Computed styles** of existing site's key surfaces (buttons, header bg, body text) — sample actual rendered hex, NOT guesses from screenshots | Ask user for 2–3 hex values |
45
+ | `typography.families.*` | `<link>`/`@font-face` declarations in HTML/CSS | Route through `memory/12-typography-matrix.md` mood table |
46
+ | `voice.*` | Read 3–5 paragraphs of existing marketing copy; infer register | Ask user for 3 adjectives |
47
+ | `identity.logo.*` | Existing logo file (SVG or high-res PNG with transparency) | Flag as missing — do NOT fabricate |
48
+ | `localization.*` | `<html lang>` / `dir` on existing site | Ask which locales needed |
49
+
50
+ ### What NOT to extract
51
+ - **Layout or page structure** — not a `brand.json` token
52
+ - **Exact copy text** — voice *rules* transfer, literal sentences don't
53
+ - **Font files** — only family *names*, resolved against Google Fonts. Non-Google fonts flagged, NOT silently substituted
54
+
55
+ ### Extract procedure
56
+ 1. Confirm source (URL / PDF / assets)
57
+ 2. Extract candidate tokens per table above
58
+ 3. **Present draft `brand.json` to user before writing** — extraction is inference, not ground truth
59
+ 4. Once confirmed, write `brand.json` and validate
60
+
61
+ ## Path C: Migrate (v1 → v2)
62
+
63
+ Load `memory/11-brand-json-v2.md` migration table and transform:
64
+ - Flat `colors.primary` → `colors.light.primary` + `colors.dark.primary`
65
+ - `typography.headings.arabic` → `typography.families.arabicHeading`
66
+ - Add missing sections: `shadows`, `radius`, `spacing`, `motion`, `breakpoints`, `iconography`, `components`, `localization`, `accessibility`
67
+
68
+ ## Output Convention
69
+
70
+ After any path, the final `brand.json` must:
71
+ 1. Pass JSON validation
72
+ 2. Have `$schema: "brand-core-v2"`
73
+ 3. Have all 16 tokens in both `colors.light` and `colors.dark`
74
+ 4. Have `motion.reducedMotion` policy stated
75
+ 5. Have `accessibility.minTouchTarget` ≥ 44px
76
+
77
+ ## Checklist
78
+
79
+ - [ ] `$schema` is `"brand-core-v2"`
80
+ - [ ] Both color modes have all 16 semantic tokens
81
+ - [ ] No pure `#000000` or `#ffffff` in any surface token
82
+ - [ ] Contrast passes WCAG AA on all text/background pairings
83
+ - [ ] `googleFontsUrl` loads ONLY families referenced in `typography.families`
84
+ - [ ] Logo files exist or are explicitly flagged as missing
85
+ - [ ] Draft was confirmed by user before writing (extract path)
@@ -0,0 +1,107 @@
1
+ # Command: `brief` — Design Context Gate & Fit Test
2
+
3
+ Runtime entry point for establishing design context before any build begins. Part of the **Discovery** lifecycle phase.
4
+
5
+ ## When to use
6
+
7
+ - **Always** before `init`, `page`, `dashboard`, or `components` — the brief ensures the design has intention, not defaults.
8
+ - After `study` if a reference was analyzed.
9
+ - Whenever a design request lacks context ("build me a landing page" without audience/tone/purpose).
10
+
11
+ ## The 3-Question Design-Context Gate
12
+
13
+ ### Question 1: Audience
14
+ > Who is the primary audience, and what is their emotional state when they arrive?
15
+
16
+ **Why it matters**: A B2B decision-maker comparing vendors arrives in *evaluate mode* (needs tables, specs, trust signals). A luxury buyer arrives in *aspire mode* (needs atmosphere, restraint, desire). The same "landing page" requires completely different design DNA.
17
+
18
+ **Classify into**:
19
+ | Mode | Characteristics | Design implications |
20
+ |---|---|---|
21
+ | **Inspire** | Browse, dream, aspirate | Atmospheric, generous whitespace, cinematic motion, minimal text |
22
+ | **Evaluate** | Compare, decide, justify | Data-forward, specs tables, social proof, clear pricing |
23
+ | **Act** | Purchase, sign up, convert | Friction-free, prominent CTA, trust signals, minimal distraction |
24
+ | **Learn** | Study, explore, understand | Content-rich, good typography, navigation, readable hierarchy |
25
+
26
+ ### Question 2: Use Case / Surface Type
27
+ > What kind of surface is this?
28
+
29
+ | Surface | Layout suggestions | Foundation fit |
30
+ |---|---|---|
31
+ | Marketing landing page | `film`, `story`, `minimal` (from `memory/13-layout-archetypes.md`) | native, tailwind |
32
+ | Product / e-commerce | `product`, `store` | tailwind, daisyui |
33
+ | Dashboard / app screen | Use `dashboard` command | native, shadcn |
34
+ | Documentation / content | Use `page` command with editorial school | native, pico |
35
+ | Real estate / spatial | `space` | tailwind |
36
+ | Personal brand / portfolio | `creator` | native, pico |
37
+
38
+ ### Question 3: Tone / Design School
39
+ > What emotional register should the design communicate?
40
+
41
+ Route to `memory/01-design-schools.md` and lock one of:
42
+ - **Minimalist**: Restraint, whitespace, typography-driven
43
+ - **Brutalist**: Raw, exposed, high-contrast, intentionally rough
44
+ - **Neo-skeuomorphic**: Tactile, soft shadows, warm surfaces
45
+ - **Glassmorphic**: Frosted glass, translucency, depth layers
46
+ - **Editorial**: Magazine layout, strong hierarchy, serif typography
47
+ - **Playful**: Rounded, vibrant, animated, friendly
48
+
49
+ ## The 9-Step Design Decision Tree Protocol (`memory/18-design-decision-engine.md`)
50
+
51
+ Execute decisions sequentially to prevent random or clashing visual choices:
52
+
53
+ ```
54
+ Step 1: Project Scope → Determine surface type (marketing, dashboard, e-commerce, docs, spatial)
55
+ Step 2: Industry Register → Map domain (Corporate, SaaS, FinTech, AI, Healthcare, Education, Luxury, E-Commerce)
56
+ Step 3: Audience Mode → Classify user state (Inspire, Evaluate, Act, Learn)
57
+ Step 4: Brand Personality → Lock 3-5 tone adjectives (from memory/16-design-movements-guide.md)
58
+ Step 5: Storytelling → Choose archetype (Cinematic, Editorial, Documentary, Interactive)
59
+ Step 6: UX Philosophy → Lock core principles (Accessibility-first, Mobile-first, RTL-first, Dark Native)
60
+ Step 7: Visual School → Select Primary School & max 1 Secondary Influence from compatibility matrix
61
+ Step 8: Token Generation → Derive tokens.css & brand.json v2 based on Visual DNA & Color Palettes
62
+ Step 9: Component Behavior → Apply exact component shape, form, motion language, & executable signature
63
+ ```
64
+
65
+ ### Mandatory Constraint: Anti-"Design Soup" Rule
66
+ Never combine more than:
67
+ - **1 Primary School**
68
+ - **1 Secondary Influence** (must be listed as `compatible` in the primary school's matrix)
69
+ - **1 Motion Language**
70
+ - **1 Storytelling Style**
71
+ - **1 UX Philosophy Accent**
72
+
73
+ ## Fit Test (3-Question Filter)
74
+
75
+ After the context gate, run the fit test to confirm the right tool:
76
+
77
+ 1. **One clear subject?** (one product / one brand / one space / one person) → ✅ proceed. Multiple products / catalog → route to `store` layout.
78
+ 2. **Transformation arc?** (before→after, raw→finished, outside→inside) → ✅ `film` layout. Static spec → `story` or `editorial` layout.
79
+ 3. **User in inspire mode?** → ✅ cinematic/atmospheric. Evaluate/compare mode → data-forward layout.
80
+
81
+ ## Output: Design Brief
82
+
83
+ ```markdown
84
+ ## Design Brief
85
+
86
+ ### Context
87
+ - **Audience**: [description] — [inspire/evaluate/act/learn] mode
88
+ - **Surface**: [marketing / product / dashboard / docs / portfolio]
89
+ - **Tone**: [design school] — [2-3 adjective mood words]
90
+
91
+ ### Decisions Locked
92
+ - **Foundation**: [native / tailwind / daisyui / hybrid / shadcn / pico / bootstrap / alpine]
93
+ - **Layout Archetype**: [film / story / space / app / creator / product / store / auto]
94
+ - **Typography Route**: [from memory/12-typography-matrix.md mood table]
95
+ - **Color Direction**: [dark luxury / light gallery / warm / cool / vibrant]
96
+
97
+ ### What to Build
98
+ - [Specific sections and features based on the brief]
99
+ ```
100
+
101
+ ## Checklist
102
+
103
+ - [ ] All 3 context questions answered before building
104
+ - [ ] Audience mode classified (inspire / evaluate / act / learn)
105
+ - [ ] Surface type matched to layout archetype
106
+ - [ ] Design school locked and documented
107
+ - [ ] Foundation chosen and will not change mid-project
@@ -0,0 +1,26 @@
1
+ # Command: `clone` — Reverse-Engineering & Design System Extraction
2
+
3
+ Runtime entry point for reverse-engineering an external website reference into a clean, code-native prototype design system.
4
+
5
+ ## Computed-Style Extraction Protocol
6
+
7
+ When reverse-engineering an existing brand reference:
8
+ 1. **Computed Styles**: Sample actual rendered hex values from `getComputedStyle()` on key DOM elements (buttons, headers, body text) rather than visual guesses from screenshots.
9
+ 2. **Typography Declarations**: Read exact font family names from `<link>` tags and `@font-face` declarations.
10
+ 3. **Draft Confirmation**: Always present extracted `brand.json` v2 drafts back to the user for explicit confirmation before writing as final.
11
+ 4. **Token Isolation**: Extract design system tokens ONLY — do not carry over source layout structure or literal copy text.
12
+
13
+ ## Dispatch Steps
14
+
15
+ 1. Load `references/memory/architecture.md` — locked file tree layout and consistency rules.
16
+ 2. Load `memory/03-narrative-conversion.md` — token derivation rules.
17
+ 3. Load `references/workflows/clone-prototype.md` — execution sequence, multi-state diffing, and validation checklist.
18
+ 4. Enforce **150-Line Complexity Budget Rule**: split sections exceeding 150-line specs into sub-component tasks.
19
+ 5. Execute workflow steps per `clone-prototype.md`.
20
+
21
+ ## Checklist
22
+
23
+ - [ ] Interaction models (`scroll-driven`, `click-driven`, `hover-driven`) documented before building
24
+ - [ ] Multi-state CSS transition diffs mapped to `tokens.css`
25
+ - [ ] Component specs written to `docs/research/components/`
26
+ - [ ] `references/workflows/clone-prototype.md` validation checklist fully satisfied
@@ -0,0 +1,46 @@
1
+ # Command: `components` — The Shared Component Library & 8-State Demo Wrapper
2
+
3
+ Runtime entry point for authoring shared component classes in `components.css` and generating an 8-state demo preview.
4
+
5
+ ## Purpose
6
+ The mechanism that makes the consistency guarantee real: one place where every reusable visual pattern lives. When building a standalone component, this command authors `components.css` AND generates a temporary 8-state preview wrapper (`<Component>.preview.html`) rendering all interactive states.
7
+
8
+ ## 8-State Component Matrix & Demo Wrapper (`<Component>.preview.html`)
9
+
10
+ When a component is created or updated, generate `<Component>.preview.html` rendering all **8 interactive states** vertically stacked:
11
+
12
+ ```
13
+ ┌──── Component — 8 states ────────────────────────┐
14
+ │ default [ Component default state ] │
15
+ │ hover [ Component hover state ] │ ← .is-hover
16
+ │ focus [ Component focus state ] │ ← .is-focus
17
+ │ active [ Component active state ] │ ← .is-active
18
+ │ disabled [ Component disabled state ] │ ← disabled / aria-disabled
19
+ │ loading [ Component loading state ] │ ← data-state="loading"
20
+ │ error [ Component error state ] │ ← data-state="error"
21
+ │ success [ Component success state ] │ ... data-state="success"
22
+ └────────────────────────────────────────────────┘
23
+ ```
24
+
25
+ ## What it does
26
+
27
+ 1. Confirm `cssFoundation` from `brand.json` and read matching foundation file.
28
+ 2. Author reusable class in `design-system/components.css` referencing tokens in `tokens.css`.
29
+ 3. Support all 8 states in CSS using both pseudo-classes and preview helper classes (`.is-hover`, `.is-focus`, `.is-active`).
30
+ 4. Generate `<Component>.preview.html` for single-file visual validation.
31
+ 5. Never duplicate an existing component under a new name—extend with a modifier class (`.card--compact`, `.btn--accent`).
32
+
33
+ ## Output Convention
34
+
35
+ ```
36
+ design-system/
37
+ ├── components.css ← Reusable component styling with 8-state support
38
+ └── Button.preview.html ← 8-state vertical demo preview wrapper
39
+ ```
40
+
41
+ ## Checklist
42
+
43
+ - [ ] All 8 interactive states supported in `components.css`
44
+ - [ ] `<Component>.preview.html` generated showing all 8 states vertically
45
+ - [ ] Every color/font value traces to a token in `tokens.css`
46
+ - [ ] No hardcoded hex or literal values in component CSS