@tidyfactor/design 1.5.0 → 1.7.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.
package/.tidyfactor CHANGED
@@ -2,10 +2,10 @@
2
2
  "ecosystem": "tidyfactor",
3
3
  "track": "design",
4
4
  "name": "tidyfactor-design",
5
- "version": "1.5.0",
5
+ "version": "1.7.0",
6
6
  "npmPackage": "@alwkala/tidyfactor-design",
7
7
  "github": "https://github.com/TidyFactor/Design",
8
- "skillFile": "../tidyfactor-design-v1.4.0.skill",
8
+ "skillFile": "../tidyfactor-design-v1.7.0.skill",
9
9
  "category": "design-system",
10
10
  "type": "interactive-prototyping",
11
11
  "outputs": [
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to the **[@tidyfactor/design](https://www.npmjs.com/package/@tidyfactor/design)** package will be documented in this file.
4
4
 
5
+ ## [1.7.0] - 2026-09-02
6
+
7
+ ### 🧠 Added — Sovereign Brain MCP Integration & Deterministic Fail-Open Protocol
8
+ - **Brain Integration Contract (`references/memory/20-brain-baas-integration.md`)**: Operational specification codifying the sovereign self-hosted architecture, tenant isolation within local/agency SQLite databases, Design System Knowledge Item (KI) payload schemas, and tool latency classes.
9
+ - **Fail-Open Resolution Protocol (`references/workflows/brief.md`)**: Embedded deterministic context discovery: (1) Local workspace auto-sensing first, (2) Optional Brain MCP context acceleration (`search_knowledge_base`) when active, (3) Instant 0ms silent fallback to 3-question CDL interview if MCP is absent or offline.
10
+ - **Optional Knowledge Item Sync (`references/commands/handoff.md`)**: Added explicit `--sync-brain` flag to export verified Design System Baselines and token maps to local Brain MCP storage.
11
+ - **Tooling Scope & Latency Declarations**: Enriched `SKILL.md` with explicit Rule 10 Tooling Scope and updated `10-python-tooling.md` with execution latency classifications (sub-second AST audits vs async batch media inference).
12
+
13
+ ---
14
+
15
+ ## [1.6.0] - 2026-09-01
16
+
17
+ ### Added - Runtime Tooling Manifest & Egyptian Heritage Design Lanes
18
+ - **Rule 10 Runtime Tooling Contract (`manifest.json`)**: Declared portable `audit_design`, `extract_palette`, and `optimize_media` executable tooling with schema validation.
19
+ - **Automated Design Quality Auditor (`scripts/audit_design.py`)**: Standalone and MCP-compatible CLI engine scanning HTML/CSS for unicode emojis, inline styles, untokenized colors, and the 16 AI anti-patterns with UTF-8 support.
20
+ - **Output JSON Schema (`references/schemas/audit_design.output.schema.json`)**: Standard schema defining structured quality audit reports and pre-emit critique stamps.
21
+ - **Egyptian & Regional Heritage Lanes (`references/memory/19-heritage-lanes-atmosphere.md`)**: Operational design grammar covering Nilotic Wadj & Lotus, Egyptian Nubian Folk & Earth Vaults, Sinai Bedouin Craft, Al-Muqarnas Geometry, and Kufic Modernity.
22
+ - **Bilingual & Responsive Enhancements**: Refined `01-design-schools.md`, `04-motion-principles.md`, `05-component-anatomy.md`, and `08-arabic-bilingual.md`.
23
+
5
24
  ## [1.5.0] - 2026-08-29
6
25
 
7
26
  ### Added - Global Multi-Tier & Multi-Language Documentation Architecture
package/README.ar.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <img src="assets/hero-banner.png" alt="TidyFactor Design Hero Banner" width="100%">
5
5
  </p>
6
6
 
7
- # 🎨 TidyFactor Design `v1.5.0`
7
+ # 🎨 TidyFactor Design `v1.6.0`
8
8
  ### محرك دورة حياة تصميم الواجهات ومحرك النماذج التفاعلية المناهض للتكرار
9
9
 
10
10
  **البداية الرسمية لبناء نظام التصميم والدورة الكاملة لتصميم الواجهات التفاعلية ضمن منظومة TidyFactor Ecosystem.**
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <img src="assets/hero-banner.png" alt="TidyFactor Design Hero Banner" width="100%">
5
5
  </p>
6
6
 
7
- # 🎨 TidyFactor Design `v1.5.0`
7
+ # 🎨 TidyFactor Design `v1.6.0`
8
8
  ### Code-Native UI Design Lifecycle Engine & Anti-Slop Design System Suite
9
9
 
10
10
  **The official UI design & interactive prototyping foundation for the TidyFactor Ecosystem.**
package/SKILL.md CHANGED
@@ -44,3 +44,11 @@ Read only the command file that matches the request. Do not load all commands si
44
44
  3. **Single CSS Foundation**: Lock Native, Tailwind, daisyUI, Pico, or Hybrid once per project; never mix foundations.
45
45
  4. **Typography Discipline**: Arabic display headings use El Messiri, body copy uses Tajawal. Never use Amiri for headings above 24px.
46
46
  5. **7-Axis Pre-Emit Critique**: All components and layouts must be evaluated with `/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */`.
47
+
48
+ ## Tooling Scope (Rule 10)
49
+
50
+ - **Languages**: Python 3 (stdlib, Pillow/rembg for asset optimization)
51
+ - **Mutations**: Read-only audits (`audit_design`), file creation (`extract_palette`), image processing (`optimize_assets`)
52
+ - **Network**: None required
53
+ - **Companion MCP**: Invocable via `tidyfactor-brain`'s `run_skill_tool(skill_id="tidyfactor-design", ...)`
54
+
package/bin/add-skill.js CHANGED
@@ -1,31 +1,65 @@
1
- #!/usr/bin/env node
2
- /**
3
- * bin/add-skill.js — CLI installer wrapper for tidyfactor-design
4
- */
5
-
6
- const fs = require('fs');
7
- const path = require('path');
8
-
9
- const targetDir = process.cwd();
10
- const skillSource = path.resolve(__dirname, '..');
11
- const agentSkillsDir = path.join(targetDir, '.agents', 'skills', 'tidyfactor-design');
12
-
13
- fs.mkdirSync(agentSkillsDir, { recursive: true });
14
-
15
- function copyRecursive(src, dest) {
16
- const entries = fs.readdirSync(src, { withFileTypes: true });
17
- for (const entry of entries) {
18
- const srcPath = path.join(src, entry.name);
19
- const destPath = path.join(dest, entry.name);
20
- if (['.git', 'node_modules', 'dist'].includes(entry.name)) continue;
21
- if (entry.isDirectory()) {
22
- fs.mkdirSync(destPath, { recursive: true });
23
- copyRecursive(srcPath, destPath);
24
- } else {
25
- fs.copyFileSync(srcPath, destPath);
26
- }
27
- }
28
- }
29
-
30
- copyRecursive(skillSource, agentSkillsDir);
31
- console.log('✓ Successfully injected tidyfactor-design skill into .agents/skills/tidyfactor-design');
1
+ #!/usr/bin/env node
2
+ /**
3
+ * bin/add-skill.js — Multi-Agent Skill Installer Wrapper for tidyfactor-design
4
+ * Supports Trae, Cursor, Windsurf, Antigravity, GitHub Copilot, RooCode, OpenCode, KiloCode, Warp, and Universal.
5
+ *
6
+ * @license Apache-2.0
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+ const os = require('os');
12
+
13
+ const targetDir = process.cwd();
14
+ const skillSource = path.resolve(__dirname, '..');
15
+ const skillName = 'tidyfactor-design';
16
+
17
+ const AGENT_MAP = [
18
+ { name: 'Trae AI IDE', dir: path.join(targetDir, '.trae', 'skills', skillName), test: path.join(targetDir, '.trae') },
19
+ { name: 'Cursor IDE', dir: path.join(targetDir, '.cursor', 'skills', skillName), test: path.join(targetDir, '.cursor') },
20
+ { name: 'Windsurf Cascade', dir: path.join(targetDir, '.windsurf', 'skills', skillName), test: path.join(targetDir, '.windsurf') },
21
+ { name: 'GitHub Copilot', dir: path.join(targetDir, '.github', 'prompts', skillName), test: path.join(targetDir, '.github') },
22
+ { name: 'RooCode', dir: path.join(targetDir, '.roo', 'skills', skillName), test: path.join(targetDir, '.roo') },
23
+ { name: 'OpenCode / Zen', dir: path.join(targetDir, '.opencode', 'skills', skillName), test: path.join(targetDir, '.opencode') },
24
+ { name: 'KiloCode', dir: path.join(targetDir, '.kilocode', 'skills', skillName), test: path.join(targetDir, '.kilocode') },
25
+ { name: 'Warp Terminal', dir: path.join(targetDir, '.warp', 'skills', skillName), test: path.join(targetDir, '.warp') },
26
+ { name: 'Kiro Spec IDE', dir: path.join(targetDir, '.kiro', 'skills', skillName), test: path.join(targetDir, '.kiro') },
27
+ { name: 'Claude Code', dir: path.join(targetDir, '.claude', 'skills', skillName), test: path.join(targetDir, '.claude') },
28
+ { name: 'Zed AI Agent', dir: path.join(targetDir, '.zed', 'skills', skillName), test: path.join(targetDir, '.zed') },
29
+ { name: 'Google Antigravity/Gemini', dir: path.join(targetDir, '.agents', 'skills', skillName), test: path.join(targetDir, '.agents') },
30
+ ];
31
+
32
+ function copyRecursive(src, dest) {
33
+ fs.mkdirSync(dest, { recursive: true });
34
+ const entries = fs.readdirSync(src, { withFileTypes: true });
35
+ for (const entry of entries) {
36
+ const srcPath = path.join(src, entry.name);
37
+ const destPath = path.join(dest, entry.name);
38
+ if (['.git', 'node_modules', 'dist'].includes(entry.name)) continue;
39
+ if (entry.isDirectory()) {
40
+ copyRecursive(srcPath, destPath);
41
+ } else {
42
+ fs.copyFileSync(srcPath, destPath);
43
+ }
44
+ }
45
+ }
46
+
47
+ // Determine installation targets
48
+ let mountedTargets = [];
49
+
50
+ for (const agent of AGENT_MAP) {
51
+ if (fs.existsSync(agent.test)) {
52
+ copyRecursive(skillSource, agent.dir);
53
+ mountedTargets.push(agent.name + ' (' + path.relative(targetDir, agent.dir) + ')');
54
+ }
55
+ }
56
+
57
+ // Always ensure universal fallback in .agents/skills/
58
+ const defaultDir = path.join(targetDir, '.agents', 'skills', skillName);
59
+ copyRecursive(skillSource, defaultDir);
60
+ if (!mountedTargets.some(t => t.includes('.agents'))) {
61
+ mountedTargets.push('Universal Default (.agents/skills/' + skillName + ')');
62
+ }
63
+
64
+ console.log('✨ Successfully injected ' + skillName + ' into:');
65
+ mountedTargets.forEach(t => console.log(' • ' + t));
package/brand.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "TidyFactor Design",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "schemaVersion": "brand-core-v2",
5
5
  "meta": {
6
6
  "product": "TidyFactor Design System",
7
7
  "tagline": "Code-Native Interactive Prototyping Engine",
8
8
  "description": "A zero-bundler, framework-free design system and UI prototyping engine with pluggable CSS foundations and full Arabic/RTL support.",
9
- "version": "1.4.0",
10
- "lastUpdated": "2026-08-25"
9
+ "version": "1.7.0",
10
+ "lastUpdated": "2026-09-02"
11
11
  },
12
12
  "identity": {
13
13
  "logo": {
package/manifest.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "manifest_schema_version": "1.0.0",
3
+ "skill_id": "tidyfactor-design",
4
+ "skill_root_anchor": "self",
5
+ "tools": [
6
+ {
7
+ "name": "audit_design",
8
+ "description": "Scans index.html and design-system/*.css for emoji, inline styles, off-token colors, and the 16 AI anti-patterns.",
9
+ "entrypoint": { "runtime": "python3", "script": "scripts/audit_design.py" },
10
+ "invocation": {
11
+ "cli_pattern": "{runtime} \"{skill_root}/{script}\" --target \"{target_path}\" {flags}",
12
+ "args": [
13
+ { "name": "target_path", "type": "path", "required": true, "description": "Absolute path to the client project being audited" },
14
+ { "name": "fix", "type": "boolean", "required": false, "default": false, "flag": "--fix", "description": "Auto-fix violations where safe" }
15
+ ]
16
+ },
17
+ "output": {
18
+ "format": "json",
19
+ "channel": "stdout",
20
+ "schema_ref": "references/schemas/audit_design.output.schema.json"
21
+ },
22
+ "runtime_requirements": { "isolation_recommended": false, "dependencies": [] },
23
+ "invoked_by_commands": ["audit", "perf"]
24
+ },
25
+ {
26
+ "name": "extract_palette",
27
+ "description": "Computes WCAG AAA contrast ratios and generates tokens.css + brand.json from source colors.",
28
+ "entrypoint": { "runtime": "python3", "script": "scripts/extract_palette.py" },
29
+ "invocation": {
30
+ "cli_pattern": "{runtime} \"{skill_root}/{script}\" --target \"{target_path}\" {flags}",
31
+ "args": [
32
+ { "name": "target_path", "type": "path", "required": true, "description": "Absolute path to the client project" },
33
+ { "name": "source", "type": "string", "required": false, "flag": "--source", "description": "Hex seed color or image path to derive the palette from" }
34
+ ]
35
+ },
36
+ "output": { "format": "json", "channel": "stdout" },
37
+ "runtime_requirements": { "isolation_recommended": false, "dependencies": [] },
38
+ "invoked_by_commands": ["tokens", "palette", "init"]
39
+ },
40
+ {
41
+ "name": "optimize_media",
42
+ "description": "Compresses images, removes backgrounds, and generates WebP variants.",
43
+ "entrypoint": { "runtime": "python3", "script": "scripts/optimize_assets.py" },
44
+ "invocation": {
45
+ "cli_pattern": "{runtime} \"{skill_root}/{script}\" --target \"{target_path}\" {flags}",
46
+ "args": [
47
+ { "name": "target_path", "type": "path", "required": true, "description": "Absolute path to the client project" },
48
+ { "name": "remove_bg", "type": "boolean", "required": false, "default": false, "flag": "--remove-bg" }
49
+ ]
50
+ },
51
+ "output": { "format": "json", "channel": "stdout" },
52
+ "runtime_requirements": {
53
+ "isolation_recommended": true,
54
+ "dependencies": ["Pillow", "rembg", "onnxruntime"]
55
+ },
56
+ "invoked_by_commands": ["assets"]
57
+ }
58
+ ]
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidyfactor/design",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "TidyFactor Design track — code-native UI design lifecycle engine (Figma alternative) with Contextual Decision Layer (CDL)",
5
5
  "main": "SKILL.md",
6
6
  "bin": {
@@ -55,6 +55,7 @@
55
55
  "assets",
56
56
  "bin",
57
57
  "brand.json",
58
+ "manifest.json",
58
59
  "memory",
59
60
  "references",
60
61
  "scripts",
@@ -44,6 +44,10 @@ For each shared component in `design-system/components.css`:
44
44
  - Cubic-bezier curves and duration values
45
45
  - Reduced-motion fallback rules (`prefers-reduced-motion: reduce`)
46
46
 
47
+ ### 5. Optional Brain MCP Sync (`--sync-brain`)
48
+ When invoked with `--sync-brain`, the command packages the Design System Baseline into an Atomic Knowledge Item (KI) per `20-brain-baas-integration.md` and exports it to the active project's Brain MCP storage via `extract_knowledge_item`.
49
+ - **Fail-Open Policy**: If Brain MCP is unavailable or offline, silently skip KI export and complete the local `docs/handoff/` generation.
50
+
47
51
  ## Checklist
48
52
 
49
53
  - [ ] Complete token mapping table generated
@@ -1,13 +1,46 @@
1
- # Design Schools & Movements — Quick Calibration Index
1
+ # Design Schools & Movements — Unified Calibration Index
2
+ <!-- last-verified: 2026-09-01 -->
2
3
 
3
- For complete operational rules, visual tokens, typography pairings, color systems, CSS rules, shadow styles, and anti-patterns across all 20 visual aesthetics, see:
4
- 👉 **[`memory/16-design-movements-guide.md`](16-design-movements-guide.md)** (All 20 Visual Movements & Design Tokens)
5
- 👉 **[`memory/17-storytelling-industries-ux.md`](17-storytelling-industries-ux.md)** (4 Storytelling Archetypes, 8 Industry Registers, 8 UX Philosophies)
4
+ A complete working index of design aesthetics, universal movements, and regional heritage art-direction lanes across all TidyFactor design engines.
5
+
6
+ 👉 **[`memory/16-design-movements-guide.md`](16-design-movements-guide.md)** (All 20 Universal Visual Movements)
7
+ 👉 **[`memory/19-heritage-lanes-atmosphere.md`](19-heritage-lanes-atmosphere.md)** (5 Egyptian & Regional Heritage Lanes)
8
+ 👉 **[`memory/17-storytelling-industries-ux.md`](17-storytelling-industries-ux.md)** (Storytelling Archetypes & Industry Registers)
6
9
  👉 **[`memory/18-design-decision-engine.md`](18-design-decision-engine.md)** (9-Step Decision Tree & Anti-Design-Soup Constraint)
7
10
 
8
11
  ---
9
12
 
10
- ## 🎨 20 Visual Aesthetics At-A-Glance Index
13
+ ## 🏛️ 5 Regional & Egyptian Heritage Art-Direction Lanes
14
+
15
+ 1. **Nilotic Wadj & Sacred Lotus (أصالة النيل ولوتس مصر العليا)**:
16
+ - *DNA*: Upper Egyptian heritage (Qena, Dendera, Thebes, Aswan), Sacred Lotus (`Sesen`), mineral green (`Wadj`), Nile terracotta (`Khem`), Royal Lapis (`Khesbed`), Sun Gold (`Nebu`).
17
+ - *Grammar*: Ascending registers, shallow stone deboss (`Low-Relief`), tactile papyrus & alabaster light texture (`Subtle Noise`).
18
+ - *Fits*: Community development, educational leadership, inclusive education, scholarly platforms, Upper Egyptian institutions.
19
+
20
+ 2. **Egyptian Nubian Folk & Earth Vaults (النوبة المصرية والعمارة الطينية)**:
21
+ - *DNA*: Aswan & West Suhail mud-brick vaulted architecture (Hassan Fathy), geometric chevron & zigzag bands, vibrant folk warmth.
22
+ - *Grammar*: Stepped triangles, Nubian vaulted card tops, sunny ochre, turquoise cataracts, terracotta clay, white lime plaster.
23
+ - *Fits*: Cultural platforms, eco-tourism, community initiatives, youth & child development.
24
+
25
+ 3. **Sinai Bedouin & Stitched Craft (البادية والتطريز السيناوي المصري)**:
26
+ - *DNA*: Authentic Sinai Bedouin cross-stitch embroidery (North & South Sinai), St. Catherine granite mountains, wild flora.
27
+ - *Grammar*: Pixelated cross-stitch geometric rails, embroidered dividers, madder red, wild rose magenta, deep Sinai night indigo, raw wool ivory.
28
+ - *Fits*: Heritage crafts, environmental foundations, field campaigns, national culture.
29
+
30
+ 4. **Al-Muqarnas & Girih Geometry (التوريق والمقرنصات الهندسية)**:
31
+ - *DNA*: Historic Cairo (Fatimid & Mamluk), Andalusian & Maghrebi architecture, mashrabiya woodwork, mathematical astronomy.
32
+ - *Grammar*: 4/6/8-fold repeat geometry, architectural aperture masks, perforated shadows (`Perforated Shadowing`), cobalt lapis, turquoise glaze, antique ochre.
33
+ - *Fits*: Cultural foundations, academic conferences, endowment platforms, classical Islamic arts.
34
+
35
+ 5. **Kufic Modernity & Luminescent Noor (العمارة الحروفية والنور المعاصر)**:
36
+ - *DNA*: Contemporary regional minimalism led by monumental Arabic typography and generous spatial purity.
37
+ - *Grammar*: Monumental Arabic wordmark/phrase hero, polished terrazzo, limestone, brushed bronze, single vibrant accent.
38
+ - *Fits*: Technology, sovereign wealth, venture studios, knowledge economy, international consulting.
39
+
40
+ ---
41
+
42
+ ## 🎨 20 Universal Visual Movements At-A-Glance Index
43
+
11
44
  1. **Swiss Style**: Objective 12-column grid, sans-serif, high contrast.
12
45
  2. **Flat Design**: 2D vector, zero shadows, vibrant color blocks.
13
46
  3. **Material Design**: Paper/ink depth, elevation shadows, touch ripples.
@@ -29,57 +62,16 @@ For complete operational rules, visual tokens, typography pairings, color system
29
62
  19. **Organic / Amorphous UI**: Fluid blob shapes (`border-radius: 60% 40% ...`), natural tones.
30
63
  20. **Frutiger Aero & Y2K**: Glossy glass buttons, lens flares, vibrant sky blue/lime gradients.
31
64
 
32
- ## Bauhaus
33
- Geometric shapes as structural/decorative elements, primary-plus-black
34
- palettes, function-follows-form typography. Fits: education, design tools,
35
- brands wanting to signal craft/foundational thinking. Avoid: costume-party
36
- Bauhaus (circles+triangles as decoration with no structural logic).
37
-
38
- ## Brutalism (web)
39
- Raw, unstyled-looking HTML elements used deliberately, harsh contrast,
40
- visible grid lines, monospace accents, intentionally "undesigned". Fits:
41
- developer tools, portfolios, brands wanting to signal authenticity/anti-
42
- polish. Avoid: actual unstyled defaults mistaken for the aesthetic —
43
- brutalism is a considered choice, not the absence of one.
44
-
45
- ## Editorial / Broadsheet
46
- Hairline rules, dense multi-column text, serif display, byline/dateline
47
- conventions borrowed from print journalism. Fits: publications, long-form
48
- content, thought-leadership brands. Avoid: applying hairline-column density
49
- to a page that has nothing to say at that density (see `frontend-design`'s
50
- warning on this as an overused AI-design default).
51
-
52
- ## Minimalism
53
- Extreme restraint, one accent color maximum, huge whitespace, type doing
54
- almost all the work. Fits: luxury, premium single-product brands. Avoid:
55
- minimalism as an excuse for lack of a real design decision — every
56
- remaining element must be precisely placed.
57
-
58
- ## Glassmorphism
59
- Frosted-glass translucent panels, soft shadows, layered depth over a
60
- blurred background. Fits: modern consumer apps, dashboards wanting a soft/
61
- approachable data-density feel. Avoid: layering glass panels on glass
62
- panels — contrast and legibility break down fast.
63
-
64
- ## Material-influenced
65
- Elevation via shadow, clear touch targets, motion as spatial logic (things
66
- move the way physical objects would). Fits: cross-platform app UI,
67
- utilitarian dashboards. Avoid: importing Material's specific component
68
- shapes wholesale when the brand wants its own identity — take the
69
- principles, not the skin.
65
+ ---
70
66
 
71
- ## Modern SaaS (Vercel/Linear-influenced)
72
- Near-black or pure-white grounds, one saturated accent, monospace for data/
73
- code, tight type scale, subtle gradient accents, generous but efficient
74
- spacing. Fits: developer tools, B2B SaaS, technical dashboards. Avoid:
75
- defaulting here just because the brief is "a SaaS product" this look is
76
- common enough now to read as generic if the brand has no other point of
77
- view.
67
+ ## 🏆 Award-Winning Regional Reference Evidence
68
+ Treat award galleries as evidence of interaction and composition patterns:
69
+ - **Webook (Riyadh Season)**: Immersive event storytelling, WebGL and sound.
70
+ - **Masar Destination**: Saudi destination storytelling with responsive WebGL.
71
+ - **IoT Squared**: Sovereign technology positioning via animation & parallax without heritage cliches.
72
+ - **Kode**: New Cairo sports brand using bold color, animation, and WebGL.
73
+ - **Ali Ali**: Cairo creative portfolio driven by minimal typography and film.
74
+ - **Sivik Atelier**: Dubai studio portfolio using grid, parallax, and minimal typography.
75
+ - **Jazean Coffee**: Saudi heritage framed as interactive scroll storytelling.
78
76
 
79
- ## Calibration: defaults to avoid unless the brief asks for them
80
- Per `frontend-design`'s own calibration: warm-cream + terracotta-serif,
81
- near-black + single acid-green/vermilion accent, and broadsheet-hairline-
82
- columns applied regardless of subject are the three most common AI-design
83
- tells right now. Choosing one deliberately because it fits the brief is
84
- fine; landing on one by default is the failure mode `school` exists to
85
- prevent.
77
+ *Rule: Establish a contemporary editorial system first, then use one culturally meaningful material, narrative, or spatial idea as the signature.*
@@ -29,9 +29,14 @@ the palette, not pure black).
29
29
  (ease-out for entrances, ease-in for exits, a signature easing curve for
30
30
  the brand's characteristic motion if `school` calls for one).
31
31
 
32
+ **Decorative Patterns & Friezes** — continuous horizontal ribbons, architectural
33
+ friezes, and cultural repeating motifs. Defined via SVG `<pattern>` tokens with
34
+ exact waveform bounding boxes (`patternUnits="userSpaceOnUse"`) to guarantee 0px gap
35
+ interlocking across 100% viewport width without manual DOM duplication or layout shifts.
36
+
32
37
  ## Naming convention
33
38
  `--color-*`, `--font-*`, `--space-*`, `--radius-*`, `--shadow-*`,
34
- `--ease-*`/`--duration-*` — consistent prefixing so any command (or a human
39
+ `--ease-*`/`--duration-*`, `--pattern-*`, `--motif-*` — consistent prefixing so any command (or a human
35
40
  reading the CSS) can immediately tell a value's category.
36
41
 
37
42
  ## Contrast policy
@@ -1,44 +1,42 @@
1
1
  # Motion Principles — Reference for `motion`
2
+ <!-- last-verified: 2026-09-01 -->
2
3
 
3
- Adapted from the classic animation principles, applied to UI motion rather
4
- than character animation.
5
-
6
- ## Staging
7
- One focal change communicated at a time. A section revealing five cards
8
- simultaneously reads as noise; the same five staggered by ~60-80ms each
9
- read as a considered sequence.
10
-
11
- ## Anticipation
12
- A small pre-state before a bigger change helps the eye track what's about
13
- to happen (a button's subtle scale-down before a bigger transition, a
14
- skeleton before content pops in) — used sparingly, not on every
15
- interaction.
16
-
17
- ## Ease-out for entrances, ease-in for exits
18
- Things entering the screen should decelerate into place (ease-out);
19
- things leaving should accelerate away (ease-in). Using the same easing
20
- for both reads as mechanical rather than natural.
21
-
22
- ## Follow-through / slight overshoot
23
- A very small overshoot-and-settle on an entrance (a card that slightly
24
- overshoots its final position before settling) reads as more alive than a
25
- purely linear arrival — use subtly, it's easy to overdo into "bouncy" and
26
- undermine a restrained direction like Minimalism or Swiss.
27
-
28
- ## Secondary motion
29
- A primary element moving (e.g. a hero image entering) can carry a small,
30
- delayed secondary motion (a shadow settling a beat later, an accent
31
- element trailing slightly) this is what separates "orchestrated" motion
32
- from "everything moves in lockstep".
33
-
34
- ## Restraint is a choice, not an absence
35
- Per `frontend-design`: an orchestrated single moment usually lands harder
36
- than scattered effects everywhere, and excess ambient animation is one of
37
- the strongest tells that a design is AI-generated. `school`'s chosen
38
- direction should determine how much motion is appropriate — Minimalism and
39
- Swiss call for very little; Modern SaaS and Glassmorphism can carry more.
40
-
41
- ## Non-negotiable: `prefers-reduced-motion`
42
- Every entrance/scroll/parallax effect in `motion.js` must check this media
43
- query and fall back to instant or opacity-only transitions — applied
44
- globally in the shared file, not per page.
4
+ Adapted from classic animation principles, applied to UI motion rather than character animation.
5
+
6
+ ---
7
+
8
+ ## 1. Core Principles
9
+ - **Staging**: One focal change communicated at a time. Stagger card reveals by ~60-80ms.
10
+ - **Anticipation**: Small pre-state before a bigger change helps the eye track what's about to happen.
11
+ - **Ease-out for entrances, ease-in for exits**: Natural deceleration on entry, acceleration on exit.
12
+ - **Secondary motion**: Delayed subtle trail (e.g. shadow settling a beat later).
13
+ - **Restraint**: An orchestrated single moment lands harder than scattered effects everywhere.
14
+
15
+ ---
16
+
17
+ ## 2. Cursor Spotlight & Ambient Glow Engine (Interactive Depth)
18
+ - **Per-Card Cursor Spotlight**:
19
+ - Dynamically track `--mouse-x` and `--mouse-y` via `getBoundingClientRect()` on `.bento-card`, `.card`, and showcase tiles.
20
+ - Reveal a subtle `radial-gradient` (350-400px radius) in dark mode to illuminate surface borders and textures.
21
+ - **Viewport Ambient Spotlight**:
22
+ - Desktop-only (`min-width: 992px`), single fixed layer driven by `requestAnimationFrame` and `translate3d(x, y, 0)`.
23
+ - Illuminates the underlying papyrus, granite, or obsidian texture with zero layout thrashing.
24
+ - Must automatically disable under `prefers-reduced-motion: reduce`.
25
+
26
+ ---
27
+
28
+ ## 3. SVG Stroke Dash & Parallax Choreography
29
+
30
+ ### A. SVG Stroke Dash Tracing (`.lotus-stroke-animated`)
31
+ - For cultural emblems, watermarks, and architectural line art, set `strokeDasharray` and `strokeDashoffset` equal to the total path perimeter (e.g. `1200-1600px` or `.getTotalLength()`).
32
+ - Animate `strokeDashoffset: 0` using GSAP timeline `power2.inOut` with micro-staggers (100-150ms) across petals/lines during initial page load.
33
+
34
+ ### B. Interactive Parallax with Optical Counter-Movement (Desktop $\ge 992px$)
35
+ - Foreground hero visual frames receive soft directional tilt (`xOffset * 0.5`, `yOffset * 0.5`).
36
+ - Deep background watermarks and particles receive inverted counter-movement (`-xOffset * 0.8`, `-yOffset * 0.8`) with longer easing durations (1.2s vs 0.8s) to establish multi-plane spatial depth.
37
+ - On `mouseleave`, smoothly tween all planes back to origin `(0, 0)` via `power2.out`.
38
+
39
+ ---
40
+
41
+ ## 4. Non-negotiable: `prefers-reduced-motion`
42
+ Every entrance, scroll, parallax, or ambient spotlight effect in `motion.js` must check `window.matchMedia('(prefers-reduced-motion: reduce)')` and fall back to instant or opacity-only transitions globally.
@@ -1,34 +1,50 @@
1
1
  # Component Anatomy — Reference for `components`/`states`
2
+ <!-- last-verified: 2026-09-01 -->
2
3
 
3
- ## Atomic hierarchy (Atomic Design, adapted)
4
- - **Atoms** — button, input, label, icon, badge. The smallest named unit;
5
- never composed of other named components.
6
- - **Molecules** a form field (label + input + error text), a stat
7
- (label + value + trend), a nav item (icon + label + active state).
8
- - **Organisms** — a card, a data table, a navbar, a pricing tile, a modal.
9
- Composed from atoms/molecules, still a single reusable named unit.
10
- - **Templates** (this skill's `page`/`dashboard` output) — organisms
11
- arranged into a page's actual layout. This is the one level that's
12
- allowed to be page-specific — it's arrangement, not new styling.
13
-
14
- A new visual need almost always belongs at the atom/molecule/organism
15
- level, added once to `components.css`/the foundation library not
16
- invented at the template level.
17
-
18
- ## The full state matrix (apply per interactive component)
19
- `default hover focus-visible active/pressed disabled`, plus where
20
- relevant: `loading`, `empty`, `error`, `success`. A component "supports"
21
- these states means each has an intentional look, not that the browser
22
- default happens to apply.
23
-
24
- ## Naming discipline
25
- One canonical name per real pattern. A "featured pricing card" and a
26
- "testimonial card" that share 90% of their structure should be one `.card`
27
- component with modifiers (`.card--featured`), not two components that will
28
- quietly diverge over time.
29
-
30
- ## When something looks like it needs a new component but doesn't
31
- If the only difference from an existing component is a token value (a
32
- different accent color, a different size) — that's a modifier class or a
33
- data attribute, not a new component. New components are for genuinely
34
- different structure/behavior, not restyled instances.
4
+ ## 1. Atomic Hierarchy (Atomic Design, Adapted)
5
+ - **Atoms**: Button, input, label, icon, badge, watermark stamp.
6
+ - **Molecules**: Form field, stat counter, nav item, floating verification badge.
7
+ - **Organisms**: Card, data table, navbar, 3D book/exhibition card, timeline, modal.
8
+ - **Templates**: Organisms arranged into page layout with zero per-page CSS.
9
+
10
+ ---
11
+
12
+ ## 2. Advanced Specialized Organisms & Molecules
13
+
14
+ ### A. Watermark Stamp & Media Protection (`.watermark-stamp`)
15
+ - Floating glassmorphic pill badge positioned over showcase media (e.g. `bottom: 12px; inset-inline-start: 12px;`).
16
+ - Visuals: `background: rgba(8, 7, 5, 0.85); backdrop-filter: blur(8px); border: 1px solid var(--border-gold);`.
17
+ - Protection: Non-draggable images (`-webkit-user-drag: none; user-select: none;`).
18
+
19
+ ### B. 3D Exhibition & Editorial Book Showcase Card (`.book-card`)
20
+ - Layout: Asymmetric split (Cover viewport on one side, editorial hierarchy on the other).
21
+ - Visuals: Multi-layered spine shadow (`box-shadow: -8px 10px 24px rgba(0,0,0,0.25)`), dynamic hover lift (`translateY(-4px)`), and category badge.
22
+
23
+ ### C. Continuous Architectural Friezes & Motifs (`.lotus-frieze-fullwidth`)
24
+ - Layout: Full-width continuous ribbon utilizing SVG `<pattern patternUnits="userSpaceOnUse">` tiled over a single `<rect width="100%" />` element with zero gap.
25
+ - Break Pattern: Optional centered floating medallion (`.lotus-frieze-center-emblem`) with subtle border elevation and micro-rotation on hover.
26
+
27
+ ### D. Royal Cartouche & Shenu Ribbon Badges (`.section-eyebrow`, `.badge`)
28
+ - Styling: Dual-tone background gradients, gold border (`rgba(201, 136, 24, 0.45)`), inset highlight glow, and authentic cultural iconography.
29
+
30
+ ### E. Responsive Positioning Protocol for Floating Badges & Frame Elements
31
+ - Desktop (`min-width: 992px`): Positioned absolutely outside frame boundaries (`position: absolute; inset-inline-end: -8px;`).
32
+ - Mobile (`max-width: 768px`): Must convert to centered static blocks (`position: relative; inset: auto; width: 100%; justify-content: center;`) to eliminate mobile horizontal scrolling and layout clipping.
33
+
34
+ ### F. Header & Navigation Bar (`.navbar`)
35
+ - Layout: Single-line sticky frosted glass island with gold rim (`white-space: nowrap`).
36
+ - Brand Lockup: Logo emblem medallion (`.brand-emblem`) + Bold title (`.brand-title`) + Micro pedigree (`.brand-pedigree`).
37
+ - Prohibition: Zero emojis anywhere in the navigation bar. Use crisp inline SVGs (`currentColor`).
38
+
39
+ ### G. Mobile Navigation Drawer (`.mobile-drawer`)
40
+ - Structure: Full-height frosted overlay (`backdrop-filter: blur(20px)`), body scroll lock, $\ge 44\times 44\text{px}$ touch targets, and docked bottom action buttons.
41
+
42
+ ---
43
+
44
+ ## 3. The Full 8-State Matrix (Apply per Interactive Component)
45
+ `default → hover → focus-visible → active/pressed → disabled`, plus: `loading` (spinner/skeleton), `empty` (illustrated container), `error`, and `success`.
46
+
47
+ ---
48
+
49
+ ## 4. Naming Discipline
50
+ One canonical name per real pattern. Use BEM modifiers (`.card--featured`, `.badge--accent`) or data attributes (`[data-theme]`, `[data-filter]`) rather than creating duplicate component structures.
@@ -66,6 +66,15 @@ Before handing back any output, score the artifact on 6 axes:
66
66
  10. **Diagonal Stripe Background Overlays**: Using `repeating-linear-gradient(...)` stripe overlays in hero/section backgrounds.
67
67
  11. **Disjointed Display Heading Letter-Spacing**: Using letter-spacing tighter than `-0.04em` on H1 display headings causing characters to collide.
68
68
 
69
+ ---
70
+
71
+ ## 🚫 5 Header & Navigation Anti-Pattern Traps (Auto-Reject)
72
+ 1. **Vertical Text-Wrapping Link Trap**: Link labels breaking/wrapping into 2 stacked lines inside a single link container (e.g. `المبادرات \n والتدريب` or `المؤلفات \n والأبحاث`). Navigation items must strictly stay 1–2 words and enforce `white-space: nowrap;`.
73
+ 2. **The Escaping Action Overflow Trap**: Primary CTA buttons or action toggles spilling outside the navbar pill container due to link congestion or missing container boundaries. Header items must never cause horizontal clipping or overflow.
74
+ 3. **Compound Title Congestion**: Cramming 6+ verbose compound phrases side-by-side (`المؤهلات والأكاديميا`, `المؤلفات والأبحاث`, `المسيرة المهنية`, `الأثر الميداني`, `المبادرات والتدريب`). When links exceed 5–6 items, mandatory escalation to Submenu/Mega Menu applies.
75
+ 4. **Duplicate Primary CTA Intent**: Duplicating the conversion action in both the menu links and the header button (e.g. having `حجز استشارة` in the nav links right next to `تواصل مباشر` on the CTA button). The CTA is the single primary conversion button.
76
+ 5. **Amateur Avatar & Emoji Trap**: Using plain circular placeholder avatars with raw single letters (e.g. a teal circle with a plain letter "ش") or emoji labels (`🌙 ليلي`). Always use authentic SVG royal emblems, cartouches, or clean linear SVG icons.
77
+
69
78
  ## Optical Alignment & Typography Hygiene
70
79
  - **Data Table Numbers**: Multi-digit metrics or numbers missing `font-variant-numeric: tabular-nums` or monospace font alignment.
71
80
  - **Orphaned Headline Words**: Single hanging words on display headers missing `text-wrap: balance` or `text-wrap: pretty`.