@tidyfactor/design 1.6.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.6.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.6.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,16 @@
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
+
5
15
  ## [1.6.0] - 2026-09-01
6
16
 
7
17
  ### Added - Runtime Tooling Manifest & Egyptian Heritage Design Lanes
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/brand.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "TidyFactor Design",
3
- "version": "1.6.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.6.0",
10
- "lastUpdated": "2026-09-01"
9
+ "version": "1.7.0",
10
+ "lastUpdated": "2026-09-02"
11
11
  },
12
12
  "identity": {
13
13
  "logo": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidyfactor/design",
3
- "version": "1.6.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": {
@@ -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
@@ -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
@@ -25,5 +25,18 @@ Adapted from classic animation principles, applied to UI motion rather than char
25
25
 
26
26
  ---
27
27
 
28
- ## 3. Non-negotiable: `prefers-reduced-motion`
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`
29
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.
@@ -20,6 +20,25 @@
20
20
  - Layout: Asymmetric split (Cover viewport on one side, editorial hierarchy on the other).
21
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
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
+
23
42
  ---
24
43
 
25
44
  ## 3. The Full 8-State Matrix (Apply per Interactive Component)
@@ -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`.
@@ -1,18 +1,19 @@
1
+ <!-- last-verified: 2026-09-02 -->
1
2
  # 10 · Python Tooling & Asset Refinement Guide
2
3
 
3
4
  The **TidyFactor Design** skill includes a lightweight Python tooling suite in `scripts/` to provide AI Agents with local media manipulation, palette extraction, background removal, and image optimization capabilities.
4
5
 
5
6
  ---
6
7
 
7
- ## 🛠️ Tooling Suite Inventory
8
+ ## 🛠️ Tooling Suite Inventory & Latency Classes
9
+
10
+ | Script | Responsibility | Latency Class | Isolation Scope | Invoked By |
11
+ |---|---|---|---|---|
12
+ | **`scripts/audit_design.py`** | Anti-pattern & token compliance auditor | Sub-second (<100ms) | In-process stdlib | `audit`, `perf` |
13
+ | **`scripts/extract_palette.py`** | WCAG 2.1 AAA contrast & palette derivation | Sub-second (<150ms) | `Pillow` (stdlib fallback) | `tokens`, `palette`, `init` |
14
+ | **`scripts/optimize_assets.py`** | Neural bg removal & WebP image optimization | Async Batch (2–8s) | `isolation_recommended: true` (`rembg`, `onnxruntime`) | `assets`, `deploy` |
15
+ | **`scripts/minify_assets.py`** | CSS/JS minification | Sub-second (<100ms) | Standard Python | `deploy` |
8
16
 
9
- | Script | Primary Responsibility | Dependencies | Command Trigger |
10
- |---|---|---|---|
11
- | **`scripts/extract_palette.py`** | Image color quantization, WCAG 2.1 AA contrast check, `brand.json` & `tokens.css` sync | `Pillow` | `palette`, `tokens`, `init`, `clone` |
12
- | **`scripts/remove_backgrounds.py`** | AI background removal (`rembg`) for transparent PNG logos, product shots, & cutouts | `rembg`, `Pillow` | `init`, `components`, `page`, `retrofit` |
13
- | **`scripts/optimize_assets.py`** | Resizes heavy assets to design token bounds (heroes max 1200px, cards 400px, logos 240px) | `Pillow` | `deploy`, `audit` |
14
- | **`scripts/minify_assets.py`** | Bundles & minifies CSS/JS for presentation deployment | Standard Python | `deploy` |
15
- | **`scripts/inspect_images.py`** | Inspects image dimensions, color channels, and alpha channel status | Standard Python | `audit` |
16
17
 
17
18
  ---
18
19
 
@@ -14,6 +14,37 @@ Reference catalog for Navigation (N1–N9) and Footer (Ft1–Ft8) components.
14
14
  - **N8: Vertical Rail** — Fixed left/right navigation rail for web app dashboards.
15
15
  - **N9: Fullscreen Overlay** — Trigger button opening full-viewport navigation overlay.
16
16
 
17
+ ---
18
+
19
+ ## 🏛️ Navigation & Header Design Invariants (Strict Quality Bar)
20
+
21
+ ### 1. Zero Emoji Invariant (`No Emojis in Nav/Menu`)
22
+ - **Prohibition**: Emojis (e.g. 🏠, 📞, 📚, ⚡) are strictly prohibited in navigation links, headers, submenus, and action controls. Emojis represent an amateur AI-slop anti-pattern.
23
+ - **Enforcement**: Use lightweight inline SVG vector icons or ultra-lightweight linear icon sets (Lucide, Feather, Heroicons with 1.5–2px stroke) styled dynamically via `currentColor` or brand tokens.
24
+
25
+ ### 2. Single-Line Discipline (`white-space: nowrap; flex-wrap: nowrap;`)
26
+ - **One-Line Invariant**: Navigation items must strictly fit in a single horizontal row on desktop viewports. Multi-line navigation wrapping is unacceptable.
27
+ - **Label Conciseness**: Labels must be 1 to 2 words maximum (e.g. `الرئيسية`, `المسيرة`, `المؤلفات`, `المبادرات`, `حاسبة الأسعار`).
28
+ - **Stacked Sub-descriptor Option**: If descriptive context is needed, stack a micro-caption (`font-size: 0.7rem`) vertically under the primary title within the link container, preserving compact horizontal width.
29
+ - **SEO vs Navigation Separation**: Full explanatory copy and SEO keywords belong in page body content and schema markup—navigation is dedicated exclusively to rapid, intuitive orientation.
30
+
31
+ ### 3. Submenu & Mega Menu Fallback Protocol
32
+ - If a project requires more than 5–6 primary destinations, do NOT crowd the header bar.
33
+ - **Mandatory Escalation**: Group links into structured **Submenus (Dropdowns)** or an architectural **Mega Menu** with frosted glass backdrops, golden borders, and categorical grouping.
34
+
35
+ ### 4. Mobile-First Navigation & Drawer Architecture (Must Rules)
36
+ - **Automatic Viewport Folding**: On screens `< 1024px` or `< 768px`, desktop navigation links must seamlessly fold into a slide-out drawer (`.mobile-drawer`) or bottom sheet.
37
+ - **Touch Target Integrity**: Minimum 44×44px hit areas for all hamburger triggers, menu links, and controls (WCAG 2.5.5).
38
+ - **Body Scroll Lock**: Automatically lock document scrolling when the mobile drawer is active (`body.menu-open { overflow: hidden; }`).
39
+ - **Zero Horizontal Overflow**: No absolute badge or floating frame element may cause horizontal scrolling on mobile viewports (`overflow-x: clip / hidden; width: 100vw;`).
40
+ - **Compact Sticky Height**: Mobile header height capped at 52–62px with logo/brand text truncation protection (`text-overflow: ellipsis; white-space: nowrap;`).
41
+
42
+ ### 5. Header Action Controls Cap (Max 3 Controls)
43
+ - Header action clusters must not exceed **3 controls maximum** (e.g. Primary CTA + Language Switcher + Theme Toggle).
44
+ - All action controls must share geometric harmony (coordinated pill radii, consistent padding, and unified border treatment).
45
+
46
+ ---
47
+
17
48
  ## Footer Archetypes
18
49
 
19
50
  - **Ft1: Mast-Headed** — Giant brand wordmark overlaying top of footer section with multi-column links below.
@@ -16,10 +16,13 @@ Complete operational grammar, palettes, atmospheric textures, and anti-patterns
16
16
  - `papyrus-bg`: `#FAF8F2` (Sacred Papyrus)
17
17
  * **Atmosphere & Texture**:
18
18
  - Fine Papyrus grain overlay (`feTurbulence` with 0.035 opacity).
19
+ - Continuous Full-Width Frieze Ribbon (`.lotus-frieze-fullwidth` with SVG `<pattern>` repeat).
20
+ - 4-Corner Lotus Filigree Brackets (`.corner-bracket`) framing key academic and authority portraits.
19
21
  - Shallow stone relief deboss on cards (`Low-Relief`).
20
22
  - Warm sunlit alabaster ambient glow.
21
23
  * **Anti-Patterns**:
22
24
  - Never use stock pyramids, pharaonic tourist masks, or fake pseudo-hieroglyphs.
25
+ - Never create segmented image dividers that break or produce seams on wide viewports (always use SVG `<pattern>`).
23
26
 
24
27
  ---
25
28
 
@@ -0,0 +1,96 @@
1
+ <!-- last-verified: 2026-09-02 -->
2
+ # Brain MCP & Sovereign BaaS Integration Contract
3
+
4
+ Authoritative operational specification governing how `tidyfactor-design` integrates with self-hosted `tidyfactor-brain` MCP instances and sovereign BaaS nodes without creating hard dependencies or blocking offline workflows.
5
+
6
+ ---
7
+
8
+ ## 🏛️ 1. Sovereign Architecture Model (Self-Hosted Primacy)
9
+
10
+ TidyFactor operates on a **Sovereign, Self-Hosted Architecture**:
11
+ - **Zero Centralized SaaS Dependency**: `tidyfactor-brain` and its MCP server run locally on the developer's machine or on an agency's self-hosted server instance (Apache G5 / PHP Flight / SQLite WAL).
12
+ - **Tenant Definition**: In this sovereign architecture, a `tenant` represents an isolated client project / domain workspace (e.g. `tenant_dr_sh`, `tenant_alwkala`) mapped to a dedicated SQLite file (`data/tenants/{tenant_id}_brain.sqlite`) or scoped directory (`~/.gemini/knowledge/projects/{project_id}/`).
13
+ - **No Global Auth Overhead**: Local stdio connections run authentication-free. Self-hosted remote SSE nodes authenticate via static bearer tokens configured in the agency's `mcp_config.json`.
14
+
15
+ ---
16
+
17
+ ## ⚡ 2. The Deterministic Fail-Open Contract
18
+
19
+ Brain MCP is an **optional acceleration layer**, NEVER a required runtime dependency.
20
+
21
+ ### Strict Resolution Algorithm:
22
+
23
+ ```
24
+ Step 1: Check Local Disk Workspace
25
+ ├── IF `BRAND-GUIDELINES.md` or `.tidyfactor/design-brief.md` exists:
26
+ │ └── LOAD directly from disk. Done.
27
+ └── ELSE: Proceed to Step 2.
28
+
29
+ Step 2: Check Active MCP Toolset Availability
30
+ ├── IF tool `search_knowledge_base` is present in agent's active tool list:
31
+ │ ├── Execute: `search_knowledge_base(query="design tokens", scope="project", project_id=CURRENT_PROJECT)`
32
+ │ ├── IF valid design KI returned:
33
+ │ │ └── POPULATE context baseline. Done.
34
+ │ └── ELSE (Empty/Error):
35
+ │ └── Silent fallback (0ms delay) to Step 3.
36
+ └── ELSE (Tool not registered / Standalone environment / Offline):
37
+ └── Silent fallback (0ms delay) to Step 3.
38
+
39
+ Step 3: Interactive Micro-Discovery (CDL 3-Question Dialogue)
40
+ └── Present concise, structured A/B/C/D choices to the user. Done.
41
+ ```
42
+
43
+ ### Invariants:
44
+ 1. **Zero Connection Attempts**: Skills must NEVER attempt raw HTTP connections or socket calls to non-existent servers. They only query native MCP tools if registered in the active agent session.
45
+ 2. **Zero Delay & Zero Noise**: Missing MCP server must NEVER yield warning messages, stack traces, or connection timeouts. The bypass must be instant and silent.
46
+
47
+ ---
48
+
49
+ ## 📦 3. Design System Knowledge Item (KI) Contract
50
+
51
+ When exporting design baselines via explicit `--sync-brain` flag on `handoff`, the skill formats the deliverable as a structured Atomic KI conforming to the following JSON payload:
52
+
53
+ ```json
54
+ {
55
+ "schema_version": "1.0.0",
56
+ "ki_type": "design_system_baseline",
57
+ "project_id": "current-project-slug",
58
+ "timestamp": "2026-09-02T05:00:00Z",
59
+ "tokens": {
60
+ "css_foundation": "native|tailwind|daisyui|pico|hybrid",
61
+ "design_school": "neobrutalism|editorial-luxury|swiss-modern|minimal-mono|heritage-egyptian",
62
+ "palette": {
63
+ "primary": "#HEX",
64
+ "secondary": "#HEX",
65
+ "accent": "#HEX",
66
+ "surface": "#HEX",
67
+ "text": "#HEX"
68
+ },
69
+ "typography": {
70
+ "display_heading": "El Messiri",
71
+ "body_copy": "Tajawal",
72
+ "font_family_latin": "Inter"
73
+ },
74
+ "layout_archetype": "hero-split-canvas|editorial-asymmetric|command-center-grid"
75
+ },
76
+ "artifacts": [
77
+ "design-system/tokens.css",
78
+ "design-system/base.css",
79
+ "brand.json"
80
+ ]
81
+ }
82
+ ```
83
+
84
+ ---
85
+
86
+ ## 🛠️ 4. Tooling Execution Bridge (`run_skill_tool`)
87
+
88
+ When `tidyfactor-brain` executes `tidyfactor-design` scripts via `manifest.json`:
89
+
90
+ | Tool Name | Script Entrypoint | Latency Class | Execution Mode |
91
+ |---|---|---|---|
92
+ | `audit_design` | `scripts/audit_design.py` | Sub-second (<100ms) | Direct CLI / In-memory AST |
93
+ | `extract_palette` | `scripts/extract_palette.py` | Sub-second (<150ms) | WCAG Color Math Engine |
94
+ | `optimize_media` | `scripts/optimize_assets.py` | Async Batch (2–8s) | `isolation_recommended: true` (rembg/onnx) |
95
+
96
+ ---
@@ -6,20 +6,26 @@ Discovers and records core design system baselines (Foundation, School, Typograp
6
6
 
7
7
  ## Steps
8
8
 
9
- 1. **Check Existing State**:
10
- - Inspect `brand.json` and `.tidyfactor/design-brief.md` for existing tokens and school choices.
11
-
12
- 2. **Conduct Structured Discovery (Max 3 Questions)**:
13
- - If not specified, ask:
14
- 1. **CSS Foundation (D1)**: Native CSS, Tailwind, or DaisyUI?
15
- 2. **Design School (D2)**: Swiss Clean, Neo-Brutalist, Luxury Glassmorphic, or Warm Editorial?
16
- 3. **Layout Archetype (D4)**: L1 Landing Story, L2 Split Screen, or L3 Dashboard?
17
-
18
- 3. **Record Decisions**:
19
- - Save `.tidyfactor/design-brief.md` with confirmed parameters.
20
-
21
- 4. **Report Summary**:
22
- - Confirm baseline parameters and prompt user to invoke `/init` or `/components`.
9
+ 1. **Check Existing State (Local Auto-Sensing First)**:
10
+ - Scan workspace for `BRAND-GUIDELINES.md`, `brand.json`, and `.tidyfactor/design-brief.md`.
11
+ - If present, immediately extract tokens, typography, and palette baselines without prompting.
12
+
13
+ 2. **Check Active MCP Acceleration (Fail-Open Fallback)**:
14
+ - If local files do not exist AND `search_knowledge_base` is available in active agent tools:
15
+ Query `search_knowledge_base(query="design tokens", scope="project")` for existing project baselines.
16
+ - If MCP is unavailable, empty, or returns error: Silently proceed to Step 3 with 0ms delay.
17
+
18
+ 3. **Conduct Structured Discovery (Max 3 Questions)**:
19
+ - If parameters remain unresolved, present at most 3 concise multiple-choice options:
20
+ 1. **CSS Foundation (D1)**: (A) Native CSS (Default), (B) Tailwind CSS, (C) daisyUI, (D) Pico CSS.
21
+ 2. **Design School (D2)**: (A) Swiss Modern, (B) Neo-Brutalism, (C) Editorial Luxury, (D) Egyptian / Regional Heritage.
22
+ 3. **Layout Archetype (D4)**: (A) Split Hero Canvas, (B) Narrative Editorial, (C) Command Dashboard.
23
+
24
+ 4. **Record Decisions**:
25
+ - Persist confirmed parameters into `.tidyfactor/design-brief.md`.
26
+
27
+ 5. **Report Summary**:
28
+ - Present a concise baseline summary and suggest next action (`/init`, `/tokens`, `/components`).
23
29
 
24
30
  ---
25
31